Repository: sanic-org/sanic Branch: main Commit: 785d77f8fe20 Files: 638 Total size: 3.4 MB Directory structure: gitextract_37k7scdk/ ├── .appveyor.yml ├── .coveragerc ├── .gitattributes ├── .github/ │ ├── CODEOWNERS │ ├── FUNDING.yml │ ├── ISSUE_TEMPLATE/ │ │ ├── bug-report.yml │ │ ├── config.yml │ │ ├── feature-request.yml │ │ └── rfc.yml │ ├── stale.yml │ └── workflows/ │ ├── codeql-analysis.yml │ ├── coverage-upload.yml │ ├── coverage.yml │ ├── publish-release.yml │ └── tests.yml ├── .gitignore ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── MANIFEST.in ├── Makefile ├── README.rst ├── SECURITY.md ├── bandit.baseline ├── changelogs/ │ ├── .gitignore │ ├── 1892.removal.rst │ ├── 1904.feature.rst │ └── 1970.misc.rst ├── codecov.yml ├── crowdin.yml ├── docker/ │ ├── Dockerfile │ └── Dockerfile-base ├── docs/ │ ├── Makefile │ ├── _static/ │ │ ├── .gitkeep │ │ └── custom.css │ ├── _templates/ │ │ └── banner.html │ ├── conf.py │ ├── index.html │ ├── index.rst │ ├── make.bat │ └── sanic/ │ ├── api/ │ │ ├── app.rst │ │ ├── blueprints.rst │ │ ├── core.rst │ │ ├── exceptions.rst │ │ ├── router.rst │ │ ├── server.rst │ │ └── utility.rst │ ├── api_reference.rst │ ├── changelog.rst │ ├── contributing.rst │ └── releases/ │ ├── 21/ │ │ ├── 21.12.md │ │ └── 21.9.md │ ├── 22/ │ │ ├── 22.12.md │ │ ├── 22.3.md │ │ ├── 22.6.md │ │ └── 22.9.md │ └── 23/ │ ├── 23.3.md │ └── 23.6.md ├── examples/ │ ├── Dockerfile │ ├── add_task_sanic.py │ ├── amending_request_object.py │ ├── authorized_sanic.py │ ├── blueprint_middlware_execution_order.py │ ├── blueprints.py │ ├── delayed_response.py │ ├── docker-compose.yml │ ├── exception_monitoring.py │ ├── hello_world.py │ ├── http_redirect.py │ ├── limit_concurrency.py │ ├── log_request_id.py │ ├── logdna_example.py │ ├── modify_header_example.py │ ├── override_logging.py │ ├── pytest_xdist.py │ ├── raygun_example.py │ ├── redirect_example.py │ ├── request_stream/ │ │ ├── client.py │ │ └── server.py │ ├── request_timeout.py │ ├── rollbar_example.py │ ├── run_asgi.py │ ├── run_async.py │ ├── run_async_advanced.py │ ├── sentry_example.py │ ├── simple_async_view.py │ ├── static/ │ │ └── robots.txt │ ├── static_assets.py │ ├── teapot.py │ ├── try_everything.py │ ├── unix_socket.py │ ├── url_for_example.py │ ├── versioned_blueprint_group.py │ ├── vhosts.py │ ├── websocket.html │ └── websocket.py ├── guide/ │ ├── Procfile │ ├── config/ │ │ └── en/ │ │ ├── general.yaml │ │ ├── navbar.yaml │ │ └── sidebar.yaml │ ├── content/ │ │ └── en/ │ │ ├── built-with-sanic.md │ │ ├── emoji.py │ │ ├── guide/ │ │ │ ├── advanced/ │ │ │ │ ├── class-based-views.md │ │ │ │ ├── commands.md │ │ │ │ ├── proxy-headers.md │ │ │ │ ├── signals.md │ │ │ │ ├── streaming.md │ │ │ │ ├── versioning.md │ │ │ │ └── websockets.md │ │ │ ├── basics/ │ │ │ │ ├── README.md │ │ │ │ ├── app.md │ │ │ │ ├── cookies.md │ │ │ │ ├── handlers.md │ │ │ │ ├── headers.md │ │ │ │ ├── listeners.md │ │ │ │ ├── middleware.md │ │ │ │ ├── request.md │ │ │ │ ├── response.md │ │ │ │ ├── routing.md │ │ │ │ └── tasks.md │ │ │ ├── best-practices/ │ │ │ │ ├── blueprints.md │ │ │ │ ├── decorators.md │ │ │ │ ├── exceptions.md │ │ │ │ ├── logging.md │ │ │ │ └── testing.md │ │ │ ├── deployment/ │ │ │ │ ├── caddy.md │ │ │ │ ├── docker.md │ │ │ │ ├── kubernetes.md │ │ │ │ └── nginx.md │ │ │ ├── getting-started.md │ │ │ ├── how-to/ │ │ │ │ ├── README.md │ │ │ │ ├── authentication.md │ │ │ │ ├── autodiscovery.md │ │ │ │ ├── cors.md │ │ │ │ ├── csrf.md │ │ │ │ ├── db.md │ │ │ │ ├── decorators.md │ │ │ │ ├── ipv6.md │ │ │ │ ├── mounting.md │ │ │ │ ├── orm.md │ │ │ │ ├── request-id-logging.md │ │ │ │ ├── serialization.md │ │ │ │ ├── server-sent-events.md │ │ │ │ ├── static-redirects.md │ │ │ │ ├── table-of-contents.md │ │ │ │ ├── task-queue.md │ │ │ │ ├── tls.md │ │ │ │ ├── validation.md │ │ │ │ └── websocket-feed.md │ │ │ ├── introduction.md │ │ │ └── running/ │ │ │ ├── app-loader.md │ │ │ ├── configuration.md │ │ │ ├── development.md │ │ │ ├── inspector.md │ │ │ ├── manager.md │ │ │ └── running.md │ │ ├── help.md │ │ ├── index.md │ │ ├── migrate.py │ │ ├── organization/ │ │ │ ├── code-of-conduct.md │ │ │ ├── contributing.md │ │ │ ├── policies.md │ │ │ └── scope.md │ │ ├── plugins/ │ │ │ ├── sanic-ext/ │ │ │ │ ├── configuration.md │ │ │ │ ├── convenience.md │ │ │ │ ├── custom.md │ │ │ │ ├── getting-started.md │ │ │ │ ├── health-monitor.md │ │ │ │ ├── http/ │ │ │ │ │ ├── cors.md │ │ │ │ │ └── methods.md │ │ │ │ ├── injection.md │ │ │ │ ├── logger.md │ │ │ │ ├── openapi/ │ │ │ │ │ ├── advanced.md │ │ │ │ │ ├── autodoc.md │ │ │ │ │ ├── basics.md │ │ │ │ │ ├── decorators.md │ │ │ │ │ ├── security.md │ │ │ │ │ └── ui.md │ │ │ │ ├── openapi.md │ │ │ │ ├── templating/ │ │ │ │ │ ├── html5tagger.md │ │ │ │ │ └── jinja.md │ │ │ │ └── validation.md │ │ │ └── sanic-testing/ │ │ │ ├── README.md │ │ │ ├── clients.md │ │ │ └── getting-started.md │ │ └── release-notes/ │ │ ├── 2021/ │ │ │ ├── v21.12.md │ │ │ ├── v21.3.md │ │ │ ├── v21.6.md │ │ │ └── v21.9.md │ │ ├── 2022/ │ │ │ ├── v22.12.md │ │ │ ├── v22.3.md │ │ │ ├── v22.6.md │ │ │ └── v22.9.md │ │ ├── 2023/ │ │ │ ├── v23.12.md │ │ │ ├── v23.3.md │ │ │ ├── v23.6.md │ │ │ └── v23.9.md │ │ ├── 2024/ │ │ │ ├── v24.12.md │ │ │ └── v24.6.md │ │ ├── 2025/ │ │ │ ├── v25.12.md │ │ │ └── v25.3.md │ │ └── changelog.md │ ├── public/ │ │ ├── assets/ │ │ │ ├── .gitkeep │ │ │ ├── code.css │ │ │ ├── docs.js │ │ │ └── style.css │ │ ├── index.html │ │ └── web/ │ │ ├── browserconfig.xml │ │ ├── robots.txt │ │ └── site.webmanifest │ ├── requirements.txt │ ├── server.py │ ├── style/ │ │ ├── bulma/ │ │ │ ├── LICENSE │ │ │ ├── bulma.sass │ │ │ └── sass/ │ │ │ ├── base/ │ │ │ │ ├── _all.sass │ │ │ │ ├── animations.sass │ │ │ │ ├── generic.sass │ │ │ │ ├── helpers.sass │ │ │ │ └── minireset.sass │ │ │ ├── components/ │ │ │ │ ├── _all.sass │ │ │ │ ├── breadcrumb.sass │ │ │ │ ├── card.sass │ │ │ │ ├── dropdown.sass │ │ │ │ ├── level.sass │ │ │ │ ├── media.sass │ │ │ │ ├── menu.sass │ │ │ │ ├── message.sass │ │ │ │ ├── modal.sass │ │ │ │ ├── navbar.sass │ │ │ │ ├── pagination.sass │ │ │ │ ├── panel.sass │ │ │ │ └── tabs.sass │ │ │ ├── elements/ │ │ │ │ ├── _all.sass │ │ │ │ ├── box.sass │ │ │ │ ├── button.sass │ │ │ │ ├── container.sass │ │ │ │ ├── content.sass │ │ │ │ ├── form.sass │ │ │ │ ├── icon.sass │ │ │ │ ├── image.sass │ │ │ │ ├── notification.sass │ │ │ │ ├── other.sass │ │ │ │ ├── progress.sass │ │ │ │ ├── table.sass │ │ │ │ ├── tag.sass │ │ │ │ └── title.sass │ │ │ ├── form/ │ │ │ │ ├── _all.sass │ │ │ │ ├── checkbox-radio.sass │ │ │ │ ├── file.sass │ │ │ │ ├── input-textarea.sass │ │ │ │ ├── select.sass │ │ │ │ ├── shared.sass │ │ │ │ └── tools.sass │ │ │ ├── grid/ │ │ │ │ ├── _all.sass │ │ │ │ ├── columns.sass │ │ │ │ └── tiles.sass │ │ │ ├── helpers/ │ │ │ │ ├── _all.sass │ │ │ │ ├── color.sass │ │ │ │ ├── flexbox.sass │ │ │ │ ├── float.sass │ │ │ │ ├── other.sass │ │ │ │ ├── overflow.sass │ │ │ │ ├── position.sass │ │ │ │ ├── spacing.sass │ │ │ │ ├── typography.sass │ │ │ │ └── visibility.sass │ │ │ ├── layout/ │ │ │ │ ├── _all.sass │ │ │ │ ├── footer.sass │ │ │ │ ├── hero.sass │ │ │ │ └── section.sass │ │ │ └── utilities/ │ │ │ ├── _all.sass │ │ │ ├── animations.sass │ │ │ ├── controls.sass │ │ │ ├── derived-variables.sass │ │ │ ├── extends.sass │ │ │ ├── functions.sass │ │ │ ├── initial-variables.sass │ │ │ └── mixins.sass │ │ ├── bulma-prefers-dark/ │ │ │ ├── LICENSE │ │ │ ├── bulma-prefers-dark.sass │ │ │ └── sass/ │ │ │ ├── base/ │ │ │ │ ├── _all.sass │ │ │ │ ├── generic.sass │ │ │ │ └── helpers.sass │ │ │ ├── components/ │ │ │ │ ├── _all.sass │ │ │ │ ├── breadcrumb.sass │ │ │ │ ├── card.sass │ │ │ │ ├── dropdown.sass │ │ │ │ ├── list.sass │ │ │ │ ├── media.sass │ │ │ │ ├── menu.sass │ │ │ │ ├── message.sass │ │ │ │ ├── modal.sass │ │ │ │ ├── navbar.sass │ │ │ │ ├── pagination.sass │ │ │ │ ├── panel.sass │ │ │ │ └── tabs.sass │ │ │ ├── elements/ │ │ │ │ ├── _all.sass │ │ │ │ ├── box.sass │ │ │ │ ├── button.sass │ │ │ │ ├── content.sass │ │ │ │ ├── form.sass │ │ │ │ ├── notification.sass │ │ │ │ ├── other.sass │ │ │ │ ├── progress.sass │ │ │ │ ├── table.sass │ │ │ │ ├── tag.sass │ │ │ │ └── title.sass │ │ │ ├── layout/ │ │ │ │ ├── _all.sass │ │ │ │ ├── footer.sass │ │ │ │ └── hero.sass │ │ │ └── utilities/ │ │ │ ├── _all.sass │ │ │ ├── derived-variables.sass │ │ │ ├── initial-variables.sass │ │ │ └── mixins.sass │ │ ├── colors.scss │ │ ├── elements.scss │ │ ├── general.scss │ │ ├── home.scss │ │ ├── index.scss │ │ ├── menu.scss │ │ ├── overrides.scss │ │ └── theme.scss │ └── webapp/ │ ├── __init__.py │ ├── display/ │ │ ├── __init__.py │ │ ├── base.py │ │ ├── code_style.py │ │ ├── layouts/ │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ ├── elements/ │ │ │ │ ├── __init__.py │ │ │ │ ├── footer.py │ │ │ │ ├── navbar.py │ │ │ │ └── sidebar.py │ │ │ ├── home.py │ │ │ ├── main.py │ │ │ └── models.py │ │ ├── markdown.py │ │ ├── page/ │ │ │ ├── __init__.py │ │ │ ├── docobject.py │ │ │ ├── page.py │ │ │ └── renderer.py │ │ ├── plugins/ │ │ │ ├── __init__.py │ │ │ ├── attrs.py │ │ │ ├── columns.py │ │ │ ├── hook.py │ │ │ ├── inline_directive.py │ │ │ ├── mermaid.py │ │ │ ├── notification.py │ │ │ ├── span.py │ │ │ └── tabs.py │ │ ├── search/ │ │ │ ├── __init__.py │ │ │ ├── renderer.py │ │ │ └── search.py │ │ └── text.py │ ├── endpoint/ │ │ ├── __init__.py │ │ ├── search.py │ │ ├── sitemap.py │ │ └── view.py │ └── worker/ │ ├── __init__.py │ ├── config.py │ ├── factory.py │ ├── livereload.js │ ├── reload.py │ └── style.py ├── pyproject.toml ├── readthedocs.yml ├── sanic/ │ ├── __init__.py │ ├── __main__.py │ ├── __version__.py │ ├── app.py │ ├── application/ │ │ ├── __init__.py │ │ ├── constants.py │ │ ├── ext.py │ │ ├── logo.py │ │ ├── motd.py │ │ ├── spinner.py │ │ └── state.py │ ├── asgi.py │ ├── base/ │ │ ├── __init__.py │ │ ├── meta.py │ │ └── root.py │ ├── blueprint_group.py │ ├── blueprints.py │ ├── cli/ │ │ ├── __init__.py │ │ ├── app.py │ │ ├── arguments.py │ │ ├── base.py │ │ ├── console.py │ │ ├── daemon.py │ │ ├── executor.py │ │ ├── inspector.py │ │ └── inspector_client.py │ ├── compat.py │ ├── config.py │ ├── constants.py │ ├── cookies/ │ │ ├── __init__.py │ │ ├── request.py │ │ └── response.py │ ├── errorpages.py │ ├── exceptions.py │ ├── handlers/ │ │ ├── __init__.py │ │ ├── content_range.py │ │ ├── directory.py │ │ └── error.py │ ├── headers.py │ ├── helpers.py │ ├── http/ │ │ ├── __init__.py │ │ ├── constants.py │ │ ├── http1.py │ │ ├── http3.py │ │ ├── stream.py │ │ └── tls/ │ │ ├── __init__.py │ │ ├── context.py │ │ └── creators.py │ ├── log.py │ ├── logging/ │ │ ├── __init__.py │ │ ├── color.py │ │ ├── default.py │ │ ├── deprecation.py │ │ ├── filter.py │ │ ├── formatter.py │ │ ├── loggers.py │ │ └── setup.py │ ├── middleware.py │ ├── mixins/ │ │ ├── __init__.py │ │ ├── base.py │ │ ├── commands.py │ │ ├── exceptions.py │ │ ├── listeners.py │ │ ├── middleware.py │ │ ├── routes.py │ │ ├── signals.py │ │ ├── startup.py │ │ └── static.py │ ├── models/ │ │ ├── __init__.py │ │ ├── asgi.py │ │ ├── ctx_types.py │ │ ├── futures.py │ │ ├── handler_types.py │ │ ├── http_types.py │ │ ├── protocol_types.py │ │ └── server_types.py │ ├── pages/ │ │ ├── __init__.py │ │ ├── base.py │ │ ├── css.py │ │ ├── directory_page.py │ │ ├── error.py │ │ └── styles/ │ │ ├── BasePage.css │ │ ├── DirectoryPage.css │ │ └── ErrorPage.css │ ├── py.typed │ ├── request/ │ │ ├── __init__.py │ │ ├── form.py │ │ ├── parameters.py │ │ └── types.py │ ├── response/ │ │ ├── __init__.py │ │ ├── convenience.py │ │ └── types.py │ ├── router.py │ ├── server/ │ │ ├── __init__.py │ │ ├── async_server.py │ │ ├── events.py │ │ ├── goodbye.py │ │ ├── loop.py │ │ ├── protocols/ │ │ │ ├── __init__.py │ │ │ ├── base_protocol.py │ │ │ ├── http_protocol.py │ │ │ └── websocket_protocol.py │ │ ├── runners.py │ │ ├── socket.py │ │ └── websockets/ │ │ ├── __init__.py │ │ ├── connection.py │ │ ├── frame.py │ │ └── impl.py │ ├── signals.py │ ├── simple.py │ ├── startup/ │ │ ├── __init__.py │ │ └── errors.py │ ├── touchup/ │ │ ├── __init__.py │ │ ├── meta.py │ │ ├── schemes/ │ │ │ ├── __init__.py │ │ │ ├── altsvc.py │ │ │ ├── base.py │ │ │ └── ode.py │ │ └── service.py │ ├── types/ │ │ ├── __init__.py │ │ ├── hashable_dict.py │ │ └── shared_ctx.py │ ├── utils.py │ ├── views.py │ └── worker/ │ ├── __init__.py │ ├── constants.py │ ├── daemon.py │ ├── inspector.py │ ├── loader.py │ ├── manager.py │ ├── multiplexer.py │ ├── process.py │ ├── reloader.py │ ├── restarter.py │ ├── serve.py │ └── state.py ├── scripts/ │ ├── changelog.py │ ├── pyproject.toml │ └── release.py ├── setup.py ├── tests/ │ ├── __init__.py │ ├── asyncmock.py │ ├── benchmark/ │ │ └── test_route_resolution_benchmark.py │ ├── certs/ │ │ ├── createcerts.py │ │ ├── invalid.certmissing/ │ │ │ └── privkey.pem │ │ ├── localhost/ │ │ │ ├── fullchain.pem │ │ │ └── privkey.pem │ │ ├── password/ │ │ │ ├── fullchain.pem │ │ │ └── privkey.pem │ │ └── sanic.example/ │ │ ├── fullchain.pem │ │ └── privkey.pem │ ├── client.py │ ├── conftest.py │ ├── fake/ │ │ └── server.py │ ├── http3/ │ │ ├── __init__.py │ │ ├── test_http_receiver.py │ │ ├── test_server.py │ │ └── test_session_ticket_store.py │ ├── performance/ │ │ └── sanic/ │ │ ├── http_response.py │ │ ├── simple_server.py │ │ └── varied_server.py │ ├── skip_test_custom_protocol.py │ ├── static/ │ │ ├── app_test_config.py │ │ ├── bp/ │ │ │ ├── decode me.txt │ │ │ └── test.file │ │ ├── decode me.txt │ │ ├── nested/ │ │ │ └── dir/ │ │ │ └── foo.txt │ │ ├── test.file │ │ └── test.html │ ├── test_app.py │ ├── test_asgi.py │ ├── test_bad_request.py │ ├── test_base.py │ ├── test_blueprint_copy.py │ ├── test_blueprint_group.py │ ├── test_blueprints.py │ ├── test_cancellederror.py │ ├── test_cli.py │ ├── test_coffee.py │ ├── test_config.py │ ├── test_constants.py │ ├── test_cookies.py │ ├── test_create_task.py │ ├── test_custom_request.py │ ├── test_daemon.py │ ├── test_deprecation.py │ ├── test_dynamic_routes.py │ ├── test_errorpages.py │ ├── test_exceptions.py │ ├── test_exceptions_handler.py │ ├── test_ext_integration.py │ ├── test_graceful_shutdown.py │ ├── test_handler.py │ ├── test_handler_annotations.py │ ├── test_headers.py │ ├── test_helpers.py │ ├── test_http.py │ ├── test_http_alt_svc.py │ ├── test_init.py │ ├── test_json_decoding.py │ ├── test_json_encoding.py │ ├── test_keep_alive_timeout.py │ ├── test_late_adds.py │ ├── test_logging.py │ ├── test_logo.py │ ├── test_middleware.py │ ├── test_middleware_priority.py │ ├── test_motd.py │ ├── test_multi_serve.py │ ├── test_multiprocessing.py │ ├── test_named_routes.py │ ├── test_naming.py │ ├── test_payload_too_large.py │ ├── test_pipelining.py │ ├── test_prepare.py │ ├── test_redirect.py │ ├── test_reloader.py │ ├── test_request.py │ ├── test_request_cancel.py │ ├── test_request_data.py │ ├── test_request_stream.py │ ├── test_requests.py │ ├── test_response.py │ ├── test_response_file.py │ ├── test_response_json.py │ ├── test_response_timeout.py │ ├── test_routes.py │ ├── test_server_events.py │ ├── test_server_loop.py │ ├── test_signal_handlers.py │ ├── test_signals.py │ ├── test_startup_errors.py │ ├── test_static.py │ ├── test_static_directory.py │ ├── test_tasks.py │ ├── test_test_client_port.py │ ├── test_timeout_logic.py │ ├── test_tls.py │ ├── test_touchup.py │ ├── test_unix_socket.py │ ├── test_url_building.py │ ├── test_url_for.py │ ├── test_url_for_static.py │ ├── test_utf8.py │ ├── test_utils.py │ ├── test_versioning.py │ ├── test_vhosts.py │ ├── test_views.py │ ├── test_websockets.py │ ├── test_ws_handlers.py │ ├── typing/ │ │ ├── samples/ │ │ │ ├── app_custom_config.py │ │ │ ├── app_custom_ctx.py │ │ │ ├── app_default.py │ │ │ ├── app_fully_custom.py │ │ │ ├── request_custom_ctx.py │ │ │ ├── request_custom_sanic.py │ │ │ └── request_fully_custom.py │ │ └── test_typing.py │ └── worker/ │ ├── conftest.py │ ├── test_inspector.py │ ├── test_loader.py │ ├── test_manager.py │ ├── test_multiplexer.py │ ├── test_reloader.py │ ├── test_restarter.py │ ├── test_runner.py │ ├── test_shared_ctx.py │ ├── test_socket.py │ ├── test_startup.py │ ├── test_state.py │ └── test_worker_serve.py └── tox.ini ================================================ FILE CONTENTS ================================================ ================================================ FILE: .appveyor.yml ================================================ version: "{branch}.{build}" environment: matrix: - TOXENV: py36-no-ext PYTHON: "C:\\Python36-x64" PYTHON_VERSION: "3.6.x" PYTHON_ARCH: "64" - TOXENV: py37-no-ext PYTHON: "C:\\Python37-x64" PYTHON_VERSION: "3.7.x" PYTHON_ARCH: "64" - TOXENV: py38-no-ext PYTHON: "C:\\Python38-x64" PYTHON_VERSION: "3.8.x" PYTHON_ARCH: "64" # - TOXENV: py39-no-ext # PYTHON: "C:\\Python39-x64\\python" # PYTHONPATH: "C:\\Python39-x64" # PYTHON_VERSION: "3.9.x" # PYTHON_ARCH: "64" init: SET "PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" install: - pip install tox build: off test_script: tox notifications: - provider: Email on_build_success: false on_build_status_changed: false ================================================ FILE: .coveragerc ================================================ [run] branch = True source = sanic omit = site-packages sanic/__main__.py sanic/server/legacy.py sanic/compat.py sanic/simple.py sanic/utils.py sanic/cli sanic/pages [html] directory = coverage [report] exclude_lines = no cov no qa noqa NOQA pragma: no cover TYPE_CHECKING skip_empty = True ================================================ FILE: .gitattributes ================================================ * text=auto ================================================ FILE: .github/CODEOWNERS ================================================ * @sanic-org/sanic-release-managers /sanic/ @sanic-org/framework /tests/ @sanic-org/framework ================================================ FILE: .github/FUNDING.yml ================================================ # These are supported funding model platforms github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] patreon: # Replace with a single Patreon username open_collective: sanic-org # Replace with a single Open Collective username ko_fi: # Replace with a single Ko-fi username tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry liberapay: # Replace with a single Liberapay username issuehunt: # Replace with a single IssueHunt username otechie: # Replace with a single Otechie username custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] ================================================ FILE: .github/ISSUE_TEMPLATE/bug-report.yml ================================================ name: 🐞 Bug report description: Create a report to help us improve labels: ["bug", "triage"] body: - type: checkboxes id: existing attributes: label: Is there an existing issue for this? description: Please search to see if an issue already exists for the bug you encountered. options: - label: I have searched the existing issues required: true - type: textarea id: description attributes: label: Describe the bug description: A clear and concise description of what the bug is, make sure to paste any exceptions and tracebacks using markdown code-block syntax to make it easier to read. validations: required: true - type: textarea id: code attributes: label: Code snippet description: | Relevant source code, make sure to remove what is not necessary. Please try and format your code so that it is easier to read. For example: ```python from sanic import Sanic app = Sanic("Example") ``` validations: required: false - type: textarea id: expected attributes: label: Expected Behavior description: A concise description of what you expected to happen. validations: required: false - type: dropdown id: running attributes: label: How do you run Sanic? options: - Sanic CLI - As a module - As a script (`app.run` or `Sanic.serve`) - ASGI validations: required: true - type: dropdown id: os attributes: label: Operating System description: What OS? options: - Linux - MacOS - Windows - Other (tell us in the description) validations: required: true - type: input id: version attributes: label: Sanic Version description: Check startup logs or try `sanic --version` validations: required: true - type: textarea id: additional attributes: label: Additional context description: Add any other context about the problem here. validations: required: false ================================================ FILE: .github/ISSUE_TEMPLATE/config.yml ================================================ blank_issues_enabled: false contact_links: - name: Questions and Help url: https://community.sanicframework.org/c/questions-and-help about: Do you need help with Sanic? Ask your questions here. - name: Discussion and Support url: https://discord.gg/FARQzAEMAA about: For live discussion and support, checkout the Sanic Discord server. ================================================ FILE: .github/ISSUE_TEMPLATE/feature-request.yml ================================================ name: 🌟 Feature request description: Suggest an enhancement for Sanic labels: ["feature request"] body: - type: checkboxes id: existing attributes: label: Is there an existing issue for this? description: Please search to see if an issue already exists for the enhancement you are proposing. options: - label: I have searched the existing issues required: true - type: textarea id: description attributes: label: Is your feature request related to a problem? Please describe. description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] validations: required: false - type: textarea id: code attributes: label: Describe the solution you'd like description: A clear and concise description of what you want to happen. validations: required: true - type: textarea id: additional attributes: label: Additional context description: Add any other context about the problem here. validations: required: false ================================================ FILE: .github/ISSUE_TEMPLATE/rfc.yml ================================================ name: 💡 Request for Comments description: Open an RFC for discussion labels: ["RFC"] body: - type: input id: compare attributes: label: Link to code description: If available, share a [comparison](https://github.com/sanic-org/sanic/compare) from a POC branch to main placeholder: https://github.com/sanic-org/sanic/compare/main...some-new-branch validations: required: false - type: textarea id: proposal attributes: label: Proposal description: A thorough discussion of the proposal discussing the problem it solves, potential code, use cases, and impacts validations: required: true - type: textarea id: additional attributes: label: Additional context description: Add any other context that is relevant validations: required: false - type: checkboxes id: breaking attributes: label: Is this a breaking change? options: - label: "Yes" required: false ================================================ FILE: .github/stale.yml ================================================ # Number of days of inactivity before an issue becomes stale daysUntilStale: 90 # Number of days of inactivity before a stale issue is closed daysUntilClose: 30 # Issues with these labels will never be considered stale exemptLabels: - bug - urgent - necessary - help wanted - RFC # Label to use when marking an issue as stale staleLabel: stale # Comment to post when marking an issue as stale. Set to `false` to disable markComment: > This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is incorrect, please respond with an update. Thank you for your contributions. # Comment to post when closing a stale issue. Set to `false` to disable closeComment: false ================================================ FILE: .github/workflows/codeql-analysis.yml ================================================ name: "CodeQL" on: push: branches: - main - current-release - "*LTS" pull_request: branches: - main - current-release - "*LTS" types: [opened, synchronize, reopened, ready_for_review] schedule: - cron: '25 16 * * 0' jobs: analyze: if: github.event.pull_request.draft == false name: Analyze runs-on: ubuntu-latest strategy: fail-fast: false matrix: language: [ 'python' ] steps: - name: Checkout repository uses: actions/checkout@v2 - name: Initialize CodeQL uses: github/codeql-action/init@v1 with: languages: ${{ matrix.language }} - name: Autobuild uses: github/codeql-action/autobuild@v1 - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v1 ================================================ FILE: .github/workflows/coverage-upload.yml ================================================ name: Upload coverage to Codecov on: workflow_run: workflows: ["Coverage check"] types: - completed jobs: upload: name: Upload coverage runs-on: ubuntu-latest if: github.event.workflow_run.conclusion == 'success' steps: - name: Checkout uses: actions/checkout@v4 with: ref: ${{ github.event.workflow_run.head_sha }} - name: Download coverage artifact uses: dawidd6/action-download-artifact@v6 with: name: coverage-report run_id: ${{ github.event.workflow_run.id }} github_token: ${{ secrets.GITHUB_TOKEN }} - name: Get PR number id: pr run: | if [ "${{ github.event.workflow_run.event }}" == "pull_request" ]; then PR_NUMBERS=$(gh pr list --search "${{ github.event.workflow_run.head_sha }}" --state open --json number --jq '.[].number') PR_COUNT=$(printf "%s\n" "$PR_NUMBERS" | sed '/^$/d' | wc -l | tr -d ' ') if [ "$PR_COUNT" -eq 0 ]; then echo "Error: No open pull request found for head SHA '${{ github.event.workflow_run.head_sha }}'." >&2 exit 1 elif [ "$PR_COUNT" -gt 1 ]; then echo "Error: Multiple open pull requests ($PR_COUNT) found for head SHA '${{ github.event.workflow_run.head_sha }}':" >&2 printf "%s\n" "$PR_NUMBERS" >&2 exit 1 fi PR_NUMBER="$PR_NUMBERS" echo "number=${PR_NUMBER}" >> "$GITHUB_OUTPUT" fi env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload to Codecov uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} files: ./coverage.xml fail_ci_if_error: true override_commit: ${{ github.event.workflow_run.head_sha }} override_branch: ${{ github.event.workflow_run.head_branch }} override_pr: ${{ steps.pr.outputs.number }} ================================================ FILE: .github/workflows/coverage.yml ================================================ name: Coverage check on: push: branches: - main - current-release - "*LTS" tags: - "!*" # Do not execute on tags pull_request: branches: - main - current-release - "*LTS" jobs: coverage: name: Check coverage runs-on: ubuntu-latest strategy: fail-fast: false steps: - name: Run coverage uses: sanic-org/simple-tox-action@v1 with: python-version: "3.11" tox-env: coverage ignore-errors: true - name: Upload coverage artifact uses: actions/upload-artifact@v4 with: name: coverage-report path: ./coverage.xml retention-days: 1 if-no-files-found: error ================================================ FILE: .github/workflows/publish-release.yml ================================================ name: Publish release on: release: types: [created] env: IS_TEST: false DOCKER_ORG_NAME: sanicframework DOCKER_IMAGE_NAME: sanic DOCKER_BASE_IMAGE_NAME: sanic-build DOCKER_IMAGE_DOCKERFILE: ./docker/Dockerfile DOCKER_BASE_IMAGE_DOCKERFILE: ./docker/Dockerfile-base jobs: generate_info: name: Generate info runs-on: ubuntu-latest outputs: docker-tags: ${{ steps.generate_docker_info.outputs.tags }} pypi-version: ${{ steps.parse_version_tag.outputs.pypi-version }} is-test: ${{ env.IS_TEST }} steps: - name: Parse version tag id: parse_version_tag env: TAG_NAME: ${{ github.event.release.tag_name }} run: | tag_name="${{ env.TAG_NAME }}" if [[ ! "${tag_name}" =~ ^v([0-9]{2})\.([0-9]{1,2})\.([0-9]+)$ ]]; then echo "::error::Tag name must be in the format vYY.MM.MICRO" exit 1 fi year_output="year=${BASH_REMATCH[1]}" month_output="month=${BASH_REMATCH[2]}" pypi_output="pypi-version=${tag_name#v}" echo "${year_output}" echo "${month_output}" echo "${pypi_output}" echo "${year_output}" >> $GITHUB_OUTPUT echo "${month_output}" >> $GITHUB_OUTPUT echo "${pypi_output}" >> $GITHUB_OUTPUT - name: Get latest release id: get_latest_release run: | latest_tag=$( curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer ${{ github.token }}" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/repos/${{ github.repository }}/releases/latest \ | jq -r '.tag_name' ) echo "latest_tag=$latest_tag" >> $GITHUB_OUTPUT - name: Generate Docker info id: generate_docker_info run: | tag_year="${{ steps.parse_version_tag.outputs.year }}" tag_month="${{ steps.parse_version_tag.outputs.month }}" latest_tag="${{ steps.get_latest_release.outputs.latest_tag }}" tag="${{ github.event.release.tag_name }}" tags="${tag_year}.${tag_month}" if [[ "${tag_month}" == "12" ]]; then tags+=",lts" echo "::notice::Tag ${tag} is LTS version" else echo "::notice::Tag ${tag} is not LTS version" fi if [[ "${latest_tag}" == "${{ github.event.release.tag_name }}" ]]; then tags+=",latest" echo "::notice::Tag ${tag} is marked as latest" else echo "::notice::Tag ${tag} is not marked as latest" fi tags_output="tags=${tags}" echo "${tags_output}" echo "${tags_output}" >> $GITHUB_OUTPUT publish_package: name: Build and publish package runs-on: ubuntu-latest needs: generate_info environment: release permissions: id-token: write steps: - name: Checkout repo uses: actions/checkout@v3 - name: Setup Python uses: actions/setup-python@v4 with: python-version: "3.11" - name: Install dependencies run: pip install build twine - name: Update package version run: | echo "__version__ = \"${{ needs.generate_info.outputs.pypi-version }}\"" > sanic/__version__.py - name: Build a binary wheel and a source tarball run: python -m build --sdist --wheel --outdir dist/ . - name: Publish package distribution uses: pypa/gh-action-pypi-publish@release/v1 with: repository-url: ${{ env.IS_TEST == 'true' && 'https://test.pypi.org/legacy/' || 'https://upload.pypi.org/legacy/' }} publish_docker: name: Publish Docker / Python ${{ matrix.python-version }} needs: [generate_info, publish_package] runs-on: ubuntu-latest if: ${{ needs.generate_info.outputs.is-test == 'false' }} strategy: fail-fast: true matrix: python-version: ["3.10", "3.11"] steps: - name: Checkout repository uses: actions/checkout@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - name: Login to Docker Hub uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_ACCESS_USER }} password: ${{ secrets.DOCKER_ACCESS_TOKEN }} - name: Build and push base image uses: docker/build-push-action@v4 with: push: ${{ env.IS_TEST == 'false' }} file: ${{ env.DOCKER_BASE_IMAGE_DOCKERFILE }} tags: ${{ env.DOCKER_ORG_NAME }}/${{ env.DOCKER_BASE_IMAGE_NAME }}:${{ matrix.python-version }} build-args: | PYTHON_VERSION=${{ matrix.python-version }} - name: Parse tags for this Python version id: parse_tags run: | IFS=',' read -ra tags <<< "${{ needs.generate_info.outputs.docker-tags }}" tag_args="" for tag in "${tags[@]}"; do tag_args+=",${{ env.DOCKER_ORG_NAME }}/${{ env.DOCKER_IMAGE_NAME }}:${tag}-py${{ matrix.python-version }}" done tag_args_output="tag_args=${tag_args:1}" echo "${tag_args_output}" echo "${tag_args_output}" >> $GITHUB_OUTPUT - name: Build and push Sanic image uses: docker/build-push-action@v4 with: push: ${{ env.IS_TEST == 'false' }} file: ${{ env.DOCKER_IMAGE_DOCKERFILE }} tags: ${{ steps.parse_tags.outputs.tag_args }} build-args: | BASE_IMAGE_ORG=${{ env.DOCKER_ORG_NAME }} BASE_IMAGE_NAME=${{ env.DOCKER_BASE_IMAGE_NAME }} BASE_IMAGE_TAG=${{ matrix.python-version }} SANIC_PYPI_VERSION=${{ needs.generate_info.outputs.pypi-version }} ================================================ FILE: .github/workflows/tests.yml ================================================ name: Tests on: push: branches: - main - current-release - "*LTS" tags: - "!*" pull_request: branches: - main - current-release - "*LTS" types: [opened, synchronize, reopened, ready_for_review] jobs: run_tests: name: "${{ matrix.config.platform == 'windows-latest' && 'Windows' || 'Linux' }} / Python ${{ matrix.config.python-version }} / tox -e ${{ matrix.config.tox-env }}" if: github.event.pull_request.draft == false runs-on: ${{ matrix.config.platform || 'ubuntu-latest' }} strategy: fail-fast: true matrix: config: - { python-version: "3.10", tox-env: security } - { python-version: "3.11", tox-env: security } - { python-version: "3.12", tox-env: security } - { python-version: "3.13", tox-env: security } - { python-version: "3.14", tox-env: security } - { python-version: "3.14", tox-env: lint } # - { python-version: "3.10", tox-env: docs } - { python-version: "3.10", tox-env: type-checking } - { python-version: "3.11", tox-env: type-checking } - { python-version: "3.12", tox-env: type-checking } - { python-version: "3.13", tox-env: type-checking } - { python-version: "3.14", tox-env: type-checking } - { python-version: "3.10", tox-env: py310, max-attempts: 3 } - { python-version: "3.10", tox-env: py310-no-ext, max-attempts: 3 } - { python-version: "3.11", tox-env: py311, max-attempts: 3 } - { python-version: "3.11", tox-env: py311-no-ext, max-attempts: 3 } - { python-version: "3.12", tox-env: py312, max-attempts: 3 } - { python-version: "3.12", tox-env: py312-no-ext, max-attempts: 3 } - { python-version: "3.13", tox-env: py313, max-attempts: 3 } - { python-version: "3.13", tox-env: py313-no-ext, max-attempts: 3 } - { python-version: "3.14", tox-env: py314, max-attempts: 3 } - { python-version: "3.14", tox-env: py314-no-ext, max-attempts: 3 } - { python-version: "3.10", tox-env: py310-no-ext, platform: windows-latest, ignore-errors: true } - { python-version: "3.11", tox-env: py311-no-ext, platform: windows-latest, ignore-errors: true } steps: - name: Run tests uses: sanic-org/simple-tox-action@v1 with: python-version: ${{ matrix.config.python-version }} tox-env: ${{ matrix.config.tox-env }} max-attempts: ${{ matrix.config.max-attempts || 1 }} ignore-errors: ${{ matrix.config.ignore-errors || false }} ================================================ FILE: .gitignore ================================================ *~ *.egg-info *.egg *.eggs *.pyc .coverage .coverage.* coverage coverage.xml .tox settings.py .idea/* .cache/* .mypy_cache/ .python-version docs/_build/ docs/_api/ build/* .DS_Store dist/* pip-wheel-metadata/ .pytest_cache/* .venv/* venv/* .vscode/* guide/node_modules/ ================================================ FILE: CHANGELOG.md ================================================ .. note:: See https://sanic.dev/en/release-notes/changelog.html ================================================ FILE: CODE_OF_CONDUCT.md ================================================ # Contributor Covenant Code of Conduct See https://sanic.dev/en/organization/code-of-conduct.html ================================================ FILE: CONTRIBUTING.md ================================================ # Contributing See https://sanic.dev/en/organization/contributing.html ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2016-present Sanic Community Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: MANIFEST.in ================================================ # Non Code related contents include LICENSE include README.rst include pyproject.toml # Setup include setup.py include Makefile # Tests include .coveragerc graft tests global-exclude __pycache__ global-exclude *.py[co] ================================================ FILE: Makefile ================================================ RUFF_FORMATTED_FOLDERS = sanic examples scripts tests guide docs .DEFAULT: help .PHONY: help help: @echo "Please use \`make ' where is one of" @echo "install" @echo " Install Sanic" @echo "docker-test" @echo " Run Sanic Unit Tests using Docker" @echo "fix" @echo " Analyze and fix linting issues using ruff" @echo "format" @echo " Analyze and format using ruff" @echo "pretty" @echo " Analyze and fix linting and format using ruff" @echo "" @echo "docs" @echo " Generate Sanic documentation" @echo "" @echo "clean-docs" @echo " Clean Sanic documentation" @echo "" @echo "docs-test" @echo " Test Sanic Documentation for errors" @echo "" @echo "changelog" @echo " Generate changelog for Sanic to prepare for new release" @echo "" @echo "release" @echo " Prepare Sanic for a new changes by version bump and changelog" @echo "" .PHONY: clean clean: find . ! -path "./.eggs/*" -name "*.pyc" -exec rm {} \; find . ! -path "./.eggs/*" -name "*.pyo" -exec rm {} \; find . ! -path "./.eggs/*" -name ".coverage" -exec rm {} \; rm -rf build/* > /dev/null 2>&1 rm -rf dist/* > /dev/null 2>&1 .PHONY: view-coverage view-coverage: sanic ./coverage --simple .PHONY: install install: python -m pip install . .PHONY: docker-test docker-test: clean docker build -t sanic/test-image -f docker/Dockerfile . docker run -t sanic/test-image tox .PHONY: fix fix: ruff check ${RUFF_FORMATTED_FOLDERS} --fix .PHONY: format format: ruff format ${RUFF_FORMATTED_FOLDERS} .PHONY: pretty pretty: format fix .PHONY: docs-clean docs-clean: cd docs && make clean .PHONY: docs docs: docs-clean cd docs && make html .PHONY: docs-test docs-test: docs-clean cd docs && make dummy .PHONY: docs-serve docs-serve: sphinx-autobuild docs docs/_build/html --port 9999 --watch ./ .PHONY: changelog changelog: python scripts/changelog.py .PHONY: guide-serve guide-serve: cd guide && sanic server:app -r -R ./content -R ./style .PHONY: release release: ifdef version python scripts/release.py --release-version ${version} --generate-changelog else python scripts/release.py --generate-changelog endif ================================================ FILE: README.rst ================================================ .. image:: https://raw.githubusercontent.com/sanic-org/sanic-assets/master/png/sanic-framework-logo-400x97.png :alt: Sanic | Build fast. Run fast. Sanic | Build fast. Run fast. ============================= .. start-badges .. list-table:: :widths: 15 85 :stub-columns: 1 * - Build - | |Tests| * - Docs - | |UserGuide| |Documentation| * - Package - | |PyPI| |PyPI version| |Wheel| |Supported implementations| |Code style ruff| * - Support - | |Forums| |Discord| |Awesome| * - Stats - | |Monthly Downloads| |Weekly Downloads| |Conda downloads| .. |UserGuide| image:: https://img.shields.io/badge/user%20guide-sanic-ff0068 :target: https://sanic.dev/ .. |Forums| image:: https://img.shields.io/badge/forums-community-ff0068.svg :target: https://community.sanicframework.org/ .. |Discord| image:: https://img.shields.io/discord/812221182594121728?logo=discord&label=Discord&color=5865F2 :target: https://discord.gg/FARQzAEMAA .. |Tests| image:: https://github.com/sanic-org/sanic/actions/workflows/tests.yml/badge.svg?branch=main :target: https://github.com/sanic-org/sanic/actions/workflows/tests.yml .. |Documentation| image:: https://readthedocs.org/projects/sanic/badge/?version=latest :target: http://sanic.readthedocs.io/en/latest/?badge=latest .. |PyPI| image:: https://img.shields.io/pypi/v/sanic.svg :target: https://pypi.python.org/pypi/sanic/ .. |PyPI version| image:: https://img.shields.io/pypi/pyversions/sanic.svg :target: https://pypi.python.org/pypi/sanic/ .. |Code style ruff| image:: https://img.shields.io/badge/code%20style-ruff-000000.svg :target: https://docs.astral.sh/ruff/ .. |Wheel| image:: https://img.shields.io/pypi/wheel/sanic.svg :alt: PyPI Wheel :target: https://pypi.python.org/pypi/sanic .. |Supported implementations| image:: https://img.shields.io/pypi/implementation/sanic.svg :alt: Supported implementations :target: https://pypi.python.org/pypi/sanic .. |Awesome| image:: https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg :alt: Awesome Sanic List :target: https://github.com/mekicha/awesome-sanic .. |Monthly Downloads| image:: https://img.shields.io/pypi/dm/sanic.svg :alt: Downloads :target: https://pepy.tech/project/sanic .. |Weekly Downloads| image:: https://img.shields.io/pypi/dw/sanic.svg :alt: Downloads :target: https://pepy.tech/project/sanic .. |Conda downloads| image:: https://img.shields.io/conda/dn/conda-forge/sanic.svg :alt: Downloads :target: https://anaconda.org/conda-forge/sanic .. end-badges Sanic is a **Python 3.10+** web server and web framework that's written to go fast. It allows the usage of the ``async/await`` syntax added in Python 3.5, which makes your code non-blocking and speedy. Sanic is also ASGI compliant, so you can deploy it with an `alternative ASGI webserver `_. `Source code on GitHub `_ | `Help and discussion board `_ | `User Guide `_ | `Chat on Discord `_ The project is maintained by the community, for the community. **Contributions are welcome!** The goal of the project is to provide a simple way to get up and running a highly performant HTTP server that is easy to build, to expand, and ultimately to scale. Sponsor ------- Check out `open collective `_ to learn more about helping to fund Sanic. Installation ------------ ``pip install sanic`` Sanic makes use of ``uvloop`` and ``ujson`` to help with performance. If you do not want to use those packages, simply add an environmental variable ``SANIC_NO_UVLOOP=true`` or ``SANIC_NO_UJSON=true`` at install time. .. code:: shell $ export SANIC_NO_UVLOOP=true $ export SANIC_NO_UJSON=true $ pip install --no-binary :all: sanic .. note:: If you are running on a clean install of Fedora 28 or above, please make sure you have the ``redhat-rpm-config`` package installed in case if you want to use ``sanic`` with ``ujson`` dependency. Hello World Example ------------------- .. code:: python from sanic import Sanic from sanic.response import json app = Sanic("my-hello-world-app") @app.route('/') async def test(request): return json({'hello': 'world'}) Sanic can now be easily run from CLI using ``sanic hello.app``. .. code:: [2018-12-30 11:37:41 +0200] [13564] [INFO] Goin' Fast @ http://127.0.0.1:8000 [2018-12-30 11:37:41 +0200] [13564] [INFO] Starting worker [13564] And, we can verify it is working: ``curl localhost:8000 -i`` .. code:: HTTP/1.1 200 OK Connection: keep-alive Keep-Alive: 5 Content-Length: 17 Content-Type: application/json {"hello":"world"} **Now, let's go build something fast!** Minimum Python version is 3.10. Documentation ------------- User Guide, Changelog, and API Documentation can be found at `sanic.dev `__. Questions and Discussion ------------------------ `Ask a question or join the conversation `__. Contribution ------------ We are always happy to have new contributions. We have `marked issues good for anyone looking to get started `_, and welcome `questions on the forums `_. Please take a look at our `Contribution guidelines `_. ================================================ FILE: SECURITY.md ================================================ # Security Policy See https://sanic.dev/en/organization/policies.html ================================================ FILE: bandit.baseline ================================================ { "errors": [], "generated_at": "2025-09-14T20:47:44Z", "metrics": { "_totals": { "CONFIDENCE.HIGH": 10, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 10, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 20091, "nosec": 2, "skipped_tests": 6 }, "sanic/__init__.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 76, "nosec": 0, "skipped_tests": 0 }, "sanic/__main__.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 10, "nosec": 0, "skipped_tests": 0 }, "sanic/__version__.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 1, "nosec": 0, "skipped_tests": 0 }, "sanic/app.py": { "CONFIDENCE.HIGH": 1, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 1, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 2122, "nosec": 0, "skipped_tests": 0 }, "sanic/application/__init__.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 0, "nosec": 0, "skipped_tests": 0 }, "sanic/application/constants.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 24, "nosec": 0, "skipped_tests": 0 }, "sanic/application/ext.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 34, "nosec": 0, "skipped_tests": 0 }, "sanic/application/logo.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 53, "nosec": 0, "skipped_tests": 0 }, "sanic/application/motd.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 155, "nosec": 0, "skipped_tests": 0 }, "sanic/application/spinner.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 74, "nosec": 0, "skipped_tests": 0 }, "sanic/application/state.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 89, "nosec": 0, "skipped_tests": 0 }, "sanic/asgi.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 233, "nosec": 0, "skipped_tests": 0 }, "sanic/base/__init__.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 0, "nosec": 0, "skipped_tests": 0 }, "sanic/base/meta.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 6, "nosec": 0, "skipped_tests": 0 }, "sanic/base/root.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 55, "nosec": 0, "skipped_tests": 0 }, "sanic/blueprint_group.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 2, "nosec": 0, "skipped_tests": 0 }, "sanic/blueprints.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 790, "nosec": 0, "skipped_tests": 0 }, "sanic/cli/__init__.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 0, "nosec": 0, "skipped_tests": 0 }, "sanic/cli/app.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 239, "nosec": 0, "skipped_tests": 0 }, "sanic/cli/arguments.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 283, "nosec": 0, "skipped_tests": 0 }, "sanic/cli/base.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 27, "nosec": 0, "skipped_tests": 0 }, "sanic/cli/console.py": { "CONFIDENCE.HIGH": 3, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 3, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 242, "nosec": 0, "skipped_tests": 0 }, "sanic/cli/executor.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 76, "nosec": 0, "skipped_tests": 0 }, "sanic/cli/inspector.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 97, "nosec": 0, "skipped_tests": 0 }, "sanic/cli/inspector_client.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 106, "nosec": 0, "skipped_tests": 1 }, "sanic/compat.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 126, "nosec": 0, "skipped_tests": 0 }, "sanic/config.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 350, "nosec": 0, "skipped_tests": 0 }, "sanic/constants.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 29, "nosec": 0, "skipped_tests": 0 }, "sanic/cookies/__init__.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 2, "nosec": 0, "skipped_tests": 0 }, "sanic/cookies/request.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 122, "nosec": 0, "skipped_tests": 0 }, "sanic/cookies/response.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 521, "nosec": 0, "skipped_tests": 0 }, "sanic/errorpages.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 321, "nosec": 0, "skipped_tests": 0 }, "sanic/exceptions.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 538, "nosec": 0, "skipped_tests": 0 }, "sanic/handlers/__init__.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 8, "nosec": 0, "skipped_tests": 0 }, "sanic/handlers/content_range.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 63, "nosec": 0, "skipped_tests": 0 }, "sanic/handlers/directory.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 89, "nosec": 0, "skipped_tests": 0 }, "sanic/handlers/error.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 166, "nosec": 0, "skipped_tests": 0 }, "sanic/headers.py": { "CONFIDENCE.HIGH": 1, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 1, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 421, "nosec": 0, "skipped_tests": 0 }, "sanic/helpers.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 142, "nosec": 0, "skipped_tests": 0 }, "sanic/http/__init__.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 4, "nosec": 0, "skipped_tests": 0 }, "sanic/http/constants.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 22, "nosec": 0, "skipped_tests": 0 }, "sanic/http/http1.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 470, "nosec": 0, "skipped_tests": 0 }, "sanic/http/http3.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 348, "nosec": 0, "skipped_tests": 0 }, "sanic/http/stream.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 19, "nosec": 0, "skipped_tests": 0 }, "sanic/http/tls/__init__.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 3, "nosec": 0, "skipped_tests": 0 }, "sanic/http/tls/context.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 169, "nosec": 0, "skipped_tests": 0 }, "sanic/http/tls/creators.py": { "CONFIDENCE.HIGH": 1, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 1, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 245, "nosec": 0, "skipped_tests": 3 }, "sanic/log.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 22, "nosec": 0, "skipped_tests": 0 }, "sanic/logging/__init__.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 0, "nosec": 0, "skipped_tests": 0 }, "sanic/logging/color.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 48, "nosec": 0, "skipped_tests": 0 }, "sanic/logging/default.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 57, "nosec": 0, "skipped_tests": 0 }, "sanic/logging/deprecation.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 23, "nosec": 0, "skipped_tests": 0 }, "sanic/logging/filter.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 9, "nosec": 0, "skipped_tests": 0 }, "sanic/logging/formatter.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 315, "nosec": 0, "skipped_tests": 0 }, "sanic/logging/loggers.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 29, "nosec": 0, "skipped_tests": 0 }, "sanic/logging/setup.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 53, "nosec": 0, "skipped_tests": 0 }, "sanic/middleware.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 83, "nosec": 0, "skipped_tests": 0 }, "sanic/mixins/__init__.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 0, "nosec": 0, "skipped_tests": 0 }, "sanic/mixins/base.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 30, "nosec": 0, "skipped_tests": 0 }, "sanic/mixins/commands.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 24, "nosec": 0, "skipped_tests": 0 }, "sanic/mixins/exceptions.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 81, "nosec": 0, "skipped_tests": 0 }, "sanic/mixins/listeners.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 346, "nosec": 0, "skipped_tests": 0 }, "sanic/mixins/middleware.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 198, "nosec": 0, "skipped_tests": 0 }, "sanic/mixins/routes.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 725, "nosec": 0, "skipped_tests": 0 }, "sanic/mixins/signals.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 113, "nosec": 0, "skipped_tests": 0 }, "sanic/mixins/startup.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 1236, "nosec": 0, "skipped_tests": 0 }, "sanic/mixins/static.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 322, "nosec": 0, "skipped_tests": 0 }, "sanic/models/__init__.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 0, "nosec": 0, "skipped_tests": 0 }, "sanic/models/asgi.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 75, "nosec": 0, "skipped_tests": 0 }, "sanic/models/ctx_types.py": { "CONFIDENCE.HIGH": 1, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 1, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 54, "nosec": 0, "skipped_tests": 0 }, "sanic/models/futures.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 61, "nosec": 0, "skipped_tests": 0 }, "sanic/models/handler_types.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 25, "nosec": 0, "skipped_tests": 0 }, "sanic/models/http_types.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 28, "nosec": 0, "skipped_tests": 0 }, "sanic/models/protocol_types.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 20, "nosec": 0, "skipped_tests": 0 }, "sanic/models/server_types.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 60, "nosec": 0, "skipped_tests": 0 }, "sanic/pages/__init__.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 0, "nosec": 0, "skipped_tests": 0 }, "sanic/pages/base.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 67, "nosec": 0, "skipped_tests": 0 }, "sanic/pages/css.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 26, "nosec": 0, "skipped_tests": 0 }, "sanic/pages/directory_page.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 49, "nosec": 0, "skipped_tests": 0 }, "sanic/pages/error.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 89, "nosec": 0, "skipped_tests": 0 }, "sanic/request/__init__.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 9, "nosec": 0, "skipped_tests": 0 }, "sanic/request/form.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 85, "nosec": 0, "skipped_tests": 0 }, "sanic/request/parameters.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 24, "nosec": 0, "skipped_tests": 0 }, "sanic/request/types.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 941, "nosec": 0, "skipped_tests": 0 }, "sanic/response/__init__.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 34, "nosec": 0, "skipped_tests": 0 }, "sanic/response/convenience.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 335, "nosec": 0, "skipped_tests": 0 }, "sanic/response/types.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 449, "nosec": 0, "skipped_tests": 0 }, "sanic/router.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 222, "nosec": 0, "skipped_tests": 0 }, "sanic/server/__init__.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 13, "nosec": 0, "skipped_tests": 0 }, "sanic/server/async_server.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 89, "nosec": 0, "skipped_tests": 0 }, "sanic/server/events.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 30, "nosec": 0, "skipped_tests": 0 }, "sanic/server/goodbye.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 21, "nosec": 0, "skipped_tests": 1 }, "sanic/server/loop.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 54, "nosec": 0, "skipped_tests": 0 }, "sanic/server/protocols/__init__.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 0, "nosec": 0, "skipped_tests": 0 }, "sanic/server/protocols/base_protocol.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 186, "nosec": 0, "skipped_tests": 0 }, "sanic/server/protocols/http_protocol.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 305, "nosec": 0, "skipped_tests": 0 }, "sanic/server/protocols/websocket_protocol.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 197, "nosec": 0, "skipped_tests": 0 }, "sanic/server/runners.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 306, "nosec": 0, "skipped_tests": 0 }, "sanic/server/socket.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 115, "nosec": 0, "skipped_tests": 0 }, "sanic/server/websockets/__init__.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 0, "nosec": 0, "skipped_tests": 0 }, "sanic/server/websockets/connection.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 66, "nosec": 0, "skipped_tests": 0 }, "sanic/server/websockets/frame.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 208, "nosec": 0, "skipped_tests": 0 }, "sanic/server/websockets/impl.py": { "CONFIDENCE.HIGH": 1, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 1, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 720, "nosec": 0, "skipped_tests": 0 }, "sanic/signals.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 349, "nosec": 0, "skipped_tests": 0 }, "sanic/simple.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 13, "nosec": 0, "skipped_tests": 0 }, "sanic/touchup/__init__.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 6, "nosec": 0, "skipped_tests": 0 }, "sanic/touchup/meta.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 17, "nosec": 0, "skipped_tests": 0 }, "sanic/touchup/schemes/__init__.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 4, "nosec": 0, "skipped_tests": 0 }, "sanic/touchup/schemes/altsvc.py": { "CONFIDENCE.HIGH": 1, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 1, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 42, "nosec": 0, "skipped_tests": 0 }, "sanic/touchup/schemes/base.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 28, "nosec": 1, "skipped_tests": 0 }, "sanic/touchup/schemes/ode.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 73, "nosec": 0, "skipped_tests": 0 }, "sanic/touchup/service.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 22, "nosec": 0, "skipped_tests": 0 }, "sanic/types/__init__.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 2, "nosec": 0, "skipped_tests": 0 }, "sanic/types/hashable_dict.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 3, "nosec": 0, "skipped_tests": 0 }, "sanic/types/shared_ctx.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 49, "nosec": 0, "skipped_tests": 0 }, "sanic/utils.py": { "CONFIDENCE.HIGH": 1, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 1, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 110, "nosec": 1, "skipped_tests": 0 }, "sanic/views.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 198, "nosec": 0, "skipped_tests": 0 }, "sanic/worker/__init__.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 0, "nosec": 0, "skipped_tests": 0 }, "sanic/worker/constants.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 18, "nosec": 0, "skipped_tests": 0 }, "sanic/worker/inspector.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 132, "nosec": 0, "skipped_tests": 0 }, "sanic/worker/loader.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 137, "nosec": 0, "skipped_tests": 0 }, "sanic/worker/manager.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 473, "nosec": 0, "skipped_tests": 1 }, "sanic/worker/multiplexer.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 143, "nosec": 0, "skipped_tests": 0 }, "sanic/worker/process.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 247, "nosec": 0, "skipped_tests": 0 }, "sanic/worker/reloader.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 103, "nosec": 0, "skipped_tests": 0 }, "sanic/worker/restarter.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 81, "nosec": 0, "skipped_tests": 0 }, "sanic/worker/serve.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 127, "nosec": 0, "skipped_tests": 0 }, "sanic/worker/state.py": { "CONFIDENCE.HIGH": 0, "CONFIDENCE.LOW": 0, "CONFIDENCE.MEDIUM": 0, "CONFIDENCE.UNDEFINED": 0, "SEVERITY.HIGH": 0, "SEVERITY.LOW": 0, "SEVERITY.MEDIUM": 0, "SEVERITY.UNDEFINED": 0, "loc": 65, "nosec": 0, "skipped_tests": 0 } }, "results": [ { "code": "931 if blueprint.name in self.blueprints:\n932 assert self.blueprints[blueprint.name] is blueprint, (\n933 'A blueprint with the name \"%s\" is already registered. '\n934 \"Blueprint names must be unique.\" % (blueprint.name,)\n935 )\n936 else:\n", "col_offset": 12, "end_col_offset": 13, "filename": "sanic/app.py", "issue_confidence": "HIGH", "issue_cwe": { "id": 703, "link": "https://cwe.mitre.org/data/definitions/703.html" }, "issue_severity": "LOW", "issue_text": "Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.", "line_number": 932, "line_range": [ 932, 933, 934, 935 ], "more_info": "https://bandit.readthedocs.io/en/1.8.6/plugins/b101_assert_used.html", "test_id": "B101", "test_name": "assert_used" }, { "code": "77 ):\n78 assert repl_app, \"No Sanic app has been registered.\"\n79 headers = headers or {}\n", "col_offset": 4, "end_col_offset": 56, "filename": "sanic/cli/console.py", "issue_confidence": "HIGH", "issue_cwe": { "id": 703, "link": "https://cwe.mitre.org/data/definitions/703.html" }, "issue_severity": "LOW", "issue_text": "Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.", "line_number": 78, "line_range": [ 78 ], "more_info": "https://bandit.readthedocs.io/en/1.8.6/plugins/b101_assert_used.html", "test_id": "B101", "test_name": "assert_used" }, { "code": "96 async def respond(request) -> HTTPResponse:\n97 assert repl_app, \"No Sanic app has been registered.\"\n98 await repl_app.handle_request(request)\n", "col_offset": 4, "end_col_offset": 56, "filename": "sanic/cli/console.py", "issue_confidence": "HIGH", "issue_cwe": { "id": 703, "link": "https://cwe.mitre.org/data/definitions/703.html" }, "issue_severity": "LOW", "issue_text": "Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.", "line_number": 97, "line_range": [ 97 ], "more_info": "https://bandit.readthedocs.io/en/1.8.6/plugins/b101_assert_used.html", "test_id": "B101", "test_name": "assert_used" }, { "code": "98 await repl_app.handle_request(request)\n99 assert repl_response\n100 return repl_response\n", "col_offset": 4, "end_col_offset": 24, "filename": "sanic/cli/console.py", "issue_confidence": "HIGH", "issue_cwe": { "id": 703, "link": "https://cwe.mitre.org/data/definitions/703.html" }, "issue_severity": "LOW", "issue_text": "Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.", "line_number": 99, "line_range": [ 99 ], "more_info": "https://bandit.readthedocs.io/en/1.8.6/plugins/b101_assert_used.html", "test_id": "B101", "test_name": "assert_used" }, { "code": "411 if not addr and proxies_count:\n412 assert proxies_count > 0\n413 try:\n", "col_offset": 8, "end_col_offset": 32, "filename": "sanic/headers.py", "issue_confidence": "HIGH", "issue_cwe": { "id": 703, "link": "https://cwe.mitre.org/data/definitions/703.html" }, "issue_severity": "LOW", "issue_text": "Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.", "line_number": 412, "line_range": [ 412 ], "more_info": "https://bandit.readthedocs.io/en/1.8.6/plugins/b101_assert_used.html", "test_id": "B101", "test_name": "assert_used" }, { "code": "3 import ssl\n4 import subprocess\n5 import sys\n", "col_offset": 0, "end_col_offset": 17, "filename": "sanic/http/tls/creators.py", "issue_confidence": "HIGH", "issue_cwe": { "id": 78, "link": "https://cwe.mitre.org/data/definitions/78.html" }, "issue_severity": "LOW", "issue_text": "Consider possible security implications associated with the subprocess module.", "line_number": 4, "line_range": [ 4 ], "more_info": "https://bandit.readthedocs.io/en/1.8.6/blacklists/blacklist_imports.html#b404-import-subprocess", "test_id": "B404", "test_name": "blacklist" }, { "code": "45 \n46 assert isinstance(desc, str) and isinstance(\n47 name, str\n48 ) # Just to make mypy happy\n49 \n", "col_offset": 8, "end_col_offset": 9, "filename": "sanic/models/ctx_types.py", "issue_confidence": "HIGH", "issue_cwe": { "id": 703, "link": "https://cwe.mitre.org/data/definitions/703.html" }, "issue_severity": "LOW", "issue_text": "Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.", "line_number": 46, "line_range": [ 46, 47, 48 ], "more_info": "https://bandit.readthedocs.io/en/1.8.6/plugins/b101_assert_used.html", "test_id": "B101", "test_name": "assert_used" }, { "code": "766 while data is None or data in self.pings:\n767 data = struct.pack(\"!I\", random.getrandbits(32))\n768 \n", "col_offset": 41, "end_col_offset": 63, "filename": "sanic/server/websockets/impl.py", "issue_confidence": "HIGH", "issue_cwe": { "id": 330, "link": "https://cwe.mitre.org/data/definitions/330.html" }, "issue_severity": "LOW", "issue_text": "Standard pseudo-random generators are not suitable for security/cryptographic purposes.", "line_number": 767, "line_range": [ 767 ], "more_info": "https://bandit.readthedocs.io/en/1.8.6/blacklists/blacklist_calls.html#b311-random", "test_id": "B311", "test_name": "blacklist" }, { "code": "33 return None\n34 assert isinstance(node.value, Constant)\n35 node.value.value = self.value()\n", "col_offset": 12, "end_col_offset": 51, "filename": "sanic/touchup/schemes/altsvc.py", "issue_confidence": "HIGH", "issue_cwe": { "id": 703, "link": "https://cwe.mitre.org/data/definitions/703.html" }, "issue_severity": "LOW", "issue_text": "Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.", "line_number": 34, "line_range": [ 34 ], "more_info": "https://bandit.readthedocs.io/en/1.8.6/plugins/b101_assert_used.html", "test_id": "B101", "test_name": "assert_used" }, { "code": "106 )\n107 assert _mod_spec is not None # type assertion for mypy\n108 module = module_from_spec(_mod_spec)\n", "col_offset": 12, "end_col_offset": 40, "filename": "sanic/utils.py", "issue_confidence": "HIGH", "issue_cwe": { "id": 703, "link": "https://cwe.mitre.org/data/definitions/703.html" }, "issue_severity": "LOW", "issue_text": "Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.", "line_number": 107, "line_range": [ 107 ], "more_info": "https://bandit.readthedocs.io/en/1.8.6/plugins/b101_assert_used.html", "test_id": "B101", "test_name": "assert_used" } ] } ================================================ FILE: changelogs/.gitignore ================================================ # Except this file !.gitignore ================================================ FILE: changelogs/1892.removal.rst ================================================ Remove [version] section. ================================================ FILE: changelogs/1904.feature.rst ================================================ Adds WEBSOCKET_PING_TIMEOUT and WEBSOCKET_PING_INTERVAL configuration values Allows setting the ping_interval and ping_timeout arguments when initializing `WebSocketCommonProtocol`. ================================================ FILE: changelogs/1970.misc.rst ================================================ Adds py.typed file to expose type information to other packages. ================================================ FILE: codecov.yml ================================================ coverage: status: patch: default: target: auto threshold: 0.75 informational: true project: default: target: auto threshold: 0.5 precision: 3 codecov: require_ci_to_pass: false ignore: - "sanic/__main__.py" - "sanic/compat.py" - "sanic/simple.py" - "sanic/utils.py" - "sanic/cli/" - "sanic/pages/" - ".github/" - "changelogs/" - "docker/" - "docs/" - "examples/" - "scripts/" - "tests/" ================================================ FILE: crowdin.yml ================================================ files: - source: /guide/content/en/**/*.md translation: /guide/content/%two_letters_code%/**/%original_file_name% ================================================ FILE: docker/Dockerfile ================================================ ARG BASE_IMAGE_ORG ARG BASE_IMAGE_NAME ARG BASE_IMAGE_TAG FROM ${BASE_IMAGE_ORG}/${BASE_IMAGE_NAME}:${BASE_IMAGE_TAG} RUN apk update RUN update-ca-certificates ARG SANIC_PYPI_VERSION RUN pip install -U pip && pip install sanic==${SANIC_PYPI_VERSION} RUN apk del build-base ================================================ FILE: docker/Dockerfile-base ================================================ ARG PYTHON_VERSION FROM python:${PYTHON_VERSION}-alpine RUN apk update RUN apk add --no-cache --update build-base \ ca-certificates \ openssl RUN update-ca-certificates RUN rm -rf /var/cache/apk/* ================================================ FILE: docs/Makefile ================================================ # Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " applehelp to make an Apple Help Book" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " epub3 to make an epub3" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @echo " info to make Texinfo files and run them through makeinfo" @echo " gettext to make PO message catalogs" @echo " changes to make an overview of all changed/added/deprecated items" @echo " xml to make Docutils-native XML files" @echo " pseudoxml to make pseudoxml-XML files for display purposes" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" @echo " coverage to run coverage check of the documentation (if enabled)" @echo " dummy to check syntax errors of document sources" .PHONY: clean clean: rm -rf $(BUILDDIR)/* .PHONY: html html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." .PHONY: dirhtml dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." .PHONY: singlehtml singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." .PHONY: pickle pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." .PHONY: json json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." .PHONY: htmlhelp htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." .PHONY: qthelp qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/aiographite.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/aiographite.qhc" .PHONY: applehelp applehelp: $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp @echo @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." @echo "N.B. You won't be able to view it unless you put it in" \ "~/Library/Documentation/Help or install it in your application" \ "bundle." .PHONY: devhelp devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" @echo "# mkdir -p $$HOME/.local/share/devhelp/aiographite" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/aiographite" @echo "# devhelp" .PHONY: epub epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." .PHONY: epub3 epub3: $(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3 @echo @echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3." .PHONY: latex latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." .PHONY: latexpdf latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." .PHONY: latexpdfja latexpdfja: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through platex and dvipdfmx..." $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." .PHONY: text text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." .PHONY: man man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." .PHONY: texinfo texinfo: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." .PHONY: info info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." .PHONY: gettext gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." .PHONY: changes changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." .PHONY: linkcheck linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." .PHONY: doctest doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." .PHONY: coverage coverage: $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage @echo "Testing of coverage in the sources finished, look at the " \ "results in $(BUILDDIR)/coverage/python.txt." .PHONY: xml xml: $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml @echo @echo "Build finished. The XML files are in $(BUILDDIR)/xml." .PHONY: pseudoxml pseudoxml: $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml @echo @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." .PHONY: dummy dummy: $(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy @echo @echo "Build finished. Dummy builder generates no files." ================================================ FILE: docs/_static/.gitkeep ================================================ ================================================ FILE: docs/_static/custom.css ================================================ .wy-side-nav-search, .wy-nav-top { background: #444444; } #changelog section { padding-left: 3rem; } #changelog section h2, #changelog section h3 { margin-left: -3rem; } ================================================ FILE: docs/_templates/banner.html ================================================

This is a banner!

================================================ FILE: docs/conf.py ================================================ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Sanic documentation build configuration file, created by # sphinx-quickstart on Sun Dec 25 18:07:21 2016. # # This file is execfile()d with the current directory set to its # containing dir. import os import sys # Add support for auto-doc # Ensure that sanic is present in the path, to allow sphinx-apidoc to # autogenerate documentation from docstrings root_directory = os.path.dirname(os.getcwd()) sys.path.insert(0, root_directory) import sanic # noqa # -- General configuration ------------------------------------------------ extensions = [ "sphinx.ext.autodoc", "m2r2", "enum_tools.autoenum", ] templates_path = ["_templates"] # Enable support for both Restructured Text and Markdown source_suffix = [".rst", ".md"] # The master toctree document. master_doc = "index" # General information about the project. project = "Sanic" copyright = "2021, Sanic Community Organization" author = "Sanic Community Organization" html_logo = "./_static/sanic-framework-logo-white-400x97.png" # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = sanic.__version__ # The full version, including alpha/beta/rc tags. release = sanic.__version__ # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. language = "en" # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This patterns also effect to html_static_path and html_extra_path # # modules.rst is generated by sphinx-apidoc but is unused. This suppresses # a warning about it. exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "modules.rst"] # The name of the Pygments (syntax highlighting) style to use. pygments_style = "sphinx" # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = False # -- Options for HTML output ---------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_theme = "sphinx_rtd_theme" # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ["_static"] html_css_files = ["custom.css"] # -- Options for HTMLHelp output ------------------------------------------ # Output file base name for HTML help builder. htmlhelp_basename = "Sanicdoc" # -- Options for LaTeX output --------------------------------------------- latex_elements = { # The paper size ('letterpaper' or 'a4paper'). # # 'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). # # 'pointsize': '10pt', # Additional stuff for the LaTeX preamble. # # 'preamble': '', # Latex figure (float) alignment # # 'figure_align': 'htbp', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ ( master_doc, "Sanic.tex", "Sanic Documentation", "Sanic contributors", "manual", ), ] # -- Options for manual page output --------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [(master_doc, "sanic", "Sanic Documentation", [author], 1)] # -- Options for Texinfo output ------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ ( master_doc, "Sanic", "Sanic Documentation", author, "Sanic", "One line description of project.", "Miscellaneous", ), ] # -- Options for Epub output ---------------------------------------------- # Bibliographic Dublin Core info. epub_title = project epub_author = author epub_publisher = author epub_copyright = copyright # A list of files that should not be packed into the epub file. epub_exclude_files = ["search.html"] # -- Custom Settings ------------------------------------------------------- suppress_warnings = ["image.nonlocal_uri"] autodoc_typehints = "description" autodoc_default_options = { "member-order": "groupwise", } html_theme_options = { "style_external_links": False, } rst_prolog = """.. warning:: These documents are **OUTDATED** as of 2023-12-31. Please refer to the latest version of the documentation at `sanic.dev `__. """ ================================================ FILE: docs/index.html ================================================ index.rst

Sanic

Sanic is a Python 3.6+ web server and web framework that's written to go fast. It allows the usage of the async/await syntax added in Python 3.5, which makes your code non-blocking and speedy.

The goal of the project is to provide a simple way to get up and running a highly performant HTTP server that is easy to build, to expand, and ultimately to scale.

Sanic is developed on GitHub. Contributions are welcome!

Sanic aspires to be simple

from sanic import Sanic
from sanic.response import json

app = Sanic()

@app.route("/")
async def test(request):
    return json({"hello": "world"})

if __name__ == "__main__":
    app.run(host="0.0.0.0", port=8000)

Note

Sanic does not support Python 3.5 from version 19.6 and forward. However, version 18.12LTS is supported thru December 2020. Official Python support for version 3.5 is set to expire in September 2020.

Guides

System Message: ERROR/3 (E:/OneDrive/GitHub/sanic/docs/index.rst, line 6)

Unknown directive type "toctree".

.. toctree::
   :maxdepth: 2

   sanic/getting_started
   sanic/config
   sanic/logging
   sanic/request_data
   sanic/response
   sanic/cookies
   sanic/routing
   sanic/blueprints
   sanic/static_files
   sanic/versioning
   sanic/exceptions
   sanic/middleware
   sanic/websocket
   sanic/decorators
   sanic/streaming
   sanic/class_based_views
   sanic/custom_protocol
   sanic/sockets
   sanic/ssl
   sanic/debug_mode
   sanic/testing
   sanic/deploying
   sanic/extensions
   sanic/examples
   sanic/changelog
   sanic/contributing
   sanic/api_reference
   sanic/asyncio_python37


Module Documentation

System Message: ERROR/3 (E:/OneDrive/GitHub/sanic/docs/index.rst, line 42)

Unknown directive type "toctree".

.. toctree::

  • :ref:`genindex`

    System Message: ERROR/3 (E:/OneDrive/GitHub/sanic/docs/index.rst, line 44); backlink

    Unknown interpreted text role "ref".

  • :ref:`modindex`

    System Message: ERROR/3 (E:/OneDrive/GitHub/sanic/docs/index.rst, line 45); backlink

    Unknown interpreted text role "ref".

  • :ref:`search`

    System Message: ERROR/3 (E:/OneDrive/GitHub/sanic/docs/index.rst, line 46); backlink

    Unknown interpreted text role "ref".

================================================ FILE: docs/index.rst ================================================ .. include:: ../README.rst User Guide ========== To learn about using Sanic, checkout the `User Guide `__. API === .. toctree:: :maxdepth: 3 👥 User Guide sanic/api_reference 💻 Source code sanic/changelog sanic/contributing ❓ Support 💬 Chat Module Documentation ==================== .. toctree:: * :ref:`genindex` * :ref:`modindex` ================================================ FILE: docs/make.bat ================================================ @ECHO OFF REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) set BUILDDIR=_build set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . set I18NSPHINXOPTS=%SPHINXOPTS% . if NOT "%PAPER%" == "" ( set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% ) if "%1" == "" goto help if "%1" == "help" ( :help echo.Please use `make ^` where ^ is one of echo. html to make standalone HTML files echo. dirhtml to make HTML files named index.html in directories echo. singlehtml to make a single large HTML file echo. pickle to make pickle files echo. json to make JSON files echo. htmlhelp to make HTML files and a HTML help project echo. qthelp to make HTML files and a qthelp project echo. devhelp to make HTML files and a Devhelp project echo. epub to make an epub echo. epub3 to make an epub3 echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter echo. text to make text files echo. man to make manual pages echo. texinfo to make Texinfo files echo. gettext to make PO message catalogs echo. changes to make an overview over all changed/added/deprecated items echo. xml to make Docutils-native XML files echo. pseudoxml to make pseudoxml-XML files for display purposes echo. linkcheck to check all external links for integrity echo. doctest to run all doctests embedded in the documentation if enabled echo. coverage to run coverage check of the documentation if enabled echo. dummy to check syntax errors of document sources goto end ) if "%1" == "clean" ( for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i del /q /s %BUILDDIR%\* goto end ) REM Check if sphinx-build is available and fallback to Python version if any %SPHINXBUILD% 1>NUL 2>NUL if errorlevel 9009 goto sphinx_python goto sphinx_ok :sphinx_python set SPHINXBUILD=python -m sphinx.__init__ %SPHINXBUILD% 2> nul if errorlevel 9009 ( echo. echo.The 'sphinx-build' command was not found. Make sure you have Sphinx echo.installed, then set the SPHINXBUILD environment variable to point echo.to the full path of the 'sphinx-build' executable. Alternatively you echo.may add the Sphinx directory to PATH. echo. echo.If you don't have Sphinx installed, grab it from echo.http://sphinx-doc.org/ exit /b 1 ) :sphinx_ok if "%1" == "html" ( %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/html. goto end ) if "%1" == "dirhtml" ( %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. goto end ) if "%1" == "singlehtml" ( %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. goto end ) if "%1" == "pickle" ( %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can process the pickle files. goto end ) if "%1" == "json" ( %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can process the JSON files. goto end ) if "%1" == "htmlhelp" ( %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can run HTML Help Workshop with the ^ .hhp project file in %BUILDDIR%/htmlhelp. goto end ) if "%1" == "qthelp" ( %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can run "qcollectiongenerator" with the ^ .qhcp project file in %BUILDDIR%/qthelp, like this: echo.^> qcollectiongenerator %BUILDDIR%\qthelp\aiographite.qhcp echo.To view the help file: echo.^> assistant -collectionFile %BUILDDIR%\qthelp\aiographite.ghc goto end ) if "%1" == "devhelp" ( %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp if errorlevel 1 exit /b 1 echo. echo.Build finished. goto end ) if "%1" == "epub" ( %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub if errorlevel 1 exit /b 1 echo. echo.Build finished. The epub file is in %BUILDDIR%/epub. goto end ) if "%1" == "epub3" ( %SPHINXBUILD% -b epub3 %ALLSPHINXOPTS% %BUILDDIR%/epub3 if errorlevel 1 exit /b 1 echo. echo.Build finished. The epub3 file is in %BUILDDIR%/epub3. goto end ) if "%1" == "latex" ( %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex if errorlevel 1 exit /b 1 echo. echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. goto end ) if "%1" == "latexpdf" ( %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex cd %BUILDDIR%/latex make all-pdf cd %~dp0 echo. echo.Build finished; the PDF files are in %BUILDDIR%/latex. goto end ) if "%1" == "latexpdfja" ( %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex cd %BUILDDIR%/latex make all-pdf-ja cd %~dp0 echo. echo.Build finished; the PDF files are in %BUILDDIR%/latex. goto end ) if "%1" == "text" ( %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text if errorlevel 1 exit /b 1 echo. echo.Build finished. The text files are in %BUILDDIR%/text. goto end ) if "%1" == "man" ( %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man if errorlevel 1 exit /b 1 echo. echo.Build finished. The manual pages are in %BUILDDIR%/man. goto end ) if "%1" == "texinfo" ( %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo if errorlevel 1 exit /b 1 echo. echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. goto end ) if "%1" == "gettext" ( %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale if errorlevel 1 exit /b 1 echo. echo.Build finished. The message catalogs are in %BUILDDIR%/locale. goto end ) if "%1" == "changes" ( %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes if errorlevel 1 exit /b 1 echo. echo.The overview file is in %BUILDDIR%/changes. goto end ) if "%1" == "linkcheck" ( %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck if errorlevel 1 exit /b 1 echo. echo.Link check complete; look for any errors in the above output ^ or in %BUILDDIR%/linkcheck/output.txt. goto end ) if "%1" == "doctest" ( %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest if errorlevel 1 exit /b 1 echo. echo.Testing of doctests in the sources finished, look at the ^ results in %BUILDDIR%/doctest/output.txt. goto end ) if "%1" == "coverage" ( %SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage if errorlevel 1 exit /b 1 echo. echo.Testing of coverage in the sources finished, look at the ^ results in %BUILDDIR%/coverage/python.txt. goto end ) if "%1" == "xml" ( %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml if errorlevel 1 exit /b 1 echo. echo.Build finished. The XML files are in %BUILDDIR%/xml. goto end ) if "%1" == "pseudoxml" ( %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml if errorlevel 1 exit /b 1 echo. echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. goto end ) if "%1" == "dummy" ( %SPHINXBUILD% -b dummy %ALLSPHINXOPTS% %BUILDDIR%/dummy if errorlevel 1 exit /b 1 echo. echo.Build finished. Dummy builder generates no files. goto end ) :end ================================================ FILE: docs/sanic/api/app.rst ================================================ Application =========== sanic.app --------- .. automodule:: sanic.app :members: :show-inheritance: :inherited-members: sanic.config ------------ .. automodule:: sanic.config :members: :show-inheritance: sanic.application.constants --------------------------- .. automodule:: sanic.application.constants :exclude-members: StrEnum :members: :show-inheritance: :inherited-members: sanic.application.state ----------------------- .. automodule:: sanic.application.state :members: :show-inheritance: ================================================ FILE: docs/sanic/api/blueprints.rst ================================================ Blueprints ========== sanic.blueprints ---------------- .. automodule:: sanic.blueprints :members: :show-inheritance: :inherited-members: sanic.blueprint_group --------------------- .. automodule:: sanic.blueprint_group :members: :special-members: ================================================ FILE: docs/sanic/api/core.rst ================================================ Core ==== sanic.cookies ------------- .. automodule:: sanic.cookies :members: :show-inheritance: sanic.handlers -------------- .. automodule:: sanic.handlers :members: :show-inheritance: sanic.headers -------------- .. automodule:: sanic.headers :members: :show-inheritance: sanic.request ------------- .. automodule:: sanic.request :members: :show-inheritance: sanic.response -------------- .. automodule:: sanic.response :members: :show-inheritance: sanic.views ----------- .. automodule:: sanic.views :members: :show-inheritance: ================================================ FILE: docs/sanic/api/exceptions.rst ================================================ Exceptions ========== sanic.errorpages ---------------- .. automodule:: sanic.errorpages :members: :show-inheritance: sanic.exceptions ---------------- .. automodule:: sanic.exceptions :members: :show-inheritance: ================================================ FILE: docs/sanic/api/router.rst ================================================ Routing ======= sanic_routing models -------------------- .. autoclass:: sanic_routing.route::Route :members: .. autoclass:: sanic_routing.group::RouteGroup :members: sanic.router ------------ .. automodule:: sanic.router :members: :show-inheritance: ================================================ FILE: docs/sanic/api/server.rst ================================================ Sanic Server ============ sanic.http ---------- .. automodule:: sanic.http :members: :show-inheritance: sanic.server ------------ .. automodule:: sanic.server :members: :show-inheritance: ================================================ FILE: docs/sanic/api/utility.rst ================================================ Utility ======= sanic.compat ------------ .. automodule:: sanic.compat :members: :show-inheritance: sanic.log --------- .. automodule:: sanic.log :members: :show-inheritance: ================================================ FILE: docs/sanic/api_reference.rst ================================================ 📑 API Reference ================ .. toctree:: :maxdepth: 2 api/app api/blueprints api/core api/exceptions api/router api/server api/utility ================================================ FILE: docs/sanic/changelog.rst ================================================ 📜 Changelog ============ | 🔶 Current release | 🔷 In support release | .. mdinclude:: ./releases/23/23.6.md .. mdinclude:: ./releases/23/23.3.md .. mdinclude:: ./releases/22/22.12.md .. mdinclude:: ./releases/22/22.9.md .. mdinclude:: ./releases/22/22.6.md .. mdinclude:: ./releases/22/22.3.md .. mdinclude:: ./releases/21/21.12.md .. mdinclude:: ./releases/21/21.9.md .. include:: ../../CHANGELOG.rst ================================================ FILE: docs/sanic/contributing.rst ================================================ ♥️ Contributing =============== .. include:: ../../CONTRIBUTING.rst ================================================ FILE: docs/sanic/releases/21/21.12.md ================================================ ## Version 21.12.1 🔷 _Current LTS version_ - [#2349](https://github.com/sanic-org/sanic/pull/2349) Only display MOTD on startup - [#2354](https://github.com/sanic-org/sanic/pull/2354) Ignore name argument in Python 3.7 - [#2355](https://github.com/sanic-org/sanic/pull/2355) Add config.update support for all config values ## Version 21.12.0 🔹 ### Features - [#2260](https://github.com/sanic-org/sanic/pull/2260) Allow early Blueprint registrations to still apply later added objects - [#2262](https://github.com/sanic-org/sanic/pull/2262) Noisy exceptions - force logging of all exceptions - [#2264](https://github.com/sanic-org/sanic/pull/2264) Optional `uvloop` by configuration - [#2270](https://github.com/sanic-org/sanic/pull/2270) Vhost support using multiple TLS certificates - [#2277](https://github.com/sanic-org/sanic/pull/2277) Change signal routing for increased consistency - *BREAKING CHANGE*: If you were manually routing signals there is a breaking change. The signal router's `get` is no longer 100% determinative. There is now an additional step to loop thru the returned signals for proper matching on the requirements. If signals are being dispatched using `app.dispatch` or `bp.dispatch`, there is no change. - [#2290](https://github.com/sanic-org/sanic/pull/2290) Add contextual exceptions - [#2291](https://github.com/sanic-org/sanic/pull/2291) Increase join concat performance - [#2295](https://github.com/sanic-org/sanic/pull/2295), [#2316](https://github.com/sanic-org/sanic/pull/2316), [#2331](https://github.com/sanic-org/sanic/pull/2331) Restructure of CLI and application state with new displays and more command parity with `app.run` - [#2302](https://github.com/sanic-org/sanic/pull/2302) Add route context at definition time - [#2304](https://github.com/sanic-org/sanic/pull/2304) Named tasks and new API for managing background tasks - [#2307](https://github.com/sanic-org/sanic/pull/2307) On app auto-reload, provide insight of changed files - [#2308](https://github.com/sanic-org/sanic/pull/2308) Auto extend application with [Sanic Extensions](https://sanicframework.org/en/plugins/sanic-ext/getting-started.html) if it is installed, and provide first class support for accessing the extensions - [#2309](https://github.com/sanic-org/sanic/pull/2309) Builtin signals changed to `Enum` - [#2313](https://github.com/sanic-org/sanic/pull/2313) Support additional config implementation use case - [#2321](https://github.com/sanic-org/sanic/pull/2321) Refactor environment variable hydration logic - [#2327](https://github.com/sanic-org/sanic/pull/2327) Prevent sending multiple or mixed responses on a single request - [#2330](https://github.com/sanic-org/sanic/pull/2330) Custom type casting on environment variables - [#2332](https://github.com/sanic-org/sanic/pull/2332) Make all deprecation notices consistent - [#2335](https://github.com/sanic-org/sanic/pull/2335) Allow underscore to start instance names ### Bugfixes - [#2273](https://github.com/sanic-org/sanic/pull/2273) Replace assignation by typing for `websocket_handshake` - [#2285](https://github.com/sanic-org/sanic/pull/2285) Fix IPv6 display in startup logs - [#2299](https://github.com/sanic-org/sanic/pull/2299) Dispatch `http.lifecyle.response` from exception handler ### Deprecations and Removals - [#2306](https://github.com/sanic-org/sanic/pull/2306) Removal of deprecated items - `Sanic` and `Blueprint` may no longer have arbitrary properties attached to them - `Sanic` and `Blueprint` forced to have compliant names - alphanumeric + `_` + `-` - must start with letter or `_` - `load_env` keyword argument of `Sanic` - `sanic.exceptions.abort` - `sanic.views.CompositionView` - `sanic.response.StreamingHTTPResponse` - *NOTE:* the `stream()` response method (where you pass a callable streaming function) has been deprecated and will be removed in v22.6. You should upgrade all streaming responses to the new style: https://sanicframework.org/en/guide/advanced/streaming.html#response-streaming - [#2320](https://github.com/sanic-org/sanic/pull/2320) Remove app instance from Config for error handler setting ### Developer infrastructure - [#2251](https://github.com/sanic-org/sanic/pull/2251) Change dev install command - [#2286](https://github.com/sanic-org/sanic/pull/2286) Change codeclimate complexity threshold from 5 to 10 - [#2287](https://github.com/sanic-org/sanic/pull/2287) Update host test function names so they are not overwritten - [#2292](https://github.com/sanic-org/sanic/pull/2292) Fail CI on error - [#2311](https://github.com/sanic-org/sanic/pull/2311), [#2324](https://github.com/sanic-org/sanic/pull/2324) Do not run tests for draft PRs - [#2336](https://github.com/sanic-org/sanic/pull/2336) Remove paths from coverage checks - [#2338](https://github.com/sanic-org/sanic/pull/2338) Cleanup ports on tests ### Improved Documentation - [#2269](https://github.com/sanic-org/sanic/pull/2269), [#2329](https://github.com/sanic-org/sanic/pull/2329), [#2333](https://github.com/sanic-org/sanic/pull/2333) Cleanup typos and fix language ### Miscellaneous - [#2257](https://github.com/sanic-org/sanic/pull/2257), [#2294](https://github.com/sanic-org/sanic/pull/2294), [#2341](https://github.com/sanic-org/sanic/pull/2341) Add Python 3.10 support - [#2279](https://github.com/sanic-org/sanic/pull/2279), [#2317](https://github.com/sanic-org/sanic/pull/2317), [#2322](https://github.com/sanic-org/sanic/pull/2322) Add/correct missing type annotations - [#2305](https://github.com/sanic-org/sanic/pull/2305) Fix examples to use modern implementations ================================================ FILE: docs/sanic/releases/21/21.9.md ================================================ ## Version 21.9.3 *Rerelease of v21.9.2 with some cleanup* ## Version 21.9.2 - [#2268](https://github.com/sanic-org/sanic/pull/2268) Make HTTP connections start in IDLE stage, avoiding delays and error messages - [#2310](https://github.com/sanic-org/sanic/pull/2310) More consistent config setting with post-FALLBACK_ERROR_FORMAT apply ## Version 21.9.1 - [#2259](https://github.com/sanic-org/sanic/pull/2259) Allow non-conforming ErrorHandlers ## Version 21.9.0 ### Features - [#2158](https://github.com/sanic-org/sanic/pull/2158), [#2248](https://github.com/sanic-org/sanic/pull/2248) Complete overhaul of I/O to websockets - [#2160](https://github.com/sanic-org/sanic/pull/2160) Add new 17 signals into server and request lifecycles - [#2162](https://github.com/sanic-org/sanic/pull/2162) Smarter `auto` fallback formatting upon exception - [#2184](https://github.com/sanic-org/sanic/pull/2184) Introduce implementation for copying a Blueprint - [#2200](https://github.com/sanic-org/sanic/pull/2200) Accept header parsing - [#2207](https://github.com/sanic-org/sanic/pull/2207) Log remote address if available - [#2209](https://github.com/sanic-org/sanic/pull/2209) Add convenience methods to BP groups - [#2216](https://github.com/sanic-org/sanic/pull/2216) Add default messages to SanicExceptions - [#2225](https://github.com/sanic-org/sanic/pull/2225) Type annotation convenience for annotated handlers with path parameters - [#2236](https://github.com/sanic-org/sanic/pull/2236) Allow Falsey (but not-None) responses from route handlers - [#2238](https://github.com/sanic-org/sanic/pull/2238) Add `exception` decorator to Blueprint Groups - [#2244](https://github.com/sanic-org/sanic/pull/2244) Explicit static directive for serving file or dir (ex: `static(..., resource_type="file")`) - [#2245](https://github.com/sanic-org/sanic/pull/2245) Close HTTP loop when connection task cancelled ### Bugfixes - [#2188](https://github.com/sanic-org/sanic/pull/2188) Fix the handling of the end of a chunked request - [#2195](https://github.com/sanic-org/sanic/pull/2195) Resolve unexpected error handling on static requests - [#2208](https://github.com/sanic-org/sanic/pull/2208) Make blueprint-based exceptions attach and trigger in a more intuitive manner - [#2211](https://github.com/sanic-org/sanic/pull/2211) Fixed for handling exceptions of asgi app call - [#2213](https://github.com/sanic-org/sanic/pull/2213) Fix bug where ws exceptions not being logged - [#2231](https://github.com/sanic-org/sanic/pull/2231) Cleaner closing of tasks by using `abort()` in strategic places to avoid dangling sockets - [#2247](https://github.com/sanic-org/sanic/pull/2247) Fix logging of auto-reload status in debug mode - [#2246](https://github.com/sanic-org/sanic/pull/2246) Account for BP with exception handler but no routes ### Developer infrastructure - [#2194](https://github.com/sanic-org/sanic/pull/2194) HTTP unit tests with raw client - [#2199](https://github.com/sanic-org/sanic/pull/2199) Switch to codeclimate - [#2214](https://github.com/sanic-org/sanic/pull/2214) Try Reopening Windows Tests - [#2229](https://github.com/sanic-org/sanic/pull/2229) Refactor `HttpProtocol` into a base class - [#2230](https://github.com/sanic-org/sanic/pull/2230) Refactor `server.py` into multi-file module ### Miscellaneous - [#2173](https://github.com/sanic-org/sanic/pull/2173) Remove Duplicated Dependencies and PEP 517 Support - [#2193](https://github.com/sanic-org/sanic/pull/2193), [#2196](https://github.com/sanic-org/sanic/pull/2196), [#2217](https://github.com/sanic-org/sanic/pull/2217) Type annotation changes ================================================ FILE: docs/sanic/releases/22/22.12.md ================================================ ## Version 22.12.0 🔷 _Current version_ ### Features - [#2569](https://github.com/sanic-org/sanic/pull/2569) Add `JSONResponse` class with some convenient methods when updating a response object - [#2598](https://github.com/sanic-org/sanic/pull/2598) Change `uvloop` requirement to `>=0.15.0` - [#2609](https://github.com/sanic-org/sanic/pull/2609) Add compatibility with `websockets` v11.0 - [#2610](https://github.com/sanic-org/sanic/pull/2610) Kill server early on worker error - Raise deadlock timeout to 30s - [#2617](https://github.com/sanic-org/sanic/pull/2617) Scale number of running server workers - [#2621](https://github.com/sanic-org/sanic/pull/2621) [#2634](https://github.com/sanic-org/sanic/pull/2634) Send `SIGKILL` on subsequent `ctrl+c` to force worker exit - [#2622](https://github.com/sanic-org/sanic/pull/2622) Add API to restart all workers from the multiplexer - [#2624](https://github.com/sanic-org/sanic/pull/2624) Default to `spawn` for all subprocesses unless specifically set: ```python from sanic import Sanic Sanic.start_method = "fork" ``` - [#2625](https://github.com/sanic-org/sanic/pull/2625) Filename normalisation of form-data/multipart file uploads - [#2626](https://github.com/sanic-org/sanic/pull/2626) Move to HTTP Inspector: - Remote access to inspect running Sanic instances - TLS support for encrypted calls to Inspector - Authentication to Inspector with API key - Ability to extend Inspector with custom commands - [#2632](https://github.com/sanic-org/sanic/pull/2632) Control order of restart operations - [#2633](https://github.com/sanic-org/sanic/pull/2633) Move reload interval to class variable - [#2636](https://github.com/sanic-org/sanic/pull/2636) Add `priority` to `register_middleware` method - [#2639](https://github.com/sanic-org/sanic/pull/2639) Add `unquote` to `add_route` method - [#2640](https://github.com/sanic-org/sanic/pull/2640) ASGI websockets to receive `text` or `bytes` ### Bugfixes - [#2607](https://github.com/sanic-org/sanic/pull/2607) Force socket shutdown before close to allow rebinding - [#2590](https://github.com/sanic-org/sanic/pull/2590) Use actual `StrEnum` in Python 3.11+ - [#2615](https://github.com/sanic-org/sanic/pull/2615) Ensure middleware executes only once per request timeout - [#2627](https://github.com/sanic-org/sanic/pull/2627) Crash ASGI application on lifespan failure - [#2635](https://github.com/sanic-org/sanic/pull/2635) Resolve error with low-level server creation on Windows ### Deprecations and Removals - [#2608](https://github.com/sanic-org/sanic/pull/2608) [#2630](https://github.com/sanic-org/sanic/pull/2630) Signal conditions and triggers saved on `signal.extra` - [#2626](https://github.com/sanic-org/sanic/pull/2626) Move to HTTP Inspector - 🚨 *BREAKING CHANGE*: Moves the Inspector to a Sanic app from a simple TCP socket with a custom protocol - *DEPRECATE*: The `--inspect*` commands have been deprecated in favor of `inspect ...` commands - [#2628](https://github.com/sanic-org/sanic/pull/2628) Replace deprecated `distutils.strtobool` ### Developer infrastructure - [#2612](https://github.com/sanic-org/sanic/pull/2612) Add CI testing for Python 3.11 ================================================ FILE: docs/sanic/releases/22/22.3.md ================================================ ## Version 22.3.0 ### Features - [#2347](https://github.com/sanic-org/sanic/pull/2347) API for multi-application server - 🚨 *BREAKING CHANGE*: The old `sanic.worker.GunicornWorker` has been **removed**. To run Sanic with `gunicorn`, you should use it thru `uvicorn` [as described in their docs](https://www.uvicorn.org/#running-with-gunicorn). - 🧁 *SIDE EFFECT*: Named background tasks are now supported, even in Python 3.7 - [#2357](https://github.com/sanic-org/sanic/pull/2357) Parse `Authorization` header as `Request.credentials` - [#2361](https://github.com/sanic-org/sanic/pull/2361) Add config option to skip `Touchup` step in application startup - [#2372](https://github.com/sanic-org/sanic/pull/2372) Updates to CLI help messaging - [#2382](https://github.com/sanic-org/sanic/pull/2382) Downgrade warnings to backwater debug messages - [#2396](https://github.com/sanic-org/sanic/pull/2396) Allow for `multidict` v0.6 - [#2401](https://github.com/sanic-org/sanic/pull/2401) Upgrade CLI catching for alternative application run types - [#2402](https://github.com/sanic-org/sanic/pull/2402) Conditionally inject CLI arguments into factory - [#2413](https://github.com/sanic-org/sanic/pull/2413) Add new start and stop event listeners to reloader process - [#2414](https://github.com/sanic-org/sanic/pull/2414) Remove loop as required listener arg - [#2415](https://github.com/sanic-org/sanic/pull/2415) Better exception for bad URL parsing - [sanic-routing#47](https://github.com/sanic-org/sanic-routing/pull/47) Add a new extention parameter type: ``, ``, ``, ``, ``, `` - 👶 *BETA FEATURE*: This feature will not work with `path` type matching, and is being released as a beta feature only. - [sanic-routing#57](https://github.com/sanic-org/sanic-routing/pull/57) Change `register_pattern` to accept a `str` or `Pattern` - [sanic-routing#58](https://github.com/sanic-org/sanic-routing/pull/58) Default matching on non-empty strings only, and new `strorempty` pattern type - 🚨 *BREAKING CHANGE*: Previously a route with a dynamic string parameter (`/` or `/`) would match on any string, including empty strings. It will now **only** match a non-empty string. To retain the old behavior, you should use the new parameter type: `/`. ### Bugfixes - [#2373](https://github.com/sanic-org/sanic/pull/2373) Remove `error_logger` on websockets - [#2381](https://github.com/sanic-org/sanic/pull/2381) Fix newly assigned `None` in task registry - [sanic-routing#52](https://github.com/sanic-org/sanic-routing/pull/52) Add type casting to regex route matching - [sanic-routing#60](https://github.com/sanic-org/sanic-routing/pull/60) Add requirements check on regex routes (this resolves, for example, multiple static directories with differing `host` values) ### Deprecations and Removals - [#2362](https://github.com/sanic-org/sanic/pull/2362) 22.3 Deprecations and changes 1. `debug=True` and `--debug` do _NOT_ automatically run `auto_reload` 2. Default error render is with plain text (browsers still get HTML by default because `auto` looks at headers) 3. `config` is required for `ErrorHandler.finalize` 4. `ErrorHandler.lookup` requires two positional args 5. Unused websocket protocol args removed - [#2344](https://github.com/sanic-org/sanic/pull/2344) Deprecate loading of lowercase environment variables ### Developer infrastructure - [#2363](https://github.com/sanic-org/sanic/pull/2363) Revert code coverage back to Codecov - [#2405](https://github.com/sanic-org/sanic/pull/2405) Upgrade tests for `sanic-routing` changes - [sanic-testing#35](https://github.com/sanic-org/sanic-testing/pull/35) Allow for httpx v0.22 ### Improved Documentation - [#2350](https://github.com/sanic-org/sanic/pull/2350) Fix link in README for ASGI - [#2398](https://github.com/sanic-org/sanic/pull/2398) Document middleware on_request and on_response - [#2409](https://github.com/sanic-org/sanic/pull/2409) Add missing documentation for `Request.respond` ### Miscellaneous - [#2376](https://github.com/sanic-org/sanic/pull/2376) Fix typing for `ListenerMixin.listener` - [#2383](https://github.com/sanic-org/sanic/pull/2383) Clear deprecation warning in `asyncio.wait` - [#2387](https://github.com/sanic-org/sanic/pull/2387) Cleanup `__slots__` implementations - [#2390](https://github.com/sanic-org/sanic/pull/2390) Clear deprecation warning in `asyncio.get_event_loop` ================================================ FILE: docs/sanic/releases/22/22.6.md ================================================ ## Version 22.6.2 ### Bugfixes - [#2522](https://github.com/sanic-org/sanic/pull/2522) Always show server location in ASGI ## Version 22.6.1 ### Bugfixes - [#2477](https://github.com/sanic-org/sanic/pull/2477) Sanic static directory fails when folder name ends with ".." ## Version 22.6.0 ### Features - [#2378](https://github.com/sanic-org/sanic/pull/2378) Introduce HTTP/3 and autogeneration of TLS certificates in `DEBUG` mode - 👶 *EARLY RELEASE FEATURE*: Serving Sanic over HTTP/3 is an early release feature. It does not yet fully cover the HTTP/3 spec, but instead aims for feature parity with Sanic's existing HTTP/1.1 server. Websockets, WebTransport, push responses are examples of some features not yet implemented. - 📦 *EXTRA REQUIREMENT*: Not all HTTP clients are capable of interfacing with HTTP/3 servers. You may need to install a [HTTP/3 capable client](https://curl.se/docs/http3.html). - 📦 *EXTRA REQUIREMENT*: In order to use TLS autogeneration, you must install either [mkcert](https://github.com/FiloSottile/mkcert) or [trustme](https://github.com/python-trio/trustme). - [#2416](https://github.com/sanic-org/sanic/pull/2416) Add message to `task.cancel` - [#2420](https://github.com/sanic-org/sanic/pull/2420) Add exception aliases for more consistent naming with standard HTTP response types (`BadRequest`, `MethodNotAllowed`, `RangeNotSatisfiable`) - [#2432](https://github.com/sanic-org/sanic/pull/2432) Expose ASGI `scope` as a property on the `Request` object - [#2438](https://github.com/sanic-org/sanic/pull/2438) Easier access to websocket class for annotation: `from sanic import Websocket` - [#2439](https://github.com/sanic-org/sanic/pull/2439) New API for reading form values with options: `Request.get_form` - [#2445](https://github.com/sanic-org/sanic/pull/2445) Add custom `loads` function - [#2447](https://github.com/sanic-org/sanic/pull/2447), [#2486](https://github.com/sanic-org/sanic/pull/2486) Improved API to support setting cache control headers - [#2453](https://github.com/sanic-org/sanic/pull/2453) Move verbosity filtering to logger - [#2475](https://github.com/sanic-org/sanic/pull/2475) Expose getter for current request using `Request.get_current()` ### Bugfixes - [#2448](https://github.com/sanic-org/sanic/pull/2448) Fix to allow running with `pythonw.exe` or places where there is no `sys.stdout` - [#2451](https://github.com/sanic-org/sanic/pull/2451) Trigger `http.lifecycle.request` signal in ASGI mode - [#2455](https://github.com/sanic-org/sanic/pull/2455) Resolve typing of stacked route definitions - [#2463](https://github.com/sanic-org/sanic/pull/2463) Properly catch websocket CancelledError in websocket handler in Python 3.7 ### Deprecations and Removals - [#2487](https://github.com/sanic-org/sanic/pull/2487) v22.6 deprecations and changes 1. Optional application registry 1. Execution of custom handlers after some part of response was sent 1. Configuring fallback handlers on the `ErrorHandler` 1. Custom `LOGO` setting 1. `sanic.response.stream` 1. `AsyncioServer.init` ### Developer infrastructure - [#2449](https://github.com/sanic-org/sanic/pull/2449) Clean up `black` and `isort` config - [#2479](https://github.com/sanic-org/sanic/pull/2479) Fix some flappy tests ### Improved Documentation - [#2461](https://github.com/sanic-org/sanic/pull/2461) Update example to match current application naming standards - [#2466](https://github.com/sanic-org/sanic/pull/2466) Better type annotation for `Extend` - [#2485](https://github.com/sanic-org/sanic/pull/2485) Improved help messages in CLI ================================================ FILE: docs/sanic/releases/22/22.9.md ================================================ ## Version 22.9.1 ### Features - [#2585](https://github.com/sanic-org/sanic/pull/2585) Improved error message when no applications have been registered ### Bugfixes - [#2578](https://github.com/sanic-org/sanic/pull/2578) Add certificate loader for in process certificate creation - [#2591](https://github.com/sanic-org/sanic/pull/2591) Do not use sentinel identity for `spawn` compatibility - [#2592](https://github.com/sanic-org/sanic/pull/2592) Fix properties in nested blueprint groups - [#2595](https://github.com/sanic-org/sanic/pull/2595) Introduce sleep interval on new worker reloader ### Deprecations and Removals ### Developer infrastructure - [#2588](https://github.com/sanic-org/sanic/pull/2588) Markdown templates on issue forms ### Improved Documentation - [#2556](https://github.com/sanic-org/sanic/pull/2556) v22.9 documentation - [#2582](https://github.com/sanic-org/sanic/pull/2582) Cleanup documentation on Windows support ## Version 22.9.0 ### Features - [#2445](https://github.com/sanic-org/sanic/pull/2445) Add custom loads function - [#2490](https://github.com/sanic-org/sanic/pull/2490) Make `WebsocketImplProtocol` async iterable - [#2499](https://github.com/sanic-org/sanic/pull/2499) Sanic Server WorkerManager refactor - [#2506](https://github.com/sanic-org/sanic/pull/2506) Use `pathlib` for path resolution (for static file serving) - [#2508](https://github.com/sanic-org/sanic/pull/2508) Use `path.parts` instead of `match` (for static file serving) - [#2513](https://github.com/sanic-org/sanic/pull/2513) Better request cancel handling - [#2516](https://github.com/sanic-org/sanic/pull/2516) Add request properties for HTTP method info: - `request.is_safe` - `request.is_idempotent` - `request.is_cacheable` - *See* [MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods) *for more information about when these apply* - [#2522](https://github.com/sanic-org/sanic/pull/2522) Always show server location in ASGI - [#2526](https://github.com/sanic-org/sanic/pull/2526) Cache control support for static files for returning 304 when appropriate - [#2533](https://github.com/sanic-org/sanic/pull/2533) Refactor `_static_request_handler` - [#2540](https://github.com/sanic-org/sanic/pull/2540) Add signals before and after handler execution - `http.handler.before` - `http.handler.after` - [#2542](https://github.com/sanic-org/sanic/pull/2542) Add *[redacted]* to CLI :) - [#2546](https://github.com/sanic-org/sanic/pull/2546) Add deprecation warning filter - [#2550](https://github.com/sanic-org/sanic/pull/2550) Middleware priority and performance enhancements ### Bugfixes - [#2495](https://github.com/sanic-org/sanic/pull/2495) Prevent directory traversion with static files - [#2515](https://github.com/sanic-org/sanic/pull/2515) Do not apply double slash to paths in certain static dirs in Blueprints ### Deprecations and Removals - [#2525](https://github.com/sanic-org/sanic/pull/2525) Warn on duplicate route names, will be prevented outright in v23.3 - [#2537](https://github.com/sanic-org/sanic/pull/2537) Raise warning and deprecation notice on duplicate exceptions, will be prevented outright in v23.3 ### Developer infrastructure - [#2504](https://github.com/sanic-org/sanic/pull/2504) Cleanup test suite - [#2505](https://github.com/sanic-org/sanic/pull/2505) Replace Unsupported Python Version Number from the Contributing Doc - [#2530](https://github.com/sanic-org/sanic/pull/2530) Do not include tests folder in installed package resolver ### Improved Documentation - [#2502](https://github.com/sanic-org/sanic/pull/2502) Fix a few typos - [#2517](https://github.com/sanic-org/sanic/pull/2517) [#2536](https://github.com/sanic-org/sanic/pull/2536) Add some type hints ================================================ FILE: docs/sanic/releases/23/23.3.md ================================================ ## Version 23.3.0 ### Features - [#2545](https://github.com/sanic-org/sanic/pull/2545) Standardize init of exceptions for more consistent control of HTTP responses using exceptions - [#2606](https://github.com/sanic-org/sanic/pull/2606) Decode headers as UTF-8 also in ASGI - [#2646](https://github.com/sanic-org/sanic/pull/2646) Separate ASGI request and lifespan callables - [#2659](https://github.com/sanic-org/sanic/pull/2659) Use ``FALLBACK_ERROR_FORMAT`` for handlers that return ``empty()`` - [#2662](https://github.com/sanic-org/sanic/pull/2662) Add basic file browser (HTML page) and auto-index serving - [#2667](https://github.com/sanic-org/sanic/pull/2667) Nicer traceback formatting (HTML page) - [#2668](https://github.com/sanic-org/sanic/pull/2668) Smarter error page rendering format selection; more reliant upon header and "common sense" defaults - [#2680](https://github.com/sanic-org/sanic/pull/2680) Check the status of socket before shutting down with ``SHUT_RDWR`` - [#2687](https://github.com/sanic-org/sanic/pull/2687) Refresh ``Request.accept`` functionality to be more performant and spec-compliant - [#2696](https://github.com/sanic-org/sanic/pull/2696) Add header accessors as properties ``` Example-Field: Foo, Bar Example-Field: Baz ``` ```python request.headers.example_field == "Foo, Bar,Baz" ``` - [#2700](https://github.com/sanic-org/sanic/pull/2700) Simpler CLI targets ```sh $ sanic path.to.module:app # global app instance $ sanic path.to.module:create_app # factory pattern $ sanic ./path/to/directory/ # simple serve ``` - [#2701](https://github.com/sanic-org/sanic/pull/2701) API to define a number of workers in managed processes - [#2704](https://github.com/sanic-org/sanic/pull/2704) Add convenience for dynamic changes to routing - [#2706](https://github.com/sanic-org/sanic/pull/2706) Add convenience methods for cookie creation and deletion ```python response = text("...") response.add_cookie("test", "It worked!", domain=".yummy-yummy-cookie.com") ``` - [#2707](https://github.com/sanic-org/sanic/pull/2707) Simplified ``parse_content_header`` escaping to be RFC-compliant and remove outdated FF hack - [#2710](https://github.com/sanic-org/sanic/pull/2710) Stricter charset handling and escaping of request URLs - [#2711](https://github.com/sanic-org/sanic/pull/2711) Consume body on ``DELETE`` by default - [#2719](https://github.com/sanic-org/sanic/pull/2719) Allow ``password`` to be passed to TLS context - [#2720](https://github.com/sanic-org/sanic/pull/2720) Skip middleware on ``RequestCancelled`` - [#2721](https://github.com/sanic-org/sanic/pull/2721) Change access logging format to ``%s`` - [#2722](https://github.com/sanic-org/sanic/pull/2722) Add ``CertLoader`` as application option for directly controlling ``SSLContext`` objects - [#2725](https://github.com/sanic-org/sanic/pull/2725) Worker sync state tolerance on race condition ### Bugfixes - [#2651](https://github.com/sanic-org/sanic/pull/2651) ASGI websocket to pass thru bytes as is - [#2697](https://github.com/sanic-org/sanic/pull/2697) Fix comparison between datetime aware and naive in ``file`` when using ``If-Modified-Since`` ### Deprecations and Removals - [#2666](https://github.com/sanic-org/sanic/pull/2666) Remove deprecated ``__blueprintname__`` property ### Improved Documentation - [#2712](https://github.com/sanic-org/sanic/pull/2712) Improved example using ``'https'`` to create the redirect ================================================ FILE: docs/sanic/releases/23/23.6.md ================================================ ## Version 23.6.0 🔶 ### Features - [#2670](https://github.com/sanic-org/sanic/pull/2670) Increase `KEEP_ALIVE_TIMEOUT` default to 120 seconds - [#2716](https://github.com/sanic-org/sanic/pull/2716) Adding allow route overwrite option in blueprint - [#2724](https://github.com/sanic-org/sanic/pull/2724) and [#2792](https://github.com/sanic-org/sanic/pull/2792) Add a new exception signal for ALL exceptions raised anywhere in application - [#2727](https://github.com/sanic-org/sanic/pull/2727) Add name prefixing to BP groups - [#2754](https://github.com/sanic-org/sanic/pull/2754) Update request type on middleware types - [#2770](https://github.com/sanic-org/sanic/pull/2770) Better exception message on startup time application induced import error - [#2776](https://github.com/sanic-org/sanic/pull/2776) Set multiprocessing start method early - [#2785](https://github.com/sanic-org/sanic/pull/2785) Add custom typing to config and ctx objects - [#2790](https://github.com/sanic-org/sanic/pull/2790) Add `request.client_ip` ### Bugfixes - [#2728](https://github.com/sanic-org/sanic/pull/2728) Fix traversals for intended results - [#2729](https://github.com/sanic-org/sanic/pull/2729) Handle case when headers argument of ResponseStream constructor is None - [#2737](https://github.com/sanic-org/sanic/pull/2737) Fix type annotation for `JSONREsponse` default content type - [#2740](https://github.com/sanic-org/sanic/pull/2740) Use Sanic's serializer for JSON responses in the Inspector - [#2760](https://github.com/sanic-org/sanic/pull/2760) Support for `Request.get_current` in ASGI mode - [#2773](https://github.com/sanic-org/sanic/pull/2773) Alow Blueprint routes to explicitly define error_format - [#2774](https://github.com/sanic-org/sanic/pull/2774) Resolve headers on different renderers - [#2782](https://github.com/sanic-org/sanic/pull/2782) Resolve pypy compatibility issues ### Deprecations and Removals - [#2777](https://github.com/sanic-org/sanic/pull/2777) Remove Python 3.7 support ### Developer infrastructure - [#2766](https://github.com/sanic-org/sanic/pull/2766) Unpin setuptools version - [#2779](https://github.com/sanic-org/sanic/pull/2779) Run keep alive tests in loop to get available port ### Improved Documentation - [#2741](https://github.com/sanic-org/sanic/pull/2741) Better documentation examples about running Sanic From that list, the items to highlight in the release notes: ================================================ FILE: examples/Dockerfile ================================================ FROM sanicframework/sanic:LTS RUN mkdir /srv COPY . /srv WORKDIR /srv CMD ["sanic", "simple_server.app"] ================================================ FILE: examples/add_task_sanic.py ================================================ # -*- coding: utf-8 -*- import asyncio from sanic import Sanic app = Sanic("Example") async def notify_server_started_after_five_seconds(): await asyncio.sleep(5) print("Server successfully started!") app.add_task(notify_server_started_after_five_seconds()) if __name__ == "__main__": app.run(host="0.0.0.0", port=8000) ================================================ FILE: examples/amending_request_object.py ================================================ from random import randint from sanic import Sanic from sanic.response import text app = Sanic("Example") @app.middleware("request") def append_request(request): request.ctx.num = randint(0, 100) @app.get("/pop") def pop_handler(request): return text(request.ctx.num) @app.get("/key_exist") def key_exist_handler(request): # Check the key is exist or not if hasattr(request.ctx, "num"): return text("num exist in request") return text("num does not exist in request") if __name__ == "__main__": app.run(host="0.0.0.0", port=8000, debug=True) ================================================ FILE: examples/authorized_sanic.py ================================================ # -*- coding: utf-8 -*- from functools import wraps from sanic import Sanic from sanic.response import json app = Sanic("Example") def check_request_for_authorization_status(request): # Note: Define your check, for instance cookie, session. flag = True return flag def authorized(f): @wraps(f) async def decorated_function(request, *args, **kwargs): # run some method that checks the request # for the client's authorization status is_authorized = check_request_for_authorization_status(request) if is_authorized: # the user is authorized. # run the handler method and return the response response = await f(request, *args, **kwargs) return response else: # the user is not authorized. return json({"status": "not_authorized"}, 403) return decorated_function @app.route("/") @authorized async def test(request): return json({"status": "authorized"}) if __name__ == "__main__": app.run(host="0.0.0.0", port=8000) ================================================ FILE: examples/blueprint_middlware_execution_order.py ================================================ from sanic import Blueprint, Sanic from sanic.response import text """ Demonstrates that blueprint request middleware are executed in the order they are added. And blueprint response middleware are executed in _reverse_ order. On a valid request, it should print "1 2 3 6 5 4" to terminal """ app = Sanic("Example") bp = Blueprint("bp_example") @bp.on_request def request_middleware_1(request): print("1") @bp.on_request def request_middleware_2(request): print("2") @bp.on_request def request_middleware_3(request): print("3") @bp.on_response def resp_middleware_4(request, response): print("4") @bp.on_response def resp_middleware_5(request, response): print("5") @bp.on_response def resp_middleware_6(request, response): print("6") @bp.route("/") def pop_handler(request): return text("hello world") app.blueprint(bp, url_prefix="/bp") if __name__ == "__main__": app.run(host="0.0.0.0", port=8000, debug=True, auto_reload=False) ================================================ FILE: examples/blueprints.py ================================================ from sanic import Blueprint, Sanic from sanic.response import file, json app = Sanic("Example") blueprint = Blueprint("bp_example", url_prefix="/my_blueprint") blueprint2 = Blueprint("bp_example2", url_prefix="/my_blueprint2") blueprint3 = Blueprint("bp_example3", url_prefix="/my_blueprint3") @blueprint.route("/foo") async def foo(request): return json({"msg": "hi from blueprint"}) @blueprint2.route("/foo") async def foo2(request): return json({"msg": "hi from blueprint2"}) @blueprint3.route("/foo") async def index(request): return await file("websocket.html") @app.websocket("/feed") async def foo3(request, ws): while True: data = "hello!" print("Sending: " + data) await ws.send(data) data = await ws.recv() print("Received: " + data) app.blueprint(blueprint) app.blueprint(blueprint2) app.blueprint(blueprint3) if __name__ == "__main__": app.run(host="0.0.0.0", port=9999, debug=True) ================================================ FILE: examples/delayed_response.py ================================================ from asyncio import sleep from sanic import Sanic, response app = Sanic("DelayedResponseApp", strict_slashes=True) app.config.AUTO_EXTEND = False @app.get("/") async def handler(request): return response.redirect("/sleep/3") @app.get("/sleep/") async def handler2(request, t=0.3): await sleep(t) return response.text(f"Slept {t:.1f} seconds.\n") if __name__ == "__main__": app.run(host="0.0.0.0", port=8000) ================================================ FILE: examples/docker-compose.yml ================================================ version: '2' services: sanic: build: . ports: - "8000:8000" ================================================ FILE: examples/exception_monitoring.py ================================================ """ Example intercepting uncaught exceptions using Sanic's error handler framework. This may be useful for developers wishing to use Sentry, Airbrake, etc. or a custom system to log and monitor unexpected errors in production. First we create our own class inheriting from Handler in sanic.exceptions, and pass in an instance of it when we create our Sanic instance. Inside this class' default handler, we can do anything including sending exceptions to an external service. """ from sanic import Sanic from sanic.exceptions import SanicException from sanic.handlers import ErrorHandler """ Imports and code relevant for our CustomHandler class (Ordinarily this would be in a separate file) """ class CustomHandler(ErrorHandler): def default(self, request, exception): # Here, we have access to the exception object # and can do anything with it (log, send to external service, etc) # Some exceptions are trivial and built into Sanic (404s, etc) if not isinstance(exception, SanicException): print(exception) # Then, we must finish handling the exception by returning # our response to the client # For this we can just call the super class' default handler return super().default(request, exception) """ This is an ordinary Sanic server, with the exception that we set the server's error_handler to an instance of our CustomHandler """ handler = CustomHandler() app = Sanic("Example", error_handler=handler) @app.route("/") async def test(request): # Here, something occurs which causes an unexpected exception # This exception will flow to our custom handler. raise SanicException("You Broke It!") if __name__ == "__main__": app.run(host="0.0.0.0", port=8000, debug=True) ================================================ FILE: examples/hello_world.py ================================================ from sanic import Sanic, response app = Sanic("Example") @app.route("/") async def test(request): return response.json({"test": True}) if __name__ == "__main__": app.run(host="0.0.0.0", port=8000) ================================================ FILE: examples/http_redirect.py ================================================ from sanic import Sanic, response, text from sanic.handlers import ErrorHandler from sanic.server.async_server import AsyncioServer HTTP_PORT = 9999 HTTPS_PORT = 8888 http = Sanic("http") http.config.SERVER_NAME = f"localhost:{HTTP_PORT}" https = Sanic("https") https.config.SERVER_NAME = f"localhost:{HTTPS_PORT}" @https.get("/foo") def foo(request): return text("foo") @https.get("/bar") def bar(request): return text("bar") @http.get("/") def proxy(request, path): url = request.app.url_for( "proxy", path=path, _server=https.config.SERVER_NAME, _external=True, _scheme="https", ) return response.redirect(url) @https.main_process_start async def start(app, _): http_server = await http.create_server( port=HTTP_PORT, return_asyncio_server=True ) app.add_task(runner(http, http_server)) app.ctx.http_server = http_server app.ctx.http = http @https.main_process_stop async def stop(app, _): await app.ctx.http_server.before_stop() await app.ctx.http_server.close() for connection in app.ctx.http_server.connections: connection.close_if_idle() await app.ctx.http_server.after_stop() app.ctx.http = False async def runner(app: Sanic, app_server: AsyncioServer): app.is_running = True try: app.signalize() app.finalize() ErrorHandler.finalize(app.error_handler) app_server.init = True await app_server.before_start() await app_server.after_start() await app_server.serve_forever() finally: app.is_running = False app.is_stopping = True if __name__ == "__main__": https.run(port=HTTPS_PORT, debug=True) ================================================ FILE: examples/limit_concurrency.py ================================================ import asyncio import httpx from sanic import Sanic from sanic.response import json app = Sanic("Example") sem = None @app.before_server_start def init(sanic, _): global sem concurrency_per_worker = 4 sem = asyncio.Semaphore(concurrency_per_worker) async def bounded_fetch(session, url): """ Use session object to perform 'get' request on url """ async with sem: response = await session.get(url) return response.json() @app.route("/") async def test(request): """ Download and serve example JSON """ url = "https://api.github.com/repos/sanic-org/sanic" async with httpx.AsyncClient() as session: response = await bounded_fetch(session, url) return json(response) if __name__ == "__main__": app.run(host="0.0.0.0", port=8000, workers=2) ================================================ FILE: examples/log_request_id.py ================================================ import logging from contextvars import ContextVar from sanic import Sanic, response log = logging.getLogger(__name__) class RequestIdFilter(logging.Filter): def filter(self, record): try: record.request_id = app.ctx.request_id.get(None) or "n/a" except AttributeError: record.request_id = "n/a" return True LOG_SETTINGS = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "DEBUG", "formatter": "default", "filters": ["requestid"], }, }, "filters": { "requestid": { "()": RequestIdFilter, }, }, "formatters": { "default": { "format": ( "%(asctime)s %(levelname)s %(name)s:%(lineno)d" " %(request_id)s | %(message)s" ), }, }, "loggers": { "": {"level": "DEBUG", "handlers": ["console"], "propagate": True}, }, } app = Sanic("Example", log_config=LOG_SETTINGS) @app.on_request async def set_request_id(request): request.app.ctx.request_id.set(request.id) log.info(f"Setting {request.id=}") @app.on_response async def set_request_header(request, response): response.headers["X-Request-ID"] = request.id @app.route("/") async def test(request): log.debug("X-Request-ID: %s", request.id) log.info("Hello from test!") return response.json({"test": True}) @app.before_server_start def setup(app, loop): app.ctx.request_id = ContextVar("request_id") if __name__ == "__main__": app.run(port=9999, debug=True) ================================================ FILE: examples/logdna_example.py ================================================ import logging import socket from os import getenv from platform import node from uuid import getnode as get_mac from logdna import LogDNAHandler from sanic import Sanic from sanic.request import Request from sanic.response import json log = logging.getLogger("logdna") log.setLevel(logging.INFO) def get_my_ip_address(remote_server="google.com"): with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as s: s.connect((remote_server, 80)) return s.getsockname()[0] def get_mac_address(): h = iter(hex(get_mac())[2:].zfill(12)) return ":".join(i + next(h) for i in h) logdna_options = { "app": __name__, "index_meta": True, "hostname": node(), "ip": get_my_ip_address(), "mac": get_mac_address(), } logdna_handler = LogDNAHandler( getenv("LOGDNA_API_KEY"), options=logdna_options ) logdna = logging.getLogger(__name__) logdna.setLevel(logging.INFO) logdna.addHandler(logdna_handler) app = Sanic("Example") @app.middleware def log_request(request: Request): logdna.info("I was Here with a new Request to URL: {}".format(request.url)) @app.route("/") def default(request): return json({"response": "I was here"}) if __name__ == "__main__": app.run(host="0.0.0.0", port=getenv("PORT", 8080)) ================================================ FILE: examples/modify_header_example.py ================================================ """ Modify header or status in response """ from sanic import Sanic, response app = Sanic("Example") @app.route("/") def handle_request(request): return response.json( {"message": "Hello world!"}, headers={"X-Served-By": "sanic"}, status=200, ) @app.route("/unauthorized") def handle_unauthorized_request(request): return response.json( {"message": "You are not authorized"}, headers={"X-Served-By": "sanic"}, status=404, ) if __name__ == "__main__": app.run(host="0.0.0.0", port=8000, debug=True) ================================================ FILE: examples/override_logging.py ================================================ import logging from sanic import Sanic, text logging_format = "[%(asctime)s] %(process)d-%(levelname)s " logging_format += "%(module)s::%(funcName)s():l%(lineno)d: " logging_format += "%(message)s" logging.basicConfig(format=logging_format, level=logging.DEBUG) log = logging.getLogger() # Set logger to override default basicConfig app = Sanic("app") @app.route("/") def test(request): log.info("received request; responding with 'hey'") return text("hey") if __name__ == "__main__": app.run(host="0.0.0.0", port=8000) ================================================ FILE: examples/pytest_xdist.py ================================================ """pytest-xdist example for sanic server Install testing tools: $ pip install pytest pytest-xdist Run with xdist params: $ pytest examples/pytest_xdist.py -n 8 # 8 workers """ import re import pytest from sanic_testing import SanicTestClient from sanic_testing.testing import PORT as PORT_BASE from sanic import Sanic from sanic.response import text @pytest.fixture(scope="session") def test_port(worker_id): m = re.search(r"[0-9]+", worker_id) if m: num_id = m.group(0) else: num_id = 0 port = PORT_BASE + int(num_id) return port @pytest.fixture(scope="session") def app(): app = Sanic("Example") @app.route("/") async def index(request): return text("OK") return app @pytest.fixture(scope="session") def client(app, test_port): return SanicTestClient(app, test_port) @pytest.mark.parametrize("run_id", range(100)) def test_index(client, run_id): request, response = client._sanic_endpoint_test("get", "/") assert response.status == 200 assert response.text == "OK" ================================================ FILE: examples/raygun_example.py ================================================ from os import getenv from raygun4py.raygunprovider import RaygunSender from sanic import Sanic from sanic.exceptions import SanicException from sanic.handlers import ErrorHandler class RaygunExceptionReporter(ErrorHandler): def __init__(self, raygun_api_key=None): super().__init__() if raygun_api_key is None: raygun_api_key = getenv("RAYGUN_API_KEY") self.sender = RaygunSender(raygun_api_key) def default(self, request, exception): self.sender.send_exception(exception=exception) return super().default(request, exception) raygun_error_reporter = RaygunExceptionReporter() app = Sanic("Example", error_handler=raygun_error_reporter) @app.route("/raise") async def test(request): raise SanicException("You Broke It!") if __name__ == "__main__": app.run(host="0.0.0.0", port=getenv("PORT", 8080)) ================================================ FILE: examples/redirect_example.py ================================================ from sanic import Sanic, response app = Sanic("Example") @app.route("/") def handle_request(request): return response.redirect("/redirect") @app.route("/redirect") async def test(request): return response.json({"Redirected": True}) if __name__ == "__main__": app.run(host="0.0.0.0", port=8000) ================================================ FILE: examples/request_stream/client.py ================================================ import requests # Warning: This is a heavy process. data = "" for i in range(1, 250000): data += str(i) r = requests.post("http://0.0.0.0:8000/stream", data=data) print(r.text) ================================================ FILE: examples/request_stream/server.py ================================================ from sanic import Sanic from sanic.blueprints import Blueprint from sanic.response import stream, text from sanic.views import HTTPMethodView from sanic.views import stream as stream_decorator bp = Blueprint("bp_example") app = Sanic("Example") class SimpleView(HTTPMethodView): @stream_decorator async def post(self, request): result = "" while True: body = await request.stream.get() if body is None: break result += body.decode("utf-8") return text(result) @app.post("/stream", stream=True) async def handler(request): async def streaming(response): while True: body = await request.stream.get() if body is None: break body = body.decode("utf-8").replace("1", "A") await response.write(body) return stream(streaming) @bp.put("/bp_stream", stream=True) async def bp_handler(request): result = "" while True: body = await request.stream.get() if body is None: break result += body.decode("utf-8").replace("1", "A") return text(result) async def post_handler(request): result = "" while True: body = await request.stream.get() if body is None: break result += body.decode("utf-8") return text(result) app.blueprint(bp) app.add_route(SimpleView.as_view(), "/method_view") if __name__ == "__main__": app.run(host="0.0.0.0", port=8000) ================================================ FILE: examples/request_timeout.py ================================================ import asyncio from sanic import Sanic, response from sanic.config import Config from sanic.exceptions import RequestTimeout Config.REQUEST_TIMEOUT = 1 app = Sanic("Example") @app.route("/") async def test(request): await asyncio.sleep(3) return response.text("Hello, world!") @app.exception(RequestTimeout) def timeout(request, exception): return response.text("RequestTimeout from error_handler.", 408) if __name__ == "__main__": app.run(host="0.0.0.0", port=8000) ================================================ FILE: examples/rollbar_example.py ================================================ from os import getenv import rollbar from sanic import Sanic from sanic.exceptions import SanicException from sanic.handlers import ErrorHandler rollbar.init(getenv("ROLLBAR_API_KEY")) class RollbarExceptionHandler(ErrorHandler): def default(self, request, exception): rollbar.report_message(str(exception)) return super().default(request, exception) app = Sanic("Example", error_handler=RollbarExceptionHandler()) @app.route("/raise") def create_error(request): raise SanicException("I was here and I don't like where I am") if __name__ == "__main__": app.run(host="0.0.0.0", port=getenv("PORT", 8080)) ================================================ FILE: examples/run_asgi.py ================================================ """ 1. Create a simple Sanic app 0. Run with an ASGI server: $ uvicorn run_asgi:app or $ hypercorn run_asgi:app """ from pathlib import Path from sanic import Sanic, response app = Sanic("Example") @app.route("/text") def handler_text(request): return response.text("Hello") @app.route("/json") def handler_json(request): return response.json({"foo": "bar"}) @app.websocket("/ws") async def handler_ws(request, ws): name = "" while True: data = f"Hello {name}" await ws.send(data) name = await ws.recv() if not name: break @app.route("/file") async def handler_file(request): return await response.file(Path("../") / "setup.py") @app.route("/file_stream") async def handler_file_stream(request): return await response.file_stream( Path("../") / "setup.py", chunk_size=1024 ) @app.post("/stream", stream=True) async def handler_stream(request): while True: body = await request.stream.read() if body is None: break body = body.decode("utf-8").replace("1", "A") await response.write(body) return response.stream(body) @app.before_server_start async def listener_before_server_start(*args, **kwargs): print("before_server_start") @app.after_server_start async def listener_after_server_start(*args, **kwargs): print("after_server_start") @app.before_server_stop async def listener_before_server_stop(*args, **kwargs): print("before_server_stop") @app.after_server_stop async def listener_after_server_stop(*args, **kwargs): print("after_server_stop") @app.on_request async def print_on_request(request): print("print_on_request") @app.on_response async def print_on_response(request, response): print("print_on_response") ================================================ FILE: examples/run_async.py ================================================ import asyncio import uvloop from sanic import Sanic, response app = Sanic("Example") @app.route("/") async def test(request): return response.json({"answer": "42"}) async def main(): server = await app.create_server( port=8000, host="0.0.0.0", return_asyncio_server=True ) if server is None: return await server.startup() await server.serve_forever() if __name__ == "__main__": asyncio.set_event_loop(uvloop.new_event_loop()) asyncio.run(main()) ================================================ FILE: examples/run_async_advanced.py ================================================ import asyncio from signal import SIGINT, signal import uvloop from sanic import Sanic, response from sanic.server import AsyncioServer app = Sanic("Example") @app.before_server_start async def before_server_start(app, loop): print("Async Server starting") @app.after_server_start async def after_server_start(app, loop): print("Async Server started") @app.before_server_stop async def before_server_stop(app, loop): print("Async Server stopping") @app.after_server_stop async def after_server_stop(app, loop): print("Async Server stopped") @app.route("/") async def test(request): return response.json({"answer": "42"}) if __name__ == "__main__": asyncio.set_event_loop(uvloop.new_event_loop()) serv_coro = app.create_server( host="0.0.0.0", port=8000, return_asyncio_server=True ) loop = asyncio.get_event_loop() serv_task = asyncio.ensure_future(serv_coro, loop=loop) signal(SIGINT, lambda s, f: loop.stop()) server: AsyncioServer = loop.run_until_complete(serv_task) loop.run_until_complete(server.startup()) # When using app.run(), this actually triggers before the serv_coro. # But, in this example, we are using the convenience method, even if it is # out of order. loop.run_until_complete(server.before_start()) loop.run_until_complete(server.after_start()) try: loop.run_forever() except KeyboardInterrupt: loop.stop() finally: loop.run_until_complete(server.before_stop()) # Wait for server to close close_task = server.close() loop.run_until_complete(close_task) # Complete all tasks on the loop for connection in server.connections: connection.close_if_idle() loop.run_until_complete(server.after_stop()) ================================================ FILE: examples/sentry_example.py ================================================ from os import getenv from sentry_sdk import init as sentry_init from sentry_sdk.integrations.sanic import SanicIntegration from sanic import Sanic from sanic.response import json sentry_init( dsn=getenv("SENTRY_DSN"), integrations=[SanicIntegration()], ) app = Sanic("Example") # noinspection PyUnusedLocal @app.route("/working") async def working_path(request): return json({"response": "Working API Response"}) # noinspection PyUnusedLocal @app.route("/raise-error") async def raise_error(request): raise Exception("Testing Sentry Integration") if __name__ == "__main__": app.run(host="0.0.0.0", port=getenv("PORT", 8080)) ================================================ FILE: examples/simple_async_view.py ================================================ from sanic import Sanic from sanic.response import text from sanic.views import HTTPMethodView app = Sanic("some_name") class SimpleView(HTTPMethodView): def get(self, request): return text("I am get method") def post(self, request): return text("I am post method") def put(self, request): return text("I am put method") def patch(self, request): return text("I am patch method") def delete(self, request): return text("I am delete method") class SimpleAsyncView(HTTPMethodView): async def get(self, request): return text("I am async get method") async def post(self, request): return text("I am async post method") async def put(self, request): return text("I am async put method") app.add_route(SimpleView.as_view(), "/") app.add_route(SimpleAsyncView.as_view(), "/async") if __name__ == "__main__": app.run(host="0.0.0.0", port=8000, debug=True) ================================================ FILE: examples/static/robots.txt ================================================ User-agent: * Disallow: / ================================================ FILE: examples/static_assets.py ================================================ from sanic import Sanic app = Sanic("Example") app.static("/", "./static") ================================================ FILE: examples/teapot.py ================================================ from sanic import Sanic from sanic import response as res app = Sanic("Example") @app.route("/") async def test(req): return res.text("I'm a teapot", status=418) if __name__ == "__main__": app.run(host="0.0.0.0", port=8000) ================================================ FILE: examples/try_everything.py ================================================ import os from sanic import Sanic, response from sanic.exceptions import ServerError from sanic.log import logger as log app = Sanic("Example") @app.route("/") async def test_async(request): return response.json({"test": True}) @app.route("/sync", methods=["GET", "POST"]) def test_sync(request): return response.json({"test": True}) @app.route("/dynamic//") def test_params(request, name, i): return response.text("yeehaww {} {}".format(name, i)) @app.route("/exception") def exception(request): raise ServerError("It's dead jim") @app.route("/await") async def test_await(request): import asyncio await asyncio.sleep(5) return response.text("I'm feeling sleepy") @app.route("/file") async def test_file(request): return await response.file(os.path.abspath("setup.py")) @app.route("/file_stream") async def test_file_stream(request): return await response.file_stream( os.path.abspath("setup.py"), chunk_size=1024 ) # ----------------------------------------------- # # Exceptions # ----------------------------------------------- # @app.exception(ServerError) async def test(request, exception): return response.json( {"exception": str(exception), "status": exception.status_code}, status=exception.status_code, ) # ----------------------------------------------- # # Read from request # ----------------------------------------------- # @app.route("/json") def post_json(request): return response.json({"received": True, "message": request.json}) @app.route("/form") def post_form_json(request): return response.json( { "received": True, "form_data": request.form, "test": request.form.get("test"), } ) @app.route("/query_string") def query_string(request): return response.json( { "parsed": True, "args": request.args, "url": request.url, "query_string": request.query_string, } ) # ----------------------------------------------- # # Run Server # ----------------------------------------------- # @app.before_server_start def before_start(app, loop): log.info("SERVER STARTING") @app.after_server_start def after_start(app, loop): log.info("OH OH OH OH OHHHHHHHH") @app.before_server_stop def before_stop(app, loop): log.info("SERVER STOPPING") @app.after_server_stop def after_stop(app, loop): log.info("TRIED EVERYTHING") if __name__ == "__main__": app.run(host="0.0.0.0", port=8000, debug=True) ================================================ FILE: examples/unix_socket.py ================================================ from sanic import Sanic, response app = Sanic("Example") @app.route("/test") async def test(request): return response.text("OK") if __name__ == "__main__": app.run(unix="./uds_socket") ================================================ FILE: examples/url_for_example.py ================================================ from sanic import Sanic, response app = Sanic("Example") @app.route("/") async def index(request): # generate a URL for the endpoint `post_handler` url = app.url_for("post_handler", post_id=5) # the URL is `/posts/5`, redirect to it return response.redirect(url) @app.route("/posts/") async def post_handler(request, post_id): return response.text("Post - {}".format(post_id)) if __name__ == "__main__": app.run(host="0.0.0.0", port=8000, debug=True) ================================================ FILE: examples/versioned_blueprint_group.py ================================================ from sanic import Sanic from sanic.blueprints import Blueprint from sanic.response import json app = Sanic(name="blue-print-group-version-example") bp1 = Blueprint(name="ultron", url_prefix="/ultron") bp2 = Blueprint(name="vision", url_prefix="/vision", strict_slashes=None) bpg = Blueprint.group( bp1, bp2, url_prefix="/sentient/robot", version=1, strict_slashes=True ) @bp1.get("/name") async def bp1_name(request): """This will expose an Endpoint GET /v1/sentient/robot/ultron/name""" return json({"name": "Ultron"}) @bp2.get("/name") async def bp2_name(request): """This will expose an Endpoint GET /v1/sentient/robot/vision/name""" return json({"name": "vision"}) @bp2.get("/name", version=2) async def bp2_revised_name(request): """This will expose an Endpoint GET /v2/sentient/robot/vision/name""" return json({"name": "new vision"}) app.blueprint(bpg) if __name__ == "__main__": app.run(host="0.0.0.0", port=8000) ================================================ FILE: examples/vhosts.py ================================================ from sanic import Sanic, response from sanic.blueprints import Blueprint # Usage # curl -H "Host: example.com" localhost:8000 # curl -H "Host: sub.example.com" localhost:8000 # curl -H "Host: bp.example.com" localhost:8000/question # curl -H "Host: bp.example.com" localhost:8000/answer app = Sanic("Example") bp = Blueprint("bp", host="bp.example.com") @app.route( "/", host=["example.com", "somethingelse.com", "therestofyourdomains.com"] ) async def hello_0(request): return response.text("Some defaults") @app.route("/", host="sub.example.com") async def hello_1(request): return response.text("42") @bp.route("/question") async def hello_2(request): return response.text("What is the meaning of life?") @bp.route("/answer") async def hello_3(request): return response.text("42") @app.get("/name") def name(request): return response.text(request.app.url_for("name", _external=True)) app.blueprint(bp) if __name__ == "__main__": app.run(host="0.0.0.0", port=8000) ================================================ FILE: examples/websocket.html ================================================ WebSocket demo ================================================ FILE: examples/websocket.py ================================================ from sanic import Sanic from sanic.response import redirect app = Sanic("Example") app.static("index.html", "websocket.html") @app.route("/") def index(request): return redirect("index.html") @app.websocket("/feed") async def feed(request, ws): while True: data = "hello!" print("Sending: " + data) await ws.send(data) data = await ws.recv() print("Received: " + data) if __name__ == "__main__": app.run(host="0.0.0.0", port=8000, debug=True) ================================================ FILE: guide/Procfile ================================================ web: sanic --port=${PORT} --host=0.0.0.0 --workers=1 server:app ================================================ FILE: guide/config/en/general.yaml ================================================ current_version: "25.12" ================================================ FILE: guide/config/en/navbar.yaml ================================================ root: - label: Home path: index.html - label: Community items: - label: Forums href: https://community.sanicframework.org - label: Discord href: https://discord.gg/FARQzAEMAA - label: Twitter href: https://twitter.com/sanicframework - label: Help path: ./help.html - label: GitHub href: https://github.com/sanic-org/sanic ================================================ FILE: guide/config/en/sidebar.yaml ================================================ root: - label: User Guide items: - label: General items: - label: Introduction path: guide/introduction.html - label: Getting Started path: guide/getting-started.html - label: Basics items: - label: Sanic Application path: guide/basics/app.html - label: Handlers path: guide/basics/handlers.html - label: Request path: guide/basics/request.html - label: Response path: guide/basics/response.html - label: Routing path: guide/basics/routing.html - label: Listeners path: guide/basics/listeners.html - label: Middleware path: guide/basics/middleware.html - label: Headers path: guide/basics/headers.html - label: Cookies path: guide/basics/cookies.html - label: Background Tasks path: guide/basics/tasks.html - label: Advanced items: - label: Class Based Views path: guide/advanced/class-based-views.html - label: Proxy Configuration path: guide/advanced/proxy-headers.html - label: Streaming path: guide/advanced/streaming.html - label: Websockets path: guide/advanced/websockets.html - label: Versioning path: guide/advanced/versioning.html - label: Signals path: guide/advanced/signals.html - label: Custom CLI Commands path: guide/advanced/commands.html - label: Best Practices items: - label: Blueprints path: guide/best-practices/blueprints.html - label: Exceptions path: guide/best-practices/exceptions.html - label: Decorators path: guide/best-practices/decorators.html - label: Logging path: guide/best-practices/logging.html - label: Testing path: guide/best-practices/testing.html - label: Running Sanic items: - label: Configuration path: guide/running/configuration.html - label: Development path: guide/running/development.html - label: Running Sanic path: guide/running/running.html - label: Worker Manager path: guide/running/manager.html - label: Dynamic Applications path: guide/running/app-loader.html - label: Inspector path: guide/running/inspector.html - label: Deployment items: - label: Caddy path: guide/deployment/caddy.html - label: Nginx path: guide/deployment/nginx.html - label: Docker path: guide/deployment/docker.html - label: How to ... items: - label: Table of Contents path: guide/how-to/table-of-contents.html - label: Application Mounting path: guide/how-to/mounting.html - label: Authentication path: guide/how-to/authentication.html - label: Autodiscovery path: guide/how-to/autodiscovery.html - label: CORS path: guide/how-to/cors.html - label: ORM path: guide/how-to/orm.html - label: Static Redirects path: guide/how-to/static-redirects.html - label: TLS/SSL/HTTPS path: guide/how-to/tls.html - label: Plugins items: - label: Sanic Extensions items: - label: Getting Started path: plugins/sanic-ext/getting-started.html - label: HTTP - Methods path: plugins/sanic-ext/http/methods.html - label: HTTP - CORS Protection path: plugins/sanic-ext/http/cors.html - label: OpenAPI - Basics path: plugins/sanic-ext/openapi/basics.html - label: OpenAPI - UI path: plugins/sanic-ext/openapi/ui.html - label: OpenAPI - Decorators path: plugins/sanic-ext/openapi/decorators.html # - label: OpenAPI - Advanced # path: plugins/sanic-ext/openapi/advanced.html - label: OpenAPI - Auto Documentation path: plugins/sanic-ext/openapi/autodoc.html - label: OpenAPI - Security path: plugins/sanic-ext/openapi/security.html - label: Convenience path: plugins/sanic-ext/convenience.html - label: Templating - Jinja path: plugins/sanic-ext/templating/jinja.html - label: Templating - html5tagger path: plugins/sanic-ext/templating/html5tagger.html - label: Dependency Injection path: plugins/sanic-ext/injection.html - label: Validation path: plugins/sanic-ext/validation.html - label: Health Monitor path: plugins/sanic-ext/health-monitor.html - label: Background Logger path: plugins/sanic-ext/logger.html - label: Configuration path: plugins/sanic-ext/configuration.html - label: Custom Extensions path: plugins/sanic-ext/custom.html - label: Sanic Testing items: - label: Getting Started path: plugins/sanic-testing/getting-started.html - label: Test Clients path: plugins/sanic-testing/clients.html - label: Release Notes items: - label: "2025" items: - label: Sanic 25.12 path: release-notes/2025/v25.12.html - label: Sanic 25.3 path: release-notes/2025/v25.3.html - label: "2024" items: - label: Sanic 24.12 path: release-notes/2024/v24.12.html - label: Sanic 24.6 path: release-notes/2024/v24.6.html - label: "2023" items: - label: Sanic 23.12 path: release-notes/2023/v23.12.html - label: Sanic 23.9 path: release-notes/2023/v23.9.html - label: Sanic 23.6 path: release-notes/2023/v23.6.html - label: Sanic 23.3 path: release-notes/2023/v23.3.html - label: "2022" items: - label: Sanic 22.12 path: release-notes/2022/v22.12.html - label: Sanic 22.9 path: release-notes/2022/v22.9.html - label: Sanic 22.6 path: release-notes/2022/v22.6.html - label: Sanic 22.3 path: release-notes/2022/v22.3.html - label: "2021" items: - label: Sanic 21.12 path: release-notes/2021/v21.12.html - label: Sanic 21.9 path: release-notes/2021/v21.9.html - label: Sanic 21.6 path: release-notes/2021/v21.6.html - label: Sanic 21.3 path: release-notes/2021/v21.3.html - label: Changelog path: release-notes/changelog.html - label: Organization items: - label: Contributing path: organization/contributing.html - label: Code of Conduct path: organization/code-of-conduct.html - label: S.C.O.P.E. (Governance) path: organization/scope.html - label: Policies path: organization/policies.html - label: API Reference items: - label: Application items: - label: sanic.app path: /api/sanic.app.html - label: sanic.config path: /api/sanic.config.html - label: sanic.application path: /api/sanic.application.html - label: Blueprint items: - label: sanic.blueprints path: /api/sanic.blueprints.html - label: sanic.blueprint_group path: /api/sanic.blueprint_group.html - label: Constant items: - label: sanic.constants path: /api/sanic.constants.html - label: Core items: - label: sanic.cookies path: /api/sanic.cookies.html - label: sanic.handlers path: /api/sanic.handlers.html - label: sanic.headers path: /api/sanic.headers.html - label: sanic.middleware path: /api/sanic.middleware.html - label: sanic.mixins path: /api/sanic.mixins.html - label: sanic.request path: /api/sanic.request.html - label: sanic.response path: /api/sanic.response.html - label: sanic.views path: /api/sanic.views.html - label: Display items: - label: sanic.pages path: /api/sanic.pages.html - label: Exception items: - label: sanic.errorpages path: /api/sanic.errorpages.html - label: sanic.exceptions path: /api/sanic.exceptions.html - label: Model items: - label: sanic.models path: /api/sanic.models.html - label: Routing items: - label: sanic.router path: /api/sanic.router.html - label: sanic.signals path: /api/sanic.signals.html - label: Server items: - label: sanic.http path: /api/sanic.http.html - label: sanic.server path: /api/sanic.server.html - label: sanic.worker path: /api/sanic.worker.html - label: Utility items: - label: sanic.compat path: /api/sanic.compat.html - label: sanic.helpers path: /api/sanic.helpers.html - label: sanic.logging path: /api/sanic.logging.html - label: sanic.utils path: /api/sanic.utils.html ================================================ FILE: guide/content/en/built-with-sanic.md ================================================ --- title: Full Speed Ahead - How We Built This Site with Sanic layout: main --- .. attrs:: :class: title Full Speed Ahead: .. attrs:: :class: subtitle How We Built This Site with Sanic Welcome to our little corner of the Internet where we proudly say, "Yes, we built this with Sanic!" This isn't just a website; it's our playground, our test lab, our battlefield, and, well, our home. ![](/assets/images/built-with-sanic.png) ### The Story: "We Drink Our Own Champagne" We believe in Sanic so much that we decided to put it to the ultimate test—running our own website. It's like a chef eating at their own restaurant, only with less risk of food poisoning. Why? Because building a website or web application is hard. There are countless moving parts, a plethora of challenges, and the ever-present need for speed and reliability. We want to show you just one of the many ways you *could* do it. In this high-stakes digital kitchen, Sanic is our secret ingredient. By deploying our own website on Sanic, we're not just showcasing its capabilities; we're stress-testing them in the real world. This is our chance to walk the walk, proving that Sanic isn't just good on paper—it's a robust, high-performance framework that can handle everything from the smallest blog to the busiest e-commerce site. So, here we are, sipping our own champagne, confident in the knowledge that if Sanic can run our site, it can power yours too. Cheers to coding at the speed of thought! 🥂 ### The Setup: Digital Ocean, Ahoy! We launched our site on Digital Ocean's App Platform because we love high-performance cloud sailing. Think of it as having a Ferrari in the cloud—fast, sleek, but way easier to handle. Why go for simplicity? With a lean team and no DevOps gurus, we needed a no-fuss, straightforward solution. Digital Ocean gives us that smooth sailing platform-as-a-service (PaaS) experience. It’s perfect for our needs: easy setup, automatic deployments, and the kind of reliability that lets you sleep soundly. Our choice reflects our ethos: focus on your strengths and let the platform do the heavy lifting. For us, it means creating amazing web experiences with Sanic, supported by a deployment solution that's simple yet powerful. ⛵ ### The Code: GitHub's Where It's At All our code is out in the open, basking in the glory of public scrutiny on GitHub. Why hide the magic? It's right there, in full view, at [our GitHub repository](https://github.com/sanic-org/sanic/tree/main/guide). Go ahead, take a peek, fork it, play with it, break it (and then kindly fix it). Open-source isn't just a buzzword for us; it's our ethos. It's about building something bigger than ourselves, together. Our code is a testament to collaborative innovation, a playground for development, and a real-life example of Sanic in action. Every line of code, every commit, reflects our journey with Sanic, showcasing how we leverage its speed and scalability. Your contributions, whether fixing a bug, suggesting a feature, or enhancing documentation, are what propel this project forward. So, dive in, contribute your genius, and let's keep shaping the future of web development with Sanic. Together, we're not just coding – we're creating a community-driven powerhouse. 🚀 ### The Invitation: Write, Code, Break, Fix! - **Documentarians**: Love making complex stuff sound easy? Our docs are your canvas. Paint away in words! 🎨 - **Code Ninjas**: Find bugs? Squash 'em. Got ideas? Code 'em. Make pull requests rain! 🥷 - **Bug Hunters**: If you find bugs, don't just stare. Let us know. We love a good bug hunt. 🐛 ### The Bottom Line We built this site with Sanic to show off what it can do. It's fast, it's fun, and it's what we use. So, if things load swiftly, pat us on the back. If they don't, well, uh... we blame cosmic rays? Join us in making Sanic not just good, but "I-can't-believe-it's-not-butter" good! Cheers, The Sanic Team (who occasionally wear capes) ================================================ FILE: guide/content/en/emoji.py ================================================ EMOJI = { "1st_place_medal": "🥇", "2nd_place_medal": "🥈", "3rd_place_medal": "🥉", "AB_button_(blood_type)": "🆎", "ATM_sign": "🏧", "A_button_(blood_type)": "🅰", "Afghanistan": "🇦🇫", "Albania": "🇦🇱", "Algeria": "🇩🇿", "American_Samoa": "🇦🇸", "Andorra": "🇦🇩", "Angola": "🇦🇴", "Anguilla": "🇦🇮", "Antarctica": "🇦🇶", "Antigua_&_Barbuda": "🇦🇬", "Aquarius": "♒", "Argentina": "🇦🇷", "Aries": "♈", "Armenia": "🇦🇲", "Aruba": "🇦🇼", "Ascension_Island": "🇦🇨", "Australia": "🇦🇺", "Austria": "🇦🇹", "Azerbaijan": "🇦🇿", "BACK_arrow": "🔙", "B_button_(blood_type)": "🅱", "Bahamas": "🇧🇸", "Bahrain": "🇧🇭", "Bangladesh": "🇧🇩", "Barbados": "🇧🇧", "Belarus": "🇧🇾", "Belgium": "🇧🇪", "Belize": "🇧🇿", "Benin": "🇧🇯", "Bermuda": "🇧🇲", "Bhutan": "🇧🇹", "Bolivia": "🇧🇴", "Bosnia_&_Herzegovina": "🇧🇦", "Botswana": "🇧🇼", "Bouvet_Island": "🇧🇻", "Brazil": "🇧🇷", "British_Indian_Ocean_Territory": "🇮🇴", "British_Virgin_Islands": "🇻🇬", "Brunei": "🇧🇳", "Bulgaria": "🇧🇬", "Burkina_Faso": "🇧🇫", "Burundi": "🇧🇮", "CL_button": "🆑", "COOL_button": "🆒", "Cambodia": "🇰🇭", "Cameroon": "🇨🇲", "Canada": "🇨🇦", "Canary_Islands": "🇮🇨", "Cancer": "♋", "Cape_Verde": "🇨🇻", "Capricorn": "♑", "Caribbean_Netherlands": "🇧🇶", "Cayman_Islands": "🇰🇾", "Central_African_Republic": "🇨🇫", "Ceuta_&_Melilla": "🇪🇦", "Chad": "🇹🇩", "Chile": "🇨🇱", "China": "🇨🇳", "Christmas_Island": "🇨🇽", "Christmas_tree": "🎄", "Clipperton_Island": "🇨🇵", "Cocos_(Keeling)_Islands": "🇨🇨", "Colombia": "🇨🇴", "Comoros": "🇰🇲", "Congo-Brazzaville": "🇨🇬", "Congo-Kinshasa": "🇨🇩", "Cook_Islands": "🇨🇰", "Costa_Rica": "🇨🇷", "Croatia": "🇭🇷", "Cuba": "🇨🇺", "Curaçao": "🇨🇼", "Cyprus": "🇨🇾", "Czechia": "🇨🇿", "Côte_d’Ivoire": "🇨🇮", "Denmark": "🇩🇰", "Diego_Garcia": "🇩🇬", "Djibouti": "🇩🇯", "Dominica": "🇩🇲", "Dominican_Republic": "🇩🇴", "END_arrow": "🔚", "Ecuador": "🇪🇨", "Egypt": "🇪🇬", "El_Salvador": "🇸🇻", "England": "🏴󠁧󠁢󠁥󠁮󠁧󠁿", "Equatorial_Guinea": "🇬🇶", "Eritrea": "🇪🇷", "Estonia": "🇪🇪", "Eswatini": "🇸🇿", "Ethiopia": "🇪🇹", "European_Union": "🇪🇺", "FREE_button": "🆓", "Falkland_Islands": "🇫🇰", "Faroe_Islands": "🇫🇴", "Fiji": "🇫🇯", "Finland": "🇫🇮", "France": "🇫🇷", "French_Guiana": "🇬🇫", "French_Polynesia": "🇵🇫", "French_Southern_Territories": "🇹🇫", "Gabon": "🇬🇦", "Gambia": "🇬🇲", "Gemini": "♊", "Georgia": "🇬🇪", "Germany": "🇩🇪", "Ghana": "🇬🇭", "Gibraltar": "🇬🇮", "Greece": "🇬🇷", "Greenland": "🇬🇱", "Grenada": "🇬🇩", "Guadeloupe": "🇬🇵", "Guam": "🇬🇺", "Guatemala": "🇬🇹", "Guernsey": "🇬🇬", "Guinea": "🇬🇳", "Guinea-Bissau": "🇬🇼", "Guyana": "🇬🇾", "Haiti": "🇭🇹", "Heard_&_McDonald_Islands": "🇭🇲", "Honduras": "🇭🇳", "Hong_Kong_SAR_China": "🇭🇰", "Hungary": "🇭🇺", "ID_button": "🆔", "Iceland": "🇮🇸", "India": "🇮🇳", "Indonesia": "🇮🇩", "Iran": "🇮🇷", "Iraq": "🇮🇶", "Ireland": "🇮🇪", "Isle_of_Man": "🇮🇲", "Israel": "🇮🇱", "Italy": "🇮🇹", "Jamaica": "🇯🇲", "Japan": "🇯🇵", "Japanese_acceptable_button": "🉑", "Japanese_application_button": "🈸", "Japanese_bargain_button": "🉐", "Japanese_castle": "🏯", "Japanese_congratulations_button": "㊗", "Japanese_discount_button": "🈹", "Japanese_dolls": "🎎", "Japanese_free_of_charge_button": "🈚", "Japanese_here_button": "🈁", "Japanese_monthly_amount_button": "🈷", "Japanese_no_vacancy_button": "🈵", "Japanese_not_free_of_charge_button": "🈶", "Japanese_open_for_business_button": "🈺", "Japanese_passing_grade_button": "🈴", "Japanese_post_office": "🏣", "Japanese_prohibited_button": "🈲", "Japanese_reserved_button": "🈯", "Japanese_secret_button": "㊙", "Japanese_service_charge_button": "🈂", "Japanese_symbol_for_beginner": "🔰", "Japanese_vacancy_button": "🈳", "Jersey": "🇯🇪", "Jordan": "🇯🇴", "Kazakhstan": "🇰🇿", "Kenya": "🇰🇪", "Kiribati": "🇰🇮", "Kosovo": "🇽🇰", "Kuwait": "🇰🇼", "Kyrgyzstan": "🇰🇬", "Laos": "🇱🇦", "Latvia": "🇱🇻", "Lebanon": "🇱🇧", "Leo": "♌", "Lesotho": "🇱🇸", "Liberia": "🇱🇷", "Libra": "♎", "Libya": "🇱🇾", "Liechtenstein": "🇱🇮", "Lithuania": "🇱🇹", "Luxembourg": "🇱🇺", "Macao_SAR_China": "🇲🇴", "Madagascar": "🇲🇬", "Malawi": "🇲🇼", "Malaysia": "🇲🇾", "Maldives": "🇲🇻", "Mali": "🇲🇱", "Malta": "🇲🇹", "Marshall_Islands": "🇲🇭", "Martinique": "🇲🇶", "Mauritania": "🇲🇷", "Mauritius": "🇲🇺", "Mayotte": "🇾🇹", "Mexico": "🇲🇽", "Micronesia": "🇫🇲", "Moldova": "🇲🇩", "Monaco": "🇲🇨", "Mongolia": "🇲🇳", "Montenegro": "🇲🇪", "Montserrat": "🇲🇸", "Morocco": "🇲🇦", "Mozambique": "🇲🇿", "Mrs._Claus": "🤶", "Mrs._Claus_dark_skin_tone": "🤶🏿", "Mrs._Claus_light_skin_tone": "🤶🏻", "Mrs._Claus_medium-dark_skin_tone": "🤶🏾", "Mrs._Claus_medium-light_skin_tone": "🤶🏼", "Mrs._Claus_medium_skin_tone": "🤶🏽", "Myanmar_(Burma)": "🇲🇲", "NEW_button": "🆕", "NG_button": "🆖", "Namibia": "🇳🇦", "Nauru": "🇳🇷", "Nepal": "🇳🇵", "Netherlands": "🇳🇱", "New_Caledonia": "🇳🇨", "New_Zealand": "🇳🇿", "Nicaragua": "🇳🇮", "Niger": "🇳🇪", "Nigeria": "🇳🇬", "Niue": "🇳🇺", "Norfolk_Island": "🇳🇫", "North_Korea": "🇰🇵", "North_Macedonia": "🇲🇰", "Northern_Mariana_Islands": "🇲🇵", "Norway": "🇳🇴", "OK_button": "🆗", "OK_hand": "👌", "OK_hand_dark_skin_tone": "👌🏿", "OK_hand_light_skin_tone": "👌🏻", "OK_hand_medium-dark_skin_tone": "👌🏾", "OK_hand_medium-light_skin_tone": "👌🏼", "OK_hand_medium_skin_tone": "👌🏽", "ON!_arrow": "🔛", "O_button_(blood_type)": "🅾", "Oman": "🇴🇲", "Ophiuchus": "⛎", "P_button": "🅿", "Pakistan": "🇵🇰", "Palau": "🇵🇼", "Palestinian_Territories": "🇵🇸", "Panama": "🇵🇦", "Papua_New_Guinea": "🇵🇬", "Paraguay": "🇵🇾", "Peru": "🇵🇪", "Philippines": "🇵🇭", "Pisces": "♓", "Pitcairn_Islands": "🇵🇳", "Poland": "🇵🇱", "Portugal": "🇵🇹", "Puerto_Rico": "🇵🇷", "Qatar": "🇶🇦", "Romania": "🇷🇴", "Russia": "🇷🇺", "Rwanda": "🇷🇼", "Réunion": "🇷🇪", "SOON_arrow": "🔜", "SOS_button": "🆘", "Sagittarius": "♐", "Samoa": "🇼🇸", "San_Marino": "🇸🇲", "Santa_Claus": "🎅", "Santa_Claus_dark_skin_tone": "🎅🏿", "Santa_Claus_light_skin_tone": "🎅🏻", "Santa_Claus_medium-dark_skin_tone": "🎅🏾", "Santa_Claus_medium-light_skin_tone": "🎅🏼", "Santa_Claus_medium_skin_tone": "🎅🏽", "Saudi_Arabia": "🇸🇦", "Scorpio": "♏", "Scotland": "🏴󠁧󠁢󠁳󠁣󠁴󠁿", "Senegal": "🇸🇳", "Serbia": "🇷🇸", "Seychelles": "🇸🇨", "Sierra_Leone": "🇸🇱", "Singapore": "🇸🇬", "Sint_Maarten": "🇸🇽", "Slovakia": "🇸🇰", "Slovenia": "🇸🇮", "Solomon_Islands": "🇸🇧", "Somalia": "🇸🇴", "South_Africa": "🇿🇦", "South_Georgia_&_South_Sandwich_Islands": "🇬🇸", "South_Korea": "🇰🇷", "South_Sudan": "🇸🇸", "Spain": "🇪🇸", "Sri_Lanka": "🇱🇰", "St._Barthélemy": "🇧🇱", "St._Helena": "🇸🇭", "St._Kitts_&_Nevis": "🇰🇳", "St._Lucia": "🇱🇨", "St._Martin": "🇲🇫", "St._Pierre_&_Miquelon": "🇵🇲", "St._Vincent_&_Grenadines": "🇻🇨", "Statue_of_Liberty": "🗽", "Sudan": "🇸🇩", "Suriname": "🇸🇷", "Svalbard_&_Jan_Mayen": "🇸🇯", "Sweden": "🇸🇪", "Switzerland": "🇨🇭", "Syria": "🇸🇾", "São_Tomé_&_Príncipe": "🇸🇹", "T-Rex": "🦖", "TOP_arrow": "🔝", "Taiwan": "🇹🇼", "Tajikistan": "🇹🇯", "Tanzania": "🇹🇿", "Taurus": "♉", "Thailand": "🇹🇭", "Timor-Leste": "🇹🇱", "Togo": "🇹🇬", "Tokelau": "🇹🇰", "Tokyo_tower": "🗼", "Tonga": "🇹🇴", "Trinidad_&_Tobago": "🇹🇹", "Tristan_da_Cunha": "🇹🇦", "Tunisia": "🇹🇳", "Turkey": "🇹🇷", "Turkmenistan": "🇹🇲", "Turks_&_Caicos_Islands": "🇹🇨", "Tuvalu": "🇹🇻", "U.S._Outlying_Islands": "🇺🇲", "U.S._Virgin_Islands": "🇻🇮", "UP!_button": "🆙", "Uganda": "🇺🇬", "Ukraine": "🇺🇦", "United_Arab_Emirates": "🇦🇪", "United_Kingdom": "🇬🇧", "United_Nations": "🇺🇳", "United_States": "🇺🇸", "Uruguay": "🇺🇾", "Uzbekistan": "🇺🇿", "VS_button": "🆚", "Vanuatu": "🇻🇺", "Vatican_City": "🇻🇦", "Venezuela": "🇻🇪", "Vietnam": "🇻🇳", "Virgo": "♍", "Wales": "🏴󠁧󠁢󠁷󠁬󠁳󠁿", "Wallis_&_Futuna": "🇼🇫", "Western_Sahara": "🇪🇭", "Yemen": "🇾🇪", "ZZZ": "💤", "Zambia": "🇿🇲", "Zimbabwe": "🇿🇼", "abacus": "🧮", "accordion": "🪗", "adhesive_bandage": "🩹", "admission_tickets": "🎟", "aerial_tramway": "🚡", "airplane": "✈", "airplane_arrival": "🛬", "airplane_departure": "🛫", "alarm_clock": "⏰", "alembic": "⚗", "alien": "👽", "alien_monster": "👾", "ambulance": "🚑", "american_football": "🏈", "amphora": "🏺", "anatomical_heart": "🫀", "anchor": "⚓", "anger_symbol": "💢", "angry_face": "😠", "angry_face_with_horns": "👿", "anguished_face": "😧", "ant": "🐜", "antenna_bars": "📶", "anxious_face_with_sweat": "😰", "articulated_lorry": "🚛", "artist": "🧑‍🎨", "artist_dark_skin_tone": "🧑🏿‍🎨", "artist_light_skin_tone": "🧑🏻‍🎨", "artist_medium-dark_skin_tone": "🧑🏾‍🎨", "artist_medium-light_skin_tone": "🧑🏼‍🎨", "artist_medium_skin_tone": "🧑🏽‍🎨", "artist_palette": "🎨", "astonished_face": "😲", "astronaut": "🧑‍🚀", "astronaut_dark_skin_tone": "🧑🏿‍🚀", "astronaut_light_skin_tone": "🧑🏻‍🚀", "astronaut_medium-dark_skin_tone": "🧑🏾‍🚀", "astronaut_medium-light_skin_tone": "🧑🏼‍🚀", "astronaut_medium_skin_tone": "🧑🏽‍🚀", "atom_symbol": "⚛", "auto_rickshaw": "🛺", "automobile": "🚗", "avocado": "🥑", "axe": "🪓", "baby": "👶", "baby_angel": "👼", "baby_angel_dark_skin_tone": "👼🏿", "baby_angel_light_skin_tone": "👼🏻", "baby_angel_medium-dark_skin_tone": "👼🏾", "baby_angel_medium-light_skin_tone": "👼🏼", "baby_angel_medium_skin_tone": "👼🏽", "baby_bottle": "🍼", "baby_chick": "🐤", "baby_dark_skin_tone": "👶🏿", "baby_light_skin_tone": "👶🏻", "baby_medium-dark_skin_tone": "👶🏾", "baby_medium-light_skin_tone": "👶🏼", "baby_medium_skin_tone": "👶🏽", "baby_symbol": "🚼", "backhand_index_pointing_down": "👇", "backhand_index_pointing_down_dark_skin_tone": "👇🏿", "backhand_index_pointing_down_light_skin_tone": "👇🏻", "backhand_index_pointing_down_medium-dark_skin_tone": "👇🏾", "backhand_index_pointing_down_medium-light_skin_tone": "👇🏼", "backhand_index_pointing_down_medium_skin_tone": "👇🏽", "backhand_index_pointing_left": "👈", "backhand_index_pointing_left_dark_skin_tone": "👈🏿", "backhand_index_pointing_left_light_skin_tone": "👈🏻", "backhand_index_pointing_left_medium-dark_skin_tone": "👈🏾", "backhand_index_pointing_left_medium-light_skin_tone": "👈🏼", "backhand_index_pointing_left_medium_skin_tone": "👈🏽", "backhand_index_pointing_right": "👉", "backhand_index_pointing_right_dark_skin_tone": "👉🏿", "backhand_index_pointing_right_light_skin_tone": "👉🏻", "backhand_index_pointing_right_medium-dark_skin_tone": "👉🏾", "backhand_index_pointing_right_medium-light_skin_tone": "👉🏼", "backhand_index_pointing_right_medium_skin_tone": "👉🏽", "backhand_index_pointing_up": "👆", "backhand_index_pointing_up_dark_skin_tone": "👆🏿", "backhand_index_pointing_up_light_skin_tone": "👆🏻", "backhand_index_pointing_up_medium-dark_skin_tone": "👆🏾", "backhand_index_pointing_up_medium-light_skin_tone": "👆🏼", "backhand_index_pointing_up_medium_skin_tone": "👆🏽", "backpack": "🎒", "bacon": "🥓", "badger": "🦡", "badminton": "🏸", "bagel": "🥯", "baggage_claim": "🛄", "baguette_bread": "🥖", "balance_scale": "⚖", "bald": "🦲", "ballet_shoes": "🩰", "balloon": "🎈", "ballot_box_with_ballot": "🗳", "banana": "🍌", "banjo": "🪕", "bank": "🏦", "bar_chart": "📊", "barber_pole": "💈", "baseball": "⚾", "basket": "🧺", "basketball": "🏀", "bat": "🦇", "bathtub": "🛁", "battery": "🔋", "beach_with_umbrella": "🏖", "beaming_face_with_smiling_eyes": "😁", "beans": "🫘", "bear": "🐻", "beating_heart": "💓", "beaver": "🦫", "bed": "🛏", "beer_mug": "🍺", "beetle": "🪲", "bell": "🔔", "bell_pepper": "🫑", "bell_with_slash": "🔕", "bellhop_bell": "🛎", "bento_box": "🍱", "beverage_box": "🧃", "bicycle": "🚲", "bikini": "👙", "billed_cap": "🧢", "biohazard": "☣", "bird": "🐦", "birthday_cake": "🎂", "bison": "🦬", "biting_lip": "🫦", "black_bird": "🐦‍⬛", "black_cat": "🐈‍⬛", "black_circle": "⚫", "black_flag": "🏴", "black_heart": "🖤", "black_large_square": "⬛", "black_medium-small_square": "◾", "black_medium_square": "◼", "black_nib": "✒", "black_small_square": "▪", "black_square_button": "🔲", "blossom": "🌼", "blowfish": "🐡", "blue_book": "📘", "blue_circle": "🔵", "blue_heart": "💙", "blue_square": "🟦", "blueberries": "🫐", "boar": "🐗", "bomb": "💣", "bone": "🦴", "bookmark": "🔖", "bookmark_tabs": "📑", "books": "📚", "boomerang": "🪃", "bottle_with_popping_cork": "🍾", "bouquet": "💐", "bow_and_arrow": "🏹", "bowl_with_spoon": "🥣", "bowling": "🎳", "boxing_glove": "🥊", "boy": "👦", "boy_dark_skin_tone": "👦🏿", "boy_light_skin_tone": "👦🏻", "boy_medium-dark_skin_tone": "👦🏾", "boy_medium-light_skin_tone": "👦🏼", "boy_medium_skin_tone": "👦🏽", "brain": "🧠", "bread": "🍞", "breast-feeding": "🤱", "breast-feeding_dark_skin_tone": "🤱🏿", "breast-feeding_light_skin_tone": "🤱🏻", "breast-feeding_medium-dark_skin_tone": "🤱🏾", "breast-feeding_medium-light_skin_tone": "🤱🏼", "breast-feeding_medium_skin_tone": "🤱🏽", "brick": "🧱", "bridge_at_night": "🌉", "briefcase": "💼", "briefs": "🩲", "bright_button": "🔆", "broccoli": "🥦", "broken_heart": "💔", "broom": "🧹", "brown_circle": "🟤", "brown_heart": "🤎", "brown_square": "🟫", "bubble_tea": "🧋", "bubbles": "🫧", "bucket": "🪣", "bug": "🐛", "building_construction": "🏗", "bullet_train": "🚅", "bullseye": "🎯", "burrito": "🌯", "bus": "🚌", "bus_stop": "🚏", "bust_in_silhouette": "👤", "busts_in_silhouette": "👥", "butter": "🧈", "butterfly": "🦋", "cactus": "🌵", "calendar": "📅", "call_me_hand": "🤙", "call_me_hand_dark_skin_tone": "🤙🏿", "call_me_hand_light_skin_tone": "🤙🏻", "call_me_hand_medium-dark_skin_tone": "🤙🏾", "call_me_hand_medium-light_skin_tone": "🤙🏼", "call_me_hand_medium_skin_tone": "🤙🏽", "camel": "🐪", "camera": "📷", "camera_with_flash": "📸", "camping": "🏕", "candle": "🕯", "candy": "🍬", "canned_food": "🥫", "canoe": "🛶", "card_file_box": "🗃", "card_index": "📇", "card_index_dividers": "🗂", "carousel_horse": "🎠", "carp_streamer": "🎏", "carpentry_saw": "🪚", "carrot": "🥕", "castle": "🏰", "cat": "🐈", "cat_face": "🐱", "cat_with_tears_of_joy": "😹", "cat_with_wry_smile": "😼", "chains": "⛓", "chair": "🪑", "chart_decreasing": "📉", "chart_increasing": "📈", "chart_increasing_with_yen": "💹", "check_box_with_check": "☑", "check_mark": "✔", "check_mark_button": "✅", "cheese_wedge": "🧀", "chequered_flag": "🏁", "cherries": "🍒", "cherry_blossom": "🌸", "chess_pawn": "♟", "chestnut": "🌰", "chicken": "🐔", "child": "🧒", "child_dark_skin_tone": "🧒🏿", "child_light_skin_tone": "🧒🏻", "child_medium-dark_skin_tone": "🧒🏾", "child_medium-light_skin_tone": "🧒🏼", "child_medium_skin_tone": "🧒🏽", "children_crossing": "🚸", "chipmunk": "🐿", "chocolate_bar": "🍫", "chopsticks": "🥢", "church": "⛪", "cigarette": "🚬", "cinema": "🎦", "circled_M": "Ⓜ", "circus_tent": "🎪", "cityscape": "🏙", "cityscape_at_dusk": "🌆", "clamp": "🗜", "clapper_board": "🎬", "clapping_hands": "👏", "clapping_hands_dark_skin_tone": "👏🏿", "clapping_hands_light_skin_tone": "👏🏻", "clapping_hands_medium-dark_skin_tone": "👏🏾", "clapping_hands_medium-light_skin_tone": "👏🏼", "clapping_hands_medium_skin_tone": "👏🏽", "classical_building": "🏛", "clinking_beer_mugs": "🍻", "clinking_glasses": "🥂", "clipboard": "📋", "clockwise_vertical_arrows": "🔃", "closed_book": "📕", "closed_mailbox_with_lowered_flag": "📪", "closed_mailbox_with_raised_flag": "📫", "closed_umbrella": "🌂", "cloud": "☁", "cloud_with_lightning": "🌩", "cloud_with_lightning_and_rain": "⛈", "cloud_with_rain": "🌧", "cloud_with_snow": "🌨", "clown_face": "🤡", "club_suit": "♣", "clutch_bag": "👝", "coat": "🧥", "cockroach": "🪳", "cocktail_glass": "🍸", "coconut": "🥥", "coffin": "⚰", "coin": "🪙", "cold_face": "🥶", "collision": "💥", "comet": "☄", "compass": "🧭", "computer_disk": "💽", "computer_mouse": "🖱", "confetti_ball": "🎊", "confounded_face": "😖", "confused_face": "😕", "construction": "🚧", "construction_worker": "👷", "construction_worker_dark_skin_tone": "👷🏿", "construction_worker_light_skin_tone": "👷🏻", "construction_worker_medium-dark_skin_tone": "👷🏾", "construction_worker_medium-light_skin_tone": "👷🏼", "construction_worker_medium_skin_tone": "👷🏽", "control_knobs": "🎛", "convenience_store": "🏪", "cook": "🧑‍🍳", "cook_dark_skin_tone": "🧑🏿‍🍳", "cook_light_skin_tone": "🧑🏻‍🍳", "cook_medium-dark_skin_tone": "🧑🏾‍🍳", "cook_medium-light_skin_tone": "🧑🏼‍🍳", "cook_medium_skin_tone": "🧑🏽‍🍳", "cooked_rice": "🍚", "cookie": "🍪", "cooking": "🍳", "copyright": "©", "coral": "🪸", "couch_and_lamp": "🛋", "counterclockwise_arrows_button": "🔄", "couple_with_heart": "💑", "couple_with_heart_dark_skin_tone": "💑🏿", "couple_with_heart_light_skin_tone": "💑🏻", "couple_with_heart_man_man": "👨‍❤‍👨", "couple_with_heart_man_man_dark_skin_tone": "👨🏿‍❤‍👨🏿", "couple_with_heart_man_man_dark_skin_tone_light_skin_tone": "👨🏿‍❤‍👨🏻", ( "couple_with_heart_man_man_dark_skin_tone_medium-dark_skin_tone" ): "👨🏿‍❤‍👨🏾", ( "couple_with_heart_man_man_dark_skin_tone_medium-light_skin_tone" ): "👨🏿‍❤‍👨🏼", "couple_with_heart_man_man_dark_skin_tone_medium_skin_tone": "👨🏿‍❤‍👨🏽", "couple_with_heart_man_man_light_skin_tone": "👨🏻‍❤‍👨🏻", "couple_with_heart_man_man_light_skin_tone_dark_skin_tone": "👨🏻‍❤‍👨🏿", ( "couple_with_heart_man_man_light_skin_tone_medium-dark_skin_tone" ): "👨🏻‍❤‍👨🏾", ( "couple_with_heart_man_man_light_skin_tone_medium-light_skin_tone" ): "👨🏻‍❤‍👨🏼", "couple_with_heart_man_man_light_skin_tone_medium_skin_tone": "👨🏻‍❤‍👨🏽", "couple_with_heart_man_man_medium-dark_skin_tone": "👨🏾‍❤‍👨🏾", ( "couple_with_heart_man_man_medium-dark_skin_tone_dark_skin_tone" ): "👨🏾‍❤‍👨🏿", ( "couple_with_heart_man_man_medium-dark_skin_tone_light_skin_tone" ): "👨🏾‍❤‍👨🏻", ( "couple_with_heart_man_man_medium" "-dark_skin_tone_medium-light_skin_tone" ): "👨🏾‍❤‍👨🏼", ( "couple_with_heart_man_man_medium-dark_skin_tone_medium_skin_tone" ): "👨🏾‍❤‍👨🏽", "couple_with_heart_man_man_medium-light_skin_tone": "👨🏼‍❤‍👨🏼", ( "couple_with_heart_man_man_medium-light_skin_tone_dark_skin_tone" ): "👨🏼‍❤‍👨🏿", ( "couple_with_heart_man_man_medium-light_skin_tone_light_skin_tone" ): "👨🏼‍❤‍👨🏻", ( "couple_with_heart_man_man_medium" "-light_skin_tone_medium-dark_skin_tone" ): "👨🏼‍❤‍👨🏾", ( "couple_with_heart_man_man_medium-light_skin_tone_medium_skin_tone" ): "👨🏼‍❤‍👨🏽", "couple_with_heart_man_man_medium_skin_tone": "👨🏽‍❤‍👨🏽", "couple_with_heart_man_man_medium_skin_tone_dark_skin_tone": "👨🏽‍❤‍👨🏿", "couple_with_heart_man_man_medium_skin_tone_light_skin_tone": "👨🏽‍❤‍👨🏻", ( "couple_with_heart_man_man_medium_skin_tone_medium-dark_skin_tone" ): "👨🏽‍❤‍👨🏾", ( "couple_with_heart_man_man_medium_skin_tone_medium-light_skin_tone" ): "👨🏽‍❤‍👨🏼", "couple_with_heart_medium-dark_skin_tone": "💑🏾", "couple_with_heart_medium-light_skin_tone": "💑🏼", "couple_with_heart_medium_skin_tone": "💑🏽", ( "couple_with_heart_person_person_dark_skin_tone_light_skin_tone" ): "🧑🏿‍❤‍🧑🏻", ( "couple_with_heart_person_person_dark_skin_tone_medium-dark_skin_tone" ): "🧑🏿‍❤‍🧑🏾", ( "couple_with_heart_person_person_dark_skin_tone_medium-light_skin_tone" ): "🧑🏿‍❤‍🧑🏼", ( "couple_with_heart_person_person_dark_skin_tone_medium_skin_tone" ): "🧑🏿‍❤‍🧑🏽", ( "couple_with_heart_person_person_light_skin_tone_dark_skin_tone" ): "🧑🏻‍❤‍🧑🏿", ( "couple_with_heart_person_person_light_skin_tone_medium-dark_skin_tone" ): "🧑🏻‍❤‍🧑🏾", ( "couple_with_heart_person_person_" "light_skin_tone_medium-light_skin_tone" ): "🧑🏻‍❤‍🧑🏼", ( "couple_with_heart_person_person_light_skin_tone_medium_skin_tone" ): "🧑🏻‍❤‍🧑🏽", ( "couple_with_heart_person_person_medium-dark_skin_tone_dark_skin_tone" ): "🧑🏾‍❤‍🧑🏿", ( "couple_with_heart_person_person_medium-dark_skin_tone_light_skin_tone" ): "🧑🏾‍❤‍🧑🏻", ( "couple_with_heart_person_person_medium" "-dark_skin_tone_medium-light_skin_tone" ): "🧑🏾‍❤‍🧑🏼", ( "couple_with_heart_person_person" "_medium-dark_skin_tone_medium_skin_tone" ): "🧑🏾‍❤‍🧑🏽", ( "couple_with_heart_person_person_medium-light_skin_tone_dark_skin_tone" ): "🧑🏼‍❤‍🧑🏿", ( "couple_with_heart_person_person" "_medium-light_skin_tone_light_skin_tone" ): "🧑🏼‍❤‍🧑🏻", ( "couple_with_heart_person_person_medium" "-light_skin_tone_medium-dark_skin_tone" ): "🧑🏼‍❤‍🧑🏾", ( "couple_with_heart_person_person" "_medium-light_skin_tone_medium_skin_tone" ): "🧑🏼‍❤‍🧑🏽", ( "couple_with_heart_person_person_medium_skin_tone_dark_skin_tone" ): "🧑🏽‍❤‍🧑🏿", ( "couple_with_heart_person_person_medium_skin_tone_light_skin_tone" ): "🧑🏽‍❤‍🧑🏻", ( "couple_with_heart_person_person" "_medium_skin_tone_medium-dark_skin_tone" ): "🧑🏽‍❤‍🧑🏾", ( "couple_with_heart_person_person" "_medium_skin_tone_medium-light_skin_tone" ): "🧑🏽‍❤‍🧑🏼", "couple_with_heart_woman_man": "👩‍❤‍👨", "couple_with_heart_woman_man_dark_skin_tone": "👩🏿‍❤‍👨🏿", "couple_with_heart_woman_man_dark_skin_tone_light_skin_tone": "👩🏿‍❤‍👨🏻", ( "couple_with_heart_woman_man_dark_skin_tone_medium-dark_skin_tone" ): "👩🏿‍❤‍👨🏾", ( "couple_with_heart_woman_man_dark_skin_tone_medium-light_skin_tone" ): "👩🏿‍❤‍👨🏼", "couple_with_heart_woman_man_dark_skin_tone_medium_skin_tone": "👩🏿‍❤‍👨🏽", "couple_with_heart_woman_man_light_skin_tone": "👩🏻‍❤‍👨🏻", "couple_with_heart_woman_man_light_skin_tone_dark_skin_tone": "👩🏻‍❤‍👨🏿", ( "couple_with_heart_woman_man_light_skin_tone_medium-dark_skin_tone" ): "👩🏻‍❤‍👨🏾", ( "couple_with_heart_woman_man_light_skin_tone_medium-light_skin_tone" ): "👩🏻‍❤‍👨🏼", ( "couple_with_heart_woman_man_light_skin_tone_medium_skin_tone" ): "👩🏻‍❤‍👨🏽", "couple_with_heart_woman_man_medium-dark_skin_tone": "👩🏾‍❤‍👨🏾", ( "couple_with_heart_woman_man_medium-dark_skin_tone_dark_skin_tone" ): "👩🏾‍❤‍👨🏿", ( "couple_with_heart_woman_man_medium-dark_skin_tone_light_skin_tone" ): "👩🏾‍❤‍👨🏻", ( "couple_with_heart_woman_man_medium" "-dark_skin_tone_medium-light_skin_tone" ): "👩🏾‍❤‍👨🏼", ( "couple_with_heart_woman_man_medium-dark_skin_tone_medium_skin_tone" ): "👩🏾‍❤‍👨🏽", "couple_with_heart_woman_man_medium-light_skin_tone": "👩🏼‍❤‍👨🏼", ( "couple_with_heart_woman_man_medium-light_skin_tone_dark_skin_tone" ): "👩🏼‍❤‍👨🏿", ( "couple_with_heart_woman_man_medium-light_skin_tone_light_skin_tone" ): "👩🏼‍❤‍👨🏻", ( "couple_with_heart_woman_man_medium" "-light_skin_tone_medium-dark_skin_tone" ): "👩🏼‍❤‍👨🏾", ( "couple_with_heart_woman_man_medium-light_skin_tone_medium_skin_tone" ): "👩🏼‍❤‍👨🏽", "couple_with_heart_woman_man_medium_skin_tone": "👩🏽‍❤‍👨🏽", "couple_with_heart_woman_man_medium_skin_tone_dark_skin_tone": "👩🏽‍❤‍👨🏿", ( "couple_with_heart_woman_man_medium_skin_tone_light_skin_tone" ): "👩🏽‍❤‍👨🏻", ( "couple_with_heart_woman_man_medium_skin_tone_medium-dark_skin_tone" ): "👩🏽‍❤‍👨🏾", ( "couple_with_heart_woman_man_medium_skin_tone_medium-light_skin_tone" ): "👩🏽‍❤‍👨🏼", "couple_with_heart_woman_woman": "👩‍❤‍👩", "couple_with_heart_woman_woman_dark_skin_tone": "👩🏿‍❤‍👩🏿", ( "couple_with_heart_woman_woman_dark_skin_tone_light_skin_tone" ): "👩🏿‍❤‍👩🏻", ( "couple_with_heart_woman_woman_dark_skin_tone_medium-dark_skin_tone" ): "👩🏿‍❤‍👩🏾", ( "couple_with_heart_woman_woman_dark_skin_tone_medium-light_skin_tone" ): "👩🏿‍❤‍👩🏼", ( "couple_with_heart_woman_woman_dark_skin_tone_medium_skin_tone" ): "👩🏿‍❤‍👩🏽", "couple_with_heart_woman_woman_light_skin_tone": "👩🏻‍❤‍👩🏻", ( "couple_with_heart_woman_woman_light_skin_tone_dark_skin_tone" ): "👩🏻‍❤‍👩🏿", ( "couple_with_heart_woman_woman_light_skin_tone_medium-dark_skin_tone" ): "👩🏻‍❤‍👩🏾", ( "couple_with_heart_woman_woman_light_skin_tone_medium-light_skin_tone" ): "👩🏻‍❤‍👩🏼", ( "couple_with_heart_woman_woman_light_skin_tone_medium_skin_tone" ): "👩🏻‍❤‍👩🏽", "couple_with_heart_woman_woman_medium-dark_skin_tone": "👩🏾‍❤‍👩🏾", ( "couple_with_heart_woman_woman_medium-dark_skin_tone_dark_skin_tone" ): "👩🏾‍❤‍👩🏿", ( "couple_with_heart_woman_woman_medium-dark_skin_tone_light_skin_tone" ): "👩🏾‍❤‍👩🏻", ( "couple_with_heart_woman_woman_medium" "-dark_skin_tone_medium-light_skin_tone" ): "👩🏾‍❤‍👩🏼", ( "couple_with_heart_woman_woman_medium-dark_skin_tone_medium_skin_tone" ): "👩🏾‍❤‍👩🏽", "couple_with_heart_woman_woman_medium-light_skin_tone": "👩🏼‍❤‍👩🏼", ( "couple_with_heart_woman_woman_medium-light_skin_tone_dark_skin_tone" ): "👩🏼‍❤‍👩🏿", ( "couple_with_heart_woman_woman_medium-light_skin_tone_light_skin_tone" ): "👩🏼‍❤‍👩🏻", ( "couple_with_heart_woman_woman_medium" "-light_skin_tone_medium-dark_skin_tone" ): "👩🏼‍❤‍👩🏾", ( "couple_with_heart_woman_woman_medium-light_skin_tone_medium_skin_tone" ): "👩🏼‍❤‍👩🏽", "couple_with_heart_woman_woman_medium_skin_tone": "👩🏽‍❤‍👩🏽", ( "couple_with_heart_woman_woman_medium_skin_tone_dark_skin_tone" ): "👩🏽‍❤‍👩🏿", ( "couple_with_heart_woman_woman_medium_skin_tone_light_skin_tone" ): "👩🏽‍❤‍👩🏻", ( "couple_with_heart_woman_woman_medium_skin_tone_medium-dark_skin_tone" ): "👩🏽‍❤‍👩🏾", ( "couple_with_heart_woman_woman_medium_skin_tone_medium-light_skin_tone" ): "👩🏽‍❤‍👩🏼", "cow": "🐄", "cow_face": "🐮", "cowboy_hat_face": "🤠", "crab": "🦀", "crayon": "🖍", "credit_card": "💳", "crescent_moon": "🌙", "cricket": "🦗", "cricket_game": "🏏", "crocodile": "🐊", "croissant": "🥐", "cross_mark": "❌", "cross_mark_button": "❎", "crossed_fingers": "🤞", "crossed_fingers_dark_skin_tone": "🤞🏿", "crossed_fingers_light_skin_tone": "🤞🏻", "crossed_fingers_medium-dark_skin_tone": "🤞🏾", "crossed_fingers_medium-light_skin_tone": "🤞🏼", "crossed_fingers_medium_skin_tone": "🤞🏽", "crossed_flags": "🎌", "crossed_swords": "⚔", "crown": "👑", "crutch": "🩼", "crying_cat": "😿", "crying_face": "😢", "crystal_ball": "🔮", "cucumber": "🥒", "cup_with_straw": "🥤", "cupcake": "🧁", "curling_stone": "🥌", "curly_hair": "🦱", "curly_loop": "➰", "currency_exchange": "💱", "curry_rice": "🍛", "custard": "🍮", "customs": "🛃", "cut_of_meat": "🥩", "cyclone": "🌀", "dagger": "🗡", "dango": "🍡", "dark_skin_tone": "🏿", "dashing_away": "💨", "deaf_man": "🧏‍♂", "deaf_man_dark_skin_tone": "🧏🏿‍♂", "deaf_man_light_skin_tone": "🧏🏻‍♂", "deaf_man_medium-dark_skin_tone": "🧏🏾‍♂", "deaf_man_medium-light_skin_tone": "🧏🏼‍♂", "deaf_man_medium_skin_tone": "🧏🏽‍♂", "deaf_person": "🧏", "deaf_person_dark_skin_tone": "🧏🏿", "deaf_person_light_skin_tone": "🧏🏻", "deaf_person_medium-dark_skin_tone": "🧏🏾", "deaf_person_medium-light_skin_tone": "🧏🏼", "deaf_person_medium_skin_tone": "🧏🏽", "deaf_woman": "🧏‍♀", "deaf_woman_dark_skin_tone": "🧏🏿‍♀", "deaf_woman_light_skin_tone": "🧏🏻‍♀", "deaf_woman_medium-dark_skin_tone": "🧏🏾‍♀", "deaf_woman_medium-light_skin_tone": "🧏🏼‍♀", "deaf_woman_medium_skin_tone": "🧏🏽‍♀", "deciduous_tree": "🌳", "deer": "🦌", "delivery_truck": "🚚", "department_store": "🏬", "derelict_house": "🏚", "desert": "🏜", "desert_island": "🏝", "desktop_computer": "🖥", "detective": "🕵", "detective_dark_skin_tone": "🕵🏿", "detective_light_skin_tone": "🕵🏻", "detective_medium-dark_skin_tone": "🕵🏾", "detective_medium-light_skin_tone": "🕵🏼", "detective_medium_skin_tone": "🕵🏽", "diamond_suit": "♦", "diamond_with_a_dot": "💠", "dim_button": "🔅", "disappointed_face": "😞", "disguised_face": "🥸", "divide": "➗", "diving_mask": "🤿", "diya_lamp": "🪔", "dizzy": "💫", "dna": "🧬", "dodo": "🦤", "dog": "🐕", "dog_face": "🐶", "dollar_banknote": "💵", "dolphin": "🐬", "donkey": "🫏", "door": "🚪", "dotted_line_face": "🫥", "dotted_six-pointed_star": "🔯", "double_curly_loop": "➿", "double_exclamation_mark": "‼", "doughnut": "🍩", "dove": "🕊", "down-left_arrow": "↙", "down-right_arrow": "↘", "down_arrow": "⬇", "downcast_face_with_sweat": "😓", "downwards_button": "🔽", "dragon": "🐉", "dragon_face": "🐲", "dress": "👗", "drooling_face": "🤤", "drop_of_blood": "🩸", "droplet": "💧", "drum": "🥁", "duck": "🦆", "dumpling": "🥟", "dvd": "📀", "e-mail": "📧", "eagle": "🦅", "ear": "👂", "ear_dark_skin_tone": "👂🏿", "ear_light_skin_tone": "👂🏻", "ear_medium-dark_skin_tone": "👂🏾", "ear_medium-light_skin_tone": "👂🏼", "ear_medium_skin_tone": "👂🏽", "ear_of_corn": "🌽", "ear_with_hearing_aid": "🦻", "ear_with_hearing_aid_dark_skin_tone": "🦻🏿", "ear_with_hearing_aid_light_skin_tone": "🦻🏻", "ear_with_hearing_aid_medium-dark_skin_tone": "🦻🏾", "ear_with_hearing_aid_medium-light_skin_tone": "🦻🏼", "ear_with_hearing_aid_medium_skin_tone": "🦻🏽", "egg": "🥚", "eggplant": "🍆", "eight-pointed_star": "✴", "eight-spoked_asterisk": "✳", "eight-thirty": "🕣", "eight_o’clock": "🕗", "eject_button": "⏏", "electric_plug": "🔌", "elephant": "🐘", "elevator": "🛗", "eleven-thirty": "🕦", "eleven_o’clock": "🕚", "elf": "🧝", "elf_dark_skin_tone": "🧝🏿", "elf_light_skin_tone": "🧝🏻", "elf_medium-dark_skin_tone": "🧝🏾", "elf_medium-light_skin_tone": "🧝🏼", "elf_medium_skin_tone": "🧝🏽", "empty_nest": "🪹", "enraged_face": "😡", "envelope": "✉", "envelope_with_arrow": "📩", "euro_banknote": "💶", "evergreen_tree": "🌲", "ewe": "🐑", "exclamation_question_mark": "⁉", "exploding_head": "🤯", "expressionless_face": "😑", "eye": "👁", "eye_in_speech_bubble": "👁‍🗨", "eyes": "👀", "face_blowing_a_kiss": "😘", "face_exhaling": "😮‍💨", "face_holding_back_tears": "🥹", "face_in_clouds": "😶‍🌫", "face_savoring_food": "😋", "face_screaming_in_fear": "😱", "face_vomiting": "🤮", "face_with_crossed-out_eyes": "😵", "face_with_diagonal_mouth": "🫤", "face_with_hand_over_mouth": "🤭", "face_with_head-bandage": "🤕", "face_with_medical_mask": "😷", "face_with_monocle": "🧐", "face_with_open_eyes_and_hand_over_mouth": "🫢", "face_with_open_mouth": "😮", "face_with_peeking_eye": "🫣", "face_with_raised_eyebrow": "🤨", "face_with_rolling_eyes": "🙄", "face_with_spiral_eyes": "😵‍💫", "face_with_steam_from_nose": "😤", "face_with_symbols_on_mouth": "🤬", "face_with_tears_of_joy": "😂", "face_with_thermometer": "🤒", "face_with_tongue": "😛", "face_without_mouth": "😶", "factory": "🏭", "factory_worker": "🧑‍🏭", "factory_worker_dark_skin_tone": "🧑🏿‍🏭", "factory_worker_light_skin_tone": "🧑🏻‍🏭", "factory_worker_medium-dark_skin_tone": "🧑🏾‍🏭", "factory_worker_medium-light_skin_tone": "🧑🏼‍🏭", "factory_worker_medium_skin_tone": "🧑🏽‍🏭", "fairy": "🧚", "fairy_dark_skin_tone": "🧚🏿", "fairy_light_skin_tone": "🧚🏻", "fairy_medium-dark_skin_tone": "🧚🏾", "fairy_medium-light_skin_tone": "🧚🏼", "fairy_medium_skin_tone": "🧚🏽", "falafel": "🧆", "fallen_leaf": "🍂", "family": "👪", "family_man_boy": "👨‍👦", "family_man_boy_boy": "👨‍👦‍👦", "family_man_girl": "👨‍👧", "family_man_girl_boy": "👨‍👧‍👦", "family_man_girl_girl": "👨‍👧‍👧", "family_man_man_boy": "👨‍👨‍👦", "family_man_man_boy_boy": "👨‍👨‍👦‍👦", "family_man_man_girl": "👨‍👨‍👧", "family_man_man_girl_boy": "👨‍👨‍👧‍👦", "family_man_man_girl_girl": "👨‍👨‍👧‍👧", "family_man_woman_boy": "👨‍👩‍👦", "family_man_woman_boy_boy": "👨‍👩‍👦‍👦", "family_man_woman_girl": "👨‍👩‍👧", "family_man_woman_girl_boy": "👨‍👩‍👧‍👦", "family_man_woman_girl_girl": "👨‍👩‍👧‍👧", "family_woman_boy": "👩‍👦", "family_woman_boy_boy": "👩‍👦‍👦", "family_woman_girl": "👩‍👧", "family_woman_girl_boy": "👩‍👧‍👦", "family_woman_girl_girl": "👩‍👧‍👧", "family_woman_woman_boy": "👩‍👩‍👦", "family_woman_woman_boy_boy": "👩‍👩‍👦‍👦", "family_woman_woman_girl": "👩‍👩‍👧", "family_woman_woman_girl_boy": "👩‍👩‍👧‍👦", "family_woman_woman_girl_girl": "👩‍👩‍👧‍👧", "farmer": "🧑‍🌾", "farmer_dark_skin_tone": "🧑🏿‍🌾", "farmer_light_skin_tone": "🧑🏻‍🌾", "farmer_medium-dark_skin_tone": "🧑🏾‍🌾", "farmer_medium-light_skin_tone": "🧑🏼‍🌾", "farmer_medium_skin_tone": "🧑🏽‍🌾", "fast-forward_button": "⏩", "fast_down_button": "⏬", "fast_reverse_button": "⏪", "fast_up_button": "⏫", "fax_machine": "📠", "fearful_face": "😨", "feather": "🪶", "female_sign": "♀", "ferris_wheel": "🎡", "ferry": "⛴", "field_hockey": "🏑", "file_cabinet": "🗄", "file_folder": "📁", "film_frames": "🎞", "film_projector": "📽", "fire": "🔥", "fire_engine": "🚒", "fire_extinguisher": "🧯", "firecracker": "🧨", "firefighter": "🧑‍🚒", "firefighter_dark_skin_tone": "🧑🏿‍🚒", "firefighter_light_skin_tone": "🧑🏻‍🚒", "firefighter_medium-dark_skin_tone": "🧑🏾‍🚒", "firefighter_medium-light_skin_tone": "🧑🏼‍🚒", "firefighter_medium_skin_tone": "🧑🏽‍🚒", "fireworks": "🎆", "first_quarter_moon": "🌓", "first_quarter_moon_face": "🌛", "fish": "🐟", "fish_cake_with_swirl": "🍥", "fishing_pole": "🎣", "five-thirty": "🕠", "five_o’clock": "🕔", "flag_in_hole": "⛳", "flamingo": "🦩", "flashlight": "🔦", "flat_shoe": "🥿", "flatbread": "🫓", "fleur-de-lis": "⚜", "flexed_biceps": "💪", "flexed_biceps_dark_skin_tone": "💪🏿", "flexed_biceps_light_skin_tone": "💪🏻", "flexed_biceps_medium-dark_skin_tone": "💪🏾", "flexed_biceps_medium-light_skin_tone": "💪🏼", "flexed_biceps_medium_skin_tone": "💪🏽", "floppy_disk": "💾", "flower_playing_cards": "🎴", "flushed_face": "😳", "flute": "🪈", "fly": "🪰", "flying_disc": "🥏", "flying_saucer": "🛸", "fog": "🌫", "foggy": "🌁", "folded_hands": "🙏", "folded_hands_dark_skin_tone": "🙏🏿", "folded_hands_light_skin_tone": "🙏🏻", "folded_hands_medium-dark_skin_tone": "🙏🏾", "folded_hands_medium-light_skin_tone": "🙏🏼", "folded_hands_medium_skin_tone": "🙏🏽", "folding_hand_fan": "🪭", "fondue": "🫕", "foot": "🦶", "foot_dark_skin_tone": "🦶🏿", "foot_light_skin_tone": "🦶🏻", "foot_medium-dark_skin_tone": "🦶🏾", "foot_medium-light_skin_tone": "🦶🏼", "foot_medium_skin_tone": "🦶🏽", "footprints": "👣", "fork_and_knife": "🍴", "fork_and_knife_with_plate": "🍽", "fortune_cookie": "🥠", "fountain": "⛲", "fountain_pen": "🖋", "four-thirty": "🕟", "four_leaf_clover": "🍀", "four_o’clock": "🕓", "fox": "🦊", "framed_picture": "🖼", "french_fries": "🍟", "fried_shrimp": "🍤", "frog": "🐸", "front-facing_baby_chick": "🐥", "frowning_face": "☹", "frowning_face_with_open_mouth": "😦", "fuel_pump": "⛽", "full_moon": "🌕", "full_moon_face": "🌝", "funeral_urn": "⚱", "game_die": "🎲", "garlic": "🧄", "gear": "⚙", "gem_stone": "💎", "genie": "🧞", "ghost": "👻", "ginger_root": "🫚", "giraffe": "🦒", "girl": "👧", "girl_dark_skin_tone": "👧🏿", "girl_light_skin_tone": "👧🏻", "girl_medium-dark_skin_tone": "👧🏾", "girl_medium-light_skin_tone": "👧🏼", "girl_medium_skin_tone": "👧🏽", "glass_of_milk": "🥛", "glasses": "👓", "globe_showing_Americas": "🌎", "globe_showing_Asia-Australia": "🌏", "globe_showing_Europe-Africa": "🌍", "globe_with_meridians": "🌐", "gloves": "🧤", "glowing_star": "🌟", "goal_net": "🥅", "goat": "🐐", "goblin": "👺", "goggles": "🥽", "goose": "🪿", "gorilla": "🦍", "graduation_cap": "🎓", "grapes": "🍇", "green_apple": "🍏", "green_book": "📗", "green_circle": "🟢", "green_heart": "💚", "green_salad": "🥗", "green_square": "🟩", "grey_heart": "🩶", "grimacing_face": "😬", "grinning_cat": "😺", "grinning_cat_with_smiling_eyes": "😸", "grinning_face": "😀", "grinning_face_with_big_eyes": "😃", "grinning_face_with_smiling_eyes": "😄", "grinning_face_with_sweat": "😅", "grinning_squinting_face": "😆", "growing_heart": "💗", "guard": "💂", "guard_dark_skin_tone": "💂🏿", "guard_light_skin_tone": "💂🏻", "guard_medium-dark_skin_tone": "💂🏾", "guard_medium-light_skin_tone": "💂🏼", "guard_medium_skin_tone": "💂🏽", "guide_dog": "🦮", "guitar": "🎸", "hair_pick": "🪮", "hamburger": "🍔", "hammer": "🔨", "hammer_and_pick": "⚒", "hammer_and_wrench": "🛠", "hamsa": "🪬", "hamster": "🐹", "hand_with_fingers_splayed": "🖐", "hand_with_fingers_splayed_dark_skin_tone": "🖐🏿", "hand_with_fingers_splayed_light_skin_tone": "🖐🏻", "hand_with_fingers_splayed_medium-dark_skin_tone": "🖐🏾", "hand_with_fingers_splayed_medium-light_skin_tone": "🖐🏼", "hand_with_fingers_splayed_medium_skin_tone": "🖐🏽", "hand_with_index_finger_and_thumb_crossed": "🫰", "hand_with_index_finger_and_thumb_crossed_dark_skin_tone": "🫰🏿", "hand_with_index_finger_and_thumb_crossed_light_skin_tone": "🫰🏻", "hand_with_index_finger_and_thumb_crossed_medium-dark_skin_tone": "🫰🏾", "hand_with_index_finger_and_thumb_crossed_medium-light_skin_tone": "🫰🏼", "hand_with_index_finger_and_thumb_crossed_medium_skin_tone": "🫰🏽", "handbag": "👜", "handshake": "🤝", "handshake_dark_skin_tone": "🤝🏿", "handshake_dark_skin_tone_light_skin_tone": "🫱🏿‍🫲🏻", "handshake_dark_skin_tone_medium-dark_skin_tone": "🫱🏿‍🫲🏾", "handshake_dark_skin_tone_medium-light_skin_tone": "🫱🏿‍🫲🏼", "handshake_dark_skin_tone_medium_skin_tone": "🫱🏿‍🫲🏽", "handshake_light_skin_tone": "🤝🏻", "handshake_light_skin_tone_dark_skin_tone": "🫱🏻‍🫲🏿", "handshake_light_skin_tone_medium-dark_skin_tone": "🫱🏻‍🫲🏾", "handshake_light_skin_tone_medium-light_skin_tone": "🫱🏻‍🫲🏼", "handshake_light_skin_tone_medium_skin_tone": "🫱🏻‍🫲🏽", "handshake_medium-dark_skin_tone": "🤝🏾", "handshake_medium-dark_skin_tone_dark_skin_tone": "🫱🏾‍🫲🏿", "handshake_medium-dark_skin_tone_light_skin_tone": "🫱🏾‍🫲🏻", "handshake_medium-dark_skin_tone_medium-light_skin_tone": "🫱🏾‍🫲🏼", "handshake_medium-dark_skin_tone_medium_skin_tone": "🫱🏾‍🫲🏽", "handshake_medium-light_skin_tone": "🤝🏼", "handshake_medium-light_skin_tone_dark_skin_tone": "🫱🏼‍🫲🏿", "handshake_medium-light_skin_tone_light_skin_tone": "🫱🏼‍🫲🏻", "handshake_medium-light_skin_tone_medium-dark_skin_tone": "🫱🏼‍🫲🏾", "handshake_medium-light_skin_tone_medium_skin_tone": "🫱🏼‍🫲🏽", "handshake_medium_skin_tone": "🤝🏽", "handshake_medium_skin_tone_dark_skin_tone": "🫱🏽‍🫲🏿", "handshake_medium_skin_tone_light_skin_tone": "🫱🏽‍🫲🏻", "handshake_medium_skin_tone_medium-dark_skin_tone": "🫱🏽‍🫲🏾", "handshake_medium_skin_tone_medium-light_skin_tone": "🫱🏽‍🫲🏼", "hatching_chick": "🐣", "headphone": "🎧", "headstone": "🪦", "health_worker": "🧑‍⚕", "health_worker_dark_skin_tone": "🧑🏿‍⚕", "health_worker_light_skin_tone": "🧑🏻‍⚕", "health_worker_medium-dark_skin_tone": "🧑🏾‍⚕", "health_worker_medium-light_skin_tone": "🧑🏼‍⚕", "health_worker_medium_skin_tone": "🧑🏽‍⚕", "hear-no-evil_monkey": "🙉", "heart_decoration": "💟", "heart_exclamation": "❣", "heart_hands": "🫶", "heart_hands_dark_skin_tone": "🫶🏿", "heart_hands_light_skin_tone": "🫶🏻", "heart_hands_medium-dark_skin_tone": "🫶🏾", "heart_hands_medium-light_skin_tone": "🫶🏼", "heart_hands_medium_skin_tone": "🫶🏽", "heart_on_fire": "❤‍🔥", "heart_suit": "♥", "heart_with_arrow": "💘", "heart_with_ribbon": "💝", "heavy_dollar_sign": "💲", "heavy_equals_sign": "🟰", "hedgehog": "🦔", "helicopter": "🚁", "herb": "🌿", "hibiscus": "🌺", "high-heeled_shoe": "👠", "high-speed_train": "🚄", "high_voltage": "⚡", "hiking_boot": "🥾", "hindu_temple": "🛕", "hippopotamus": "🦛", "hole": "🕳", "hollow_red_circle": "⭕", "honey_pot": "🍯", "honeybee": "🐝", "hook": "🪝", "horizontal_traffic_light": "🚥", "horse": "🐎", "horse_face": "🐴", "horse_racing": "🏇", "horse_racing_dark_skin_tone": "🏇🏿", "horse_racing_light_skin_tone": "🏇🏻", "horse_racing_medium-dark_skin_tone": "🏇🏾", "horse_racing_medium-light_skin_tone": "🏇🏼", "horse_racing_medium_skin_tone": "🏇🏽", "hospital": "🏥", "hot_beverage": "☕", "hot_dog": "🌭", "hot_face": "🥵", "hot_pepper": "🌶", "hot_springs": "♨", "hotel": "🏨", "hourglass_done": "⌛", "hourglass_not_done": "⏳", "house": "🏠", "house_with_garden": "🏡", "houses": "🏘", "hundred_points": "💯", "hushed_face": "😯", "hut": "🛖", "hyacinth": "🪻", "ice": "🧊", "ice_cream": "🍨", "ice_hockey": "🏒", "ice_skate": "⛸", "identification_card": "🪪", "inbox_tray": "📥", "incoming_envelope": "📨", "index_pointing_at_the_viewer": "🫵", "index_pointing_at_the_viewer_dark_skin_tone": "🫵🏿", "index_pointing_at_the_viewer_light_skin_tone": "🫵🏻", "index_pointing_at_the_viewer_medium-dark_skin_tone": "🫵🏾", "index_pointing_at_the_viewer_medium-light_skin_tone": "🫵🏼", "index_pointing_at_the_viewer_medium_skin_tone": "🫵🏽", "index_pointing_up": "☝", "index_pointing_up_dark_skin_tone": "☝🏿", "index_pointing_up_light_skin_tone": "☝🏻", "index_pointing_up_medium-dark_skin_tone": "☝🏾", "index_pointing_up_medium-light_skin_tone": "☝🏼", "index_pointing_up_medium_skin_tone": "☝🏽", "infinity": "♾", "information": "ℹ", "input_latin_letters": "🔤", "input_latin_lowercase": "🔡", "input_latin_uppercase": "🔠", "input_numbers": "🔢", "input_symbols": "🔣", "jack-o-lantern": "🎃", "jar": "🫙", "jeans": "👖", "jellyfish": "🪼", "joker": "🃏", "joystick": "🕹", "judge": "🧑‍⚖", "judge_dark_skin_tone": "🧑🏿‍⚖", "judge_light_skin_tone": "🧑🏻‍⚖", "judge_medium-dark_skin_tone": "🧑🏾‍⚖", "judge_medium-light_skin_tone": "🧑🏼‍⚖", "judge_medium_skin_tone": "🧑🏽‍⚖", "kaaba": "🕋", "kangaroo": "🦘", "key": "🔑", "keyboard": "⌨", "keycap_#": "#⃣", "keycap_*": "*⃣", "keycap_0": "0⃣", "keycap_1": "1⃣", "keycap_10": "🔟", "keycap_2": "2⃣", "keycap_3": "3⃣", "keycap_4": "4⃣", "keycap_5": "5⃣", "keycap_6": "6⃣", "keycap_7": "7⃣", "keycap_8": "8⃣", "keycap_9": "9⃣", "khanda": "🪯", "kick_scooter": "🛴", "kimono": "👘", "kiss": "💏", "kiss_dark_skin_tone": "💏🏿", "kiss_light_skin_tone": "💏🏻", "kiss_man_man": "👨‍❤‍💋‍👨", "kiss_man_man_dark_skin_tone": "👨🏿‍❤‍💋‍👨🏿", "kiss_man_man_dark_skin_tone_light_skin_tone": "👨🏿‍❤‍💋‍👨🏻", "kiss_man_man_dark_skin_tone_medium-dark_skin_tone": "👨🏿‍❤‍💋‍👨🏾", "kiss_man_man_dark_skin_tone_medium-light_skin_tone": "👨🏿‍❤‍💋‍👨🏼", "kiss_man_man_dark_skin_tone_medium_skin_tone": "👨🏿‍❤‍💋‍👨🏽", "kiss_man_man_light_skin_tone": "👨🏻‍❤‍💋‍👨🏻", "kiss_man_man_light_skin_tone_dark_skin_tone": "👨🏻‍❤‍💋‍👨🏿", "kiss_man_man_light_skin_tone_medium-dark_skin_tone": "👨🏻‍❤‍💋‍👨🏾", "kiss_man_man_light_skin_tone_medium-light_skin_tone": "👨🏻‍❤‍💋‍👨🏼", "kiss_man_man_light_skin_tone_medium_skin_tone": "👨🏻‍❤‍💋‍👨🏽", "kiss_man_man_medium-dark_skin_tone": "👨🏾‍❤‍💋‍👨🏾", "kiss_man_man_medium-dark_skin_tone_dark_skin_tone": "👨🏾‍❤‍💋‍👨🏿", "kiss_man_man_medium-dark_skin_tone_light_skin_tone": "👨🏾‍❤‍💋‍👨🏻", "kiss_man_man_medium-dark_skin_tone_medium-light_skin_tone": "👨🏾‍❤‍💋‍👨🏼", "kiss_man_man_medium-dark_skin_tone_medium_skin_tone": "👨🏾‍❤‍💋‍👨🏽", "kiss_man_man_medium-light_skin_tone": "👨🏼‍❤‍💋‍👨🏼", "kiss_man_man_medium-light_skin_tone_dark_skin_tone": "👨🏼‍❤‍💋‍👨🏿", "kiss_man_man_medium-light_skin_tone_light_skin_tone": "👨🏼‍❤‍💋‍👨🏻", "kiss_man_man_medium-light_skin_tone_medium-dark_skin_tone": "👨🏼‍❤‍💋‍👨🏾", "kiss_man_man_medium-light_skin_tone_medium_skin_tone": "👨🏼‍❤‍💋‍👨🏽", "kiss_man_man_medium_skin_tone": "👨🏽‍❤‍💋‍👨🏽", "kiss_man_man_medium_skin_tone_dark_skin_tone": "👨🏽‍❤‍💋‍👨🏿", "kiss_man_man_medium_skin_tone_light_skin_tone": "👨🏽‍❤‍💋‍👨🏻", "kiss_man_man_medium_skin_tone_medium-dark_skin_tone": "👨🏽‍❤‍💋‍👨🏾", "kiss_man_man_medium_skin_tone_medium-light_skin_tone": "👨🏽‍❤‍💋‍👨🏼", "kiss_mark": "💋", "kiss_medium-dark_skin_tone": "💏🏾", "kiss_medium-light_skin_tone": "💏🏼", "kiss_medium_skin_tone": "💏🏽", "kiss_person_person_dark_skin_tone_light_skin_tone": "🧑🏿‍❤‍💋‍🧑🏻", "kiss_person_person_dark_skin_tone_medium-dark_skin_tone": "🧑🏿‍❤‍💋‍🧑🏾", "kiss_person_person_dark_skin_tone_medium-light_skin_tone": "🧑🏿‍❤‍💋‍🧑🏼", "kiss_person_person_dark_skin_tone_medium_skin_tone": "🧑🏿‍❤‍💋‍🧑🏽", "kiss_person_person_light_skin_tone_dark_skin_tone": "🧑🏻‍❤‍💋‍🧑🏿", "kiss_person_person_light_skin_tone_medium-dark_skin_tone": "🧑🏻‍❤‍💋‍🧑🏾", "kiss_person_person_light_skin_tone_medium-light_skin_tone": "🧑🏻‍❤‍💋‍🧑🏼", "kiss_person_person_light_skin_tone_medium_skin_tone": "🧑🏻‍❤‍💋‍🧑🏽", "kiss_person_person_medium-dark_skin_tone_dark_skin_tone": "🧑🏾‍❤‍💋‍🧑🏿", "kiss_person_person_medium-dark_skin_tone_light_skin_tone": "🧑🏾‍❤‍💋‍🧑🏻", ( "kiss_person_person_medium-dark_skin_tone_medium-light_skin_tone" ): "🧑🏾‍❤‍💋‍🧑🏼", "kiss_person_person_medium-dark_skin_tone_medium_skin_tone": "🧑🏾‍❤‍💋‍🧑🏽", "kiss_person_person_medium-light_skin_tone_dark_skin_tone": "🧑🏼‍❤‍💋‍🧑🏿", "kiss_person_person_medium-light_skin_tone_light_skin_tone": "🧑🏼‍❤‍💋‍🧑🏻", ( "kiss_person_person_medium-light_skin_tone_medium-dark_skin_tone" ): "🧑🏼‍❤‍💋‍🧑🏾", ( "kiss_person_person_medium-light_skin_tone_medium_skin_tone" ): "🧑🏼‍❤‍💋‍🧑🏽", "kiss_person_person_medium_skin_tone_dark_skin_tone": "🧑🏽‍❤‍💋‍🧑🏿", "kiss_person_person_medium_skin_tone_light_skin_tone": "🧑🏽‍❤‍💋‍🧑🏻", "kiss_person_person_medium_skin_tone_medium-dark_skin_tone": "🧑🏽‍❤‍💋‍🧑🏾", ( "kiss_person_person_medium_skin_tone_medium-light_skin_tone" ): "🧑🏽‍❤‍💋‍🧑🏼", "kiss_woman_man": "👩‍❤‍💋‍👨", "kiss_woman_man_dark_skin_tone": "👩🏿‍❤‍💋‍👨🏿", "kiss_woman_man_dark_skin_tone_light_skin_tone": "👩🏿‍❤‍💋‍👨🏻", "kiss_woman_man_dark_skin_tone_medium-dark_skin_tone": "👩🏿‍❤‍💋‍👨🏾", "kiss_woman_man_dark_skin_tone_medium-light_skin_tone": "👩🏿‍❤‍💋‍👨🏼", "kiss_woman_man_dark_skin_tone_medium_skin_tone": "👩🏿‍❤‍💋‍👨🏽", "kiss_woman_man_light_skin_tone": "👩🏻‍❤‍💋‍👨🏻", "kiss_woman_man_light_skin_tone_dark_skin_tone": "👩🏻‍❤‍💋‍👨🏿", "kiss_woman_man_light_skin_tone_medium-dark_skin_tone": "👩🏻‍❤‍💋‍👨🏾", "kiss_woman_man_light_skin_tone_medium-light_skin_tone": "👩🏻‍❤‍💋‍👨🏼", "kiss_woman_man_light_skin_tone_medium_skin_tone": "👩🏻‍❤‍💋‍👨🏽", "kiss_woman_man_medium-dark_skin_tone": "👩🏾‍❤‍💋‍👨🏾", "kiss_woman_man_medium-dark_skin_tone_dark_skin_tone": "👩🏾‍❤‍💋‍👨🏿", "kiss_woman_man_medium-dark_skin_tone_light_skin_tone": "👩🏾‍❤‍💋‍👨🏻", ( "kiss_woman_man_medium-dark_skin_tone_medium-light_skin_tone" ): "👩🏾‍❤‍💋‍👨🏼", "kiss_woman_man_medium-dark_skin_tone_medium_skin_tone": "👩🏾‍❤‍💋‍👨🏽", "kiss_woman_man_medium-light_skin_tone": "👩🏼‍❤‍💋‍👨🏼", "kiss_woman_man_medium-light_skin_tone_dark_skin_tone": "👩🏼‍❤‍💋‍👨🏿", "kiss_woman_man_medium-light_skin_tone_light_skin_tone": "👩🏼‍❤‍💋‍👨🏻", ( "kiss_woman_man_medium-light_skin_tone_medium-dark_skin_tone" ): "👩🏼‍❤‍💋‍👨🏾", "kiss_woman_man_medium-light_skin_tone_medium_skin_tone": "👩🏼‍❤‍💋‍👨🏽", "kiss_woman_man_medium_skin_tone": "👩🏽‍❤‍💋‍👨🏽", "kiss_woman_man_medium_skin_tone_dark_skin_tone": "👩🏽‍❤‍💋‍👨🏿", "kiss_woman_man_medium_skin_tone_light_skin_tone": "👩🏽‍❤‍💋‍👨🏻", "kiss_woman_man_medium_skin_tone_medium-dark_skin_tone": "👩🏽‍❤‍💋‍👨🏾", "kiss_woman_man_medium_skin_tone_medium-light_skin_tone": "👩🏽‍❤‍💋‍👨🏼", "kiss_woman_woman": "👩‍❤‍💋‍👩", "kiss_woman_woman_dark_skin_tone": "👩🏿‍❤‍💋‍👩🏿", "kiss_woman_woman_dark_skin_tone_light_skin_tone": "👩🏿‍❤‍💋‍👩🏻", "kiss_woman_woman_dark_skin_tone_medium-dark_skin_tone": "👩🏿‍❤‍💋‍👩🏾", "kiss_woman_woman_dark_skin_tone_medium-light_skin_tone": "👩🏿‍❤‍💋‍👩🏼", "kiss_woman_woman_dark_skin_tone_medium_skin_tone": "👩🏿‍❤‍💋‍👩🏽", "kiss_woman_woman_light_skin_tone": "👩🏻‍❤‍💋‍👩🏻", "kiss_woman_woman_light_skin_tone_dark_skin_tone": "👩🏻‍❤‍💋‍👩🏿", "kiss_woman_woman_light_skin_tone_medium-dark_skin_tone": "👩🏻‍❤‍💋‍👩🏾", "kiss_woman_woman_light_skin_tone_medium-light_skin_tone": "👩🏻‍❤‍💋‍👩🏼", "kiss_woman_woman_light_skin_tone_medium_skin_tone": "👩🏻‍❤‍💋‍👩🏽", "kiss_woman_woman_medium-dark_skin_tone": "👩🏾‍❤‍💋‍👩🏾", "kiss_woman_woman_medium-dark_skin_tone_dark_skin_tone": "👩🏾‍❤‍💋‍👩🏿", "kiss_woman_woman_medium-dark_skin_tone_light_skin_tone": "👩🏾‍❤‍💋‍👩🏻", ( "kiss_woman_woman_medium-dark_skin_tone_medium-light_skin_tone" ): "👩🏾‍❤‍💋‍👩🏼", "kiss_woman_woman_medium-dark_skin_tone_medium_skin_tone": "👩🏾‍❤‍💋‍👩🏽", "kiss_woman_woman_medium-light_skin_tone": "👩🏼‍❤‍💋‍👩🏼", "kiss_woman_woman_medium-light_skin_tone_dark_skin_tone": "👩🏼‍❤‍💋‍👩🏿", "kiss_woman_woman_medium-light_skin_tone_light_skin_tone": "👩🏼‍❤‍💋‍👩🏻", ( "kiss_woman_woman_medium-light_skin_tone_medium-dark_skin_tone" ): "👩🏼‍❤‍💋‍👩🏾", "kiss_woman_woman_medium-light_skin_tone_medium_skin_tone": "👩🏼‍❤‍💋‍👩🏽", "kiss_woman_woman_medium_skin_tone": "👩🏽‍❤‍💋‍👩🏽", "kiss_woman_woman_medium_skin_tone_dark_skin_tone": "👩🏽‍❤‍💋‍👩🏿", "kiss_woman_woman_medium_skin_tone_light_skin_tone": "👩🏽‍❤‍💋‍👩🏻", "kiss_woman_woman_medium_skin_tone_medium-dark_skin_tone": "👩🏽‍❤‍💋‍👩🏾", "kiss_woman_woman_medium_skin_tone_medium-light_skin_tone": "👩🏽‍❤‍💋‍👩🏼", "kissing_cat": "😽", "kissing_face": "😗", "kissing_face_with_closed_eyes": "😚", "kissing_face_with_smiling_eyes": "😙", "kitchen_knife": "🔪", "kite": "🪁", "kiwi_fruit": "🥝", "knot": "🪢", "koala": "🐨", "lab_coat": "🥼", "label": "🏷", "lacrosse": "🥍", "ladder": "🪜", "lady_beetle": "🐞", "laptop": "💻", "large_blue_diamond": "🔷", "large_orange_diamond": "🔶", "last_quarter_moon": "🌗", "last_quarter_moon_face": "🌜", "last_track_button": "⏮", "latin_cross": "✝", "leaf_fluttering_in_wind": "🍃", "leafy_green": "🥬", "ledger": "📒", "left-facing_fist": "🤛", "left-facing_fist_dark_skin_tone": "🤛🏿", "left-facing_fist_light_skin_tone": "🤛🏻", "left-facing_fist_medium-dark_skin_tone": "🤛🏾", "left-facing_fist_medium-light_skin_tone": "🤛🏼", "left-facing_fist_medium_skin_tone": "🤛🏽", "left-right_arrow": "↔", "left_arrow": "⬅", "left_arrow_curving_right": "↪", "left_luggage": "🛅", "left_speech_bubble": "🗨", "leftwards_hand": "🫲", "leftwards_hand_dark_skin_tone": "🫲🏿", "leftwards_hand_light_skin_tone": "🫲🏻", "leftwards_hand_medium-dark_skin_tone": "🫲🏾", "leftwards_hand_medium-light_skin_tone": "🫲🏼", "leftwards_hand_medium_skin_tone": "🫲🏽", "leftwards_pushing_hand": "🫷", "leftwards_pushing_hand_dark_skin_tone": "🫷🏿", "leftwards_pushing_hand_light_skin_tone": "🫷🏻", "leftwards_pushing_hand_medium-dark_skin_tone": "🫷🏾", "leftwards_pushing_hand_medium-light_skin_tone": "🫷🏼", "leftwards_pushing_hand_medium_skin_tone": "🫷🏽", "leg": "🦵", "leg_dark_skin_tone": "🦵🏿", "leg_light_skin_tone": "🦵🏻", "leg_medium-dark_skin_tone": "🦵🏾", "leg_medium-light_skin_tone": "🦵🏼", "leg_medium_skin_tone": "🦵🏽", "lemon": "🍋", "leopard": "🐆", "level_slider": "🎚", "light_blue_heart": "🩵", "light_bulb": "💡", "light_rail": "🚈", "light_skin_tone": "🏻", "link": "🔗", "linked_paperclips": "🖇", "lion": "🦁", "lipstick": "💄", "litter_in_bin_sign": "🚮", "lizard": "🦎", "llama": "🦙", "lobster": "🦞", "locked": "🔒", "locked_with_key": "🔐", "locked_with_pen": "🔏", "locomotive": "🚂", "lollipop": "🍭", "long_drum": "🪘", "lotion_bottle": "🧴", "lotus": "🪷", "loudly_crying_face": "😭", "loudspeaker": "📢", "love-you_gesture": "🤟", "love-you_gesture_dark_skin_tone": "🤟🏿", "love-you_gesture_light_skin_tone": "🤟🏻", "love-you_gesture_medium-dark_skin_tone": "🤟🏾", "love-you_gesture_medium-light_skin_tone": "🤟🏼", "love-you_gesture_medium_skin_tone": "🤟🏽", "love_hotel": "🏩", "love_letter": "💌", "low_battery": "🪫", "luggage": "🧳", "lungs": "🫁", "lying_face": "🤥", "mage": "🧙", "mage_dark_skin_tone": "🧙🏿", "mage_light_skin_tone": "🧙🏻", "mage_medium-dark_skin_tone": "🧙🏾", "mage_medium-light_skin_tone": "🧙🏼", "mage_medium_skin_tone": "🧙🏽", "magic_wand": "🪄", "magnet": "🧲", "magnifying_glass_tilted_left": "🔍", "magnifying_glass_tilted_right": "🔎", "mahjong_red_dragon": "🀄", "male_sign": "♂", "mammoth": "🦣", "man": "👨", "man_artist": "👨‍🎨", "man_artist_dark_skin_tone": "👨🏿‍🎨", "man_artist_light_skin_tone": "👨🏻‍🎨", "man_artist_medium-dark_skin_tone": "👨🏾‍🎨", "man_artist_medium-light_skin_tone": "👨🏼‍🎨", "man_artist_medium_skin_tone": "👨🏽‍🎨", "man_astronaut": "👨‍🚀", "man_astronaut_dark_skin_tone": "👨🏿‍🚀", "man_astronaut_light_skin_tone": "👨🏻‍🚀", "man_astronaut_medium-dark_skin_tone": "👨🏾‍🚀", "man_astronaut_medium-light_skin_tone": "👨🏼‍🚀", "man_astronaut_medium_skin_tone": "👨🏽‍🚀", "man_bald": "👨‍🦲", "man_beard": "🧔‍♂", "man_biking": "🚴‍♂", "man_biking_dark_skin_tone": "🚴🏿‍♂", "man_biking_light_skin_tone": "🚴🏻‍♂", "man_biking_medium-dark_skin_tone": "🚴🏾‍♂", "man_biking_medium-light_skin_tone": "🚴🏼‍♂", "man_biking_medium_skin_tone": "🚴🏽‍♂", "man_blond_hair": "👱‍♂", "man_bouncing_ball": "⛹‍♂", "man_bouncing_ball_dark_skin_tone": "⛹🏿‍♂", "man_bouncing_ball_light_skin_tone": "⛹🏻‍♂", "man_bouncing_ball_medium-dark_skin_tone": "⛹🏾‍♂", "man_bouncing_ball_medium-light_skin_tone": "⛹🏼‍♂", "man_bouncing_ball_medium_skin_tone": "⛹🏽‍♂", "man_bowing": "🙇‍♂", "man_bowing_dark_skin_tone": "🙇🏿‍♂", "man_bowing_light_skin_tone": "🙇🏻‍♂", "man_bowing_medium-dark_skin_tone": "🙇🏾‍♂", "man_bowing_medium-light_skin_tone": "🙇🏼‍♂", "man_bowing_medium_skin_tone": "🙇🏽‍♂", "man_cartwheeling": "🤸‍♂", "man_cartwheeling_dark_skin_tone": "🤸🏿‍♂", "man_cartwheeling_light_skin_tone": "🤸🏻‍♂", "man_cartwheeling_medium-dark_skin_tone": "🤸🏾‍♂", "man_cartwheeling_medium-light_skin_tone": "🤸🏼‍♂", "man_cartwheeling_medium_skin_tone": "🤸🏽‍♂", "man_climbing": "🧗‍♂", "man_climbing_dark_skin_tone": "🧗🏿‍♂", "man_climbing_light_skin_tone": "🧗🏻‍♂", "man_climbing_medium-dark_skin_tone": "🧗🏾‍♂", "man_climbing_medium-light_skin_tone": "🧗🏼‍♂", "man_climbing_medium_skin_tone": "🧗🏽‍♂", "man_construction_worker": "👷‍♂", "man_construction_worker_dark_skin_tone": "👷🏿‍♂", "man_construction_worker_light_skin_tone": "👷🏻‍♂", "man_construction_worker_medium-dark_skin_tone": "👷🏾‍♂", "man_construction_worker_medium-light_skin_tone": "👷🏼‍♂", "man_construction_worker_medium_skin_tone": "👷🏽‍♂", "man_cook": "👨‍🍳", "man_cook_dark_skin_tone": "👨🏿‍🍳", "man_cook_light_skin_tone": "👨🏻‍🍳", "man_cook_medium-dark_skin_tone": "👨🏾‍🍳", "man_cook_medium-light_skin_tone": "👨🏼‍🍳", "man_cook_medium_skin_tone": "👨🏽‍🍳", "man_curly_hair": "👨‍🦱", "man_dancing": "🕺", "man_dancing_dark_skin_tone": "🕺🏿", "man_dancing_light_skin_tone": "🕺🏻", "man_dancing_medium-dark_skin_tone": "🕺🏾", "man_dancing_medium-light_skin_tone": "🕺🏼", "man_dancing_medium_skin_tone": "🕺🏽", "man_dark_skin_tone": "👨🏿", "man_dark_skin_tone_bald": "👨🏿‍🦲", "man_dark_skin_tone_beard": "🧔🏿‍♂", "man_dark_skin_tone_blond_hair": "👱🏿‍♂", "man_dark_skin_tone_curly_hair": "👨🏿‍🦱", "man_dark_skin_tone_red_hair": "👨🏿‍🦰", "man_dark_skin_tone_white_hair": "👨🏿‍🦳", "man_detective": "🕵‍♂", "man_detective_dark_skin_tone": "🕵🏿‍♂", "man_detective_light_skin_tone": "🕵🏻‍♂", "man_detective_medium-dark_skin_tone": "🕵🏾‍♂", "man_detective_medium-light_skin_tone": "🕵🏼‍♂", "man_detective_medium_skin_tone": "🕵🏽‍♂", "man_elf": "🧝‍♂", "man_elf_dark_skin_tone": "🧝🏿‍♂", "man_elf_light_skin_tone": "🧝🏻‍♂", "man_elf_medium-dark_skin_tone": "🧝🏾‍♂", "man_elf_medium-light_skin_tone": "🧝🏼‍♂", "man_elf_medium_skin_tone": "🧝🏽‍♂", "man_facepalming": "🤦‍♂", "man_facepalming_dark_skin_tone": "🤦🏿‍♂", "man_facepalming_light_skin_tone": "🤦🏻‍♂", "man_facepalming_medium-dark_skin_tone": "🤦🏾‍♂", "man_facepalming_medium-light_skin_tone": "🤦🏼‍♂", "man_facepalming_medium_skin_tone": "🤦🏽‍♂", "man_factory_worker": "👨‍🏭", "man_factory_worker_dark_skin_tone": "👨🏿‍🏭", "man_factory_worker_light_skin_tone": "👨🏻‍🏭", "man_factory_worker_medium-dark_skin_tone": "👨🏾‍🏭", "man_factory_worker_medium-light_skin_tone": "👨🏼‍🏭", "man_factory_worker_medium_skin_tone": "👨🏽‍🏭", "man_fairy": "🧚‍♂", "man_fairy_dark_skin_tone": "🧚🏿‍♂", "man_fairy_light_skin_tone": "🧚🏻‍♂", "man_fairy_medium-dark_skin_tone": "🧚🏾‍♂", "man_fairy_medium-light_skin_tone": "🧚🏼‍♂", "man_fairy_medium_skin_tone": "🧚🏽‍♂", "man_farmer": "👨‍🌾", "man_farmer_dark_skin_tone": "👨🏿‍🌾", "man_farmer_light_skin_tone": "👨🏻‍🌾", "man_farmer_medium-dark_skin_tone": "👨🏾‍🌾", "man_farmer_medium-light_skin_tone": "👨🏼‍🌾", "man_farmer_medium_skin_tone": "👨🏽‍🌾", "man_feeding_baby": "👨‍🍼", "man_feeding_baby_dark_skin_tone": "👨🏿‍🍼", "man_feeding_baby_light_skin_tone": "👨🏻‍🍼", "man_feeding_baby_medium-dark_skin_tone": "👨🏾‍🍼", "man_feeding_baby_medium-light_skin_tone": "👨🏼‍🍼", "man_feeding_baby_medium_skin_tone": "👨🏽‍🍼", "man_firefighter": "👨‍🚒", "man_firefighter_dark_skin_tone": "👨🏿‍🚒", "man_firefighter_light_skin_tone": "👨🏻‍🚒", "man_firefighter_medium-dark_skin_tone": "👨🏾‍🚒", "man_firefighter_medium-light_skin_tone": "👨🏼‍🚒", "man_firefighter_medium_skin_tone": "👨🏽‍🚒", "man_frowning": "🙍‍♂", "man_frowning_dark_skin_tone": "🙍🏿‍♂", "man_frowning_light_skin_tone": "🙍🏻‍♂", "man_frowning_medium-dark_skin_tone": "🙍🏾‍♂", "man_frowning_medium-light_skin_tone": "🙍🏼‍♂", "man_frowning_medium_skin_tone": "🙍🏽‍♂", "man_genie": "🧞‍♂", "man_gesturing_NO": "🙅‍♂", "man_gesturing_NO_dark_skin_tone": "🙅🏿‍♂", "man_gesturing_NO_light_skin_tone": "🙅🏻‍♂", "man_gesturing_NO_medium-dark_skin_tone": "🙅🏾‍♂", "man_gesturing_NO_medium-light_skin_tone": "🙅🏼‍♂", "man_gesturing_NO_medium_skin_tone": "🙅🏽‍♂", "man_gesturing_OK": "🙆‍♂", "man_gesturing_OK_dark_skin_tone": "🙆🏿‍♂", "man_gesturing_OK_light_skin_tone": "🙆🏻‍♂", "man_gesturing_OK_medium-dark_skin_tone": "🙆🏾‍♂", "man_gesturing_OK_medium-light_skin_tone": "🙆🏼‍♂", "man_gesturing_OK_medium_skin_tone": "🙆🏽‍♂", "man_getting_haircut": "💇‍♂", "man_getting_haircut_dark_skin_tone": "💇🏿‍♂", "man_getting_haircut_light_skin_tone": "💇🏻‍♂", "man_getting_haircut_medium-dark_skin_tone": "💇🏾‍♂", "man_getting_haircut_medium-light_skin_tone": "💇🏼‍♂", "man_getting_haircut_medium_skin_tone": "💇🏽‍♂", "man_getting_massage": "💆‍♂", "man_getting_massage_dark_skin_tone": "💆🏿‍♂", "man_getting_massage_light_skin_tone": "💆🏻‍♂", "man_getting_massage_medium-dark_skin_tone": "💆🏾‍♂", "man_getting_massage_medium-light_skin_tone": "💆🏼‍♂", "man_getting_massage_medium_skin_tone": "💆🏽‍♂", "man_golfing": "🏌‍♂", "man_golfing_dark_skin_tone": "🏌🏿‍♂", "man_golfing_light_skin_tone": "🏌🏻‍♂", "man_golfing_medium-dark_skin_tone": "🏌🏾‍♂", "man_golfing_medium-light_skin_tone": "🏌🏼‍♂", "man_golfing_medium_skin_tone": "🏌🏽‍♂", "man_guard": "💂‍♂", "man_guard_dark_skin_tone": "💂🏿‍♂", "man_guard_light_skin_tone": "💂🏻‍♂", "man_guard_medium-dark_skin_tone": "💂🏾‍♂", "man_guard_medium-light_skin_tone": "💂🏼‍♂", "man_guard_medium_skin_tone": "💂🏽‍♂", "man_health_worker": "👨‍⚕", "man_health_worker_dark_skin_tone": "👨🏿‍⚕", "man_health_worker_light_skin_tone": "👨🏻‍⚕", "man_health_worker_medium-dark_skin_tone": "👨🏾‍⚕", "man_health_worker_medium-light_skin_tone": "👨🏼‍⚕", "man_health_worker_medium_skin_tone": "👨🏽‍⚕", "man_in_lotus_position": "🧘‍♂", "man_in_lotus_position_dark_skin_tone": "🧘🏿‍♂", "man_in_lotus_position_light_skin_tone": "🧘🏻‍♂", "man_in_lotus_position_medium-dark_skin_tone": "🧘🏾‍♂", "man_in_lotus_position_medium-light_skin_tone": "🧘🏼‍♂", "man_in_lotus_position_medium_skin_tone": "🧘🏽‍♂", "man_in_manual_wheelchair": "👨‍🦽", "man_in_manual_wheelchair_dark_skin_tone": "👨🏿‍🦽", "man_in_manual_wheelchair_light_skin_tone": "👨🏻‍🦽", "man_in_manual_wheelchair_medium-dark_skin_tone": "👨🏾‍🦽", "man_in_manual_wheelchair_medium-light_skin_tone": "👨🏼‍🦽", "man_in_manual_wheelchair_medium_skin_tone": "👨🏽‍🦽", "man_in_motorized_wheelchair": "👨‍🦼", "man_in_motorized_wheelchair_dark_skin_tone": "👨🏿‍🦼", "man_in_motorized_wheelchair_light_skin_tone": "👨🏻‍🦼", "man_in_motorized_wheelchair_medium-dark_skin_tone": "👨🏾‍🦼", "man_in_motorized_wheelchair_medium-light_skin_tone": "👨🏼‍🦼", "man_in_motorized_wheelchair_medium_skin_tone": "👨🏽‍🦼", "man_in_steamy_room": "🧖‍♂", "man_in_steamy_room_dark_skin_tone": "🧖🏿‍♂", "man_in_steamy_room_light_skin_tone": "🧖🏻‍♂", "man_in_steamy_room_medium-dark_skin_tone": "🧖🏾‍♂", "man_in_steamy_room_medium-light_skin_tone": "🧖🏼‍♂", "man_in_steamy_room_medium_skin_tone": "🧖🏽‍♂", "man_in_tuxedo": "🤵‍♂", "man_in_tuxedo_dark_skin_tone": "🤵🏿‍♂", "man_in_tuxedo_light_skin_tone": "🤵🏻‍♂", "man_in_tuxedo_medium-dark_skin_tone": "🤵🏾‍♂", "man_in_tuxedo_medium-light_skin_tone": "🤵🏼‍♂", "man_in_tuxedo_medium_skin_tone": "🤵🏽‍♂", "man_judge": "👨‍⚖", "man_judge_dark_skin_tone": "👨🏿‍⚖", "man_judge_light_skin_tone": "👨🏻‍⚖", "man_judge_medium-dark_skin_tone": "👨🏾‍⚖", "man_judge_medium-light_skin_tone": "👨🏼‍⚖", "man_judge_medium_skin_tone": "👨🏽‍⚖", "man_juggling": "🤹‍♂", "man_juggling_dark_skin_tone": "🤹🏿‍♂", "man_juggling_light_skin_tone": "🤹🏻‍♂", "man_juggling_medium-dark_skin_tone": "🤹🏾‍♂", "man_juggling_medium-light_skin_tone": "🤹🏼‍♂", "man_juggling_medium_skin_tone": "🤹🏽‍♂", "man_kneeling": "🧎‍♂", "man_kneeling_dark_skin_tone": "🧎🏿‍♂", "man_kneeling_light_skin_tone": "🧎🏻‍♂", "man_kneeling_medium-dark_skin_tone": "🧎🏾‍♂", "man_kneeling_medium-light_skin_tone": "🧎🏼‍♂", "man_kneeling_medium_skin_tone": "🧎🏽‍♂", "man_lifting_weights": "🏋‍♂", "man_lifting_weights_dark_skin_tone": "🏋🏿‍♂", "man_lifting_weights_light_skin_tone": "🏋🏻‍♂", "man_lifting_weights_medium-dark_skin_tone": "🏋🏾‍♂", "man_lifting_weights_medium-light_skin_tone": "🏋🏼‍♂", "man_lifting_weights_medium_skin_tone": "🏋🏽‍♂", "man_light_skin_tone": "👨🏻", "man_light_skin_tone_bald": "👨🏻‍🦲", "man_light_skin_tone_beard": "🧔🏻‍♂", "man_light_skin_tone_blond_hair": "👱🏻‍♂", "man_light_skin_tone_curly_hair": "👨🏻‍🦱", "man_light_skin_tone_red_hair": "👨🏻‍🦰", "man_light_skin_tone_white_hair": "👨🏻‍🦳", "man_mage": "🧙‍♂", "man_mage_dark_skin_tone": "🧙🏿‍♂", "man_mage_light_skin_tone": "🧙🏻‍♂", "man_mage_medium-dark_skin_tone": "🧙🏾‍♂", "man_mage_medium-light_skin_tone": "🧙🏼‍♂", "man_mage_medium_skin_tone": "🧙🏽‍♂", "man_mechanic": "👨‍🔧", "man_mechanic_dark_skin_tone": "👨🏿‍🔧", "man_mechanic_light_skin_tone": "👨🏻‍🔧", "man_mechanic_medium-dark_skin_tone": "👨🏾‍🔧", "man_mechanic_medium-light_skin_tone": "👨🏼‍🔧", "man_mechanic_medium_skin_tone": "👨🏽‍🔧", "man_medium-dark_skin_tone": "👨🏾", "man_medium-dark_skin_tone_bald": "👨🏾‍🦲", "man_medium-dark_skin_tone_beard": "🧔🏾‍♂", "man_medium-dark_skin_tone_blond_hair": "👱🏾‍♂", "man_medium-dark_skin_tone_curly_hair": "👨🏾‍🦱", "man_medium-dark_skin_tone_red_hair": "👨🏾‍🦰", "man_medium-dark_skin_tone_white_hair": "👨🏾‍🦳", "man_medium-light_skin_tone": "👨🏼", "man_medium-light_skin_tone_bald": "👨🏼‍🦲", "man_medium-light_skin_tone_beard": "🧔🏼‍♂", "man_medium-light_skin_tone_blond_hair": "👱🏼‍♂", "man_medium-light_skin_tone_curly_hair": "👨🏼‍🦱", "man_medium-light_skin_tone_red_hair": "👨🏼‍🦰", "man_medium-light_skin_tone_white_hair": "👨🏼‍🦳", "man_medium_skin_tone": "👨🏽", "man_medium_skin_tone_bald": "👨🏽‍🦲", "man_medium_skin_tone_beard": "🧔🏽‍♂", "man_medium_skin_tone_blond_hair": "👱🏽‍♂", "man_medium_skin_tone_curly_hair": "👨🏽‍🦱", "man_medium_skin_tone_red_hair": "👨🏽‍🦰", "man_medium_skin_tone_white_hair": "👨🏽‍🦳", "man_mountain_biking": "🚵‍♂", "man_mountain_biking_dark_skin_tone": "🚵🏿‍♂", "man_mountain_biking_light_skin_tone": "🚵🏻‍♂", "man_mountain_biking_medium-dark_skin_tone": "🚵🏾‍♂", "man_mountain_biking_medium-light_skin_tone": "🚵🏼‍♂", "man_mountain_biking_medium_skin_tone": "🚵🏽‍♂", "man_office_worker": "👨‍💼", "man_office_worker_dark_skin_tone": "👨🏿‍💼", "man_office_worker_light_skin_tone": "👨🏻‍💼", "man_office_worker_medium-dark_skin_tone": "👨🏾‍💼", "man_office_worker_medium-light_skin_tone": "👨🏼‍💼", "man_office_worker_medium_skin_tone": "👨🏽‍💼", "man_pilot": "👨‍✈", "man_pilot_dark_skin_tone": "👨🏿‍✈", "man_pilot_light_skin_tone": "👨🏻‍✈", "man_pilot_medium-dark_skin_tone": "👨🏾‍✈", "man_pilot_medium-light_skin_tone": "👨🏼‍✈", "man_pilot_medium_skin_tone": "👨🏽‍✈", "man_playing_handball": "🤾‍♂", "man_playing_handball_dark_skin_tone": "🤾🏿‍♂", "man_playing_handball_light_skin_tone": "🤾🏻‍♂", "man_playing_handball_medium-dark_skin_tone": "🤾🏾‍♂", "man_playing_handball_medium-light_skin_tone": "🤾🏼‍♂", "man_playing_handball_medium_skin_tone": "🤾🏽‍♂", "man_playing_water_polo": "🤽‍♂", "man_playing_water_polo_dark_skin_tone": "🤽🏿‍♂", "man_playing_water_polo_light_skin_tone": "🤽🏻‍♂", "man_playing_water_polo_medium-dark_skin_tone": "🤽🏾‍♂", "man_playing_water_polo_medium-light_skin_tone": "🤽🏼‍♂", "man_playing_water_polo_medium_skin_tone": "🤽🏽‍♂", "man_police_officer": "👮‍♂", "man_police_officer_dark_skin_tone": "👮🏿‍♂", "man_police_officer_light_skin_tone": "👮🏻‍♂", "man_police_officer_medium-dark_skin_tone": "👮🏾‍♂", "man_police_officer_medium-light_skin_tone": "👮🏼‍♂", "man_police_officer_medium_skin_tone": "👮🏽‍♂", "man_pouting": "🙎‍♂", "man_pouting_dark_skin_tone": "🙎🏿‍♂", "man_pouting_light_skin_tone": "🙎🏻‍♂", "man_pouting_medium-dark_skin_tone": "🙎🏾‍♂", "man_pouting_medium-light_skin_tone": "🙎🏼‍♂", "man_pouting_medium_skin_tone": "🙎🏽‍♂", "man_raising_hand": "🙋‍♂", "man_raising_hand_dark_skin_tone": "🙋🏿‍♂", "man_raising_hand_light_skin_tone": "🙋🏻‍♂", "man_raising_hand_medium-dark_skin_tone": "🙋🏾‍♂", "man_raising_hand_medium-light_skin_tone": "🙋🏼‍♂", "man_raising_hand_medium_skin_tone": "🙋🏽‍♂", "man_red_hair": "👨‍🦰", "man_rowing_boat": "🚣‍♂", "man_rowing_boat_dark_skin_tone": "🚣🏿‍♂", "man_rowing_boat_light_skin_tone": "🚣🏻‍♂", "man_rowing_boat_medium-dark_skin_tone": "🚣🏾‍♂", "man_rowing_boat_medium-light_skin_tone": "🚣🏼‍♂", "man_rowing_boat_medium_skin_tone": "🚣🏽‍♂", "man_running": "🏃‍♂", "man_running_dark_skin_tone": "🏃🏿‍♂", "man_running_light_skin_tone": "🏃🏻‍♂", "man_running_medium-dark_skin_tone": "🏃🏾‍♂", "man_running_medium-light_skin_tone": "🏃🏼‍♂", "man_running_medium_skin_tone": "🏃🏽‍♂", "man_scientist": "👨‍🔬", "man_scientist_dark_skin_tone": "👨🏿‍🔬", "man_scientist_light_skin_tone": "👨🏻‍🔬", "man_scientist_medium-dark_skin_tone": "👨🏾‍🔬", "man_scientist_medium-light_skin_tone": "👨🏼‍🔬", "man_scientist_medium_skin_tone": "👨🏽‍🔬", "man_shrugging": "🤷‍♂", "man_shrugging_dark_skin_tone": "🤷🏿‍♂", "man_shrugging_light_skin_tone": "🤷🏻‍♂", "man_shrugging_medium-dark_skin_tone": "🤷🏾‍♂", "man_shrugging_medium-light_skin_tone": "🤷🏼‍♂", "man_shrugging_medium_skin_tone": "🤷🏽‍♂", "man_singer": "👨‍🎤", "man_singer_dark_skin_tone": "👨🏿‍🎤", "man_singer_light_skin_tone": "👨🏻‍🎤", "man_singer_medium-dark_skin_tone": "👨🏾‍🎤", "man_singer_medium-light_skin_tone": "👨🏼‍🎤", "man_singer_medium_skin_tone": "👨🏽‍🎤", "man_standing": "🧍‍♂", "man_standing_dark_skin_tone": "🧍🏿‍♂", "man_standing_light_skin_tone": "🧍🏻‍♂", "man_standing_medium-dark_skin_tone": "🧍🏾‍♂", "man_standing_medium-light_skin_tone": "🧍🏼‍♂", "man_standing_medium_skin_tone": "🧍🏽‍♂", "man_student": "👨‍🎓", "man_student_dark_skin_tone": "👨🏿‍🎓", "man_student_light_skin_tone": "👨🏻‍🎓", "man_student_medium-dark_skin_tone": "👨🏾‍🎓", "man_student_medium-light_skin_tone": "👨🏼‍🎓", "man_student_medium_skin_tone": "👨🏽‍🎓", "man_superhero": "🦸‍♂", "man_superhero_dark_skin_tone": "🦸🏿‍♂", "man_superhero_light_skin_tone": "🦸🏻‍♂", "man_superhero_medium-dark_skin_tone": "🦸🏾‍♂", "man_superhero_medium-light_skin_tone": "🦸🏼‍♂", "man_superhero_medium_skin_tone": "🦸🏽‍♂", "man_supervillain": "🦹‍♂", "man_supervillain_dark_skin_tone": "🦹🏿‍♂", "man_supervillain_light_skin_tone": "🦹🏻‍♂", "man_supervillain_medium-dark_skin_tone": "🦹🏾‍♂", "man_supervillain_medium-light_skin_tone": "🦹🏼‍♂", "man_supervillain_medium_skin_tone": "🦹🏽‍♂", "man_surfing": "🏄‍♂", "man_surfing_dark_skin_tone": "🏄🏿‍♂", "man_surfing_light_skin_tone": "🏄🏻‍♂", "man_surfing_medium-dark_skin_tone": "🏄🏾‍♂", "man_surfing_medium-light_skin_tone": "🏄🏼‍♂", "man_surfing_medium_skin_tone": "🏄🏽‍♂", "man_swimming": "🏊‍♂", "man_swimming_dark_skin_tone": "🏊🏿‍♂", "man_swimming_light_skin_tone": "🏊🏻‍♂", "man_swimming_medium-dark_skin_tone": "🏊🏾‍♂", "man_swimming_medium-light_skin_tone": "🏊🏼‍♂", "man_swimming_medium_skin_tone": "🏊🏽‍♂", "man_teacher": "👨‍🏫", "man_teacher_dark_skin_tone": "👨🏿‍🏫", "man_teacher_light_skin_tone": "👨🏻‍🏫", "man_teacher_medium-dark_skin_tone": "👨🏾‍🏫", "man_teacher_medium-light_skin_tone": "👨🏼‍🏫", "man_teacher_medium_skin_tone": "👨🏽‍🏫", "man_technologist": "👨‍💻", "man_technologist_dark_skin_tone": "👨🏿‍💻", "man_technologist_light_skin_tone": "👨🏻‍💻", "man_technologist_medium-dark_skin_tone": "👨🏾‍💻", "man_technologist_medium-light_skin_tone": "👨🏼‍💻", "man_technologist_medium_skin_tone": "👨🏽‍💻", "man_tipping_hand": "💁‍♂", "man_tipping_hand_dark_skin_tone": "💁🏿‍♂", "man_tipping_hand_light_skin_tone": "💁🏻‍♂", "man_tipping_hand_medium-dark_skin_tone": "💁🏾‍♂", "man_tipping_hand_medium-light_skin_tone": "💁🏼‍♂", "man_tipping_hand_medium_skin_tone": "💁🏽‍♂", "man_vampire": "🧛‍♂", "man_vampire_dark_skin_tone": "🧛🏿‍♂", "man_vampire_light_skin_tone": "🧛🏻‍♂", "man_vampire_medium-dark_skin_tone": "🧛🏾‍♂", "man_vampire_medium-light_skin_tone": "🧛🏼‍♂", "man_vampire_medium_skin_tone": "🧛🏽‍♂", "man_walking": "🚶‍♂", "man_walking_dark_skin_tone": "🚶🏿‍♂", "man_walking_light_skin_tone": "🚶🏻‍♂", "man_walking_medium-dark_skin_tone": "🚶🏾‍♂", "man_walking_medium-light_skin_tone": "🚶🏼‍♂", "man_walking_medium_skin_tone": "🚶🏽‍♂", "man_wearing_turban": "👳‍♂", "man_wearing_turban_dark_skin_tone": "👳🏿‍♂", "man_wearing_turban_light_skin_tone": "👳🏻‍♂", "man_wearing_turban_medium-dark_skin_tone": "👳🏾‍♂", "man_wearing_turban_medium-light_skin_tone": "👳🏼‍♂", "man_wearing_turban_medium_skin_tone": "👳🏽‍♂", "man_white_hair": "👨‍🦳", "man_with_veil": "👰‍♂", "man_with_veil_dark_skin_tone": "👰🏿‍♂", "man_with_veil_light_skin_tone": "👰🏻‍♂", "man_with_veil_medium-dark_skin_tone": "👰🏾‍♂", "man_with_veil_medium-light_skin_tone": "👰🏼‍♂", "man_with_veil_medium_skin_tone": "👰🏽‍♂", "man_with_white_cane": "👨‍🦯", "man_with_white_cane_dark_skin_tone": "👨🏿‍🦯", "man_with_white_cane_light_skin_tone": "👨🏻‍🦯", "man_with_white_cane_medium-dark_skin_tone": "👨🏾‍🦯", "man_with_white_cane_medium-light_skin_tone": "👨🏼‍🦯", "man_with_white_cane_medium_skin_tone": "👨🏽‍🦯", "man_zombie": "🧟‍♂", "mango": "🥭", "mantelpiece_clock": "🕰", "manual_wheelchair": "🦽", "man’s_shoe": "👞", "map_of_Japan": "🗾", "maple_leaf": "🍁", "maracas": "🪇", "martial_arts_uniform": "🥋", "mate": "🧉", "meat_on_bone": "🍖", "mechanic": "🧑‍🔧", "mechanic_dark_skin_tone": "🧑🏿‍🔧", "mechanic_light_skin_tone": "🧑🏻‍🔧", "mechanic_medium-dark_skin_tone": "🧑🏾‍🔧", "mechanic_medium-light_skin_tone": "🧑🏼‍🔧", "mechanic_medium_skin_tone": "🧑🏽‍🔧", "mechanical_arm": "🦾", "mechanical_leg": "🦿", "medical_symbol": "⚕", "medium-dark_skin_tone": "🏾", "medium-light_skin_tone": "🏼", "medium_skin_tone": "🏽", "megaphone": "📣", "melon": "🍈", "melting_face": "🫠", "memo": "📝", "men_holding_hands": "👬", "men_holding_hands_dark_skin_tone": "👬🏿", "men_holding_hands_dark_skin_tone_light_skin_tone": "👨🏿‍🤝‍👨🏻", "men_holding_hands_dark_skin_tone_medium-dark_skin_tone": "👨🏿‍🤝‍👨🏾", "men_holding_hands_dark_skin_tone_medium-light_skin_tone": "👨🏿‍🤝‍👨🏼", "men_holding_hands_dark_skin_tone_medium_skin_tone": "👨🏿‍🤝‍👨🏽", "men_holding_hands_light_skin_tone": "👬🏻", "men_holding_hands_light_skin_tone_dark_skin_tone": "👨🏻‍🤝‍👨🏿", "men_holding_hands_light_skin_tone_medium-dark_skin_tone": "👨🏻‍🤝‍👨🏾", "men_holding_hands_light_skin_tone_medium-light_skin_tone": "👨🏻‍🤝‍👨🏼", "men_holding_hands_light_skin_tone_medium_skin_tone": "👨🏻‍🤝‍👨🏽", "men_holding_hands_medium-dark_skin_tone": "👬🏾", "men_holding_hands_medium-dark_skin_tone_dark_skin_tone": "👨🏾‍🤝‍👨🏿", "men_holding_hands_medium-dark_skin_tone_light_skin_tone": "👨🏾‍🤝‍👨🏻", ( "men_holding_hands_medium-dark_skin_tone_medium-light_skin_tone" ): "👨🏾‍🤝‍👨🏼", "men_holding_hands_medium-dark_skin_tone_medium_skin_tone": "👨🏾‍🤝‍👨🏽", "men_holding_hands_medium-light_skin_tone": "👬🏼", "men_holding_hands_medium-light_skin_tone_dark_skin_tone": "👨🏼‍🤝‍👨🏿", "men_holding_hands_medium-light_skin_tone_light_skin_tone": "👨🏼‍🤝‍👨🏻", ( "men_holding_hands_medium-light_skin_tone_medium-dark_skin_tone" ): "👨🏼‍🤝‍👨🏾", "men_holding_hands_medium-light_skin_tone_medium_skin_tone": "👨🏼‍🤝‍👨🏽", "men_holding_hands_medium_skin_tone": "👬🏽", "men_holding_hands_medium_skin_tone_dark_skin_tone": "👨🏽‍🤝‍👨🏿", "men_holding_hands_medium_skin_tone_light_skin_tone": "👨🏽‍🤝‍👨🏻", "men_holding_hands_medium_skin_tone_medium-dark_skin_tone": "👨🏽‍🤝‍👨🏾", "men_holding_hands_medium_skin_tone_medium-light_skin_tone": "👨🏽‍🤝‍👨🏼", "men_with_bunny_ears": "👯‍♂", "men_wrestling": "🤼‍♂", "mending_heart": "❤‍🩹", "menorah": "🕎", "men’s_room": "🚹", "mermaid": "🧜‍♀", "mermaid_dark_skin_tone": "🧜🏿‍♀", "mermaid_light_skin_tone": "🧜🏻‍♀", "mermaid_medium-dark_skin_tone": "🧜🏾‍♀", "mermaid_medium-light_skin_tone": "🧜🏼‍♀", "mermaid_medium_skin_tone": "🧜🏽‍♀", "merman": "🧜‍♂", "merman_dark_skin_tone": "🧜🏿‍♂", "merman_light_skin_tone": "🧜🏻‍♂", "merman_medium-dark_skin_tone": "🧜🏾‍♂", "merman_medium-light_skin_tone": "🧜🏼‍♂", "merman_medium_skin_tone": "🧜🏽‍♂", "merperson": "🧜", "merperson_dark_skin_tone": "🧜🏿", "merperson_light_skin_tone": "🧜🏻", "merperson_medium-dark_skin_tone": "🧜🏾", "merperson_medium-light_skin_tone": "🧜🏼", "merperson_medium_skin_tone": "🧜🏽", "metro": "🚇", "microbe": "🦠", "microphone": "🎤", "microscope": "🔬", "middle_finger": "🖕", "middle_finger_dark_skin_tone": "🖕🏿", "middle_finger_light_skin_tone": "🖕🏻", "middle_finger_medium-dark_skin_tone": "🖕🏾", "middle_finger_medium-light_skin_tone": "🖕🏼", "middle_finger_medium_skin_tone": "🖕🏽", "military_helmet": "🪖", "military_medal": "🎖", "milky_way": "🌌", "minibus": "🚐", "minus": "➖", "mirror": "🪞", "mirror_ball": "🪩", "moai": "🗿", "mobile_phone": "📱", "mobile_phone_off": "📴", "mobile_phone_with_arrow": "📲", "money-mouth_face": "🤑", "money_bag": "💰", "money_with_wings": "💸", "monkey": "🐒", "monkey_face": "🐵", "monorail": "🚝", "moon_cake": "🥮", "moon_viewing_ceremony": "🎑", "moose": "🫎", "mosque": "🕌", "mosquito": "🦟", "motor_boat": "🛥", "motor_scooter": "🛵", "motorcycle": "🏍", "motorized_wheelchair": "🦼", "motorway": "🛣", "mount_fuji": "🗻", "mountain": "⛰", "mountain_cableway": "🚠", "mountain_railway": "🚞", "mouse": "🐁", "mouse_face": "🐭", "mouse_trap": "🪤", "mouth": "👄", "movie_camera": "🎥", "multiply": "✖", "mushroom": "🍄", "musical_keyboard": "🎹", "musical_note": "🎵", "musical_notes": "🎶", "musical_score": "🎼", "muted_speaker": "🔇", "mx_claus": "🧑‍🎄", "mx_claus_dark_skin_tone": "🧑🏿‍🎄", "mx_claus_light_skin_tone": "🧑🏻‍🎄", "mx_claus_medium-dark_skin_tone": "🧑🏾‍🎄", "mx_claus_medium-light_skin_tone": "🧑🏼‍🎄", "mx_claus_medium_skin_tone": "🧑🏽‍🎄", "nail_polish": "💅", "nail_polish_dark_skin_tone": "💅🏿", "nail_polish_light_skin_tone": "💅🏻", "nail_polish_medium-dark_skin_tone": "💅🏾", "nail_polish_medium-light_skin_tone": "💅🏼", "nail_polish_medium_skin_tone": "💅🏽", "name_badge": "📛", "national_park": "🏞", "nauseated_face": "🤢", "nazar_amulet": "🧿", "necktie": "👔", "nerd_face": "🤓", "nest_with_eggs": "🪺", "nesting_dolls": "🪆", "neutral_face": "😐", "new_moon": "🌑", "new_moon_face": "🌚", "newspaper": "📰", "next_track_button": "⏭", "night_with_stars": "🌃", "nine-thirty": "🕤", "nine_o’clock": "🕘", "ninja": "🥷", "ninja_dark_skin_tone": "🥷🏿", "ninja_light_skin_tone": "🥷🏻", "ninja_medium-dark_skin_tone": "🥷🏾", "ninja_medium-light_skin_tone": "🥷🏼", "ninja_medium_skin_tone": "🥷🏽", "no_bicycles": "🚳", "no_entry": "⛔", "no_littering": "🚯", "no_mobile_phones": "📵", "no_one_under_eighteen": "🔞", "no_pedestrians": "🚷", "no_smoking": "🚭", "non-potable_water": "🚱", "nose": "👃", "nose_dark_skin_tone": "👃🏿", "nose_light_skin_tone": "👃🏻", "nose_medium-dark_skin_tone": "👃🏾", "nose_medium-light_skin_tone": "👃🏼", "nose_medium_skin_tone": "👃🏽", "notebook": "📓", "notebook_with_decorative_cover": "📔", "nut_and_bolt": "🔩", "octopus": "🐙", "oden": "🍢", "office_building": "🏢", "office_worker": "🧑‍💼", "office_worker_dark_skin_tone": "🧑🏿‍💼", "office_worker_light_skin_tone": "🧑🏻‍💼", "office_worker_medium-dark_skin_tone": "🧑🏾‍💼", "office_worker_medium-light_skin_tone": "🧑🏼‍💼", "office_worker_medium_skin_tone": "🧑🏽‍💼", "ogre": "👹", "oil_drum": "🛢", "old_key": "🗝", "old_man": "👴", "old_man_dark_skin_tone": "👴🏿", "old_man_light_skin_tone": "👴🏻", "old_man_medium-dark_skin_tone": "👴🏾", "old_man_medium-light_skin_tone": "👴🏼", "old_man_medium_skin_tone": "👴🏽", "old_woman": "👵", "old_woman_dark_skin_tone": "👵🏿", "old_woman_light_skin_tone": "👵🏻", "old_woman_medium-dark_skin_tone": "👵🏾", "old_woman_medium-light_skin_tone": "👵🏼", "old_woman_medium_skin_tone": "👵🏽", "older_person": "🧓", "older_person_dark_skin_tone": "🧓🏿", "older_person_light_skin_tone": "🧓🏻", "older_person_medium-dark_skin_tone": "🧓🏾", "older_person_medium-light_skin_tone": "🧓🏼", "older_person_medium_skin_tone": "🧓🏽", "olive": "🫒", "om": "🕉", "oncoming_automobile": "🚘", "oncoming_bus": "🚍", "oncoming_fist": "👊", "oncoming_fist_dark_skin_tone": "👊🏿", "oncoming_fist_light_skin_tone": "👊🏻", "oncoming_fist_medium-dark_skin_tone": "👊🏾", "oncoming_fist_medium-light_skin_tone": "👊🏼", "oncoming_fist_medium_skin_tone": "👊🏽", "oncoming_police_car": "🚔", "oncoming_taxi": "🚖", "one-piece_swimsuit": "🩱", "one-thirty": "🕜", "one_o’clock": "🕐", "onion": "🧅", "open_book": "📖", "open_file_folder": "📂", "open_hands": "👐", "open_hands_dark_skin_tone": "👐🏿", "open_hands_light_skin_tone": "👐🏻", "open_hands_medium-dark_skin_tone": "👐🏾", "open_hands_medium-light_skin_tone": "👐🏼", "open_hands_medium_skin_tone": "👐🏽", "open_mailbox_with_lowered_flag": "📭", "open_mailbox_with_raised_flag": "📬", "optical_disk": "💿", "orange_book": "📙", "orange_circle": "🟠", "orange_heart": "🧡", "orange_square": "🟧", "orangutan": "🦧", "orthodox_cross": "☦", "otter": "🦦", "outbox_tray": "📤", "owl": "🦉", "ox": "🐂", "oyster": "🦪", "package": "📦", "page_facing_up": "📄", "page_with_curl": "📃", "pager": "📟", "paintbrush": "🖌", "palm_down_hand": "🫳", "palm_down_hand_dark_skin_tone": "🫳🏿", "palm_down_hand_light_skin_tone": "🫳🏻", "palm_down_hand_medium-dark_skin_tone": "🫳🏾", "palm_down_hand_medium-light_skin_tone": "🫳🏼", "palm_down_hand_medium_skin_tone": "🫳🏽", "palm_tree": "🌴", "palm_up_hand": "🫴", "palm_up_hand_dark_skin_tone": "🫴🏿", "palm_up_hand_light_skin_tone": "🫴🏻", "palm_up_hand_medium-dark_skin_tone": "🫴🏾", "palm_up_hand_medium-light_skin_tone": "🫴🏼", "palm_up_hand_medium_skin_tone": "🫴🏽", "palms_up_together": "🤲", "palms_up_together_dark_skin_tone": "🤲🏿", "palms_up_together_light_skin_tone": "🤲🏻", "palms_up_together_medium-dark_skin_tone": "🤲🏾", "palms_up_together_medium-light_skin_tone": "🤲🏼", "palms_up_together_medium_skin_tone": "🤲🏽", "pancakes": "🥞", "panda": "🐼", "paperclip": "📎", "parachute": "🪂", "parrot": "🦜", "part_alternation_mark": "〽", "party_popper": "🎉", "partying_face": "🥳", "passenger_ship": "🛳", "passport_control": "🛂", "pause_button": "⏸", "paw_prints": "🐾", "pea_pod": "🫛", "peace_symbol": "☮", "peach": "🍑", "peacock": "🦚", "peanuts": "🥜", "pear": "🍐", "pen": "🖊", "pencil": "✏", "penguin": "🐧", "pensive_face": "😔", "people_holding_hands": "🧑‍🤝‍🧑", "people_holding_hands_dark_skin_tone": "🧑🏿‍🤝‍🧑🏿", "people_holding_hands_dark_skin_tone_light_skin_tone": "🧑🏿‍🤝‍🧑🏻", "people_holding_hands_dark_skin_tone_medium-dark_skin_tone": "🧑🏿‍🤝‍🧑🏾", "people_holding_hands_dark_skin_tone_medium-light_skin_tone": "🧑🏿‍🤝‍🧑🏼", "people_holding_hands_dark_skin_tone_medium_skin_tone": "🧑🏿‍🤝‍🧑🏽", "people_holding_hands_light_skin_tone": "🧑🏻‍🤝‍🧑🏻", "people_holding_hands_light_skin_tone_dark_skin_tone": "🧑🏻‍🤝‍🧑🏿", "people_holding_hands_light_skin_tone_medium-dark_skin_tone": "🧑🏻‍🤝‍🧑🏾", ( "people_holding_hands_light_skin_tone_medium-light_skin_tone" ): "🧑🏻‍🤝‍🧑🏼", "people_holding_hands_light_skin_tone_medium_skin_tone": "🧑🏻‍🤝‍🧑🏽", "people_holding_hands_medium-dark_skin_tone": "🧑🏾‍🤝‍🧑🏾", "people_holding_hands_medium-dark_skin_tone_dark_skin_tone": "🧑🏾‍🤝‍🧑🏿", "people_holding_hands_medium-dark_skin_tone_light_skin_tone": "🧑🏾‍🤝‍🧑🏻", ( "people_holding_hands_medium-dark_skin_tone_medium-light_skin_tone" ): "🧑🏾‍🤝‍🧑🏼", ( "people_holding_hands_medium-dark_skin_tone_medium_skin_tone" ): "🧑🏾‍🤝‍🧑🏽", "people_holding_hands_medium-light_skin_tone": "🧑🏼‍🤝‍🧑🏼", "people_holding_hands_medium-light_skin_tone_dark_skin_tone": "🧑🏼‍🤝‍🧑🏿", ( "people_holding_hands_medium-light_skin_tone_light_skin_tone" ): "🧑🏼‍🤝‍🧑🏻", ( "people_holding_hands_medium-light_skin_tone_medium-dark_skin_tone" ): "🧑🏼‍🤝‍🧑🏾", ( "people_holding_hands_medium-light_skin_tone_medium_skin_tone" ): "🧑🏼‍🤝‍🧑🏽", "people_holding_hands_medium_skin_tone": "🧑🏽‍🤝‍🧑🏽", "people_holding_hands_medium_skin_tone_dark_skin_tone": "🧑🏽‍🤝‍🧑🏿", "people_holding_hands_medium_skin_tone_light_skin_tone": "🧑🏽‍🤝‍🧑🏻", ( "people_holding_hands_medium_skin_tone_medium-dark_skin_tone" ): "🧑🏽‍🤝‍🧑🏾", ( "people_holding_hands_medium_skin_tone_medium-light_skin_tone" ): "🧑🏽‍🤝‍🧑🏼", "people_hugging": "🫂", "people_with_bunny_ears": "👯", "people_wrestling": "🤼", "performing_arts": "🎭", "persevering_face": "😣", "person": "🧑", "person_bald": "🧑‍🦲", "person_beard": "🧔", "person_biking": "🚴", "person_biking_dark_skin_tone": "🚴🏿", "person_biking_light_skin_tone": "🚴🏻", "person_biking_medium-dark_skin_tone": "🚴🏾", "person_biking_medium-light_skin_tone": "🚴🏼", "person_biking_medium_skin_tone": "🚴🏽", "person_blond_hair": "👱", "person_bouncing_ball": "⛹", "person_bouncing_ball_dark_skin_tone": "⛹🏿", "person_bouncing_ball_light_skin_tone": "⛹🏻", "person_bouncing_ball_medium-dark_skin_tone": "⛹🏾", "person_bouncing_ball_medium-light_skin_tone": "⛹🏼", "person_bouncing_ball_medium_skin_tone": "⛹🏽", "person_bowing": "🙇", "person_bowing_dark_skin_tone": "🙇🏿", "person_bowing_light_skin_tone": "🙇🏻", "person_bowing_medium-dark_skin_tone": "🙇🏾", "person_bowing_medium-light_skin_tone": "🙇🏼", "person_bowing_medium_skin_tone": "🙇🏽", "person_cartwheeling": "🤸", "person_cartwheeling_dark_skin_tone": "🤸🏿", "person_cartwheeling_light_skin_tone": "🤸🏻", "person_cartwheeling_medium-dark_skin_tone": "🤸🏾", "person_cartwheeling_medium-light_skin_tone": "🤸🏼", "person_cartwheeling_medium_skin_tone": "🤸🏽", "person_climbing": "🧗", "person_climbing_dark_skin_tone": "🧗🏿", "person_climbing_light_skin_tone": "🧗🏻", "person_climbing_medium-dark_skin_tone": "🧗🏾", "person_climbing_medium-light_skin_tone": "🧗🏼", "person_climbing_medium_skin_tone": "🧗🏽", "person_curly_hair": "🧑‍🦱", "person_dark_skin_tone": "🧑🏿", "person_dark_skin_tone_bald": "🧑🏿‍🦲", "person_dark_skin_tone_beard": "🧔🏿", "person_dark_skin_tone_blond_hair": "👱🏿", "person_dark_skin_tone_curly_hair": "🧑🏿‍🦱", "person_dark_skin_tone_red_hair": "🧑🏿‍🦰", "person_dark_skin_tone_white_hair": "🧑🏿‍🦳", "person_facepalming": "🤦", "person_facepalming_dark_skin_tone": "🤦🏿", "person_facepalming_light_skin_tone": "🤦🏻", "person_facepalming_medium-dark_skin_tone": "🤦🏾", "person_facepalming_medium-light_skin_tone": "🤦🏼", "person_facepalming_medium_skin_tone": "🤦🏽", "person_feeding_baby": "🧑‍🍼", "person_feeding_baby_dark_skin_tone": "🧑🏿‍🍼", "person_feeding_baby_light_skin_tone": "🧑🏻‍🍼", "person_feeding_baby_medium-dark_skin_tone": "🧑🏾‍🍼", "person_feeding_baby_medium-light_skin_tone": "🧑🏼‍🍼", "person_feeding_baby_medium_skin_tone": "🧑🏽‍🍼", "person_fencing": "🤺", "person_frowning": "🙍", "person_frowning_dark_skin_tone": "🙍🏿", "person_frowning_light_skin_tone": "🙍🏻", "person_frowning_medium-dark_skin_tone": "🙍🏾", "person_frowning_medium-light_skin_tone": "🙍🏼", "person_frowning_medium_skin_tone": "🙍🏽", "person_gesturing_NO": "🙅", "person_gesturing_NO_dark_skin_tone": "🙅🏿", "person_gesturing_NO_light_skin_tone": "🙅🏻", "person_gesturing_NO_medium-dark_skin_tone": "🙅🏾", "person_gesturing_NO_medium-light_skin_tone": "🙅🏼", "person_gesturing_NO_medium_skin_tone": "🙅🏽", "person_gesturing_OK": "🙆", "person_gesturing_OK_dark_skin_tone": "🙆🏿", "person_gesturing_OK_light_skin_tone": "🙆🏻", "person_gesturing_OK_medium-dark_skin_tone": "🙆🏾", "person_gesturing_OK_medium-light_skin_tone": "🙆🏼", "person_gesturing_OK_medium_skin_tone": "🙆🏽", "person_getting_haircut": "💇", "person_getting_haircut_dark_skin_tone": "💇🏿", "person_getting_haircut_light_skin_tone": "💇🏻", "person_getting_haircut_medium-dark_skin_tone": "💇🏾", "person_getting_haircut_medium-light_skin_tone": "💇🏼", "person_getting_haircut_medium_skin_tone": "💇🏽", "person_getting_massage": "💆", "person_getting_massage_dark_skin_tone": "💆🏿", "person_getting_massage_light_skin_tone": "💆🏻", "person_getting_massage_medium-dark_skin_tone": "💆🏾", "person_getting_massage_medium-light_skin_tone": "💆🏼", "person_getting_massage_medium_skin_tone": "💆🏽", "person_golfing": "🏌", "person_golfing_dark_skin_tone": "🏌🏿", "person_golfing_light_skin_tone": "🏌🏻", "person_golfing_medium-dark_skin_tone": "🏌🏾", "person_golfing_medium-light_skin_tone": "🏌🏼", "person_golfing_medium_skin_tone": "🏌🏽", "person_in_bed": "🛌", "person_in_bed_dark_skin_tone": "🛌🏿", "person_in_bed_light_skin_tone": "🛌🏻", "person_in_bed_medium-dark_skin_tone": "🛌🏾", "person_in_bed_medium-light_skin_tone": "🛌🏼", "person_in_bed_medium_skin_tone": "🛌🏽", "person_in_lotus_position": "🧘", "person_in_lotus_position_dark_skin_tone": "🧘🏿", "person_in_lotus_position_light_skin_tone": "🧘🏻", "person_in_lotus_position_medium-dark_skin_tone": "🧘🏾", "person_in_lotus_position_medium-light_skin_tone": "🧘🏼", "person_in_lotus_position_medium_skin_tone": "🧘🏽", "person_in_manual_wheelchair": "🧑‍🦽", "person_in_manual_wheelchair_dark_skin_tone": "🧑🏿‍🦽", "person_in_manual_wheelchair_light_skin_tone": "🧑🏻‍🦽", "person_in_manual_wheelchair_medium-dark_skin_tone": "🧑🏾‍🦽", "person_in_manual_wheelchair_medium-light_skin_tone": "🧑🏼‍🦽", "person_in_manual_wheelchair_medium_skin_tone": "🧑🏽‍🦽", "person_in_motorized_wheelchair": "🧑‍🦼", "person_in_motorized_wheelchair_dark_skin_tone": "🧑🏿‍🦼", "person_in_motorized_wheelchair_light_skin_tone": "🧑🏻‍🦼", "person_in_motorized_wheelchair_medium-dark_skin_tone": "🧑🏾‍🦼", "person_in_motorized_wheelchair_medium-light_skin_tone": "🧑🏼‍🦼", "person_in_motorized_wheelchair_medium_skin_tone": "🧑🏽‍🦼", "person_in_steamy_room": "🧖", "person_in_steamy_room_dark_skin_tone": "🧖🏿", "person_in_steamy_room_light_skin_tone": "🧖🏻", "person_in_steamy_room_medium-dark_skin_tone": "🧖🏾", "person_in_steamy_room_medium-light_skin_tone": "🧖🏼", "person_in_steamy_room_medium_skin_tone": "🧖🏽", "person_in_suit_levitating": "🕴", "person_in_suit_levitating_dark_skin_tone": "🕴🏿", "person_in_suit_levitating_light_skin_tone": "🕴🏻", "person_in_suit_levitating_medium-dark_skin_tone": "🕴🏾", "person_in_suit_levitating_medium-light_skin_tone": "🕴🏼", "person_in_suit_levitating_medium_skin_tone": "🕴🏽", "person_in_tuxedo": "🤵", "person_in_tuxedo_dark_skin_tone": "🤵🏿", "person_in_tuxedo_light_skin_tone": "🤵🏻", "person_in_tuxedo_medium-dark_skin_tone": "🤵🏾", "person_in_tuxedo_medium-light_skin_tone": "🤵🏼", "person_in_tuxedo_medium_skin_tone": "🤵🏽", "person_juggling": "🤹", "person_juggling_dark_skin_tone": "🤹🏿", "person_juggling_light_skin_tone": "🤹🏻", "person_juggling_medium-dark_skin_tone": "🤹🏾", "person_juggling_medium-light_skin_tone": "🤹🏼", "person_juggling_medium_skin_tone": "🤹🏽", "person_kneeling": "🧎", "person_kneeling_dark_skin_tone": "🧎🏿", "person_kneeling_light_skin_tone": "🧎🏻", "person_kneeling_medium-dark_skin_tone": "🧎🏾", "person_kneeling_medium-light_skin_tone": "🧎🏼", "person_kneeling_medium_skin_tone": "🧎🏽", "person_lifting_weights": "🏋", "person_lifting_weights_dark_skin_tone": "🏋🏿", "person_lifting_weights_light_skin_tone": "🏋🏻", "person_lifting_weights_medium-dark_skin_tone": "🏋🏾", "person_lifting_weights_medium-light_skin_tone": "🏋🏼", "person_lifting_weights_medium_skin_tone": "🏋🏽", "person_light_skin_tone": "🧑🏻", "person_light_skin_tone_bald": "🧑🏻‍🦲", "person_light_skin_tone_beard": "🧔🏻", "person_light_skin_tone_blond_hair": "👱🏻", "person_light_skin_tone_curly_hair": "🧑🏻‍🦱", "person_light_skin_tone_red_hair": "🧑🏻‍🦰", "person_light_skin_tone_white_hair": "🧑🏻‍🦳", "person_medium-dark_skin_tone": "🧑🏾", "person_medium-dark_skin_tone_bald": "🧑🏾‍🦲", "person_medium-dark_skin_tone_beard": "🧔🏾", "person_medium-dark_skin_tone_blond_hair": "👱🏾", "person_medium-dark_skin_tone_curly_hair": "🧑🏾‍🦱", "person_medium-dark_skin_tone_red_hair": "🧑🏾‍🦰", "person_medium-dark_skin_tone_white_hair": "🧑🏾‍🦳", "person_medium-light_skin_tone": "🧑🏼", "person_medium-light_skin_tone_bald": "🧑🏼‍🦲", "person_medium-light_skin_tone_beard": "🧔🏼", "person_medium-light_skin_tone_blond_hair": "👱🏼", "person_medium-light_skin_tone_curly_hair": "🧑🏼‍🦱", "person_medium-light_skin_tone_red_hair": "🧑🏼‍🦰", "person_medium-light_skin_tone_white_hair": "🧑🏼‍🦳", "person_medium_skin_tone": "🧑🏽", "person_medium_skin_tone_bald": "🧑🏽‍🦲", "person_medium_skin_tone_beard": "🧔🏽", "person_medium_skin_tone_blond_hair": "👱🏽", "person_medium_skin_tone_curly_hair": "🧑🏽‍🦱", "person_medium_skin_tone_red_hair": "🧑🏽‍🦰", "person_medium_skin_tone_white_hair": "🧑🏽‍🦳", "person_mountain_biking": "🚵", "person_mountain_biking_dark_skin_tone": "🚵🏿", "person_mountain_biking_light_skin_tone": "🚵🏻", "person_mountain_biking_medium-dark_skin_tone": "🚵🏾", "person_mountain_biking_medium-light_skin_tone": "🚵🏼", "person_mountain_biking_medium_skin_tone": "🚵🏽", "person_playing_handball": "🤾", "person_playing_handball_dark_skin_tone": "🤾🏿", "person_playing_handball_light_skin_tone": "🤾🏻", "person_playing_handball_medium-dark_skin_tone": "🤾🏾", "person_playing_handball_medium-light_skin_tone": "🤾🏼", "person_playing_handball_medium_skin_tone": "🤾🏽", "person_playing_water_polo": "🤽", "person_playing_water_polo_dark_skin_tone": "🤽🏿", "person_playing_water_polo_light_skin_tone": "🤽🏻", "person_playing_water_polo_medium-dark_skin_tone": "🤽🏾", "person_playing_water_polo_medium-light_skin_tone": "🤽🏼", "person_playing_water_polo_medium_skin_tone": "🤽🏽", "person_pouting": "🙎", "person_pouting_dark_skin_tone": "🙎🏿", "person_pouting_light_skin_tone": "🙎🏻", "person_pouting_medium-dark_skin_tone": "🙎🏾", "person_pouting_medium-light_skin_tone": "🙎🏼", "person_pouting_medium_skin_tone": "🙎🏽", "person_raising_hand": "🙋", "person_raising_hand_dark_skin_tone": "🙋🏿", "person_raising_hand_light_skin_tone": "🙋🏻", "person_raising_hand_medium-dark_skin_tone": "🙋🏾", "person_raising_hand_medium-light_skin_tone": "🙋🏼", "person_raising_hand_medium_skin_tone": "🙋🏽", "person_red_hair": "🧑‍🦰", "person_rowing_boat": "🚣", "person_rowing_boat_dark_skin_tone": "🚣🏿", "person_rowing_boat_light_skin_tone": "🚣🏻", "person_rowing_boat_medium-dark_skin_tone": "🚣🏾", "person_rowing_boat_medium-light_skin_tone": "🚣🏼", "person_rowing_boat_medium_skin_tone": "🚣🏽", "person_running": "🏃", "person_running_dark_skin_tone": "🏃🏿", "person_running_light_skin_tone": "🏃🏻", "person_running_medium-dark_skin_tone": "🏃🏾", "person_running_medium-light_skin_tone": "🏃🏼", "person_running_medium_skin_tone": "🏃🏽", "person_shrugging": "🤷", "person_shrugging_dark_skin_tone": "🤷🏿", "person_shrugging_light_skin_tone": "🤷🏻", "person_shrugging_medium-dark_skin_tone": "🤷🏾", "person_shrugging_medium-light_skin_tone": "🤷🏼", "person_shrugging_medium_skin_tone": "🤷🏽", "person_standing": "🧍", "person_standing_dark_skin_tone": "🧍🏿", "person_standing_light_skin_tone": "🧍🏻", "person_standing_medium-dark_skin_tone": "🧍🏾", "person_standing_medium-light_skin_tone": "🧍🏼", "person_standing_medium_skin_tone": "🧍🏽", "person_surfing": "🏄", "person_surfing_dark_skin_tone": "🏄🏿", "person_surfing_light_skin_tone": "🏄🏻", "person_surfing_medium-dark_skin_tone": "🏄🏾", "person_surfing_medium-light_skin_tone": "🏄🏼", "person_surfing_medium_skin_tone": "🏄🏽", "person_swimming": "🏊", "person_swimming_dark_skin_tone": "🏊🏿", "person_swimming_light_skin_tone": "🏊🏻", "person_swimming_medium-dark_skin_tone": "🏊🏾", "person_swimming_medium-light_skin_tone": "🏊🏼", "person_swimming_medium_skin_tone": "🏊🏽", "person_taking_bath": "🛀", "person_taking_bath_dark_skin_tone": "🛀🏿", "person_taking_bath_light_skin_tone": "🛀🏻", "person_taking_bath_medium-dark_skin_tone": "🛀🏾", "person_taking_bath_medium-light_skin_tone": "🛀🏼", "person_taking_bath_medium_skin_tone": "🛀🏽", "person_tipping_hand": "💁", "person_tipping_hand_dark_skin_tone": "💁🏿", "person_tipping_hand_light_skin_tone": "💁🏻", "person_tipping_hand_medium-dark_skin_tone": "💁🏾", "person_tipping_hand_medium-light_skin_tone": "💁🏼", "person_tipping_hand_medium_skin_tone": "💁🏽", "person_walking": "🚶", "person_walking_dark_skin_tone": "🚶🏿", "person_walking_light_skin_tone": "🚶🏻", "person_walking_medium-dark_skin_tone": "🚶🏾", "person_walking_medium-light_skin_tone": "🚶🏼", "person_walking_medium_skin_tone": "🚶🏽", "person_wearing_turban": "👳", "person_wearing_turban_dark_skin_tone": "👳🏿", "person_wearing_turban_light_skin_tone": "👳🏻", "person_wearing_turban_medium-dark_skin_tone": "👳🏾", "person_wearing_turban_medium-light_skin_tone": "👳🏼", "person_wearing_turban_medium_skin_tone": "👳🏽", "person_white_hair": "🧑‍🦳", "person_with_crown": "🫅", "person_with_crown_dark_skin_tone": "🫅🏿", "person_with_crown_light_skin_tone": "🫅🏻", "person_with_crown_medium-dark_skin_tone": "🫅🏾", "person_with_crown_medium-light_skin_tone": "🫅🏼", "person_with_crown_medium_skin_tone": "🫅🏽", "person_with_skullcap": "👲", "person_with_skullcap_dark_skin_tone": "👲🏿", "person_with_skullcap_light_skin_tone": "👲🏻", "person_with_skullcap_medium-dark_skin_tone": "👲🏾", "person_with_skullcap_medium-light_skin_tone": "👲🏼", "person_with_skullcap_medium_skin_tone": "👲🏽", "person_with_veil": "👰", "person_with_veil_dark_skin_tone": "👰🏿", "person_with_veil_light_skin_tone": "👰🏻", "person_with_veil_medium-dark_skin_tone": "👰🏾", "person_with_veil_medium-light_skin_tone": "👰🏼", "person_with_veil_medium_skin_tone": "👰🏽", "person_with_white_cane": "🧑‍🦯", "person_with_white_cane_dark_skin_tone": "🧑🏿‍🦯", "person_with_white_cane_light_skin_tone": "🧑🏻‍🦯", "person_with_white_cane_medium-dark_skin_tone": "🧑🏾‍🦯", "person_with_white_cane_medium-light_skin_tone": "🧑🏼‍🦯", "person_with_white_cane_medium_skin_tone": "🧑🏽‍🦯", "petri_dish": "🧫", "pick": "⛏", "pickup_truck": "🛻", "pie": "🥧", "pig": "🐖", "pig_face": "🐷", "pig_nose": "🐽", "pile_of_poo": "💩", "pill": "💊", "pilot": "🧑‍✈", "pilot_dark_skin_tone": "🧑🏿‍✈", "pilot_light_skin_tone": "🧑🏻‍✈", "pilot_medium-dark_skin_tone": "🧑🏾‍✈", "pilot_medium-light_skin_tone": "🧑🏼‍✈", "pilot_medium_skin_tone": "🧑🏽‍✈", "pinched_fingers": "🤌", "pinched_fingers_dark_skin_tone": "🤌🏿", "pinched_fingers_light_skin_tone": "🤌🏻", "pinched_fingers_medium-dark_skin_tone": "🤌🏾", "pinched_fingers_medium-light_skin_tone": "🤌🏼", "pinched_fingers_medium_skin_tone": "🤌🏽", "pinching_hand": "🤏", "pinching_hand_dark_skin_tone": "🤏🏿", "pinching_hand_light_skin_tone": "🤏🏻", "pinching_hand_medium-dark_skin_tone": "🤏🏾", "pinching_hand_medium-light_skin_tone": "🤏🏼", "pinching_hand_medium_skin_tone": "🤏🏽", "pine_decoration": "🎍", "pineapple": "🍍", "ping_pong": "🏓", "pink_heart": "🩷", "pirate_flag": "🏴‍☠", "pizza": "🍕", "piñata": "🪅", "placard": "🪧", "place_of_worship": "🛐", "play_button": "▶", "play_or_pause_button": "⏯", "playground_slide": "🛝", "pleading_face": "🥺", "plunger": "🪠", "plus": "➕", "polar_bear": "🐻‍❄", "police_car": "🚓", "police_car_light": "🚨", "police_officer": "👮", "police_officer_dark_skin_tone": "👮🏿", "police_officer_light_skin_tone": "👮🏻", "police_officer_medium-dark_skin_tone": "👮🏾", "police_officer_medium-light_skin_tone": "👮🏼", "police_officer_medium_skin_tone": "👮🏽", "poodle": "🐩", "pool_8_ball": "🎱", "popcorn": "🍿", "post_office": "🏤", "postal_horn": "📯", "postbox": "📮", "pot_of_food": "🍲", "potable_water": "🚰", "potato": "🥔", "potted_plant": "🪴", "poultry_leg": "🍗", "pound_banknote": "💷", "pouring_liquid": "🫗", "pouting_cat": "😾", "prayer_beads": "📿", "pregnant_man": "🫃", "pregnant_man_dark_skin_tone": "🫃🏿", "pregnant_man_light_skin_tone": "🫃🏻", "pregnant_man_medium-dark_skin_tone": "🫃🏾", "pregnant_man_medium-light_skin_tone": "🫃🏼", "pregnant_man_medium_skin_tone": "🫃🏽", "pregnant_person": "🫄", "pregnant_person_dark_skin_tone": "🫄🏿", "pregnant_person_light_skin_tone": "🫄🏻", "pregnant_person_medium-dark_skin_tone": "🫄🏾", "pregnant_person_medium-light_skin_tone": "🫄🏼", "pregnant_person_medium_skin_tone": "🫄🏽", "pregnant_woman": "🤰", "pregnant_woman_dark_skin_tone": "🤰🏿", "pregnant_woman_light_skin_tone": "🤰🏻", "pregnant_woman_medium-dark_skin_tone": "🤰🏾", "pregnant_woman_medium-light_skin_tone": "🤰🏼", "pregnant_woman_medium_skin_tone": "🤰🏽", "pretzel": "🥨", "prince": "🤴", "prince_dark_skin_tone": "🤴🏿", "prince_light_skin_tone": "🤴🏻", "prince_medium-dark_skin_tone": "🤴🏾", "prince_medium-light_skin_tone": "🤴🏼", "prince_medium_skin_tone": "🤴🏽", "princess": "👸", "princess_dark_skin_tone": "👸🏿", "princess_light_skin_tone": "👸🏻", "princess_medium-dark_skin_tone": "👸🏾", "princess_medium-light_skin_tone": "👸🏼", "princess_medium_skin_tone": "👸🏽", "printer": "🖨", "prohibited": "🚫", "purple_circle": "🟣", "purple_heart": "💜", "purple_square": "🟪", "purse": "👛", "pushpin": "📌", "puzzle_piece": "🧩", "rabbit": "🐇", "rabbit_face": "🐰", "raccoon": "🦝", "racing_car": "🏎", "radio": "📻", "radio_button": "🔘", "radioactive": "☢", "railway_car": "🚃", "railway_track": "🛤", "rainbow": "🌈", "rainbow_flag": "🏳‍🌈", "raised_back_of_hand": "🤚", "raised_back_of_hand_dark_skin_tone": "🤚🏿", "raised_back_of_hand_light_skin_tone": "🤚🏻", "raised_back_of_hand_medium-dark_skin_tone": "🤚🏾", "raised_back_of_hand_medium-light_skin_tone": "🤚🏼", "raised_back_of_hand_medium_skin_tone": "🤚🏽", "raised_fist": "✊", "raised_fist_dark_skin_tone": "✊🏿", "raised_fist_light_skin_tone": "✊🏻", "raised_fist_medium-dark_skin_tone": "✊🏾", "raised_fist_medium-light_skin_tone": "✊🏼", "raised_fist_medium_skin_tone": "✊🏽", "raised_hand": "✋", "raised_hand_dark_skin_tone": "✋🏿", "raised_hand_light_skin_tone": "✋🏻", "raised_hand_medium-dark_skin_tone": "✋🏾", "raised_hand_medium-light_skin_tone": "✋🏼", "raised_hand_medium_skin_tone": "✋🏽", "raising_hands": "🙌", "raising_hands_dark_skin_tone": "🙌🏿", "raising_hands_light_skin_tone": "🙌🏻", "raising_hands_medium-dark_skin_tone": "🙌🏾", "raising_hands_medium-light_skin_tone": "🙌🏼", "raising_hands_medium_skin_tone": "🙌🏽", "ram": "🐏", "rat": "🐀", "razor": "🪒", "receipt": "🧾", "record_button": "⏺", "recycling_symbol": "♻", "red_apple": "🍎", "red_circle": "🔴", "red_envelope": "🧧", "red_exclamation_mark": "❗", "red_hair": "🦰", "red_heart": "❤", "red_paper_lantern": "🏮", "red_question_mark": "❓", "red_square": "🟥", "red_triangle_pointed_down": "🔻", "red_triangle_pointed_up": "🔺", "registered": "®", "relieved_face": "😌", "reminder_ribbon": "🎗", "repeat_button": "🔁", "repeat_single_button": "🔂", "rescue_worker’s_helmet": "⛑", "restroom": "🚻", "reverse_button": "◀", "revolving_hearts": "💞", "rhinoceros": "🦏", "ribbon": "🎀", "rice_ball": "🍙", "rice_cracker": "🍘", "right-facing_fist": "🤜", "right-facing_fist_dark_skin_tone": "🤜🏿", "right-facing_fist_light_skin_tone": "🤜🏻", "right-facing_fist_medium-dark_skin_tone": "🤜🏾", "right-facing_fist_medium-light_skin_tone": "🤜🏼", "right-facing_fist_medium_skin_tone": "🤜🏽", "right_anger_bubble": "🗯", "right_arrow": "➡", "right_arrow_curving_down": "⤵", "right_arrow_curving_left": "↩", "right_arrow_curving_up": "⤴", "rightwards_hand": "🫱", "rightwards_hand_dark_skin_tone": "🫱🏿", "rightwards_hand_light_skin_tone": "🫱🏻", "rightwards_hand_medium-dark_skin_tone": "🫱🏾", "rightwards_hand_medium-light_skin_tone": "🫱🏼", "rightwards_hand_medium_skin_tone": "🫱🏽", "rightwards_pushing_hand": "🫸", "rightwards_pushing_hand_dark_skin_tone": "🫸🏿", "rightwards_pushing_hand_light_skin_tone": "🫸🏻", "rightwards_pushing_hand_medium-dark_skin_tone": "🫸🏾", "rightwards_pushing_hand_medium-light_skin_tone": "🫸🏼", "rightwards_pushing_hand_medium_skin_tone": "🫸🏽", "ring": "💍", "ring_buoy": "🛟", "ringed_planet": "🪐", "roasted_sweet_potato": "🍠", "robot": "🤖", "rock": "🪨", "rocket": "🚀", "roll_of_paper": "🧻", "rolled-up_newspaper": "🗞", "roller_coaster": "🎢", "roller_skate": "🛼", "rolling_on_the_floor_laughing": "🤣", "rooster": "🐓", "rose": "🌹", "rosette": "🏵", "round_pushpin": "📍", "rugby_football": "🏉", "running_shirt": "🎽", "running_shoe": "👟", "sad_but_relieved_face": "😥", "safety_pin": "🧷", "safety_vest": "🦺", "sailboat": "⛵", "sake": "🍶", "salt": "🧂", "saluting_face": "🫡", "sandwich": "🥪", "sari": "🥻", "satellite": "🛰", "satellite_antenna": "📡", "sauropod": "🦕", "saxophone": "🎷", "scarf": "🧣", "school": "🏫", "scientist": "🧑‍🔬", "scientist_dark_skin_tone": "🧑🏿‍🔬", "scientist_light_skin_tone": "🧑🏻‍🔬", "scientist_medium-dark_skin_tone": "🧑🏾‍🔬", "scientist_medium-light_skin_tone": "🧑🏼‍🔬", "scientist_medium_skin_tone": "🧑🏽‍🔬", "scissors": "✂", "scorpion": "🦂", "screwdriver": "🪛", "scroll": "📜", "seal": "🦭", "seat": "💺", "see-no-evil_monkey": "🙈", "see_no_evil": "🙈", "seedling": "🌱", "selfie": "🤳", "selfie_dark_skin_tone": "🤳🏿", "selfie_light_skin_tone": "🤳🏻", "selfie_medium-dark_skin_tone": "🤳🏾", "selfie_medium-light_skin_tone": "🤳🏼", "selfie_medium_skin_tone": "🤳🏽", "service_dog": "🐕‍🦺", "seven-thirty": "🕢", "seven_o’clock": "🕖", "sewing_needle": "🪡", "shaking_face": "🫨", "shallow_pan_of_food": "🥘", "shamrock": "☘", "shark": "🦈", "shaved_ice": "🍧", "sheaf_of_rice": "🌾", "shield": "🛡", "shinto_shrine": "⛩", "ship": "🚢", "shooting_star": "🌠", "shopping_bags": "🛍", "shopping_cart": "🛒", "shortcake": "🍰", "shorts": "🩳", "shower": "🚿", "shrimp": "🦐", "shuffle_tracks_button": "🔀", "shushing_face": "🤫", "sign_of_the_horns": "🤘", "sign_of_the_horns_dark_skin_tone": "🤘🏿", "sign_of_the_horns_light_skin_tone": "🤘🏻", "sign_of_the_horns_medium-dark_skin_tone": "🤘🏾", "sign_of_the_horns_medium-light_skin_tone": "🤘🏼", "sign_of_the_horns_medium_skin_tone": "🤘🏽", "singer": "🧑‍🎤", "singer_dark_skin_tone": "🧑🏿‍🎤", "singer_light_skin_tone": "🧑🏻‍🎤", "singer_medium-dark_skin_tone": "🧑🏾‍🎤", "singer_medium-light_skin_tone": "🧑🏼‍🎤", "singer_medium_skin_tone": "🧑🏽‍🎤", "six-thirty": "🕡", "six_o’clock": "🕕", "skateboard": "🛹", "skier": "⛷", "skis": "🎿", "skull": "💀", "skull_and_crossbones": "☠", "skunk": "🦨", "sled": "🛷", "sleeping_face": "😴", "sleepy_face": "😪", "slightly_frowning_face": "🙁", "slightly_smiling_face": "🙂", "slot_machine": "🎰", "sloth": "🦥", "small_airplane": "🛩", "small_blue_diamond": "🔹", "small_orange_diamond": "🔸", "smiling_cat_with_heart-eyes": "😻", "smiling_face": "☺", "smiling_face_with_halo": "😇", "smiling_face_with_heart-eyes": "😍", "smiling_face_with_hearts": "🥰", "smiling_face_with_horns": "😈", "smiling_face_with_open_hands": "🤗", "smiling_face_with_smiling_eyes": "😊", "smiling_face_with_sunglasses": "😎", "smiling_face_with_tear": "🥲", "smirking_face": "😏", "snail": "🐌", "snake": "🐍", "sneezing_face": "🤧", "snow-capped_mountain": "🏔", "snowboarder": "🏂", "snowboarder_dark_skin_tone": "🏂🏿", "snowboarder_light_skin_tone": "🏂🏻", "snowboarder_medium-dark_skin_tone": "🏂🏾", "snowboarder_medium-light_skin_tone": "🏂🏼", "snowboarder_medium_skin_tone": "🏂🏽", "snowflake": "❄", "snowman": "☃", "snowman_without_snow": "⛄", "soap": "🧼", "soccer_ball": "⚽", "socks": "🧦", "soft_ice_cream": "🍦", "softball": "🥎", "spade_suit": "♠", "spaghetti": "🍝", "sparkle": "❇", "sparkler": "🎇", "sparkles": "✨", "sparkling_heart": "💖", "speak-no-evil_monkey": "🙊", "speaker_high_volume": "🔊", "speaker_low_volume": "🔈", "speaker_medium_volume": "🔉", "speaking_head": "🗣", "speech_balloon": "💬", "speedboat": "🚤", "spider": "🕷", "spider_web": "🕸", "spiral_calendar": "🗓", "spiral_notepad": "🗒", "spiral_shell": "🐚", "sponge": "🧽", "spoon": "🥄", "sport_utility_vehicle": "🚙", "sports_medal": "🏅", "spouting_whale": "🐳", "squid": "🦑", "squinting_face_with_tongue": "😝", "stadium": "🏟", "star": "⭐", "star-struck": "🤩", "star_and_crescent": "☪", "star_of_David": "✡", "station": "🚉", "steaming_bowl": "🍜", "stethoscope": "🩺", "stop_button": "⏹", "stop_sign": "🛑", "stopwatch": "⏱", "straight_ruler": "📏", "strawberry": "🍓", "student": "🧑‍🎓", "student_dark_skin_tone": "🧑🏿‍🎓", "student_light_skin_tone": "🧑🏻‍🎓", "student_medium-dark_skin_tone": "🧑🏾‍🎓", "student_medium-light_skin_tone": "🧑🏼‍🎓", "student_medium_skin_tone": "🧑🏽‍🎓", "studio_microphone": "🎙", "stuffed_flatbread": "🥙", "sun": "☀", "sun_behind_cloud": "⛅", "sun_behind_large_cloud": "🌥", "sun_behind_rain_cloud": "🌦", "sun_behind_small_cloud": "🌤", "sun_with_face": "🌞", "sunflower": "🌻", "sunglasses": "🕶", "sunrise": "🌅", "sunrise_over_mountains": "🌄", "sunset": "🌇", "superhero": "🦸", "superhero_dark_skin_tone": "🦸🏿", "superhero_light_skin_tone": "🦸🏻", "superhero_medium-dark_skin_tone": "🦸🏾", "superhero_medium-light_skin_tone": "🦸🏼", "superhero_medium_skin_tone": "🦸🏽", "supervillain": "🦹", "supervillain_dark_skin_tone": "🦹🏿", "supervillain_light_skin_tone": "🦹🏻", "supervillain_medium-dark_skin_tone": "🦹🏾", "supervillain_medium-light_skin_tone": "🦹🏼", "supervillain_medium_skin_tone": "🦹🏽", "sushi": "🍣", "suspension_railway": "🚟", "swan": "🦢", "sweat_droplets": "💦", "synagogue": "🕍", "syringe": "💉", "t-shirt": "👕", "taco": "🌮", "takeout_box": "🥡", "tamale": "🫔", "tanabata_tree": "🎋", "tangerine": "🍊", "taxi": "🚕", "teacher": "🧑‍🏫", "teacher_dark_skin_tone": "🧑🏿‍🏫", "teacher_light_skin_tone": "🧑🏻‍🏫", "teacher_medium-dark_skin_tone": "🧑🏾‍🏫", "teacher_medium-light_skin_tone": "🧑🏼‍🏫", "teacher_medium_skin_tone": "🧑🏽‍🏫", "teacup_without_handle": "🍵", "teapot": "🫖", "tear-off_calendar": "📆", "technologist": "🧑‍💻", "technologist_dark_skin_tone": "🧑🏿‍💻", "technologist_light_skin_tone": "🧑🏻‍💻", "technologist_medium-dark_skin_tone": "🧑🏾‍💻", "technologist_medium-light_skin_tone": "🧑🏼‍💻", "technologist_medium_skin_tone": "🧑🏽‍💻", "teddy_bear": "🧸", "telephone": "☎", "telephone_receiver": "📞", "telescope": "🔭", "television": "📺", "ten-thirty": "🕥", "ten_o’clock": "🕙", "tennis": "🎾", "tent": "⛺", "test_tube": "🧪", "thermometer": "🌡", "thinking_face": "🤔", "thong_sandal": "🩴", "thought_balloon": "💭", "thread": "🧵", "three-thirty": "🕞", "three_o’clock": "🕒", "thumbs_down": "👎", "thumbs_down_dark_skin_tone": "👎🏿", "thumbs_down_light_skin_tone": "👎🏻", "thumbs_down_medium-dark_skin_tone": "👎🏾", "thumbs_down_medium-light_skin_tone": "👎🏼", "thumbs_down_medium_skin_tone": "👎🏽", "thumbs_up": "👍", "thumbs_up_dark_skin_tone": "👍🏿", "thumbs_up_light_skin_tone": "👍🏻", "thumbs_up_medium-dark_skin_tone": "👍🏾", "thumbs_up_medium-light_skin_tone": "👍🏼", "thumbs_up_medium_skin_tone": "👍🏽", "ticket": "🎫", "tiger": "🐅", "tiger_face": "🐯", "timer_clock": "⏲", "tired_face": "😫", "toilet": "🚽", "tomato": "🍅", "tongue": "👅", "toolbox": "🧰", "tooth": "🦷", "toothbrush": "🪥", "top_hat": "🎩", "tornado": "🌪", "trackball": "🖲", "tractor": "🚜", "trade_mark": "™", "train": "🚆", "tram": "🚊", "tram_car": "🚋", "transgender_flag": "🏳‍⚧", "transgender_symbol": "⚧", "triangular_flag": "🚩", "triangular_ruler": "📐", "trident_emblem": "🔱", "troll": "🧌", "trolleybus": "🚎", "trophy": "🏆", "tropical_drink": "🍹", "tropical_fish": "🐠", "trumpet": "🎺", "tulip": "🌷", "tumbler_glass": "🥃", "turkey": "🦃", "turtle": "🐢", "twelve-thirty": "🕧", "twelve_o’clock": "🕛", "two-hump_camel": "🐫", "two-thirty": "🕝", "two_hearts": "💕", "two_o’clock": "🕑", "umbrella": "☂", "umbrella_on_ground": "⛱", "umbrella_with_rain_drops": "☔", "unamused_face": "😒", "unicorn": "🦄", "unlocked": "🔓", "up-down_arrow": "↕", "up-left_arrow": "↖", "up-right_arrow": "↗", "up_arrow": "⬆", "upside-down_face": "🙃", "upwards_button": "🔼", "vampire": "🧛", "vampire_dark_skin_tone": "🧛🏿", "vampire_light_skin_tone": "🧛🏻", "vampire_medium-dark_skin_tone": "🧛🏾", "vampire_medium-light_skin_tone": "🧛🏼", "vampire_medium_skin_tone": "🧛🏽", "vertical_traffic_light": "🚦", "vibration_mode": "📳", "victory_hand": "✌", "victory_hand_dark_skin_tone": "✌🏿", "victory_hand_light_skin_tone": "✌🏻", "victory_hand_medium-dark_skin_tone": "✌🏾", "victory_hand_medium-light_skin_tone": "✌🏼", "victory_hand_medium_skin_tone": "✌🏽", "video_camera": "📹", "video_game": "🎮", "videocassette": "📼", "violin": "🎻", "volcano": "🌋", "volleyball": "🏐", "vulcan_salute": "🖖", "vulcan_salute_dark_skin_tone": "🖖🏿", "vulcan_salute_light_skin_tone": "🖖🏻", "vulcan_salute_medium-dark_skin_tone": "🖖🏾", "vulcan_salute_medium-light_skin_tone": "🖖🏼", "vulcan_salute_medium_skin_tone": "🖖🏽", "waffle": "🧇", "waning_crescent_moon": "🌘", "waning_gibbous_moon": "🌖", "warning": "⚠", "wastebasket": "🗑", "watch": "⌚", "water_buffalo": "🐃", "water_closet": "🚾", "water_pistol": "🔫", "water_wave": "🌊", "watermelon": "🍉", "waving_hand": "👋", "waving_hand_dark_skin_tone": "👋🏿", "waving_hand_light_skin_tone": "👋🏻", "waving_hand_medium-dark_skin_tone": "👋🏾", "waving_hand_medium-light_skin_tone": "👋🏼", "waving_hand_medium_skin_tone": "👋🏽", "wavy_dash": "〰", "waxing_crescent_moon": "🌒", "waxing_gibbous_moon": "🌔", "weary_cat": "🙀", "weary_face": "😩", "wedding": "💒", "whale": "🐋", "wheel": "🛞", "wheel_of_dharma": "☸", "wheelchair_symbol": "♿", "white_cane": "🦯", "white_circle": "⚪", "white_exclamation_mark": "❕", "white_flag": "🏳", "white_flower": "💮", "white_hair": "🦳", "white_heart": "🤍", "white_large_square": "⬜", "white_medium-small_square": "◽", "white_medium_square": "◻", "white_question_mark": "❔", "white_small_square": "▫", "white_square_button": "🔳", "wilted_flower": "🥀", "wind_chime": "🎐", "wind_face": "🌬", "window": "🪟", "wine_glass": "🍷", "wing": "🪽", "winking_face": "😉", "winking_face_with_tongue": "😜", "wireless": "🛜", "wolf": "🐺", "woman": "👩", "woman_and_man_holding_hands": "👫", "woman_and_man_holding_hands_dark_skin_tone": "👫🏿", "woman_and_man_holding_hands_dark_skin_tone_light_skin_tone": "👩🏿‍🤝‍👨🏻", ( "woman_and_man_holding_hands_dark_skin_tone_medium-dark_skin_tone" ): "👩🏿‍🤝‍👨🏾", ( "woman_and_man_holding_hands_dark_skin_tone_medium-light_skin_tone" ): "👩🏿‍🤝‍👨🏼", ( "woman_and_man_holding_hands_dark_skin_tone_medium_skin_tone" ): "👩🏿‍🤝‍👨🏽", "woman_and_man_holding_hands_light_skin_tone": "👫🏻", "woman_and_man_holding_hands_light_skin_tone_dark_skin_tone": "👩🏻‍🤝‍👨🏿", ( "woman_and_man_holding_hands_light_skin_tone_medium-dark_skin_tone" ): "👩🏻‍🤝‍👨🏾", ( "woman_and_man_holding_hands_light_skin_tone_medium-light_skin_tone" ): "👩🏻‍🤝‍👨🏼", ( "woman_and_man_holding_hands_light_skin_tone_medium_skin_tone" ): "👩🏻‍🤝‍👨🏽", "woman_and_man_holding_hands_medium-dark_skin_tone": "👫🏾", ( "woman_and_man_holding_hands_medium-dark_skin_tone_dark_skin_tone" ): "👩🏾‍🤝‍👨🏿", ( "woman_and_man_holding_hands_medium-dark_skin_tone_light_skin_tone" ): "👩🏾‍🤝‍👨🏻", ( "woman_and_man_holding_hands_medium" "-dark_skin_tone_medium-light_skin_tone" ): "👩🏾‍🤝‍👨🏼", ( "woman_and_man_holding_hands_medium-dark_skin_tone_medium_skin_tone" ): "👩🏾‍🤝‍👨🏽", "woman_and_man_holding_hands_medium-light_skin_tone": "👫🏼", ( "woman_and_man_holding_hands_medium-light_skin_tone_dark_skin_tone" ): "👩🏼‍🤝‍👨🏿", ( "woman_and_man_holding_hands_medium-light_skin_tone_light_skin_tone" ): "👩🏼‍🤝‍👨🏻", ( "woman_and_man_holding_hands_medium-" "light_skin_tone_medium-dark_skin_tone" ): "👩🏼‍🤝‍👨🏾", ( "woman_and_man_holding_hands_medium-light_skin_tone_medium_skin_tone" ): "👩🏼‍🤝‍👨🏽", "woman_and_man_holding_hands_medium_skin_tone": "👫🏽", ( "woman_and_man_holding_hands_medium_skin_tone_dark_skin_tone" ): "👩🏽‍🤝‍👨🏿", ( "woman_and_man_holding_hands_medium_skin_tone_light_skin_tone" ): "👩🏽‍🤝‍👨🏻", ( "woman_and_man_holding_hands_medium_skin_tone_medium-dark_skin_tone" ): "👩🏽‍🤝‍👨🏾", ( "woman_and_man_holding_hands_medium_skin_tone_medium-light_skin_tone" ): "👩🏽‍🤝‍👨🏼", "woman_artist": "👩‍🎨", "woman_artist_dark_skin_tone": "👩🏿‍🎨", "woman_artist_light_skin_tone": "👩🏻‍🎨", "woman_artist_medium-dark_skin_tone": "👩🏾‍🎨", "woman_artist_medium-light_skin_tone": "👩🏼‍🎨", "woman_artist_medium_skin_tone": "👩🏽‍🎨", "woman_astronaut": "👩‍🚀", "woman_astronaut_dark_skin_tone": "👩🏿‍🚀", "woman_astronaut_light_skin_tone": "👩🏻‍🚀", "woman_astronaut_medium-dark_skin_tone": "👩🏾‍🚀", "woman_astronaut_medium-light_skin_tone": "👩🏼‍🚀", "woman_astronaut_medium_skin_tone": "👩🏽‍🚀", "woman_bald": "👩‍🦲", "woman_beard": "🧔‍♀", "woman_biking": "🚴‍♀", "woman_biking_dark_skin_tone": "🚴🏿‍♀", "woman_biking_light_skin_tone": "🚴🏻‍♀", "woman_biking_medium-dark_skin_tone": "🚴🏾‍♀", "woman_biking_medium-light_skin_tone": "🚴🏼‍♀", "woman_biking_medium_skin_tone": "🚴🏽‍♀", "woman_blond_hair": "👱‍♀", "woman_bouncing_ball": "⛹‍♀", "woman_bouncing_ball_dark_skin_tone": "⛹🏿‍♀", "woman_bouncing_ball_light_skin_tone": "⛹🏻‍♀", "woman_bouncing_ball_medium-dark_skin_tone": "⛹🏾‍♀", "woman_bouncing_ball_medium-light_skin_tone": "⛹🏼‍♀", "woman_bouncing_ball_medium_skin_tone": "⛹🏽‍♀", "woman_bowing": "🙇‍♀", "woman_bowing_dark_skin_tone": "🙇🏿‍♀", "woman_bowing_light_skin_tone": "🙇🏻‍♀", "woman_bowing_medium-dark_skin_tone": "🙇🏾‍♀", "woman_bowing_medium-light_skin_tone": "🙇🏼‍♀", "woman_bowing_medium_skin_tone": "🙇🏽‍♀", "woman_cartwheeling": "🤸‍♀", "woman_cartwheeling_dark_skin_tone": "🤸🏿‍♀", "woman_cartwheeling_light_skin_tone": "🤸🏻‍♀", "woman_cartwheeling_medium-dark_skin_tone": "🤸🏾‍♀", "woman_cartwheeling_medium-light_skin_tone": "🤸🏼‍♀", "woman_cartwheeling_medium_skin_tone": "🤸🏽‍♀", "woman_climbing": "🧗‍♀", "woman_climbing_dark_skin_tone": "🧗🏿‍♀", "woman_climbing_light_skin_tone": "🧗🏻‍♀", "woman_climbing_medium-dark_skin_tone": "🧗🏾‍♀", "woman_climbing_medium-light_skin_tone": "🧗🏼‍♀", "woman_climbing_medium_skin_tone": "🧗🏽‍♀", "woman_construction_worker": "👷‍♀", "woman_construction_worker_dark_skin_tone": "👷🏿‍♀", "woman_construction_worker_light_skin_tone": "👷🏻‍♀", "woman_construction_worker_medium-dark_skin_tone": "👷🏾‍♀", "woman_construction_worker_medium-light_skin_tone": "👷🏼‍♀", "woman_construction_worker_medium_skin_tone": "👷🏽‍♀", "woman_cook": "👩‍🍳", "woman_cook_dark_skin_tone": "👩🏿‍🍳", "woman_cook_light_skin_tone": "👩🏻‍🍳", "woman_cook_medium-dark_skin_tone": "👩🏾‍🍳", "woman_cook_medium-light_skin_tone": "👩🏼‍🍳", "woman_cook_medium_skin_tone": "👩🏽‍🍳", "woman_curly_hair": "👩‍🦱", "woman_dancing": "💃", "woman_dancing_dark_skin_tone": "💃🏿", "woman_dancing_light_skin_tone": "💃🏻", "woman_dancing_medium-dark_skin_tone": "💃🏾", "woman_dancing_medium-light_skin_tone": "💃🏼", "woman_dancing_medium_skin_tone": "💃🏽", "woman_dark_skin_tone": "👩🏿", "woman_dark_skin_tone_bald": "👩🏿‍🦲", "woman_dark_skin_tone_beard": "🧔🏿‍♀", "woman_dark_skin_tone_blond_hair": "👱🏿‍♀", "woman_dark_skin_tone_curly_hair": "👩🏿‍🦱", "woman_dark_skin_tone_red_hair": "👩🏿‍🦰", "woman_dark_skin_tone_white_hair": "👩🏿‍🦳", "woman_detective": "🕵‍♀", "woman_detective_dark_skin_tone": "🕵🏿‍♀", "woman_detective_light_skin_tone": "🕵🏻‍♀", "woman_detective_medium-dark_skin_tone": "🕵🏾‍♀", "woman_detective_medium-light_skin_tone": "🕵🏼‍♀", "woman_detective_medium_skin_tone": "🕵🏽‍♀", "woman_elf": "🧝‍♀", "woman_elf_dark_skin_tone": "🧝🏿‍♀", "woman_elf_light_skin_tone": "🧝🏻‍♀", "woman_elf_medium-dark_skin_tone": "🧝🏾‍♀", "woman_elf_medium-light_skin_tone": "🧝🏼‍♀", "woman_elf_medium_skin_tone": "🧝🏽‍♀", "woman_facepalming": "🤦‍♀", "woman_facepalming_dark_skin_tone": "🤦🏿‍♀", "woman_facepalming_light_skin_tone": "🤦🏻‍♀", "woman_facepalming_medium-dark_skin_tone": "🤦🏾‍♀", "woman_facepalming_medium-light_skin_tone": "🤦🏼‍♀", "woman_facepalming_medium_skin_tone": "🤦🏽‍♀", "woman_factory_worker": "👩‍🏭", "woman_factory_worker_dark_skin_tone": "👩🏿‍🏭", "woman_factory_worker_light_skin_tone": "👩🏻‍🏭", "woman_factory_worker_medium-dark_skin_tone": "👩🏾‍🏭", "woman_factory_worker_medium-light_skin_tone": "👩🏼‍🏭", "woman_factory_worker_medium_skin_tone": "👩🏽‍🏭", "woman_fairy": "🧚‍♀", "woman_fairy_dark_skin_tone": "🧚🏿‍♀", "woman_fairy_light_skin_tone": "🧚🏻‍♀", "woman_fairy_medium-dark_skin_tone": "🧚🏾‍♀", "woman_fairy_medium-light_skin_tone": "🧚🏼‍♀", "woman_fairy_medium_skin_tone": "🧚🏽‍♀", "woman_farmer": "👩‍🌾", "woman_farmer_dark_skin_tone": "👩🏿‍🌾", "woman_farmer_light_skin_tone": "👩🏻‍🌾", "woman_farmer_medium-dark_skin_tone": "👩🏾‍🌾", "woman_farmer_medium-light_skin_tone": "👩🏼‍🌾", "woman_farmer_medium_skin_tone": "👩🏽‍🌾", "woman_feeding_baby": "👩‍🍼", "woman_feeding_baby_dark_skin_tone": "👩🏿‍🍼", "woman_feeding_baby_light_skin_tone": "👩🏻‍🍼", "woman_feeding_baby_medium-dark_skin_tone": "👩🏾‍🍼", "woman_feeding_baby_medium-light_skin_tone": "👩🏼‍🍼", "woman_feeding_baby_medium_skin_tone": "👩🏽‍🍼", "woman_firefighter": "👩‍🚒", "woman_firefighter_dark_skin_tone": "👩🏿‍🚒", "woman_firefighter_light_skin_tone": "👩🏻‍🚒", "woman_firefighter_medium-dark_skin_tone": "👩🏾‍🚒", "woman_firefighter_medium-light_skin_tone": "👩🏼‍🚒", "woman_firefighter_medium_skin_tone": "👩🏽‍🚒", "woman_frowning": "🙍‍♀", "woman_frowning_dark_skin_tone": "🙍🏿‍♀", "woman_frowning_light_skin_tone": "🙍🏻‍♀", "woman_frowning_medium-dark_skin_tone": "🙍🏾‍♀", "woman_frowning_medium-light_skin_tone": "🙍🏼‍♀", "woman_frowning_medium_skin_tone": "🙍🏽‍♀", "woman_genie": "🧞‍♀", "woman_gesturing_NO": "🙅‍♀", "woman_gesturing_NO_dark_skin_tone": "🙅🏿‍♀", "woman_gesturing_NO_light_skin_tone": "🙅🏻‍♀", "woman_gesturing_NO_medium-dark_skin_tone": "🙅🏾‍♀", "woman_gesturing_NO_medium-light_skin_tone": "🙅🏼‍♀", "woman_gesturing_NO_medium_skin_tone": "🙅🏽‍♀", "woman_gesturing_OK": "🙆‍♀", "woman_gesturing_OK_dark_skin_tone": "🙆🏿‍♀", "woman_gesturing_OK_light_skin_tone": "🙆🏻‍♀", "woman_gesturing_OK_medium-dark_skin_tone": "🙆🏾‍♀", "woman_gesturing_OK_medium-light_skin_tone": "🙆🏼‍♀", "woman_gesturing_OK_medium_skin_tone": "🙆🏽‍♀", "woman_getting_haircut": "💇‍♀", "woman_getting_haircut_dark_skin_tone": "💇🏿‍♀", "woman_getting_haircut_light_skin_tone": "💇🏻‍♀", "woman_getting_haircut_medium-dark_skin_tone": "💇🏾‍♀", "woman_getting_haircut_medium-light_skin_tone": "💇🏼‍♀", "woman_getting_haircut_medium_skin_tone": "💇🏽‍♀", "woman_getting_massage": "💆‍♀", "woman_getting_massage_dark_skin_tone": "💆🏿‍♀", "woman_getting_massage_light_skin_tone": "💆🏻‍♀", "woman_getting_massage_medium-dark_skin_tone": "💆🏾‍♀", "woman_getting_massage_medium-light_skin_tone": "💆🏼‍♀", "woman_getting_massage_medium_skin_tone": "💆🏽‍♀", "woman_golfing": "🏌‍♀", "woman_golfing_dark_skin_tone": "🏌🏿‍♀", "woman_golfing_light_skin_tone": "🏌🏻‍♀", "woman_golfing_medium-dark_skin_tone": "🏌🏾‍♀", "woman_golfing_medium-light_skin_tone": "🏌🏼‍♀", "woman_golfing_medium_skin_tone": "🏌🏽‍♀", "woman_guard": "💂‍♀", "woman_guard_dark_skin_tone": "💂🏿‍♀", "woman_guard_light_skin_tone": "💂🏻‍♀", "woman_guard_medium-dark_skin_tone": "💂🏾‍♀", "woman_guard_medium-light_skin_tone": "💂🏼‍♀", "woman_guard_medium_skin_tone": "💂🏽‍♀", "woman_health_worker": "👩‍⚕", "woman_health_worker_dark_skin_tone": "👩🏿‍⚕", "woman_health_worker_light_skin_tone": "👩🏻‍⚕", "woman_health_worker_medium-dark_skin_tone": "👩🏾‍⚕", "woman_health_worker_medium-light_skin_tone": "👩🏼‍⚕", "woman_health_worker_medium_skin_tone": "👩🏽‍⚕", "woman_in_lotus_position": "🧘‍♀", "woman_in_lotus_position_dark_skin_tone": "🧘🏿‍♀", "woman_in_lotus_position_light_skin_tone": "🧘🏻‍♀", "woman_in_lotus_position_medium-dark_skin_tone": "🧘🏾‍♀", "woman_in_lotus_position_medium-light_skin_tone": "🧘🏼‍♀", "woman_in_lotus_position_medium_skin_tone": "🧘🏽‍♀", "woman_in_manual_wheelchair": "👩‍🦽", "woman_in_manual_wheelchair_dark_skin_tone": "👩🏿‍🦽", "woman_in_manual_wheelchair_light_skin_tone": "👩🏻‍🦽", "woman_in_manual_wheelchair_medium-dark_skin_tone": "👩🏾‍🦽", "woman_in_manual_wheelchair_medium-light_skin_tone": "👩🏼‍🦽", "woman_in_manual_wheelchair_medium_skin_tone": "👩🏽‍🦽", "woman_in_motorized_wheelchair": "👩‍🦼", "woman_in_motorized_wheelchair_dark_skin_tone": "👩🏿‍🦼", "woman_in_motorized_wheelchair_light_skin_tone": "👩🏻‍🦼", "woman_in_motorized_wheelchair_medium-dark_skin_tone": "👩🏾‍🦼", "woman_in_motorized_wheelchair_medium-light_skin_tone": "👩🏼‍🦼", "woman_in_motorized_wheelchair_medium_skin_tone": "👩🏽‍🦼", "woman_in_steamy_room": "🧖‍♀", "woman_in_steamy_room_dark_skin_tone": "🧖🏿‍♀", "woman_in_steamy_room_light_skin_tone": "🧖🏻‍♀", "woman_in_steamy_room_medium-dark_skin_tone": "🧖🏾‍♀", "woman_in_steamy_room_medium-light_skin_tone": "🧖🏼‍♀", "woman_in_steamy_room_medium_skin_tone": "🧖🏽‍♀", "woman_in_tuxedo": "🤵‍♀", "woman_in_tuxedo_dark_skin_tone": "🤵🏿‍♀", "woman_in_tuxedo_light_skin_tone": "🤵🏻‍♀", "woman_in_tuxedo_medium-dark_skin_tone": "🤵🏾‍♀", "woman_in_tuxedo_medium-light_skin_tone": "🤵🏼‍♀", "woman_in_tuxedo_medium_skin_tone": "🤵🏽‍♀", "woman_judge": "👩‍⚖", "woman_judge_dark_skin_tone": "👩🏿‍⚖", "woman_judge_light_skin_tone": "👩🏻‍⚖", "woman_judge_medium-dark_skin_tone": "👩🏾‍⚖", "woman_judge_medium-light_skin_tone": "👩🏼‍⚖", "woman_judge_medium_skin_tone": "👩🏽‍⚖", "woman_juggling": "🤹‍♀", "woman_juggling_dark_skin_tone": "🤹🏿‍♀", "woman_juggling_light_skin_tone": "🤹🏻‍♀", "woman_juggling_medium-dark_skin_tone": "🤹🏾‍♀", "woman_juggling_medium-light_skin_tone": "🤹🏼‍♀", "woman_juggling_medium_skin_tone": "🤹🏽‍♀", "woman_kneeling": "🧎‍♀", "woman_kneeling_dark_skin_tone": "🧎🏿‍♀", "woman_kneeling_light_skin_tone": "🧎🏻‍♀", "woman_kneeling_medium-dark_skin_tone": "🧎🏾‍♀", "woman_kneeling_medium-light_skin_tone": "🧎🏼‍♀", "woman_kneeling_medium_skin_tone": "🧎🏽‍♀", "woman_lifting_weights": "🏋‍♀", "woman_lifting_weights_dark_skin_tone": "🏋🏿‍♀", "woman_lifting_weights_light_skin_tone": "🏋🏻‍♀", "woman_lifting_weights_medium-dark_skin_tone": "🏋🏾‍♀", "woman_lifting_weights_medium-light_skin_tone": "🏋🏼‍♀", "woman_lifting_weights_medium_skin_tone": "🏋🏽‍♀", "woman_light_skin_tone": "👩🏻", "woman_light_skin_tone_bald": "👩🏻‍🦲", "woman_light_skin_tone_beard": "🧔🏻‍♀", "woman_light_skin_tone_blond_hair": "👱🏻‍♀", "woman_light_skin_tone_curly_hair": "👩🏻‍🦱", "woman_light_skin_tone_red_hair": "👩🏻‍🦰", "woman_light_skin_tone_white_hair": "👩🏻‍🦳", "woman_mage": "🧙‍♀", "woman_mage_dark_skin_tone": "🧙🏿‍♀", "woman_mage_light_skin_tone": "🧙🏻‍♀", "woman_mage_medium-dark_skin_tone": "🧙🏾‍♀", "woman_mage_medium-light_skin_tone": "🧙🏼‍♀", "woman_mage_medium_skin_tone": "🧙🏽‍♀", "woman_mechanic": "👩‍🔧", "woman_mechanic_dark_skin_tone": "👩🏿‍🔧", "woman_mechanic_light_skin_tone": "👩🏻‍🔧", "woman_mechanic_medium-dark_skin_tone": "👩🏾‍🔧", "woman_mechanic_medium-light_skin_tone": "👩🏼‍🔧", "woman_mechanic_medium_skin_tone": "👩🏽‍🔧", "woman_medium-dark_skin_tone": "👩🏾", "woman_medium-dark_skin_tone_bald": "👩🏾‍🦲", "woman_medium-dark_skin_tone_beard": "🧔🏾‍♀", "woman_medium-dark_skin_tone_blond_hair": "👱🏾‍♀", "woman_medium-dark_skin_tone_curly_hair": "👩🏾‍🦱", "woman_medium-dark_skin_tone_red_hair": "👩🏾‍🦰", "woman_medium-dark_skin_tone_white_hair": "👩🏾‍🦳", "woman_medium-light_skin_tone": "👩🏼", "woman_medium-light_skin_tone_bald": "👩🏼‍🦲", "woman_medium-light_skin_tone_beard": "🧔🏼‍♀", "woman_medium-light_skin_tone_blond_hair": "👱🏼‍♀", "woman_medium-light_skin_tone_curly_hair": "👩🏼‍🦱", "woman_medium-light_skin_tone_red_hair": "👩🏼‍🦰", "woman_medium-light_skin_tone_white_hair": "👩🏼‍🦳", "woman_medium_skin_tone": "👩🏽", "woman_medium_skin_tone_bald": "👩🏽‍🦲", "woman_medium_skin_tone_beard": "🧔🏽‍♀", "woman_medium_skin_tone_blond_hair": "👱🏽‍♀", "woman_medium_skin_tone_curly_hair": "👩🏽‍🦱", "woman_medium_skin_tone_red_hair": "👩🏽‍🦰", "woman_medium_skin_tone_white_hair": "👩🏽‍🦳", "woman_mountain_biking": "🚵‍♀", "woman_mountain_biking_dark_skin_tone": "🚵🏿‍♀", "woman_mountain_biking_light_skin_tone": "🚵🏻‍♀", "woman_mountain_biking_medium-dark_skin_tone": "🚵🏾‍♀", "woman_mountain_biking_medium-light_skin_tone": "🚵🏼‍♀", "woman_mountain_biking_medium_skin_tone": "🚵🏽‍♀", "woman_office_worker": "👩‍💼", "woman_office_worker_dark_skin_tone": "👩🏿‍💼", "woman_office_worker_light_skin_tone": "👩🏻‍💼", "woman_office_worker_medium-dark_skin_tone": "👩🏾‍💼", "woman_office_worker_medium-light_skin_tone": "👩🏼‍💼", "woman_office_worker_medium_skin_tone": "👩🏽‍💼", "woman_pilot": "👩‍✈", "woman_pilot_dark_skin_tone": "👩🏿‍✈", "woman_pilot_light_skin_tone": "👩🏻‍✈", "woman_pilot_medium-dark_skin_tone": "👩🏾‍✈", "woman_pilot_medium-light_skin_tone": "👩🏼‍✈", "woman_pilot_medium_skin_tone": "👩🏽‍✈", "woman_playing_handball": "🤾‍♀", "woman_playing_handball_dark_skin_tone": "🤾🏿‍♀", "woman_playing_handball_light_skin_tone": "🤾🏻‍♀", "woman_playing_handball_medium-dark_skin_tone": "🤾🏾‍♀", "woman_playing_handball_medium-light_skin_tone": "🤾🏼‍♀", "woman_playing_handball_medium_skin_tone": "🤾🏽‍♀", "woman_playing_water_polo": "🤽‍♀", "woman_playing_water_polo_dark_skin_tone": "🤽🏿‍♀", "woman_playing_water_polo_light_skin_tone": "🤽🏻‍♀", "woman_playing_water_polo_medium-dark_skin_tone": "🤽🏾‍♀", "woman_playing_water_polo_medium-light_skin_tone": "🤽🏼‍♀", "woman_playing_water_polo_medium_skin_tone": "🤽🏽‍♀", "woman_police_officer": "👮‍♀", "woman_police_officer_dark_skin_tone": "👮🏿‍♀", "woman_police_officer_light_skin_tone": "👮🏻‍♀", "woman_police_officer_medium-dark_skin_tone": "👮🏾‍♀", "woman_police_officer_medium-light_skin_tone": "👮🏼‍♀", "woman_police_officer_medium_skin_tone": "👮🏽‍♀", "woman_pouting": "🙎‍♀", "woman_pouting_dark_skin_tone": "🙎🏿‍♀", "woman_pouting_light_skin_tone": "🙎🏻‍♀", "woman_pouting_medium-dark_skin_tone": "🙎🏾‍♀", "woman_pouting_medium-light_skin_tone": "🙎🏼‍♀", "woman_pouting_medium_skin_tone": "🙎🏽‍♀", "woman_raising_hand": "🙋‍♀", "woman_raising_hand_dark_skin_tone": "🙋🏿‍♀", "woman_raising_hand_light_skin_tone": "🙋🏻‍♀", "woman_raising_hand_medium-dark_skin_tone": "🙋🏾‍♀", "woman_raising_hand_medium-light_skin_tone": "🙋🏼‍♀", "woman_raising_hand_medium_skin_tone": "🙋🏽‍♀", "woman_red_hair": "👩‍🦰", "woman_rowing_boat": "🚣‍♀", "woman_rowing_boat_dark_skin_tone": "🚣🏿‍♀", "woman_rowing_boat_light_skin_tone": "🚣🏻‍♀", "woman_rowing_boat_medium-dark_skin_tone": "🚣🏾‍♀", "woman_rowing_boat_medium-light_skin_tone": "🚣🏼‍♀", "woman_rowing_boat_medium_skin_tone": "🚣🏽‍♀", "woman_running": "🏃‍♀", "woman_running_dark_skin_tone": "🏃🏿‍♀", "woman_running_light_skin_tone": "🏃🏻‍♀", "woman_running_medium-dark_skin_tone": "🏃🏾‍♀", "woman_running_medium-light_skin_tone": "🏃🏼‍♀", "woman_running_medium_skin_tone": "🏃🏽‍♀", "woman_scientist": "👩‍🔬", "woman_scientist_dark_skin_tone": "👩🏿‍🔬", "woman_scientist_light_skin_tone": "👩🏻‍🔬", "woman_scientist_medium-dark_skin_tone": "👩🏾‍🔬", "woman_scientist_medium-light_skin_tone": "👩🏼‍🔬", "woman_scientist_medium_skin_tone": "👩🏽‍🔬", "woman_shrugging": "🤷‍♀", "woman_shrugging_dark_skin_tone": "🤷🏿‍♀", "woman_shrugging_light_skin_tone": "🤷🏻‍♀", "woman_shrugging_medium-dark_skin_tone": "🤷🏾‍♀", "woman_shrugging_medium-light_skin_tone": "🤷🏼‍♀", "woman_shrugging_medium_skin_tone": "🤷🏽‍♀", "woman_singer": "👩‍🎤", "woman_singer_dark_skin_tone": "👩🏿‍🎤", "woman_singer_light_skin_tone": "👩🏻‍🎤", "woman_singer_medium-dark_skin_tone": "👩🏾‍🎤", "woman_singer_medium-light_skin_tone": "👩🏼‍🎤", "woman_singer_medium_skin_tone": "👩🏽‍🎤", "woman_standing": "🧍‍♀", "woman_standing_dark_skin_tone": "🧍🏿‍♀", "woman_standing_light_skin_tone": "🧍🏻‍♀", "woman_standing_medium-dark_skin_tone": "🧍🏾‍♀", "woman_standing_medium-light_skin_tone": "🧍🏼‍♀", "woman_standing_medium_skin_tone": "🧍🏽‍♀", "woman_student": "👩‍🎓", "woman_student_dark_skin_tone": "👩🏿‍🎓", "woman_student_light_skin_tone": "👩🏻‍🎓", "woman_student_medium-dark_skin_tone": "👩🏾‍🎓", "woman_student_medium-light_skin_tone": "👩🏼‍🎓", "woman_student_medium_skin_tone": "👩🏽‍🎓", "woman_superhero": "🦸‍♀", "woman_superhero_dark_skin_tone": "🦸🏿‍♀", "woman_superhero_light_skin_tone": "🦸🏻‍♀", "woman_superhero_medium-dark_skin_tone": "🦸🏾‍♀", "woman_superhero_medium-light_skin_tone": "🦸🏼‍♀", "woman_superhero_medium_skin_tone": "🦸🏽‍♀", "woman_supervillain": "🦹‍♀", "woman_supervillain_dark_skin_tone": "🦹🏿‍♀", "woman_supervillain_light_skin_tone": "🦹🏻‍♀", "woman_supervillain_medium-dark_skin_tone": "🦹🏾‍♀", "woman_supervillain_medium-light_skin_tone": "🦹🏼‍♀", "woman_supervillain_medium_skin_tone": "🦹🏽‍♀", "woman_surfing": "🏄‍♀", "woman_surfing_dark_skin_tone": "🏄🏿‍♀", "woman_surfing_light_skin_tone": "🏄🏻‍♀", "woman_surfing_medium-dark_skin_tone": "🏄🏾‍♀", "woman_surfing_medium-light_skin_tone": "🏄🏼‍♀", "woman_surfing_medium_skin_tone": "🏄🏽‍♀", "woman_swimming": "🏊‍♀", "woman_swimming_dark_skin_tone": "🏊🏿‍♀", "woman_swimming_light_skin_tone": "🏊🏻‍♀", "woman_swimming_medium-dark_skin_tone": "🏊🏾‍♀", "woman_swimming_medium-light_skin_tone": "🏊🏼‍♀", "woman_swimming_medium_skin_tone": "🏊🏽‍♀", "woman_teacher": "👩‍🏫", "woman_teacher_dark_skin_tone": "👩🏿‍🏫", "woman_teacher_light_skin_tone": "👩🏻‍🏫", "woman_teacher_medium-dark_skin_tone": "👩🏾‍🏫", "woman_teacher_medium-light_skin_tone": "👩🏼‍🏫", "woman_teacher_medium_skin_tone": "👩🏽‍🏫", "woman_technologist": "👩‍💻", "woman_technologist_dark_skin_tone": "👩🏿‍💻", "woman_technologist_light_skin_tone": "👩🏻‍💻", "woman_technologist_medium-dark_skin_tone": "👩🏾‍💻", "woman_technologist_medium-light_skin_tone": "👩🏼‍💻", "woman_technologist_medium_skin_tone": "👩🏽‍💻", "woman_tipping_hand": "💁‍♀", "woman_tipping_hand_dark_skin_tone": "💁🏿‍♀", "woman_tipping_hand_light_skin_tone": "💁🏻‍♀", "woman_tipping_hand_medium-dark_skin_tone": "💁🏾‍♀", "woman_tipping_hand_medium-light_skin_tone": "💁🏼‍♀", "woman_tipping_hand_medium_skin_tone": "💁🏽‍♀", "woman_vampire": "🧛‍♀", "woman_vampire_dark_skin_tone": "🧛🏿‍♀", "woman_vampire_light_skin_tone": "🧛🏻‍♀", "woman_vampire_medium-dark_skin_tone": "🧛🏾‍♀", "woman_vampire_medium-light_skin_tone": "🧛🏼‍♀", "woman_vampire_medium_skin_tone": "🧛🏽‍♀", "woman_walking": "🚶‍♀", "woman_walking_dark_skin_tone": "🚶🏿‍♀", "woman_walking_light_skin_tone": "🚶🏻‍♀", "woman_walking_medium-dark_skin_tone": "🚶🏾‍♀", "woman_walking_medium-light_skin_tone": "🚶🏼‍♀", "woman_walking_medium_skin_tone": "🚶🏽‍♀", "woman_wearing_turban": "👳‍♀", "woman_wearing_turban_dark_skin_tone": "👳🏿‍♀", "woman_wearing_turban_light_skin_tone": "👳🏻‍♀", "woman_wearing_turban_medium-dark_skin_tone": "👳🏾‍♀", "woman_wearing_turban_medium-light_skin_tone": "👳🏼‍♀", "woman_wearing_turban_medium_skin_tone": "👳🏽‍♀", "woman_white_hair": "👩‍🦳", "woman_with_headscarf": "🧕", "woman_with_headscarf_dark_skin_tone": "🧕🏿", "woman_with_headscarf_light_skin_tone": "🧕🏻", "woman_with_headscarf_medium-dark_skin_tone": "🧕🏾", "woman_with_headscarf_medium-light_skin_tone": "🧕🏼", "woman_with_headscarf_medium_skin_tone": "🧕🏽", "woman_with_veil": "👰‍♀", "woman_with_veil_dark_skin_tone": "👰🏿‍♀", "woman_with_veil_light_skin_tone": "👰🏻‍♀", "woman_with_veil_medium-dark_skin_tone": "👰🏾‍♀", "woman_with_veil_medium-light_skin_tone": "👰🏼‍♀", "woman_with_veil_medium_skin_tone": "👰🏽‍♀", "woman_with_white_cane": "👩‍🦯", "woman_with_white_cane_dark_skin_tone": "👩🏿‍🦯", "woman_with_white_cane_light_skin_tone": "👩🏻‍🦯", "woman_with_white_cane_medium-dark_skin_tone": "👩🏾‍🦯", "woman_with_white_cane_medium-light_skin_tone": "👩🏼‍🦯", "woman_with_white_cane_medium_skin_tone": "👩🏽‍🦯", "woman_zombie": "🧟‍♀", "woman’s_boot": "👢", "woman’s_clothes": "👚", "woman’s_hat": "👒", "woman’s_sandal": "👡", "women_holding_hands": "👭", "women_holding_hands_dark_skin_tone": "👭🏿", "women_holding_hands_dark_skin_tone_light_skin_tone": "👩🏿‍🤝‍👩🏻", "women_holding_hands_dark_skin_tone_medium-dark_skin_tone": "👩🏿‍🤝‍👩🏾", "women_holding_hands_dark_skin_tone_medium-light_skin_tone": "👩🏿‍🤝‍👩🏼", "women_holding_hands_dark_skin_tone_medium_skin_tone": "👩🏿‍🤝‍👩🏽", "women_holding_hands_light_skin_tone": "👭🏻", "women_holding_hands_light_skin_tone_dark_skin_tone": "👩🏻‍🤝‍👩🏿", "women_holding_hands_light_skin_tone_medium-dark_skin_tone": "👩🏻‍🤝‍👩🏾", "women_holding_hands_light_skin_tone_medium-light_skin_tone": "👩🏻‍🤝‍👩🏼", "women_holding_hands_light_skin_tone_medium_skin_tone": "👩🏻‍🤝‍👩🏽", "women_holding_hands_medium-dark_skin_tone": "👭🏾", "women_holding_hands_medium-dark_skin_tone_dark_skin_tone": "👩🏾‍🤝‍👩🏿", "women_holding_hands_medium-dark_skin_tone_light_skin_tone": "👩🏾‍🤝‍👩🏻", ( "women_holding_hands_medium-dark_skin_tone_medium-light_skin_tone" ): "👩🏾‍🤝‍👩🏼", "women_holding_hands_medium-dark_skin_tone_medium_skin_tone": "👩🏾‍🤝‍👩🏽", "women_holding_hands_medium-light_skin_tone": "👭🏼", "women_holding_hands_medium-light_skin_tone_dark_skin_tone": "👩🏼‍🤝‍👩🏿", "women_holding_hands_medium-light_skin_tone_light_skin_tone": "👩🏼‍🤝‍👩🏻", ( "women_holding_hands_medium-light_skin_tone_medium-dark_skin_tone" ): "👩🏼‍🤝‍👩🏾", ( "women_holding_hands_medium-light_skin_tone_medium_skin_tone" ): "👩🏼‍🤝‍👩🏽", "women_holding_hands_medium_skin_tone": "👭🏽", "women_holding_hands_medium_skin_tone_dark_skin_tone": "👩🏽‍🤝‍👩🏿", "women_holding_hands_medium_skin_tone_light_skin_tone": "👩🏽‍🤝‍👩🏻", "women_holding_hands_medium_skin_tone_medium-dark_skin_tone": "👩🏽‍🤝‍👩🏾", ( "women_holding_hands_medium_skin_tone_medium-light_skin_tone" ): "👩🏽‍🤝‍👩🏼", "women_with_bunny_ears": "👯‍♀", "women_wrestling": "🤼‍♀", "women’s_room": "🚺", "wood": "🪵", "woozy_face": "🥴", "flushed": "🥴", "world_map": "🗺", "worm": "🪱", "worried_face": "😟", "wrapped_gift": "🎁", "wrench": "🔧", "writing_hand": "✍", "writing_hand_dark_skin_tone": "✍🏿", "writing_hand_light_skin_tone": "✍🏻", "writing_hand_medium-dark_skin_tone": "✍🏾", "writing_hand_medium-light_skin_tone": "✍🏼", "writing_hand_medium_skin_tone": "✍🏽", "x-ray": "🩻", "yarn": "🧶", "yawning_face": "🥱", "yellow_circle": "🟡", "yellow_heart": "💛", "yellow_square": "🟨", "yen_banknote": "💴", "yin_yang": "☯", "yo-yo": "🪀", "zany_face": "🤪", "zebra": "🦓", "zipper-mouth_face": "🤐", "zombie": "🧟", "Åland_Islands": "🇦🇽", } ================================================ FILE: guide/content/en/guide/advanced/class-based-views.md ================================================ # Class Based Views ## Why use them? .. column:: ### The problem A common pattern when designing an API is to have multiple functionality on the same endpoint that depends upon the HTTP method. While both of these options work, they are not good design practices and may be hard to maintain over time as your project grows. .. column:: ```python @app.get("/foo") async def foo_get(request): ... @app.post("/foo") async def foo_post(request): ... @app.put("/foo") async def foo_put(request): ... @app.route("/bar", methods=["GET", "POST", "PATCH"]) async def bar(request): if request.method == "GET": ... elif request.method == "POST": ... elif request.method == "PATCH": ... ``` .. column:: ### The solution Class-based views are simply classes that implement response behavior to requests. They provide a way to compartmentalize handling of different HTTP request types at the same endpoint. .. column:: ```python from sanic.views import HTTPMethodView class FooBar(HTTPMethodView): async def get(self, request): ... async def post(self, request): ... async def put(self, request): ... app.add_route(FooBar.as_view(), "/foobar") ``` ## Defining a view A class-based view should subclass :class:`sanic.views.HTTPMethodView`. You can then implement class methods with the name of the corresponding HTTP method. If a request is received that has no defined method, a `405: Method not allowed` response will be generated. .. column:: To register a class-based view on an endpoint, the `app.add_route` method is used. The first argument should be the defined class with the method `as_view` invoked, and the second should be the URL endpoint. The available methods are: - get - post - put - patch - delete - head - options .. column:: ```python from sanic.views import HTTPMethodView from sanic.response import text class SimpleView(HTTPMethodView): def get(self, request): return text("I am get method") # You can also use async syntax async def post(self, request): return text("I am post method") def put(self, request): return text("I am put method") def patch(self, request): return text("I am patch method") def delete(self, request): return text("I am delete method") app.add_route(SimpleView.as_view(), "/") ``` ## Path parameters .. column:: You can use path parameters exactly as discussed in [the routing section](../basics/routing.md). .. column:: ```python class NameView(HTTPMethodView): def get(self, request, name): return text("Hello {}".format(name)) app.add_route(NameView.as_view(), "/") ``` ## Decorators As discussed in [the decorators section](../best-practices/decorators.md), often you will need to add functionality to endpoints with the use of decorators. You have two options with CBV: 1. Apply to _all_ HTTP methods in the view 2. Apply individually to HTTP methods in the view Let's see what the options look like: .. column:: ### Apply to all methods If you want to add any decorators to the class, you can set the `decorators` class variable. These will be applied to the class when `as_view` is called. .. column:: ```python class ViewWithDecorator(HTTPMethodView): decorators = [some_decorator_here] def get(self, request, name): return text("Hello I have a decorator") def post(self, request, name): return text("Hello I also have a decorator") app.add_route(ViewWithDecorator.as_view(), "/url") ``` .. column:: ### Apply to individual methods But if you just want to decorate some methods and not all methods, you can as shown here. .. column:: ```python class ViewWithSomeDecorator(HTTPMethodView): @staticmethod @some_decorator_here def get(request, name): return text("Hello I have a decorator") def post(self, request, name): return text("Hello I do not have any decorators") @some_decorator_here def patch(self, request, name): return text("Hello I have a decorator") ``` ## Generating a URL .. column:: This works just like [generating any other URL](../basics/routing.md#generating-a-url), except that the class name is a part of the endpoint. .. column:: ```python @app.route("/") def index(request): url = app.url_for("SpecialClassView") return redirect(url) class SpecialClassView(HTTPMethodView): def get(self, request): return text("Hello from the Special Class View!") app.add_route(SpecialClassView.as_view(), "/special_class_view") ``` ================================================ FILE: guide/content/en/guide/advanced/commands.md ================================================ # Custom CLI Commands Sanic ships with a [CLI](../running/running.md#running-via-command) for running the Sanic server. Sometimes, you may have the need to enhance that CLI to run your own custom commands. Commands are invoked using the following basic pattern: ```sh sanic path.to:app exec [--arg=value] ``` .. column:: To enable this, you can use your `Sanic` app instance to wrap functions that can be callable from the CLI using the `@app.command` decorator. .. column:: ```python @app.command async def hello(name="world"): print(f"Hello, {name}.") ``` .. column:: Now, you can easily invoke this command using the `exec` action. .. column:: ```sh sanic path.to:app exec hello --name=Adam ``` Command handlers can be either synchronous or asynchronous. The handler can accept any number of keyword arguments, which will be passed in from the CLI. .. column:: By default, the name of the function will be the command name. You can override this by passing the `name` argument to the decorator. .. column:: ```python @app.command(name="greet") async def hello(name="world"): print(f"Hello, {name}.") ``` ```sh sanic path.to:app exec greet --name=Adam ``` .. warning:: This feature is still in **BETA** and may change in future versions. There is no type coercion or validation on the arguments passed in from the CLI, and the CLI will ignore any return values from the command handler. Future enhancements and changes are likely. *Added in v24.12* ================================================ FILE: guide/content/en/guide/advanced/proxy-headers.md ================================================ # Proxy configuration When you use a reverse proxy server (e.g. nginx), the value of `request.ip` will contain the IP of a proxy, typically `127.0.0.1`. Almost always, this is **not** what you will want. Sanic may be configured to use proxy headers for determining the true client IP, available as `request.remote_addr`. The full external URL is also constructed from header fields _if available_. .. tip:: Heads up Without proper precautions, a malicious client may use proxy headers to spoof its own IP. To avoid such issues, Sanic does not use any proxy headers unless explicitly enabled. .. column:: Services behind reverse proxies must configure one or more of the following [configuration values](../deployment/configuration.md): - `FORWARDED_SECRET` - `REAL_IP_HEADER` - `PROXIES_COUNT` .. column:: ```python app.config.FORWARDED_SECRET = "super-duper-secret" app.config.REAL_IP_HEADER = "CF-Connecting-IP" app.config.PROXIES_COUNT = 2 ``` ## Forwarded header In order to use the `Forwarded` header, you should set `app.config.FORWARDED_SECRET` to a value known to the trusted proxy server. The secret is used to securely identify a specific proxy server. Sanic ignores any elements without the secret key, and will not even parse the header if no secret is set. All other proxy headers are ignored once a trusted forwarded element is found, as it already carries complete information about the client. To learn more about the `Forwarded` header, read the related [MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Forwarded) and [Nginx](https://www.nginx.com/resources/wiki/start/topics/examples/forwarded/) articles. ## Traditional proxy headers ### IP Headers When your proxy forwards you the IP address in a known header, you can tell Sanic what that is with the `REAL_IP_HEADER` config value. ### X-Forwarded-For This header typically contains a chain of IP addresses through each layer of a proxy. Setting `PROXIES_COUNT` tells Sanic how deep to look to get an actual IP address for the client. This value should equal the _expected_ number of IP addresses in the chain. ### Other X-headers If a client IP is found by one of these methods, Sanic uses the following headers for URL parts: - x-forwarded-proto - x-forwarded-host - x-forwarded-port - x-forwarded-path - x-scheme ## Examples In the following examples, all requests will assume that the endpoint looks like this: ```python @app.route("/fwd") async def forwarded(request): return json( { "remote_addr": request.remote_addr, "scheme": request.scheme, "server_name": request.server_name, "server_port": request.server_port, "forwarded": request.forwarded, } ) ``` --- ##### Example 1 Without configured FORWARDED_SECRET, x-headers should be respected ```sh curl localhost:8000/fwd \ -H 'Forwarded: for=1.1.1.1, for=injected;host=", for="[::2]";proto=https;host=me.tld;path="/app/";secret=mySecret,for=broken;;secret=b0rked, for=127.0.0.3;scheme=http;port=1234' \ -H "X-Real-IP: 127.0.0.2" \ -H "X-Forwarded-For: 127.0.1.1" \ -H "X-Scheme: ws" \ -H "Host: local.site" | jq ``` .. column:: ```python # Sanic application config app.config.PROXIES_COUNT = 1 app.config.REAL_IP_HEADER = "x-real-ip" ``` .. column:: ```bash # curl response { "remote_addr": "127.0.0.2", "scheme": "ws", "server_name": "local.site", "server_port": 80, "forwarded": { "for": "127.0.0.2", "proto": "ws" } } ``` --- ##### Example 2 FORWARDED_SECRET now configured ```sh curl localhost:8000/fwd \ -H 'Forwarded: for=1.1.1.1, for=injected;host=", for="[::2]";proto=https;host=me.tld;path="/app/";secret=mySecret,for=broken;;secret=b0rked, for=127.0.0.3;scheme=http;port=1234' \ -H "X-Real-IP: 127.0.0.2" \ -H "X-Forwarded-For: 127.0.1.1" \ -H "X-Scheme: ws" \ -H "Host: local.site" | jq ``` .. column:: ```python # Sanic application config app.config.PROXIES_COUNT = 1 app.config.REAL_IP_HEADER = "x-real-ip" app.config.FORWARDED_SECRET = "mySecret" ``` .. column:: ```bash # curl response { "remote_addr": "[::2]", "scheme": "https", "server_name": "me.tld", "server_port": 443, "forwarded": { "for": "[::2]", "proto": "https", "host": "me.tld", "path": "/app/", "secret": "mySecret" } } ``` --- ##### Example 3 Empty Forwarded header -> use X-headers ```sh curl localhost:8000/fwd \ -H "X-Real-IP: 127.0.0.2" \ -H "X-Forwarded-For: 127.0.1.1" \ -H "X-Scheme: ws" \ -H "Host: local.site" | jq ``` .. column:: ```python # Sanic application config app.config.PROXIES_COUNT = 1 app.config.REAL_IP_HEADER = "x-real-ip" app.config.FORWARDED_SECRET = "mySecret" ``` .. column:: ```bash # curl response { "remote_addr": "127.0.0.2", "scheme": "ws", "server_name": "local.site", "server_port": 80, "forwarded": { "for": "127.0.0.2", "proto": "ws" } } ``` --- ##### Example 4 Header present but not matching anything ```sh curl localhost:8000/fwd \ -H "Forwarded: nomatch" | jq ``` .. column:: ```python # Sanic application config app.config.PROXIES_COUNT = 1 app.config.REAL_IP_HEADER = "x-real-ip" app.config.FORWARDED_SECRET = "mySecret" ``` .. column:: ```bash # curl response { "remote_addr": "", "scheme": "http", "server_name": "localhost", "server_port": 8000, "forwarded": {} } ``` --- ##### Example 5 Forwarded header present but no matching secret -> use X-headers ```sh curl localhost:8000/fwd \ -H "Forwarded: for=1.1.1.1;secret=x, for=127.0.0.1" \ -H "X-Real-IP: 127.0.0.2" | jq ``` .. column:: ```python # Sanic application config app.config.PROXIES_COUNT = 1 app.config.REAL_IP_HEADER = "x-real-ip" app.config.FORWARDED_SECRET = "mySecret" ``` .. column:: ```bash # curl response { "remote_addr": "127.0.0.2", "scheme": "http", "server_name": "localhost", "server_port": 8000, "forwarded": { "for": "127.0.0.2" } } ``` --- ##### Example 6 Different formatting and hitting both ends of the header ```sh curl localhost:8000/fwd \ -H 'Forwarded: Secret="mySecret";For=127.0.0.4;Port=1234' | jq ``` .. column:: ```python # Sanic application config app.config.PROXIES_COUNT = 1 app.config.REAL_IP_HEADER = "x-real-ip" app.config.FORWARDED_SECRET = "mySecret" ``` .. column:: ```bash # curl response { "remote_addr": "127.0.0.4", "scheme": "http", "server_name": "localhost", "server_port": 1234, "forwarded": { "secret": "mySecret", "for": "127.0.0.4", "port": 1234 } } ``` --- ##### Example 7 Test escapes (modify this if you see anyone implementing quoted-pairs) ```sh curl localhost:8000/fwd \ -H 'Forwarded: for=test;quoted="\,x=x;y=\";secret=mySecret' | jq ``` .. column:: ```python # Sanic application config app.config.PROXIES_COUNT = 1 app.config.REAL_IP_HEADER = "x-real-ip" app.config.FORWARDED_SECRET = "mySecret" ``` .. column:: ```bash # curl response { "remote_addr": "test", "scheme": "http", "server_name": "localhost", "server_port": 8000, "forwarded": { "for": "test", "quoted": "\\,x=x;y=\\", "secret": "mySecret" } } ``` --- ##### Example 8 Secret insulated by malformed field #1 ```sh curl localhost:8000/fwd \ -H 'Forwarded: for=test;secret=mySecret;b0rked;proto=wss;' | jq ``` .. column:: ```python # Sanic application config app.config.PROXIES_COUNT = 1 app.config.REAL_IP_HEADER = "x-real-ip" app.config.FORWARDED_SECRET = "mySecret" ``` .. column:: ```bash # curl response { "remote_addr": "test", "scheme": "http", "server_name": "localhost", "server_port": 8000, "forwarded": { "for": "test", "secret": "mySecret" } } ``` --- ##### Example 9 Secret insulated by malformed field #2 ```sh curl localhost:8000/fwd \ -H 'Forwarded: for=test;b0rked;secret=mySecret;proto=wss' | jq ``` .. column:: ```python # Sanic application config app.config.PROXIES_COUNT = 1 app.config.REAL_IP_HEADER = "x-real-ip" app.config.FORWARDED_SECRET = "mySecret" ``` .. column:: ```bash # curl response { "remote_addr": "", "scheme": "wss", "server_name": "localhost", "server_port": 8000, "forwarded": { "secret": "mySecret", "proto": "wss" } } ``` --- ##### Example 10 Unexpected termination should not lose existing acceptable values ```sh curl localhost:8000/fwd \ -H 'Forwarded: b0rked;secret=mySecret;proto=wss' | jq ``` .. column:: ```python # Sanic application config app.config.PROXIES_COUNT = 1 app.config.REAL_IP_HEADER = "x-real-ip" app.config.FORWARDED_SECRET = "mySecret" ``` .. column:: ```bash # curl response { "remote_addr": "", "scheme": "wss", "server_name": "localhost", "server_port": 8000, "forwarded": { "secret": "mySecret", "proto": "wss" } } ``` --- ##### Example 11 Field normalization ```sh curl localhost:8000/fwd \ -H 'Forwarded: PROTO=WSS;BY="CAFE::8000";FOR=unknown;PORT=X;HOST="A:2";PATH="/With%20Spaces%22Quoted%22/sanicApp?key=val";SECRET=mySecret' | jq ``` .. column:: ```python # Sanic application config app.config.PROXIES_COUNT = 1 app.config.REAL_IP_HEADER = "x-real-ip" app.config.FORWARDED_SECRET = "mySecret" ``` .. column:: ```bash # curl response { "remote_addr": "", "scheme": "wss", "server_name": "a", "server_port": 2, "forwarded": { "proto": "wss", "by": "[cafe::8000]", "host": "a:2", "path": "/With Spaces\"Quoted\"/sanicApp?key=val", "secret": "mySecret" } } ``` --- ##### Example 12 Using "by" field as secret ```sh curl localhost:8000/fwd \ -H 'Forwarded: for=1.2.3.4; by=_proxySecret' | jq ``` .. column:: ```python # Sanic application config app.config.PROXIES_COUNT = 1 app.config.REAL_IP_HEADER = "x-real-ip" app.config.FORWARDED_SECRET = "_proxySecret" ``` .. column:: ```bash # curl response { "remote_addr": "1.2.3.4", "scheme": "http", "server_name": "localhost", "server_port": 8000, "forwarded": { "for": "1.2.3.4", "by": "_proxySecret" } } ``` ================================================ FILE: guide/content/en/guide/advanced/signals.md ================================================ # Signals Signals provide a way for one part of your application to tell another part that something happened. ```python @app.signal("user.registration.created") async def send_registration_email(**context): await send_email(context["email"], template="registration") @app.post("/register") async def handle_registration(request): await do_registration(request) await request.app.dispatch( "user.registration.created", context={"email": request.json.email} }) ``` ## Adding a signal .. column:: The API for adding a signal is very similar to adding a route. .. column:: ```python async def my_signal_handler(): print("something happened") app.add_signal(my_signal_handler, "something.happened.ohmy") ``` .. column:: But, perhaps a slightly more convenient method is to use the built-in decorators. .. column:: ```python @app.signal("something.happened.ohmy") async def my_signal_handler(): print("something happened") ``` .. column:: If the signal requires conditions, make sure to add them while adding the handler. .. column:: ```python async def my_signal_handler1(): print("something happened") app.add_signal( my_signal_handler, "something.happened.ohmy1", conditions={"some_condition": "value"} ) @app.signal("something.happened.ohmy2", conditions={"some_condition": "value"}) async def my_signal_handler2(): print("something happened") ``` .. column:: Signals can also be declared on blueprints .. column:: ```python bp = Blueprint("foo") @bp.signal("something.happened.ohmy") async def my_signal_handler(): print("something happened") ``` ## Built-in signals In addition to creating a new signal, there are a number of built-in signals that are dispatched from Sanic itself. These signals exist to provide developers with more opportunities to add functionality into the request and server lifecycles. *Added in v21.9* .. column:: You can attach them just like any other signal to an application or blueprint instance. .. column:: ```python @app.signal("http.lifecycle.complete") async def my_signal_handler(conn_info): print("Connection has been closed") ``` These signals are the signals that are available, along with the arguments that the handlers take, and the conditions that attach (if any). | Event name | Arguments | Conditions | | -------------------------- | ------------------------------- | --------------------------------------------------------- | | `http.routing.before` | request | | | `http.routing.after` | request, route, kwargs, handler | | | `http.handler.before` | request | | | `http.handler.after` | request | | | `http.lifecycle.begin` | conn_info | | | `http.lifecycle.read_head` | head | | | `http.lifecycle.request` | request | | | `http.lifecycle.handle` | request | | | `http.lifecycle.read_body` | body | | | `http.lifecycle.exception` | request, exception | | | `http.lifecycle.response` | request, response | | | `http.lifecycle.send` | data | | | `http.lifecycle.complete` | conn_info | | | `http.middleware.before` | request, response | `{"attach_to": "request"}` or `{"attach_to": "response"}` | | `http.middleware.after` | request, response | `{"attach_to": "request"}` or `{"attach_to": "response"}` | | `server.exception.report` | app, exception | | | `server.init.before` | app, loop | | | `server.init.after` | app, loop | | | `server.shutdown.before` | app, loop | | | `server.shutdown.after` | app, loop | | Version 22.9 added `http.handler.before` and `http.handler.after`. Version 23.6 added `server.exception.report`. .. column:: To make using the built-in signals easier, there is an `Enum` object that contains all of the allowed built-ins. With a modern IDE this will help so that you do not need to remember the full list of event names as strings. *Added in v21.12* .. column:: ```python from sanic.signals import Event @app.signal(Event.HTTP_LIFECYCLE_COMPLETE) async def my_signal_handler(conn_info): print("Connection has been closed") ``` ## Events .. column:: Signals are based off of an _event_. An event, is simply a string in the following pattern: .. column:: ``` namespace.reference.action ``` .. tip:: Events must have three parts. If you do not know what to use, try these patterns: - `my_app.something.happened` - `sanic.notice.hello` ### Event parameters .. column:: An event can be "dynamic" and declared using the same syntax as [path parameters](../basics/routing.md#path-parameters). This allows matching based upon arbitrary values. .. column:: ```python @app.signal("foo.bar.") async def signal_handler(thing): print(f"[signal_handler] {thing=}") @app.get("/") async def trigger(request): await app.dispatch("foo.bar.baz") return response.text("Done.") ``` Checkout [path parameters](../basics/routing.md#path-parameters) for more information on allowed type definitions. .. info:: Only the third part of an event (the action) may be dynamic: - `foo.bar.` 🆗 - `foo..baz` ❌ ### Waiting .. column:: In addition to executing a signal handler, your application can wait for an event to be triggered. .. column:: ```python await app.event("foo.bar.baz") ``` .. column:: **IMPORTANT**: waiting is a blocking function. Therefore, you likely will want this to run in a [background task](../basics/tasks.md). .. column:: ```python async def wait_for_event(app): while True: print("> waiting") await app.event("foo.bar.baz") print("> event found\n") @app.after_server_start async def after_server_start(app, loop): app.add_task(wait_for_event(app)) ``` .. column:: If your event was defined with a dynamic path, you can use `*` to catch any action. .. column:: ```python @app.signal("foo.bar.") ... await app.event("foo.bar.*") ``` ## Dispatching *In the future, Sanic will dispatch some events automatically to assist developers to hook into life cycle events.* .. column:: Dispatching an event will do two things: 1. execute any signal handlers defined on the event, and 2. resolve anything that is "waiting" for the event to complete. .. column:: ```python @app.signal("foo.bar.") async def foo_bar(thing): print(f"{thing=}") await app.dispatch("foo.bar.baz") ``` ``` thing=baz ``` ### Context .. column:: Sometimes you may find the need to pass extra information into the signal handler. In our first example above, we wanted our email registration process to have the email address for the user. .. column:: ```python @app.signal("user.registration.created") async def send_registration_email(**context): print(context) await app.dispatch( "user.registration.created", context={"hello": "world"} ) ``` ``` {'hello': 'world'} ``` .. tip:: FYI Signals are dispatched in a background task. ### Blueprints Dispatching blueprint signals works similar in concept to [middleware](../basics/middleware.md). Anything that is done from the app level, will trickle down to the blueprints. However, dispatching on a blueprint, will only execute the signals that are defined on that blueprint. .. column:: Perhaps an example is easier to explain: .. column:: ```python bp = Blueprint("bp") app_counter = 0 bp_counter = 0 @app.signal("foo.bar.baz") def app_signal(): nonlocal app_counter app_counter += 1 @bp.signal("foo.bar.baz") def bp_signal(): nonlocal bp_counter bp_counter += 1 ``` .. column:: Running `app.dispatch("foo.bar.baz")` will execute both signals. .. column:: ```python await app.dispatch("foo.bar.baz") assert app_counter == 1 assert bp_counter == 1 ``` .. column:: Running `bp.dispatch("foo.bar.baz")` will execute only the blueprint signal. .. column:: ```python await bp.dispatch("foo.bar.baz") assert app_counter == 1 assert bp_counter == 2 ``` ================================================ FILE: guide/content/en/guide/advanced/streaming.md ================================================ # Streaming ## Request streaming Sanic allows you to stream data sent by the client to begin processing data as the bytes arrive. .. column:: When enabled on an endpoint, you can stream the request body using `await request.stream.read()`. That method will return `None` when the body is completed. .. column:: ```python from sanic.views import stream class SimpleView(HTTPMethodView): @stream async def post(self, request): result = "" while True: body = await request.stream.read() if body is None: break result += body.decode("utf-8") return text(result) ``` .. column:: It also can be enabled with a keyword argument in the decorator... .. column:: ```python @app.post("/stream", stream=True) async def handler(request): ... body = await request.stream.read() ... ``` .. column:: ... or the `add_route()` method. .. column:: ```python bp.add_route( bp_handler, "/bp_stream", methods=["POST"], stream=True, ) ``` .. tip:: FYI Only post, put and patch decorators have stream argument. ## Response streaming .. column:: Sanic allows you to stream content to the client. .. column:: ```python @app.route("/") async def test(request): response = await request.respond(content_type="text/csv") await response.send("foo,") await response.send("bar") # Optionally, you can explicitly end the stream by calling: await response.eof() ``` This is useful in situations where you want to stream content to the client that originates in an external service, like a database. For example, you can stream database records to the client with the asynchronous cursor that `asyncpg` provides. ```python @app.route("/") async def index(request): response = await request.respond() conn = await asyncpg.connect(database='test') async with conn.transaction(): async for record in conn.cursor('SELECT generate_series(0, 10)'): await response.send(record[0]) ``` You can explicitly end a stream by calling `await response.eof()`. It a convenience method to replace `await response.send("", True)`. It should be called **one time** *after* your handler has determined that it has nothing left to send back to the client. While it is *optional* to use with Sanic server, if you are running Sanic in ASGI mode, then you **must** explicitly terminate the stream. *Calling `eof` became optional in v21.6* ## File streaming .. column:: Sanic provides `sanic.response.file_stream` function that is useful when you want to send a large file. It returns a `StreamingHTTPResponse` object and will use chunked transfer encoding by default; for this reason Sanic doesn’t add `Content-Length` HTTP header in the response. A typical use case might be streaming an video file. .. column:: ```python @app.route("/mp4") async def handler_file_stream(request): return await response.file_stream( "/path/to/sample.mp4", chunk_size=1024, mime_type="application/metalink4+xml", headers={ "Content-Disposition": 'Attachment; filename="nicer_name.meta4"', "Content-Type": "application/metalink4+xml", }, ) ``` .. column:: If you want to use the `Content-Length` header, you can disable chunked transfer encoding and add it manually simply by adding the `Content-Length` header. .. column:: ```python from aiofiles import os as async_os from sanic.response import file_stream @app.route("/") async def index(request): file_path = "/srv/www/whatever.png" file_stat = await async_os.stat(file_path) headers = {"Content-Length": str(file_stat.st_size)} return await file_stream( file_path, headers=headers, ) ``` ================================================ FILE: guide/content/en/guide/advanced/versioning.md ================================================ # Versioning It is standard practice in API building to add versions to your endpoints. This allows you to easily differentiate incompatible endpoints when you try and change your API down the road in a breaking manner. Adding a version will add a `/v{version}` url prefix to your endpoints. The version can be a `int`, `float`, or `str`. Acceptable values: - `1`, `2`, `3` - `1.1`, `2.25`, `3.0` - `"1"`, `"v1"`, `"v1.1"` ## Per route .. column:: You can pass a version number to the routes directly. .. column:: ```python # /v1/text @app.route("/text", version=1) def handle_request(request): return response.text("Hello world! Version 1") # /v2/text @app.route("/text", version=2) def handle_request(request): return response.text("Hello world! Version 2") ``` ## Per Blueprint .. column:: You can also pass a version number to the blueprint, which will apply to all routes in that blueprint. .. column:: ```python bp = Blueprint("test", url_prefix="/foo", version=1) # /v1/foo/html @bp.route("/html") def handle_request(request): return response.html("

Hello world!

") ``` ## Per Blueprint Group .. column:: In order to simplify the management of the versioned blueprints, you can provide a version number in the blueprint group. The same will be inherited to all the blueprint grouped under it if the blueprints don't already override the same information with a value specified while creating a blueprint instance. When using blueprint groups for managing the versions, the following order is followed to apply the Version prefix to the routes being registered. 1. Route Level configuration 2. Blueprint level configuration 3. Blueprint Group level configuration If we find a more pointed versioning specification, we will pick that over the more generic versioning specification provided under the Blueprint or Blueprint Group .. column:: ```python from sanic.blueprints import Blueprint from sanic.response import json bp1 = Blueprint( name="blueprint-1", url_prefix="/bp1", version=1.25, ) bp2 = Blueprint( name="blueprint-2", url_prefix="/bp2", ) group = Blueprint.group( [bp1, bp2], url_prefix="/bp-group", version="v2", ) # GET /v1.25/bp-group/bp1/endpoint-1 @bp1.get("/endpoint-1") async def handle_endpoint_1_bp1(request): return json({"Source": "blueprint-1/endpoint-1"}) # GET /v2/bp-group/bp2/endpoint-2 @bp2.get("/endpoint-1") async def handle_endpoint_1_bp2(request): return json({"Source": "blueprint-2/endpoint-1"}) # GET /v1/bp-group/bp2/endpoint-2 @bp2.get("/endpoint-2", version=1) async def handle_endpoint_2_bp2(request): return json({"Source": "blueprint-2/endpoint-2"}) ``` ## Version prefix As seen above, the `version` that is applied to a route is **always** the first segment in the generated URI path. Therefore, to make it possible to add path segments before the version, every place that a `version` argument is passed, you can also pass `version_prefix`. The `version_prefix` argument can be defined in: - `app.route` and `bp.route` decorators (and all the convenience decorators also) - `Blueprint` instantiation - `Blueprint.group` constructor - `BlueprintGroup` instantiation - `app.blueprint` registration If there are definitions in multiple places, a more specific definition overrides a more general. This list provides that hierarchy. The default value of `version_prefix` is `/v`. .. column:: An often requested feature is to be able to mount versioned routes on `/api`. This can easily be accomplished with `version_prefix`. .. column:: ```python # /v1/my/path app.route("/my/path", version=1, version_prefix="/api/v") ``` .. column:: Perhaps a more compelling usage is to load all `/api` routes into a single `BlueprintGroup`. .. column:: ```python # /v1/my/path app = Sanic(__name__) v2ip = Blueprint("v2ip", url_prefix="/ip", version=2) api = Blueprint.group(v2ip, version_prefix="/api/version") # /api/version2/ip @v2ip.get("/") async def handler(request): return text(request.ip) app.blueprint(api) ``` We can therefore learn that a route's URI is: ``` version_prefix + version + url_prefix + URI definition ``` .. tip:: Just like with `url_prefix`, it is possible to define path parameters inside a `version_prefix`. It is perfectly legitimate to do this. Just remember that every route will have that parameter injected into the handler. ```python version_prefix="//v" ``` *Added in v21.6* ================================================ FILE: guide/content/en/guide/advanced/websockets.md ================================================ # Websockets Sanic provides an easy to use abstraction on top of [websockets](https://websockets.readthedocs.io/en/stable/). ## Routing .. column:: Websocket handlers can be hooked up to the router similar to regular handlers. .. column:: ```python from sanic import Request, Websocket async def feed(request: Request, ws: Websocket): pass app.add_websocket_route(feed, "/feed") ``` ```python from sanic import Request, Websocket @app.websocket("/feed") async def feed(request: Request, ws: Websocket): pass ``` ## Handler .. column:: Typically, a websocket handler will want to hold open a loop. It can then use the `send()` and `recv()` methods on the second object injected into the handler. This example is a simple endpoint that echos back to the client messages that it receives. .. column:: ```python from sanic import Request, Websocket @app.websocket("/feed") async def feed(request: Request, ws: Websocket): while True: data = "hello!" print("Sending: " + data) await ws.send(data) data = await ws.recv() print("Received: " + data) ``` .. column:: You can simplify your loop by just iterating over the `Websocket` object in a for loop. *Added in v22.9* .. column:: ```python from sanic import Request, Websocket @app.websocket("/feed") async def feed(request: Request, ws: Websocket): async for msg in ws: await ws.send(msg) ``` ## Configuration See [configuration section](../running/configuration.md) for more details, however the defaults are shown below. ```python app.config.WEBSOCKET_MAX_SIZE = 2 ** 20 app.config.WEBSOCKET_PING_INTERVAL = 20 app.config.WEBSOCKET_PING_TIMEOUT = 20 ``` ================================================ FILE: guide/content/en/guide/basics/README.md ================================================ # Basics ================================================ FILE: guide/content/en/guide/basics/app.md ================================================ --- title: Sanic Application --- # Sanic Application See API docs: [sanic.app](/api/sanic.app) ## Instance .. column:: The most basic building block is the :class:`sanic.app.Sanic` instance. It is not required, but the custom is to instantiate this in a file called `server.py`. .. column:: ```python # /path/to/server.py from sanic import Sanic app = Sanic("MyHelloWorldApp") ``` ## Application context Most applications will have the need to share/reuse data or objects across different parts of the code base. Sanic helps be providing the `ctx` object on application instances. It is a free space for the developer to attach any objects or data that should existe throughout the lifetime of the application. .. column:: The most common pattern is to attach a database instance to the application. .. column:: ```python app = Sanic("MyApp") app.ctx.db = Database() ``` .. column:: While the previous example will work and is illustrative, it is typically considered best practice to attach objects in one of the two application startup [listeners](./listeners). .. column:: ```python app = Sanic("MyApp") @app.before_server_start async def attach_db(app, loop): app.ctx.db = Database() ``` ## App Registry .. column:: When you instantiate a Sanic instance, that can be retrieved at a later time from the Sanic app registry. This can be useful, for example, if you need to access your Sanic instance from a location where it is not otherwise accessible. .. column:: ```python # ./path/to/server.py from sanic import Sanic app = Sanic("my_awesome_server") # ./path/to/somewhere_else.py from sanic import Sanic app = Sanic.get_app("my_awesome_server") ``` .. column:: If you call `Sanic.get_app("non-existing")` on an app that does not exist, it will raise :class:`sanic.exceptions.SanicException` by default. You can, instead, force the method to return a new instance of Sanic with that name. .. column:: ```python app = Sanic.get_app( "non-existing", force_create=True, ) ``` .. column:: If there is **only one** Sanic instance registered, then calling `Sanic.get_app()` with no arguments will return that instance .. column:: ```python Sanic("My only app") app = Sanic.get_app() ``` ## Configuration .. column:: Sanic holds the configuration in the `config` attribute of the `Sanic` instance. Configuration can be modified **either** using dot-notation **OR** like a dictionary. .. column:: ```python app = Sanic('myapp') app.config.DB_NAME = 'appdb' app.config['DB_USER'] = 'appuser' db_settings = { 'DB_HOST': 'localhost', 'DB_NAME': 'appdb', 'DB_USER': 'appuser' } app.config.update(db_settings) ``` .. note:: Heads up Config keys _should_ be uppercase. But, this is mainly by convention, and lowercase will work most of the time. ```python app.config.GOOD = "yay!" app.config.bad = "boo" ``` There is much [more detail about configuration](../running/configuration.md) later on. ## Factory pattern Many of the examples in these docs will show the instantiation of the :class:`sanic.app.Sanic` instance in a file called `server.py` in the "global scope" (i.e. not inside a function). This is a common pattern for very simple "hello world" style applications, but it is often beneficial to use a factory pattern instead. A "factory" is just a function that returns an instance of the object you want to use. This allows you to abstract the instantiation of the object, but also may make it easier to isolate the application instance. .. column:: A super simple factory pattern could look like this: .. column:: ```python # ./path/to/server.py from sanic import Sanic from .path.to.config import MyConfig from .path.to.some.blueprint import bp def create_app(config=MyConfig) -> Sanic: app = Sanic("MyApp", config=config) app.blueprint(bp) return app ``` .. column:: When we get to running Sanic later, you will learn that the Sanic CLI can detect this pattern and use it to run your application. .. column:: ```sh sanic path.to.server:create_app ``` ## Customization The Sanic application instance can be customized for your application needs in a variety of ways at instantiation. For complete details, see the [API docs](/api/sanic.app). ### Custom configuration .. column:: This simplest form of custom configuration would be to pass your own object directly into that Sanic application instance If you create a custom configuration object, it is *highly* recommended that you subclass the :class:`sanic.config.Config` option to inherit its behavior. You could use this option for adding properties, or your own set of custom logic. *Added in v21.6* .. column:: ```python from sanic.config import Config class MyConfig(Config): FOO = "bar" app = Sanic(..., config=MyConfig()) ``` .. column:: A useful example of this feature would be if you wanted to use a config file in a form that differs from what is [supported](../running/configuration.md#using-sanicupdateconfig). .. column:: ```python from sanic import Sanic, text from sanic.config import Config class TomlConfig(Config): def __init__(self, *args, path: str, **kwargs): super().__init__(*args, **kwargs) with open(path, "r") as f: self.apply(toml.load(f)) def apply(self, config): self.update(self._to_uppercase(config)) def _to_uppercase(self, obj: Dict[str, Any]) -> Dict[str, Any]: retval: Dict[str, Any] = {} for key, value in obj.items(): upper_key = key.upper() if isinstance(value, list): retval[upper_key] = [ self._to_uppercase(item) for item in value ] elif isinstance(value, dict): retval[upper_key] = self._to_uppercase(value) else: retval[upper_key] = value return retval toml_config = TomlConfig(path="/path/to/config.toml") app = Sanic(toml_config.APP_NAME, config=toml_config) ``` ### Custom context .. column:: By default, the application context is a [`SimpleNamespace()`](https://docs.python.org/3/library/types.html#types.SimpleNamespace) that allows you to set any properties you want on it. However, you also have the option of passing any object whatsoever instead. *Added in v21.6* .. column:: ```python app = Sanic(..., ctx=1) ``` ```python app = Sanic(..., ctx={}) ``` ```python class MyContext: ... app = Sanic(..., ctx=MyContext()) ``` ### Custom requests .. column:: It is sometimes helpful to have your own `Request` class, and tell Sanic to use that instead of the default. One example is if you wanted to modify the default `request.id` generator. .. note:: Important It is important to remember that you are passing the *class* not an instance of the class. .. column:: ```python import time from sanic import Request, Sanic, text class NanoSecondRequest(Request): @classmethod def generate_id(*_): return time.time_ns() app = Sanic(..., request_class=NanoSecondRequest) @app.get("/") async def handler(request): return text(str(request.id)) ``` ### Custom error handler .. column:: See [exception handling](../best-practices/exceptions.md#custom-error-handling) for more .. column:: ```python from sanic.handlers import ErrorHandler class CustomErrorHandler(ErrorHandler): def default(self, request, exception): ''' handles errors that have no error handlers assigned ''' # You custom error handling logic... return super().default(request, exception) app = Sanic(..., error_handler=CustomErrorHandler()) ``` ### Custom dumps function .. column:: It may sometimes be necessary or desirable to provide a custom function that serializes an object to JSON data. .. column:: ```python import ujson dumps = partial(ujson.dumps, escape_forward_slashes=False) app = Sanic(__name__, dumps=dumps) ``` .. column:: Or, perhaps use another library or create your own. .. column:: ```python from orjson import dumps app = Sanic("MyApp", dumps=dumps) ``` ### Custom loads function .. column:: Similar to `dumps`, you can also provide a custom function for deserializing data. *Added in v22.9* .. column:: ```python from orjson import loads app = Sanic("MyApp", loads=loads) ``` ### Custom typed application Beginning in v23.6, the correct type annotation of a default Sanic application instance is: ```python sanic.app.Sanic[sanic.config.Config, types.SimpleNamespace] ``` It refers to two generic types: 1. The first is the type of the configuration object. It defaults to :class:`sanic.config.Config`, but can be any subclass of that. 2. The second is the type of the application context. It defaults to [`SimpleNamespace()`](https://docs.python.org/3/library/types.html#types.SimpleNamespace), but can be **any object** as show above. Let's look at some examples of how the type will change. .. column:: Consider this example where we pass a custom subclass of :class:`sanic.config.Config` and a custom context object. .. column:: ```python from sanic import Sanic from sanic.config import Config class CustomConfig(Config): pass app = Sanic("test", config=CustomConfig()) reveal_type(app) # N: Revealed type is "sanic.app.Sanic[main.CustomConfig, types.SimpleNamespace]" ``` ``` sanic.app.Sanic[main.CustomConfig, types.SimpleNamespace] ``` .. column:: Similarly, when passing a custom context object, the type will change to reflect that. .. column:: ```python from sanic import Sanic class Foo: pass app = Sanic("test", ctx=Foo()) reveal_type(app) # N: Revealed type is "sanic.app.Sanic[sanic.config.Config, main.Foo]" ``` ``` sanic.app.Sanic[sanic.config.Config, main.Foo] ``` .. column:: Of course, you can set both the config and context to custom types. .. column:: ```python from sanic import Sanic from sanic.config import Config class CustomConfig(Config): pass class Foo: pass app = Sanic("test", config=CustomConfig(), ctx=Foo()) reveal_type(app) # N: Revealed type is "sanic.app.Sanic[main.CustomConfig, main.Foo]" ``` ``` sanic.app.Sanic[main.CustomConfig, main.Foo] ``` This pattern is particularly useful if you create a custom type alias for your application instance so that you can use it to annotate listeners and handlers. ```python # ./path/to/types.py from sanic.app import Sanic from sanic.config import Config from myapp.context import MyContext from typing import TypeAlias MyApp = TypeAlias("MyApp", Sanic[Config, MyContext]) ``` ```python # ./path/to/listeners.py from myapp.types import MyApp def add_listeners(app: MyApp): @app.before_server_start async def before_server_start(app: MyApp): # do something with your fully typed app instance await app.ctx.db.connect() ``` ```python # ./path/to/server.py from myapp.types import MyApp from myapp.context import MyContext from myapp.config import MyConfig from myapp.listeners import add_listeners app = Sanic("myapp", config=MyConfig(), ctx=MyContext()) add_listeners(app) ``` *Added in v23.6* ### Custom typed request Sanic also allows you to customize the type of the request object. This is useful if you want to add custom properties to the request object, or be able to access your custom properties of a typed application instance. The correct, default type of a Sanic request instance is: ```python sanic.request.Request[ sanic.app.Sanic[sanic.config.Config, types.SimpleNamespace], types.SimpleNamespace ] ``` It refers to two generic types: 1. The first is the type of the application instance. It defaults to `sanic.app.Sanic[sanic.config.Config, types.SimpleNamespace]`, but can be any subclass of that. 2. The second is the type of the request context. It defaults to `types.SimpleNamespace`, but can be **any object** as show above in [custom requests](#custom-requests). Let's look at some examples of how the type will change. .. column:: Expanding upon the full example above where there is a type alias for a customized application instance, we can also create a custom request type so that we can access those same type annotations. Of course, you do not need type aliases for this to work. We are only showing them here to cut down on the amount of code shown. .. column:: ```python from sanic import Request from myapp.types import MyApp from types import SimpleNamespace def add_routes(app: MyApp): @app.get("/") async def handler(request: Request[MyApp, SimpleNamespace]): # do something with your fully typed app instance results = await request.app.ctx.db.query("SELECT * FROM foo") ``` .. column:: Perhaps you have a custom request object that generates a custom context object. You can type annotate it to properly access those properties with your IDE as shown here. .. column:: ```python from sanic import Request, Sanic from sanic.config import Config class CustomConfig(Config): pass class Foo: pass class RequestContext: foo: Foo class CustomRequest(Request[Sanic[CustomConfig, Foo], RequestContext]): @staticmethod def make_context() -> RequestContext: ctx = RequestContext() ctx.foo = Foo() return ctx app = Sanic( "test", config=CustomConfig(), ctx=Foo(), request_class=CustomRequest ) @app.get("/") async def handler(request: CustomRequest): # Full access to typed: # - custom application configuration object # - custom application context object # - custom request context object pass ``` See more information in the [custom request context](./request.md#custom-request-context) section. *Added in v23.6* ================================================ FILE: guide/content/en/guide/basics/cookies.md ================================================ # Cookies ## Reading .. column:: Cookies can be accessed via the `Request` object’s `cookies` dictionary. .. column:: ```python @app.route("/cookie") async def test(request): test_cookie = request.cookies.get("test") return text(f"Test cookie: {test_cookie}") ``` .. tip:: FYI 💡 The `request.cookies` object is one of a few types that is a dictionary with each value being a `list`. This is because HTTP allows a single key to be reused to send multiple values. Most of the time you will want to use the `.get()` method to access the first element and not a `list`. If you do want a `list` of all items, you can use `.getlist()`. *Added in v23.3* ## Writing .. column:: When returning a response, cookies can be set on the `Response` object: `response.cookies`. This object is an instance of `CookieJar` which is a special sort of dictionary that automatically will write the response headers for you. .. column:: ```python @app.route("/cookie") async def test(request): response = text("There's a cookie up in this response") response.add_cookie( "test", "It worked!", domain=".yummy-yummy-cookie.com", httponly=True ) return response ``` Response cookies can be set like dictionary values and have the following parameters available: - `path: str` - The subset of URLs to which this cookie applies. Defaults to `/`. - `domain: str` - Specifies the domain for which the cookie is valid. An explicitly specified domain must always start with a dot. - `max_age: int` - Number of seconds the cookie should live for. - `expires: datetime` - The time for the cookie to expire on the client’s browser. Usually it is better to use max-age instead. - `secure: bool` - Specifies whether the cookie will only be sent via HTTPS. Defaults to `True`. - `httponly: bool` - Specifies whether the cookie cannot be read by JavaScript. - `samesite: str` - Available values: Lax, Strict, and None. Defaults to `Lax`. - `comment: str` - A comment (metadata). - `host_prefix: bool` - Whether to add the `__Host-` prefix to the cookie. - `secure_prefix: bool` - Whether to add the `__Secure-` prefix to the cookie. - `partitioned: bool` - Whether to mark the cookie as partitioned. To better understand the implications and usage of these values, it might be helpful to read the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies) on [setting cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie). .. tip:: FYI By default, Sanic will set the `secure` flag to `True` to ensure that cookies are only sent over HTTPS as a sensible default. This should not be impactful for local development since secure cookies over HTTP should still be sent to `localhost`. For more information, you should read the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies) on [secure cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#Secure). ## Deleting .. column:: Cookies can be removed semantically or explicitly. .. column:: ```python @app.route("/cookie") async def test(request): response = text("Time to eat some cookies muahaha") # This cookie will be set to expire in 0 seconds response.delete_cookie("eat_me") # This cookie will self destruct in 5 seconds response.add_cookie("fast_bake", "Be quick!", max_age=5) return response ``` *Don't forget to add `path` or `domain` if needed!* ## Eating .. column:: Sanic likes cookies .. column:: .. attrs:: :class: is-size-1 has-text-centered 🍪 ================================================ FILE: guide/content/en/guide/basics/handlers.md ================================================ # Handlers The next important building block are your _handlers_. These are also sometimes called "views". In Sanic, a handler is any callable that takes at least a :class:`sanic.request.Request` instance as an argument, and returns either an :class:`sanic.response.HTTPResponse` instance, or a coroutine that does the same. .. column:: Huh? 😕 It is a **function**; either synchronous or asynchronous. The job of the handler is to respond to an endpoint and do something. This is where the majority of your business logic will go. .. column:: ```python def i_am_a_handler(request): return HTTPResponse() async def i_am_ALSO_a_handler(request): return HTTPResponse() ``` Two more important items to note: 1. You almost *never* will want to use :class:`sanic.response.HTTPresponse` directly. It is much simpler to use one of the [convenience methods](./response.md#methods). - `from sanic import json` - `from sanic import html` - `from sanic import redirect` - *etc* 1. As we will see in [the streaming section](../advanced/streaming.md#response-streaming), you do not always need to return an object. If you use this lower-level API, you can control the flow of the response from within the handler, and a return object is not used. .. tip:: Heads up If you want to learn more about encapsulating your logic, checkout [class based views](../advanced/class-based-views.md). For now, we will continue forward with just function-based views. ### A simple function-based handler The most common way to create a route handler is to decorate the function. It creates a visually simple identification of a route definition. We'll learn more about [routing soon](./routing.md). .. column:: Let's look at a practical example. - We use a convenience decorator on our app instance: `@app.get()` - And a handy convenience method for generating out response object: `text()` Mission accomplished 💪 .. column:: ```python from sanic import text @app.get("/foo") async def foo_handler(request): return text("I said foo!") ``` --- ## A word about _async_... .. column:: It is entirely possible to write handlers that are synchronous. In this example, we are using the _blocking_ `time.sleep()` to simulate 100ms of processing time. Perhaps this represents fetching data from a DB, or a 3rd-party website. Using four (4) worker processes and a common benchmarking tool: - **956** requests in 30.10s - Or, about **31.76** requests/second .. column:: ```python @app.get("/sync") def sync_handler(request): time.sleep(0.1) return text("Done.") ``` .. column:: Just by changing to the asynchronous alternative `asyncio.sleep()`, we see an incredible change in performance. 🚀 Using the same four (4) worker processes: - **115,590** requests in 30.08s - Or, about **3,843.17** requests/second .. attrs:: :class: is-size-2 🤯 .. column:: ```python @app.get("/async") async def async_handler(request): await asyncio.sleep(0.1) return text("Done.") ``` Okay... this is a ridiculously overdramatic result. And any benchmark you see is inherently very biased. This example is meant to over-the-top show the benefit of `async/await` in the web world. Results will certainly vary. Tools like Sanic and other async Python libraries are not magic bullets that make things faster. They make them _more efficient_. In our example, the asynchronous version is so much better because while one request is sleeping, it is able to start another one, and another one, and another one, and another one... But, this is the point! Sanic is fast because it takes the available resources and squeezes performance out of them. It can handle many requests concurrently, which means more requests per second. .. tip:: A common mistake! Don't do this! You need to ping a website. What do you use? `pip install your-fav-request-library` 🙈 Instead, try using a client that is `async/await` capable. Your server will thank you. Avoid using blocking tools, and favor those that play well in the asynchronous ecosystem. If you need recommendations, check out [Awesome Sanic](https://github.com/mekicha/awesome-sanic). Sanic uses [httpx](https://www.python-httpx.org/) inside of its testing package (sanic-testing) 😉. --- ## A fully annotated handler For those that are using type annotations... ```python from sanic.response import HTTPResponse, text from sanic.request import Request @app.get("/typed") async def typed_handler(request: Request) -> HTTPResponse: return text("Done.") ``` ## Naming your handlers All handlers are named automatically. This is useful for debugging, and for generating URLs in templates. When not specified, the name that will be used is the name of the function. .. column:: For example, this handler will be named `foo_handler`. .. column:: ```python # Handler name will be "foo_handler" @app.get("/foo") async def foo_handler(request): return text("I said foo!") ``` .. column:: However, you can override this by passing the `name` argument to the decorator. .. column:: ```python # Handler name will be "foo" @app.get("/foo", name="foo") async def foo_handler(request): return text("I said foo!") ``` .. column:: In fact, as you will, there may be times when you **MUST** supply a name. For example, if you use two decorators on the same function, you will need to supply a name for at least one of them. If you do not, you will get an error and your app will not start. Names **must** be unique within your app. .. column:: ```python # Two handlers, same function, # different names: # - "foo_arg" # - "foo" @app.get("/foo/", name="foo_arg") @app.get("/foo") async def foo(request, arg=None): return text("I said foo!") ``` ================================================ FILE: guide/content/en/guide/basics/headers.md ================================================ # Headers Request and response headers are available in the `Request` and `HTTPResponse` objects, respectively. They make use of the [`multidict` package](https://multidict.readthedocs.io/en/stable/multidict.html#cimultidict) that allows a single key to have multiple values. .. tip:: FYI Header keys are converted to *lowercase* when parsed. Capitalization is not considered for headers. ## Request Sanic does attempt to do some normalization on request headers before presenting them to the developer, and also make some potentially meaningful extractions for common use cases. .. column:: #### Tokens Authorization tokens in the form `Token ` or `Bearer ` are extracted to the request object: `request.token`. .. column:: ```python @app.route("/") async def handler(request): return text(request.token) ``` ```sh curl localhost:8000 \ -H "Authorization: Token ABCDEF12345679" ABCDEF12345679 ``` ```sh curl localhost:8000 \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c ``` ### Proxy headers Sanic has special handling for proxy headers. See the [proxy headers](../advanced/proxy-headers.md) section for more details. ### Host header and dynamic URL construction .. column:: The *effective host* is available via `request.host`. This is not necessarily the same as the host header, as it prefers proxy-forwarded host and can be forced by the server name setting. Webapps should generally use this accessor so that they can function the same no matter how they are deployed. The actual host header, if needed, can be found via `request.headers` The effective host is also used in dynamic URL construction via `request.url_for`, which uses the request to determine the external address of a handler. .. tip:: Be wary of malicious clients These URLs can be manipulated by sending misleading host headers. `app.url_for` should be used instead if this is a concern. .. column:: ```python app.config.SERVER_NAME = "https://example.com" @app.route("/hosts", name="foo") async def handler(request): return json( { "effective host": request.host, "host header": request.headers.get("host"), "forwarded host": request.forwarded.get("host"), "you are here": request.url_for("foo"), } ) ``` ```sh curl localhost:8000/hosts { "effective host": "example.com", "host header": "localhost:8000", "forwarded host": null, "you are here": "https://example.com/hosts" } ``` ### Other headers .. column:: All request headers are available on `request.headers`, and can be accessed in dictionary form. Capitalization is not considered for headers, and can be accessed using either uppercase or lowercase keys. .. column:: ```python @app.route("/") async def handler(request): return json( { "foo_weakref": request.headers["foo"], "foo_get": request.headers.get("Foo"), "foo_getone": request.headers.getone("FOO"), "foo_getall": request.headers.getall("fOo"), "all": list(request.headers.items()), } ) ``` ```sh curl localhost:9999/headers -H "Foo: one" -H "FOO: two"|jq { "foo_weakref": "one", "foo_get": "one", "foo_getone": "one", "foo_getall": [ "one", "two" ], "all": [ [ "host", "localhost:9999" ], [ "user-agent", "curl/7.76.1" ], [ "accept", "*/*" ], [ "foo", "one" ], [ "foo", "two" ] ] } ``` .. tip:: FYI 💡 The request.headers object is one of a few types that is a dictionary with each value being a list. This is because HTTP allows a single key to be reused to send multiple values. Most of the time you will want to use the .get() or .getone() methods to access the first element and not a list. If you do want a list of all items, you can use .getall(). ### Request ID .. column:: Often it is convenient or necessary to track a request by its `X-Request-ID` header. You can easily access that as: `request.id`. .. column:: ```python @app.route("/") async def handler(request): return text(request.id) ``` ```sh curl localhost:8000 \ -H "X-Request-ID: ABCDEF12345679" ABCDEF12345679 ``` ## Response Sanic will automatically set the following response headers (when appropriate) for you: - `content-length` - `content-type` - `connection` - `transfer-encoding` In most circumstances, you should never need to worry about setting these headers. .. column:: Any other header that you would like to set can be done either in the route handler, or a response middleware. .. column:: ```python @app.route("/") async def handler(request): return text("Done.", headers={"content-language": "en-US"}) @app.middleware("response") async def add_csp(request, response): response.headers["content-security-policy"] = "default-src 'none'; script-src 'self'; connect-src 'self'; img-src 'self'; style-src 'self';base-uri 'self';form-action 'self'" ``` .. column:: A common [middleware](middleware.md) you might want is to add a `X-Request-ID` header to every response. As stated above: `request.id` will provide the ID from the incoming request. But, even if no ID was supplied in the request headers, one will be automatically supplied for you. [See API docs for more details](https://sanic.readthedocs.io/en/latest/sanic/api_reference.html#sanic.request.Request.id) .. column:: ```python @app.route("/") async def handler(request): return text(str(request.id)) @app.on_response async def add_request_id_header(request, response): response.headers["X-Request-ID"] = request.id ``` ```sh curl localhost:8000 -i HTTP/1.1 200 OK X-Request-ID: 805a958e-9906-4e7a-8fe0-cbe83590431b content-length: 36 connection: keep-alive content-type: text/plain; charset=utf-8 805a958e-9906-4e7a-8fe0-cbe83590431b ``` ================================================ FILE: guide/content/en/guide/basics/listeners.md ================================================ # Listeners Sanic provides you with eight (8) opportunities to inject an operation into the life cycle of your application server. This does not include the [signals](../advanced/signals.md), which allow further injection customization. There are two (2) that run **only** on your main Sanic process (ie, once per call to `sanic server.app`.) - `main_process_start` - `main_process_stop` There are also two (2) that run **only** in a reloader process if auto-reload has been turned on. - `reload_process_start` - `reload_process_stop` *Added `reload_process_start` and `reload_process_stop` in v22.3* There are four (4) that enable you to execute startup/teardown code as your server starts or closes. - `before_server_start` - `after_server_start` - `before_server_stop` - `after_server_stop` The life cycle of a worker process looks like this: .. mermaid:: sequenceDiagram autonumber participant Process participant Worker participant Listener participant Handler Note over Process: sanic server.app loop Process->>Listener: @app.main_process_start Listener->>Handler: Invoke event handler end Process->>Worker: Run workers loop Start each worker loop Worker->>Listener: @app.before_server_start Listener->>Handler: Invoke event handler end Note over Worker: Server status: started loop Worker->>Listener: @app.after_server_start Listener->>Handler: Invoke event handler end Note over Worker: Server status: ready end Process->>Worker: Graceful shutdown loop Stop each worker loop Worker->>Listener: @app.before_server_stop Listener->>Handler: Invoke event handler end Note over Worker: Server status: stopped loop Worker->>Listener: @app.after_server_stop Listener->>Handler: Invoke event handler end Note over Worker: Server status: closed end loop Process->>Listener: @app.main_process_stop Listener->>Handler: Invoke event handler end Note over Process: exit The reloader process live outside of this worker process inside of a process that is responsible for starting and stopping the Sanic processes. Consider the following example: ```python @app.reload_process_start async def reload_start(*_): print(">>>>>> reload_start <<<<<<") @app.main_process_start async def main_start(*_): print(">>>>>> main_start <<<<<<") @app.before_server_start async def before_start(*_): print(">>>>>> before_start <<<<<<") ``` If this application were run with auto-reload turned on, the `reload_start` function would be called once when the reloader process starts. The `main_start` function would also be called once when the main process starts. **HOWEVER**, the `before_start` function would be called once for each worker process that is started, and subsequently every time that a file is saved and the worker is restarted. ## Attaching a listener .. column:: The process to setup a function as a listener is similar to declaring a route. The currently running `Sanic()` instance is injected into the listener. .. column:: ```python async def setup_db(app): app.ctx.db = await db_setup() app.register_listener(setup_db, "before_server_start") ``` .. column:: The `Sanic` app instance also has a convenience decorator. .. column:: ```python @app.listener("before_server_start") async def setup_db(app): app.ctx.db = await db_setup() ``` .. column:: Prior to v22.3, both the application instance and the current event loop were injected into the function. However, only the application instance is injected by default. If your function signature will accept both, then both the application and the loop will be injected as shown here. .. column:: ```python @app.listener("before_server_start") async def setup_db(app, loop): app.ctx.db = await db_setup() ``` .. column:: You can shorten the decorator even further. This is helpful if you have an IDE with autocomplete. .. column:: ```python @app.before_server_start async def setup_db(app): app.ctx.db = await db_setup() ``` ## Order of execution Listeners are executed in the order they are declared during startup, and reverse order of declaration during teardown | | Phase | Order | |-----------------------|-----------------|---------| | `main_process_start` | main startup | regular 🙂 ⬇️ | | `before_server_start` | worker startup | regular 🙂 ⬇️ | | `after_server_start` | worker startup | regular 🙂 ⬇️ | | `before_server_stop` | worker shutdown | 🙃 ⬆️ reverse | | `after_server_stop` | worker shutdown | 🙃 ⬆️ reverse | | `main_process_stop` | main shutdown | 🙃 ⬆️ reverse | Given the following setup, we should expect to see this in the console if we run two workers. .. column:: ```python @app.listener("before_server_start") async def listener_1(app, loop): print("listener_1") @app.before_server_start async def listener_2(app, loop): print("listener_2") @app.listener("after_server_start") async def listener_3(app, loop): print("listener_3") @app.after_server_start async def listener_4(app, loop): print("listener_4") @app.listener("before_server_stop") async def listener_5(app, loop): print("listener_5") @app.before_server_stop async def listener_6(app, loop): print("listener_6") @app.listener("after_server_stop") async def listener_7(app, loop): print("listener_7") @app.after_server_stop async def listener_8(app, loop): print("listener_8") ``` .. column:: ```bash [pid: 1000000] [INFO] Goin' Fast @ http://127.0.0.1:9999 [pid: 1000000] [INFO] listener_0 [pid: 1111111] [INFO] listener_1 [pid: 1111111] [INFO] listener_2 [pid: 1111111] [INFO] listener_3 [pid: 1111111] [INFO] listener_4 [pid: 1111111] [INFO] Starting worker [1111111] [pid: 1222222] [INFO] listener_1 [pid: 1222222] [INFO] listener_2 [pid: 1222222] [INFO] listener_3 [pid: 1222222] [INFO] listener_4 [pid: 1222222] [INFO] Starting worker [1222222] [pid: 1111111] [INFO] Stopping worker [1111111] [pid: 1222222] [INFO] Stopping worker [1222222] [pid: 1222222] [INFO] listener_6 [pid: 1222222] [INFO] listener_5 [pid: 1222222] [INFO] listener_8 [pid: 1222222] [INFO] listener_7 [pid: 1111111] [INFO] listener_6 [pid: 1111111] [INFO] listener_5 [pid: 1111111] [INFO] listener_8 [pid: 1111111] [INFO] listener_7 [pid: 1000000] [INFO] listener_9 [pid: 1000000] [INFO] Server Stopped ``` In the above example, notice how there are three processes running: - `pid: 1000000` - The *main* process - `pid: 1111111` - Worker 1 - `pid: 1222222` - Worker 2 *Just because our example groups all of one worker and then all of another, in reality since these are running on separate processes, the ordering between processes is not guaranteed. But, you can be sure that a single worker will **always** maintain its order.* .. tip:: FYI The practical result of this is that if the first listener in `before_server_start` handler setups a database connection, listeners that are registered after it can rely upon that connection being alive both when they are started and stopped. ### Priority In v23.12, the `priority` keyword argument was added to listeners. This allows for fine-tuning the order of execution of listeners. The default priority is `0`. Listeners with a higher priority will be executed first. Listeners with the same priority will be executed in the order they were registered. Furthermore, listeners attached to the `app` instance will be executed before listeners attached to a `Blueprint` instance. Overall the rules for deciding the order of execution are as follows: 1. Priority in descending order 2. Application listeners before Blueprint listeners 3. Registration order .. column:: As an example, consider the following, which will print: ```bash third bp_third second bp_second first fourth bp_first ``` .. column:: ```python @app.before_server_start async def first(app): print("first") @app.listener("before_server_start", priority=2) async def second(app): print("second") @app.before_server_start(priority=3) async def third(app): print("third") @bp.before_server_start async def bp_first(app): print("bp_first") @bp.listener("before_server_start", priority=2) async def bp_second(app): print("bp_second") @bp.before_server_start(priority=3) async def bp_third(app): print("bp_third") @app.before_server_start async def fourth(app): print("fourth") app.blueprint(bp) ``` ## ASGI Mode If you are running your application with an ASGI server, then make note of the following changes: - `reload_process_start` and `reload_process_stop` will be **ignored** - `main_process_start` and `main_process_stop` will be **ignored** - `before_server_start` will run as early as it can, and will be before `after_server_start`, but technically, the server is already running at that point - `after_server_stop` will run as late as it can, and will be after `before_server_stop`, but technically, the server is still running at that point ================================================ FILE: guide/content/en/guide/basics/middleware.md ================================================ # Middleware Whereas listeners allow you to attach functionality to the lifecycle of a worker process, middleware allows you to attach functionality to the lifecycle of an HTTP stream. ```python @app.on_request async def example(request): print("I execute before the handler.") ``` You can execute middleware either _before_ the handler is executed, or _after_. ```python @app.on_response async def example(request, response): print("I execute after the handler.") ``` .. mermaid:: sequenceDiagram autonumber participant Worker participant Middleware participant MiddlewareHandler participant RouteHandler Note over Worker: Incoming HTTP request loop Worker->>Middleware: @app.on_request Middleware->>MiddlewareHandler: Invoke middleware handler MiddlewareHandler-->>Worker: Return response (optional) end rect rgba(255, 13, 104, .1) Worker->>RouteHandler: Invoke route handler RouteHandler->>Worker: Return response end loop Worker->>Middleware: @app.on_response Middleware->>MiddlewareHandler: Invoke middleware handler MiddlewareHandler-->>Worker: Return response (optional) end Note over Worker: Deliver response ## Attaching middleware .. column:: This should probably look familiar by now. All you need to do is declare when you would like the middleware to execute: on the `request` or on the `response`. .. column:: ```python async def extract_user(request): request.ctx.user = await extract_user_from_request(request) app.register_middleware(extract_user, "request") ``` .. column:: Again, the `Sanic` app instance also has a convenience decorator. .. column:: ```python @app.middleware("request") async def extract_user(request): request.ctx.user = await extract_user_from_request(request) ``` .. column:: Response middleware receives both the `request` and `response` arguments. .. column:: ```python @app.middleware('response') async def prevent_xss(request, response): response.headers["x-xss-protection"] = "1; mode=block" ``` .. column:: You can shorten the decorator even further. This is helpful if you have an IDE with autocomplete. This is the preferred usage, and is what we will use going forward. .. column:: ```python @app.on_request async def extract_user(request): ... @app.on_response async def prevent_xss(request, response): ... ``` ## Modification Middleware can modify the request or response parameter it is given, _as long as it does not return it_. .. column:: #### Order of execution 1. Request middleware: `add_key` 2. Route handler: `index` 3. Response middleware: `prevent_xss` 4. Response middleware: `custom_banner` .. column:: ```python @app.on_request async def add_key(request): # Arbitrary data may be stored in request context: request.ctx.foo = "bar" @app.on_response async def custom_banner(request, response): response.headers["Server"] = "Fake-Server" @app.on_response async def prevent_xss(request, response): response.headers["x-xss-protection"] = "1; mode=block" @app.get("/") async def index(request): return text(request.ctx.foo) ``` .. column:: You can modify the `request.match_info`. A useful feature that could be used, for example, in middleware to convert `a-slug` to `a_slug`. .. column:: ```python @app.on_request def convert_slug_to_underscore(request: Request): request.match_info["slug"] = request.match_info["slug"].replace("-", "_") @app.get("/") async def handler(request, slug): return text(slug) ``` ``` $ curl localhost:9999/foo-bar-baz foo_bar_baz ``` ## Responding early .. column:: If middleware returns a `HTTPResponse` object, the request will stop processing and the response will be returned. If this occurs to a request before the route handler is reached, the handler will **not** be called. Returning a response will also prevent any further middleware from running. .. tip:: You can return a `None` value to stop the execution of the middleware handler to allow the request to process as normal. This can be useful when using early return to avoid processing requests inside of that middleware handler. .. column:: ```python @app.on_request async def halt_request(request): return text("I halted the request") @app.on_response async def halt_response(request, response): return text("I halted the response") ``` ## Order of execution Request middleware is executed in the order declared. Response middleware is executed in **reverse order**. Given the following setup, we should expect to see this in the console. .. column:: ```python @app.on_request async def middleware_1(request): print("middleware_1") @app.on_request async def middleware_2(request): print("middleware_2") @app.on_response async def middleware_3(request, response): print("middleware_3") @app.on_response async def middleware_4(request, response): print("middleware_4") @app.get("/handler") async def handler(request): print("~ handler ~") return text("Done.") ``` .. column:: ```bash middleware_1 middleware_2 ~ handler ~ middleware_4 middleware_3 [INFO][127.0.0.1:44788]: GET http://localhost:8000/handler 200 5 ``` ### Middleware priority .. column:: You can modify the order of execution of middleware by assigning it a higher priority. This happens inside of the middleware definition. The higher the value, the earlier it will execute relative to other middleware. The default priority for middleware is `0`. .. column:: ```python @app.on_request async def low_priority(request): ... @app.on_request(priority=99) async def high_priority(request): ... ``` *Added in v22.9* ================================================ FILE: guide/content/en/guide/basics/request.md ================================================ # Request See API docs: [sanic.request](/api/sanic.request) The :class:`sanic.request.Request` instance contains **a lot** of helpful information available on its parameters. Refer to the [API documentation](https://sanic.readthedocs.io/) for full details. As we saw in the section on [handlers](./handlers.md), the first argument in a route handler is usually the :class:`sanic.request.Request` object. Because Sanic is an async framework, the handler will run inside of a [`asyncio.Task`](https://docs.python.org/3/library/asyncio-task.html#asyncio.Task) and will be scheduled by the event loop. This means that the handler will be executed in an isolated context and the request object will be unique to that handler's task. .. column:: By convention, the argument is named `request`, but you can name it whatever you want. The name of the argument is not important. Both of the following handlers are valid. .. column:: ```python @app.get("/foo") async def typical_use_case(request): return text("I said foo!") ``` ```python @app.get("/foo") async def atypical_use_case(req): return text("I said foo!") ``` .. column:: Annotating a request object is super simple. .. column:: ```python from sanic.request import Request from sanic.response import text @app.get("/typed") async def typed_handler(request: Request): return text("Done.") ``` .. tip:: For your convenience, assuming you are using a modern IDE, you should leverage type annotations to help with code completion and documentation. This is especially helpful when using the `request` object as it has **MANY** properties and methods. To see the full list of available properties and methods, refer to the [API documentation](/api/sanic.request). ## Body The `Request` object allows you to access the content of the request body in a few different ways. ### JSON .. column:: **Parameter**: `request.json` **Description**: The parsed JSON object .. column:: ```bash $ curl localhost:8000 -d '{"foo": "bar"}' ``` ```python >>> print(request.json) {'foo': 'bar'} ``` ### Raw .. column:: **Parameter**: `request.body` **Description**: The raw bytes from the request body .. column:: ```bash $ curl localhost:8000 -d '{"foo": "bar"}' ``` ```python >>> print(request.body) b'{"foo": "bar"}' ``` ### Form .. column:: **Parameter**: `request.form` **Description**: The form data .. tip:: FYI The `request.form` object is one of a few types that is a dictionary with each value being a list. This is because HTTP allows a single key to be reused to send multiple values. Most of the time you will want to use the `.get()` method to access the first element and not a list. If you do want a list of all items, you can use `.getlist()`. .. column:: ```bash $ curl localhost:8000 -d 'foo=bar' ``` ```python >>> print(request.body) b'foo=bar' >>> print(request.form) {'foo': ['bar']} >>> print(request.form.get("foo")) bar >>> print(request.form.getlist("foo")) ['bar'] ``` ### Uploaded .. column:: **Parameter**: `request.files` **Description**: The files uploaded to the server .. tip:: FYI The `request.files` object is one of a few types that is a dictionary with each value being a list. This is because HTTP allows a single key to be reused to send multiple values. Most of the time you will want to use the `.get()` method to access the first element and not a list. If you do want a list of all items, you can use `.getlist()`. .. column:: ```bash $ curl -F 'my_file=@/path/to/TEST' http://localhost:8000 ``` ```python >>> print(request.body) b'--------------------------cb566ad845ad02d3\r\nContent-Disposition: form-data; name="my_file"; filename="TEST"\r\nContent-Type: application/octet-stream\r\n\r\nhello\n\r\n--------------------------cb566ad845ad02d3--\r\n' >>> print(request.files) {'my_file': [File(type='application/octet-stream', body=b'hello\n', name='TEST')]} >>> print(request.files.get("my_file")) File(type='application/octet-stream', body=b'hello\n', name='TEST') >>> print(request.files.getlist("my_file")) [File(type='application/octet-stream', body=b'hello\n', name='TEST')] ``` ## Context ### Request context The `request.ctx` object is your playground to store whatever information you need to about the request. This lives only for the duration of the request and is unique to the request. This can be constrasted with the `app.ctx` object which is shared across all requests. Be careful not to confuse them! The `request.ctx` object by default is a `SimpleNamespace` object allowing you to set arbitrary attributes on it. Sanic will not use this object for anything, so you are free to use it however you want without worrying about name clashes. ### Typical use case This is often used to store items like authenticated user details. We will get more into [middleware](./middleware.md) later, but here is a simple example. ```python @app.on_request async def run_before_handler(request): request.ctx.user = await fetch_user_by_token(request.token) @app.route('/hi') async def hi_my_name_is(request): if not request.ctx.user: return text("Hmm... I don't know you) return text(f"Hi, my name is {request.ctx.user.name}") ``` As you can see, the `request.ctx` object is a great place to store information that you need to access in multiple handlers making your code more DRY and easier to maintain. But, as we will learn in the [middleware section](./middleware.md), you can also use it to store information from one middleware that will be used in another. ### Connection context .. column:: Often times your API will need to serve multiple concurrent (or consecutive) requests to the same client. This happens, for example, very often with progressive web apps that need to query multiple endpoints to get data. The HTTP protocol calls for an easing of overhead time caused by the connection with the use of [keep alive headers](../running/configuration.md#keep-alive-timeout). When multiple requests share a single connection, Sanic provides a context object to allow those requests to share state. .. column:: ```python @app.on_request async def increment_foo(request): if not hasattr(request.conn_info.ctx, "foo"): request.conn_info.ctx.foo = 0 request.conn_info.ctx.foo += 1 @app.get("/") async def count_foo(request): return text(f"request.conn_info.ctx.foo={request.conn_info.ctx.foo}") ``` ```bash $ curl localhost:8000 localhost:8000 localhost:8000 request.conn_info.ctx.foo=1 request.conn_info.ctx.foo=2 request.conn_info.ctx.foo=3 ``` .. warning:: While this looks like a convenient place to store information between requests by a single HTTP connection, do not assume that all requests on a single connection came from a single end user. This is because HTTP proxies and load balancers can multiplex multiple connections into a single connection to your server. **DO NOT** use this to store information about a single user. Use the `request.ctx` object for that. ### Custom Request Objects As discussed in [application customization](./app.md#custom-requests), you can create a subclass of :class:`sanic.request.Request` to add additional functionality to the request object. This is useful for adding additional attributes or methods that are specific to your application. .. column:: For example, imagine your application sends a custom header that contains a user ID. You can create a custom request object that will parse that header and store the user ID for you. .. column:: ```python from sanic import Sanic, Request class CustomRequest(Request): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.user_id = self.headers.get("X-User-ID") app = Sanic("Example", request_class=CustomRequest) ``` .. column:: Now, in your handlers, you can access the `user_id` attribute. .. column:: ```python @app.route("/") async def handler(request: CustomRequest): return text(f"User ID: {request.user_id}") ``` ### Custom Request Context By default, the request context (`request.ctx`) is a [`Simplenamespace`](https://docs.python.org/3/library/types.html#types.SimpleNamespace) object allowing you to set arbitrary attributes on it. While this is super helpful to reuse logic across your application, it can be difficult in the development experience since the IDE will not know what attributes are available. To help with this, you can create a custom request context object that will be used instead of the default `SimpleNamespace`. This allows you to add type hints to the context object and have them be available in your IDE. .. column:: Start by subclassing the :class:`sanic.request.Request` class to create a custom request type. Then, you will need to add a `make_context()` method that returns an instance of your custom context object. *NOTE: the `make_context` method should be a static method.* .. column:: ```python from sanic import Sanic, Request from types import SimpleNamespace class CustomRequest(Request): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.ctx.user_id = self.headers.get("X-User-ID") @staticmethod def make_context() -> CustomContext: return CustomContext() @dataclass class CustomContext: user_id: str = None ``` .. note:: This is a Sanic poweruser feature that makes it super convenient in large codebases to have typed request context objects. It is of course not required, but can be very helpful. *Added in v23.6* ## Parameters .. column:: Values that are extracted from the path parameters are injected into the handler as argumets, or more specifically as keyword arguments. There is much more detail about this in the [Routing section](./routing.md). .. column:: ```python @app.route('/tag/') async def tag_handler(request, tag): return text("Tag - {}".format(tag)) # or, explicitly as keyword arguments @app.route('/tag/') async def tag_handler(request, *, tag): return text("Tag - {}".format(tag)) ``` ## Arguments There are two attributes on the `request` instance to get query parameters: - `request.args` - `request.query_args` These allow you to access the query parameters from the request path (the part after the `?` in the URL). ### Typical use case In most use cases, you will want to use the `request.args` object to access the query parameters. This will be the parsed query string as a dictionary. This is by far the most common pattern. .. column:: Consider the example where we have a `/search` endpoint with a `q` parameter that we want to use to search for something. .. column:: ```python @app.get("/search") async def search(request): query = request.args.get("q") if not query: return text("No query string provided") return text(f"Searching for: {query}") ``` ### Parsing the query string Sometimes, however, you may want to access the query string as a raw string or as a list of tuples. For this, you can use the `request.query_string` and `request.query_args` attributes. It also should be noted that HTTP allows multiple values for a single key. Although `request.args` may seem like a regular dictionary, it is actually a special type that allows for multiple values for a single key. You can access this by using the `request.args.getlist()` method. - `request.query_string` - The raw query string - `request.query_args` - The parsed query string as a list of tuples - `request.args` - The parsed query string as a *special* dictionary - `request.args.get()` - Get the first value for a key (behaves like a regular dictionary) - `request.args.getlist()` - Get all values for a key ```sh curl "http://localhost:8000?key1=val1&key2=val2&key1=val3" ``` ```python >>> print(request.args) {'key1': ['val1', 'val3'], 'key2': ['val2']} >>> print(request.args.get("key1")) val1 >>> print(request.args.getlist("key1")) ['val1', 'val3'] >>> print(request.query_args) [('key1', 'val1'), ('key2', 'val2'), ('key1', 'val3')] >>> print(request.query_string) key1=val1&key2=val2&key1=val3 ``` .. tip:: FYI The `request.args` object is one of a few types that is a dictionary with each value being a list. This is because HTTP allows a single key to be reused to send multiple values. Most of the time you will want to use the `.get()` method to access the first element and not a list. If you do want a list of all items, you can use `.getlist()`. ## Current request getter Sometimes you may find that you need access to the current request in your application in a location where it is not accessible. A typical example might be in a `logging` format. You can use `Request.get_current()` to fetch the current request (if any). Remember, the request object is confined to the single [`asyncio.Task`](https://docs.python.org/3/library/asyncio-task.html#asyncio.Task) that is running the handler. If you are not in that task, there is no request object. ```python import logging from sanic import Request, Sanic, json from sanic.exceptions import SanicException from sanic.log import LOGGING_CONFIG_DEFAULTS LOGGING_FORMAT = ( "%(asctime)s - (%(name)s)[%(levelname)s][%(host)s]: " "%(request_id)s %(request)s %(message)s %(status)d %(byte)d" ) old_factory = logging.getLogRecordFactory() def record_factory(*args, **kwargs): record = old_factory(*args, **kwargs) record.request_id = "" try: request = Request.get_current() except SanicException: ... else: record.request_id = str(request.id) return record logging.setLogRecordFactory(record_factory) LOGGING_CONFIG_DEFAULTS["formatters"]["access"]["format"] = LOGGING_FORMAT app = Sanic("Example", log_config=LOGGING_CONFIG_DEFAULTS) ``` In this example, we are adding the `request.id` to every access log message. *Added in v22.6* ================================================ FILE: guide/content/en/guide/basics/response.md ================================================ # Response All [handlers](./handlers.md) *usually* return a response object, and [middleware](./middleware.md) may optionally return a response object. To clarify that statement: - unless the handler is a streaming endpoint handling its own pattern for sending bytes to the client, the return value must be an instance of :class:`sanic.response.HTTPResponse` (to learn more about this exception see [streaming responses](../advanced/streaming.md#response-streaming)). In **most** use cases, you will need to return a response. - if a middleware does return a response object, that will be used instead of whatever the handler would do (see [middleware](./middleware.md) to learn more). A most basic handler would look like the following. The :class:`sanic.response.HTTPResponse` object will allow you to set the status, body, and headers to be returned to the client. ```python from sanic import HTTPResponse, Sanic app = Sanic("TestApp") @app.route("") def handler(_): return HTTPResponse() ``` However, usually it is easier to use one of the convenience methods discussed below. ## Methods The easiest way to generate a response object is to use one of the convenience functions. ### Text .. column:: **Default Content-Type**: `text/plain; charset=utf-8` **Description**: Returns plain text .. column:: ```python from sanic import text @app.route("/") async def handler(request): return text("Hi 😎") ``` ### HTML .. column:: **Default Content-Type**: `text/html; charset=utf-8` **Description**: Returns an HTML document .. column:: ```python from sanic import html @app.route("/") async def handler(request): return html('
Hi 😎
') ``` ### JSON .. column:: **Default Content-Type**: `application/json` **Description**: Returns a JSON document .. column:: ```python from sanic import json @app.route("/") async def handler(request): return json({"foo": "bar"}) ``` By default, Sanic ships with [`ujson`](https://github.com/ultrajson/ultrajson) as its JSON encoder of choice. If `ujson` is not installed, it will fall back to the standard library `json` module. It is super simple to change this if you want. ```python from sanic import json from orjson import dumps json({"foo": "bar"}, dumps=dumps) ``` You may additionally declare which implementation to use globally across your application at initialization: ```python from orjson import dumps app = Sanic(..., dumps=dumps) ``` ### File .. column:: **Default Content-Type**: N/A **Description**: Returns a file .. column:: ```python from sanic import file @app.route("/") async def handler(request): return await file("/path/to/whatever.png") ``` Sanic will examine the file, and try and guess its mime type and use an appropriate value for the content type. You could be explicit, if you would like: ```python file("/path/to/whatever.png", mime_type="image/png") ``` You can also choose to override the file name: ```python file("/path/to/whatever.png", filename="super-awesome-incredible.png") ``` ### File Streaming .. column:: **Default Content-Type**: N/A **Description**: Streams a file to a client, useful when streaming large files, like a video .. column:: ```python from sanic.response import file_stream @app.route("/") async def handler(request): return await file_stream("/path/to/whatever.mp4") ``` Like the `file()` method, `file_stream()` will attempt to determine the mime type of the file. ### Raw .. column:: **Default Content-Type**: `application/octet-stream` **Description**: Send raw bytes without encoding the body .. column:: ```python from sanic import raw @app.route("/") async def handler(request): return raw(b"raw bytes") ``` ### Redirect .. column:: **Default Content-Type**: `text/html; charset=utf-8` **Description**: Send a `302` response to redirect the client to a different path .. column:: ```python from sanic import redirect @app.route("/") async def handler(request): return redirect("/login") ``` ### Empty .. column:: **Default Content-Type**: N/A **Description**: For responding with an empty message as defined by [RFC 2616](https://tools.ietf.org/search/rfc2616#section-7.2.1) .. column:: ```python from sanic import empty @app.route("/") async def handler(request): return empty() ``` Defaults to a `204` status. ## Default status The default HTTP status code for the response is `200`. If you need to change it, it can be done by the response method. ```python @app.post("/") async def create_new(request): new_thing = await do_create(request) return json({"created": True, "id": new_thing.thing_id}, status=201) ``` ## Returning JSON data Starting in v22.12, When you use the `sanic.json` convenience method, it will return a subclass of `HTTPResponse` called :class:`sanic.response.types.JSONResponse`. This object will have several convenient methods available to modify common JSON body. ```python from sanic import json resp = json(...) ``` - `resp.set_body()` - Set the body of the JSON object to the value passed - `resp.append()` - Append a value to the body like `list.append` (only works if the root JSON is an array) - `resp.extend()` - Extend a value to the body like `list.extend` (only works if the root JSON is an array) - `resp.update()` - Update the body with a value like `dict.update` (only works if the root JSON is an object) - `resp.pop()` - Pop a value like `list.pop` or `dict.pop` (only works if the root JSON is an array or an object) .. warning:: The raw Python object is stored on the `JSONResponse` object as `raw_body`. While it is safe to overwrite this value with a new one, you should **not** attempt to mutate it. You should instead use the methods listed above. ```python resp = json({"foo": "bar"}) # This is OKAY resp.raw_body = {"foo": "bar", "something": "else"} # This is better resp.set_body({"foo": "bar", "something": "else"}) # This is also works well resp.update({"something": "else"}) # This is NOT OKAY resp.raw_body.update({"something": "else"}) ``` ```python # Or, even treat it like a list resp = json(["foo", "bar"]) # This is OKAY resp.raw_body = ["foo", "bar", "something", "else"] # This is better resp.extend(["something", "else"]) # This is also works well resp.append("something") resp.append("else") # This is NOT OKAY resp.raw_body.append("something") ``` *Added in v22.9* ================================================ FILE: guide/content/en/guide/basics/routing.md ================================================ # Routing .. column:: So far we have seen a lot of this decorator in different forms. But what is it? And how do we use it? .. column:: ```python @app.route("/stairway") ... @app.get("/to") ... @app.post("/heaven") ... ``` ## Adding a route .. column:: The most basic way to wire up a handler to an endpoint is with `app.add_route()`. See [API docs](https://sanic.readthedocs.io/en/stable/sanic/api_reference.html#sanic.app.Sanic.url_for) for more details. .. column:: ```python async def handler(request): return text("OK") app.add_route(handler, "/test") ``` .. column:: By default, routes are available as an HTTP `GET` call. You can change a handler to respond to one or more HTTP methods. .. column:: ```python app.add_route( handler, '/test', methods=["POST", "PUT"], ) ``` .. column:: Using the decorator syntax, the previous example is identical to this. .. column:: ```python @app.route('/test', methods=["POST", "PUT"]) async def handler(request): return text('OK') ``` ## HTTP methods Each of the standard HTTP methods has a convenience decorator. ### GET ```python @app.get('/test') async def handler(request): return text('OK') ``` [MDN Docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET) ### POST ```python @app.post('/test') async def handler(request): return text('OK') ``` [MDN Docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST) ### PUT ```python @app.put('/test') async def handler(request): return text('OK') ``` [MDN Docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PUT) ### PATCH ```python @app.patch('/test') async def handler(request): return text('OK') ``` [MDN Docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PATCH) ### DELETE ```python @app.delete('/test') async def handler(request): return text('OK') ``` [MDN Docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/DELETE) ### HEAD ```python @app.head('/test') async def handler(request): return empty() ``` [MDN Docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/HEAD) ### OPTIONS ```python @app.options('/test') async def handler(request): return empty() ``` [MDN Docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS) .. warning:: By default, Sanic will **only** consume the incoming request body on non-safe HTTP methods: `POST`, `PUT`, `PATCH`, `DELETE`. If you want to receive data in the HTTP request on any other method, you will need to do one of the following two options: **Option #1 - Tell Sanic to consume the body using `ignore_body`** ```python @app.request("/path", ignore_body=False) async def handler(_): ... ``` **Option #2 - Manually consume the body in the handler using `receive_body`** ```python @app.get("/path") async def handler(request: Request): await request.receive_body() ``` ## Path parameters .. column:: Sanic allows for pattern matching, and for extracting values from URL paths. These parameters are then injected as keyword arguments in the route handler. .. column:: ```python @app.get("/tag/") async def tag_handler(request, tag): return text("Tag - {}".format(tag)) ``` .. column:: You can declare a type for the parameter. This will be enforced when matching, and also will type cast the variable. .. column:: ```python @app.get("/foo/") async def uuid_handler(request, foo_id: UUID): return text("UUID - {}".format(foo_id)) ``` .. column:: For some standard types like `str`, `int`, and `UUID`, Sanic can infer the path parameter type from the function signature. This means that it may not always be necessary to include the type in the path parameter definition. .. column:: ```python @app.get("/foo/") # Notice there is no :uuid in the path parameter async def uuid_handler(request, foo_id: UUID): return text("UUID - {}".format(foo_id)) ``` ### Supported types ### `str` .. column:: **Regular expression applied**: `r"[^/]+"` **Cast type**: `str` **Example matches**: - `/path/to/Bob` - `/path/to/Python%203` Beginning in v22.3 `str` will *not* match on empty strings. See `strorempty` for this behavior. .. column:: ```python @app.route("/path/to/") async def handler(request, foo: str): ... ``` ### `strorempty` .. column:: **Regular expression applied**: `r"[^/]*"` **Cast type**: `str` **Example matches**: - `/path/to/Bob` - `/path/to/Python%203` - `/path/to/` Unlike the `str` path parameter type, `strorempty` can also match on an empty string path segment. *Added in v22.3* .. column:: ```python @app.route("/path/to/") async def handler(request, foo: str): ... ``` ### `int` .. column:: **Regular expression applied**: `r"-?\d+"` **Cast type**: `int` **Example matches**: - `/path/to/10` - `/path/to/-10` _Does not match float, hex, octal, etc_ .. column:: ```python @app.route("/path/to/") async def handler(request, foo: int): ... ``` ### `float` .. column:: **Regular expression applied**: `r"-?(?:\d+(?:\.\d*)?|\.\d+)"` **Cast type**: `float` **Example matches**: - `/path/to/10` - `/path/to/-10` - `/path/to/1.5` .. column:: ```python @app.route("/path/to/") async def handler(request, foo: float): ... ``` ### `alpha` .. column:: **Regular expression applied**: `r"[A-Za-z]+"` **Cast type**: `str` **Example matches**: - `/path/to/Bob` - `/path/to/Python` _Does not match a digit, or a space or other special character_ .. column:: ```python @app.route("/path/to/") async def handler(request, foo: str): ... ``` ### `slug` .. column:: **Regular expression applied**: `r"[a-z0-9]+(?:-[a-z0-9]+)*"` **Cast type**: `str` **Example matches**: - `/path/to/some-news-story` - `/path/to/or-has-digits-123` *Added in v21.6* .. column:: ```python @app.route("/path/to/") async def handler(request, article: str): ... ``` ### `path` .. column:: **Regular expression applied**: `r"[^/].*?"` **Cast type**: `str` **Example matches**: - `/path/to/hello` - `/path/to/hello.txt` - `/path/to/hello/world.txt` .. column:: ```python @app.route("/path/to/") async def handler(request, foo: str): ... ``` .. warning:: Because this will match on `/`, you should be careful and thoroughly test your patterns that use `path` so they do not capture traffic intended for another endpoint. Additionally, depending on how you use this type, you may be creating a path traversal vulnerability in your application. It is your job to protect your endpoint against this, but feel free to ask in our community channels for help if you need it :) ### `ymd` .. column:: **Regular expression applied**: `r"^([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))"` **Cast type**: `datetime.date` **Example matches**: - `/path/to/2021-03-28` .. column:: ```python @app.route("/path/to/") async def handler(request, foo: datetime.date): ... ``` ### `uuid` .. column:: **Regular expression applied**: `r"[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}"` **Cast type**: `UUID` **Example matches**: - `/path/to/123a123a-a12a-1a1a-a1a1-1a12a1a12345` .. column:: ```python @app.route("/path/to/") async def handler(request, foo: UUID): ... ``` ### ext .. column:: **Regular expression applied**: n/a **Cast type**: *varies* **Example matches**: .. column:: ```python @app.route("/path/to/") async def handler(request, foo: str, ext: str): ... ``` | definition | example | filename | extension | | --------------------------------- | ----------- | ----------- | ---------- | | \ | page.txt | `"page"` | `"txt"` | | \ | cat.jpg | `"cat"` | `"jpg"` | | \ | cat.jpg | `"cat"` | `"jpg"` | | | 123.txt | `123` | `"txt"` | | | 123.svg | `123` | `"svg"` | | | 3.14.tar.gz | `3.14` | `"tar.gz"` | File extensions can be matched using the special `ext` parameter type. It uses a special format that allows you to specify other types of parameter types as the file name, and one or more specific extensions as shown in the example table above. It does *not* support the `path` parameter type. *Added in v22.3* ### regex .. column:: **Regular expression applied**: _whatever you insert_ **Cast type**: `str` **Example matches**: - `/path/to/2021-01-01` This gives you the freedom to define specific matching patterns for your use case. In the example shown, we are looking for a date that is in `YYYY-MM-DD` format. .. column:: ```python @app.route(r"/path/to/") async def handler(request, foo: str): ... ``` ### Regex Matching More often than not, compared with complex routing, the above example is too simple, and we use a completely different routing matching pattern, so here we will explain the advanced usage of regex matching in detail. Sometimes, you want to match a part of a route: ```text /image/123456789.jpg ``` If you wanted to match the file pattern, but only capture the numeric portion, you need to do some regex fun 😄: ```python app.route(r"/image/\d+)\.jpg>") ``` Further, these should all be acceptable: ```python @app.get(r"/") # matching on the full pattern @app.get(r"/") # defining a single matching group @app.get(r"/[a-z]{3}).txt>") # defining a single named matching group @app.get(r"/[a-z]{3}).(?:txt)>") # defining a single named matching group, with one or more non-matching groups ``` Also, if using a named matching group, it must be the same as the segment label. ```python @app.get(r"/\d+).jpg>") # OK @app.get(r"/\d+).jpg>") # NOT OK ``` For more regular usage methods, please refer to [Regular expression operations](https://docs.python.org/3/library/re.html) ## Generating a URL .. column:: Sanic provides a method to generate URLs based on the handler method name: `app.url_for()`. This is useful if you want to avoid hardcoding url paths into your app; instead, you can just reference the handler name. .. column:: ```python @app.route('/') async def index(request): # generate a URL for the endpoint `post_handler` url = app.url_for('post_handler', post_id=5) # Redirect to `/posts/5` return redirect(url) @app.route('/posts/') async def post_handler(request, post_id): ... ``` .. column:: You can pass any arbitrary number of keyword arguments. Anything that is _not_ a request parameter will be implemented as a part of the query string. .. column:: ```python assert app.url_for( "post_handler", post_id=5, arg_one="one", arg_two="two", ) == "/posts/5?arg_one=one&arg_two=two" ``` .. column:: Also supported is passing multiple values for a single query key. .. column:: ```python assert app.url_for( "post_handler", post_id=5, arg_one=["one", "two"], ) == "/posts/5?arg_one=one&arg_one=two" ``` ### Special keyword arguments See [API Docs]() for more details. ```python app.url_for("post_handler", post_id=5, arg_one="one", _anchor="anchor") # '/posts/5?arg_one=one#anchor' # _external requires you to pass an argument _server or set SERVER_NAME in app.config if not url will be same as no _external app.url_for("post_handler", post_id=5, arg_one="one", _external=True) # '//server/posts/5?arg_one=one' # when specifying _scheme, _external must be True app.url_for("post_handler", post_id=5, arg_one="one", _scheme="http", _external=True) # 'http://server/posts/5?arg_one=one' # you can pass all special arguments at once app.url_for("post_handler", post_id=5, arg_one=["one", "two"], arg_two=2, _anchor="anchor", _scheme="http", _external=True, _server="another_server:8888") # 'http://another_server:8888/posts/5?arg_one=one&arg_one=two&arg_two=2#anchor' ``` ### Customizing a route name .. column:: A custom route name can be used by passing a `name` argument while registering the route. .. column:: ```python @app.get("/get", name="get_handler") def handler(request): return text("OK") ``` .. column:: Now, use this custom name to retrieve the URL .. column:: ```python assert app.url_for("get_handler", foo="bar") == "/get?foo=bar" ``` ## Websockets routes .. column:: Websocket routing works similar to HTTP methods. .. column:: ```python async def handler(request, ws): message = "Start" while True: await ws.send(message) message = await ws.recv() app.add_websocket_route(handler, "/test") ``` .. column:: It also has a convenience decorator. .. column:: ```python @app.websocket("/test") async def handler(request, ws): message = "Start" while True: await ws.send(message) message = await ws.recv() ``` Read the [websockets section](../advanced/websockets.md) to learn more about how they work. ## Strict slashes .. column:: Sanic routes can be configured to strictly match on whether or not there is a trailing slash: `/`. This can be configured at a few levels and follows this order of precedence: 1. Route 2. Blueprint 3. BlueprintGroup 4. Application .. column:: ```python # provide default strict_slashes value for all routes app = Sanic(__file__, strict_slashes=True) ``` ```python # overwrite strict_slashes value for specific route @app.get("/get", strict_slashes=False) def handler(request): return text("OK") ``` ```python # it also works for blueprints bp = Blueprint(__file__, strict_slashes=True) @bp.get("/bp/get", strict_slashes=False) def handler(request): return text("OK") ``` ```python bp1 = Blueprint(name="bp1", url_prefix="/bp1") bp2 = Blueprint( name="bp2", url_prefix="/bp2", strict_slashes=False, ) # This will enforce strict slashes check on the routes # under bp1 but ignore bp2 as that has an explicitly # set the strict slashes check to false group = Blueprint.group([bp1, bp2], strict_slashes=True) ``` ## Static files .. column:: In order to serve static files from Sanic, use `app.static()`. The order of arguments is important: 1. Route the files will be served from 2. Path to the files on the server See [API docs](https://sanic.readthedocs.io/en/stable/sanic/api/app.html#sanic.app.Sanic.static) for more details. .. column:: ```python app.static("/static/", "/path/to/directory/") ``` .. tip:: It is generally best practice to end your directory paths with a trailing slash (`/this/is/a/directory/`). This removes ambiguity by being more explicit. .. column:: You can also serve individual files. .. column:: ```python app.static("/", "/path/to/index.html") ``` .. column:: It is also sometimes helpful to name your endpoint .. column:: ```python app.static( "/user/uploads/", "/path/to/uploads/", name="uploads", ) ``` .. column:: Retrieving the URLs works similar to handlers. But, we can also add the `filename` argument when we need a specific file inside a directory. .. column:: ```python assert app.url_for( "static", name="static", filename="file.txt", ) == "/static/file.txt" ``` ```python assert app.url_for( "static", name="uploads", filename="image.png", ) == "/user/uploads/image.png" ``` .. tip:: If you are going to have multiple `static()` routes, then it is *highly* suggested that you manually name them. This will almost certainly alleviate potential hard to discover bugs. ```python app.static("/user/uploads/", "/path/to/uploads/", name="uploads") app.static("/user/profile/", "/path/to/profile/", name="profile_pics") ``` #### Auto index serving .. column:: If you have a directory of static files that should be served by an index page, you can provide the filename of the index. Now, when reaching that directory URL, the index page will be served. .. column:: ```python app.static("/foo/", "/path/to/foo/", index="index.html") ``` *Added in v23.3* #### File browser .. column:: When serving a directory from a static handler, Sanic can be configured to show a basic file browser instead using `directory_view=True`. .. column:: ```python app.static("/uploads/", "/path/to/dir", directory_view=True) ``` You now have a browsable directory in your web browser: ![image](/assets/images/directory-view.png) *Added in v23.3* #### Symlink control .. new:: New in v25.12 This feature was added in version 25.12 .. column:: By default, Sanic will not follow symlinks that point outside the static root directory for security reasons. You can enable external symlinks separately for files and directories using `follow_external_symlink_files` and `follow_external_symlink_dirs`. .. column:: ```python # Allow file symlinks pointing outside static root app.static( "/static", "/var/www/static", follow_external_symlink_files=True, ) # Allow directory symlinks pointing outside static root app.static( "/static", "/var/www/static", follow_external_symlink_dirs=True, ) ``` Symlinks within the static root always work regardless of these settings. Broken symlinks are always hidden from directory listings and return 404. *Added in v25.12* ## Route context .. column:: When a route is defined, you can add any number of keyword arguments with a `ctx_` prefix. These values will be injected into the route `ctx` object. .. column:: ```python @app.get("/1", ctx_label="something") async def handler1(request): ... @app.get("/2", ctx_label="something") async def handler2(request): ... @app.get("/99") async def handler99(request): ... @app.on_request async def do_something(request): if request.route.ctx.label == "something": ... ``` *Added in v21.12* ================================================ FILE: guide/content/en/guide/basics/tasks.md ================================================ --- title: Background tasks --- # Background tasks ## Creating Tasks It is often desirable and very convenient to make usage of [tasks](https://docs.python.org/3/library/asyncio-task.html#asyncio.create_task) in async Python. Sanic provides a convenient method to add tasks to the currently **running** loop. It is somewhat similar to `asyncio.create_task`. For adding tasks before the 'App' loop is running, see next section. ```python async def notify_server_started_after_five_seconds(): await asyncio.sleep(5) print('Server successfully started!') app.add_task(notify_server_started_after_five_seconds()) ``` .. column:: Sanic will attempt to automatically inject the app, passing it as an argument to the task. .. column:: ```python async def auto_inject(app): await asyncio.sleep(5) print(app.name) app.add_task(auto_inject) ``` .. column:: Or you can pass the `app` argument explicitly. .. column:: ```python async def explicit_inject(app): await asyncio.sleep(5) print(app.name) app.add_task(explicit_inject(app)) ``` .. column:: The `add_task` method returns the created `asyncio.Task` object, allowing you to await or check its result later. *Added in v25.12* .. column:: ```python task = app.add_task(some_coroutine()) # Later... result = await task ``` ## Adding tasks before `app.run` It is possible to add background tasks before the App is run ie. before `app.run`. To add a task before the App is run, it is recommended to not pass the coroutine object (ie. one created by calling the `async` callable), but instead just pass the callable and Sanic will create the coroutine object on **each worker**. Note: the tasks that are added such are run as `before_server_start` jobs and thus run on every worker (and not in the main process). This has certain consequences, please read [this comment](https://github.com/sanic-org/sanic/issues/2139#issuecomment-868993668) on [this issue](https://github.com/sanic-org/sanic/issues/2139) for further details. To add work on the main process, consider adding work to [`@app.main_process_start`](./listeners.md). Note: the workers won't start until this work is completed. .. column:: Example to add a task before `app.run` .. column:: ```python async def slow_work(): ... async def even_slower(num): ... app = Sanic(...) app.add_task(slow_work) # Note: we are passing the callable and not coroutine object ... app.add_task(even_slower(10)) # ... or we can call the function and pass the coroutine. app.run(...) ``` ## Named tasks .. column:: When creating a task, you can ask Sanic to keep track of it for you by providing a `name`. .. column:: ```python app.add_task(slow_work, name="slow_task") ``` .. column:: You can now retrieve that task instance from anywhere in your application using `get_task`. .. column:: ```python task = app.get_task("slow_task") ``` .. column:: If that task needs to be cancelled, you can do that with `cancel_task`. Make sure that you `await` it. .. column:: ```python await app.cancel_task("slow_task") ``` .. column:: All registered tasks can be found in the `app.tasks` property. To prevent cancelled tasks from filling up, you may want to run `app.purge_tasks` that will clear out any completed or cancelled tasks. .. column:: ```python app.purge_tasks() ``` This pattern can be particularly useful with `websockets`: ```python async def receiver(ws): while True: message = await ws.recv() if not message: break print(f"Received: {message}") @app.websocket("/feed") async def feed(request, ws): task_name = f"receiver:{request.id}" request.app.add_task(receiver(ws), name=task_name) try: while True: await request.app.event("my.custom.event") await ws.send("A message") finally: # When the websocket closes, let's cleanup the task await request.app.cancel_task(task_name) request.app.purge_tasks() ``` *Added in v21.12* ================================================ FILE: guide/content/en/guide/best-practices/blueprints.md ================================================ # Blueprints ## Overview Blueprints are objects that can be used for sub-routing within an application. Instead of adding routes to the application instance, blueprints define similar methods for adding routes, which are then registered with the application in a flexible and pluggable manner. Blueprints are especially useful for larger applications, where your application logic can be broken down into several groups or areas of responsibility. ## Creating and registering .. column:: First, you must create a blueprint. It has a very similar API as the `Sanic()` app instance with many of the same decorators. .. column:: ```python # ./my_blueprint.py from sanic.response import json from sanic import Blueprint bp = Blueprint("my_blueprint") @bp.route("/") async def bp_root(request): return json({"my": "blueprint"}) ``` .. column:: Next, you register it with the app instance. .. column:: ```python from sanic import Sanic from my_blueprint import bp app = Sanic(__name__) app.blueprint(bp) ``` Blueprints also have the same `websocket()` decorator and `add_websocket_route` method for implementing websockets. .. column:: Beginning in v21.12, a Blueprint may be registered before or after adding objects to it. Previously, only objects attached to the Blueprint at the time of registration would be loaded into application instance. .. column:: ```python app.blueprint(bp) @bp.route("/") async def bp_root(request): ... ``` ## Copying .. column:: Blueprints along with everything that is attached to them can be copied to new instances using the `copy()` method. The only required argument is to pass it a new `name`. However, you could also use this to override any of the values from the old blueprint. .. column:: ```python v1 = Blueprint("Version1", version=1) @v1.route("/something") def something(request): pass v2 = v1.copy("Version2", version=2) app.blueprint(v1) app.blueprint(v2) ``` ``` Available routes: /v1/something /v2/something ``` *Added in v21.9* ## Blueprint groups Blueprints may also be registered as part of a list or tuple, where the registrar will recursively cycle through any sub-sequences of blueprints and register them accordingly. The Blueprint.group method is provided to simplify this process, allowing a ‘mock’ backend directory structure mimicking what’s seen from the front end. Consider this (quite contrived) example: ```text api/ ├──content/ │ ├──authors.py │ ├──static.py │ └──__init__.py ├──info.py └──__init__.py app.py ``` .. column:: #### First blueprint .. column:: ```python # api/content/authors.py from sanic import Blueprint authors = Blueprint("content_authors", url_prefix="/authors") ``` .. column:: #### Second blueprint .. column:: ```python # api/content/static.py from sanic import Blueprint static = Blueprint("content_static", url_prefix="/static") ``` .. column:: #### Blueprint group .. column:: ```python # api/content/__init__.py from sanic import Blueprint from .static import static from .authors import authors content = Blueprint.group(static, authors, url_prefix="/content") ``` .. column:: #### Third blueprint .. column:: ```python # api/info.py from sanic import Blueprint info = Blueprint("info", url_prefix="/info") ``` .. column:: #### Another blueprint group .. column:: ```python # api/__init__.py from sanic import Blueprint from .content import content from .info import info api = Blueprint.group(content, info, url_prefix="/api") ``` .. column:: #### Main server All blueprints are now registered .. column:: ```python # app.py from sanic import Sanic from .api import api app = Sanic(__name__) app.blueprint(api) ``` ### Blueprint group prefixes and composability As shown in the code above, when you create a group of blueprints you can extend the URL prefix of all the blueprints in the group by passing the `url_prefix` argument to the `Blueprint.group` method. This is useful for creating a mock directory structure for your API. In addition, there is a `name_prefix` argument that can be used to make blueprints reusable and composable. The is specifically necessary when applying a single blueprint to multiple groups. By doing this, the blueprint will be registered with a unique name for each group, which allows the blueprint to be registered multiple times and have its routes each properly named with a unique identifier. .. column:: Consider this example. The routes built will be named as follows: - `TestApp.group-a_bp1.route1` - `TestApp.group-a_bp2.route2` - `TestApp.group-b_bp1.route1` - `TestApp.group-b_bp2.route2` .. column:: ```python bp1 = Blueprint("bp1", url_prefix="/bp1") bp2 = Blueprint("bp2", url_prefix="/bp2") bp1.add_route(lambda _: ..., "/", name="route1") bp2.add_route(lambda _: ..., "/", name="route2") group_a = Blueprint.group( bp1, bp2, url_prefix="/group-a", name_prefix="group-a" ) group_b = Blueprint.group( bp1, bp2, url_prefix="/group-b", name_prefix="group-b" ) app = Sanic("TestApp") app.blueprint(group_a) app.blueprint(group_b) ``` *Name prefixing added in v23.6* ## Middleware .. column:: Blueprints can also have middleware that is specifically registered for its endpoints only. .. column:: ```python @bp.middleware async def print_on_request(request): print("I am a spy") @bp.middleware("request") async def halt_request(request): return text("I halted the request") @bp.middleware("response") async def halt_response(request, response): return text("I halted the response") ``` .. column:: Similarly, using blueprint groups, it is possible to apply middleware to an entire group of nested blueprints. .. column:: ```python bp1 = Blueprint("bp1", url_prefix="/bp1") bp2 = Blueprint("bp2", url_prefix="/bp2") @bp1.middleware("request") async def bp1_only_middleware(request): print("applied on Blueprint : bp1 Only") @bp1.route("/") async def bp1_route(request): return text("bp1") @bp2.route("/") async def bp2_route(request, param): return text(param) group = Blueprint.group(bp1, bp2) @group.middleware("request") async def group_middleware(request): print("common middleware applied for both bp1 and bp2") # Register Blueprint group under the app app.blueprint(group) ``` ## Exceptions .. column:: Just like other [exception handling](./exceptions.md), you can define blueprint specific handlers. .. column:: ```python @bp.exception(NotFound) def ignore_404s(request, exception): return text("Yep, I totally found the page: {}".format(request.url)) ``` ## Static files .. column:: Blueprints can also have their own static handlers .. column:: ```python bp = Blueprint("bp", url_prefix="/bp") bp.static("/web/path", "/folder/to/serve") bp.static("/web/path", "/folder/to/server", name="uploads") ``` .. column:: Which can then be retrieved using `url_for()`. See [routing](../basics/routing.md) for more information. .. column:: ```python >>> print(app.url_for("static", name="bp.uploads", filename="file.txt")) '/bp/web/path/file.txt' ``` ## Listeners .. column:: Blueprints can also implement [listeners](../basics/listeners.md). .. column:: ```python @bp.listener("before_server_start") async def before_server_start(app, loop): ... @bp.listener("after_server_stop") async def after_server_stop(app, loop): ... ``` ## Versioning As discussed in the [versioning section](../advanced/versioning.md), blueprints can be used to implement different versions of a web API. .. column:: The `version` will be prepended to the routes as `/v1` or `/v2`, etc. .. column:: ```python auth1 = Blueprint("auth", url_prefix="/auth", version=1) auth2 = Blueprint("auth", url_prefix="/auth", version=2) ``` .. column:: When we register our blueprints on the app, the routes `/v1/auth` and `/v2/auth` will now point to the individual blueprints, which allows the creation of sub-sites for each API version. .. column:: ```python from auth_blueprints import auth1, auth2 app = Sanic(__name__) app.blueprint(auth1) app.blueprint(auth2) ``` .. column:: It is also possible to group the blueprints under a `BlueprintGroup` entity and version multiple of them together at the same time. .. column:: ```python auth = Blueprint("auth", url_prefix="/auth") metrics = Blueprint("metrics", url_prefix="/metrics") group = Blueprint.group(auth, metrics, version="v1") # This will provide APIs prefixed with the following URL path # /v1/auth/ and /v1/metrics ``` ## Composable A `Blueprint` may be registered to multiple groups, and each of `BlueprintGroup` itself could be registered and nested further. This creates a limitless possibility `Blueprint` composition. *Added in v21.6* .. column:: Take a look at this example and see how the two handlers are actually mounted as five (5) distinct routes. .. column:: ```python app = Sanic(__name__) blueprint_1 = Blueprint("blueprint_1", url_prefix="/bp1") blueprint_2 = Blueprint("blueprint_2", url_prefix="/bp2") group = Blueprint.group( blueprint_1, blueprint_2, version=1, version_prefix="/api/v", url_prefix="/grouped", strict_slashes=True, ) primary = Blueprint.group(group, url_prefix="/primary") @blueprint_1.route("/") def blueprint_1_default_route(request): return text("BP1_OK") @blueprint_2.route("/") def blueprint_2_default_route(request): return text("BP2_OK") app.blueprint(group) app.blueprint(primary) app.blueprint(blueprint_1) # The mounted paths: # /api/v1/grouped/bp1/ # /api/v1/grouped/bp2/ # /api/v1/primary/grouped/bp1 # /api/v1/primary/grouped/bp2 # /bp1 ``` ## Generating a URL When generating a url with `url_for()`, the endpoint name will be in the form: ```text {blueprint_name}.{handler_name} ``` ================================================ FILE: guide/content/en/guide/best-practices/decorators.md ================================================ # Decorators One of the best ways to create a consistent and DRY web API is to make use of decorators to remove functionality from the handlers, and make it repeatable across your views. .. column:: Therefore, it is very common to see a Sanic view handler with several decorators on it. .. column:: ```python @app.get("/orders") @authorized("view_order") @validate_list_params() @inject_user() async def get_order_details(request, params, user): ... ``` ## Example Here is a starter template to help you create decorators. In this example, let’s say you want to check that a user is authorized to access a particular endpoint. You can create a decorator that wraps a handler function, checks a request if the client is authorized to access a resource, and sends the appropriate response. ```python from functools import wraps from sanic.response import json def authorized(): def decorator(f): @wraps(f) async def decorated_function(request, *args, **kwargs): # run some method that checks the request # for the client's authorization status is_authorized = await check_request_for_authorization_status(request) if is_authorized: # the user is authorized. # run the handler method and return the response response = await f(request, *args, **kwargs) return response else: # the user is not authorized. return json({"status": "not_authorized"}, 403) return decorated_function return decorator @app.route("/") @authorized() async def test(request): return json({"status": "authorized"}) ``` ## Templates Decorators are **fundamental** to building applications with Sanic. They increase the portability and maintainablity of your code. In paraphrasing the Zen of Python: "[decorators] are one honking great idea -- let's do more of those!" To make it easier to implement them, here are three examples of copy/pastable code to get you started. .. column:: Don't forget to add these import statements. Although it is *not* necessary, using `@wraps` helps keep some of the metadata of your function intact. [See docs](https://docs.python.org/3/library/functools.html#functools.wraps). Also, we use the `isawaitable` pattern here to allow the route handlers to by regular or asynchronous functions. .. column:: ```python from inspect import isawaitable from functools import wraps ``` ### With args .. column:: Often, you will want a decorator that will *always* need arguments. Therefore, when it is implemented you will always be calling it. ```python @app.get("/") @foobar(1, 2) async def handler(request: Request): return text("hi") ``` .. column:: ```python def foobar(arg1, arg2): def decorator(f): @wraps(f) async def decorated_function(request, *args, **kwargs): response = f(request, *args, **kwargs) if isawaitable(response): response = await response return response return decorated_function return decorator ``` ### Without args .. column:: Sometimes you want a decorator that will not take arguments. When this is the case, it is a nice convenience not to have to call it ```python @app.get("/") @foobar async def handler(request: Request): return text("hi") ``` .. column:: ```python def foobar(func): def decorator(f): @wraps(f) async def decorated_function(request, *args, **kwargs): response = f(request, *args, **kwargs) if isawaitable(response): response = await response return response return decorated_function return decorator(func) ``` ### With or Without args .. column:: If you want a decorator with the ability to be called or not, you can follow this pattern. Using keyword only arguments is not necessary, but might make implementation simpler. ```python @app.get("/") @foobar(arg1=1, arg2=2) async def handler(request: Request): return text("hi") ``` ```python @app.get("/") @foobar async def handler(request: Request): return text("hi") ``` .. column:: ```python def foobar(maybe_func=None, *, arg1=None, arg2=None): def decorator(f): @wraps(f) async def decorated_function(request, *args, **kwargs): response = f(request, *args, **kwargs) if isawaitable(response): response = await response return response return decorated_function return decorator(maybe_func) if maybe_func else decorator ``` ================================================ FILE: guide/content/en/guide/best-practices/exceptions.md ================================================ # Exceptions ## Using Sanic exceptions Sometimes you just need to tell Sanic to halt execution of a handler and send back a status code response. You can raise a `SanicException` for this and Sanic will do the rest for you. You can pass an optional `status_code` argument. By default, a SanicException will return an internal server error 500 response. ```python from sanic.exceptions import SanicException @app.route("/youshallnotpass") async def no_no(request): raise SanicException("Something went wrong.", status_code=501) ``` Sanic provides a number of standard exceptions. They each automatically will raise the appropriate HTTP status code in your response. [Check the API reference](https://sanic.readthedocs.io/en/latest/sanic/api_reference.html#module-sanic.exceptions) for more details. .. column:: The more common exceptions you _should_ implement yourself include: - `BadRequest` (400) - `Unauthorized` (401) - `Forbidden` (403) - `NotFound` (404) - `ServerError` (500) .. column:: ```python from sanic import exceptions @app.route("/login") async def login(request): user = await some_login_func(request) if not user: raise exceptions.NotFound( f"Could not find user with username={request.json.username}" ) ``` ## Exception properties All exceptions in Sanic derive from `SanicException`. That class has a few properties on it that assist the developer in consistently reporting their exceptions across an application. - `message` - `status_code` - `quiet` - `headers` - `context` - `extra` All of these properties can be passed to the exception when it is created, but the first three can also be used as class variables as we will see. .. column:: ### `message` The `message` property obviously controls the message that will be displayed as with any other exception in Python. What is particularly useful is that you can set the `message` property on the class definition allowing for easy standardization of language across an application .. column:: ```python class CustomError(SanicException): message = "Something bad happened" raise CustomError # or raise CustomError("Override the default message with something else") ``` .. column:: ### `status_code` This property is used to set the response code when the exception is raised. This can particularly be useful when creating custom 400 series exceptions that are usually in response to bad information coming from the client. .. column:: ```python class TeapotError(SanicException): status_code = 418 message = "Sorry, I cannot brew coffee" raise TeapotError # or raise TeapotError(status_code=400) ``` .. column:: ### `quiet` By default, exceptions will be output by Sanic to the `error_logger`. Sometimes this may not be desirable, especially if you are using exceptions to trigger events in exception handlers (see [the following section](./exceptions.md#handling)). You can suppress the log output using `quiet=True`. .. column:: ```python class SilentError(SanicException): message = "Something happened, but not shown in logs" quiet = True raise SilentError # or raise InvalidUsage("blah blah", quiet=True) ``` .. column:: Sometimes while debugging you may want to globally ignore the `quiet=True` property. You can force Sanic to log out all exceptions regardless of this property using `NOISY_EXCEPTIONS` *Added in v21.12* .. column:: ```python app.config.NOISY_EXCEPTIONS = True ``` .. column:: ### `headers` Using `SanicException` as a tool for creating responses is super powerful. This is in part because not only can you control the `status_code`, but you can also control reponse headers directly from the exception. .. column:: ```python class MyException(SanicException): headers = { "X-Foo": "bar" } raise MyException # or raise InvalidUsage("blah blah", headers={ "X-Foo": "bar" }) ``` .. column:: ### `extra` See [contextual exceptions](./exceptions.md#contextual-exceptions) *Added in v21.12* .. column:: ```python raise SanicException(..., extra={"name": "Adam"}) ``` .. column:: ### `context` See [contextual exceptions](./exceptions.md#contextual-exceptions) *Added in v21.12* .. column:: ```python raise SanicException(..., context={"foo": "bar"}) ``` ## Handling Sanic handles exceptions automatically by rendering an error page, so in many cases you don't need to handle them yourself. However, if you would like more control on what to do when an exception is raised, you can implement a handler yourself. Sanic provides a decorator for this, which applies to not only the Sanic standard exceptions, but **any** exception that your application might throw. .. column:: The easiest method to add a handler is to use `@app.exception()` and pass it one or more exceptions. .. column:: ```python from sanic.exceptions import NotFound @app.exception(NotFound, SomeCustomException) async def ignore_404s(request, exception): return text("Yep, I totally found the page: {}".format(request.url)) ``` .. column:: You can also create a catchall handler by catching `Exception`. .. column:: ```python @app.exception(Exception) async def catch_anything(request, exception): ... ``` .. column:: You can also use `app.error_handler.add()` to add error handlers. .. column:: ```python async def server_error_handler(request, exception): return text("Oops, server error", status=500) app.error_handler.add(Exception, server_error_handler) ``` ## Built-in error handling Sanic ships with three formats for exceptions: HTML, JSON, and text. You can see examples of them below in the [Fallback handler](#fallback-handler) section. .. column:: You can control _per route_ which format to use with the `error_format` keyword argument. *Added in v21.9* .. column:: ```python @app.request("/", error_format="text") async def handler(request): ... ``` ## Custom error handling In some cases, you might want to add some more error handling functionality to what is provided by default. In that case, you can subclass Sanic's default error handler as such: ```python from sanic.handlers import ErrorHandler class CustomErrorHandler(ErrorHandler): def default(self, request: Request, exception: Exception) -> HTTPResponse: ''' handles errors that have no error handlers assigned ''' # You custom error handling logic... status_code = getattr(exception, "status_code", 500) return json({ "error": str(exception), "foo": "bar" }, status=status_code) app.error_handler = CustomErrorHandler() ``` ## Fallback handler Sanic comes with three fallback exception handlers: 1. HTML 2. Text 3. JSON These handlers present differing levels of detail depending upon whether your application is in [debug mode](../running/development.md) or not. By default, Sanic will be in "auto" mode, which means that it will using the incoming request and potential matching handler to choose the appropriate response format. For example, when in a browser it should always provide an HTML error page. When using curl, you might see JSON or plain text. ### HTML ```python app.config.FALLBACK_ERROR_FORMAT = "html" ``` .. column:: ```python app.config.DEBUG = True ``` ![Error](/assets/images/error-display-html-debug.png) .. column:: ```python app.config.DEBUG = False ``` ![Error](/assets/images/error-display-html-prod.png) ### Text ```python app.config.FALLBACK_ERROR_FORMAT = "text" ``` .. column:: ```python app.config.DEBUG = True ``` ```sh curl localhost:8000/exc -i HTTP/1.1 500 Internal Server Error content-length: 620 connection: keep-alive content-type: text/plain; charset=utf-8 ⚠️ 500 — Internal Server Error ============================== That time when that thing broke that other thing? That happened. ServerError: That time when that thing broke that other thing? That happened. while handling path /exc Traceback of TestApp (most recent call last): ServerError: That time when that thing broke that other thing? That happened. File /path/to/sanic/app.py, line 979, in handle_request response = await response File /path/to/server.py, line 16, in handler do_something(cause_error=True) File /path/to/something.py, line 9, in do_something raise ServerError( ``` .. column:: ```python app.config.DEBUG = False ``` ```sh curl localhost:8000/exc -i HTTP/1.1 500 Internal Server Error content-length: 134 connection: keep-alive content-type: text/plain; charset=utf-8 ⚠️ 500 — Internal Server Error ============================== That time when that thing broke that other thing? That happened. ``` ### JSON ```python app.config.FALLBACK_ERROR_FORMAT = "json" ``` .. column:: ```python app.config.DEBUG = True ``` ```sh curl localhost:8000/exc -i HTTP/1.1 500 Internal Server Error content-length: 572 connection: keep-alive content-type: application/jso { "description": "Internal Server Error", "status": 500, "message": "That time when that thing broke that other thing? That happened.", "path": "/exc", "args": {}, "exceptions": [ { "type": "ServerError", "exception": "That time when that thing broke that other thing? That happened.", "frames": [ { "file": "/path/to/sanic/app.py", "line": 979, "name": "handle_request", "src": "response = await response" }, { "file": "/path/to/server.py", "line": 16, "name": "handler", "src": "do_something(cause_error=True)" }, { "file": "/path/to/something.py", "line": 9, "name": "do_something", "src": "raise ServerError(" } ] } ] } ``` .. column:: ```python app.config.DEBUG = False ``` ```sh curl localhost:8000/exc -i HTTP/1.1 500 Internal Server Error content-length: 129 connection: keep-alive content-type: application/json { "description": "Internal Server Error", "status": 500, "message": "That time when that thing broke that other thing? That happened." } ``` ### Auto Sanic also provides an option for guessing which fallback option to use. ```python app.config.FALLBACK_ERROR_FORMAT = "auto" ``` ## Contextual Exceptions Default exception messages that simplify the ability to consistently raise exceptions throughout your application. ```python class TeapotError(SanicException): status_code = 418 message = "Sorry, I cannot brew coffee" raise TeapotError ``` But this lacks two things: 1. A dynamic and predictable message format 2. The ability to add additional context to an error message (more on this in a moment) *Added in v21.12* Using one of Sanic's exceptions, you have two options to provide additional details at runtime: ```python raise TeapotError(extra={"foo": "bar"}, context={"foo": "bar"}) ``` What's the difference and when should you decide to use each? - `extra` - The object itself will **never** be sent to a production client. It is meant for internal use only. What could it be used for? - Generating (as we will see in a minute) a dynamic error message - Providing runtime details to a logger - Debug information (when in development mode, it is rendered) - `context` - This object is **always** sent to production clients. It is generally meant to be used to send additional details about the context of what happened. What could it be used for? - Providing alternative values on a `BadRequest` validation issue - Responding with helpful details for your customers to open a support ticket - Displaying state information like current logged in user info ### Dynamic and predictable message using `extra` Sanic exceptions can be raised using `extra` keyword arguments to provide additional information to a raised exception instance. ```python class TeapotError(SanicException): status_code = 418 @property def message(self): return f"Sorry {self.extra['name']}, I cannot make you coffee" raise TeapotError(extra={"name": "Adam"}) ``` The new feature allows the passing of `extra` meta to the exception instance, which can be particularly useful as in the above example to pass dynamic data into the message text. This `extra` info object **will be suppressed** when in `PRODUCTION` mode, but displayed in `DEVELOPMENT` mode. .. column:: **DEVELOPMENT** ![image](~@assets/images/error-extra-debug.png) .. column:: **PRODUCTION** ![image](~@assets/images/error-extra-prod.png) ### Additional `context` to an error message Sanic exceptions can also be raised with a `context` argument to pass intended information along to the user about what happened. This is particularly useful when creating microservices or an API intended to pass error messages in JSON format. In this use case, we want to have some context around the exception beyond just a parseable error message to return details to the client. ```python raise TeapotError(context={"foo": "bar"}) ``` This is information **that we want** to always be passed in the error (when it is available). Here is what it should look like: .. column:: **PRODUCTION** ```json { "description": "I'm a teapot", "status": 418, "message": "Sorry Adam, I cannot make you coffee", "context": { "foo": "bar" } } ``` .. column:: **DEVELOPMENT** ```json { "description": "I'm a teapot", "status": 418, "message": "Sorry Adam, I cannot make you coffee", "context": { "foo": "bar" }, "path": "/", "args": {}, "exceptions": [ { "type": "TeapotError", "exception": "Sorry Adam, I cannot make you coffee", "frames": [ { "file": "handle_request", "line": 83, "name": "handle_request", "src": "" }, { "file": "/tmp/p.py", "line": 17, "name": "handler", "src": "raise TeapotError(" } ] } ] } ``` ## Error reporting Sanic has a [signal](../advanced/signals.md#built-in-signals) that allows you to hook into the exception reporting process. This is useful if you want to send exception information to a third party service like Sentry or Rollbar. This can be conveniently accomplished by attaching an error reporting handler as show below: ```python @app.report_exception async def catch_any_exception(app: Sanic, exception: Exception): print("Caught exception:", exception) ``` .. note:: This handler will be dispatched into a background task and **IS NOT** intended for use to manipulate any response data. It is intended to be used for logging or reporting purposes only, and should not impact the ability of your application to return the error response to the client. *Added in v23.6* ================================================ FILE: guide/content/en/guide/best-practices/logging.md ================================================ # Logging Sanic allows you to do different types of logging (access log, error log) on the requests based on the [Python logging API](https://docs.python.org/3/howto/logging.html). You should have some basic knowledge on Python logging if you want to create a new configuration. But, don't worry, out of the box Sanic ships with some sensible logging defaults. Out of the box it uses an `AutoFormatter` that will format the logs depending upon whether you are in debug mode or not. We will show you how to force this later on. ## Quick Start Let's start by looking at what logging might look like in local development. For this, we will use the default logging configuration that Sanic provides and make sure to run Sanic in development mode. .. column:: A simple example using default settings would be like this: .. column:: ```python from sanic import Sanic from sanic.log import logger from sanic.response import text app = Sanic('logging_example') @app.route('/') async def test(request): logger.info('Here is your log') return text('Hello World!') ``` .. column:: Because we are specifically trying to look at the development logs, we will make sure to run Sanic in development mode. .. column:: ```sh sanic path.to.server:app --dev ``` After the server is running, you should see logs like this. ![Sanic Logging Start](/assets/images/logging-debug-start.png) You can send a request to server and it will print the log messages. ![Sanic Logging Access](/assets/images/logging-debug-access.png) Some important points to note: - The default log level in **production** mode is `INFO`. - The default log level in **debug** mode is `DEBUG`. - When in **debug** mode, the log messages will not have a timestamp (except on access logs). - Sanic will try to colorize the logs if the terminal supports it. If you are running in Docker with docker-compose, you may need to set `tty: true` in your `docker-compose.yml` file to see the colors. ## Sanic's loggers Out of the box, Sanic ships with five loggers: | **Logger Name** | **Use Case** | |-------------------|-------------------------------| | `sanic.root` | Used to log internal messages. | | `sanic.error` | Used to log error logs. | | `sanic.access` | Used to log access logs. | | `sanic.server` | Used to log server logs. | | `sanic.websockets`| Used to log websocket logs. | .. column:: If you want to use these loggers yourself, you can import them from `sanic.log`. .. column:: ```python from sanic.log import logger, error_logger, access_logger, server_logger, websockets_logger logger.info('This is a root logger message') ``` .. warning:: Feel free to use the root logger and the error logger yourself. But, you probably don't want to use the access logger, server logger, or websockets logger directly. These are used internally by Sanic and are configured to log in a specific way. If you want to change the way these loggers log, you should change the logging configuration. ## Default logging configuration Sanic ships with a default logging configuration that is used when you do not provide your own. This configuration is stored in `sanic.log.LOGGING_CONFIG_DEFAULTS`. ```python { 'version': 1, 'disable_existing_loggers': False, 'loggers': { 'sanic.root': {'level': 'INFO', 'handlers': ['console']}, 'sanic.error': { 'level': 'INFO', 'handlers': ['error_console'], 'propagate': True, 'qualname': 'sanic.error' }, 'sanic.access': { 'level': 'INFO', 'handlers': ['access_console'], 'propagate': True, 'qualname': 'sanic.access' }, 'sanic.server': { 'level': 'INFO', 'handlers': ['console'], 'propagate': True, 'qualname': 'sanic.server' }, 'sanic.websockets': { 'level': 'INFO', 'handlers': ['console'], 'propagate': True, 'qualname': 'sanic.websockets' } }, 'handlers': { 'console': { 'class': 'logging.StreamHandler', 'formatter': 'generic', 'stream': sys.stdout }, 'error_console': { 'class': 'logging.StreamHandler', 'formatter': 'generic', 'stream': sys.stderr }, 'access_console': { 'class': 'logging.StreamHandler', 'formatter': 'access', 'stream': sys.stdout } }, 'formatters': { 'generic': {'class': 'sanic.logging.formatter.AutoFormatter'}, 'access': {'class': 'sanic.logging.formatter.AutoAccessFormatter'} } } ``` ## Changing Sanic loggers .. column:: To use your own logging config, simply use `logging.config.dictConfig`, or pass `log_config` when you initialize Sanic app. .. column:: ```python app = Sanic('logging_example', log_config=LOGGING_CONFIG) if __name__ == "__main__": app.run(access_log=False) ``` .. column:: But, what if you do not want to control the logging completely, just change the formatter for example? Here, we will import the default logging config and modify only the parts that we want to force (for example) to use the `ProdFormatter` all of the time. .. column:: ```python from sanic.log import LOGGING_CONFIG_DEFAULTS LOGGING_CONFIG_DEFAULTS['formatters']['generic']['class'] = 'sanic.logging.formatter.ProdFormatter' LOGGING_CONFIG_DEFAULTS['formatters']['access']['class'] = 'sanic.logging.formatter.ProdAccessFormatter' app = Sanic('logging_example', log_config=LOGGING_CONFIG_DEFAULTS) ``` .. tip:: FYI Logging in Python is a relatively cheap operation. However, if you are serving a high number of requests and performance is a concern, all of that time logging out access logs adds up and becomes quite expensive. This is a good opportunity to place Sanic behind a proxy (like nginx) and to do your access logging there. You will see a *significant* increase in overall performance by disabling the `access_log`. For optimal production performance, it is advised to run Sanic with `debug` and `access_log` disabled: `app.run(debug=False, access_log=False)` ## Access logger additional parameters Sanic provides additional parameters to the access logger. | Log Context Parameter | Parameter Value | Datatype | |-----------------------|---------------------------------------|----------| | `host` | `request.ip` | `str` | | `request` | `request.method + " " + request.url` | `str` | | `status` | `response` | `int` | | `byte` | `len(response.body)` | `int` | | `duration` | | `float` | ## Legacy logging Many logging changes were introduced in Sanic 24.3. The main changes were related to logging formats. If you prefer the legacy logging format, you can use the `sanic.logging.formatter.LegacyFormatter` and `sanic.logging.formatter.LegacyAccessFormatter` formatters. ================================================ FILE: guide/content/en/guide/best-practices/testing.md ================================================ # Testing See [sanic-testing](../../plugins/sanic-testing/getting-started.md) ================================================ FILE: guide/content/en/guide/deployment/caddy.md ================================================ # Caddy Deployment ## Introduction Caddy is a state-of-the-art web server and proxy that supports up to HTTP/3. Its simplicity lies in its minimalistic configuration and the inbuilt ability to automatically procure TLS certificates for your domains from Let's Encrypt. In this setup, we will configure the Sanic application to serve locally at 127.0.0.1:8001, with Caddy playing the role of the public-facing server for the domain example.com. You may install Caddy from your favorite package menager on Windows, Linux and Mac. The package is named `caddy`. ## Proxied Sanic app ```python from sanic import Sanic from sanic.response import text app = Sanic("proxied_example") @app.get("/") def index(request): # This should display external (public) addresses: return text( f"{request.remote_addr} connected to {request.url_for('index')}\n" f"Forwarded: {request.forwarded}\n" ) ``` To run this application, save as `proxied_example.py`, and use the sanic command-line interface as follows: ```bash SANIC_PROXIES_COUNT=1 sanic proxied_example --port 8001 ``` Setting the SANIC_PROXIES_COUNT environment variable instructs Sanic to trust the X-Forwarded-* headers sent by Caddy, allowing it to correctly identify the client's IP address and other information. ## Caddy is simple If you have no other web servers running, you can simply run Caddy CLI (needs `sudo` on Linux): ```bash caddy reverse-proxy --from example.com --to :8001 ``` This is a complete server that includes a certificate for your domain, http-to-https redirect, proxy headers, streaming and WebSockets. Your Sanic application should now be available on the domain you specified by HTTP versions 1, 2 and 3. Remember to open up UDP/443 on your firewall to enable H3 communications. All done? Soon enough you'll be needing more than one server, or more control over details, which is where the configuration files come in. The above command is equivalent to this `Caddyfile`, serving as a good starting point for your install: ``` example.com { reverse_proxy localhost:8001 } ``` Some Linux distributions install Caddy such that it reads configuration from `/etc/caddy/Caddyfile`, which `import /etc/caddy/conf.d/*` for each site you are running. If not, you'll need to manually run `caddy run` as a system service, pointing it at the proper config file. Alternatively, use Caddy API mode with `caddy run --resume` for persistent config changes. Note that any Caddyfile loading will replace all prior configuration and thus `caddy-api` is not configurable in this traditional manner. ## Advanced configuration At times, you might need to mix static files and handlers at the site root for cleaner URLs. In Sanic, you'd use `app.static("/", "static", index="index.html")` to achieve this. However, for improved performance, you can offload serving static files to Caddy: ``` app.example.com { # Look for static files first, proxy to Sanic if not found route { file_server { root /srv/sanicexample/static precompress br # brotli your large scripts and styles pass_thru } reverse_proxy unix//tmp/sanic.socket # sanic --unix /tmp/sanic.socket } } ``` Please refer to [Caddy documentation](https://caddyserver.com/docs/) for more options. ================================================ FILE: guide/content/en/guide/deployment/docker.md ================================================ # Docker Deployment ## Introduction For a long time, the environment has always been a difficult problem for deployment. If there are conflicting configurations in your project, you have to spend a lot of time resolving them. Fortunately, virtualization provides us with a good solution. Docker is one of them. If you don't know Docker, you can visit [Docker official website](https://www.docker.com/) to learn more. ## Build Image Let's start with a simple project. We will use a Sanic project as an example. Assume the project path is `/path/to/SanicDocker`. .. column:: The directory structure looks like this: .. column:: ```text # /path/to/SanicDocker SanicDocker ├── requirements.txt ├── dockerfile └── server.py ``` .. column:: And the `server.py` code looks like this: .. column:: ```python app = Sanic("MySanicApp") @app.get('/') async def hello(request): return text("OK!") if __name__ == '__main__': app.run(host='0.0.0.0', port=8000) ``` .. note:: Please note that the host cannot be 127.0.0.1 . In docker container, 127.0.0.1 is the default network interface of the container, only the container can communicate with other containers. more information please visit [Docker network](https://docs.docker.com/engine/reference/commandline/network/) Code is ready, let's write the `Dockerfile`: ```Dockerfile FROM sanicframework/sanic:3.8-latest WORKDIR /sanic COPY . . RUN pip install -r requirements.txt EXPOSE 8000 CMD ["python", "server.py"] ``` Run the following command to build the image: ```shell docker build -t my-sanic-image . ``` ## Start Container .. column:: After the image built, we can start the container use `my-sanic-image`: .. column:: ```shell docker run --name mysanic -p 8000:8000 -d my-sanic-image ``` .. column:: Now we can visit `http://localhost:8000` to see the result: .. column:: ```text OK! ``` ## Use docker-compose If your project consist of multiple services, you can use [docker-compose](https://docs.docker.com/compose/) to manage them. for example, we will deploy `my-sanic-image` and `nginx`, achieve through nginx access sanic server. .. column:: First of all, we need prepare nginx configuration file. create a file named `mysanic.conf`: .. column:: ```nginx server { listen 80; listen [::]:80; location / { proxy_pass http://mysanic:8000/; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection upgrade; proxy_set_header Accept-Encoding gzip; } } ``` .. column:: Then, we need to prepare `docker-compose.yml` file. The content follows: .. column:: ```yaml version: "3" services: mysanic: image: my-sanic-image ports: - "8000:8000" restart: always mynginx: image: nginx:1.13.6-alpine ports: - "80:80" depends_on: - mysanic volumes: - ./mysanic.conf:/etc/nginx/conf.d/mysanic.conf restart: always networks: default: driver: bridge ``` .. column:: After that, we can start them: .. column:: ```shell docker-compose up -d ``` .. column:: Now, we can visit `http://localhost:80` to see the result: .. column:: ```text OK! ``` ================================================ FILE: guide/content/en/guide/deployment/kubernetes.md ================================================ # Kubernetes ================================================ FILE: guide/content/en/guide/deployment/nginx.md ================================================ # Nginx Deployment ## Introduction Although Sanic can be run directly on Internet, it may be useful to use a proxy server such as Nginx in front of it. This is particularly useful for running multiple virtual hosts on the same IP, serving NodeJS or other services beside a single Sanic app, and it also allows for efficient serving of static files. TLS and HTTP/2 are also easily implemented on such proxy. We are setting the Sanic app to serve only locally at 127.0.0.1:8001, while the Nginx installation is responsible for providing the service to public Internet on domain example.com. Static files will be served by Nginx for maximal performance. ## Proxied Sanic app ```python from sanic import Sanic from sanic.response import text app = Sanic("proxied_example") @app.get("/") def index(request): # This should display external (public) addresses: return text( f"{request.remote_addr} connected to {request.url_for('index')}\n" f"Forwarded: {request.forwarded}\n" ) ``` Since this is going to be a system service, save your code to `/srv/sanicservice/proxied_example.py`. For testing, run your app in a terminal using the `sanic` CLI in the folder where you saved the file. ```bash SANIC_FORWARDED_SECRET=_hostname sanic proxied_example --port 8001 ``` We provide Sanic config `FORWARDED_SECRET` to identify which proxy it gets the remote addresses from. Note the `_` in front of the local hostname. This gives basic protection against users spoofing these headers and faking their IP addresses and more. ## SSL certificates Install Certbot and obtain a certicate for all your domains. This will spin up its own webserver on port 80 for a moment to verify you control the given domain names. ```bash certbot -d example.com -d www.example.com ``` ## Nginx configuration Quite much configuration is required to allow fast transparent proxying, but for the most part these don't need to be modified, so bear with me. .. tip:: Note Separate upstream section, rather than simply adding the IP after `proxy_pass` as in most tutorials, is needed for HTTP keep-alive. We also enable streaming, WebSockets and Nginx serving static files. The following config goes inside the `http` section of `nginx.conf` or if your system uses multiple config files, `/etc/nginx/sites-available/default` or your own files (be sure to symlink them to `sites-enabled`): ```nginx # Files managed by Certbot ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # Sanic service upstream example.com { keepalive 100; server 127.0.0.1:8001; #server unix:/tmp//sanic.sock; } server { server_name example.com; listen 443 ssl http2 default_server; listen [::]:443 ssl http2 default_server; # Serve static files if found, otherwise proxy to Sanic location / { root /srv/sanicexample/static; try_files $uri @sanic; } location @sanic { proxy_pass http://$server_name; # Allow fast streaming HTTP/1.1 pipes (keep-alive, unbuffered) proxy_http_version 1.1; proxy_request_buffering off; proxy_buffering off; proxy_set_header forwarded 'by=\"_$hostname\";$for_addr;proto=$scheme;host=\"$http_host\"'; # Allow websockets and keep-alive (avoid connection: close) proxy_set_header connection "upgrade"; proxy_set_header upgrade $http_upgrade; } } # Redirect WWW to no-WWW server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name ~^www\.(.*)$; return 308 $scheme://$1$request_uri; } # Redirect all HTTP to HTTPS with no-WWW server { listen 80 default_server; listen [::]:80 default_server; server_name ~^(?:www\.)?(.*)$; return 308 https://$1$request_uri; } # Forwarded for= client IP address formatting map $remote_addr $for_addr { ~^[0-9.]+$ "for=$remote_addr"; # IPv4 client address ~^[0-9A-Fa-f:.]+$ "for=\"[$remote_addr]\""; # IPv6 bracketed and quoted default "for=unknown"; # Unix socket } ``` Start or restart Nginx for changes to take effect. E.g. ```bash systemctl restart nginx ``` You should be able to connect your app on `https://example.com`. Any 404 errors and such will be handled by Sanic's error pages, and whenever a static file is present at a given path, it will be served by Nginx. ## Running as a service This part is for Linux distributions based on `systemd`. Create a unit file `/etc/systemd/system/sanicexample.service` ``` [Unit] Description=Sanic Example [Service] DynamicUser=Yes WorkingDirectory=/srv/sanicservice Environment=SANIC_PROXY_SECRET=_hostname ExecStart=sanic proxied_example --port 8001 --fast Restart=always [Install] WantedBy=multi-user.target ``` Then reload service files, start your service and enable it on boot: ```bash systemctl daemon-reload systemctl start sanicexample systemctl enable sanicexample ``` .. tip:: Note For brevity we skipped setting up a separate user account and a Python virtual environment or installing your app as a Python module. There are good tutorials on those topics elsewhere that easily apply to Sanic as well. The DynamicUser setting creates a strong sandbox which basically means your application cannot store its data in files, so you may consider setting `User=sanicexample` instead if you need that. ================================================ FILE: guide/content/en/guide/getting-started.md ================================================ # Getting Started Before we begin, make sure you are running Python 3.9 or higher. Currently, Sanic is works with Python versions 3.9 – 3.13. ## Install ```sh pip install sanic ``` ## Hello, world application .. column:: If you have ever used one of the many decorator based frameworks, this probably looks somewhat familiar to you. .. note:: If you are coming from Flask or another framework, there are a few important things to point out. Remember, Sanic aims for performance, flexibility, and ease of use. These guiding principles have tangible impact on the API and how it works. .. column:: ```python from sanic import Sanic from sanic.response import text app = Sanic("MyHelloWorldApp") @app.get("/") async def hello_world(request): return text("Hello, world.") ``` ### Important to note - Every request handler can either be sync (`def hello_world`) or async (`async def hello_world`). Unless you have a clear reason for it, always go with `async`. - The `request` object is always the first argument of your handler. Other frameworks pass this around in a context variable to be imported. In the `async` world, this would not work so well and it is far easier (not to mention cleaner and more performant) to be explicit about it. - You **must** use a response type. MANY other frameworks allow you to have a return value like this: `return "Hello, world."` or this: `return {"foo": "bar"}`. But, in order to do this implicit calling, somewhere in the chain needs to spend valuable time trying to determine what you meant. So, at the expense of this ease, Sanic has decided to require an explicit call. ### Running .. column:: Let's save the above file as `server.py`. And launch it. .. column:: ```sh sanic server ``` .. note:: This **another** important distinction. Other frameworks come with a built in development server and explicitly say that it is _only_ intended for development use. The opposite is true with Sanic. **The packaged server is production ready.** ## Sanic Extensions Sanic intentionally aims for a clean and unopinionated feature list. The project does not want to require you to build your application in a certain way, and tries to avoid prescribing specific development patterns. There are a number of third-party plugins that are built and maintained by the community to add additional features that do not otherwise meet the requirements of the core repository. However, in order **to help API developers**, the Sanic organization maintains an official plugin called [Sanic Extensions](../plugins/sanic-ext/getting-started.md) to provide all sorts of goodies, including: - **OpenAPI** documentation with Redoc and/or Swagger - **CORS** protection - **Dependency injection** into route handlers - Request query arguments and body input **validation** - Auto create `HEAD`, `OPTIONS`, and `TRACE` endpoints - Predefined, endpoint-specific response serializers The preferred method to set it up is to install it along with Sanic, but you can also install the packages on their own. .. column:: ```sh pip install sanic[ext] ``` .. column:: ```sh pip install sanic sanic-ext ``` Starting in v21.12, Sanic will automatically setup Sanic Extensions if it is in the same environment. You will also have access to two additional application properties: - `app.extend()` - used to configure Sanic Extensions - `app.ext` - the `Extend` instance attached to the application See [the plugin documentation](../plugins/sanic-ext/getting-started.md) for more information about how to use and work with the plugin ================================================ FILE: guide/content/en/guide/how-to/README.md ================================================ # How to ... ================================================ FILE: guide/content/en/guide/how-to/authentication.md ================================================ # Authentication > How do I control authentication and authorization? This is an _extremely_ complicated subject to cram into a few snippets. But, this should provide you with an idea on ways to tackle this problem. This example uses [JWTs](https://jwt.io/), but the concepts should be equally applicable to sessions or some other scheme. ## `server.py` ```python from sanic import Sanic, text from auth import protected from login import login app = Sanic("AuthApp") app.config.SECRET = "KEEP_IT_SECRET_KEEP_IT_SAFE" app.blueprint(login) @app.get("/secret") @protected async def secret(request): return text("To go fast, you must be fast.") ``` ## `login.py` ```python import jwt from sanic import Blueprint, text login = Blueprint("login", url_prefix="/login") @login.post("/") async def do_login(request): token = jwt.encode({}, request.app.config.SECRET) return text(token) ``` ## `auth.py` ```python from functools import wraps import jwt from sanic import text def check_token(request): if not request.token: return False try: jwt.decode( request.token, request.app.config.SECRET, algorithms=["HS256"] ) except jwt.exceptions.InvalidTokenError: return False else: return True def protected(wrapped): def decorator(f): @wraps(f) async def decorated_function(request, *args, **kwargs): is_authenticated = check_token(request) if is_authenticated: response = await f(request, *args, **kwargs) return response else: return text("You are unauthorized.", 401) return decorated_function return decorator(wrapped) ``` This decorator pattern is taken from the [decorators page](../best-practices/decorators.md). --- ```bash $ curl localhost:9999/secret -i HTTP/1.1 401 Unauthorized content-length: 21 connection: keep-alive content-type: text/plain; charset=utf-8 You are unauthorized. $ curl localhost:9999/login -X POST eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.e30.rjxS7ztIGt5tpiRWS8BGLUqjQFca4QOetHcZTi061DE $ curl localhost:9999/secret -i -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.e30.rjxS7ztIGt5tpiRWS8BGLUqjQFca4QOetHcZTi061DE" HTTP/1.1 200 OK content-length: 29 connection: keep-alive content-type: text/plain; charset=utf-8 To go fast, you must be fast. $ curl localhost:9999/secret -i -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.e30.BAD" HTTP/1.1 401 Unauthorized content-length: 21 connection: keep-alive content-type: text/plain; charset=utf-8 You are unauthorized. ``` Also, checkout some resources from the community: - Awesome Sanic - [Authorization](https://github.com/mekicha/awesome-sanic/blob/master/README.md#authentication) & [Session](https://github.com/mekicha/awesome-sanic/blob/master/README.md#session) - [EuroPython 2020 - Overcoming access control in web APIs](https://www.youtube.com/watch?v=Uqgoj43ky6A) ================================================ FILE: guide/content/en/guide/how-to/autodiscovery.md ================================================ --- title: Autodiscovery --- # Autodiscovery of Blueprints, Middleware, and Listeners > How do I autodiscover the components I am using to build my application? One of the first problems someone faces when building an application, is *how* to structure the project. Sanic makes heavy use of decorators to register route handlers, middleware, and listeners. And, after creating blueprints, they need to be mounted to the application. A possible solution is a single file in which **everything** is imported and applied to the Sanic instance. Another is passing around the Sanic instance as a global variable. Both of these solutions have their drawbacks. An alternative is autodiscovery. You point your application at modules (already imported, or strings), and let it wire everything up. ## `server.py` ```python from sanic import Sanic from sanic.response import empty import blueprints from utility import autodiscover app = Sanic("auto", register=True) autodiscover( app, blueprints, "parent.child", "listeners.something", recursive=True, ) app.route("/")(lambda _: empty()) ``` ```bash [2021-03-02 21:37:02 +0200] [880451] [INFO] Goin' Fast @ http://127.0.0.1:9999 [2021-03-02 21:37:02 +0200] [880451] [DEBUG] something [2021-03-02 21:37:02 +0200] [880451] [DEBUG] something @ nested [2021-03-02 21:37:02 +0200] [880451] [DEBUG] something @ level1 [2021-03-02 21:37:02 +0200] [880451] [DEBUG] something @ level3 [2021-03-02 21:37:02 +0200] [880451] [DEBUG] something inside __init__.py [2021-03-02 21:37:02 +0200] [880451] [INFO] Starting worker [880451] ``` ## `utility.py` ```python from glob import glob from importlib import import_module, util from inspect import getmembers from pathlib import Path from types import ModuleType from typing import Union from sanic.blueprints import Blueprint def autodiscover( app, *module_names: Union[str, ModuleType], recursive: bool = False ): mod = app.__module__ blueprints = set() _imported = set() def _find_bps(module): nonlocal blueprints for _, member in getmembers(module): if isinstance(member, Blueprint): blueprints.add(member) for module in module_names: if isinstance(module, str): module = import_module(module, mod) _imported.add(module.__file__) _find_bps(module) if recursive: base = Path(module.__file__).parent for path in glob(f"{base}/**/*.py", recursive=True): if path not in _imported: name = "module" if "__init__" in path: *_, name, __ = path.split("/") spec = util.spec_from_file_location(name, path) specmod = util.module_from_spec(spec) _imported.add(path) spec.loader.exec_module(specmod) _find_bps(specmod) for bp in blueprints: app.blueprint(bp) ``` ## `blueprints/level1.py` ```python from sanic import Blueprint from sanic.log import logger level1 = Blueprint("level1") @level1.after_server_start def print_something(app, loop): logger.debug("something @ level1") ``` ## `blueprints/one/two/level3.py` ```python from sanic import Blueprint from sanic.log import logger level3 = Blueprint("level3") @level3.after_server_start def print_something(app, loop): logger.debug("something @ level3") ``` ## `listeners/something.py` ```python from sanic import Sanic from sanic.log import logger app = Sanic.get_app("auto") @app.after_server_start def print_something(app, loop): logger.debug("something") ``` ## `parent/child/__init__.py` ```python from sanic import Blueprint from sanic.log import logger bp = Blueprint("__init__") @bp.after_server_start def print_something(app, loop): logger.debug("something inside __init__.py") ``` ## `parent/child/nested.py` ```python from sanic import Blueprint from sanic.log import logger nested = Blueprint("nested") @nested.after_server_start def print_something(app, loop): logger.debug("something @ nested") ``` --- ```text here is the dir tree generate with 'find . -type d -name "__pycache__" -exec rm -rf {} +; tree' . # run 'sanic sever -d' here ├── blueprints │ ├── __init__.py # you need add this file, just empty │ ├── level1.py │ └── one │ └── two │ └── level3.py ├── listeners │ └── something.py ├── parent │ └── child │ ├── __init__.py │ └── nested.py ├── server.py └── utility.py ``` ```sh source ./.venv/bin/activate # activate the python venv which sanic is installed in sanic sever -d # run this in the directory containing server.py ``` ```text you will see "something ***" like this: [2023-07-12 11:23:36 +0000] [113704] [DEBUG] something [2023-07-12 11:23:36 +0000] [113704] [DEBUG] something inside __init__.py [2023-07-12 11:23:36 +0000] [113704] [DEBUG] something @ level3 [2023-07-12 11:23:36 +0000] [113704] [DEBUG] something @ level1 [2023-07-12 11:23:36 +0000] [113704] [DEBUG] something @ nested ``` ================================================ FILE: guide/content/en/guide/how-to/cors.md ================================================ --- title: CORS --- # Cross-origin resource sharing (CORS) > How do I configure my application for CORS? .. note:: 🏆 The best solution is to use [Sanic Extensions](../../plugins/sanic-ext/http/cors.md). However, if you would like to build your own version, you could use this limited example as a starting point. ### `server.py` ```python from sanic import Sanic, text from cors import add_cors_headers from options import setup_options app = Sanic("app") @app.route("/", methods=["GET", "POST"]) async def do_stuff(request): return text("...") # Add OPTIONS handlers to any route that is missing it app.register_listener(setup_options, "before_server_start") # Fill in CORS headers app.register_middleware(add_cors_headers, "response") ``` ## `cors.py` ```python from typing import Iterable def _add_cors_headers(response, methods: Iterable[str]) -> None: allow_methods = list(set(methods)) if "OPTIONS" not in allow_methods: allow_methods.append("OPTIONS") headers = { "Access-Control-Allow-Methods": ",".join(allow_methods), "Access-Control-Allow-Origin": "mydomain.com", "Access-Control-Allow-Credentials": "true", "Access-Control-Allow-Headers": ( "origin, content-type, accept, " "authorization, x-xsrf-token, x-request-id" ), } response.headers.extend(headers) def add_cors_headers(request, response): if request.method != "OPTIONS": methods = [method for method in request.route.methods] _add_cors_headers(response, methods) ``` ## `options.py` ```python from collections import defaultdict from typing import Dict, FrozenSet from sanic import Sanic, response from sanic.router import Route from cors import _add_cors_headers def _compile_routes_needing_options( routes: Dict[str, Route] ) -> Dict[str, FrozenSet]: needs_options = defaultdict(list) # This is 21.12 and later. You will need to change this for older versions. for route in routes.values(): if "OPTIONS" not in route.methods: needs_options[route.uri].extend(route.methods) return { uri: frozenset(methods) for uri, methods in dict(needs_options).items() } def _options_wrapper(handler, methods): def wrapped_handler(request, *args, **kwargs): nonlocal methods return handler(request, methods) return wrapped_handler async def options_handler(request, methods) -> response.HTTPResponse: resp = response.empty() _add_cors_headers(resp, methods) return resp def setup_options(app: Sanic, _): app.router.reset() needs_options = _compile_routes_needing_options(app.router.routes_all) for uri, methods in needs_options.items(): app.add_route( _options_wrapper(options_handler, methods), uri, methods=["OPTIONS"], ) app.router.finalize() ``` --- ``` $ curl localhost:9999/ -i HTTP/1.1 200 OK Access-Control-Allow-Methods: OPTIONS,POST,GET Access-Control-Allow-Origin: mydomain.com Access-Control-Allow-Credentials: true Access-Control-Allow-Headers: origin, content-type, accept, authorization, x-xsrf-token, x-request-id content-length: 3 connection: keep-alive content-type: text/plain; charset=utf-8 ... $ curl localhost:9999/ -i -X OPTIONS HTTP/1.1 204 No Content Access-Control-Allow-Methods: GET,POST,OPTIONS Access-Control-Allow-Origin: mydomain.com Access-Control-Allow-Credentials: true Access-Control-Allow-Headers: origin, content-type, accept, authorization, x-xsrf-token, x-request-id connection: keep-alive ``` Also, checkout some resources from the community: - [Awesome Sanic](https://github.com/mekicha/awesome-sanic/blob/master/README.md#frontend) ================================================ FILE: guide/content/en/guide/how-to/csrf.md ================================================ csrf ================================================ FILE: guide/content/en/guide/how-to/db.md ================================================ connecting to data sources ================================================ FILE: guide/content/en/guide/how-to/decorators.md ================================================ decorators ================================================ FILE: guide/content/en/guide/how-to/ipv6.md ================================================ ================================================ FILE: guide/content/en/guide/how-to/mounting.md ================================================ # Application Mounting > How do I mount my application at some path above the root? ```python # server.py from sanic import Sanic, text app = Sanic("app") app.config.SERVER_NAME = "example.com/api" @app.route("/foo") def handler(request): url = app.url_for("handler", _external=True) return text(f"URL: {url}") ``` ```yaml # docker-compose.yml version: "3.7" services: app: image: nginx:alpine ports: - 80:80 volumes: - type: bind source: ./conf target: /etc/nginx/conf.d/default.conf ``` ```nginx # conf server { listen 80; # Computed data service location /api/ { proxy_pass http://:9999/; proxy_set_header Host example.com; } } ``` ```bash $ docker-compose up -d $ sanic server.app --port=9999 --host=0.0.0.0 ``` ```bash $ curl localhost/api/foo URL: http://example.com/api/foo ``` ================================================ FILE: guide/content/en/guide/how-to/orm.md ================================================ # ORM > How do I use SQLAlchemy with Sanic ? All ORM tools can work with Sanic, but non-async ORM tool have a impact on Sanic performance. There are some orm packages who support At present, there are many ORMs that support Python's `async`/`await` keywords. Some possible choices include: - [Mayim](https://ahopkins.github.io/mayim/) - [SQLAlchemy 1.4](https://docs.sqlalchemy.org/en/14/changelog/changelog_14.html) - [tortoise-orm](https://github.com/tortoise/tortoise-orm) Integration in to your Sanic application is fairly simple: ## Mayim Mayim ships with [an extension for Sanic Extensions](https://ahopkins.github.io/mayim/guide/extensions.html#sanic), which makes it super simple to get started with Sanic. It is certainly possible to run Mayim with Sanic without the extension, but it is recommended because it handles all of the [lifecycle events](https://sanic.dev/en/guide/basics/listeners.html) and [dependency injections](https://sanic.dev/en/plugins/sanic-ext/injection.html). .. column:: ### Dependencies First, we need to install the required dependencies. See [Mayim docs](https://ahopkins.github.io/mayim/guide/install.html#postgres) for the installation needed for your DB driver. .. column:: ```shell pip install sanic-ext pip install mayim[postgres] ``` .. column:: ### Define ORM Model Mayim allows you to use whatever you want for models. Whether it is [dataclasses](https://docs.python.org/3/library/dataclasses.html), [pydantic](https://pydantic-docs.helpmanual.io/), [attrs](https://www.attrs.org/en/stable/), or even just plain `dict` objects. Since it works very nicely [out of the box with Pydantic](https://ahopkins.github.io/mayim/guide/pydantic.html), that is what we will use here. .. column:: ```python # ./models.py from pydantic import BaseModel class City(BaseModel): id: int name: str district: str population: int class Country(BaseModel): code: str name: str continent: str region: str capital: City ``` .. column:: ### Define SQL If you are unfamiliar, Mayim is different from other ORMs in that it is one-way, SQL-first. This means you define your own queries either inline, or in a separate `.sql` file, which is what we will do here. .. column:: ```sql -- ./queries/select_all_countries.sql SELECT country.code, country.name, country.continent, country.region, ( SELECT row_to_json(q) FROM ( SELECT city.id, city.name, city.district, city.population ) q ) capital FROM country JOIN city ON country.capital = city.id ORDER BY country.name ASC LIMIT $limit OFFSET $offset; ``` .. column:: ### Create Sanic App and Async Engine We need to create the app instance and attach the `SanicMayimExtension` with any executors. .. column:: ```python # ./server.py from sanic import Sanic, Request, json from sanic_ext import Extend from mayim.executor import PostgresExecutor from mayim.extensions import SanicMayimExtension from models import Country class CountryExecutor(PostgresExecutor): async def select_all_countries( self, limit: int = 4, offset: int = 0 ) -> list[Country]: ... app = Sanic("Test") Extend.register( SanicMayimExtension( executors=[CountryExecutor], dsn="postgres://...", ) ) ``` .. column:: ### Register Routes Because we are using Mayim's extension for Sanic, we have the automatic `CountryExecutor` injection into the route handler. It makes for an easy, type-annotated development experience. .. column:: ```python @app.get("/") async def handler(request: Request, executor: CountryExecutor): countries = await executor.select_all_countries() return json({"countries": [country.dict() for country in co ``` .. column:: ### Send Requests .. column:: ```sh curl 'http://127.0.0.1:8000' {"countries":[{"code":"AFG","name":"Afghanistan","continent":"Asia","region":"Southern and Central Asia","capital":{"id":1,"name":"Kabul","district":"Kabol","population":1780000}},{"code":"ALB","name":"Albania","continent":"Europe","region":"Southern Europe","capital":{"id":34,"name":"Tirana","district":"Tirana","population":270000}},{"code":"DZA","name":"Algeria","continent":"Africa","region":"Northern Africa","capital":{"id":35,"name":"Alger","district":"Alger","population":2168000}},{"code":"ASM","name":"American Samoa","continent":"Oceania","region":"Polynesia","capital":{"id":54,"name":"Fagatogo","district":"Tutuila","population":2323}}]} ``` ## SQLAlchemy Because [SQLAlchemy 1.4](https://docs.sqlalchemy.org/en/14/changelog/changelog_14.html) has added native support for `asyncio`, Sanic can finally work well with SQLAlchemy. Be aware that this functionality is still considered *beta* by the SQLAlchemy project. .. column:: ### Dependencies First, we need to install the required dependencies. In the past, the dependencies installed were `sqlalchemy` and `pymysql`, but now `sqlalchemy` and `aiomysql` are needed. .. column:: ```shell pip install -U sqlalchemy pip install -U aiomysql ``` .. column:: ### Define ORM Model ORM model creation remains the same. .. column:: ```python # ./models.py from sqlalchemy import INTEGER, Column, ForeignKey, String from sqlalchemy.orm import declarative_base, relationship Base = declarative_base() class BaseModel(Base): __abstract__ = True id = Column(INTEGER(), primary_key=True) class Person(BaseModel): __tablename__ = "person" name = Column(String()) cars = relationship("Car") def to_dict(self): return {"name": self.name, "cars": [{"brand": car.brand} for car in self.cars]} class Car(BaseModel): __tablename__ = "car" brand = Column(String()) user_id = Column(ForeignKey("person.id")) user = relationship("Person", back_populates="cars") ``` .. column:: ### Create Sanic App and Async Engine Here we use mysql as the database, and you can also choose PostgreSQL/SQLite. Pay attention to changing the driver from `aiomysql` to `asyncpg`/`aiosqlite`. .. column:: ```python # ./server.py from sanic import Sanic from sqlalchemy.ext.asyncio import create_async_engine app = Sanic("my_app") bind = create_async_engine("mysql+aiomysql://root:root@localhost/test", echo=True) ``` .. column:: ### Register Middlewares The request middleware creates an usable `AsyncSession` object and set it to `request.ctx` and `_base_model_session_ctx`. Thread-safe variable `_base_model_session_ctx` helps you to use the session object instead of fetching it from `request.ctx`. .. column:: ```python # ./server.py from contextvars import ContextVar from sqlalchemy.ext.asyncio import AsyncSession from sqlalchemy.orm import sessionmaker _sessionmaker = sessionmaker(bind, AsyncSession, expire_on_commit=False) _base_model_session_ctx = ContextVar("session") @app.middleware("request") async def inject_session(request): request.ctx.session = _sessionmaker() request.ctx.session_ctx_token = _base_model_session_ctx.set(request.ctx.session) @app.middleware("response") async def close_session(request, response): if hasattr(request.ctx, "session_ctx_token"): _base_model_session_ctx.reset(request.ctx.session_ctx_token) await request.ctx.session.close() ``` .. column:: ### Register Routes According to sqlalchemy official docs, `session.query` will be legacy in 2.0, and the 2.0 way to query an ORM object is using `select`. .. column:: ```python # ./server.py from sqlalchemy import select from sqlalchemy.orm import selectinload from sanic.response import json from models import Car, Person @app.post("/user") async def create_user(request): session = request.ctx.session async with session.begin(): car = Car(brand="Tesla") person = Person(name="foo", cars=[car]) session.add_all([person]) return json(person.to_dict()) @app.get("/user/") async def get_user(request, pk): session = request.ctx.session async with session.begin(): stmt = select(Person).where(Person.id == pk).options(selectinload(Person.cars)) result = await session.execute(stmt) person = result.scalar() if not person: return json({}) return json(person.to_dict()) ``` .. column:: ### Send Requests .. column:: ```sh curl --location --request POST 'http://127.0.0.1:8000/user' {"name":"foo","cars":[{"brand":"Tesla"}]} ``` ```sh curl --location --request GET 'http://127.0.0.1:8000/user/1' {"name":"foo","cars":[{"brand":"Tesla"}]} ``` ## Tortoise-ORM .. column:: ### Dependencies tortoise-orm's dependency is very simple, you just need install tortoise-orm. .. column:: ```shell pip install -U tortoise-orm ``` .. column:: ### Define ORM Model If you are familiar with Django, you should find this part very familiar. .. column:: ```python # ./models.py from tortoise import Model, fields class Users(Model): id = fields.IntField(pk=True) name = fields.CharField(50) def __str__(self): return f"I am {self.name}" ``` .. column:: ### Create Sanic App and Async Engine Tortoise-orm provides a set of registration interface, which is convenient for users, and you can use it to create database connection easily. .. column:: ```python # ./main.py from models import Users from tortoise.contrib.sanic import register_tortoise app = Sanic(__name__) register_tortoise( app, db_url="mysql://root:root@localhost/test", modules={"models": ["models"]}, generate_schemas=True ) ``` .. column:: ### Register Routes .. column:: ```python # ./main.py from models import Users from sanic import Sanic, response @app.route("/user") async def list_all(request): users = await Users.all() return response.json({"users": [str(user) for user in users]}) @app.route("/user/") async def get_user(request, pk): user = await Users.query(pk=pk) return response.json({"user": str(user)}) if __name__ == "__main__": app.run(port=5000) ``` .. column:: ### Send Requests .. column:: ```sh curl --location --request POST 'http://127.0.0.1:8000/user' {"users":["I am foo", "I am bar"]} ``` ```sh curl --location --request GET 'http://127.0.0.1:8000/user/1' {"user": "I am foo"} ``` ================================================ FILE: guide/content/en/guide/how-to/request-id-logging.md ================================================ ================================================ FILE: guide/content/en/guide/how-to/serialization.md ================================================ # Serialization ================================================ FILE: guide/content/en/guide/how-to/server-sent-events.md ================================================ sse ================================================ FILE: guide/content/en/guide/how-to/static-redirects.md ================================================ # "Static" Redirects > How do I configure static redirects? ## `app.py` ```python ### SETUP ### import typing import sanic, sanic.response # Create the Sanic app app = sanic.Sanic(__name__) # This dictionary represents your "static" # redirects. For example, these values # could be pulled from a configuration file. REDIRECTS = { '/':'/hello_world', # Redirect '/' to '/hello_world' '/hello_world':'/hello_world.html' # Redirect '/hello_world' to 'hello_world.html' } # This function will return another function # that will return the configured value # regardless of the arguments passed to it. def get_static_function(value:typing.Any) -> typing.Callable[..., typing.Any]: return lambda *_, **__: value ### ROUTING ### # Iterate through the redirects for src, dest in REDIRECTS.items(): # Create the redirect response object response:sanic.HTTPResponse = sanic.response.redirect(dest) # Create the handler function. Typically, # only a sanic.Request object is passed # to the function. This object will be # ignored. handler = get_static_function(response) # Route the src path to the handler app.route(src)(handler) # Route some file and client resources app.static('/files/', 'files') app.static('/', 'client') ### RUN ### if __name__ == '__main__': app.run( '127.0.0.1', 10000 ) ``` ## `client/hello_world.html` ```html Hello World
Hello world!
``` ## `client/hello_world.css` ```css #hello_world { width: 1000px; margin-left: auto; margin-right: auto; margin-top: 100px; padding: 100px; color: aqua; text-align: center; font-size: 100px; font-family: monospace; background-color: rgba(0, 0, 0, 0.75); border-radius: 10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.75); } body { background-image: url("/files/grottoes.jpg"); background-repeat: no-repeat; background-size: cover; } ``` ## `files/grottoes.jpg` ![lake](/assets/images/grottoes.jpg) --- Also, checkout some resources from the community: - [Static Routing Example](https://github.com/Perzan/sanic-static-routing-example) ================================================ FILE: guide/content/en/guide/how-to/table-of-contents.md ================================================ --- title: Table of Contents --- # Table of Contents We have compiled fully working examples to answer common questions and user cases. For the most part, the examples are as minimal as possible, but should be complete and runnable solutions. | Page | How do I ... | |:-----|:------------| | [Application mounting](./mounting.md) | ... mount my application at some path above the root? | | [Authentication](./authentication.md) | ... control authentication and authorization? | | [Autodiscovery](./autodiscovery.md) | ... autodiscover the components I am using to build my application? | | [CORS](./cors.md) | ... configure my application for CORS? | | [ORM](./orm) | ... use an ORM with Sanic? | | ["Static" Redirects](./static-redirects.md) | ... configure static redirects | | [TLS/SSL/HTTPS](./tls.md) | ... run Sanic via HTTPS?
... redirect HTTP to HTTPS? | ================================================ FILE: guide/content/en/guide/how-to/task-queue.md ================================================ task queue ================================================ FILE: guide/content/en/guide/how-to/tls.md ================================================ --- title: TLS/SSL/HTTPS --- # TLS/SSL/HTTPS > How do I run Sanic via HTTPS? If you do not have TLS certificates yet, [see the end of this page](./tls.md#get-certificates-for-your-domain-names). ## Single domain and single certificate .. column:: Let Sanic automatically load your certificate files, which need to be named `fullchain.pem` and `privkey.pem` in the given folder: .. column:: ```sh sudo sanic myserver:app -H :: -p 443 \ --tls /etc/letsencrypt/live/example.com/ ``` ```python app.run("::", 443, ssl="/etc/letsencrypt/live/example.com/") ``` .. column:: Or, you can pass cert and key filenames separately as a dictionary: Additionally, `password` may be added if the key is encrypted, all fields except for the password are passed to `request.conn_info.cert`. .. column:: ```python ssl = { "cert": "/path/to/fullchain.pem", "key": "/path/to/privkey.pem", "password": "for encrypted privkey file", # Optional } app.run(host="0.0.0.0", port=8443, ssl=ssl) ``` .. column:: Alternatively, [`ssl.SSLContext`](https://docs.python.org/3/library/ssl.html) may be passed, if you need full control over details such as which crypto algorithms are permitted. By default Sanic only allows secure algorithms, which may restrict access from very old devices. .. column:: ```python import ssl context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) context.load_cert_chain("certs/fullchain.pem", "certs/privkey.pem") app.run(host="0.0.0.0", port=8443, ssl=context) ``` ## Multiple domains with separate certificates .. column:: A list of multiple certificates may be provided, in which case Sanic chooses the one matching the hostname the user is connecting to. This occurs so early in the TLS handshake that Sanic has not sent any packets to the client yet. If the client sends no SNI (Server Name Indication), the first certificate on the list will be used even though on the client browser it will likely fail with a TLS error due to name mismatch. To prevent this fallback and to cause immediate disconnection of clients without a known hostname, add `None` as the first entry on the list. `--tls-strict-host` is the equivalent CLI option. .. column:: ```python ssl = ["certs/example.com/", "certs/bigcorp.test/"] app.run(host="0.0.0.0", port=8443, ssl=ssl) ``` ```sh sanic myserver:app --tls certs/example.com/ --tls certs/bigcorp.test/ --tls-strict-host ``` .. tip:: You may also use `None` in front of a single certificate if you do not wish to reveal your certificate, true hostname or site content to anyone connecting to the IP address instead of the proper DNS name. .. column:: Dictionaries can be used on the list. This allows also specifying which domains a certificate matches to, although the names present on the certificate itself cannot be controlled from here. If names are not specified, the names from the certificate itself are used. To only allow connections to the main domain **example.com** and only to subdomains of **bigcorp.test**: .. column:: ```python ssl = [ None, # No fallback if names do not match! { "cert": "certs/example.com/fullchain.pem", "key": "certs/example.com/privkey.pem", "names": ["example.com", "*.bigcorp.test"], } ] app.run(host="0.0.0.0", port=8443, ssl=ssl) ``` ## Accessing TLS information in handlers via `request.conn_info` fields * `.ssl` - is the connection secure (bool) * `.cert` - certificate info and dict fields of the currently active cert (dict) * `.server_name` - the SNI sent by the client (str, may be empty) Do note that all `conn_info` fields are per connection, where there may be many requests over time. If a proxy is used in front of your server, these requests on the same pipe may even come from different users. ## Redirect HTTP to HTTPS, with certificate requests still over HTTP In addition to your normal server(s) running HTTPS, run another server for redirection, `http_redir.py`: ```python from sanic import Sanic, exceptions, response app = Sanic("http_redir") # Serve ACME/certbot files without HTTPS, for certificate renewals app.static("/.well-known", "/var/www/.well-known", resource_type="dir") @app.exception(exceptions.NotFound, exceptions.MethodNotSupported) def redirect_everything_else(request, exception): server, path = request.server_name, request.path if server and path.startswith("/"): return response.redirect(f"https://{server}{path}", status=308) return response.text("Bad Request. Please use HTTPS!", status=400) ``` It is best to setup this as a systemd unit separate of your HTTPS servers. You may need to run HTTP while initially requesting your certificates, while you cannot run the HTTPS server yet. Start for IPv4 and IPv6: ``` sanic http_redir:app -H 0.0.0.0 -p 80 sanic http_redir:app -H :: -p 80 ``` Alternatively, it is possible to run the HTTP redirect application from the main application: ```python # app == Your main application # redirect == Your http_redir application @app.before_server_start async def start(app, _): app.ctx.redirect = await redirect.create_server( port=80, return_asyncio_server=True ) app.add_task(runner(redirect, app.ctx.redirect)) @app.before_server_stop async def stop(app, _): await app.ctx.redirect.close() async def runner(app, app_server): app.state.is_running = True try: app.signalize() app.finalize() app.state.is_started = True await app_server.serve_forever() finally: app.state.is_running = False app.state.is_stopping = True ``` ## Get certificates for your domain names You can get free certificates from [Let's Encrypt](https://letsencrypt.org/). Install [certbot](https://certbot.eff.org/) via your package manager, and request a certificate: ```sh sudo certbot certonly --key-type ecdsa --preferred-chain "ISRG Root X1" -d example.com -d www.example.com ``` Multiple domain names may be added by further `-d` arguments, all stored into a single certificate which gets saved to `/etc/letsencrypt/live/example.com/` as per **the first domain** that you list here. The key type and preferred chain options are necessary for getting a minimal size certificate file, essential for making your server run as *fast* as possible. The chain will still contain one RSA certificate until when Let's Encrypt gets their new EC chain trusted in all major browsers. ================================================ FILE: guide/content/en/guide/how-to/validation.md ================================================ validation ================================================ FILE: guide/content/en/guide/how-to/websocket-feed.md ================================================ websocket feed ================================================ FILE: guide/content/en/guide/introduction.md ================================================ # Introduction Sanic is a Python 3.10+ web server and web framework that's written to go fast. It allows the usage of the async/await syntax added in Python 3.5, which makes your code non-blocking and speedy. .. attrs:: :class: introduction-table | | | |--|--| | Build | [![Tests](https://github.com/sanic-org/sanic/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/sanic-org/sanic/actions/workflows/tests.yml) | | Docs | [![User Guide](https://img.shields.io/badge/user%20guide-sanic-ff0068)](https://sanicframework.org/) [![Documentation](https://readthedocs.org/projects/sanic/badge/?version=latest)](http://sanic.readthedocs.io/en/latest/?badge=latest) | | Package | [![PyPI](https://img.shields.io/pypi/v/sanic.svg)](https://pypi.python.org/pypi/sanic/) [![PyPI version](https://img.shields.io/pypi/pyversions/sanic.svg)](https://pypi.python.org/pypi/sanic/) [![Wheel](https://img.shields.io/pypi/wheel/sanic.svg)](https://pypi.python.org/pypi/sanic) [![Supported implementations](https://img.shields.io/pypi/implementation/sanic.svg)](https://pypi.python.org/pypi/sanic) [![Code style black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black) | | Support | [![Forums](https://img.shields.io/badge/forums-community-ff0068.svg)](https://community.sanicframework.org/) [![Discord](https://img.shields.io/discord/812221182594121728?logo=discord)](https://discord.gg/FARQzAEMAA) [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/mekicha/awesome-sanic) | | Stats | [![Monthly Downloads](https://img.shields.io/pypi/dm/sanic.svg)](https://pepy.tech/project/sanic) [![Weekly Downloads](https://img.shields.io/pypi/dw/sanic.svg)](https://pepy.tech/project/sanic) [![Conda downloads](https://img.shields.io/conda/dn/conda-forge/sanic.svg)](https://anaconda.org/conda-forge/sanic) | ## What is it? First things first, before you jump in the water, you should know that Sanic is different than other frameworks. Right there in that first sentence there is a huge mistake because Sanic is _both_ a **framework** and a **web server**. In the deployment section we will talk a little bit more about this. But, remember, out of the box Sanic comes with everything you need to write, deploy, and scale a production grade web application. 🚀 ## Goal > To provide a simple way to get up and running a highly performant HTTP server that is easy to build, to expand, and ultimately to scale. ## Features .. column:: ### Core - Built in, **_fast_** web server - Production ready - Highly scalable - ASGI compliant - Simple and intuitive API design - By the community, for the community .. column:: ### Sanic Extensions [[learn more](../plugins/sanic-ext/getting-started.md)] - CORS protection - Template rendering with Jinja - Dependency injection into route handlers - OpenAPI documentation with Redoc and/or Swagger - Predefined, endpoint-specific response serializers - Request query arguments and body input validation - Auto create `HEAD`, `OPTIONS`, and `TRACE` endpoints ## Sponsor Check out [open collective](https://opencollective.com/sanic-org) to learn more about helping to fund Sanic. ## Join the Community The main channel for discussion is at the [community forums](https://community.sanicframework.org/). There also is a [Discord Server](https://discord.gg/FARQzAEMAA) for live discussion and chat. The Stackoverflow `[sanic]` tag is [actively monitored](https://stackoverflow.com/questions/tagged/sanic) by project maintainers. ## Contribution We are always happy to have new contributions. We have [marked issues good for anyone looking to get started](https://github.com/sanic-org/sanic/issues?q=is%3Aopen+is%3Aissue+label%3Abeginner), and welcome [questions/answers/discussion on the forums](https://community.sanicframework.org/). Please take a look at our [Contribution guidelines](https://github.com/sanic-org/sanic/blob/master/CONTRIBUTING.rst). ================================================ FILE: guide/content/en/guide/running/app-loader.md ================================================ --- title: Dynamic Applications --- # Dynamic Applications Running Sanic has been optimized to work with the CLI. If you have not read it yet, you should read [Running Sanic](./running.md#sanic-server) to become familiar with the options. .. column:: This includes running it as a global scope object... .. column:: ```sh sanic path.to.server:app ``` ```python # server.py app = Sanic("TestApp") @app.get("/") async def handler(request: Request): return json({"foo": "bar"}) ``` .. column:: ...or, a factory function that creates the `Sanic` application object. .. column:: ```sh sanic path.to.server:create_app --factory ``` ```python # server.py def create_app(): app = Sanic("TestApp") @app.get("/") async def handler(request: Request): return json({"foo": "bar"}) return app ``` **Sometimes, this is not enough ... 🤔** Introduced in [v22.9](../../release-notes/2022/v22.9.md), Sanic has an `AppLoader` object that is responsible for creating an application in the various [worker processes](./manager.md#how-sanic-server-starts-processes). You can take advantage of this if you need to create a more dynamic startup experience for your application. .. column:: An `AppLoader` can be passed a callable that returns a `Sanic` instance. That `AppLoader` could be used with the low-level application running API. .. column:: ```python import sys from functools import partial from sanic import Request, Sanic, json from sanic.worker.loader import AppLoader def attach_endpoints(app: Sanic): @app.get("/") async def handler(request: Request): return json({"app_name": request.app.name}) def create_app(app_name: str) -> Sanic: app = Sanic(app_name) attach_endpoints(app) return app if __name__ == "__main__": app_name = sys.argv[-1] loader = AppLoader(factory=partial(create_app, app_name)) app = loader.load() app.prepare(port=9999, dev=True) Sanic.serve(primary=app, app_loader=loader) ``` ```sh python path/to/server.py MyTestAppName ``` In the above example, the `AppLoader` is created with a `factory` that can be used to create copies of the same application across processes. When doing this, you should explicitly use the `Sanic.serve` pattern shown above so that the `AppLoader` that you create is not replaced. ================================================ FILE: guide/content/en/guide/running/configuration.md ================================================ # Configuration ## Basics .. column:: Sanic holds the configuration in the config attribute of the application object. The configuration object is merely an object that can be modified either using dot-notation or like a dictionary. .. column:: ```python app = Sanic("myapp") app.config.DB_NAME = "appdb" app.config["DB_USER"] = "appuser" ``` .. column:: You can also use the `update()` method like on regular dictionaries. .. column:: ```python db_settings = { 'DB_HOST': 'localhost', 'DB_NAME': 'appdb', 'DB_USER': 'appuser' } app.config.update(db_settings) ``` .. note:: It is standard practice in Sanic to name your config values in **uppercase letters**. Indeed, you may experience weird behaviors if you start mixing uppercase and lowercase names. ## Loading ### Environment variables .. column:: Any environment variables defined with the `SANIC_` prefix will be applied to the Sanic config. For example, setting `SANIC_REQUEST_TIMEOUT` will be loaded by the application automatically and fed into the `REQUEST_TIMEOUT` config variable. .. column:: ```bash $ export SANIC_REQUEST_TIMEOUT=10 ``` ```python >>> print(app.config.REQUEST_TIMEOUT) 10 ``` .. column:: You can change the prefix that Sanic is expecting at startup. .. column:: ```bash $ export MYAPP_REQUEST_TIMEOUT=10 ``` ```python >>> app = Sanic(__name__, env_prefix='MYAPP_') >>> print(app.config.REQUEST_TIMEOUT) 10 ``` .. column:: You can also disable environment variable loading completely. .. column:: ```python app = Sanic(__name__, load_env=False) ``` ### Using Sanic.update_config The `Sanic` instance has a _very_ versatile method for loading config: `app.update_config`. You can feed it a path to a file, a dictionary, a class, or just about any other sort of object. #### From a file .. column:: Let's say you have `my_config.py` file that looks like this. .. column:: ```python # my_config.py A = 1 B = 2 ``` .. column:: You can load this as config values by passing its path to `app.update_config`. .. column:: ```python >>> app.update_config("/path/to/my_config.py") >>> print(app.config.A) 1 ``` .. column:: This path also accepts bash style environment variables. .. column:: ```bash $ export my_path="/path/to" ``` ```python app.update_config("${my_path}/my_config.py") ``` .. note:: Just remember that you have to provide environment variables in the format `${environment_variable}` and that `$environment_variable` is not expanded (is treated as "plain" text). #### From a dict .. column:: The `app.update_config` method also works on plain dictionaries. .. column:: ```python app.update_config({"A": 1, "B": 2}) ``` #### From a class or object .. column:: You can define your own config class, and pass it to `app.update_config` .. column:: ```python class MyConfig: A = 1 B = 2 app.update_config(MyConfig) ``` .. column:: It even could be instantiated. .. column:: ```python app.update_config(MyConfig()) ``` ### Type casting When loading from environment variables, Sanic will attempt to cast the values to expected Python types. This particularly applies to: - `int` - `float` - `bool` In regards to `bool`, the following _case insensitive_ values are allowed: - **`True`**: `y`, `yes`, `yep`, `yup`, `t`, `true`, `on`, `enable`, `enabled`, `1` - **`False`**: `n`, `no`, `f`, `nope`, `false`, `off`, `disable`, `disabled`, `0` If a value cannot be cast, it will default to a `str`. .. column:: Additionally, Sanic can be configured to cast additional types using additional type converters. This should be any callable that returns the value or raises a `ValueError`. *Added in v21.12* .. column:: ```python app = Sanic(..., config=Config(converters=[UUID])) ``` #### Advanced Type Converters .. new:: New in v25.12 This feature was added in version 25.12 .. column:: For more sophisticated conversion logic that needs access to the full environment variable context, you can use `DetailedConverter`. This abstract base class provides access to the full environment variable key, the raw value, and the current config defaults. This is useful when you need to: - Cast values to the type of their defaults - Perform validation based on the variable name pattern - Use default values for fallback logic - Access configuration context during conversion .. column:: ```python from sanic.config import DetailedConverter class DefaultsTypeCastingConverter(DetailedConverter): def __call__(self, full_key: str, config_key: str, value: str, defaults: dict): try: if config_key in defaults: return type(defaults[config_key])(value) except (ValueError, TypeError) as e: raise TypeError(f"Configuration environment variable '{full_key}' type mismatch: expected" f" {type(defaults[config_key]).__name__}, got {type(value).__name__}") from e app = Sanic(..., config=Config(converters=[DefaultsTypeCastingConverter()])) ``` .. column:: The `DetailedConverter.__call__` method receives four parameters: - `full_key`: The full environment variable name with prefix (e.g., "SANIC_DATABASE_URL") - `config_key`: The config key without prefix (e.g., "DATABASE_URL") - `value`: The raw string value from the environment - `defaults`: The current default configuration values .. column:: ```python class ValidationConverter(DetailedConverter): def __call__(self, full_key: str, config_key: str, value: str, defaults: dict): if config_key.endswith('_PORT'): port = int(value) if not 1 <= port <= 65535: raise ValueError(f"Invalid port: {port}") return port raise ValueError # Let other converters handle it ``` ## Builtin values | **Variable** | **Default** | **Description** | |---------------------------|------------------|---------------------------------------------------------------------------------------------------------------------------------------| | ACCESS_LOG | True | Disable or enable access log | | AUTO_EXTEND | True | Control whether [Sanic Extensions](../../plugins/sanic-ext/getting-started.md) will load if it is in the existing virtual environment | | AUTO_RELOAD | True | Control whether the application will automatically reload when a file changes | | EVENT_AUTOREGISTER | True | When `True` using the `app.event()` method on a non-existing signal will automatically create it and not raise an exception | | FALLBACK_ERROR_FORMAT | html | Format of error response if an exception is not caught and handled | | FORWARDED_FOR_HEADER | X-Forwarded-For | The name of "X-Forwarded-For" HTTP header that contains client and proxy ip | | FORWARDED_SECRET | None | Used to securely identify a specific proxy server (see below) | | GRACEFUL_SHUTDOWN_TIMEOUT | 15.0 | How long to wait to force close non-idle connection (sec) | | INSPECTOR | False | Whether to enable the Inspector | | INSPECTOR_HOST | localhost | The host for the Inspector | | INSPECTOR_PORT | 6457 | The port for the Inspector | | INSPECTOR_TLS_KEY | - | The TLS key for the Inspector | | INSPECTOR_TLS_CERT | - | The TLS certificate for the Inspector | | INSPECTOR_API_KEY | - | The API key for the Inspector | | KEEP_ALIVE_TIMEOUT | 120 | How long to hold a TCP connection open (sec) | | KEEP_ALIVE | True | Disables keep-alive when False | | MOTD | True | Whether to display the MOTD (message of the day) at startup | | MOTD_DISPLAY | {} | Key/value pairs to display additional, arbitrary data in the MOTD | | NOISY_EXCEPTIONS | False | Force all `quiet` exceptions to be logged | | PROXIES_COUNT | None | The number of proxy servers in front of the app (e.g. nginx; see below) | | REAL_IP_HEADER | None | The name of "X-Real-IP" HTTP header that contains real client ip | | REGISTER | True | Whether the app registry should be enabled | | REQUEST_BUFFER_SIZE | 65536 | Request buffer size before request is paused, default is 64 Kib | | REQUEST_ID_HEADER | X-Request-ID | The name of "X-Request-ID" HTTP header that contains request/correlation ID | | REQUEST_MAX_SIZE | 100000000 | How big a request may be (bytes), default is 100 megabytes | | REQUEST_MAX_HEADER_SIZE | 8192 | How big a request header may be (bytes), default is 8192 bytes | | REQUEST_TIMEOUT | 60 | How long a request can take to arrive (sec) | | RESPONSE_TIMEOUT | 60 | How long a response can take to process (sec) | | USE_UVLOOP | True | Whether to override the loop policy to use `uvloop`. Supported only with `app.run`. | | WEBSOCKET_MAX_SIZE | 2^20 | Maximum size for incoming messages (bytes) | | WEBSOCKET_PING_INTERVAL | 20 | A Ping frame is sent every ping_interval seconds. | | WEBSOCKET_PING_TIMEOUT | 20 | Connection is closed when Pong is not received after ping_timeout seconds | .. tip:: FYI - The `USE_UVLOOP` value will be ignored if running with Gunicorn. Defaults to `False` on non-supported platforms (Windows). - The `WEBSOCKET_` values will be ignored if in ASGI mode. - v21.12 added: `AUTO_EXTEND`, `MOTD`, `MOTD_DISPLAY`, `NOISY_EXCEPTIONS` - v22.9 added: `INSPECTOR` - v22.12 added: `INSPECTOR_HOST`, `INSPECTOR_PORT`, `INSPECTOR_TLS_KEY`, `INSPECTOR_TLS_CERT`, `INSPECTOR_API_KEY` ## Timeouts ### REQUEST_TIMEOUT A request timeout measures the duration of time between the instant when a new open TCP connection is passed to the Sanic backend server, and the instant when the whole HTTP request is received. If the time taken exceeds the `REQUEST_TIMEOUT` value (in seconds), this is considered a Client Error so Sanic generates an `HTTP 408` response and sends that to the client. Set this parameter's value higher if your clients routinely pass very large request payloads or upload requests very slowly. ### RESPONSE_TIMEOUT A response timeout measures the duration of time between the instant the Sanic server passes the HTTP request to the Sanic App, and the instant a HTTP response is sent to the client. If the time taken exceeds the `RESPONSE_TIMEOUT` value (in seconds), this is considered a Server Error so Sanic generates an `HTTP 503` response and sends that to the client. Set this parameter's value higher if your application is likely to have long-running process that delay the generation of a response. ### KEEP_ALIVE_TIMEOUT #### What is Keep Alive? And what does the Keep Alive Timeout value do? `Keep-Alive` is a HTTP feature introduced in `HTTP 1.1`. When sending a HTTP request, the client (usually a web browser application) can set a `Keep-Alive` header to indicate the http server (Sanic) to not close the TCP connection after it has send the response. This allows the client to reuse the existing TCP connection to send subsequent HTTP requests, and ensures more efficient network traffic for both the client and the server. The `KEEP_ALIVE` config variable is set to `True` in Sanic by default. If you don't need this feature in your application, set it to `False` to cause all client connections to close immediately after a response is sent, regardless of the `Keep-Alive` header on the request. The amount of time the server holds the TCP connection open is decided by the server itself. In Sanic, that value is configured using the `KEEP_ALIVE_TIMEOUT` value. By default, **it is set to 120 seconds**. This means that if the client sends a `Keep-Alive` header, the server will hold the TCP connection open for 120 seconds after sending the response, and the client can reuse the connection to send another HTTP request within that time. For reference: * Apache httpd server default keepalive timeout = 5 seconds * Nginx server default keepalive timeout = 75 seconds * Nginx performance tuning guidelines uses keepalive = 15 seconds * Caddy server default keepalive timeout = 120 seconds * IE (5-9) client hard keepalive limit = 60 seconds * Firefox client hard keepalive limit = 115 seconds * Opera 11 client hard keepalive limit = 120 seconds * Chrome 13+ client keepalive limit > 300+ seconds ## Proxy configuration See [proxy configuration section](../advanced/proxy-headers.md) ================================================ FILE: guide/content/en/guide/running/development.md ================================================ # Development The first thing that should be mentioned is that the webserver that is integrated into Sanic is **not** just a development server. It is production ready out-of-the-box, *unless you enable in debug mode*. ## Debug mode By setting the debug mode, Sanic will be more verbose in its output and will disable several run-time optimizations. ```python # server.py from sanic import Sanic from sanic.response import json app = Sanic(__name__) @app.route("/") async def hello_world(request): return json({"hello": "world"}) ``` ```sh sanic server:app --host=0.0.0.0 --port=1234 --debug ``` .. danger:: Sanic's debug mode will slow down the server's performance, and is **NOT** intended for production environments. **DO NOT** enable debug mode in production. ## Automatic Reloader .. column:: Sanic offers a way to enable or disable the Automatic Reloader. The easiest way to enable it is using the CLI's `--reload` argument to activate the Automatic Reloader. Every time a Python file is changed, the reloader will restart your application automatically. This is very convenient while developing. .. note:: The reloader is only available when using Sanic's [worker manager](./manager.md). If you have disabled it using `--single-process` then the reloader will not be available to you. .. column:: ```sh sanic path.to:app --reload ``` You can also use the shorthand property ```sh sanic path.to:app -r ``` .. column:: If you have additional directories that you would like to automatically reload on file save (for example, a directory of HTML templates), you can add that using `--reload-dir`. .. column:: ```sh sanic path.to:app --reload --reload-dir=/path/to/templates ``` Or multiple directories, shown here using the shorthand properties ```sh sanic path.to:app -r -R /path/to/one -R /path/to/two ``` ## Development REPL The Sanic CLI comes with a REPL (aka "read-eval-print loop") that can be used to interact with your application. This is useful for debugging and testing. A REPL is the interactive shell that you get when you run `python` without any arguments. .. column:: You can start the REPL by passing the `--repl` argument to the Sanic CLI. .. column:: ```sh sanic path.to.server:app --repl ``` .. column:: Or, perhaps more conveniently, when you run `--dev`, Sanic will automatically start the REPL for you. However, in this case you might be prompted to hit the "ENTER" key before actually starting the REPL. .. column:: ```sh sanic path.to.server:app --dev ``` ![](/assets/images/repl.png) As seen in the screenshot above, the REPL will automatically add a few variables to the global namespace. These are: - `app` - The Sanic application instance. This is the same instance that is passed to the `sanic` CLI. - `sanic` - The `sanic` module. This is the same module that is imported when you run `import sanic`. - `do` - A function that will create a mock `Request` object and pass it to your application. This is useful for testing your application from the REPL. - `client` - An instance of `httpx.Client` that is configured to make requests to your application. This is useful for testing your application from the REPL. **Note:** This is only available if `httpx` is installed in your environment. ### Async/Await support .. column:: The REPL supports `async`/`await` syntax. This means that you can use `await` in the REPL to wait for asynchronous operations to complete. This is useful for testing asynchronous code. .. column:: ```python >>> await app.ctx.db.fetchval("SELECT 1") 1 ``` ### The `app` variable You need to keep in mind that the `app` variable is your app instance as it existed when the REPL was started. It is the instance that is loaded when running the CLI command. This means that any changes that are made to your source code and subsequently reloaded in the workers will not be reflected in the `app` variable. If you want to interact with the reloaded app instance, you will need to restart the REPL. However, it is also very useful to have access to the original app instance in the REPL for adhoc testing and debugging. ### The `client` variable When [httpx](https://www.python-httpx.org/) is installed in your environment, the `client` variable will be available in the REPL. This is an instance of `httpx.Client` that is configured to make requests to your running application. .. column:: To use it, simply call one of the HTTP methods on the client. See the [httpx documentation](https://www.python-httpx.org/api/#client) for more information. .. column:: ```python >>> client.get("/") ``` ### The `do` function As discussed above, the `app` instance exists as it did at the time the REPL was started, and as was modified inside the REPL. Any changes to the instance that cause a server to be reloaded will not be reflected in the `app` variable. This is where the `do` function comes in. Let's say that you have modified your application inside the REPL to add a new route: ```python >>> @app.get("/new-route") ... async def new_route(request): ... return sanic.json({"hello": "world"}) ... >>> ``` You can use the `do` function to mock out a request, and pass it to the application as if it were a real HTTP request. This will allow you to test your new route without having to restart the REPL. ```python >>> await do("/new-route") Result(request=, response=) ``` The `do` function returns a `Result` object that contains the `Request` and `Response` objects that were returned by your application. It is a `NamedTuple`, so you can access the values by name: ```python >>> result = await do("/new-route") >>> result.request >>> result.response ``` Or, by destructuring the tuple: ```python >>> request, response = await do("/new-route") >>> request >>> response ``` ### When to use `do` vs `client`? .. column:: **Use `do` when ...** - You want to test a route that does not exist in the running application - You want to test a route that has been modified in the REPL - You make a change to your application inside the REPL .. column:: **Use `client` when ...** - You want to test a route that already exists in the running application - You want to test a route that has been modified in your source code - You want to send an actual HTTP request to your application *Added in v23.12* ## Complete development mode .. column:: If you would like to be in debug mode **and** have the Automatic Reloader running, you can pass `dev=True`. This is equivalent to **debug + auto reload + REPL**. *Added in v22.3* .. column:: ```sh sanic path.to:app --dev ``` You can also use the shorthand property ```sh sanic path.to:app -d ``` Added to the `--dev` flag in v23.12 is the ability to start a REPL. See the [Development REPL](./development.md#development-repl) section for more information. As of v23.12, the `--dev` flag is roughly equivalent to `--debug --reload --repl`. Using `--dev` will require you to expressly begin the REPL by hitting "ENTER", while passing the `--repl` flag explicitly starts it. Before v23.12, the `--dev` flag is more similar to `--debug --reload`. .. column:: If you would like to disable the REPL while using the `--dev` flag, you can pass `--no-repl`. .. column:: ```sh sanic path.to:app --dev --no-repl ``` ## Automatic TLS certificate When running in `DEBUG` mode, you can ask Sanic to handle setting up localhost temporary TLS certificates. This is helpful if you want to access your local development environment with `https://`. This functionality is provided by either [mkcert](https://github.com/FiloSottile/mkcert) or [trustme](https://github.com/python-trio/trustme). Both are good choices, but there are some differences. `trustme` is a Python library and can be installed into your environment with `pip`. This makes for easy envrionment handling, but it is not compatible when running a HTTP/3 server. `mkcert` might be a more involved installation process, but can install a local CA and make it easier to use. .. column:: You can choose which platform to use by setting `config.LOCAL_CERT_CREATOR`. When set to `"auto"`, it will select either option, preferring `mkcert` if possible. .. column:: ```python app.config.LOCAL_CERT_CREATOR = "auto" app.config.LOCAL_CERT_CREATOR = "mkcert" app.config.LOCAL_CERT_CREATOR = "trustme" ``` .. column:: Automatic TLS can be enabled at Sanic server run time: .. column:: ```sh sanic path.to.server:app --auto-tls --debug ``` .. warning:: Localhost TLS certificates (like those generated by both `mkcert` and `trustme`) are **NOT** suitable for production environments. If you are not familiar with how to obtain a *real* TLS certificate, checkout the [How to...](../how-to/tls.md) section. *Added in v22.6* ================================================ FILE: guide/content/en/guide/running/inspector.md ================================================ # Inspector The Sanic Inspector is a feature of Sanic Server. It is *only* available when running Sanic with the built-in [worker manager](./manager.md). It is an HTTP application that *optionally* runs in the background of your application to allow you to interact with the running instance of your application. .. tip:: INFO The Inspector was introduced in limited capacity in v22.9, but the documentation on this page assumes you are using v22.12 or higher. ## Getting Started The inspector is disabled by default. To enable it, you have two options. .. column:: Set a flag when creating your application instance. .. column:: ```python app = Sanic("TestApp", inspector=True) ``` .. column:: Or, set a configuration value. .. column:: ```python app = Sanic("TestApp") app.config.INSPECTOR = True ``` .. warning:: If you are using the configuration value, it *must* be done early and before the main worker process starts. This means that it should either be an environment variable, or it should be set shortly after creating the application instance as shown above. ## Using the Inspector Once the inspector is running, you will have access to it via the CLI or by directly accessing its web API via HTTP. .. column:: **Via CLI** ```sh sanic inspect ``` .. column:: **Via HTTP** ```sh curl http://localhost:6457 ``` .. note:: Remember, the Inspector is not running on your Sanic application. It is a seperate process, with a seperate application, and exposed on a seperate socket. ## Built-in Commands The Inspector comes with the following built-in commands. | CLI Command | HTTP Action | Description | |--------------------|------------------------------------|--------------------------------------------------------------------------| | `inspect` | `GET /` | Display basic details about the running application. | | `inspect reload` | `POST /reload` | Trigger a reload of all server workers. | | `inspect shutdown` | `POST /shutdown` | Trigger a shutdown of all processes. | | `inspect scale N` | `POST /scale`
`{"replicas": N}` | Scale the number of workers. Where `N` is the target number of replicas. | ## Custom Commands The Inspector is easily extendable to add custom commands (and endpoints). .. column:: Subclass the `Inspector` class and create arbitrary methods. As long as the method name is not preceded by an underscore (`_`), then the name of the method will be a new subcommand on the inspector. .. column:: ```python from sanic import json from sanic.worker.inspector import Inspector class MyInspector(Inspector): async def something(self, *args, **kwargs): print(args) print(kwargs) app = Sanic("TestApp", inspector_class=MyInspector, inspector=True) ``` This will expose custom methods in the general pattern: - CLI: `sanic inspect ` - HTTP: `POST /` It is important to note that the arguments that the new method accepts are derived from how you intend to use the command. For example, the above `something` method accepts all positional and keyword based parameters. .. column:: In the CLI, the positional and keyword parameters are passed as either positional or keyword arguments to your method. All values will be a `str` with the following exceptions: - A keyword parameter with no assigned value will be: `True` - Unless the parameter is prefixed with `no-`, then it will be: `False` .. column:: ```sh sanic inspect something one two three --four --no-five --six=6 ``` In your application log console, you will see: ``` ('one', 'two', 'three') {'four': True, 'five': False, 'six': '6'} ``` .. column:: The same can be achieved by hitting the API directly. You can pass arguments to the method by exposing them in a JSON payload. The only thing to note is that the positional arguments should be exposed as `{"args": [...]}`. .. column:: ```sh curl http://localhost:6457/something \ --json '{"args":["one", "two", "three"], "four":true, "five":false, "six":6}' ``` In your application log console, you will see: ``` ('one', 'two', 'three') {'four': True, 'five': False, 'six': 6} ``` ## Using in production .. danger:: Before exposing the Inspector on a product, please consider all of the options in this section carefully. When running Inspector on a remote production instance, you can protect the endpoints by requiring TLS encryption, and requiring API key authentication. ### TLS encryption .. column:: To the Inspector HTTP instance over TLS, pass the paths to your certificate and key. .. column:: ```python app.config.INSPECTOR_TLS_CERT = "/path/to/cert.pem" app.config.INSPECTOR_TLS_KEY = "/path/to/key.pem" ``` .. column:: This will require use of the `--secure` flag, or `https://`. .. column:: ```sh sanic inspect --secure --host= ``` ```sh curl https://:6457 ``` ### API Key Authentication .. column:: You can secure the API with bearer token authentication. .. column:: ```python app.config.INSPECTOR_API_KEY = "Super-Secret-200" ``` .. column:: This will require the `--api-key` parameter, or bearer token authorization header. .. column:: ```sh sanic inspect --api-key=Super-Secret-200 ``` ```sh curl http://localhost:6457 -H "Authorization: Bearer Super-Secret-200" ``` ## Configuration See [configuration](./configuration.md) ================================================ FILE: guide/content/en/guide/running/manager.md ================================================ --- title: Worker Manager --- # Worker Manager The worker manager and its functionality was introduced in version 22.9. *The details of this section are intended for more advanced usages and **not** necessary to get started.* The purpose of the manager is to create consistency and flexibility between development and production environments. Whether you intend to run a single worker, or multiple workers, whether with, or without auto-reload: the experience will be the same. In general it looks like this: ![](https://user-images.githubusercontent.com/166269/178677618-3b4089c3-6c6a-4ecc-8d7a-7eba2a7f29b0.png) When you run Sanic, the main process instantiates a `WorkerManager`. That manager is in charge of running one or more `WorkerProcess`. There generally are two kinds of processes: - server processes, and - non-server processes. For the sake of ease, the User Guide generally will use the term "worker" or "worker process" to mean a server process, and "Manager" to mean the single worker manager running in your main process. ## How Sanic Server starts processes Sanic will start processes using the [spawn](https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods) start method. This means that for every process/worker, the global scope of your application will be run on its own thread. The practical impact of this that *if* you do not run Sanic with the CLI, you will need to nest the execution code inside a block to make sure it only runs on `__main__`. ```python if __name__ == "__main__": app.run() ``` If you do not, you are likely to see an error message like this: ``` sanic.exceptions.ServerError: Sanic server could not start: [Errno 98] Address already in use. This may have happened if you are running Sanic in the global scope and not inside of a `if __name__ == "__main__"` block. See more information: https://sanic.dev/en/guide/deployment/manager.html#how-sanic-server-starts-processes ``` The likely fix for this problem is nesting your Sanic run call inside of the `__name__ == "__main__"` block. If you continue to receive this message after nesting, or if you see this while using the CLI, then it means the port you are trying to use is not available on your machine and you must select another port. ### Starting a worker All worker processes *must* send an acknowledgement when starting. This happens under the hood, and you as a developer do not need to do anything. However, the Manager will exit with a status code `1` if one or more workers do not send that `ack` message, or a worker process throws an exception while trying to start. If no exceptions are encountered, the Manager will wait for up to thirty (30) seconds for the acknowledgement. .. column:: In the situation when you know that you will need more time to start, you can monkeypatch the Manager. The threshold does not include anything inside of a listener, and is limited to the execution time of everything in the global scope of your application. If you run into this issue, it may indicate a need to look deeper into what is causing the slow startup. .. column:: ```python from sanic.worker.manager import WorkerManager WorkerManager.THRESHOLD = 100 # Value is in 0.1s ``` See [worker ack](#worker-ack) for more information. .. column:: As stated above, Sanic will use [spawn](https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods) to start worker processes. If you would like to change this behavior and are aware of the implications of using different start methods, you can modify as shown here. .. column:: ```python from sanic import Sanic Sanic.start_method = "fork" ``` ### Worker ack When all of your workers are running in a subprocess a potential problem is created: deadlock. This can occur when the child processes cease to function, but the main process is unaware that this happened. Therefore, Sanic servers will automatically send an `ack` message (short for acknowledge) to the main process after startup. In version 22.9, the `ack` timeout was short and limited to `5s`. In version 22.12, the timeout was lengthened to `30s`. If your application is shutting down after thirty seconds then it might be necessary to manually increase this threshhold. .. column:: The value of `WorkerManager.THRESHOLD` is in `0.1s` increments. Therefore, to set it to one minute, you should set the value to `600`. This value should be set as early as possible in your application, and should ideally happen in the global scope. Setting it after the main process has started will not work. .. column:: ```python from sanic.worker.manager import WorkerManager WorkerManager.THRESHOLD = 600 ``` ### Zero downtime restarts By default, when restarting workers, Sanic will teardown the existing process first before starting a new one. If you are intending to use the restart functionality in production then you may be interested in having zero-downtime reloading. This can be accomplished by forcing the reloader to change the order to start a new process, wait for it to [ack](#worker-ack), and then teardown the old process. .. column:: From the multiplexer, use the `zero_downtime` argument .. column:: ```python app.m.restart(zero_downtime=True) ``` *Added in v22.12* ## Using shared context between worker processes Python provides a few methods for [exchanging objects](https://docs.python.org/3/library/multiprocessing.html#exchanging-objects-between-processes), [synchronizing](https://docs.python.org/3/library/multiprocessing.html#synchronization-between-processes), and [sharing state](https://docs.python.org/3/library/multiprocessing.html#sharing-state-between-processes) between processes. This usually involves objects from the `multiprocessing` and `ctypes` modules. If you are familiar with these objects and how to work with them, you will be happy to know that Sanic provides an API for sharing these objects between your worker processes. If you are not familiar, you are encouraged to read through the Python documentation linked above and try some of the examples before proceeding with implementing shared context. Similar to how [application context](../basics/app.md#application-context) allows an applicaiton to share state across the lifetime of the application with `app.ctx`, shared context provides the same for the special objects mentioned above. This context is available as `app.shared_ctx` and should **ONLY** be used to share objects intended for this purpose. The `shared_ctx` will: - *NOT* share regular objects like `int`, `dict`, or `list` - *NOT* share state between Sanic instances running on different machines - *NOT* share state to non-worker processes - **only** share state between server workers managed by the same Manager Attaching an inappropriate object to `shared_ctx` will likely result in a warning, and not an error. You should be careful to not accidentally add an unsafe object to `shared_ctx` as it may not work as expected. If you are directed here because of one of those warnings, you might have accidentally used an unsafe object in `shared_ctx`. .. column:: In order to create a shared object you **must** create it in the main process and attach it inside of the `main_process_start` listener. .. column:: ```python from multiprocessing import Queue @app.main_process_start async def main_process_start(app): app.shared_ctx.queue = Queue() ``` Trying to attach to the `shared_ctx` object outside of this listener may result in a `RuntimeError`. .. column:: After creating the objects in the `main_process_start` listener and attaching to the `shared_ctx`, they will be available in your workers wherever the application instance is available (example: listeners, middleware, request handlers). .. column:: ```python from multiprocessing import Queue @app.get("") async def handler(request): request.app.shared_ctx.queue.put(1) ... ``` ## Access to the multiplexer The application instance has access to an object that provides access to interacting with the Manager and other worker processes. The object is attached as the `app.multiplexer` property, but it is more easily accessed by its alias: `app.m`. .. column:: For example, you can get access to the current worker state. .. column:: ```python @app.on_request async def print_state(request: Request): print(request.app.m.name) print(request.app.m.pid) print(request.app.m.state) ``` ``` Sanic-Server-0-0 99999 {'server': True, 'state': 'ACKED', 'pid': 99999, 'start_at': datetime.datetime(2022, 10, 1, 0, 0, 0, 0, tzinfo=datetime.timezone.utc), 'starts': 2, 'restart_at': datetime.datetime(2022, 10, 1, 0, 0, 12, 861332, tzinfo=datetime.timezone.utc)} ``` .. column:: The `multiplexer` also has access to terminate the Manager, or restart worker processes .. column:: ```python # shutdown the entire application and all processes app.m.name.terminate() # restart the current worker only app.m.name.restart() # restart specific workers only (comma delimited) app.m.name.restart("Sanic-Server-4-0,Sanic-Server-7-0") # restart ALL workers app.m.name.restart(all_workers=True) # Available v22.12+ ``` ## Worker state .. column:: As shown above, the `multiplexer` has access to report upon the state of the current running worker. However, it also contains the state for ALL processes running. .. column:: ```python @app.on_request async def print_state(request: Request): print(request.app.m.workers) ``` ``` { 'Sanic-Main': {'pid': 99997}, 'Sanic-Server-0-0': { 'server': True, 'state': 'ACKED', 'pid': 9999, 'start_at': datetime.datetime(2022, 10, 1, 0, 0, 0, 0, tzinfo=datetime.timezone.utc), 'starts': 2, 'restart_at': datetime.datetime(2022, 10, 1, 0, 0, 12, 861332, tzinfo=datetime.timezone.utc) }, 'Sanic-Reloader-0': { 'server': False, 'state': 'STARTED', 'pid': 99998, 'start_at': datetime.datetime(2022, 10, 1, 0, 0, 0, 0, tzinfo=datetime.timezone.utc), 'starts': 1 } } ``` The possible states are: - `NONE` - The worker has been created, but there is no process yet - `IDLE` - The process has been created, but is not running yet - `STARTING` - The process is starting - `STARTED` - The process has started - `ACKED` - The process has started and sent an acknowledgement (usually only for server processes) - `JOINED` - The process has exited and joined the main process - `TERMINATED` - The process has exited and terminated - `RESTARTING` - The process is restarting - `FAILED` - The process encountered an exception and is no longer running - `COMPLETED` - The process has completed its work and exited successfully ## Built-in non-server processes As mentioned, the Manager also has the ability to run non-server processes. Sanic comes with two built-in types of non-server processes, and allows for [creating custom processes](#running-custom-processes). The two built-in processes are - the [auto-reloader](./development.md#automatic-reloader), optionally enabled to watch the file system for changes and trigger a restart - [inspector](#inspector), optionally enabled to provide external access to the state of the running instance ## Inspector Sanic has the ability to expose the state and the functionality of the `multiplexer` to the CLI. Currently, this requires the CLI command to be run on the same machine as the running Sanic instance. By default the inspector is disabled. .. column:: To enable it, set the config value to `True`. .. column:: ```python app.config.INSPECTOR = True ``` You will now have access to execute any of these CLI commands: ``` sanic inspect reload Trigger a reload of the server workers sanic inspect shutdown Shutdown the application and all processes sanic inspect scale N Scale the number of workers to N sanic inspect Run a custom command ``` ![](https://user-images.githubusercontent.com/166269/190099384-2f2f3fae-22d5-4529-b279-8446f6b5f9bd.png) .. column:: This works by exposing a small HTTP service on your machine. You can control the location using configuration values: .. column:: ```python app.config.INSPECTOR_HOST = "localhost" app.config.INSPECTOR_PORT = 6457 ``` [Learn more](./inspector.md) to find out what is possible with the Inspector. ## Running custom processes To run a managed custom process on Sanic, you must create a callable. If that process is meant to be long-running, then it should handle a shutdown call by a `SIGINT` or `SIGTERM` signal. .. column:: The simplest method for doing that in Python will be to just wrap your loop in `KeyboardInterrupt`. If you intend to run another application, like a bot, then it is likely that it already has capability to handle this signal and you likely do not need to do anything. .. column:: ```python from time import sleep def my_process(foo): try: while True: sleep(1) except KeyboardInterrupt: print("done") ``` .. column:: That callable must be registered in the `main_process_ready` listener. It is important to note that is is **NOT** the same location that you should register [shared context](#using-shared-context-between-worker-processes) objects. .. column:: ```python @app.main_process_ready async def ready(app: Sanic, _): # app.manager.manage(, , ) app.manager.manage("MyProcess", my_process, {"foo": "bar"}) ``` ### Transient v. durable processes .. column:: When you manage a process with the `manage` method, you have the option to make it transient or durable. A transient process will be restarted by the auto-reloader, and a durable process will not. By default, all processes are durable. .. column:: ```python @app.main_process_ready async def ready(app: Sanic, _): app.manager.manage( "MyProcess", my_process, {"foo": "bar"}, transient=True, ) ``` ### Tracked v. untracked processes Out of the box, Sanic will track the state of all processes. This means that you can access the state of the process from the [multiplexer](./manager.md#access-to-the-multiplexer) object, or from the [Inspector](./manager.md#inspector). See [worker state](./manager.md#worker-state) for more information. Sometimes it is helpful to run background processes that are not long-running. You run them once until completion and then they exit. Upon completion, they will either be in `FAILED` or `COMPLETED` state. .. column:: When you are running a non-long-running process, you can opt out of tracking it by setting `tracked=False` in the `manage` method. This means that upon completion of the process it will be removed from the list of tracked processes. You will only be able to check the state of the process while it is running. .. column:: ```python @app.main_process_ready async def ready(app: Sanic, _): app.manager.manage( "OneAndDone", do_once, {}, tracked=False, ) ``` *Added in v23.12* ### Restartable custom processes A custom process that is transient will **always** be restartable. That means the auto-restart will work as expected. However, what if you want to be able to *manually* restart a process, but not have it be restarted by the auto-reloader? .. column:: In this scenario, you can set `restartable=True` in the `manage` method. This will allow you to manually restart the process, but it will not be restarted by the auto-reloader. .. column:: ```python @app.main_process_ready async def ready(app: Sanic, _): app.manager.manage( "MyProcess", my_process, {"foo": "bar"}, restartable=True, ) ``` .. column:: You could now manually restart that process from the multiplexer. .. column:: ```python @app.get("/restart") async def restart_handler(request: Request): request.app.m.restart("Sanic-MyProcess-0") return json({"foo": request.app.m.name}) ``` *Added in v23.12* ### On the fly process management Custom processes are usually added in the `main_process_ready` listener. However, there may be times when you want to add a process after the application has started. For example, you may want to add a process from a request handler. The multiplexer provides a method for doing this. .. column:: Once you have a reference to the multiplexer, you can call `manage` to add a process. It works the same as the `manage` method on the Manager. .. column:: ```python @app.post("/start") async def start_handler(request: Request): request.app.m.manage( "MyProcess", my_process, {"foo": "bar"}, workers=2, ) return json({"foo": request.app.m.name}) ``` *Added in v23.12* ## Single process mode .. column:: If you would like to opt out of running multiple processes, you can run Sanic in a single process only. In this case, the Manager will not run. You will also not have access to any features that require processes (auto-reload, the inspector, etc). .. column:: ```sh sanic path.to.server:app --single-process ``` ```python if __name__ == "__main__": app.run(single_process=True) ``` ```python if __name__ == "__main__": app.prepare(single_process=True) Sanic.serve_single() ``` ## Sanic and multiprocessing Sanic makes heavy use of the [`multiprocessing` module](https://docs.python.org/3/library/multiprocessing.html) to manage the worker processes. You should generally avoid lower level usage of this module (like setting the start method) as it may interfere with the functionality of Sanic. ### Start methods in Python Before explaining what Sanic tries to do, it is important to understand what the `start_method` is and why it is important. Python generally allows for three different methods of starting a process: - `fork` - `spawn` - `forkserver` The `fork` and `forkserver` methods are only available on Unix systems, and `spawn` is the only method available on Windows. On Unix systems where you have a choice, `fork` is generally the default system method. You are encouraged to read the [Python documentation](https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods) to learn more about the differences between these methods. However, the important thing to know is that `fork` basically copies the entire memory of the parent process into the child process, whereas `spawn` will create a new process and then load the application into that process. This is the reason why you need to nest your Sanic `run` call inside of the `__name__ == "__main__"` block if you are not using the CLI. ### Sanic and start methods By default, Sanic will try and use `spawn` as the start method. This is because it is the only method available on Windows, and it is the safest method on Unix systems. .. column:: However, if you are running Sanic on a Unix system and you would like to use `fork` instead, you can do so by setting the `start_method` on the `Sanic` class. You will want to do this as early as possible in your application, and ideally in the global scope before you import any other modules. .. column:: ```python from sanic import Sanic Sanic.start_method = "fork" ``` ### Overcoming a `RuntimeError` You might have received a `RuntimeError` that looks like this: ``` RuntimeError: Start method 'spawn' was requested, but 'fork' was already set. ``` If so, that means somewhere in your application you are trying to set the start method that conflicts with what Sanic is trying to do. You have a few options to resolve this: .. column:: **OPTION 1:** You can tell Sanic that the start method has been set and to not try and set it again. .. column:: ```python from sanic import Sanic Sanic.START_METHOD_SET = True ``` .. column:: **OPTION 2:** You could tell Sanic that you intend to use `fork` and to not try and set it to `spawn`. .. column:: ```python from sanic import Sanic Sanic.start_method = "fork" ``` .. column:: **OPTION 3:** You can tell Python to use `spawn` instead of `fork` by setting the `multiprocessing` start method. .. column:: ```python import multiprocessing multiprocessing.set_start_method("spawn") ``` In any of these options, you should run this code as early as possible in your application. Depending upon exactly what your specific scenario is, you may need to combine some of the options. .. note:: The potential issues that arise from this problem are usually easily solved by just allowing Sanic to be in charge of multiprocessing. This usually means making use of the `main_process_start` and `main_process_ready` listeners to deal with multiprocessing issues. For example, you should move instantiating multiprocessing primitives that do a lot of work under the hood from the global scope and into a listener. ```python # This is BAD; avoid the global scope from multiprocessing import Queue q = Queue() ``` ```python # This is GOOD; the queue is made in a listener and shared to all the processes on the shared_ctx from multiprocessing import Queue @app.main_process_start async def main_process_start(app): app.shared_ctx.q = Queue() ``` ================================================ FILE: guide/content/en/guide/running/running.md ================================================ --- title: Running Sanic --- # Running Sanic Sanic ships with its own internal web server. Under most circumstances, this is the preferred method for deployment. In addition, you can also deploy Sanic as an ASGI app bundled with an ASGI-able web server. ## Sanic Server The main way to run Sanic is to use the included [CLI](#sanic-cli). ```sh sanic path.to.server:app ``` In this example, Sanic is instructed to look for a python module called `path.to.server`. Inside of that module, it will look for a global variable called `app`, which should be an instance of `Sanic(...)`. ```python # ./path/to/server.py from sanic import Sanic, Request, json app = Sanic("TestApp") @app.get("/") async def handler(request: Request): return json({"foo": "bar"}) ``` You may also dropdown to the [lower level API](#low-level-apprun) to call `app.run` as a script. However, if you choose this option you should be more comfortable handling issues that may arise with `multiprocessing`. ### Workers .. column:: By default, Sanic runs a main process and a single worker process (see [worker manager](./manager.md) for more details). To crank up the juice, just specify the number of workers in the run arguments. .. column:: ```sh sanic server:app --host=0.0.0.0 --port=1337 --workers=4 ``` Sanic will automatically spin up multiple processes and route traffic between them. We recommend as many workers as you have available processors. .. column:: The easiest way to get the maximum CPU performance is to use the `--fast` option. This will automatically run the maximum number of workers given the system constraints. *Added in v21.12* .. column:: ```sh sanic server:app --host=0.0.0.0 --port=1337 --fast ``` In version 22.9, Sanic introduced a new worker manager to provide more consistency and flexibility between development and production servers. Read [about the manager](./manager.md) for more details about workers. .. column:: If you only want to run Sanic with a single process, specify `single_process` in the run arguments. This means that auto-reload, and the worker manager will be unavailable. *Added in v22.9* .. column:: ```sh sanic server:app --host=0.0.0.0 --port=1337 --single-process ``` ### Running via command #### Sanic CLI Use `sanic --help` to see all the options. .. attrs:: :title: Sanic CLI help output :class: details ```text $ sanic --help ▄███ █████ ██ ▄█▄ ██ █ █ ▄██████████ ██ █ █ █ ██ █ █ ██ ▀███████ ███▄ ▀ █ █ ██ ▄ █ ██ ██ █████████ █ ██ █ █ ▄▄ ████ ████████▀ █ █ █ ██ █ ▀██ ███████ To start running a Sanic application, provide a path to the module, where app is a Sanic() instance: $ sanic path.to.server:app Or, a path to a callable that returns a Sanic() instance: $ sanic path.to.factory:create_app --factory Or, a path to a directory to run as a simple HTTP server: $ sanic ./path/to/static --simple Required ======== Positional: module Path to your Sanic app. Example: path.to.server:app If running a Simple Server, path to directory to serve. Example: ./ Optional ======== General: -h, --help show this help message and exit --version show program's version number and exit Application: --factory Treat app as an application factory, i.e. a () -> callable -s, --simple Run Sanic as a Simple Server, and serve the contents of a directory (module arg should be a path) --inspect Inspect the state of a running instance, human readable --inspect-raw Inspect the state of a running instance, JSON output --trigger-reload Trigger worker processes to reload --trigger-shutdown Trigger all processes to shutdown HTTP version: --http {1,3} Which HTTP version to use: HTTP/1.1 or HTTP/3. Value should be either 1, or 3. [default 1] -1 Run Sanic server using HTTP/1.1 -3 Run Sanic server using HTTP/3 Socket binding: -H HOST, --host HOST Host address [default 127.0.0.1] -p PORT, --port PORT Port to serve on [default 8000] -u UNIX, --unix UNIX location of unix socket TLS certificate: --cert CERT Location of fullchain.pem, bundle.crt or equivalent --key KEY Location of privkey.pem or equivalent .key file --tls DIR TLS certificate folder with fullchain.pem and privkey.pem May be specified multiple times to choose multiple certificates --tls-strict-host Only allow clients that send an SNI matching server certs Worker: -w WORKERS, --workers WORKERS Number of worker processes [default 1] --fast Set the number of workers to max allowed --single-process Do not use multiprocessing, run server in a single process --legacy Use the legacy server manager --access-logs Display access logs --no-access-logs No display access logs Development: --debug Run the server in debug mode -r, --reload, --auto-reload Watch source directory for file changes and reload on changes -R PATH, --reload-dir PATH Extra directories to watch and reload on changes -d, --dev debug + auto reload --auto-tls Create a temporary TLS certificate for local development (requires mkcert or trustme) Output: --coffee Uhm, coffee? --no-coffee No uhm, coffee? --motd Show the startup display --no-motd No show the startup display -v, --verbosity Control logging noise, eg. -vv or --verbosity=2 [default 0] --noisy-exceptions Output stack traces for all exceptions --no-noisy-exceptions No output stack traces for all exceptions ``` #### As a module .. column:: Sanic applications can also be called directly as a module. .. column:: ```bash python -m sanic server.app --host=0.0.0.0 --port=1337 --workers=4 ``` #### Using a factory A very common solution is to develop your application *not* as a global variable, but instead using the factory pattern. In this context, "factory" means a function that returns an instance of `Sanic(...)`. .. column:: Suppose that you have this in your `server.py` .. column:: ```python from sanic import Sanic def create_app() -> Sanic: app = Sanic("MyApp") return app ``` .. column:: You can run this application now by referencing it in the CLI explicitly as a factory: .. column:: ```sh sanic server:create_app --factory ``` Or, explicitly like this: ```sh sanic "server:create_app()" ``` Or, implicitly like this: ```sh sanic server:create_app ``` *Implicit command added in v23.3* ### Low level `app.run` When using `app.run` you will just call your Python file like any other script. .. column:: `app.run` must be properly nested inside of a name-main block. .. column:: ```python # server.py app = Sanic("MyApp") if __name__ == "__main__": app.run() ``` .. danger:: Be *careful* when using this pattern. A very common mistake is to put too much logic inside of the `if __name__ == "__main__":` block. 🚫 This is a mistake ```python from sanic import Sanic from my.other.module import bp app = Sanic("MyApp") if __name__ == "__main__": app.blueprint(bp) app.run() ``` If you do this, your [blueprint](../best-practices/blueprints.md) will not be attached to your application. This is because the `__main__` block will only run on Sanic's main worker process, **NOT** any of its [worker processes](../deployment/manager.md). This goes for anything else that might impact your application (like attaching listeners, signals, middleware, etc). The only safe operations are anything that is meant for the main process, like the `app.main_*` listeners. Perhaps something like this is more appropriate: ```python from sanic import Sanic from my.other.module import bp app = Sanic("MyApp") if __name__ == "__mp_main__": app.blueprint(bp) elif __name__ == "__main__": app.run() ``` To use the low-level `run` API, after defining an instance of `sanic.Sanic`, we can call the run method with the following keyword arguments: | Parameter | Default | Description | | :-------------------: | :--------------: | :---------------------------------------------------------------------------------------- | | **host** | `"127.0.0.1"` | Address to host the server on. | | **port** | `8000` | Port to host the server on. | | **unix** | `None` | Unix socket name to host the server on (instead of TCP). | | **dev** | `False` | Equivalent to `debug=True` and `auto_reload=True`. | | **debug** | `False` | Enables debug output (slows server). | | **ssl** | `None` | SSLContext for SSL encryption of worker(s). | | **sock** | `None` | Socket for the server to accept connections from. | | **workers** | `1` | Number of worker processes to spawn. Cannot be used with fast. | | **loop** | `None` | An asyncio-compatible event loop. If none is specified, Sanic creates its own event loop. | | **protocol** | `HttpProtocol` | Subclass of asyncio.protocol. | | **version** | `HTTP.VERSION_1` | The HTTP version to use (`HTTP.VERSION_1` or `HTTP.VERSION_3`). | | **access_log** | `True` | Enables log on handling requests (significantly slows server). | | **auto_reload** | `None` | Enables auto-reload on the source directory. | | **reload_dir** | `None` | A path or list of paths to directories the auto-reloader should watch. | | **noisy_exceptions** | `None` | Whether to set noisy exceptions globally. None means leave as default. | | **motd** | `True` | Whether to display the startup message. | | **motd_display** | `None` | A dict with extra key/value information to display in the startup message | | **fast** | `False` | Whether to maximize worker processes. Cannot be used with workers. | | **verbosity** | `0` | Level of logging detail. Max is 2. | | **auto_tls** | `False` | Whether to auto-create a TLS certificate for local development. Not for production. | | **single_process** | `False` | Whether to run Sanic in a single process. | .. column:: For example, we can turn off the access log in order to increase performance, and bind to a custom host and port. .. column:: ```python # server.py app = Sanic("MyApp") if __name__ == "__main__": app.run(host='0.0.0.0', port=1337, access_log=False) ``` .. column:: Now, just execute the python script that has `app.run(...)` .. column:: ```sh python server.py ``` For a slightly more advanced implementation, it is good to know that `app.run` will call `app.prepare` and `Sanic.serve` under the hood. .. column:: Therefore, these are equivalent: .. column:: ```python if __name__ == "__main__": app.run(host='0.0.0.0', port=1337, access_log=False) ``` ```python if __name__ == "__main__": app.prepare(host='0.0.0.0', port=1337, access_log=False) Sanic.serve() ``` .. column:: This can be useful if you need to bind your appliction(s) to multiple ports. .. column:: ```python if __name__ == "__main__": app1.prepare(host='0.0.0.0', port=9990) app1.prepare(host='0.0.0.0', port=9991) app2.prepare(host='0.0.0.0', port=5555) Sanic.serve() ``` ### Sanic Simple Server .. column:: Sometimes you just have a directory of static files that need to be served. This especially can be handy for quickly standing up a localhost server. Sanic ships with a Simple Server, where you only need to point it at a directory. .. column:: ```sh sanic ./path/to/dir --simple ``` .. column:: This could also be paired with auto-reloading. .. column:: ```sh sanic ./path/to/dir --simple --reload --reload-dir=./path/to/dir ``` *Added in v21.6* ### Daemon mode .. new:: New in v25.12 This feature was added in version 25.12 .. column:: Sanic can run as a background daemon process. Use the `-D` or `--daemon` flag to start the server in the background. .. column:: ```sh sanic path.to.server:app --daemon sanic path.to.server:app -D ``` .. column:: You can manage the daemon with additional commands: .. column:: ```sh sanic path.to.server:app status # Check if running sanic path.to.server:app stop # Stop the daemon ``` .. column:: Additional options are available for daemon configuration: .. column:: ```sh sanic path.to.server:app -D --pidfile=/var/run/sanic.pid sanic path.to.server:app -D --logfile=/var/log/sanic.log sanic path.to.server:app -D --user=www-data sanic path.to.server:app -D --group=www-data ``` Lower-level commands are also available to manage processes by PID: ```sh sanic kill --pid= sanic kill --pidfile=/var/run/sanic.pid sanic status --pid= sanic status --pidfile=/var/run/sanic.pid ``` *Added in v25.12* ### HTTP/3 Sanic server offers HTTP/3 support using [aioquic](https://github.com/aiortc/aioquic). This **must** be installed to use HTTP/3: ```sh pip install sanic aioquic ``` ```sh pip install sanic[http3] ``` To start HTTP/3, you must explicitly request it when running your application. .. column:: ```sh sanic path.to.server:app --http=3 ``` ```sh sanic path.to.server:app -3 ``` .. column:: ```python app.run(version=3) ``` To run both an HTTP/3 and HTTP/1.1 server simultaneously, you can use [application multi-serve](../../release-notes/2022/v22.3.md#application-multi-serve) introduced in v22.3. This will automatically add an [Alt-Svc](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Alt-Svc) header to your HTTP/1.1 requests to let the client know that it is also available as HTTP/3. .. column:: ```sh sanic path.to.server:app --http=3 --http=1 ``` ```sh sanic path.to.server:app -3 -1 ``` .. column:: ```python app.prepare(version=3) app.prepare(version=1) Sanic.serve() ``` Because HTTP/3 requires TLS, you cannot start a HTTP/3 server without a TLS certificate. You should [set it up yourself](../how-to/tls.md) or use `mkcert` if in `DEBUG` mode. Currently, automatic TLS setup for HTTP/3 is not compatible with `trustme`. See [development](./development.md) for more details. *Added in v22.6* ## ASGI Sanic is also ASGI-compliant. This means you can use your preferred ASGI webserver to run Sanic. The three main implementations of ASGI are [Daphne](http://github.com/django/daphne), [Uvicorn](https://www.uvicorn.org/), and [Hypercorn](https://pgjones.gitlab.io/hypercorn/index.html). .. warning:: Daphne does not support the ASGI `lifespan` protocol, and therefore cannot be used to run Sanic. See [Issue #264](https://github.com/django/daphne/issues/264) for more details. Follow their documentation for the proper way to run them, but it should look something like: ```sh uvicorn myapp:app ``` ```sh hypercorn myapp:app ``` A couple things to note when using ASGI: 1. When using the Sanic webserver, websockets will run using the `websockets` package. In ASGI mode, there is no need for this package since websockets are managed in the ASGI server. 2. The ASGI lifespan protocol , supports only two server events: startup and shutdown. Sanic has four: before startup, after startup, before shutdown, and after shutdown. Therefore, in ASGI mode, the startup and shutdown events will run consecutively and not actually around the server process beginning and ending (since that is now controlled by the ASGI server). Therefore, it is best to use `after_server_start` and `before_server_stop`. ### Trio Sanic has experimental support for running on Trio with: ```sh hypercorn -k trio myapp:app ``` ## Gunicorn [Gunicorn](http://gunicorn.org/) ("Green Unicorn") is a WSGI HTTP Server for UNIX based operating systems. It is a pre-fork worker model ported from Ruby’s Unicorn project. In order to run Sanic application with Gunicorn, you need to use it with the adapter from [uvicorn](https://www.uvicorn.org/). Make sure uvicorn is installed and run it with `uvicorn.workers.UvicornWorker` for Gunicorn worker-class argument: ```sh gunicorn myapp:app --bind 0.0.0.0:1337 --worker-class uvicorn.workers.UvicornWorker ``` See the [Gunicorn Docs](http://docs.gunicorn.org/en/latest/settings.html#max-requests) for more information. .. warning:: It is generally advised to not use `gunicorn` unless you need it. The Sanic Server is primed for running Sanic in production. Weigh your considerations carefully before making this choice. Gunicorn does provide a lot of configuration options, but it is not the best choice for getting Sanic to run at its fastest. ## Performance considerations .. column:: When running in production, make sure you turn off `debug`. .. column:: ```sh sanic path.to.server:app ``` .. column:: Sanic will also perform fastest if you turn off `access_log`. If you still require access logs, but want to enjoy this performance boost, consider using [Nginx as a proxy](./../deployment/nginx.md), and letting that handle your access logging. It will be much faster than anything Python can handle. .. column:: ```sh sanic path.to.server:app --no-access-logs ``` ================================================ FILE: guide/content/en/help.md ================================================ --- title: Need some help? layout: main --- # Need some help? As an active community of developers, we try to support each other. If you need some help, try one of the following: .. column:: ### Discord 💬 Best place to turn for quick answers and live chat `#sanic-support` channel on the [Discord server](https://discord.gg/FARQzAEMAA) .. column:: ### Community Forums 👥 Good for sharing snippets of code and longer support queries `Questions and Help` category on the [Forums](https://community.sanicframework.org/c/questions-and-help/6) --- We also actively monitor the `[sanic]` tag on [Stack Overflow](https://stackoverflow.com/questions/tagged/sanic). ================================================ FILE: guide/content/en/index.md ================================================ --- title: The lightning-fast asynchronous Python web framework layout: home features: - title: Simple and lightweight details: Intuitive API with smart defaults and no bloat allows you to get straight to work building your app. - title: Unopinionated and flexible details: Build the way you want to build without letting your tooling constrain you. - title: Performant and scalable details: Built from the ground up with speed and scalability as a main concern. It is ready to power web applications big and small. - title: Production ready details: Out of the box, it comes bundled with a web server ready to power your web applications. - title: Trusted by millions details: Sanic is one of the overall most popular frameworks on PyPI, and the top async enabled framework - title: Community driven details: The project is maintained and run by the community for the community. --- ### ⚡ The lightning-fast asynchronous Python web framework .. attrs:: :class: columns is-multiline mt-6 .. attrs:: :class: column is-4 #### Simple and lightweight Intuitive API with smart defaults and no bloat allows you to get straight to work building your app. .. attrs:: :class: column is-4 #### Unopinionated and flexible Build the way you want to build without letting your tooling constrain you. .. attrs:: :class: column is-4 #### Performant and scalable Built from the ground up with speed and scalability as a main concern. It is ready to power web applications big and small. .. attrs:: :class: column is-4 #### Production ready Out of the box, it comes bundled with a web server ready to power your web applications. .. attrs:: :class: column is-4 #### Trusted by millions Sanic is one of the overall most popular frameworks on PyPI, and the top async enabled framework .. attrs:: :class: column is-4 #### Community driven The project is maintained and run by the community for the community. .. attrs:: :class: is-size-3 mt-6 **With the features and tools you'd expect.** .. attrs:: :class: is-size-3 ml-6 **And some {span:has-text-primary:you wouldn't believe}.** .. tab:: Production-grade After installing, Sanic has all the tools you need for a scalable, production-grade server—out of the box! Including [full TLS support](/en/guide/how-to/tls.md). ```python from sanic import Sanic from sanic.response import text app = Sanic("MyHelloWorldApp") @app.get("/") async def hello_world(request): return text("Hello, world.") ``` ```sh sanic path.to.server:app [2023-01-31 12:34:56 +0000] [999996] [INFO] Sanic v22.12.0 [2023-01-31 12:34:56 +0000] [999996] [INFO] Goin' Fast @ http://127.0.0.1:8000 [2023-01-31 12:34:56 +0000] [999996] [INFO] mode: production, single worker [2023-01-31 12:34:56 +0000] [999996] [INFO] server: sanic, HTTP/1.1 [2023-01-31 12:34:56 +0000] [999996] [INFO] python: 3.10.9 [2023-01-31 12:34:56 +0000] [999996] [INFO] platform: SomeOS-9.8.7 [2023-01-31 12:34:56 +0000] [999996] [INFO] packages: sanic-routing==22.8.0 [2023-01-31 12:34:56 +0000] [999997] [INFO] Starting worker [999997] ``` .. tab:: TLS server Running Sanic with TLS enabled is as simple as passing it the file paths... ```sh sanic path.to.server:app --cert=/path/to/bundle.crt --key=/path/to/privkey.pem ``` ... or the a directory containing `fullchain.pem` and `privkey.pem` ```sh sanic path.to.server:app --tls=/path/to/certs ``` **Even better**, while you are developing, let Sanic handle setting up local TLS certificates so you can access your site over TLS at [https://localhost:8443](https://localhost:8443) ```sh sanic path.to.server:app --dev --auto-tls ``` .. tab:: Websockets Up and running with websockets in no time using the [websockets](https://websockets.readthedocs.io) package. ```python from sanic import Request, Websocket @app.websocket("/feed") async def feed(request: Request, ws: Websocket): async for msg in ws: await ws.send(msg) ``` .. tab:: Static files Serving static files is of course intuitive and easy. Just name an endpoint and either a file or directory that should be served. ```python app.static("/", "/path/to/index.html") app.static("/uploads/", "/path/to/uploads/") ``` Moreover, serving a directory has two additional features: automatically serving an index, and automatically serving a file browser. Sanic can automatically serve `index.html` (or any other named file) as an index page in a directory or its subdirectories. ```python app.static( "/uploads/", "/path/to/uploads/", index="index.html" ) ``` And/or, setup Sanic to display a file browser. ![image](/assets/images/directory-view.png) ```python app.static( "/uploads/", "/path/to/uploads/", directory_view=True ) ``` .. tab:: Lifecycle Beginning or ending a route with functionality is as simple as adding a decorator. ```python @app.on_request async def add_key(request): request.ctx.foo = "bar" @app.on_response async def custom_banner(request, response): response.headers["X-Foo"] = request.ctx.foo ``` Same with server events. ```python @app.before_server_start async def setup_db(app): app.ctx.db_pool = await db_setup() @app.after_server_stop async def setup_db(app): await app.ctx.db_pool.shutdown() ``` But, Sanic also allows you to tie into a bunch of built-in events (called signals), or create and dispatch your own. ```python @app.signal("http.lifecycle.complete") # built-in async def my_signal_handler(conn_info): print("Connection has been closed") @app.signal("something.happened.ohmy") # custom async def my_signal_handler(): print("something happened") await app.dispatch("something.happened.ohmy") ``` .. tab:: Smart error handling Raising errors will intuitively result in proper HTTP errors: ```python raise sanic.exceptions.NotFound # Automatically responds with HTTP 404 ``` Or, make your own: ```python from sanic.exceptions import SanicException class TeapotError(SanicException): status_code = 418 message = "Sorry, I cannot brew coffee" raise TeapotError ``` And, when an error does happen, Sanic's beautiful DEV mode error page will help you drill down to the bug quickly. ![image](../assets/images/error-div-by-zero.png) Regardless, Sanic comes with an algorithm that attempts to respond with HTML, JSON, or text-based errors as appropriate. Don't worry, it is super easy to setup and customize your error handling to your exact needs. .. tab:: App Inspector Check in on your live, running applications (whether local or remote). ```sh sanic inspect ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Sanic │ │ Inspecting @ http://localhost:6457 │ ├───────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────┤ │ │ mode: production, single worker │ │ ▄███ █████ ██ │ server: unknown │ │ ██ │ python: 3.10.9 │ │ ▀███████ ███▄ │ platform: SomeOS-9.8.7 │ ██ │ packages: sanic==22.12.0, sanic-routing==22.8.0, sanic-testing==22.12.0, sanic-ext==22.12.0 │ │ ████ ████████▀ │ │ │ │ │ │ Build Fast. Run Fast. │ │ └───────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────┘ Sanic-Main pid: 999996 Sanic-Server-0-0 server: True state: ACKED pid: 999997 start_at: 2023-01-31T12:34:56.00000+00:00 starts: 1 Sanic-Inspector-0 server: False state: STARTED pid: 999998 start_at: 2023-01-31T12:34:56.00000+00:00 starts: 1 ``` And, issue commands like `reload`, `shutdown`, `scale`... ```sh sanic inspect scale 4 ``` ... or even create your own! ```sh sanic inspect migrations ``` .. tab:: Extendable In addition to the tools that Sanic comes with, the officially supported [Sanic Extensions](./plugins/sanic-ext/getting-started.md) provides lots of extra goodies to make development easier. - **CORS** protection - Template rendering with **Jinja** - **Dependency injection** into route handlers - OpenAPI documentation with **Redoc** and/or **Swagger** - Predefined, endpoint-specific response **serializers** - Request query arguments and body input **validation** - **Auto create** HEAD, OPTIONS, and TRACE endpoints - Live **health monitor** .. tab:: Developer Experience Sanic is **built for building**. From the moment it is installed, Sanic includes helpful tools to help the developer get their job done. - **One server** - Develop locally in DEV mode on the same server that will run your PRODUCTION application - **Auto reload** - Reload running applications every time you save a Python file, but also auto-reload **on any arbitrary directory** like HTML template directories - **Debugging tools** - Super helpful (and beautiful) [error pages](/en/guide/best-practices/exceptions) that help you traverse the trace stack easily - **Auto TLS** - Running a localhost website with `https` can be difficult, [Sanic makes it easy](/en/guide/how-to/tls.md) - **Streamlined testing** - Built-in testing capabilities, making it easier for developers to create and run tests, ensuring the quality and reliability of their services - **Modern Python** - Thoughtful use of type hints to help the developer IDE experience ================================================ FILE: guide/content/en/migrate.py ================================================ import re from pathlib import Path from textwrap import indent from emoji import EMOJI COLUMN_PATTERN = re.compile(r"---:1\s*(.*?)\s*:--:1\s*(.*?)\s*:---", re.DOTALL) PYTHON_HIGHLIGHT_PATTERN = re.compile(r"```python\{+.*?\}", re.DOTALL) BASH_HIGHLIGHT_PATTERN = re.compile(r"```bash\{+.*?\}", re.DOTALL) NOTIFICATION_PATTERN = re.compile( r":::\s*(\w+)\s*(.*?)\n([\s\S]*?):::", re.MULTILINE ) EMOJI_PATTERN = re.compile(r":(\w+):") CURRENT_DIR = Path(__file__).parent SOURCE_DIR = ( CURRENT_DIR.parent.parent.parent.parent / "sanic-guide" / "src" / "en" ) def convert_columns(content: str): def replacer(match: re.Match): left, right = match.groups() left = indent(left.strip(), " " * 4) right = indent(right.strip(), " " * 4) return f""" .. column:: {left} .. column:: {right} """ return COLUMN_PATTERN.sub(replacer, content) def cleanup_highlights(content: str): content = PYTHON_HIGHLIGHT_PATTERN.sub("```python", content) content = BASH_HIGHLIGHT_PATTERN.sub("```bash", content) return content def convert_notifications(content: str): def replacer(match: re.Match): type_, title, body = match.groups() body = indent(body.strip(), " " * 4) return f""" .. {type_}:: {title} {body} """ return NOTIFICATION_PATTERN.sub(replacer, content) def convert_emoji(content: str): def replace(match): return EMOJI.get(match.group(1), match.group(0)) return EMOJI_PATTERN.sub(replace, content) def convert_code_blocks(content: str): for src, dest in ( ("yml", "yaml"), ("caddy", ""), ("systemd", ""), ("mermaid", "\nmermaid"), ): content = content.replace(f"```{src}", f"```{dest}") return content def cleanup_multibreaks(content: str): return content.replace("\n\n\n", "\n\n") def convert(content: str): content = convert_emoji(content) content = convert_columns(content) content = cleanup_highlights(content) content = convert_code_blocks(content) content = convert_notifications(content) content = cleanup_multibreaks(content) return content def convert_file(src: Path, dest: Path): short_src = src.relative_to(SOURCE_DIR) short_dest = dest.relative_to(CURRENT_DIR) print(f"Converting {short_src} -> {short_dest}") content = src.read_text() new_content = convert(content) dest.parent.mkdir(parents=True, exist_ok=True) dest.touch() dest.write_text(new_content) def translate_path(source_dir: Path, source_path: Path, dest_dir: Path): rel_path = source_path.relative_to(source_dir) dest_path = dest_dir / rel_path return dest_path def main(): print(f"Source: {SOURCE_DIR}") for path in SOURCE_DIR.glob("**/*.md"): if path.name in ("index.md", "README.md"): continue dest_path = translate_path(SOURCE_DIR, path, CURRENT_DIR) convert_file(path, dest_path) if __name__ == "__main__": main() ================================================ FILE: guide/content/en/organization/code-of-conduct.md ================================================ # Contributor Covenant Code of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. ## Our Standards Examples of behavior that contributes to creating a positive environment include: * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences * Gracefully accepting constructive criticism * Focusing on what is best for the community * Showing empathy towards other community members Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or electronic address, without explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at adam@sanicframework.org. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] [homepage]: http://contributor-covenant.org [version]: http://contributor-covenant.org/version/1/4/ ================================================ FILE: guide/content/en/organization/contributing.md ================================================ # Contributing Thank you for your interest! Sanic is always looking for contributors. If you don't feel comfortable contributing code, adding docstrings to the source files, or helping with the [Sanic User Guide](https://github.com/sanic-org/sanic-guide) by providing documentation or implementation examples would be appreciated! We are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, sexual orientation, disability, ethnicity, religion, or similar personal characteristic. Our [code of conduct](https://github.com/sanic-org/sanic/blob/master/CONDUCT.md) sets the standards for behavior. ## Installation To develop on Sanic (and mainly to just run the tests) it is highly recommend to install from sources. So assume you have already cloned the repo and are in the working directory with a virtual environment already set up, then run: ```sh pip install -e ".[dev]" ``` ## Dependency Changes `Sanic` doesn't use `requirements*.txt` files to manage any kind of dependencies related to it in order to simplify the effort required in managing the dependencies. Please make sure you have read and understood the following section of the document that explains the way `sanic` manages dependencies inside the `setup.py` file. | Dependency Type | Usage | Installation | | ------------------------------- | ------------------------------------------------- | ---------------------------- | | requirements | Bare minimum dependencies required for sanic to function | `pip3 install -e .` | | tests_require / extras_require['test'] | Dependencies required to run the Unit Tests for `sanic` | `pip3 install -e '.[test]'` | | extras_require['dev'] | Additional Development requirements to add contributing | `pip3 install -e '.[dev]'` | | extras_require['docs'] | Dependencies required to enable building and enhancing sanic documentation | `pip3 install -e '.[docs]'` | ## Running all tests To run the tests for Sanic it is recommended to use tox like so: ```sh tox ``` See it's that simple! `tox.ini` contains different environments. Running `tox` without any arguments will run all unittests, perform lint and other checks. ## Run unittests `tox` environment -> `[testenv]` To execute only unittests, run `tox` with environment like so: ```sh tox -e py37 -v -- tests/test_config.py # or tox -e py310 -v -- tests/test_config.py ``` ## Run lint checks `tox` environment -> `[testenv:lint]` Permform `flake8`\ , `black` and `isort` checks. ```sh tox -e lint ``` ## Run type annotation checks `tox` environment -> `[testenv:type-checking]` Permform `mypy` checks. ```sh tox -e type-checking ``` ## Run other checks `tox` environment -> `[testenv:check]` Perform other checks. ```sh tox -e check ``` ## Run Static Analysis `tox` environment -> `[testenv:security]` Perform static analysis security scan ```sh tox -e security ``` ## Run Documentation sanity check `tox` environment -> `[testenv:docs]` Perform sanity check on documentation ```sh tox -e docs ``` ## Code Style To maintain the code consistency, Sanic uses the following tools: 1. [isort](https://github.com/timothycrosley/isort) 2. [black](https://github.com/python/black) 3. [flake8](https://github.com/PyCQA/flake8) 4. [slotscheck](https://github.com/ariebovenberg/slotscheck) ### isort `isort` sorts Python imports. It divides imports into three categories sorted each in alphabetical order: 1. built-in 2. third-party 3. project-specific ### black `black` is a Python code formatter. ### flake8 `flake8` is a Python style guide that wraps the following tools into one: 1. PyFlakes 2. pycodestyle 3. Ned Batchelder's McCabe script ### slotscheck `slotscheck` ensures that there are no problems with `__slots__` (e.g., overlaps, or missing slots in base classes). `isort`, `black`, `flake8`, and `slotscheck` checks are performed during `tox` lint checks. The **easiest** way to make your code conform is to run the following before committing: ```bash make pretty ``` Refer to [tox documentation](https://tox.readthedocs.io/en/latest/index.html) for more details. ## Pull requests So the pull request approval rules are pretty simple: 1. All pull requests must pass unit tests. 2. All pull requests must be reviewed and approved by at least one current member of the Core Developer team. 3. All pull requests must pass flake8 checks. 4. All pull requests must match `isort` and `black` requirements. 5. All pull requests must be **PROPERLY** type annotated, unless exemption is given. 6. All pull requests must be consistent with the existing code. 7. If you decide to remove/change anything from any common interface a deprecation message should accompany it in accordance with our [deprecation policy](https://sanicframework.org/en/guide/project/policies.html#deprecation). 8. If you implement a new feature you should have at least one unit test to accompany it. 9. An example must be one of the following: * Example of how to use Sanic * Example of how to use Sanic extensions * Example of how to use Sanic and asynchronous library ## Documentation _Check back. We are reworking our documentation so this will change._ ================================================ FILE: guide/content/en/organization/policies.md ================================================ # Policies ## Versioning Sanic uses [calendar versioning](https://calver.org/), aka "calver". To be more specific, the pattern follows: ``` YY.MM.MICRO ``` Generally, versions are referred to in their ``YY.MM`` form. The `MICRO` number indicates an incremental patch version, starting at `0`. ## Reporting a Vulnerability If you discover a security vulnerability, we ask that you **do not** create an issue on GitHub. Instead, please [send a message to the core-devs](https://community.sanicframework.org/g/core-devs) on the community forums. Once logged in, you can send a message to the core-devs by clicking the message button. Alternatively, you can send a private message to Adam Hopkins on Discord. Find him on the [Sanic discord server](https://discord.gg/FARQzAEMAA). This will help to not publicize the issue until the team can address it and resolve it. ## Release Schedule There are four (4) scheduled releases per year: March, June, September, and December. Therefore, there are four (4) released versions per year: `YY.3`, `YY.6`, `YY.9`, and `YY.12`. This release schedule provides: - a predictable release cadence, - relatively short development windows allowing features to be regularly released, - controlled [deprecations](#deprecation), and - consistent stability with a yearly LTS. We also use the yearly release cycle in conjunction with our governance model, covered by the [S.C.O.P.E.](./scope.md) ### Long term support v Interim releases Sanic releases a long term support release (aka "LTS") once a year in December. The LTS releases receive bug fixes and security updates for **24 months**. Interim releases throughout the year occur every three months, and are supported until the subsequent release. | Version | Release | LTS | Supported | |---------|------------|---------------|-----------------| | 24.12 | 2024-12-31 | until 2026-12 | ✅ | | 24.6 | 2024-06-30 | | ⚪ | | 23.12 | 2023-12-31 | until 2025-12 | ☑️ | | 23.6 | 2023-07-25 | | ⚪ | | 23.3 | 2023-03-26 | | ⚪ | | 22.12 | 2022-12-27 | | ☑️ | | 22.9 | 2022-09-29 | | ⚪ | | 22.6 | 2022-06-30 | | ⚪ | | 22.3 | 2022-03-31 | | ⚪ | | 21.12 | 2021-12-26 | | ⚪ | | 21.9 | 2021-09-30 | | ⚪ | | 21.6 | 2021-06-27 | | ⚪ | | 21.3 | 2021-03-21 | | ⚪ | | 20.12 | 2020-12-29 | | ⚪ | | 20.9 | 2020-09-30 | | ⚪ | | 20.6 | 2020-06-28 | | ⚪ | | 20.3 | 2020-05-14 | | ⚪ | | 19.12 | 2019-12-27 | | ⚪ | | 19.9 | 2019-10-12 | | ⚪ | | 19.6 | 2019-06-21 | | ⚪ | | 19.3 | 2019-03-23 | | ⚪ | | 18.12 | 2018-12-27 | | ⚪ | | 0.8.3 | 2018-09-13 | | ⚪ | | 0.7.0 | 2017-12-06 | | ⚪ | | 0.6.0 | 2017-08-03 | | ⚪ | | 0.5.4 | 2017-05-09 | | ⚪ | | 0.4.1 | 2017-02-28 | | ⚪ | | 0.3.1 | 2017-02-09 | | ⚪ | | 0.2.0 | 2017-01-14 | | ⚪ | | 0.1.9 | 2016-12-25 | | ⚪ | | 0.1.0 | 2016-10-16 | | ⚪ | ☑️ = security fixes ✅ = full support ⚪ = no support ## Deprecation Before a feature is deprecated, or breaking changes are introduced into the API, it shall be publicized and shall appear with deprecation warnings through two release cycles. No deprecations shall be made in an LTS release. Breaking changes or feature removal may happen outside of these guidelines when absolutely warranted. These circumstances should be rare. For example, it might happen when no alternative is available to curtail a major security issue. ================================================ FILE: guide/content/en/organization/scope.md ================================================ # Sanic Community Organization Policy E-manual (SCOPE) .. attrs:: :class: is-size-7 _December 2019, version 1_ ## Goals To create a sustainable, community-driven organization around the Sanic projects that promote: (1) stability and predictability, (2) quick iteration and enhancement cycles, (3) engagement from outside contributors, (4) overall reliable software, and (5) a safe, rewarding environment for the community members. ## Overview This Policy is the governance model for the Sanic Community Organization (“SCO”). The SCO is a meritocratic, consensus-based community organization responsible for all projects adopted by it. Anyone with an interest in one of the projects can join the community, contribute to the community or projects, and participate in the decision making process. This document describes how that participation takes place and how to set about earning merit within the project community. ## Structure The SCO has multiple **projects**. Each project is represented by a single GitHub repository under the Sanic community umbrella. These projects are used by **users**, developed by **contributors**, governed by **core developers**, released by **release managers**, and ultimately overseen by a **steering council**. If this sounds similar to the Python project and PEP 8016 that is because it is intentionally designed that way. ## Roles and responsibilities ### Users Users are community members who have a need for the projects. They are the developers and personnel that download and install the packages. Users are the **most important** members of the community and without them the projects would have no purpose. Anyone can be a user and the licenses adopted by the projects shall be appropriate open source licenses. _The SCO asks its users to participate in the project and community as much as possible._ User contributions enable the project team to ensure that they are satisfying the needs of those users. Common user contributions include (but are not limited to): * evangelizing about the project (e.g. a link on a website and word-of-mouth awareness raising) * informing developers of strengths and weaknesses from a new user perspective * providing moral support (a ‘thank you’ goes a long way) * providing financial support (the software is open source, but its developers need to eat) Users who continue to engage with the SCO, its projects, and its community will often become more and more involved. Such users may find themselves becoming contributors, as described in the next section. ### Contributors Contributors are community members who contribute in concrete ways to one or more of the projects. Anyone can become a contributor and contributions can take many forms. Contributions and requirements are governed by each project separately by a contribution policy. There is **no expectation** of commitment to the project, **no specific skill requirements** and **no selection process**. In addition to their actions as users, contributors may also find themselves doing one or more of the following: * supporting new users (existing users are often the best people to support new users) * reporting bugs * identifying requirements * providing graphics and web design * Programming * example use cases * assisting with project infrastructure * writing documentation * fixing bugs * adding features * providing constructive opinions and engaging in community discourse Contributors engage with the projects through GitHub and the Community Forums. They submit changes to the projects itself via pull requests, which will be considered for inclusion in the project by the community at large. The Community Forums are the most appropriate place to ask for help when making that first contribution. Indeed one of the most important roles of a contributor may be to **simply engage in the community conversation**. Most decisions about the direction of a project are made by consensus. This is discussed in more detail below. In general, however, it is helpful for the health and direction of the projects for the contributors to **speak freely** (within the confines of the code of conduct) and **express their opinions and experiences** to help drive the consensus building. As contributors gain experience and familiarity with a project, their profile within, and commitment to, the community will increase. At some stage, they may find themselves being nominated for a core developer team. ### Core Developer Each project under the SCO umbrella has its own team of core developers. They are the people in charge of that project. _What is a core developer?_ Core developers are community members who have shown that they are committed to the continued development of the project through ongoing engagement with the community. Being a core developer allows contributors to more easily carry on with their project related activities by giving them direct access to the project’s resources. They can make changes directly to the project repository without having to submit changes via pull requests from a fork. This does not mean that a core developer is free to do what they want. In fact, core developers have no more direct authority over the final release of a package than do contributors. While this honor does indicate a valued member of the community who has demonstrated a healthy respect for the project’s aims and objectives, their work continues to be reviewed by the community before acceptance in an official release. _What can a core developer do on a project?_ Each project might define this role slightly differently. However, the general usage of this designation is that an individual has risen to a level of trust within the community such that they now are given some control. This comes in the form of push rights to non-protected branches, and the ability to have a voice in the approval of pull requests. The projects employ various communication mechanisms to ensure that all contributions are reviewed by the community as a whole. This includes tools provided by GitHub, as well as the Community Forums. By the time a contributor is invited to become a core developer, they should be familiar with the various tools and workflows as a user and then as a contributor. _How to become a core developer?_ Anyone can become a core developer; there are no special requirements, other than to have shown a willingness and ability to positively participate in the project as a team player. Typically, a potential core developer will need to show that they have an understanding of the project, its objectives and its strategy. They will also have provided valuable contributions to the project over a period of time. However, there is **no technical or other skill** requirement for eligibility. New core developers can be **nominated by any existing core developer** at any time. At least twice a year (April and October) there will be a ballot process run by the Steering Council. Voting should be done by secret ballot. Each existing core developer for that project receives a number of votes equivalent to the number of nominees on the ballot. For example, if there are four nominees, then each existing core developer has four votes. The core developer may cast those votes however they choose, but may not vote for a single nominee more than once. A nominee must receive two-thirds approval from the number of cast ballots (not the number of eligible ballots). Once accepted by the core developers, it is the responsibility of the Steering Council to approve and finalize the nomination. The Steering Council does not have the right to determine whether a nominee is meritorious enough to receive the core developer title. However, they do retain the right to override a vote in cases where the health of the community would so require. Once the vote has been held, the aggregated voting results are published on the Community Forums. The nominee is entitled to request an explanation of any override against them. A nominee that fails to be admitted as a core developer may be nominated again in the future. It is important to recognize that being a core developer is a privilege, not a right. That privilege must be earned and once earned it can be removed by the Steering Council (see next section) in extreme circumstances. However, under normal circumstances the core developer title exists for as long as the individual wishes to continue engaging with the project and community. A committer who shows an above-average level of contribution to the project, particularly with respect to its strategic direction and long-term health, may be nominated to become a member of the Steering Council, or a Release Manager. This role is described below. _What are the rights and responsibilities of core developers?_ As discussed, the majority of decisions to be made are by consensus building. In certain circumstances where an issue has become more contentious, or a major decision needs to be made, the Release Manager or Steering Council may decide (or be required) to implement the RFC process, which is outlined in more detail below. It is also incumbent upon core developers to have a voice in the governance of the community. All core developers for all of the projects have the ability to be nominated to be on the Steering Council and vote in their elections. This Policy (the “SCOPE”) may only be changed under the authority of two-thirds of active core developers, except that in the first six (6) months after adoption, the core developers reserve the right to make changes under the authority of a simple majority of active core developers. _What if a core developer becomes inactive?_ It is hoped that all core developers participate and remain active on a regular basis in their projects. However, it is also understood that such commitments may not be realistic or possible from time to time. Therefore, the Steering Council has the duty to encourage participation and the responsibility to place core developers into an inactive status if they are no longer willing or capable to participate. The main purpose of this is **not to punish** a person for behavior, but to help the development process to continue for those that do remain active. To this end, a core developer that becomes “inactive” shall not have commit rights to a repository, and shall not participate in any votes. To be eligible to vote in an election, a core developer **must have been active** at the time of the previous scheduled project release. Inactive members may ask the Steering Council to reinstate their status at any time, and upon such request the Steering Council shall make the core developer active again. Individuals that know they will be unable to maintain their active status for a period are asked to be in communication with the Steering Council and declare themselves inactive if necessary. An “active” core developer is an individual that has participated in a meaningful way during the previous six months. Any further definition is within the discretion of the Steering Council. ### Release Manager Core developers shall have access only to make commits and merges on non-protected branches. The “master” branch and other protected branches are controlled by the release management team for that project. Release managers shall be elected from the core development team by the core development team, and shall serve for a full release cycle. Each core developer team may decide how many release managers to have for each release cycle. It is highly encouraged that there be at least two release managers for a release cycle to help divide the responsibilities and not force too much effort upon a single person. However, there also should not be so many managers that their efforts are impeded. The main responsibilities of the release management team include: * push the development cycle forward by monitoring and facilitating technical discussions * establish a release calendar and perform actions required to release packages * approve pull requests to the master branch and other protected branches * merge pull requests to the master branch and other protected branches The release managers **do not have the authority to veto or withhold a merge** of a pull request that otherwise meets contribution criteria and has been accepted by the community. It is not their responsibility to decide what should be developed, but rather that the decisions of the community are carried out and that the project is being moved forward. From time to time, a decision may need to be made that cannot be achieved through consensus. In that case, the release managers have the authority to call upon the removal of the decision to the RFC process. This should not occur regularly (unless required as discussed below), and its use should be discouraged in favor of the more communal consensus building strategy. Since not all projects have the same requirements, the specifics governing release managers on a project shall be set forth in an Appendix to this Policy, or in the project’s contribution guidelines. If necessary, the Steering Council has the right to remove a release manager that is derelict in their duties, or for other good cause. ### Steering Council The Steering Council is the governing body consisting of those individuals identified as the “project owner” and having control of the resources and assets of the SCO. Their ultimate goal is to ensure the smooth operation of the projects by removing impediments, and assisting the members as needed. It is expected that they will be regular voices in the community. _What can the Steering Council do?_ The members of the Steering Council **do not individually have any more authority than any other core developer**, and shall not have any additional rights to make decisions, commits, merges, or the like on a project. However, as a body, the Steering Council has the following capacity: * accept, remand, and reject all RFCs * enforce the community code of conduct * administer community assets such as repositories, servers, forums, integration services, and the like (or, to delegate such authority to someone else) * place core developers into inactive status where appropriate take any other enforcement measures afforded to it in this Policy, including, in extreme cases, removing core developers * adopt or remove projects from the community umbrella It is highly encouraged that the Steering Council delegate its authority as much as possible, and where appropriate, to other willing community members. The Steering Council **does not have the authority** to change this Policy. _How many members are on the Steering Council?_ Four. While it seems like a committee with four votes may potentially end in a deadlock with no way to break a majority vote, the Steering Council is discouraged from voting as much as possible. Instead, it should try to work by consensus, and requires three consenting votes when it is necessary to vote on a matter. _How long do members serve on the Steering Council?_ A single term shall be for two calendar years starting in January. Terms shall be staggered so that each year there are two members continuing from the previous year’s council. Therefore, the inaugural vote shall have two positions available for a two year term, and two positions available for a one year term. There are no limits to the number of terms that can be served, and it is possible for an individual to serve consecutive terms. _Who runs the Steering Council?_ After the Steering Council is elected, the group shall collectively decide upon one person to act as the Chair. The Chair does not have any additional rights or authority over any other member of the Steering Council. The role of the Chair is merely as a coordinator and facilitator. The Chair is expected to ensure that all governance processes are adhered to. The position is more administrative and clerical, and is expected that the Chair sets agendas and coordinates discussion of the group. _How are council members elected?_ Once a year, **all eligible core developers** for each of the projects shall have the right to elect members to the Steering Council. Nominations shall be open from September 1 and shall close on September 30. After that, voting shall begin on October 1 and shall close on October 31. Every core developer active on the date of the June release of the Sanic Framework for that year shall be eligible to receive one vote per vacant seat on the Steering Council. For the sake of clarity, to be eligible to vote, a core developer **does not** need to be a core developer on Sanic Framework, but rather just have been active within their respective project on that date. The top recipients of votes shall be declared the winners. If there is any tie, it is highly encouraged that the tied nominees themselves resolve the dispute before a decision is made at random. In regards to the inaugural vote of the Steering Council, the top two vote-recipients shall serve for two years, and the next two vote-recipients shall assume the one-year seats. To be an eligible candidate for the Steering Council, the individual must have been a core developer in active status on at least one project for the previous twelve months. _What if there is a vacancy?_ If a vacancy on the Steering Council exists during a term, then the next highest vote-recipient in the previous election shall be offered to complete the remainder of the term. If one cannot be found this way, the Steering Council may decide the most appropriate course of action to fill the seat (whether by appointment, vote, or other means). If a member of the Steering Council becomes inactive, then that individual shall be removed from the Steering Council immediately and the seat shall become vacant. In extreme cases, the body of all core developers has the right to bring a vote to remove a member of the Steering Council for cause by a two-thirds majority of all eligible voting core developers. _How shall the Steering Council conduct its business?_ As much as possible, the Steering Council shall conduct its business and discussions in the open. Any member of the community should be allowed to enter the conversation with them. However, at times it may be necessary or appropriate for discussions to be held privately. Selecting the proper venue for conversations is part of the administrative duties of the Chair. While the specifics of how to operate are beyond the scope of the Policy, it is encouraged that the Steering Council attempt to meet at least one time per quarter in a “real-time” discussion. This could be achieved via video conferencing, live chatting, or other appropriate means. Support ------- All participants in the community are encouraged to provide support for users within the project management infrastructure. This support is provided as a way of growing the community. Those seeking support should recognize that all support activity within the project is voluntary and is therefore provided as and when time allows. A user requiring guaranteed response times or results should therefore seek to purchase a support contract from a community member. However, for those willing to engage with the project on its own terms, and willing to help support other users, the community support channels are ideal. Decision making process ----------------------- Decisions about the future of the projects are made through discussion with all members of the community, from the newest user to the most experienced member. Everyone has a voice. All non-sensitive project management discussion takes place on the community forums, or other designated channels. Occasionally, sensitive discussions may occur in private. In order to ensure that the project is not bogged down by endless discussion and continual voting, the project operates a policy of **lazy consensus**. This allows the majority of decisions to be made without resorting to a formal vote. For any **major decision** (as defined below), there is a separate Request for Comment (RFC) process. ### Technical decisions Pull requests and technical decisions should generally fall into the following categories. * **Routine**: Documentation fixes, code changes that are for cleanup or additional testing. No functionality changes. * **Minor**: Changes to the code base that either fix a bug, or introduce a trivial feature. No breaking changes. * **Major**: Any change to the code base that breaks or deprecates existing API, alters operation in a non-trivial manner, or adds a significant feature. It is generally the responsibility of the release managers to make sure that changes to the repositories receive the proper authorization before merge. The release managers retain the authority to individually review and accept routine decisions that meet standards for code quality without additional input. ### Lazy consensus Decision making (whether by the community or Steering Council) typically involves the following steps: * proposal * discussion * vote (if consensus is not reached through discussion) * decision Any community member can make a proposal for consideration by the community. In order to initiate a discussion about a new idea, they should post a message on the appropriate channel on the Community forums, or submit a pull request implementing the idea on GitHub. This will prompt a review and, if necessary, a discussion of the idea. The goal of this review and discussion is to gain approval for the contribution. Since most people in the project community have a shared vision, there is often little need for discussion in order to reach consensus. In general, as long as nobody explicitly opposes a proposal or patch, it is recognized as having the support of the community. This is called lazy consensus; that is, those who have not stated their opinion explicitly have implicitly agreed to the implementation of the proposal. Lazy consensus is a very important concept within the SCO. It is this process that allows a large group of people to efficiently reach consensus, as someone with no objections to a proposal need not spend time stating their position, and others need not spend time reading such messages. For lazy consensus to be effective, it is necessary to allow an appropriate amount of time before assuming that there are no objections to the proposal. This is somewhat dependent upon the circumstances, but it is generally assumed that 72 hours is reasonable. This requirement ensures that everyone is given enough time to read, digest and respond to the proposal. This time period is chosen so as to be as inclusive as possible of all participants, regardless of their location and time commitments. The facilitators of discussion (whether it be the Chair or the Release Managers, where applicable) shall be charged with determining the proper length of time for such consensus to be reached. As discussed above regarding so-called routine decisions, the release managers have the right to make decisions within a shorter period of time. In such cases, lazy consensus shall be implied. ### Request for Comment (RFC) The Steering Council shall be in charge of overseeing the RFC process. It shall be a process that remains open to debate to all members of the community, and shall allow for ample time to consider a proposal and for members to respond and engage in meaningful discussion. The final decision is vested with the Steering Council. However, it is strongly discouraged that the Steering Council adopt a decision that is contrary to any consensus that may exist in the community. From time to time this may happen if there is a conflict between consensus and the overall project and community goals. An RFC shall be initiated by submission to the Steering Council in the public manner as set forth by the Steering Council. Debate shall continue and be facilitated by the Steering Council in general, and the Chair specifically. In circumstances that the Steering Council feels it is appropriate, the RFC process may be waived in favor of lazy consensus. ================================================ FILE: guide/content/en/plugins/sanic-ext/configuration.md ================================================ --- title: Sanic Extensions - Configuration --- # Configuration Sanic Extensions can be configured in all of the same ways that [you can configure Sanic](../../guide/running/configuration.md). That makes configuring Sanic Extensions very easy. ```python app = Sanic("MyApp") app.config.OAS_URL_PREFIX = "/apidocs" ``` However, there are a few more configuration options that should be considered. ## Manual `extend` .. column:: Even though Sanic Extensions will automatically attach to your application, you can manually choose `extend`. When you do that, you can pass all of the configuration values as a keyword arguments (lowercase). .. column:: ```python app = Sanic("MyApp") app.extend(oas_url_prefix="/apidocs") ``` .. column:: Or, alternatively they could be passed all at once as a single `dict`. .. column:: ```python app = Sanic("MyApp") app.extend(config={"oas_url_prefix": "/apidocs"}) ``` .. column:: Both of these solutions suffers from the fact that the names of the configuration settings are not discoverable by an IDE. Therefore, there is also a type annotated object that you can use. This should help the development experience. .. column:: ```python from sanic_ext import Config app = Sanic("MyApp") app.extend(config=Config(oas_url_prefix="/apidocs")) ``` ## Settings .. note:: Often, the easiest way to change these for an application (since they likely are not going to change dependent upon an environment), is to set them directly on the `app.config` object. Simply use the capitalized version of the configuration key as shown here: ```python app = Sanic("MyApp") app.config.OAS_URL_PREFIX = "/apidocs" ``` ### `cors` - **Type**: `bool` - **Default**: `True` - **Description**: Whether to enable CORS protection ### `cors_allow_headers` - **Type**: `str` - **Default**: `"*"` - **Description**: Value of the header: `access-control-allow-headers` ### `cors_always_send` - **Type**: `bool` - **Default**: `True` - **Description**: Whether to always send the header: `access-control-allow-origin` ### `cors_automatic_options` - **Type**: `bool` - **Default**: `True` - **Description**: Whether to automatically generate `OPTIONS` endpoints for routes that do *not* already have one defined ### `cors_expose_headers` - **Type**: `str` - **Default**: `""` - **Description**: Value of the header: `access-control-expose-headers` ### `cors_max_age` - **Type**: `int` - **Default**: `5` - **Description**: Value of the header: `access-control-max-age` ### `cors_methods` - **Type**: `str` - **Default**: `""` - **Description**: Value of the header: `access-control-access-control-allow-methods` ### `cors_origins` - **Type**: `str` - **Default**: `""` - **Description**: Value of the header: `access-control-allow-origin` .. warning:: Be very careful if you place `*` here. Do not do this unless you know what you are doing as it can be a security issue. ### `cors_send_wildcard` - **Type**: `bool` - **Default**: `False` - **Description**: Whether to send a wildcard origin instead of the incoming request origin ### `cors_supports_credentials` - **Type**: `bool` - **Default**: `False` - **Description**: Value of the header: `access-control-allow-credentials` ### `cors_vary_header` - **Type**: `bool` - **Default**: `True` - **Description**: Whether to add the `vary` header ### `http_all_methods` - **Type**: `bool` - **Default**: `True` - **Description**: Adds the HTTP `CONNECT` and `TRACE` methods as allowable ### `http_auto_head` - **Type**: `bool` - **Default**: `True` - **Description**: Automatically adds `HEAD` handlers to any `GET` routes ### `http_auto_options` - **Type**: `bool` - **Default**: `True` - **Description**: Automatically adds `OPTIONS` handlers to any routes without ### `http_auto_trace` - **Type**: `bool` - **Default**: `False` - **Description**: Automatically adds `TRACE` handlers to any routes without ### `oas` - **Type**: `bool` - **Default**: `True` - **Description**: Whether to enable OpenAPI specification generation ### `oas_autodoc` - **Type**: `bool` - **Default**: `True` - **Description**: Whether to automatically extract OpenAPI details from the docstring of a route function ### `oas_ignore_head` - **Type**: `bool` - **Default**: `True` - **Description**: WHen `True`, it will not add `HEAD` endpoints into the OpenAPI specification ### `oas_ignore_options` - **Type**: `bool` - **Default**: `True` - **Description**: WHen `True`, it will not add `OPTIONS` endpoints into the OpenAPI specification ### `oas_path_to_redoc_html` - **Type**: `Optional[str]` - **Default**: `None` - **Description**: Path to HTML file to override the existing Redoc HTML ### `oas_path_to_swagger_html` - **Type**: `Optional[str]` - **Default**: `None` - **Description**: Path to HTML file to override the existing Swagger HTML ### `oas_ui_default` - **Type**: `Optional[str]` - **Default**: `"redoc"` - **Description**: Which OAS documentation to serve on the bare `oas_url_prefix` endpoint; when `None` there will be no documentation at that location ### `oas_ui_redoc` - **Type**: `bool` - **Default**: `True` - **Description**: Whether to enable the Redoc UI ### `oas_ui_swagger` - **Type**: `bool` - **Default**: `True` - **Description**: Whether to enable the Swagger UI ### `oas_ui_swagger_version` - **Type**: `str` - **Default**: `"4.1.0"` - **Description**: Which Swagger version to use ### `oas_uri_to_config` - **Type**: `str` - **Default**: `"/swagger-config"` - **Description**: Path to serve the Swagger configuration ### `oas_uri_to_json` - **Type**: `str` - **Default**: `"/openapi.json"` - **Description**: Path to serve the OpenAPI JSON ### `oas_uri_to_redoc` - **Type**: `str` - **Default**: `"/redoc"` - **Description**: Path to Redoc ### `oas_uri_to_swagger` - **Type**: `str` - **Default**: `"/swagger"` - **Description**: Path to Swagger ### `oas_url_prefix` - **Type**: `str` - **Default**: `"/docs"` - **Description**: URL prefix for the Blueprint that all of the OAS documentation witll attach to ### `swagger_ui_configuration` - **Type**: `Dict[str, Any]` - **Default**: `{"apisSorter": "alpha", "operationsSorter": "alpha", "docExpansion": "full"}` - **Description**: The Swagger documentation to be served to the frontend ### `templating_enable_async` - **Type**: `bool` - **Default**: `True` - **Description**: Whether to set `enable_async` on the Jinja `Environment` ### `templating_path_to_templates` - **Type**: `Union[str, os.PathLike, Sequence[Union[str, os.PathLike]]] ` - **Default**: `templates` - **Description**: A single path, or multiple paths to where your template files are located ### `trace_excluded_headers` - **Type**: `Sequence[str]` - **Default**: `("authorization", "cookie")` - **Description**: Which headers should be suppresed from responses to `TRACE` requests ================================================ FILE: guide/content/en/plugins/sanic-ext/convenience.md ================================================ --- title: Sanic Extensions - Convenience --- # Convenience ## Fixed serializer .. column:: Often when developing an application, there will be certain routes that always return the same sort of response. When this is the case, you can predefine the return serializer and on the endpoint, and then all that needs to be returned is the content. .. column:: ```python from sanic_ext import serializer @app.get("/") @serializer(text) async def hello_world(request, name: str): if name.isnumeric(): return "hello " * int(name) return f"Hello, {name}" ``` .. column:: The `serializer` decorator also can add status codes. .. column:: ```python from sanic_ext import serializer @app.post("/") @serializer(text, status=202) async def create_something(request): ... ``` ## Custom serializer .. column:: Using the `@serializer` decorator, you can also pass your own custom functions as long as they also return a valid type (`HTTPResonse`). .. column:: ```python def message(retval, request, action, status): return json( { "request_id": str(request.id), "action": action, "message": retval, }, status=status, ) @app.post("/") @serializer(message) async def do_action(request, action: str): return "This is a message" ``` .. column:: Now, returning just a string should return a nice serialized output. .. column:: ```python $ curl localhost:8000/eat_cookies -X POST { "request_id": "ef81c45b-235c-46dd-9dbd-b550f8fa77f9", "action": "eat_cookies", "message": "This is a message" } ``` ## Request counter .. column:: Sanic Extensions comes with a subclass of `Request` that can be setup to automatically keep track of the number of requests processed per worker process. To enable this, you should pass the `CountedRequest` class to your application contructor. .. column:: ```python from sanic_ext import CountedRequest app = Sanic(..., request_class=CountedRequest) ``` .. column:: You will now have access to the number of requests served during the lifetime of the worker process. .. column:: ```python @app.get("/") async def handler(request: CountedRequest): return json({"count": request.count}) ``` If possible, the request count will also be added to the [worker state](../../guide/running/manager.md#worker-state). ![](https://user-images.githubusercontent.com/166269/190922460-43bd2cfc-f81a-443b-b84f-07b6ce475cbf.png) ================================================ FILE: guide/content/en/plugins/sanic-ext/custom.md ================================================ --- title: Sanic Extensions - Custom --- # Custom extensions It is possible to create your own custom extensions. Version 22.9 added the `Extend.register` [method](#extension-preregistration). This makes it extremely easy to add custom expensions to an application. ## Anatomy of an extension All extensions must subclass `Extension`. ### Required - `name`: By convention, the name is an all-lowercase string - `startup`: A method that runs when the extension is added ### Optional - `label`: A method that returns additional information about the extension in the MOTD - `included`: A method that returns a boolean whether the extension should be enabled or not (could be used for example to check config state) ### Example ```python from sanic import Request, Sanic, json from sanic_ext import Extend, Extension app = Sanic(__name__) app.config.MONITOR = True class AutoMonitor(Extension): name = "automonitor" def startup(self, bootstrap) -> None: if self.included(): self.app.before_server_start(self.ensure_monitor_set) self.app.on_request(self.monitor) @staticmethod async def monitor(request: Request): if request.route and request.route.ctx.monitor: print("....") @staticmethod async def ensure_monitor_set(app: Sanic): for route in app.router.routes: if not hasattr(route.ctx, "monitor"): route.ctx.monitor = False def label(self): has_monitor = [ route for route in self.app.router.routes if getattr(route.ctx, "monitor", None) ] return f"{len(has_monitor)} endpoint(s)" def included(self): return self.app.config.MONITOR Extend.register(AutoMonitor) @app.get("/", ctx_monitor=True) async def handler(request: Request): return json({"foo": "bar"}) ``` ## Extension preregistration .. column:: `Extend.register` simplifies the addition of custom extensions. .. column:: ```python from sanic_ext import Extend, Extension class MyCustomExtension(Extension): ... Extend.register(MyCustomExtension()) ``` *Added in v22.9* ================================================ FILE: guide/content/en/plugins/sanic-ext/getting-started.md ================================================ --- title: Sanic Extensions - Getting Started --- # Getting Started Sanic Extensions is an *officially supported* plugin developed, and maintained by the SCO. The primary goal of this project is to add additional features to help Web API and Web application development easier. ## Features - CORS protection - Template rendering with Jinja - Dependency injection into route handlers - OpenAPI documentation with Redoc and/or Swagger - Predefined, endpoint-specific response serializers - Request query arguments and body input validation - Auto create `HEAD`, `OPTIONS`, and `TRACE` endpoints ## Minimum requirements - **Python**: 3.8+ - **Sanic**: 21.9+ ## Install The best method is to just install Sanic Extensions along with Sanic itself: ```bash pip install sanic[ext] ``` You can of course also just install it by itself. ```bash pip install sanic-ext ``` ## Extend your application Out of the box, Sanic Extensions will enable a bunch of features for you. .. column:: To setup Sanic Extensions (v21.12+), you need to do: **nothing**. If it is installed in the environment, it is setup and ready to go. This code is the Hello, world app in the [Sanic Getting Started page](../../guide/getting-started.md) _without any changes_, but using Sanic Extensions with `sanic-ext` installed in the background. .. column:: ```python from sanic import Sanic from sanic.response import text app = Sanic("MyHelloWorldApp") @app.get("/") async def hello_world(request): return text("Hello, world.") ``` .. column:: **_OLD DEPRECATED SETUP_** In v21.9, the easiest way to get started is to instantiate it with `Extend`. If you look back at the Hello, world app in the [Sanic Getting Started page](../../guide/getting-started.md), you will see the only additions here are the two highlighted lines. .. column:: ```python from sanic import Sanic from sanic.response import text from sanic_ext import Extend app = Sanic("MyHelloWorldApp") Extend(app) @app.get("/") async def hello_world(request): return text("Hello, world.") ``` Regardless of how it is setup, you should now be able to view the OpenAPI documentation and see some of the functionality in action: [http://localhost:8000/docs](http://localhost:8000/docs). ================================================ FILE: guide/content/en/plugins/sanic-ext/health-monitor.md ================================================ --- title: Sanic Extensions - Health Monitor --- # Health monitor The health monitor requires both `sanic>=22.9` and `sanic-ext>=22.9`. You can setup Sanic Extensions to monitor the health of your worker processes. This requires that you not be in [single process mode](../../guide/running/manager.md#single-process-mode). ## Setup .. column:: Out of the box, the health monitor is disabled. You will need to opt-in and enable the endpoint if you would like to use it. .. column:: ```python app.config.HEALTH = True app.config.HEALTH_ENDPOINT = True ``` ## How does it work The monitor sets up a new background process that will periodically receive acknowledgements of liveliness from each worker process. If a worker process misses a report too many times, then the monitor will restart that one worker. ## Diagnostics endpoint .. column:: The health monitor will also enable a diagnostics endpoint that outputs the [worker state](../../guide/running/manager.md#worker-state). By default is id disabled. .. danger:: The diagnostics endpoint is not secured. If you are deploying it in a production environment, you should take steps to protect it with a proxy server if you are using one. If not, you may want to consider disabling this feature in production since it will leak details about your server state. .. column:: ``` $ curl http://localhost:8000/__health__ { 'Sanic-Main': {'pid': 99997}, 'Sanic-Server-0-0': { 'server': True, 'state': 'ACKED', 'pid': 9999, 'start_at': datetime.datetime(2022, 10, 1, 0, 0, 0, 0, tzinfo=datetime.timezone.utc), 'starts': 2, 'restart_at': datetime.datetime(2022, 10, 1, 0, 0, 12, 861332, tzinfo=datetime.timezone.utc) }, 'Sanic-Reloader-0': { 'server': False, 'state': 'STARTED', 'pid': 99998, 'start_at': datetime.datetime(2022, 10, 1, 0, 0, 0, 0, tzinfo=datetime.timezone.utc), 'starts': 1 } } ``` ## Configuration | Key | Type | Default| Description | |--|--|--|--| | HEALTH | `bool` | `False` | Whether to enable this extension. | | HEALTH_ENDPOINT | `bool` | `False` | Whether to enable the diagnostics endpoint. | | HEALTH_MAX_MISSES | `int` | `3` | The number of consecutive misses before a worker process is restarted. | | HEALTH_MISSED_THRESHHOLD | `int` | `10` | The number of seconds the monitor checks for worker process health. | | HEALTH_MONITOR | `bool` | `True` | Whether to enable the health monitor. | | HEALTH_REPORT_INTERVAL | `int` | `5` | The number of seconds between reporting each acknowledgement of liveliness. | | HEALTH_URI_TO_INFO | `str` | `""` | The URI path of the diagnostics endpoint. | | HEALTH_URL_PREFIX | `str` | `"/__health__"` | The URI prefix of the diagnostics blueprint. | ================================================ FILE: guide/content/en/plugins/sanic-ext/http/cors.md ================================================ --- title: Sanic Extensions - CORS protection --- # CORS protection Cross-Origin Resource Sharing (aka CORS) is a *huge* topic by itself. The documentation here cannot go into enough detail about *what* it is. You are highly encouraged to do some research on your own to understand the security problem presented by it, and the theory behind the solutions. [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) are a great first step. In super brief terms, CORS protection is a framework that browsers use to facilitate how and when a web page can access information from another domain. It is extremely relevant to anyone building a single-page application. Often times your frontend might be on a domain like `https://portal.myapp.com`, but it needs to access the backend from `https://api.myapp.com`. The implementation here is heavily inspired by [`sanic-cors`](https://github.com/ashleysommer/sanic-cors), which is in turn based upon [`flask-cors`](https://github.com/corydolphin/flask-cors). It is therefore very likely that you can achieve a near drop-in replacement of `sanic-cors` with `sanic-ext`. ## Basic implementation .. column:: As shown in the example in the [auto-endpoints example](methods.md#options), Sanic Extensions will automatically enable CORS protection without further action. But, it does not offer too much out of the box. At a *bare minimum*, it is **highly** recommended that you set `config.CORS_ORIGINS` to the intended origin(s) that will be accessing the application. .. column:: ```python from sanic import Sanic, text from sanic_ext import Extend app = Sanic(__name__) app.config.CORS_ORIGINS = "http://foobar.com,http://bar.com" Extend(app) @app.get("/") async def hello_world(request): return text("Hello, world.") ``` ``` $ curl localhost:8000 -X OPTIONS -i HTTP/1.1 204 No Content allow: GET,HEAD,OPTIONS access-control-allow-origin: http://foobar.com connection: keep-alive ``` ## Configuration The true power of CORS protection, however, comes into play once you start configuring it. Here is a table of all of the options. | Key | Type | Default| Description | |--|--|--|--| | `CORS_ALLOW_HEADERS` | `str` or `List[str]` | `"*"` | The list of headers that will appear in `access-control-allow-headers`. | | `CORS_ALWAYS_SEND` | `bool` | `True` | When `True`, will always set a value for `access-control-allow-origin`. When `False`, will only set it if there is an `Origin` header. | | `CORS_AUTOMATIC_OPTIONS` | `bool` | `True` | When the incoming preflight request is received, whether to automatically set values for `access-control-allow-headers`, `access-control-max-age`, and `access-control-allow-methods` headers. If `False` these values will only be set on routes that are decorated with the `@cors` decorator. | | `CORS_EXPOSE_HEADERS` | `str` or `List[str]` | `""` | Specific list of headers to be set in `access-control-expose-headers` header. | | `CORS_MAX_AGE` | `str`, `int`, `timedelta` | `0` | The maximum number of seconds the preflight response may be cached using the `access-control-max-age` header. A falsey value will cause the header to not be set. | | `CORS_METHODS` | `str` or `List[str]` | `""` | The HTTP methods that the allowed origins can access, as set on the `access-control-allow-methods` header. | | `CORS_ORIGINS` | `str`, `List[str]`, `re.Pattern` | `"*"` | The origins that are allowed to access the resource, as set on the `access-control-allow-origin` header. | | `CORS_SEND_WILDCARD` | `bool` | `False` | If `True`, will send the wildcard `*` origin instead of the `origin` request header. | | `CORS_SUPPORTS_CREDENTIALS` | `bool` | `False` | Whether to set the `access-control-allow-credentials` header. | | `CORS_VARY_HEADER` | `bool` | `True` | Whether to add `vary` header, when appropriate. | *For the sake of brevity, where the above says `List[str]` any instance of a `list`, `set`, `frozenset`, or `tuple` will be acceptable. Alternatively, if the value is a `str`, it can be a comma delimited list.* ## Route level overrides .. column:: It may sometimes be necessary to override app-wide settings for a specific route. To allow for this, you can use the `@sanic_ext.cors()` decorator to set different route-specific values. The values that can be overridden with this decorator are: - `origin` - `expose_headers` - `allow_headers` - `allow_methods` - `supports_credentials` - `max_age` .. column:: ```python from sanic_ext import cors app.config.CORS_ORIGINS = "https://foo.com" @app.get("/", host="bar.com") @cors(origin="https://bar.com") async def hello_world(request): return text("Hello, world.") ``` ================================================ FILE: guide/content/en/plugins/sanic-ext/http/methods.md ================================================ --- title: Sanic Extensions - HTTP Methods --- # HTTP Methods ## Auto-endpoints The default behavior is to automatically generate `HEAD` endpoints for all `GET` routes, and `OPTIONS` endpoints for all routes. Additionally, there is the option to automatically generate `TRACE` endpoints. However, these are not enabled by default. ### HEAD .. column:: - **Configuration**: `AUTO_HEAD` (default `True`) - **MDN**: [Read more](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/HEAD) A `HEAD` request provides the headers and an otherwise identical response to what a `GET` request would provide. However, it does not actually return the body. .. column:: ```python @app.get("/") async def hello_world(request): return text("Hello, world.") ``` Given the above route definition, Sanic Extensions will enable `HEAD` responses, as seen here. ``` $ curl localhost:8000 --head HTTP/1.1 200 OK access-control-allow-origin: * content-length: 13 connection: keep-alive content-type: text/plain; charset=utf-8 ``` ### OPTIONS .. column:: - **Configuration**: `AUTO_OPTIONS` (default `True`) - **MDN**: [Read more](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS) `OPTIONS` requests provide the recipient with details about how the client is allowed to communicate with a given endpoint. .. column:: ```python @app.get("/") async def hello_world(request): return text("Hello, world.") ``` Given the above route definition, Sanic Extensions will enable `OPTIONS` responses, as seen here. It is important to note that we also see `access-control-allow-origins` in this example. This is because the [CORS protection](cors.md) is enabled by default. ``` $ curl localhost:8000 -X OPTIONS -i HTTP/1.1 204 No Content allow: GET,HEAD,OPTIONS access-control-allow-origin: * connection: keep-alive ``` .. tip:: Even though Sanic Extensions will setup these routes for you automatically, if you decide to manually create an `@app.options` route, it will *not* be overridden. ### TRACE .. column:: - **Configuration**: `AUTO_TRACE` (default `False`) - **MDN**: [Read more](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/TRACE) By default, `TRACE` endpoints will **not** be automatically created. However, Sanic Extensions **will allow** you to create them if you wanted. This is something that is not allowed in vanilla Sanic. .. column:: ```python @app.route("/", methods=["trace"]) async def handler(request): ... ``` To enable auto-creation of these endpoints, you must first enable them when extending Sanic. ```python from sanic_ext import Extend, Config app.extend(config=Config(http_auto_trace=True)) ``` Now, assuming you have some endpoints setup, you can trace them as shown here: ``` $ curl localhost:8000 -X TRACE TRACE / HTTP/1.1 Host: localhost:9999 User-Agent: curl/7.76.1 Accept: */* ``` .. tip:: Setting up `AUTO_TRACE` can be super helpful, especially when your application is deployed behind a proxy since it will help you determine how the proxy is behaving. ## Additional method support Vanilla Sanic allows you to build endpoints with the following HTTP methods: - [GET](/en/guide/basics/routing.html#get) - [POST](/en/guide/basics/routing.html#post) - [PUT](/en/guide/basics/routing.html#put) - [HEAD](/en/guide/basics/routing.html#head) - [OPTIONS](/en/guide/basics/routing.html#options) - [PATCH](/en/guide/basics/routing.html#patch) - [DELETE](/en/guide/basics/routing.html#delete) See [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods) for more. .. column:: There are, however, two more "standard" HTTP methods: `TRACE` and `CONNECT`. Sanic Extensions will allow you to build endpoints using these methods, which would otherwise not be allowed. It is worth pointing out that this will *NOT* enable convenience methods: `@app.trace` or `@app.connect`. You need to use `@app.route` as shown in the example here. .. column:: ```python @app.route("/", methods=["trace", "connect"]) async def handler(_): return empty() ``` ================================================ FILE: guide/content/en/plugins/sanic-ext/injection.md ================================================ --- title: Sanic Extensions - Dependency Injection --- # Dependency Injection Dependency injection is a method to add arguments to a route handler based upon the defined function signature. Specifically, it looks at the **type annotations** of the arguments in the handler. This can be useful in a number of cases like: - Fetching an object based upon request headers (like the current session user) - Recasting certain objects into a specific type - Using the request object to prefetch data - Auto inject services The `Extend` instance has two basic methods on it used for dependency injection: a lower level `add_dependency`, and a higher level `dependency`. **Lower level**: `app.ext.add_dependency(...)` - `type: Type,`: some unique class that will be the type of the object - `constructor: Optional[Callable[..., Any]],` (OPTIONAL): a function that will return that type **Higher level**: `app.ext.dependency(...)` - `obj: Any`: any object that you would like injected - `name: Optional[str]`: some name that could alternately be used as a reference Let's explore some use cases here. .. warning:: If you used dependency injection prior to v21.12, the lower level API method was called `injection`. It has since been renamed to `add_dependency` and starting in v21.12 `injection` is an alias for `add_dependency`. The `injection` method has been deprecated for removal in v22.6. ## Basic implementation The simplest use case would be simply to recast a value. .. column:: This could be useful if you have a model that you want to generate based upon the matched path parameters. .. column:: ```python @dataclass class IceCream: flavor: str def __str__(self) -> str: return f"{self.flavor.title()} (Yum!)" app.ext.add_dependency(IceCream) @app.get("/") async def ice_cream(request, flavor: IceCream): return text(f"You chose: {flavor}") ``` ``` $ curl localhost:8000/chocolate You chose Chocolate (Yum!) ``` .. column:: This works by passing a keyword argument to the constructor of the `type` argument. The previous example is equivalent to this. .. column:: ```python flavor = IceCream(flavor="chocolate") ``` ## Additional constructors .. column:: Sometimes you may need to also pass a constructor. This could be a function, or perhaps even a classmethod that acts as a constructor. In this example, we are creating an injection that will call `Person.create` first. Also important to note on this example, we are actually injecting **two (2)** objects! It of course does not need to be this way, but we will inject objects based upon the function signature. .. column:: ```python @dataclass class PersonID: person_id: int @dataclass class Person: person_id: PersonID name: str age: int @classmethod async def create(cls, request: Request, person_id: int): return cls(person_id=PersonID(person_id), name="noname", age=111) app.ext.add_dependency(Person, Person.create) app.ext.add_dependency(PersonID) @app.get("/person/") async def person_details( request: Request, person_id: PersonID, person: Person ): return text(f"{person_id}\n{person}") ``` ``` $ curl localhost:8000/person/123 PersonID(person_id=123) Person(person_id=PersonID(person_id=123), name='noname', age=111) ``` When a `constructor` is passed to `ext.add_dependency` (like in this example) that will be called. If not, then the object will be created by calling the `type`. A couple of important things to note about passing a `constructor`: 1. A positional `request: Request` argument is *usually* expected. See the `Person.create` method above as an example using a `request` and [arbitrary constructors](#arbitrary-constructors) for how to use a callable that does not require a `request`. 1. All matched path parameters are injected as keyword arguments. 1. Dependencies can be chained and nested. Notice how in the previous example the `Person` dataclass has a `PersonID`? That means that `PersonID` will be called first, and that value is added to the keyword arguments when calling `Person.create`. ## Arbitrary constructors .. column:: Sometimes you may want to construct your injectable _without_ the `Request` object. This is useful if you have arbitrary classes or functions that create your objects. If the callable does have any required arguments, then they should themselves be injectable objects. This is very useful if you have services or other types of objects that should only exist for the lifetime of a single request. For example, you might use this pattern to pull a single connection from your database pool. .. column:: ```python class Alpha: ... class Beta: def __init__(self, alpha: Alpha) -> None: self.alpha = alpha app.ext.add_dependency(Alpha) app.ext.add_dependency(Beta) @app.get("/beta") async def handler(request: Request, beta: Beta): assert isinstance(beta.alpha, Alpha) ``` *Added in v22.9* ## Objects from the `Request` .. column:: Sometimes you may want to extract details from the request and preprocess them. You could, for example, cast the request JSON to a Python object, and then add some additional logic based upon DB queries. .. warning:: If you plan to use this method, you should note that the injection actually happens *before* Sanic has had a chance to read the request body. The headers should already have been consumed. So, if you do want access to the body, you will need to manually consume as seen in this example. ```python await request.receive_body() ``` This could be used in cases where you otherwise might: - use middleware to preprocess and add something to the `request.ctx` - use decorators to preprocess and inject arguments into the request handler In this example, we are using the `Request` object in the `compile_profile` constructor to run a fake DB query to generate and return a `UserProfile` object. .. column:: ```python @dataclass class User: name: str @dataclass class UserProfile: user: User age: int = field(default=0) email: str = field(default="") def __json__(self): return ujson.dumps( { "name": self.user.name, "age": self.age, "email": self.email, } ) async def fake_request_to_db(body): today = date.today() email = f'{body["name"]}@something.com'.lower() difference = today - date.fromisoformat(body["birthday"]) age = int(difference.days / 365) return UserProfile( User(body["name"]), age=age, email=email, ) async def compile_profile(request: Request): await request.receive_body() profile = await fake_request_to_db(request.json) return profile app.ext.add_dependency(UserProfile, compile_profile) @app.patch("/profile") async def update_profile(request, profile: UserProfile): return json(profile) ``` ``` $ curl localhost:8000/profile -X PATCH -d '{"name": "Alice", "birthday": "2000-01-01"}' { "name":"Alice", "age":21, "email":"alice@something.com" } ``` ## Injecting services It is a common pattern to create things like database connection pools and store them on the `app.ctx` object. This makes them available throughout your application, which is certainly a convenience. One downside, however, is that you no longer have a typed object to work with. You can use dependency injections to fix this. First we will show the concept using the lower level `add_dependency` like we have been using in the previous examples. But, there is a better way using the higher level `dependency` method. ### The lower level API using `add_dependency` .. column:: This works very similar to the [last example](#objects-from-the-request) where the goal is the extract something from the `Request` object. In this example, a database object was created on the `app.ctx` instance, and is being returned in the dependency injection constructor. .. column:: ```python class FakeConnection: async def execute(self, query: str, **arguments): return "result" @app.before_server_start async def setup_db(app, _): app.ctx.db_conn = FakeConnection() app.ext.add_dependency(FakeConnection, get_db) def get_db(request: Request): return request.app.ctx.db_conn @app.get("/") async def handler(request, conn: FakeConnection): response = await conn.execute("...") return text(response) ``` ``` $ curl localhost:8000/ result ``` ### The higher level API using `dependency` .. column:: Since we have an actual *object* that is available when adding the dependency injection, we can use the higher level `dependency` method. This will make the pattern much easier to write. This method should always be used when you want to inject something that exists throughout the lifetime of the application instance and is not request specific. It is very useful for services, third party clients, and connection pools since they are not request specific. .. column:: ```python class FakeConnection: async def execute(self, query: str, **arguments): return "result" @app.before_server_start async def setup_db(app, _): db_conn = FakeConnection() app.ext.dependency(db_conn) @app.get("/") async def handler(request, conn: FakeConnection): response = await conn.execute("...") return text(response) ``` ``` $ curl localhost:8000/ result ``` ## Generic types Be carefule when using a [generic type](https://docs.python.org/3/library/typing.html#typing.Generic). The way that Sanic's dependency injection works is by matching the entire type definition. Therefore, `Foo` is not the same as `Foo[str]`. This can be particularly tricky when trying to use the [higher-level `dependency` method](#the-higher-level-api-using-dependency) since the type is inferred. .. column:: For example, this will **NOT** work as expected since there is no definition for `Test[str]`. .. column:: ```python import typing from sanic import Sanic, text T = typing.TypeVar("T") class Test(typing.Generic[T]): test: T app = Sanic("testapp") app.ext.dependency(Test()) @app.get("/") def test(request, test: Test[str]): ... ``` .. column:: To get this example to work, you will need to add an explicit definition for the type you intend to be injected. .. column:: ```python import typing from sanic import Sanic, text T = typing.TypeVar("T") class Test(typing.Generic[T]): test: T app = Sanic("testapp") _singleton = Test() app.ext.add_dependency(Test[str], lambda: _singleton) @app.get("/") def test(request, test: Test[str]): ... ``` ## Configuration .. column:: By default, dependencies will be injected after the `http.routing.after` [signal](../../guide/advanced/signals.md#built-in-signals). Starting in v22.9, you can change this to the `http.handler.before` signal. .. column:: ```python app.config.INJECTION_SIGNAL = "http.handler.before" ``` *Added in v22.9* ================================================ FILE: guide/content/en/plugins/sanic-ext/logger.md ================================================ --- title: Sanic Extensions - Background logger --- # Background logger The background logger requires both `sanic>=22.9` and `sanic-ext>=22.9`. You can setup Sanic Extensions to log all of your messages from a background process. This requires that you not be in [single process mode](../../guide/running/manager.md#single-process-mode). Logging can sometimes be an expensive operation. By pushing all logging off to a background process, you can potentially gain some performance benefits. ## Setup .. column:: Out of the box, the background logger is disabled. You will need to opt-in if you would like to use it. .. column:: ```python app.config.LOGGING = True ``` ## How does it work When enabled, the extension will create a `multiprocessing.Queue`. It will remove all handlers on the [default Sanic loggers](../../guide/best-practices/logging.md) and replace them with a [`QueueHandler`](https://docs.python.org/3/library/logging.handlers.html#queuehandler). When a message is logged, it will be pushed into the queue by the handler, and read by the background process to the log handlers that were originally in place. This means you can still configure logging as normal and it should "just work." ## Configuration | Key | Type | Default| Description | |--|--|--|--| | LOGGING | `bool` | `False` | Whether to enable this extension. | | LOGGING_QUEUE_MAX_SIZE | `int` | `4096` | The max size of the queue before messages are rejected. | ================================================ FILE: guide/content/en/plugins/sanic-ext/openapi/advanced.md ================================================ --- title: Sanic Extensions - Advanced OAS --- # Advanced _Documentation in progress_ ## CBV ## Blueprints ## Components ================================================ FILE: guide/content/en/plugins/sanic-ext/openapi/autodoc.md ================================================ --- title: Sanic Extensions - Auto-documentation --- # Auto-documentation To make documenting endpoints easier, Sanic Extensions will use a function's docstring to populate your documentation. ## Summary and description .. column:: A function's docstring will be used to create the summary and description. As you can see from this example here, the docstring has been parsed to use the first line as the summary, and the remainder of the string as the description. .. column:: ```python @app.get("/foo") async def handler(request, something: str): """This is a simple foo handler It is helpful to know that you could also use **markdown** inside your docstrings. - one - two - three""" return text(">>>") ``` ```json "paths": { "/foo": { "get": { "summary": "This is a simple foo handler", "description": "It is helpful to know that you could also use **markdown** inside your
docstrings.

- one
- two
- three", "responses": { "default": { "description": "OK" } }, "operationId": "get_handler" } } } ``` ## Operation level YAML .. column:: You can expand upon this by adding valid OpenAPI YAML to the docstring. Simply add a line that contains `openapi:`, followed by your YAML. The `---` shown in the example is *not* necessary. It is just there to help visually identify the YAML as a distinct section of the docstring. .. column:: ```python @app.get("/foo") async def handler(request, something: str): """This is a simple foo handler Now we will add some more details openapi: --- operationId: fooDots tags: - one - two parameters: - name: limit in: query description: How many items to return at one time (max 100) required: false schema: type: integer format: int32 responses: '200': description: Just some dots """ return text("...") ``` ```json "paths": { "/foo": { "get": { "operationId": "fooDots", "summary": "This is a simple foo handler", "description": "Now we will add some more details", "tags": [ "one", "two" ], "parameters": [ { "name": "limit", "in": "query", "description": "How many items to return at one time (max 100)", "required": false, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Just some dots" } } } } } ``` .. note:: When both YAML documentation and decorators are used, it is the content from the decorators that will take priority when generating the documentation. ## Excluding docstrings .. column:: Sometimes a function may contain a docstring that is not meant to be consumed inside the documentation. **Option 1**: Globally turn off auto-documentation `app.config.OAS_AUTODOC = False` **Option 2**: Disable it for the single handler with the `@openapi.no_autodoc` decorator .. column:: ```python @app.get("/foo") @openapi.no_autodoc async def handler(request, something: str): """This is a docstring about internal info only. Do not parse it. """ return text("...") ``` ================================================ FILE: guide/content/en/plugins/sanic-ext/openapi/basics.md ================================================ --- title: Sanic Extensions - Basic OAS --- # Basics .. note:: The OpenAPI implementation in Sanic Extensions is based upon the OAS3 implementation from [`sanic-openapi`](https://github.com/sanic-org/sanic-openapi). In fact, Sanic Extensions is in a large way the successor to that project, which entered maintenance mode upon the release of Sanic Extensions. If you were previously using OAS3 with `sanic-openapi` you should have an easy path to upgrading to Sanic Extensions. Unfortunately, this project does *NOT* support the OAS2 specification. .. column:: Out of the box, Sanic Extensions provides automatically generated API documentation using the [v3.0 OpenAPI specification](https://swagger.io/specification/). There is nothing special that you need to do .. column:: ```python from sanic import Sanic app = Sanic("MyApp") # Add all of your views ``` After doing this, you will now have beautiful documentation already generated for you based upon your existing application: - [http://localhost:8000/docs](http://localhost:8000/docs) - [http://localhost:8000/docs/redoc](http://localhost:8000/docs/redoc) - [http://localhost:8000/docs/swagger](http://localhost:8000/docs/swagger) Checkout the [section on configuration](../configuration.md) to learn about changing the routes for the docs. You can also turn off one of the two UIs, and customize which UI will be available on the `/docs` route. .. column:: Using [Redoc](https://github.com/Redocly/redoc) ![Redoc](/assets/images/sanic-ext-redoc.png) .. column:: or [Swagger UI](https://github.com/swagger-api/swagger-ui) ![Swagger UI](/assets/images/sanic-ext-swagger.png) ## Changing specification metadata .. column:: If you want to change any of the metada, you should use the `describe` method. In this example `dedent` is being used with the `description` argument to make multi-line strings a little cleaner. This is not necessary, you can pass any string value here. .. column:: ```python from textwrap import dedent app.ext.openapi.describe( "Testing API", version="1.2.3", description=dedent( """ # Info This is a description. It is a good place to add some _extra_ doccumentation. **MARKDOWN** is supported. """ ), ) ``` ================================================ FILE: guide/content/en/plugins/sanic-ext/openapi/decorators.md ================================================ --- title: Sanic Extensions - OAS Decorators --- # Decorators The primary mechanism for adding content to your schema is by decorating your endpoints. If you have used `sanic-openapi` in the past, this should be familiar to you. The decorators and their arguments match closely the [OAS v3.0 specification](https://swagger.io/specification/). .. column:: All of the examples show will wrap around a route definition. When you are creating these, you should make sure that your Sanic route decorator (`@app.route`, `@app.get`, etc) is the outermost decorator. That is to say that you should put that first and then one or more of the below decorators after. .. column:: ```python from sanic_ext import openapi @app.get("/path/to/") @openapi.summary("This is a summary") @openapi.description("This is a description") async def handler(request, something: str): ... ``` .. column:: You will also see a lot of the below examples reference a model object. For the sake of simplicity, the examples will use `UserProfile` that will look like this. The point is that it can be any well-typed class. You could easily imagine this being a `dataclass` or some other kind of model object. .. column:: ```python class UserProfile: name: str age: int email: str ``` ## Definition decorator ### `@openapi.definition` The `@openapi.definition` decorator allows you to define all parts of an operations on a path at once. It is an omnibums decorator in that it has the same capabilities to create operation definitions as the rest of the decorators. Using multiple field-specific decorators or a single decorator is a style choice for you the developer. The fields are purposely permissive in accepting multiple types to make it easiest for you to define your operation. **Arguments** | Field | Type | | ------------- | --------------------------------------------------------------------------| | `body` | **dict, RequestBody, *YourModel*** | | `deprecated` | **bool** | | `description` | **str** | | `document` | **str, ExternalDocumentation** | | `exclude` | **bool** | | `operation` | **str** | | `parameter` | **str, dict, Parameter, [str], [dict], [Parameter]** | | `response` | **dict, Response, *YourModel*, [dict], [Response]** | | `summary` | **str** | | `tag` | **str, Tag, [str], [Tag]** | | `secured` | **Dict[str, Any]** | **Examples** .. column:: ```python @openapi.definition( body=RequestBody(UserProfile, required=True), summary="User profile update", tag="one", response=[Success, Response(Failure, status=400)], ) ``` .. column:: *See below examples for more examples. Any of the values for the below decorators can be used in the corresponding keyword argument.* ## Field-specific decorators All the following decorators are based on `@openapi` ### body **Arguments** | Field | Type | | ----------- | ---------------------------------- | | **content** | ***YourModel*, dict, RequestBody** | **Examples** .. column:: ```python @openapi.body(UserProfile) ``` ```python @openapi.body({"application/json": UserProfile}) ``` ```python @openapi.body(RequestBody({"application/json": UserProfile})) ``` .. column:: ```python @openapi.body({"content": UserProfile}) ``` ```python @openapi.body(RequestBody(UserProfile)) ``` ```python @openapi.body({"application/json": {"description": ...}}) ``` ### deprecated **Arguments** *None* **Examples** .. column:: ```python @openapi.deprecated() ``` .. column:: ```python @openapi.deprecated ``` ### description **Arguments** | Field | Type | | ------ | ------- | | `text` | **str** | **Examples** .. column:: ```python @openapi.description( """This is a **description**. ## You can use `markdown` - And - make - lists. """ ) ``` .. column:: ### document **Arguments** | Field | Type | | ------------- | ------- | | `url` | **str** | | `description` | **str** | **Examples** .. column:: ```python @openapi.document("http://example.com/docs") ``` .. column:: ```python @openapi.document(ExternalDocumentation("http://example.com/more")) ``` ### exclude Can be used on route definitions like all of the other decorators, or can be called on a Blueprint **Arguments** | Field | Type | Default | | ------ | ------------- | -------- | | `flag` | **bool** | **True** | | `bp` | **Blueprint** | | **Examples** .. column:: ```python @openapi.exclude() ``` .. column:: ```python openapi.exclude(bp=some_blueprint) ``` ### operation Sets the operation ID. **Arguments** | Field | Type | | ------ | ------- | | `name` | **str** | **Examples** .. column:: ```python @openapi.operation("doNothing") ``` .. column:: **Arguments** | Field | Type | Default | | ---------- | ----------------------------------------- | ----------- | | `name` | **str** | | | `schema` | ***type*** | **str** | | `location` | **"query", "header", "path" or "cookie"** | **"query"** | **Examples** .. column:: ```python @openapi.parameter("thing") ``` ```python @openapi.parameter(parameter=Parameter("foobar", deprecated=True)) ``` .. column:: ```python @openapi.parameter("Authorization", str, "header") ``` ```python @openapi.parameter("thing", required=True, allowEmptyValue=False) ``` ### response **Arguments** If using a `Response` object, you should not pass any other arguments. | Field | Type | | ------------- | ----------------------------- | | `status` | **int** | | `content` | ***type*, *YourModel*, dict** | | `description` | **str** | | `response` | **Response** | **Examples** .. column:: ```python @openapi.response(200, str, "This is endpoint returns a string") ``` ```python @openapi.response(200, {"text/plain": str}, "...") ``` ```python @openapi.response(response=Response(UserProfile, description="...")) ``` ```python @openapi.response( response=Response( { "application/json": UserProfile, }, description="...", status=201, ) ) ``` .. column:: ```python @openapi.response(200, UserProfile, "...") ``` ```python @openapi.response( 200, { "application/json": UserProfile, }, "Description...", ) ``` ### summary **Arguments** | Field | Type | | ------ | ------- | | `text` | **str** | **Examples** .. column:: ```python @openapi.summary("This is an endpoint") ``` .. column:: ### tag **Arguments** | Field | Type | | ------- | ------------ | | `*args` | **str, Tag** | **Examples** .. column:: ```python @openapi.tag("foo") ``` .. column:: ```python @openapi.tag("foo", Tag("bar")) ``` ### secured **Arguments** | Field | Type | | ----------------- | ----------------------- | | `*args, **kwargs` | **str, Dict[str, Any]** | **Examples** .. column:: ```python @openapi.secured() ``` .. column:: .. column:: ```python @openapi.secured("foo") ``` .. column:: ```python @openapi.secured("token1", "token2") ``` .. column:: ```python @openapi.secured({"my_api_key": []}) ``` .. column:: ```python @openapi.secured(my_api_key=[]) ``` Do not forget to use `add_security_scheme`. See [security](./security.md) for more details. `` ## Integration with Pydantic Pydantic models have the ability to [generate OpenAPI schema](https://pydantic-docs.helpmanual.io/usage/schema/). .. column:: To take advantage of Pydantic model schema generation, pass the output in place of the schema. .. column:: ```python from sanic import Sanic, json from sanic_ext import validate, openapi from pydantic import BaseModel, Field @openapi.component() class Item(BaseModel): name: str description: str = None price: float tax: float = None class ItemList(BaseModel): items: List[Item] app = Sanic("test") @app.get("/") @openapi.definition( body={ "application/json": ItemList.model_json_schema( ref_template="#/components/schemas/{model}" ) }, ) async def get(request): return json({}) ``` .. note:: It is important to set that `ref_template`. By default Pydantic will select a template that is not standard OAS. This will cause the schema to not be found when generating the final document. *Added in v22.9* ================================================ FILE: guide/content/en/plugins/sanic-ext/openapi/security.md ================================================ --- title: Sanic Extensions - OAS Security Schemes --- # Security Schemes To document authentication schemes, there are two steps. _Security is only available starting in v21.12.2_ ## Document the scheme .. column:: The first thing that you need to do is define one or more security schemes. The basic pattern will be to define it as: ```python add_security_scheme("", "") ``` The `type` should correspond to one of the allowed security schemes: `"apiKey"`, `"http"`, `"oauth2"`, `"openIdConnect"`. You can then pass appropriate keyword arguments as allowed by the specification. You should consult the [OpenAPI Specification](https://swagger.io/specification/) for details on what values are appropriate. .. column:: ```python app.ext.openapi.add_security_scheme("api_key", "apiKey") app.ext.openapi.add_security_scheme( "token", "http", scheme="bearer", bearer_format="JWT", ) app.ext.openapi.add_security_scheme("token2", "http") app.ext.openapi.add_security_scheme( "oldschool", "http", scheme="basic", ) app.ext.openapi.add_security_scheme( "oa2", "oauth2", flows={ "implicit": { "authorizationUrl": "http://example.com/auth", "scopes": { "on:two": "something", "three:four": "something else", "threefour": "something else...", }, } }, ) ``` ## Document the endpoints .. column:: There are two options, document _all_ endpoints. .. column:: ```python app.ext.openapi.secured() app.ext.openapi.secured("token") ``` .. column:: Or, document only specific routes. .. column:: ```python @app.route("/one") async def handler1(request): """ openapi: --- security: - foo: [] """ @app.route("/two") @openapi.secured("foo") @openapi.secured({"bar": []}) @openapi.secured(baz=[]) async def handler2(request): ... @app.route("/three") @openapi.definition(secured="foo") @openapi.definition(secured={"bar": []}) async def handler3(request): ... ``` ================================================ FILE: guide/content/en/plugins/sanic-ext/openapi/ui.md ================================================ --- title: Sanic Extensions - OAS UI --- # UI Sanic Extensions comes with both Redoc and Swagger interfaces. You have a choice to use one, or both of them. Out of the box, the following endpoints are setup for you, with the bare `/docs` displaying Redoc. - `/docs` - `/docs/openapi.json` - `/docs/redoc` - `/docs/swagger` - `/docs/openapi-config` ## Config options | **Key** | **Type** | **Default** | **Desctiption** | | -------------------------- | --------------- | ------------------- | ------------------------------------------------------------ | | `OAS_IGNORE_HEAD` | `bool` | `True` | Whether to display `HEAD` endpoints. | | `OAS_IGNORE_OPTIONS` | `bool` | `True` | Whether to display `OPTIONS` endpoints. | | `OAS_PATH_TO_REDOC_HTML` | `Optional[str]` | `None` | Path to HTML to override the default Redoc HTML | | `OAS_PATH_TO_SWAGGER_HTML` | `Optional[str]` | `None` | Path to HTML to override the default Swagger HTML | | `OAS_UI_DEFAULT` | `Optional[str]` | `"redoc"` | Can be set to `redoc` or `swagger`. Controls which UI to display on the base route. If set to `None`, then the base route will not be setup. | | `OAS_UI_REDOC` | `bool` | `True` | Whether to enable Redoc UI. | | `OAS_UI_SWAGGER` | `bool` | `True` | Whether to enable Swagger UI. | | `OAS_URI_TO_CONFIG` | `str` | `"/openapi-config"` | URI path to the OpenAPI config used by Swagger | | `OAS_URI_TO_JSON` | `str` | `"/openapi.json"` | URI path to the JSON document. | | `OAS_URI_TO_REDOC` | `str` | `"/redoc"` | URI path to Redoc. | | `OAS_URI_TO_SWAGGER` | `str` | `"/swagger"` | URI path to Swagger. | | `OAS_URL_PREFIX` | `str` | `"/docs"` | URL prefix to use for the Blueprint for OpenAPI docs. | ================================================ FILE: guide/content/en/plugins/sanic-ext/openapi.md ================================================ --- title: Sanic Extensions - OAS --- # Openapi - Adding documentation with decorators - Documenting CBV - Using autodoc - Rendering docs with redoc/swagger - Validation ================================================ FILE: guide/content/en/plugins/sanic-ext/templating/html5tagger.md ================================================ --- title: Sanic Extensions - html5tagger --- # Coming soon See [sanic-org/html5tagger on GitHub](https://github.com/sanic-org/html5tagger/) ================================================ FILE: guide/content/en/plugins/sanic-ext/templating/jinja.md ================================================ --- title: Sanic Extensions - Jinja --- # Templating Sanic Extensions can easily help you integrate templates into your route handlers. ## Dependencies **Currently, we only support [Jinja](https://github.com/pallets/jinja/).** [Read the Jinja docs first](https://jinja.palletsprojects.com/en/3.1.x/) if you are unfamiliar with how to create templates. Sanic Extensions will automatically setup and load Jinja for you if it is installed in your environment. Therefore, the only setup that you need to do is install Jinja: ``` pip install Jinja2 ``` ## Rendering a template from a file There are three (3) ways for you: 1. Using a decorator to pre-load the template file 1. Returning a rendered `HTTPResponse` object 1. Hybrid pattern that creates a `LazyResponse` Let's imagine you have a file called `./templates/foo.html`: ```html My Webpage

Hello, world!!!!

    {% for item in seq %}
  • {{ item }}
  • {% endfor %}
``` Let's see how you could render it with Sanic + Jinja. ### Option 1 - as a decorator .. column:: The benefit of this approach is that the templates can be predefined at startup time. This will mean that less fetching needs to happen in the handler, and should therefore be the fastest option. .. column:: ```python @app.get("/") @app.ext.template("foo.html") async def handler(request: Request): return {"seq": ["one", "two"]} ``` ### Option 2 - as a return object .. column:: This is meant to mimic the `text`, `json`, `html`, `file`, etc pattern of core Sanic. It will allow the most customization to the response object since it has direct control of it. Just like in other `HTTPResponse` objects, you can control headers, cookies, etc. .. column:: ```python from sanic_ext import render @app.get("/alt") async def handler(request: Request): return await render( "foo.html", context={"seq": ["three", "four"]}, status=400 ) ``` ### Option 3 - hybrid/lazy .. column:: In this approach, the template is defined up front and not inside the handler (for performance). Then, the `render` function returns a `LazyResponse` that can be used to build a proper `HTTPResponse` inside the decorator. .. column:: ```python from sanic_ext import render @app.get("/") @app.ext.template("foo.html") async def handler(request: Request): return await render(context={"seq": ["five", "six"]}, status=400) ``` ## Rendering a template from a string .. column:: Sometimes you may want to write (or generate) your template inside of Python code and _not_ read it from an HTML file. In this case, you can still use the `render` function we saw above. Just use `template_source`. .. column:: ```python from sanic_ext import render from textwrap import dedent @app.get("/") async def handler(request): template = dedent(""" My Webpage

Hello, world!!!!

    {% for item in seq %}
  • {{ item }}
  • {% endfor %}
""") return await render( template_source=template, context={"seq": ["three", "four"]}, app=app, ) ``` .. note:: In this example, we use `textwrap.dedent` to remove the whitespace in the beginning of each line of the multi-line string. It is not necessary, but just a nice touch to keep both the code and the generated source clean. ## Development and auto-reload If auto-reload is turned on, then changes to your template files should trigger a reload of the server. ## Configuration See `templating_enable_async` and `templating_path_to_templates` in [settings](./configuration.md#settings). ================================================ FILE: guide/content/en/plugins/sanic-ext/validation.md ================================================ --- title: Sanic Extensions - Validation --- # Validation One of the most commonly implemented features of a web application is user-input validation. For obvious reasons, this is not only a security issue, but also just plain good practice. You want to make sure your data conforms to expectations, and throw a `400` response when it does not. ## Implementation ### Validation with Dataclasses With the introduction of [Data Classes](https://docs.python.org/3/library/dataclasses.html), Python made it super simple to create objects that meet a defined schema. However, the standard library only supports type checking validation, **not** runtime validation. Sanic Extensions adds the ability to do runtime validations on incoming requests using `dataclasses` out of the box. If you also have either `pydantic` or `attrs` installed, you can alternatively use one of those libraries. .. column:: First, define a model. .. column:: ```python @dataclass class SearchParams: q: str ``` .. column:: Then, attach it to your route .. column:: ```python from sanic_ext import validate @app.route("/search") @validate(query=SearchParams) async def handler(request, query: SearchParams): return json(asdict(query)) ``` .. column:: You should now have validation on the incoming request. .. column:: ``` $ curl localhost:8000/search ⚠️ 400 — Bad Request ==================== Invalid request body: SearchParams. Error: missing a required argument: 'q' ``` ``` $ curl localhost:8000/search\?q=python {"q":"python"} ``` ### Validation with Pydantic You can use Pydantic models also. .. column:: First, define a model. .. column:: ```python class Person(BaseModel): name: str age: int ``` .. column:: Then, attach it to your route .. column:: ```python from sanic_ext import validate @app.post("/person") @validate(json=Person) async def handler(request, body: Person): return json(body.dict()) ``` .. column:: You should now have validation on the incoming request. .. column:: ``` $ curl localhost:8000/person -d '{"name": "Alice", "age": 21}' -X POST {"name":"Alice","age":21} ``` ### Validation with Attrs You can use Attrs also. .. column:: First, define a model. .. column:: ```python @attrs.define class Person: name: str age: int ``` .. column:: Then, attach it to your route .. column:: ```python from sanic_ext import validate @app.post("/person") @validate(json=Person) async def handler(request, body: Person): return json(attrs.asdict(body)) ``` .. column:: You should now have validation on the incoming request. .. column:: ``` $ curl localhost:8000/person -d '{"name": "Alice", "age": 21}' -X POST {"name":"Alice","age":21} ``` ## What can be validated? The `validate` decorator can be used to validate incoming user data from three places: JSON body data (`request.json`), form body data (`request.form`), and query parameters (`request.args`). .. column:: As you might expect, you can attach your model using the keyword arguments of the decorator. .. column:: ```python @validate( json=ModelA, query=ModelB, form=ModelC, ) ``` ================================================ FILE: guide/content/en/plugins/sanic-testing/README.md ================================================ ================================================ FILE: guide/content/en/plugins/sanic-testing/clients.md ================================================ --- title: Sanic Testing - Test Clients --- # Test Clients There are three different test clients available to you, each of them presents different capabilities. ## Regular sync client: `SanicTestClient` The `SanicTestClient` runs an actual version of the Sanic Server on your local network to run its tests. Each time it calls an endpoint it will spin up a version of the application and bind it to a socket on the host OS. Then, it will use `httpx` to make calls directly to that application. This is the typical way that Sanic applications are tested. .. column:: Once installing Sanic Testing, the regular `SanicTestClient` can be used without further setup. This is because Sanic does the leg work for you under the hood. .. column:: ```python app.test_client.get("/path/to/endpoint") ``` .. column:: However, you may find it desirable to instantiate the client yourself. .. column:: ```python from sanic_testing.testing import SanicTestClient test_client = SanicTestClient(app) test_client.get("/path/to/endpoint") ``` .. column:: A third option for starting the test client is to use the `TestManager`. This is a convenience object that sets up both the `SanicTestClient` and the `SanicASGITestClient`. .. column:: ```python from sanic_testing import TestManager mgr = TestManager(app) app.test_client.get("/path/to/endpoint") # or mgr.test_client.get("/path/to/endpoint") ``` You can make a request by using one of the following methods - `SanicTestClient.get` - `SanicTestClient.post` - `SanicTestClient.put` - `SanicTestClient.patch` - `SanicTestClient.delete` - `SanicTestClient.options` - `SanicTestClient.head` - `SanicTestClient.websocket` - `SanicTestClient.request` You can use these methods *almost* identically as you would when using `httpx`. Any argument that you would pass to `httpx` will be accepted, **with one caveat**: If you are using `test_client.request` and want to manually specify the HTTP method, you should use: `http_method`: ```python test_client.request("/path/to/endpoint", http_method="get") ``` ## ASGI async client: `SanicASGITestClient` Unlike the `SanicTestClient` that spins up a server on every request, the `SanicASGITestClient` does not. Instead it makes use of the `httpx` library to execute Sanic as an ASGI application to reach inside and execute the route handlers. .. column:: This test client provides all of the same methods and generally works as the `SanicTestClient`. The only difference is that you will need to add an `await` to each call: .. column:: ```python await app.test_client.get("/path/to/endpoint") ``` The `SanicASGITestClient` can be used in the exact same three ways as the `SanicTestClient`. .. note:: The `SanicASGITestClient` does not need to only be used with ASGI applications. The same way that the `SanicTestClient` does not need to only test sync endpoints. Both of these clients are capable of testing *any* Sanic application. ## Persistent service client: `ReusableClient` This client works under a similar premise as the `SanicTestClient` in that it stands up an instance of your application and makes real HTTP requests to it. However, unlike the `SanicTestClient`, when using the `ReusableClient` you control the lifecycle of the application. That means that every request **does not** start a new web server. Instead you will start the server and stop it as needed and can make multiple requests to the same running instance. .. column:: Unlike the other two clients, you **must** instantiate this client for use: .. column:: ```python from sanic_testing.reusable import ReusableClient client = ReusableClient(app) ``` .. column:: Once created, you will use the client inside of a context manager. Once outside of the scope of the manager, the server will shutdown. .. column:: ```python from sanic_testing.reusable import ReusableClient def test_multiple_endpoints_on_same_server(app): client = ReusableClient(app) with client: _, response = client.get("/path/to/1") assert response.status == 200 _, response = client.get("/path/to/2") assert response.status == 200 ``` ================================================ FILE: guide/content/en/plugins/sanic-testing/getting-started.md ================================================ --- title: Sanic Testing - Getting Started --- # Getting Started Sanic Testing is the *official* testing client for Sanic. Its primary use is to power the tests of the Sanic project itself. However, it is also meant as an easy-to-use client for getting your API tests up and running quickly. ## Minimum requirements - **Python**: 3.7+ - **Sanic**: 21.3+ Versions of Sanic older than 21.3 have this module integrated into Sanic itself as `sanic.testing`. ## Install Sanic Testing can be installed from PyPI: ``` pip install sanic-testing ``` ## Basic Usage As long as the `sanic-testing` package is in the environment, there is nothing you need to do to start using it. ### Writing a sync test In order to use the test client, you just need to access the property `test_client` on your application instance: ```python import pytest from sanic import Sanic, response @pytest.fixture def app(): sanic_app = Sanic("TestSanic") @sanic_app.get("/") def basic(request): return response.text("foo") return sanic_app def test_basic_test_client(app): request, response = app.test_client.get("/") assert request.method.lower() == "get" assert response.body == b"foo" assert response.status == 200 ``` ### Writing an async test In order to use the async test client in `pytest`, you should install the `pytest-asyncio` plugin. ``` pip install pytest-asyncio ``` You can then create an async test and use the ASGI client: ```python import pytest from sanic import Sanic, response @pytest.fixture def app(): sanic_app = Sanic(__name__) @sanic_app.get("/") def basic(request): return response.text("foo") return sanic_app @pytest.mark.asyncio async def test_basic_asgi_client(app): request, response = await app.asgi_client.get("/") assert request.method.lower() == "get" assert response.body == b"foo" assert response.status == 200 ``` ================================================ FILE: guide/content/en/release-notes/2021/v21.12.md ================================================ --- title: Version 21.12 (LTS) --- # Version 21.12 (LTS) .. toc:: ## Introduction This is the final release of the version 21 [release cycle](../../organization/policies.md#release-schedule). Version 21 will now enter long-term support and will be supported for two years until December 2023. ## What to know More details in the [Changelog](https://sanic.readthedocs.io/en/stable/sanic/changelog.html). Notable new or breaking features, and what to upgrade... ### Strict application and blueprint names In [v21.6](./v21.6.md#stricter-application-and-blueprint-names-and-deprecation) application and blueprint names were required to conform to a new set of restrictions. That change is now being enforced at startup time. Names **must**: 1. Only use alphanumeric characters (`a-zA-Z0-9`) 2. May contain a hyphen (`-`) or an underscore (`_`) 3. Must begin with a letter or underscore (`a-zA-Z_`) ### Strict application and blueprint properties The old leniency to allow directly setting properties of a `Sanic` or `Blueprint` object was deprecated and no longer allowed. You must use the `ctx` object. ```python app = Sanic("MyApp") app.ctx.db = Database() ``` ### Removals The following deprecated features no longer exist: - `sanic.exceptions.abort` - `sanic.views.CompositionView` - `sanic.response.StreamingHTTPResponse` ### Upgrade your streaming responses (if not already) The `sanic.response.stream` response method has been **deprecated** and will be removed in v22.6. If you are sill using an old school streaming response, please upgrade it. **OLD - Deprecated** ```python async def sample_streaming_fn(response): await response.write("foo,") await response.write("bar") @app.route("/") async def test(request: Request): return stream(sample_streaming_fn, content_type="text/csv") ``` **Current** ```python async def sample_streaming_fn(response): await response.write("foo,") await response.write("bar") @app.route("/") async def test(request: Request): response = await request.respond(content_type="text/csv") await response.send("foo,") await response.send("bar") ``` ### CLI overhaul and MOTD (Message of the Day) The Sanic CLI has received a fairly extensive upgrade. It adds a bunch of new features to make it on par with `app.run()`. It also includes a new MOTD display to provide quick, at-a-glance highlights about your running environment. The MOTD is TTY-aware, and therefore will be less verbose in server logs. It is mainly intended as a convenience during application development. ``` $ sanic --help usage: sanic [-h] [--version] [--factory] [-s] [-H HOST] [-p PORT] [-u UNIX] [--cert CERT] [--key KEY] [--tls DIR] [--tls-strict-host] [-w WORKERS | --fast] [--access-logs | --no-access-logs] [--debug] [-d] [-r] [-R PATH] [--motd | --no-motd] [-v] [--noisy-exceptions | --no-noisy-exceptions] module ▄███ █████ ██ ▄█▄ ██ █ █ ▄██████████ ██ █ █ █ ██ █ █ ██ ▀███████ ███▄ ▀ █ █ ██ ▄ █ ██ ██ █████████ █ ██ █ █ ▄▄ ████ ████████▀ █ █ █ ██ █ ▀██ ███████ To start running a Sanic application, provide a path to the module, where app is a Sanic() instance: $ sanic path.to.server:app Or, a path to a callable that returns a Sanic() instance: $ sanic path.to.factory:create_app --factory Or, a path to a directory to run as a simple HTTP server: $ sanic ./path/to/static --simple Required ======== Positional: module Path to your Sanic app. Example: path.to.server:app If running a Simple Server, path to directory to serve. Example: ./ Optional ======== General: -h, --help show this help message and exit --version show program's version number and exit Application: --factory Treat app as an application factory, i.e. a () -> callable -s, --simple Run Sanic as a Simple Server, and serve the contents of a directory (module arg should be a path) Socket binding: -H HOST, --host HOST Host address [default 127.0.0.1] -p PORT, --port PORT Port to serve on [default 8000] -u UNIX, --unix UNIX location of unix socket TLS certificate: --cert CERT Location of fullchain.pem, bundle.crt or equivalent --key KEY Location of privkey.pem or equivalent .key file --tls DIR TLS certificate folder with fullchain.pem and privkey.pem May be specified multiple times to choose multiple certificates --tls-strict-host Only allow clients that send an SNI matching server certs Worker: -w WORKERS, --workers WORKERS Number of worker processes [default 1] --fast Set the number of workers to max allowed --access-logs Display access logs --no-access-logs No display access logs Development: --debug Run the server in debug mode -d, --dev Currently is an alias for --debug. But starting in v22.3, --debug will no longer automatically trigger auto_restart. However, --dev will continue, effectively making it the same as debug + auto_reload. -r, --reload, --auto-reload Watch source directory for file changes and reload on changes -R PATH, --reload-dir PATH Extra directories to watch and reload on changes Output: --motd Show the startup display --no-motd No show the startup display -v, --verbosity Control logging noise, eg. -vv or --verbosity=2 [default 0] --noisy-exceptions Output stack traces for all exceptions --no-noisy-exceptions No output stack traces for all exceptions ``` ### Server running modes and changes coming to `debug` There are now two running modes: `DEV` and `PRODUCTION`. By default, Sanic server will run under `PRODUCTION` mode. This is intended for deployments. Currently, `DEV` mode will operate very similarly to how `debug=True` does in older Sanic versions. However, in v22.3. `debug=True` will **no longer** enable auto-reload. If you would like to have debugging and auto-reload, you should enable `DEV` mode. **DEVELOPMENT** ``` $ sanic server:app --dev ``` ```python app.run(debug=True, auto_reload=True) ``` **PRODUCTION** ``` $ sanic server:app ``` ```python app.run() ``` Beginning in v22.3, `PRODUCTION` mode will no longer enable access logs by default. A summary of the changes are as follows: | Flag | Mode | Tracebacks | Logging | Access logs | Reload | Max workers | |---------|-------|------------|---------|-------------|--------|-------------| | --debug | DEBUG | yes | DEBUG | yes | ^1 | | | | PROD | no | INFO ^2 | ^3 | | | | --dev | DEBUG | yes | DEBUG | yes | yes | | | --fast | | | | | | yes | - ^1 `--debug` to deprecate auto-reloading and remove in 22.3 - ^2 After 22.3 this moves to WARNING - ^3 After 22.3: no ### Max allowed workers You can easily spin up the maximum number of allowed workers using `--fast`. ``` $ sanic server:app --fast ``` ```python app.run(fast=True) ``` ### First-class Sanic Extensions support [Sanic Extensions](../../plugins/sanic-ext/getting-started.md) provides a number of additional features specifically intended for API developers. You can now easily implement all of the functionality it has to offer without additional setup as long as the package is in the environment. These features include: - Auto create `HEAD`, `OPTIONS`, and `TRACE` endpoints - CORS protection - Predefined, endpoint-specific response serializers - Dependency injection into route handlers - OpenAPI documentation with Redoc and/or Swagger - Request query arguments and body input validation The preferred method is to install it along with Sanic, but you can also install the packages on their own. .. column:: ``` $ pip install sanic[ext] ``` .. column:: ``` $ pip install sanic sanic-ext ``` After that, no additional configuration is required. Sanic Extensions will be attached to your application and provide all of the additional functionality with **no further configuration**. If you want to change how it works, or provide additional configuration, you can change Sanic extensions using `app.extend`. The following examples are equivalent. The `Config` object is to provide helpful type annotations for IDE development. .. column:: ```python # This is optional, not required app = Sanic("MyApp") app.extend(config={"oas_url_prefix": "/apidocs"}) ``` .. column:: ```python # This is optional, not required app = Sanic("MyApp") app.config.OAS_URL_PREFIX = "/apidocs" ``` .. column:: ```python # This is optional, not required from sanic_ext import Config app = Sanic("MyApp") app.extend(config=Config(oas_url_prefix="/apidocs")) ``` .. column:: ### Contextual exceptions In [v21.9](./v21.9.md#default-exception-messages) we added default messages to exceptions that simplify the ability to consistently raise exceptions throughout your application. ```python class TeapotError(SanicException): status_code = 418 message = "Sorry, I cannot brew coffee" raise TeapotError ``` But this lacked two things: 1. A dynamic and predictable message format 2. The ability to add additional context to an error message (more on this in a moment) The current release allows any Sanic exception to have additional information to when raised to provide context when writing an error message: ```python class TeapotError(SanicException): status_code = 418 @property def message(self): return f"Sorry {self.extra['name']}, I cannot make you coffee" raise TeapotError(extra={"name": "Adam"}) ``` The new feature allows the passing of `extra` meta to the exception instance. This `extra` info object **will be suppressed** when in `PRODUCTION` mode, but displayed in `DEVELOPMENT` mode. .. column:: **PRODUCTION** ![image](https://user-images.githubusercontent.com/166269/139014161-cda67cd1-843f-4ad2-9fa1-acb94a59fc4d.png) .. column:: **DEVELOPMENT** ![image](https://user-images.githubusercontent.com/166269/139014121-0596b084-b3c5-4adb-994e-31ba6eba6dad.png) Getting back to item 2 from above: _The ability to add additional context to an error message_ This is particularly useful when creating microservices or an API that you intend to pass error messages back in JSON format. In this use case, we want to have some context around the exception beyond just a parseable error message to return details to the client. ```python raise TeapotError(context={"foo": "bar"}) ``` This is information **that we want** to always be passed in the error (when it is available). Here is what it should look like: .. column:: **PRODUCTION** ```json { "description": "I'm a teapot", "status": 418, "message": "Sorry Adam, I cannot make you coffee", "context": { "foo": "bar" } } ``` .. column:: **DEVELOPMENT** ```json { "description": "I'm a teapot", "status": 418, "message": "Sorry Adam, I cannot make you coffee", "context": { "foo": "bar" }, "extra": { "name": "Adam", "more": "lines", "complex": { "one": "two" } }, "path": "/", "args": {}, "exceptions": [ { "type": "TeapotError", "exception": "Sorry Adam, I cannot make you coffee", "frames": [ { "file": "handle_request", "line": 83, "name": "handle_request", "src": "" }, { "file": "/tmp/p.py", "line": 17, "name": "handler", "src": "raise TeapotError(" } ] } ] } ``` ### Background task management When using the `app.add_task` method to create a background task, there now is the option to pass an optional `name` keyword argument that allows it to be fetched, or cancelled. ```python app.add_task(dummy, name="dummy_task") task = app.get_task("dummy_task") app.cancel_task("dummy_task") ``` ### Route context kwargs in definitions When a route is defined, you can add any number of keyword arguments with a `ctx_` prefix. These values will be injected into the route `ctx` object. ```python @app.get("/1", ctx_label="something") async def handler1(request): ... @app.get("/2", ctx_label="something") async def handler2(request): ... @app.get("/99") async def handler99(request): ... @app.on_request async def do_something(request): if request.route.ctx.label == "something": ... ``` ### Blueprints can be registered at any time In previous versions of Sanic, there was a strict ordering of when a Blueprint could be attached to an application. If you ran `app.blueprint(bp)` *before* attaching all objects to the Blueprint instance, they would be missed. Now, you can attach a Blueprint at anytime and everything attached to it will be included at startup. ### Noisy exceptions (force all exceptions to logs) There is a new `NOISY_EXCEPTIONS` config value. When it is `False` (which is the default), Sanic will respect the `quiet` property of any `SanicException`. This means that an exception with `quiet=True` will not be displayed to the log output. However, when setting `NOISY_EXCEPTIONS=True`, all exceptions will be logged regardless of the `quiet` value. This can be helpful when debugging. ```python app.config.NOISY_EXCEPTIONS = True ``` ### Signal events as `Enum` There is an `Enum` with all of the built-in signal values for convenience. ```python from sanic.signals import Event @app.signal(Event.HTTP_LIFECYCLE_BEGIN) async def connection_opened(conn_info): ... ``` ### Custom type casting of environment variables By default, Sanic will convert an `int`, `float`, or a `bool` value when applying environment variables to the `config` instance. You can extend this with your own converter: ```python app = Sanic(..., config=Config(converters=[UUID])) ``` ### Disable `uvloop` by configuration value The usage of `uvloop` can be controlled by configuration value: ```python app.config.USE_UVLOOP = False ``` ### Run Sanic server with multiple TLS certificates Sanic can be run with multiple TLS certificates: ```python app.run( ssl=[ "/etc/letsencrypt/live/example.com/", "/etc/letsencrypt/live/mysite.example/", ] ) ``` ## News ### Coming Soon: Python Web Development with Sanic A book about Sanic is coming soon by one of the core developers, [@ahopkins](https://github.com/ahopkins). Learn more at [sanicbook.com](https://sanicbook.com). > Get equipped with the practical knowledge of working with Sanic to increase the performance and scalability of your web applications. While doing that, we will level-up your development skills as you learn to customize your application to meet the changing business needs without having to significantly over-engineer the app. A portion of book proceeds goes into the Sanic Community Organization to help fund the development and operation of Sanic. So, buying the book is another way you can support Sanic. ### Dark mode for the docs If you have not already noticed, this Sanic website is now available in a native dark mode. You can toggle the theme at the top right of the page. ## Thank you Thank you to everyone that participated in this release: :clap: [@adarsharegmi](https://github.com/adarsharegmi) [@ahopkins](https://github.com/ahopkins) [@ashleysommer](https://github.com/ashleysommer) [@ChihweiLHBird](https://github.com/ChihweiLHBird) [@cnicodeme](https://github.com/cnicodeme) [@kianmeng](https://github.com/kianmeng) [@meysam81](https://github.com/meysam81) [@nuxion](https://github.com/nuxion) [@prryplatypus](https://github.com/prryplatypus) [@realDragonium](https://github.com/realDragonium) [@SaidBySolo](https://github.com/SaidBySolo) [@sjsadowski](https://github.com/sjsadowski) [@Tronic](https://github.com/tronic) [@Varriount](https://github.com/Varriount) [@vltr](https://github.com/vltr) [@whos4n3](https://github.com/whos4n3) And, a special thank you to [@miss85246](https://github.com/miss85246) and [@ZinkLu](https://github.com/ZinkLu) for their tremendous work keeping the documentation synced and translated into Chinese. --- If you enjoy the project, please consider contributing. Of course we love code contributions, but we also love contributions in any form. Consider writing some documentation, showing off use cases, joining conversations and making your voice known, and if you are able: [financial contributions](https://opencollective.com/sanic-org/). ================================================ FILE: guide/content/en/release-notes/2021/v21.3.md ================================================ --- title: Version 21.3 --- # Version 21.3 .. toc:: ## Introduction Sanic is now faster. Well, it already was fast. But with the first iteration of the v21 release, we incorporated a few major milestones that have made some tangible improvements. These encompass some ideas that have been in the works for years, and have finally made it into the released version. .. warning:: Breaking changes Version 21.3 introduces a lot of new features. But, it also includes some breaking changes. This is why these changes were introduced after the last LTS. If you rely upon something that has been removed, you should continue to use v20.12LTS until you are able to upgrade. ```bash pip install "sanic>=20.12,<20.13" pip freeze > requirements.txt ``` For most typical installations, you should be able to upgrade without a problem. ## What to know Notable new or breaking features, and what to upgrade... ### Python 3.7+ Only This version drops Python 3.6 support. Version 20.12LTS will continue to support Python 3.6 until its EOL in December, 2022, and version 19.12LTS will support it until its EOL in December, 2021. Read more about our [LTS policy](../../organization/policies.md#long-term-support-v-interim-releases). ### Streaming as first class citizen The biggest speed improvement came from unifying the request/response cycle into a single flow. Previously, there was a difference between regular cycles, and streaming cycles. This has been simplified under the hood, even though the API is staying the same right now for compatibility. The net benefit is that **all** requests now should see a new benefit. Read more about [streaming changes](../../guide/advanced/streaming.md#response-streaming). ### Router overhaul The old Sanic router was based upon regular expressions. In addition it suffered from a number of quirks that made it hard to modify at run time, and resulted in some performance issues. This change has been years in the making and now [converts the router to a compiled tree at startup](https://community.sanicframework.org/t/a-fast-new-router/649/41). Look for additional improvements throughout the year. The outward facing API has kept backwards compatibility. However, if you were accessing anything inside the router specifically, you many notice some changes. For example: 1. `Router.get()` has a new return value 2. `Route` is now a proper class object and not a `namedtuple` 3. If building the router manually, you will need to call `Router.finalize()` before it is usable 4. There is a new `` pattern that can be matched in your routes 5. You cannot startup an application without at least one route defined The router is now located in its own repository: [sanic-org/sanic-router](https://github.com/sanic-org/sanic-router) and is also its own [standalone package on PyPI](https://pypi.org/project/sanic-routing/). ### Signals API ⭐️ _BETA Feature: API to be finalized in v21.6_ A side benefit of the new router is that it can do double duty also powering the [new signals API](https://github.com/sanic-org/sanic/issues/1630). This feature is being released for public usage now, and likely the public API will not change in its final form. The core ideas of this feature are: 1. to allow the developer greater control and access to plugging into the server and request lifecycles, 2. to provide new tools to synchronize and send messages through your application, and 3. to ultimately further increase performance. The API introduces three new methods: - `@app.signal(...)` - For defining a signal handler. It looks and operates very much like a route. Whenever that signal is dispatched, this handler will be executed. - `app.event(...)` - An awaitable that can be used anywhere in your application to pause execution until the event is triggered. - `app.dispatch(...)` - Trigger an event and cause the signal handlers to execute. ```python @app.signal("foo.bar.") async def signal_handler(thing, **kwargs): print(f"[signal_handler] {thing=}", kwargs) async def wait_for_event(app): while True: print("> waiting") await app.event("foo.bar.*") print("> event found\n") @app.after_server_start async def after_server_start(app, loop): app.add_task(wait_for_event(app)) @app.get("/") async def trigger(request): await app.dispatch("foo.bar.baz") return response.text("Done.") ``` ### Route naming Routes used to be referenced by both `route.name` and `route.endpoint`. While similar, they were slightly different. Now, all routes will be **consistently** namespaced and referenced. ```text .[optional:.] ``` This new "name" is assigned to the property `route.name`. We are deprecating `route.endpoint`, and will remove that property in v21.9. Until then, it will be an alias for `route.name`. In addition, naming prefixes that had been in use for things like static, websocket, and blueprint routes have been removed. ### New decorators Several new convenience decorators to help IDEs with autocomplete. ```python # Alias to @app.listener("...") @app.before_server_start @app.after_server_stop @app.before_server_start @app.after_server_stop # Alias to @app.middleware("...") @app.on_request @app.on_response ``` ### Unquote in route If you have a route that uses non-ascii characters, Sanic will no longer `unquote` the text for you. You will need to specifically tell the route definition that it should do so. ```python @app.route("/overload/", methods=["GET"], unquote=True) async def handler2(request, param): return text("OK2 " + param) request, response = app.test_client.get("/overload/您好") assert response.text == "OK2 您好" ``` If you forget to do so, your text will remain encoded. ### Alter `Request.match_info` The `match_info` has always provided the data for the matched path parameters. You now have access to modify that, for example in middleware. ```python @app.on_request def convert_to_snake_case(request): request.match_info = to_snake(request.match_info) ``` ### Version types in routes The `version` argument in routes can now be: - `str` - `int` - `float` ```python @app.route("/foo", version="2.1.1") @app.route("/foo", version=2) @app.route("/foo", version=2.1) ``` ### Safe method handling with body Route handlers for `GET`, `HEAD`, `OPTIONS` and `DELETE` will not decode any HTTP body passed to it. You can override this: ```python @app.delete(..., ignore_body=False) ``` ### Application, Blueprint and Blueprint Group parity The `Sanic` and `Blueprint` classes share a common base. Previously they duplicated a lot of functionality, that lead to slightly different implementations between them. Now that they both inherit the same base class, developers and plugins should have a more consistent API to work with. Also, Blueprint Groups now also support common URL extensions like the `version` and `strict_slashes` keyword arguments. ### Dropped `httpx` from dependencies There is no longer a dependency on `httpx`. ### Removed `testing` library Sanic internal testing client has been removed. It is now located in its own repository: [sanic-org/sanic-testing](https://github.com/sanic-org/sanic-testing) and is also its own [standalone package on PyPI](https://pypi.org/project/sanic-testing/). If you have `sanic-testing` installed, it will be available and usable on your `Sanic()` application instances as before. So, the **only** change you will need to make is to add `sanic-testing` to your test suite requirements. ### Application and connection level context (`ctx`) objects Version 19.9 [added ](https://github.com/sanic-org/sanic/pull/1666/files) the `request.ctx` API. This helpful construct easily allows for attaching properties and data to a request object (for example, in middleware), and reusing the information elsewhere int he application. Similarly, this concept is being extended in two places: 1. the application instance, and 2. a transport connection. #### Application context A common use case is to attach properties to the app instance. For the sake of consistency, and to avoid the issue of name collision with Sanic properties, the `ctx` object now exists on `Sanic` instances. ```python @app.before_server_startup async def startup_db(app, _): # WRONG app.db = await connect_to_db() # CORRECT app.ctx.db = await connect_to_db() ``` #### Connection context When a client sends a keep alive header, Sanic will attempt to keep the transport socket [open for a period of time](../../guide/running/configuration.md#keep-alive-timeout). That transport object now has a `ctx` object available on it. This effectively means that multiple requests from a single client (where the transport layer is being reused) may share state. ```python @app.on_request async def increment_foo(request): if not hasattr(request.conn_info.ctx, "foo"): request.conn_info.ctx.foo = 0 request.conn_info.ctx.foo += 1 @app.get("/") async def count_foo(request): return text(f"request.conn_info.ctx.foo={request.conn_info.ctx.foo}") ``` ```bash $ curl localhost:8000 localhost:8000 localhost:8000 request.conn_info.ctx.foo=1 request.conn_info.ctx.foo=2 request.conn_info.ctx.foo=3 ``` .. warning:: Connection level context is an experimental feature, and should be finalized in v21.6. ## News ### A NEW frontpage 🎉 We have split the documentation into two. The docstrings inside the codebase will still continue to build sphinx docs to ReadTheDocs. However, it will be limited to API documentation. The new frontpage will house the "Sanic User Guide". The new site runs on Vuepress. Contributions are welcome. We also invite help in translating the documents. As a part of this, we also freshened up the RTD documentation and changed it to API docs only. ### Chat has moved to Discord The Gitter chatroom has taken one step closer to being phased out. In its place we opened a [Discord server](https://discord.gg/FARQzAEMAA). ### Open Collective The Sanic Community Organization has [opened a page on Open Collective](https://opencollective.com/sanic-org) to enable anyone that would like to financially support the development of Sanic. ### 2021 Release Managers Thank you to @sjsadowski and @yunstanford for acting as release managers for both 2019 and 2020. This year's release managers are @ahopkins and @vltr. ## Thank you Thank you to everyone that participated in this release: :clap: [@ahopkins](https://github.com/ahopkins) [@akshgpt7](https://github.com/akshgpt7) [@artcg](https://github.com/artcg) [@ashleysommer](https://github.com/ashleysommer) [@elis-k](https://github.com/elis-k) [@harshanarayana](https://github.com/harshanarayana) [@sjsadowski](https://github.com/sjsadowski) [@tronic](https://github.com/tronic) [@vltr](https://github.com/vltr), To [@ConnorZhang](https://github.com/miss85246) and [@ZinkLu](https://github.com/ZinkLu) for translating our documents into Chinese, --- Make sure to checkout the changelog to get links to all the PRs, etc. ================================================ FILE: guide/content/en/release-notes/2021/v21.6.md ================================================ --- title: Version 21.6 --- # Version 21.6 .. toc:: ## Introduction This is the second release of the version 21 [release cycle](../../organization/policies.md#release-schedule). There will be one more release in September before version 21 is "finalized" in the December long-term support version. One thing users may have noticed starting in 21.3, the router was moved to its own package: [`sanic-routing`](https://pypi.org/project/sanic-routing). This change is likely to stay for now. Starting with this release, the minimum required version is 0.7.0. ## What to know More details in the [Changelog](https://sanic.readthedocs.io/en/stable/sanic/changelog.html). Notable new or breaking features, and what to upgrade... ### Deprecation of `StreamingHTTPResponse` The use of `StreamingHTTPResponse` has been deprecated and will be removed in the 21.12 release. This impacts both `sanic.response.stream` and `sanic.response.file_stream`, which both under the hood instantiate `StreamingHTTPResponse`. Although the exact migration path has yet to be determined, `sanic.response.stream` and `sanic.response.file_stream` will continue to exist in v21.12 in some form as convenience operators. Look for more details throughout this Summer as we hope to have this finalized by the September release. ### Deprecation of `CompositionView` Usage of `CompositionView` has been deprecated and will be removed in 21.12. ### Deprecation of path parameter types: `string` and `number` Going forward, you should use `str` and `float` for path param types instead of `string` and `number`. ```python @app.get("//") async def handler(request, foo: str, bar: float): ... ``` Existing `string` and `number` types are aliased and will continue to work, but will be removed in v21.12. ### Version 0.7 router upgrades This includes a number of bug fixes and more gracefully handles a wider array of edge cases than v0.6. If you experience any patterns that are not supported, [please report them](https://github.com/sanic-org/sanic-routing/issues). You can see some of the issues resolved on the `sanic-routing` [release notes](https://github.com/sanic-org/sanic-routing/releases). ### Inline streaming with `eof()` Version 21.3 included [big changes in how streaming is handled](https://sanic.dev/en/guide/release-notes/v21.3.html#what-to-know). The pattern introduced will become the default (see below). As a convenience, a new `response.eof()` method has been included. It should be called once the final data has been pushed to the client: ```python @app.route("/") async def test(request): response = await request.respond(content_type="text/csv") await response.send("foo,") await response.send("bar") await response.eof() return response ``` ### New path parameter type: `slug` You can now specify a dynamic path segment as a `slug` with appropriate matching: ```python @app.get("/articles/") async def article(request, article_slug: str): ... ``` Slugs must consist of lowercase letters or digits. They may contain a hyphen (`-`), but it cannot be the first character. ``` this-is-a-slug with-123-is-also-a-slug 111-at-start-is-a-slug NOT-a-slug -NOT-a-slug ``` ### Stricter application and blueprint names, and deprecation Your application and `Blueprint` instances must conform to a stricter set of requirements: 1. Only consisting of alphanumeric characters 2. May contain a hyphen (`-`) or an underscore (`_`) 3. Must begin with a letter (uppercase or lowercase) The naming convention is similar to Python variable naming conventions, with the addition of allowing hyphens (`-`). The looser standard has been deprecatated. Beginning in 21.12, non-conformance will be a startup time error. ### A new access on `Route` object: `route.uri` The `Route` object in v21.3 no longer had a `uri` attribute. Instead, the closes you could get was `route.path`. However, because of how `sanic-routing` works, the `path` property does *not* have a leading `/`. This has been corrected so that now there is a `route.uri` with a leading slash: ```python route.uri == f"/{route.path}" ``` ### A new accessor on `Request` object impacting IPs To access the IP address of the incoming request, Sanic has had a convenience accessor on the request object: `request.ip`. That is not new, and comes from an underlying object that provides details about the open HTTP connection: `request.conn_info`. The current version adds a new `client_ip` accessor to that `conn_info` object. For IPv4, you will not notice a difference. However, for IPv6 applications, the new accessor will provide an "unwrapped" version of the address. Consider the following example: ```python @app.get("/") async def handler(request): return json( { "request.ip": request.ip, "request.conn_info.client": request.conn_info.client, "request.conn_info.client_ip": request.conn_info.client_ip, } ) app.run(sock=my_ipv6_sock) ``` ```bash $ curl http://\[::1\]:8000 { "request.ip": "::1", "request.conn_info.client": "[::1]", "request.conn_info.client_ip": "::1" } ``` ### Alternate `Config` and `Sanic.ctx` objects You can now pass your own config and context objects to your Sanic applications. A custom configuration *should* be a subclass of `sanic.config.Config`. The context object can be anything you want, with no restrictions whatsoever. ```python class CustomConfig(Config): ... config = CustomConfig() app = Sanic("custom", config=config) assert isinstance(app.config, CustomConfig) ``` And... ```python class CustomContext: ... ctx = CustomContext() app = Sanic("custom", ctx=ctx) assert isinstance(app.ctx, CustomContext) ``` ### Sanic CLI improvements 1. New flag for existing feature: `--auto-reload` 2. Some new shorthand flags for existing arguments 3. New feature: `--factory` 4. New feature: `--simple` 5. New feature: `--reload-dir` #### Factory applications For applications that follow the factory pattern (a function that returns a `sanic.Sanic` instance), you can now launch your application from the Sanic CLI using the `--factory` flag. ```python from sanic import Blueprint, Sanic, text bp = Blueprint(__file__) @bp.get("/") async def handler(request): return text("😎") def create_app() -> Sanic: app = Sanic(__file__) app.blueprint(bp) return app ``` You can now run it: ```bash $ sanic path.to:create_app --factory ``` #### Sanic Simple Server Sanic CLI now includes a simple pattern to serve a directory as a web server. It will look for an `index.html` at the directory root. ```bash $ sanic ./path/to/dir --simple ``` .. warning:: This feature is still in early *beta* mode. It is likely to change in scope. #### Additional reload directories When using either `debug` or `auto-reload`, you can include additional directories for Sanic to watch for new files. ```bash sanic ... --reload-dir=/path/to/foo --reload-dir=/path/to/bar ``` .. tip:: You do *NOT* need to include this on your application directory. Sanic will automatically reload when any Python file in your application changes. You should use the `reload-dir` argument when you want to listen and update your application when static files are updated. ### Version prefix When adding `version`, your route is prefixed with `/v`. This will always be at the beginning of the path. This is not new. ```python # /v1/my/path app.route("/my/path", version=1) ``` Now, you can alter the prefix (and therefore add path segments *before* the version). ```python # /api/v1/my/path app.route("/my/path", version=1, version_prefix="/api/v") ``` The `version_prefix` argument is can be defined in: - `app.route` and `bp.route` decorators (and all the convenience decorators also) - `Blueprint` instantiation - `Blueprint.group` constructor - `BlueprintGroup` instantiation - `app.blueprint` registration ### Signal event auto-registration Setting `config.EVENT_AUTOREGISTER` to `True` will allow you to await any signal event even if it has not previously been defined with a signal handler. ```python @app.signal("do.something.start") async def signal_handler(): await do_something() await app.dispatch("do.something.complete") # somethere else in your app: await app.event("do.something.complete") ``` ### Infinitely reusable and nestable `Blueprint` and `BlueprintGroup` A single `Blueprint` may not be assigned and reused to multiple groups. The groups themselves can also by infinitely nested into one or more other groups. This allows for an unlimited range of composition. ### HTTP methods as `Enum` Sanic now has `sanic.HTTPMethod`, which is an `Enum`. It can be used interchangeably with strings: ```python from sanic import Sanic, HTTPMethod @app.route("/", methods=["post", "PUT", HTTPMethod.PATCH]) async def handler(...): ... ``` ### Expansion of `HTTPMethodView` Class based views may be attached now in one of three ways: **Option 1 - Existing** ```python class DummyView(HTTPMethodView): ... app.add_route(DummyView.as_view(), "/dummy") ``` **Option 2 - From `attach` method** ```python class DummyView(HTTPMethodView): ... DummyView.attach(app, "/") ``` **Option 3 - From class definition at `__init_subclass__`** ```python class DummyView(HTTPMethodView, attach=app, uri="/"): ... ``` Options 2 and 3 are useful if your CBV is located in another file: ```python from sanic import Sanic, HTTPMethodView class DummyView(HTTPMethodView, attach=Sanic.get_app(), uri="/"): ... ``` ## News ### Discord and support forums If you have not already joined our community, you can become a part by joining the [Discord server](https://discord.gg/FARQzAEMAA) and the [Community Forums](https://community.sanicframework.org/). Also, follow [@sanicframework](https://twitter.com/sanicframework) on Twitter. ### SCO 2022 elections The Summer 🏝/Winter ❄️ (choose your Hemisphere) is upon us. That means we will be holding elections for the SCO. This year, we will have the following positions to fill: - Steering Council Member (2 year term) - Steering Council Member (2 year term) - Steering Council Member (1 year term) - Release Manager v22 - Release Manager v22 [@vltr](https://github.com/vltr) will be staying on to complete his second year on the Steering Council. If you are interested in learning more, you can read about the SCO [roles and responsibilities](../../organization/scope.md#roles-and-responsibilities), or Adam Hopkins on Discord. Nominations will begin September 1. More details will be available on the Forums as we get closer. ### New project underway We have added a new project to the SCO umbrella: [`sanic-ext`](https://github.com/sanic-org/sanic-ext). It is not yet released, and in heavy active development. The goal for the project will ultimately be to replace [`sanic-openapi`](https://github.com/sanic-org/sanic-openapi) with something that provides more features for web application developers, including input validation, CORS handling, and HTTP auto-method handlers. If you are interested in helping out, let us know on Discord. Look for an initial release of this project sometime (hopefully) before the September release. ## Thank you Thank you to everyone that participated in this release: :clap: [@aaugustin](https://github.com/aaugustin) [@ahopkins](https://github.com/ahopkins) [@ajaygupta2790](https://github.com/ajaygupta2790) [@ashleysommer](https://github.com/ashleysommer) [@ENT8R](https://github.com/ent8r) [@fredlllll](https://github.com/fredlllll) [@graingert](https://github.com/graingert) [@harshanarayana](https://github.com/harshanarayana) [@jdraymon](https://github.com/jdraymon) [@Kyle-Verhoog](https://github.com/kyle-verhoog) [@sanjeevanahilan](https://github.com/sanjeevanahilan) [@sjsadowski](https://github.com/sjsadowski) [@Tronic](https://github.com/tronic) [@vltr](https://github.com/vltr) [@ZinkLu](https://github.com/zinklu) --- If you enjoy the project, please consider contributing. Of course we love code contributions, but we also love contributions in any form. Consider writing some documentation, showing off use cases, joining conversations and making your voice known, and if you are able, [financial contributions](https://opencollective.com/sanic-org/). ================================================ FILE: guide/content/en/release-notes/2021/v21.9.md ================================================ --- title: Version 21.9 --- # Version 21.9 .. toc:: ## Introduction This is the third release of the version 21 [release cycle](../../organization/policies.md#release-schedule). Version 21 will be "finalized" in the December long-term support version release. ## What to know More details in the [Changelog](https://sanic.readthedocs.io/en/stable/sanic/changelog.html). Notable new or breaking features, and what to upgrade... ### Removal of config values: `WEBSOCKET_READ_LIMIT`, `WEBSOCKET_WRITE_LIMIT` and `WEBSOCKET_MAX_QUEUE` With the complete overhaul of the websocket implementation, these configuration values were removed. There currently is not a plan to replace them. ### Deprecation of default value of `FALLBACK_ERROR_FORMAT` When no error handler is attached, Sanic has used `html` as the fallback format-type. This has been deprecated and will change to `text` starting in v22.3. While the value of this has changed to `auto`, it will still continue to use HTML as the last resort thru v21.12LTS before changing. ### `ErrorHandler.lookup` signature deprecation The `ErrorHandler.lookup` now **requires** two positional arguments: ```python def lookup(self, exception, route_name: Optional[str]): ``` A non-conforming method will cause Blueprint-specific exception handlers to not properly attach. ### Reminder of upcoming removals As a reminder, the following items have already been deprecated, and will be removed in version 21.12LTS - `CompositionView` - `load_env` (use `env_prefix` instead) - Sanic objects (application instances, blueprints, and routes) must by alphanumeric conforming to: `^[a-zA-Z][a-zA-Z0-9_\-]*$` - Arbitrary assignment of objects to application and blueprint instances (use `ctx` instead; removal of this has been bumped from 21.9 to 21.12) ### Overhaul of websockets There has been a huge overhaul to the handling of websocket connections. Thanks to [@aaugustin](https://github.com/aaugustin) the [`websockets`](https://websockets.readthedocs.io/en/stable/index.html) now has a new implementation that allows Sanic to handle the I/O of websocket connections on its own. Therefore, Sanic has bumped the minimum version to `websockets>=10.0`. The change should mostly be unnoticeable to developers, except that some of the oddities around websocket handlers in Sanic have been corrected. For example, you now should be able to catch the `CancellError` yourself when someone disconnects: ```python @app.websocket("/") async def handler(request, ws): try: while True: await asyncio.sleep(0.25) except asyncio.CancelledError: print("User closed connection") ``` ### Built-in signals Version [21.3](./v21.3.md) introduced [signals](../../guide/advanced/signals.md). Now, Sanic dispatches signal events **from within the codebase** itself. This means that developers now have the ability to hook into the request/response cycle at a much closer level than before. Previously, if you wanted to inject some logic you were limited to middleware. Think of integrated signals as _super_-middleware. The events that are dispatched now include: - `http.lifecycle.begin` - `http.lifecycle.complete` - `http.lifecycle.exception` - `http.lifecycle.handle` - `http.lifecycle.read_body` - `http.lifecycle.read_head` - `http.lifecycle.request` - `http.lifecycle.response` - `http.lifecycle.send` - `http.middleware.after` - `http.middleware.before` - `http.routing.after` - `http.routing.before` - `server.init.after` - `server.init.before` - `server.shutdown.after` - `server.shutdown.before` .. note:: The `server` signals are the same as the four (4) main server listener events. In fact, those listeners themselves are now just convenience wrappers to signal implementations. ### Smarter `auto` exception formatting Sanic will now try to respond with an appropriate exception format based upon the endpoint and the client. For example, if your endpoint always returns a `sanic.response.json` object, then any exceptions will automatically be formatted in JSON. The same is true for `text` and `html` responses. Furthermore, you now can _explicitly_ control which formatter to use on a route-by-route basis using the route definition: ```python @app.route("/", error_format="json") async def handler(request): pass ``` ### Blueprint copying Blueprints can be copied to new instances. This will carry forward everything attached to it, like routes, middleware, etc. ```python v1 = Blueprint("Version1", version=1) @v1.route("/something") def something(request): pass v2 = v1.copy("Version2", version=2) app.blueprint(v1) app.blueprint(v2) ``` ``` /v1/something /v2/something ``` ### Blueprint group convenience methods Blueprint groups should now have all of the same methods available to them as regular Blueprints. With this, along with Blueprint copying, Blueprints should now be very composable and flexible. ### Accept header parsing Sanic `Request` objects can parse an `Accept` header to provide an ordered list of the client's content-type preference. You can simply access it as an accessor: ```python print(request.accept) # ["*/*"] ``` It also is capable of handling wildcard matching. For example, assuming the incoming request included: ``` Accept: */* ``` Then, the following is `True`: ```python "text/plain" in request.accept ``` ### Default exception messages Any exception that derives from `SanicException` can now define a default exception message. This makes it more convenient and maintainable to reuse the same exception in multiple places without running into DRY issues with the message that the exception provides. ```python class TeaError(SanicException): message = "Tempest in a teapot" raise TeaError ``` ### Type annotation conveniences It is now possible to control the path parameter types using Python's type annotations. Instead of doing this: ```python @app.route("///") def handler(request: Request, one: int, two: float, three: UUID): ... ``` You can now simply do this: ```python @app.route("///") def handler(request: Request, one: int, two: float, three: UUID): ... ``` Both of these examples will result in the same routing principles to be applied. ### Explicit static resource type You can now explicitly tell a `static` endpoint whether it is supposed to treat the resource as a file or a directory: ```python static("/", "/path/to/some/file", resource_type="file")) ``` ## News ### Release of `sanic-ext` and deprecation of `sanic-openapi` One of the core principles of Sanic is that it is meant to be a tool, not a dictator. As the frontpage of this website states: > Build the way you want to build without letting your tooling constrain you. This means that a lot of common features used (specifically by Web API developers) do not exist in the `sanic` repository. This is for good reason. Being unopinionated provides the developer freedom and flexibility. But, sometimes you do not want to have to build and rebuild the same things. Sanic has until now really relied upon the awesome support of the community to fill in the gaps with plugins. From the early days, there has been an official `sanic-openapi` package that offered the ability to create OpenAPI documentation based upon your application. But, that project has been plagued over the years and has not been given as much priority as the main project. Starting with the release of v21.9, the SCO is deprecating the `sanic-openapi` package and moving it to maintenance mode. This means that it will continue to get updates as needed to maintain it for the current future, but it will not receive any new feature enhancements. A new project called `sanic-ext` is taking its place. This package provides not only the ability to build OAS3 documentation, but fills in many of the gaps that API developers may want in their applications. For example, out of the box it will setup CORS, and auto enable `HEAD` and `OPTIONS` responses where needed. It also has the ability validate incoming data using either standard library Dataclasses or Pydantic models. The list of goodies includes: - CORS protection - incoming request validation - auto OAS3 documentation using Redoc and/or Swagger UI - auto `HEAD`, `OPTIONS`, and `TRACE` responses - dependency injection - response serialization This project is still in `alpha` mode for now and is subject to change. While it is considered to be production capable, there may be some need to change the API as we continue to add features. Checkout the [documentation](../../plugins/sanic-ext/getting-started.md) for more details. ## Thank you Thank you to everyone that participated in this release: :clap: [@aaugustin](https://github.com/aaugustin) [@ahopkins](https://github.com/ahopkins) [@ashleysommer](https://github.com/ashleysommer) [@cansarigol3megawatt](https://github.com/cansarigol3megawatt) [@ChihweiLHBird](https://github.com/ChihweiLHBird) [@gluhar2006](https://github.com/gluhar2006) [@komar007](https://github.com/komar007) [@ombe1229](https://github.com/ombe1229) [@prryplatypus](https://github.com/prryplatypus) [@SaidBySolo](https://github.com/SaidBySolo) [@Tronic](https://github.com/tronic) [@vltr](https://github.com/vltr) And, a special thank you to [@miss85246](https://github.com/miss85246) and [@ZinkLu](https://github.com/ZinkLu) for their tremendous work keeping the documentation synced and translated into Chinese. --- If you enjoy the project, please consider contributing. Of course we love code contributions, but we also love contributions in any form. Consider writing some documentation, showing off use cases, joining conversations and making your voice known, and if you are able, [financial contributions](https://opencollective.com/sanic-org/). ================================================ FILE: guide/content/en/release-notes/2022/v22.12.md ================================================ --- title: Version 22.12 (LTS) --- # Version 22.12 (LTS) .. toc:: ## Introduction This is the final release of the version 22 [release cycle](../../organization/policies.md#release-schedule). As such it is a **long-term support** release, and will be supported as stated in the [policies](../../org/policies.md#long-term-support-v-interim-releases). ## What to know More details in the [Changelog](https://sanic.readthedocs.io/en/stable/sanic/changelog.html). Notable new or breaking features, and what to upgrade... ### 🚨 *BREAKING CHANGE* - Sanic Inspector is now an HTTP server Sanic v22.9 introduced the [Inspector](./v22.9.md#inspector) to allow live inspection of a running Sanic instance. This feature relied upon opening a TCP socket and communicating over a custom protocol. That basic TCP protocol has been dropped in favor of running a full HTTP service in its place. [Learn more about the Inspector](../deployment/inspector.md). The current release introduces a new HTTP server and a refreshed CLI experience. This enables several new features highlighted here. Perhaps the most significant change, however, is to move all of the Inspector's commands to a subparser on the CLI instance. ``` $ sanic inspect --help ▄███ █████ ██ ▄█▄ ██ █ █ ▄██████████ ██ █ █ █ ██ █ █ ██ ▀███████ ███▄ ▀ █ █ ██ ▄ █ ██ ██ █████████ █ ██ █ █ ▄▄ ████ ████████▀ █ █ █ ██ █ ▀██ ███████ Optional ======== General: -h, --help show this help message and exit --host HOST, -H HOST Inspector host address [default 127.0.0.1] --port PORT, -p PORT Inspector port [default 6457] --secure, -s Whether to access the Inspector via TLS encryption --api-key API_KEY, -k API_KEY Inspector authentication key --raw Whether to output the raw response information Subcommands: Run one or none of the below subcommands. Using inspect without a subcommand will fetch general information about the state of the application instance. Or, you can optionally follow inspect with a subcommand. If you have created a custom Inspector instance, then you can run custom commands. See https://sanic.dev/en/guide/deployment/inspector.html for more details. {reload,shutdown,scale,} reload Trigger a reload of the server workers shutdown Shutdown the application and all processes scale Scale the number of workers Run a custom command ``` #### CLI remote access now available The `host` and `port` of the Inspector are now explicitly exposed on the CLI as shown above. Previously in v22.9, they were inferred by reference to the application instance. Because of this change, it will be more possible to expose the Inspector on live production instances and access from a remote installation of the CLI. For example, you can check your running production deployment from your local development machine. ``` $ sanic inspect --host=1.2.3.4 ``` .. warning:: For **production** instances, make sure you are _using TLS and authentication_ described below. #### TLS encryption now available You can secure your remote Inspector access by providing a TLS certificate to encrypt the web traffic. ```python app.config.INSPECTOR_TLS_CERT = "/path/to/cert.pem" app.config.INSPECTOR_TLS_KEY = "/path/to/key.pem" ``` To access an encrypted installation via the CLI, use the `--secure` flag. ``` $ sanic inspect --secure ``` #### Authentication now available To control access to the remote Inspector, you can protect the endpoints using an API key. ```python app.config.INSPECTOR_API_KEY = "Super-Secret-200" ``` To access a protected installation via the CLI, use the `--api-key` flag. ``` $ sanic inspect --api-key=Super-Secret-200 ``` This is equivalent to the header: `Authorization: Bearer `. ``` $ curl http://localhost:6457 -H "Authorization: Bearer Super-Secret-200" ``` ### Scale number of running server workers The Inspector is now capable of scaling the number of worker processes. For example, to scale to 3 replicas, use the following command: ``` $ sanic inspect scale 3 ``` ### Extend Inspector with custom commands The Inspector is now fully extendable to allow for adding custom commands to the CLI. For more information see [Custom Commands](../deployment/inspector.md#custom-commands). ``` $ sanic inspect foo --bar ``` ### Early worker exit on failure The process manager shipped with v22.9 had a very short startup timeout. This was to protect against deadlock. This was increased to 30s, and a new mechanism has been added to fail early if there is a crash in a worker process on startup. ### Introduce `JSONResponse` with convenience methods to update a JSON response body The `sanic.response.json` convenience method now returns a new subclass of `HTTPResponse` appropriately named: `JSONResponse`. This new type has some convenient methods for handling changes to a response body after its creation. ```python resp = json({"foo": "bar"}) resp.update({"another": "value"}) ``` See [Returning JSON Data](../basics/response.md#returning-json-data) for more information. ### Updates to downstream requirements: `uvloop` and `websockets` Minimum `uvloop` was set to `0.15.0`. Changes were added to make Sanic compliant with `websockets` version `11.0`. ### Force exit on 2nd `ctrl+c` On supporting operating systems, the existing behavior is for Sanic server to try to perform a graceful shutdown when hitting `ctrl+c`. This new release will perform an immediate shutdown on subsequent `ctrl+c` after the initial shutdown has begun. ### Deprecations and Removals 1. *DEPRECATED* - The `--inspect*` commands introduced in v22.9 have been replaced with a new subcommand parser available as `inspect`. The flag versions will continue to operate until v23.3. You are encouraged to use the replacements. While this short deprecation period is a deviation from the standard two-cycles, we hope this change will be minimally disruptive. ``` OLD sanic ... --inspect NEW sanic ... inspect OLD sanic ... --inspect-raw NEW sanic ... inspect --raw OLD sanic ... --inspect-reload NEW sanic ... inspect reload OLD sanic ... --inspect-shutdown NEW sanic ... inspect shutdown ``` ## News The Sanic Community Organization will be headed by a new Steering Council for 2023. There are two returning and two new members. [@ahopkins](https://github.com/ahopkins) *returning* \ [@prryplatypus](https://github.com/prryplatypus) *returning* \ [@sjsadowski](https://github.com/sjsadowski) *NEW* \ [@Tronic](https://github.com/Tronic) *NEW* The 2023 release managers are [@ahopkins](https://github.com/ahopkins) and [@sjsadowski](https://github.com/sjsadowski). If you are interested in getting more involved with Sanic, contact us on the [Discord server](https://discord.gg/FARQzAEMAA). ## Thank you Thank you to everyone that participated in this release: :clap: [@aaugustin](https://github.com/aaugustin) [@ahopkins](https://github.com/ahopkins) [@ChihweiLHBird](https://github.com/ChihweiLHBird) [@kijk2869](https://github.com/kijk2869) [@LiraNuna](https://github.com/LiraNuna) [@prryplatypus](https://github.com/prryplatypus) [@sjsadowski](https://github.com/sjsadowski) [@todddialpad](https://github.com/todddialpad) [@Tronic](https://github.com/Tronic) --- If you enjoy the project, please consider contributing. Of course we love code contributions, but we also love contributions in any form. Consider writing some documentation, showing off use cases, joining conversations and making your voice known, and if you are able: [financial contributions](https://opencollective.com/sanic-org/). ================================================ FILE: guide/content/en/release-notes/2022/v22.3.md ================================================ --- title: Version 22.3 --- # Version 22.3 .. toc:: ## Introduction This is the first release of the version 22 [release cycle](../../organization/policies.md#release-schedule). All of the standard SCO libraries are now entering the same release cycle and will follow the same versioning pattern. Those packages are: - [`sanic-routing`](https://github.com/sanic-org/sanic-routing) - [`sanic-testing`](https://github.com/sanic-org/sanic-testing) - [`sanic-ext`](https://github.com/sanic-org/sanic-ext) ## What to know More details in the [Changelog](https://sanic.readthedocs.io/en/stable/sanic/changelog.html). Notable new or breaking features, and what to upgrade... ### Application multi-serve The Sanic server now has an API to allow you to run multiple applications side-by-side in the same process. This is done by calling `app.prepare(...)` on one or more application instances, one or many times. Each time it should be bound to a unique host/port combination. Then, you begin serving the applications by calling `Sanic.serve()`. ```python app = Sanic("One") app2 = Sanic("Two") app.prepare(port=9999) app.prepare(port=9998) app.prepare(port=9997) app2.prepare(port=8888) app2.prepare(port=8887) Sanic.serve() ``` In the above snippet, there are two applications that will be run concurrently and bound to multiple ports. This feature is *not* supported in the CLI. This pattern is meant to be an alternative to running `app.run(...)`. It should be noted that `app.run` is now just a shorthand for the above pattern and is still fully supported. ### 👶 *BETA FEATURE* - New path parameter type: file extensions A very common pattern is to create a route that dynamically generates a file. The endpoint is meant to match on a file with an extension. There is a new path parameter to match files: ``. ```python @app.get("/path/to/") async def handler(request, filename, ext): ... ``` This will catch any pattern that ends with a file extension. You may, however want to expand this by specifying which extensions, and also by using other path parameter types for the file name. For example, if you want to catch a `.jpg` file that is only numbers: ```python @app.get("/path/to/") async def handler(request, filename, ext): ... ``` Some potential examples: | definition | example | filename | extension | | --------------------------------- | ----------- | ----------- | ---------- | | \ | page.txt | `"page"` | `"txt"` | | \ | cat.jpg | `"cat"` | `"jpg"` | | \ | cat.jpg | `"cat"` | `"jpg"` | | | 123.txt | `123` | `"txt"` | | | 123.svg | `123` | `"svg"` | | | 3.14.tar.gz | `3.14` | `"tar.gz"` | ### 🚨 *BREAKING CHANGE* - Path parameter matching of non-empty strings A dynamic path parameter will only match on a non-empty string. Previously a route with a dynamic string parameter (`/` or `/`) would match on any string, including empty strings. It will now only match a non-empty string. To retain the old behavior, you should use the new parameter type: `/`. ```python @app.get("/path/to/") async def handler(request, foo) ... ``` ### 🚨 *BREAKING CHANGE* - `sanic.worker.GunicornWorker` has been removed Departing from our normal deprecation policy, the `GunicornWorker` was removed as a part of the process of upgrading the Sanic server to include multi-serve. This decision was made largely in part because even while it existed it was not an optimal strategy for deploying Sanic. If you want to deploy Sanic using `gunicorn`, then you are advised to do it using [the strategy implemented by `uvicorn`](https://www.uvicorn.org/#running-with-gunicorn). This will effectively run Sanic as an ASGI application through `uvicorn`. You can upgrade to this pattern by installing `uvicorn`: ``` pip install uvicorn ``` Then, you should be able to run it with a pattern like this: ``` gunicorn path.to.sanic:app -k uvicorn.workers.UvicornWorker ``` ### Authorization header parsing The `Authorization` header has been partially parseable for some time now. You have been able to use `request.token` to gain access to a header that was in one of the following two forms: ``` Authorization: Token Authorization: Bearer ``` Sanic can now parse more credential types like `BASIC`: ``` Authorization: Basic Z2lsLWJhdGVzOnBhc3N3b3JkMTIz ``` This can be accessed now as `request.credentials`: ```python print(request.credentials) # Credentials(auth_type='Basic', token='Z2lsLWJhdGVzOnBhc3N3b3JkMTIz', _username='gil-bates', _password='password123') ``` ### CLI arguments optionally injected into application factory Sanic will now attempt to inject the parsed CLI arguments into your factory if you are using one. ```python def create_app(args): app = Sanic("MyApp") print(args) return app ``` ``` $sanic p:create_app --factory Namespace(module='p:create_app', factory=True, simple=False, host='127.0.0.1', port=8000, unix='', cert=None, key=None, tls=None, tlshost=False, workers=1, fast=False, access_log=False, debug=False, auto_reload=False, path=None, dev=False, motd=True, verbosity=None, noisy_exceptions=False) ``` If you are running the CLI with `--factory`, you also have the option of passing arbitrary arguments to the command, which will be injected into the argument `Namespace`. ``` sanic p:create_app --factory --foo=bar Namespace(module='p:create_app', factory=True, simple=False, host='127.0.0.1', port=8000, unix='', cert=None, key=None, tls=None, tlshost=False, workers=1, fast=False, access_log=False, debug=False, auto_reload=False, path=None, dev=False, motd=True, verbosity=None, noisy_exceptions=False, foo='bar') ``` ### New reloader process listener events When running Sanic server with auto-reload, there are two new events that trigger a listener *only* on the reloader process: - `reload_process_start` - `reload_process_stop` These are only triggered if the reloader is running. ```python @app.reload_process_start async def reload_start(*_): print(">>>>>> reload_start <<<<<<") @app.reload_process_stop async def reload_stop(*_): print(">>>>>> reload_stop <<<<<<") ``` ### The event loop is no longer a required argument of a listener You can leave out the `loop` argument of a listener. Both of these examples work as expected: ```python @app.before_server_start async def without(app): ... @app.before_server_start async def with(app, loop): ... ``` ### Removal - Debug mode does not automatically start the reloader When running with `--debug` or `debug=True`, the Sanic server will not automatically start the auto-reloader. This feature of doing both on debug was deprecated in v21 and removed in this release. If you would like to have *both* debug mode and auto-reload, you can use `--dev` or `dev=True`. **dev = debug mode + auto reloader** ### Deprecation - Loading of lower case environment variables Sanic loads prefixed environment variables as configuration values. It has not distinguished between uppercase and lowercase as long as the prefix matches. However, it has always been the convention that the keys should be uppercase. This is deprecated and you will receive a warning if the value is not uppercase. In v22.9 only uppercase and prefixed keys will be loaded. ## News ### Packt publishes new book on Sanic web development .. column:: There is a new book on **Python Web Development with Sanic** by [@ahopkins](https://github.com/ahopkins). The book is endorsed by the SCO and part of the proceeds of all sales go directly to the SCO for further development of Sanic. You can learn more at [sanicbook.com](https://sanicbook.com/) .. column:: ![Python Web Development with Sanic](https://sanicbook.com/images/SanicCoverFinal.png) ## Thank you Thank you to everyone that participated in this release: :clap: [@aericson](https://github.com/aericson) [@ahankinson](https://github.com/ahankinson) [@ahopkins](https://github.com/ahopkins) [@ariebovenberg](https://github.com/ariebovenberg) [@ashleysommer](https://github.com/ashleysommer) [@Bluenix2](https://github.com/Bluenix2) [@ChihweiLHBird](https://github.com/ChihweiLHBird) [@dotlambda](https://github.com/dotlambda) [@eric-spitler](https://github.com/eric-spitler) [@howzitcdf](https://github.com/howzitcdf) [@jonra1993](https://github.com/jonra1993) [@prryplatypus](https://github.com/prryplatypus) [@raphaelauv](https://github.com/raphaelauv) [@SaidBySolo](https://github.com/SaidBySolo) [@SerGeRybakov](https://github.com/SerGeRybakov) [@Tronic](https://github.com/Tronic) --- If you enjoy the project, please consider contributing. Of course we love code contributions, but we also love contributions in any form. Consider writing some documentation, showing off use cases, joining conversations and making your voice known, and if you are able: [financial contributions](https://opencollective.com/sanic-org/). ================================================ FILE: guide/content/en/release-notes/2022/v22.6.md ================================================ --- title: Version 22.6 --- # Version 22.6 .. toc:: ## Introduction This is the second release of the version 22 [release cycle](../../organization/policies.md#release-schedule). Version 22 will be "finalized" in the December long-term support version release. ## What to know More details in the [Changelog](https://sanic.readthedocs.io/en/stable/sanic/changelog.html). Notable new or breaking features, and what to upgrade... ### Automatic TLS setup in `DEBUG` mode The Sanic server can automatically setup a TLS certificate using either [mkcert](https://github.com/FiloSottile/mkcert) or [trustme](https://github.com/python-trio/trustme). This certificate will enable `https://localhost` (or another local address) for local development environments. You must install either `mkcert` or `trustme` on your own for this to work. .. column:: ``` $ sanic path.to.server:app --auto-tls --debug ``` .. column:: ```python app.run(debug=True, auto_tls=True) ``` This feature is not available when running in `ASGI` mode, or in `PRODUCTION` mode. When running Sanic in production, you should be using a real TLS certificate either purchased through a legitimate vendor, or using [Let's Encrypt](https://letsencrypt.org/). ### HTTP/3 Server 🚀 In June 2022, the IETF finalized and published [RFC 9114](https://www.rfc-editor.org/rfc/rfc9114.html), the specification for HTTP/3. In short, HTTP/3 is a **very** different protocol than HTTP/1.1 and HTTP/2 because it implements HTTP over UDP instead of TCP. The new HTTP protocol promises faster webpage load times and solving some of the problems of the older standards. You are encouraged to [read more about](https://http3-explained.haxx.se/) this new web technology. You likely will need to install a [capable client](https://curl.se/docs/http3.html) as traditional tooling will not work. Sanic server offers HTTP/3 support using [aioquic](https://github.com/aiortc/aioquic). This **must** be installed: ``` pip install sanic aioquic ``` ``` pip install sanic[http3] ``` To start HTTP/3, you must explicitly request it when running your application. .. column:: ``` $ sanic path.to.server:app --http=3 ``` ``` $ sanic path.to.server:app -3 ``` .. column:: ```python app.run(version=3) ``` To run both an HTTP/3 and HTTP/1.1 server simultaneously, you can use [application multi-serve](./v22.3.html#application-multi-serve) introduced in v22.3. .. column:: ``` $ sanic path.to.server:app --http=3 --http=1 ``` ``` $ sanic path.to.server:app -3 -1 ``` .. column:: ```python app.prepre(version=3) app.prepre(version=1) Sanic.serve() ``` Because HTTP/3 requires TLS, you cannot start a HTTP/3 server without a TLS certificate. You should [set it up yourself](../../guide/how-to/tls.md) or use `mkcert` if in `DEBUG` mode. Currently, automatic TLS setup for HTTP/3 is not compatible with `trustme`. **👶 This feature is being released as an *EARLY RELEASE FEATURE*.** It is **not** yet fully compliant with the HTTP/3 specification, lacking some features like [websockets](https://websockets.spec.whatwg.org/), [webtransport](https://w3c.github.io/webtransport/), and [push responses](https://http3-explained.haxx.se/en/h3/h3-push). Instead the intent of this release is to bring the existing HTTP request/response cycle towards feature parity with HTTP/3. Over the next several releases, more HTTP/3 features will be added and the API for it finalized. ### Consistent exception naming Some of the Sanic exceptions have been renamed to be more compliant with standard HTTP response names. - `InvalidUsage` >> `BadRequest` - `MethodNotSupported` >> `MethodNotAllowed` - `ContentRangeError` >> `RangeNotSatisfiable` All old names have been aliased and will remain backwards compatible. ### Current request getter Similar to the API to access an application (`Sanic.get_app()`), there is a new method for retrieving the current request when outside of a request handler. ```python from sanic import Request Request.get_current() ``` ### Improved API support for setting cache control headers The `file` response helper has some added parameters to make it easier to handle setting of the [Cache-Control](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control) header. ```python file( ..., last_modified=..., max_age=..., no_store=..., ) ``` ### Custom `loads` function Just like Sanic supports globally setting a custom `dumps`, you can now set a global custom `loads`. ```python from orjson import loads app = Sanic("Test", loads=loads) ``` ### Deprecations and Removals 1. *REMOVED* - Applications may no longer opt-out of the application registry 1. *REMOVED* - Custom exception handlers will no longer run after some part of an exception has been sent 1. *REMOVED* - Fallback error formats cannot be set on the `ErrorHandler` and must **only** be set in the `Config` 1. *REMOVED* - Setting a custom `LOGO` for startup is no longer allowed 1. *REMOVED* - The old `stream` response convenience method has been removed 1. *REMOVED* - `AsyncServer.init` is removed and no longer an alias of `AsyncServer.app.state.is_started` ## Thank you Thank you to everyone that participated in this release: :clap: [@ahopkins](https://github.com/ahopkins) [@amitay87](https://github.com/amitay87 ) [@ashleysommer](https://github.com/ashleysommer) [@azimovMichael](https://github.com/azimovMichael) [@ChihweiLHBird](https://github.com/ChihweiLHBird) [@kijk2869](https://github.com/kijk2869) [@prryplatypus](https://github.com/prryplatypus) [@SaidBySolo](https://github.com/SaidBySolo) [@sjsadowski](https://github.com/sjsadowski) [@timmo001](https://github.com/timmo001) [@zozzz](https://github.com/zozzz) --- If you enjoy the project, please consider contributing. Of course we love code contributions, but we also love contributions in any form. Consider writing some documentation, showing off use cases, joining conversations and making your voice known, and if you are able: [financial contributions](https://opencollective.com/sanic-org/). ================================================ FILE: guide/content/en/release-notes/2022/v22.9.md ================================================ --- title: Version 22.9 --- # Version 22.9 .. toc:: ## Introduction This is the third release of the version 22 [release cycle](../../organization/policies.md#release-schedule). Version 22 will be "finalized" in the December long-term support version release. ## What to know More details in the [Changelog](https://sanic.readthedocs.io/en/stable/sanic/changelog.html). Notable new or breaking features, and what to upgrade... ### ⚠ *IMPORTANT* - New worker manager 🚀 Sanic server has been overhauled to provide more consistency and flexbility in how it operates. More details about the motivations are outlined in [PR #2499](https://github.com/sanic-org/sanic/pull/2499) and discussed in a live stream [discussion held on YouTube](https://youtu.be/m8HCO8NK7HE). This **does NOT apply** to Sanic in ASGI mode #### Overview of the changes - The worker servers will **always** run in a child process. - Previously this could change depending upon one versus many workers, and the usage or not of the reloader. This should lead to much more predictable development environments that more closely match their production counterparts. - Multi-workers is **now supported on Windows**. - This was impossible because Sanic relied upon the `multiprocessing` module using `fork`, which is not available on Windows. - Now, Sanic will always use `spawn`. This does have some noticeable differences, particularly if you are running Sanic in the global scope with `app.run` (see below re: upgrade issues). - The application instance now has a new `multiplexer` object that can be used to restart one or many workers. This could, for example, be triggered by a request. - There is a new Inspector that can provide details on the state of your server. - Sanic worker manager can run arbitrary processes. - This allows developers to add any process they want from within Sanic. - Possible use cases: - Health monitor, see [Sanic Extensions]() - Logging queue, see [Sanic Extensions]() - Background worker queue in a seperate process - Running another application, like a bot - There is a new listener called: `main_process_ready`. It really should only be used for adding arbitrary processes to Sanic. - Passing shared objects between workers. - Python does allow some types of objects to share state between processes, whether through shared memory, pipes, etc. - Sanic will now allow these types of object to be shared on the `app.shared_ctx` object. - Since this feature relies upon Pythons `multiprocessing` library, it obviously will only work to share state between Sanic worker instances that are instantiated from the same execution. This is *not* meant to provide an API for horizontal scaling across multiple machines for example. #### Adding a shared context object To share an object between worker processes, it *MUST* be assigned inside of the `main_process_start` listener. ```python from multiprocessing import Queue @app.main_process_start async def main_process_start(app): app.shared_ctx.queue = Queue() ``` All objects on `shared_ctx` will be available now within each worker process. ```python @app.before_server_starts async def before_server_starts(app): assert isinstance(app.shared_ctx.queue, Queue) @app.on_request async def on_request(request): assert isinstance(request.app.shared_ctx.queue, Queue) @app.get("/") async def handler(request): assert isinstance(request.app.shared_ctx.queue, Queue) ``` *NOTE: Sanic will not stop you from registering an unsafe object, but may warn you. Be careful not to just add a regular list object, for example, and expect it to work. You should have an understanding of how to share state between processes.* #### Running arbitrary processes Sanic can run any arbitrary process for you. It should be capable of being stopped by a `SIGINT` or `SIGTERM` OS signal. These processes should be registered inside of the `main_process_ready` listener. ```python @app.main_process_ready async def ready(app: Sanic, _): app.manager.manage("MyProcess", my_process, {"foo": "bar"}) # app.manager.manage(, , ) ``` #### Inspector Sanic ships with an optional Inspector, which is a special process that allows for the CLI to inspect the running state of an application and issue commands. It currently will only work if the CLI is being run on the same machine as the Sanic instance. ``` sanic path.to:app --inspect ``` ![Sanic inspector](https://user-images.githubusercontent.com/166269/190099384-2f2f3fae-22d5-4529-b279-8446f6b5f9bd.png) The new CLI commands are: ``` --inspect Inspect the state of a running instance, human readable --inspect-raw Inspect the state of a running instance, JSON output --trigger-reload Trigger worker processes to reload --trigger-shutdown Trigger all processes to shutdown ``` This is not enabled by default. In order to have it available, you must opt in: ```python app.config.INSPECTOR = True ``` *Note: [Sanic Extensions]() provides a [custom request](../../guide/basics/app.md#custom-requests) class that will add a request counter to the server state. #### Application multiplexer Many of the same information and functionality is available on the application instance itself. There is a new `multiplexer` object on the application instance that has the ability to restart one or more workers, and fetch information about the current state. You can access it as `app.multiplexer`, or more likely by its short alias `app.m`. ```python @app.on_request async def print_state(request: Request): print(request.app.m.state) ``` #### Potential upgrade issues Because of the switch from `fork` to `spawn`, if you try running the server in the global scope you will receive an error. If you see something like this: ``` sanic.exceptions.ServerError: Sanic server could not start: [Errno 98] Address already in use. This may have happened if you are running Sanic in the global scope and not inside of a `if __name__ == "__main__"` block. ``` ... then the change is simple. Make sure `app.run` is inside a block. ```python if __name__ == "__main__": app.run(port=9999, dev=True) ``` #### Opting out of the new functionality If you would like to run Sanic without the new process manager, you may easily use the legacy runners. Please note that support for them **will be removed** in the future. A date has not yet been set, but will likely be sometime in 2023. To opt out of the new server and use the legacy, choose the appropriate method depending upon how you run Sanic: .. column:: If you use the CLI... .. column:: ``` sanic path.to:app --legacy ``` .. column:: If you use `app.run`... .. column:: ``` app.run(..., legacy=True) ``` .. column:: If you `app.prepare`... .. column:: ``` app.prepare(...) Sanic.serve_legacy() ``` Similarly, you can force Sanic to run in a single process. This however means there will not be any access to the auto-reloader. .. column:: If you use the CLI... .. column:: ``` sanic path.to:app --single-process ``` .. column:: If you use `app.run`... .. column:: ``` app.run(..., single_process=True) ``` .. column:: If you `app.prepare`... .. column:: ``` app.prepare(...) Sanic.serve_single() ``` ### Middleware priority Middleware is executed in an order based upon when it was defined. Request middleware are executed in sequence and response middleware in reverse. This could have an unfortunate impact if your ordering is strictly based upon import ordering with global variables for example. A new addition is to break-out of the strict construct and allow a priority to be assigned to a middleware. The higher the number for a middleware definition, the earlier in the sequence it will be executed. This applies to **both** request and response middleware. ```python @app.on_request async def low_priority(_): ... @app.on_request(priority=10) async def high_priority(_): ... ``` In the above example, even though `low_priority` is defined first, `high_priority` will run first. ### Custom `loads` function Sanic has supported the ability to add a [custom `dumps` function](https://sanic.readthedocs.io/en/stable/sanic/api/app.html#sanic.app.Sanic) when instantiating an app. The same functionality has been extended to `loads`, which will be used when deserializing. ```python from json import loads Sanic("Test", loads=loads) ``` ### Websocket objects are now iterable Rather than calling `recv` in a loop on a `Websocket` object, you can iterate on it in a `for` loop. ```python from sanic import Request, Websocket @app.websocket("/ws") async def ws_echo_handler(request: Request, ws: Websocket): async for msg in ws: await ws.send(msg) ``` ### Appropriately respond with 304 on static files When serving a static file, the Sanic server can respond appropriately to a request with `If-Modified-Since` using a `304` response instead of resending a file. ### Two new signals to wrap handler execution Two new [signals](../../guide/advanced/signals.md) have been added that wrap the execution of a request handler. - `http.handler.before` - runs after request middleware but before the route handler - `http.handler.after` - runs after the route handler - In *most* circumstances, this also means that it will run before response middleware. However, if you call `request.respond` from inside of a route handler, then your middleware will come first ### New Request properties for HTTP method information The HTTP specification defines which HTTP methods are: safe, idempotent, and cacheable. New properties have been added that will respond with a boolean flag to help identify the request property based upon the method. ```python request.is_safe request.is_idempotent request.is_cacheable ``` ### 🚨 *BREAKING CHANGE* - Improved cancel request exception In prior version of Sanic, if a `CancelledError` was caught it could bubble up and cause the server to respond with a `503`. This is not always the desired outcome, and it prevented the usage of that error in other circumstances. As a result, Sanic will now use a subclass of `CancelledError` called: `RequestCancelled` for this functionality. It likely should have little impact unless you were explicitly relying upon the old behavior. For more details on the specifics of these properties, checkout the [MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods). ### New deprecation warning filter You can control the level of deprecation warnings from Sanic using [standard library warning filter values](https://docs.python.org/3/library/warnings.html#the-warnings-filter). Default is `"once"`. ```python app.config.DEPRECATION_FILTER = "ignore" ``` ### Deprecations and Removals 1. *DEPRECATED* - Duplicate route names have been deprecated and will be removed in v23.3 1. *DEPRECATED* - Registering duplicate exception handlers has been deprecated and will be removed in v23.3 1. *REMOVED* - `route.ctx` not set by Sanic, and is a blank object for users, therefore ... - `route.ctx.ignore_body` >> `route.extra.ignore_body` - `route.ctx.stream` >> `route.extra.stream` - `route.ctx.hosts` >> `route.extra.hosts` - `route.ctx.static` >> `route.extra.static` - `route.ctx.error_format` >> `route.extra.error_format` - `route.ctx.websocket` >> `route.extra.websocket` 1. *REMOVED* - `app.debug` is READ-ONLY 1. *REMOVED* - `app.is_running` removed 1. *REMOVED* - `app.is_stopping` removed 1. *REMOVED* - `Sanic._uvloop_setting` removed 1. *REMOVED* - Prefixed environment variables will be ignored if not uppercase ## Thank you Thank you to everyone that participated in this release: :clap: [@ahopkins](https://github.com/ahopkins) [@azimovMichael](https://github.com/azimovMichael) [@ChihweiLHBird](https://github.com/ChihweiLHBird) [@huntzhan](https://github.com/huntzhan) [@monosans](https://github.com/monosans) [@prryplatypus](https://github.com/prryplatypus) [@SaidBySolo](https://github.com/SaidBySolo) [@seemethere](https://github.com/seemethere) [@sjsadowski](https://github.com/sjsadowski) [@timgates42](https://github.com/timgates42) [@Tronic](https://github.com/Tronic) --- If you enjoy the project, please consider contributing. Of course we love code contributions, but we also love contributions in any form. Consider writing some documentation, showing off use cases, joining conversations and making your voice known, and if you are able: [financial contributions](https://opencollective.com/sanic-org/). ================================================ FILE: guide/content/en/release-notes/2023/v23.12.md ================================================ --- title: Version 23.12 --- # Version 23.12 (LTS) .. toc:: ## Introduction This is the final release of the version 23 [release cycle](../../organization/policies.md#release-schedule). It is designated as a **long-term support ("LTS") release**, which means it will receive support for two years as stated in the support policy. If you run into any issues, please raise a concern on [GitHub](https://github.com/sanic-org/sanic/issues/new/choose.) ## What to know More details in the [Changelog](../changelog.html). Notable new or breaking features, and what to upgrade: ### 🎉 Documentation now using {span:has-text-primary:Sanic} ![](http://127.0.0.1:8000/assets/images/sanic-framework-logo-circle-128x128.png) You can read [all about how](/en/built-with-sanic.html), but we converted this documentation site to using the SHH 🤫 stack. - [Sanic](https://sanic.dev) - [html5tagger](https://github.com/sanic-org/html5tagger) - [HTMX](https://htmx.org/) ### 👶 *BETA* Welcome to the Sanic interactive console That's right, Sanic now ships with a REPL! ![](/assets/images/repl.png) When using the Sanic CLI, you can pass the `--repl` argument to automatically run an interactive console along side your application. This is extremely helpful while developing, and allows you access to the application instance, as well as a built-in client enabled to send HTTP requests to the running instance. If you use the `--dev` flag, this feature is quasi-enabled by default. While it will not outright run the REPL, it will start the process and allow you to enter the REPL at anytime by hitting `` on your keyboard. *This is still in BETA mode. We would appreciate you letting us know about any any enhancement requests or issues.* ### Python 3.12 support We have added Python 3.12 to the supported versions. ### Start and restart arbitrary processes Using the [multiplexer](../../guide/running/manager.md#access-to-the-multiplexer), you can now start and restart arbitrary or pre-existing processes. This enabled the following new features in the way the multiplexer and worker manager operate: 1. `multiplexer.restart("")` will now restart a targeted single process 2. `multiplexer.manage(...)` is a new method that works exactly like `manager.manage(...)` 3. The `manage` methods now have additional keyword arguments: - `tracked` - whether the state of the process is tracked after the process completes - `restartable` - whether the process should be allowed to be restarted - `auto_start` - whether the process should be started immediately after it is created ```python def task(n: int = 10, **kwargs): print("TASK STARTED", kwargs) for i in range(n): print(f"Running task - Step {i+1} of {n}") sleep(1) @app.get("/restart") async def restart_handler(request: Request): request.app.m.restart("Sanic-TEST-0") return json({"foo": request.app.m.name}) @app.get("/start") async def start_handler(request: Request): request.app.m.manage("NEW", task, kwargs={"n": 7}, workers=2) return json({"foo": request.app.m.name}) @app.main_process_ready def start_process(app: Sanic): app.manager.manage("TEST", task, kwargs={"n": 3}, restartable=True) ``` ### Prioritized listeners and signals In [v22.9](../2022/v22.9.md) Sanic added prioritization to middleware to allow arbitrary ordering of middleware. This same concept has now been extended to listeners and signals. This will allow a priority number to be assigned at creation time that will override its default position in the execution timeline. ```python @app.before_server_start(priority=3) async def sample(app): ... ``` The higher the number, the higher priority it will receive. Overall the rules for deciding the order of execution are as follows: 1. Priority in descending order 2. Application listeners before Blueprint listeners 3. Registration order *Remember, some listeners are executed in reverse order* ### Websocket signals We have added three new signals for websockets: 1. `websocket.handler.before` 2. `websocket.handler.after` 3. `websocket.handler.exception` ```python @app.signal("websocket.handler.before") async def ws_before(request: Request, websocket: Websocket): ... @app.signal("websocket.handler.after") async def ws_after(request: Request, websocket: Websocket): ... @app.signal("websocket.handler.exception") async def ws_exception( request: Request, websocket: Websocket, exception: Exception ): ... ``` ![](https://camo.githubusercontent.com/ea2894c88bedf37a4f12f129569e8fd14bfceaa36d4452c7b7a1869d2f1cdb18/68747470733a2f2f7a692e66692f77732d7369676e616c732e706e67) ### Simplified signals Sanic has always enforced a three part naming convention for signals: `one.two.three`. However, now you can create simpler names that are only a single part. ```python @app.signal("foo") async def foo(): ... ``` You can make that part dynamic just like with regular signals and routes: ```python @app.signal("") async def handler(**kwargs): print("foobar signal received") print(kwargs) @app.route("/") async def test(request: Request): await request.app.dispatch("foobar") return json({"hello": "world"}) ``` If you need to have multiple dynamic signals, then you should use the longer three-part format. ### The `event` method has been updated A number of changes have been made to both `app.event()` and `blueprint.event()`. - `condition` and `exclusive` are keywords to control matching conditions (similar to the `signal()` methods) - You can pass either a `str` or an `Enum` (just like `signal()`) - returns a copy of the context that was passed to the `dispatch()` method ### Reload trigger gets changed files The files changed by the reloader are now injected into the listener. This will allow the trigger to do something with knowledge of what those changed files were. ```python @app.after_reload_trigger async def after_reload_trigger(_, changed): print(changed) ``` ## Thank you Thank you to everyone that participated in this release: :clap: [@ahopkins](https://github.com/ahopkins) [@ChihweiLHBird](https://github.com/ChihweiLHBird) [@freddiewanah](https://github.com/freddiewanah) [@gluhar2006](https://github.com/gluhar2006) [@iAndriy](https://github.com/iAndriy) [@MichaelHinrichs](https://github.com/MichaelHinrichs) [@prryplatypus](https://github.com/prryplatypus) [@SaidBySolo](https://github.com/SaidBySolo) [@sjsadowski](https://github.com/sjsadowski) [@talljosh](https://github.com/talljosh) [@tjni](https://github.com/tjni) [@Tronic](https://github.com/Tronic) --- If you enjoy the project, please consider contributing. Of course we love code contributions, but we also love contributions in any form. Consider writing some documentation, showing off use cases, joining conversations and making your voice known, and if you are able: [financial contributions](https://opencollective.com/sanic-org/). ================================================ FILE: guide/content/en/release-notes/2023/v23.3.md ================================================ --- title: Version 23.3 --- # Version 23.3 .. toc:: ## Introduction This is the first release of the version 23 [release cycle](../../organization/policies.md#release-schedule). As such contains some deprecations and hopefully some *small* breaking changes. If you run into any issues, please raise a concern on [GitHub](https://github.com/sanic-org/sanic/issues/new/choose). ## What to know More details in the [Changelog](https://sanic.readthedocs.io/en/stable/sanic/changelog.html). Notable new or breaking features, and what to upgrade... ### Nicer traceback formatting The SCO adopted two projects into the Sanic namespace on GitHub: [tracerite](https://github.com/sanic-org/tracerite) and [html5tagger](https://github.com/sanic-org/html5tagger). These projects team up to provide and incredible new error page with more details to help the debugging process. This is provided out of the box, and will adjust to display only relevant information whether in DEBUG more or PROD mode. .. column:: **Using PROD mode** ![image](/assets/images/error-html-no-debug.png) .. column:: **Using DEBUG mode** ![image](/assets/images/error-html-debug.png) Light and dark mode HTML pages are available and will be used implicitly. ### Basic file browser on directories When serving a directory from a static handler, Sanic can be configured to show a basic file browser instead using `directory_view=True`. .. column:: ```python app.static("/uploads/", "/path/to/dir/", directory_view=True) ``` .. column:: ![image](/assets/images/directory-view.png) Light and dark mode HTML pages are available and will be used implicitly. ### HTML templating with Python Because Sanic is using [html5tagger](https://github.com/sanic-org/html5tagger) under the hood to render the [new error pages](#nicer-traceback-formatting), you now have the package available to you to easily generate HTML pages in Python code: .. column:: ```python from html5tagger import Document from sanic import Request, Sanic, html app = Sanic("TestApp") @app.get("/") async def handler(request: Request): doc = Document("My Website") doc.h1("Hello, world.") with doc.table(id="data"): doc.tr.th("First").th("Second").th("Third") doc.tr.td(1).td(2).td(3) doc.p(class_="text")("A paragraph with ") doc.a(href="/files")("a link")(" and ").em("formatting") return html(doc) ``` .. column:: ```html My Website

Hello, world.

First Second Third
1 2 3

A paragraph with a link and formatting ``` ### Auto-index serving is available on static handlers Sanic can now be configured to serve an index file when serving a static directory. ```python app.static("/assets/", "/path/to/some/dir", index="index.html") ``` When using the above, requests to `http://example.com/assets/` will automatically serve the `index.html` file located in that directory. ### Simpler CLI targets It is common practice for Sanic applications to use the variable `app` as the application instance. Because of this, the CLI application target (the second value of the `sanic` CLI command) now tries to infer the application instance based upon what the target is. If the target is a module that contains an `app` variable, it will use that. There are now four possible ways to launch a Sanic application from the CLI. #### 1. Application instance As normal, providing a path to a module and an application instance will work as expected. ```sh sanic path.to.module:app # global app instance ``` #### 2. Application factory Previously, to serve the factory pattern, you would need to use the `--factory` flag. This can be omitted now. ```sh sanic path.to.module:create_app # factory pattern ``` #### 3. Path to launch Sanic Simple Server Similarly, to launch the Sanic simple server (serve static directory), you previously needed to use the `--simple` flag. This can be omitted now, and instead simply provide the path to the directory. ```sh sanic ./path/to/directory/ # simple serve ``` #### 4. Python module containing an `app` variable As stated above, if the target is a module that contains an `app` variable, it will use that (assuming that `app` variable is a `Sanic` instance). ```sh sanic path.to.module # module with app instance ``` ### More convenient methods for setting and deleting cookies The old cookie pattern was awkward and clunky. It didn't look like regular Python because of the "magic" going on under the hood. .. column:: 😱 This is not intuitive and is confusing for newcomers. .. column:: ```python response = text("There's a cookie up in this response") response.cookies["test"] = "It worked!" response.cookies["test"]["domain"] = ".yummy-yummy-cookie.com" response.cookies["test"]["httponly"] = True ``` There are now new methods (and completely overhauled `Cookie` and `CookieJar` objects) to make this process more convenient. .. column:: 😌 Ahh... Much nicer. .. column:: ```python response = text("There's a cookie up in this response") response.add_cookie( "test", "It worked!", domain=".yummy-yummy-cookie.com", httponly=True ) ``` ### Better cookie compatibility Sanic has added support for [cookie prefixes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#cookie_prefixes), making it seemless and easy to read and write cookies with the values. While setting the cookie... ```py response.cookies.add_cookie("foo", "bar", host_prefix=True) ``` This will create the prefixed cookie: `__Host-foo`. However, when accessing the cookie on an incoming request, you can do so without knowing about the existence of the header. ```py request.cookies.get("foo") ``` It should also be noted, cookies can be accessed as properties just like [headers](#access-any-header-as-a-property). ```python request.cookies.foo ``` And, cookies are similar to the `request.args` and `request.form` objects in that multiple values can be retrieved using `getlist`. ```py request.cookies.getlist("foo") ``` Also added is support for creating [partitioned cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#partitioned_cookie). ```py response.cookies.add_cookie(..., partitioned=True) ``` ### 🚨 *BREAKING CHANGE* - More consistent and powerful `SanicException` Sanic has for a while included the `SanicException` as a base class exception. This could be extended to add `status_code`, etc. [See more details](http://localhost:8080/en/guide/best-practices/exceptions.html). **NOW**, using all of the various exceptions has become easier. The commonly used exceptions can be imported directly from the root level module. ```python from sanic import NotFound, Unauthorized, BadRequest, ServerError ``` In addition, all of these arguments are available as keyword arguments on every exception type: | argument | type | description | |--|--|--| | `quiet` | `bool` | Suppress the traceback from the logs | | `context` | `dict` | Additional information shown in error pages *always* | | `extra` | `dict` | Additional information shown in error pages in *DEBUG* mode | | `headers` | `dict` | Additional headers sent in the response | None of these are themselves new features. However, they are more consistent in how you can use them, thus creating a powerful way to control error responses directly. ```py raise ServerError(headers={"foo": "bar"}) ``` The part of this that is a breaking change is that some formerly positional arguments are now keyword only. You are encouraged to look at the specific implementations for each error in the [API documents](https://sanic.readthedocs.io/en/stable/sanic/api/exceptions.html#module-sanic.exceptions). ### 🚨 *BREAKING CHANGE* - Refresh `Request.accept` functionality to be more performant and spec-compliant Parsing od the `Accept` headers into the `Request.accept` accessor has been improved. If you were using this property and relying upon its equality operation, this has changed. You should probably transition to using the `request.accept.match()` method. ### Access any header as a property To simplify access to headers, you can access a raw (unparsed) version of the header as a property. The name of the header is the name of the property in all lowercase letters, and switching any hyphens (`-`) to underscores (`_`). For example: .. column:: ``` GET /foo/bar HTTP/1.1 Host: localhost User-Agent: curl/7.88.1 X-Request-ID: 123ABC ``` .. column:: ```py request.headers.host request.headers.user_agent request.headers.x_request_id ``` ### Consume `DELETE` body by default By default, the body of a `DELETE` request will now be consumed and read onto the `Request` object. This will make `body` available like on `POST`, `PUT`, and `PATCH` requests without any further action. ### Custom `CertLoader` for direct control of creating `SSLContext` Sometimes you may want to create your own `SSLContext` object. To do this, you can create your own subclass of `CertLoader` that will generate your desired context object. ```python from sanic.worker.loader import CertLoader class MyCertLoader(CertLoader): def load(self, app: Sanic) -> SSLContext: ... app = Sanic(..., certloader_class=MyCertLoader) ``` ### Deprecations and Removals 1. *DEPRECATED* - Dict-style cookie setting 1. *DEPRECATED* - Using existence of JSON data on the request for one factor in using JSON error formatter 1. *REMOVED* - Remove deprecated `__blueprintname__` property 1. *REMOVED* - duplicate route names 1. *REMOVED* - duplicate exception handler definitions 1. *REMOVED* - inspector CLI with flags 1. *REMOVED* - legacy server (including `sanic.server.serve_single` and `sanic.server.serve_multiple`) 1. *REMOVED* - serving directory with bytes string 1. *REMOVED* - `Request.request_middleware_started` 1. *REMOVED* - `Websocket.connection` #### Duplicated route names are no longer allowed In version 22.9, Sanic announced that v23.3 would deprecate allowing routes to be registered with duplicate names. If you see the following error, it is because of that change: > sanic.exceptions.ServerError: Duplicate route names detected: SomeApp.some_handler. You should rename one or more of them explicitly by using the `name` param, or changing the implicit name derived from the class and function name. For more details, please see https://sanic.dev/en/guide/release-notes/v23.3.html#duplicated-route-names-are-no-longer-allowed If you are seeing this, you should opt-in to using explicit names for your routes. .. column:: **BAD** ```python app = Sanic("SomeApp") @app.get("/") @app.get("/foo") async def handler(request: Request): ``` .. column:: **GOOD** ```python app = Sanic("SomeApp") @app.get("/", name="root") @app.get("/foo", name="foo") async def handler(request: Request): ``` #### Response cookies Response cookies act as a `dict` for compatibility purposes only. In version 24.3, all `dict` methods will be removed and response cookies will be objects only. Therefore, if you are using this pattern to set cookie properties, you will need to upgrade it before version 24.3. ```python resp = HTTPResponse() resp.cookies["foo"] = "bar" resp.cookies["foo"]["httponly"] = True ``` Instead, you should be using the `add_cookie` method: ```python resp = HTTPResponse() resp.add_cookie("foo", "bar", httponly=True) ``` #### Request cookies Sanic has added support for reading duplicated cookie keys to be more in compliance with RFC specifications. To retain backwards compatibility, accessing a cookie value using `__getitem__` will continue to work to fetch the first value sent. Therefore, in version 23.3 and prior versions this will be `True`. ```python assert request.cookies["foo"] == "bar" assert request.cookies.get("foo") == "bar" ``` Version 23.3 added `getlist` ```python assert request.cookies.getlist("foo") == ["bar"] ``` As stated above, the `get` and `getlist` methods are available similar to how they exist on other request properties (`request.args`, `request.form`, etc). Starting in v24.3, the `__getitem__` method for cookies will work exactly like those properties. This means that `__getitem__` will return a list of values. Therefore, if you are relying upon this functionality to return only one value, you should upgrade to the following pattern before v24.3. ```python assert request.cookies["foo"] == ["bar"] assert request.cookies.get("foo") == "bar" assert request.cookies.getlist("foo") == ["bar"] ``` ## Thank you Thank you to everyone that participated in this release: :clap: [@ahopkins](https://github.com/ahopkins) [@ChihweiLHBird](https://github.com/ChihweiLHBird) [@deounix](https://github.com/deounix) [@Kludex](https://github.com/Kludex) [@mbendiksen](https://github.com/mbendiksen) [@prryplatypus](https://github.com/prryplatypus) [@r0x0d](https://github.com/r0x0d) [@SaidBySolo](https://github.com/SaidBySolo) [@sjsadowski](https://github.com/sjsadowski) [@stricaud](https://github.com/stricaud) [@Tracyca209](https://github.com/Tracyca209) [@Tronic](https://github.com/Tronic) --- If you enjoy the project, please consider contributing. Of course we love code contributions, but we also love contributions in any form. Consider writing some documentation, showing off use cases, joining conversations and making your voice known, and if you are able: [financial contributions](https://opencollective.com/sanic-org/). ================================================ FILE: guide/content/en/release-notes/2023/v23.6.md ================================================ --- title: Version 23.6 --- # Version 23.6 .. toc:: ## Introduction This is the second release of the version 23 [release cycle](../../organization/policies.md#release-schedule). If you run into any issues, please raise a concern on [GitHub](https://github.com/sanic-org/sanic/issues/new/choose). ## What to know More details in the [Changelog](https://sanic.readthedocs.io/en/stable/sanic/changelog.html). Notable new or breaking features, and what to upgrade... ### Remove Python 3.7 support Python 3.7 is due to reach its scheduled upstream end-of-life on 2023-06-27. Sanic is now dropping support for Python 3.7, and requires Python 3.8 or newer. See [#2777](https://github.com/sanic-org/sanic/pull/2777). ### Resolve pypy compatibility issues A small patch was added to the `os` module to once again allow for Sanic to run with PyPy. This workaround replaces the missing `readlink` function (missing in PyPy `os` module) with the function `os.path.realpath`, which serves to the same purpose. See [#2782](https://github.com/sanic-org/sanic/pull/2782). ### Add custom typing to config and ctx objects The `sanic.Sanic` and `sanic.Request` object have become generic types that will make it more convenient to have fully typed `config` and `ctx` objects. In the most simple form, the `Sanic` object is typed as: ```python from sanic import Sanic app = Sanic("test") reveal_type(app) # N: Revealed type is "sanic.app.Sanic[sanic.config.Config, types.SimpleNamespace]" ``` .. tip:: Note It should be noted, there is *no* requirement to use the generic types. The default types are `sanic.config.Config` and `types.SimpleNamespace`. This new feature is just an option for those that want to use it and existing types of `app: Sanic` and `request: Request` should work just fine. Now it is possible to have a fully-type `app.config`, `app.ctx`, and `request.ctx` objects though generics. This allows for better integration with auto completion tools in IDEs improving the developer experience. ```python from sanic import Request, Sanic from sanic.config import Config class CustomConfig(Config): pass class Foo: pass class RequestContext: foo: Foo class CustomRequest(Request[Sanic[CustomConfig, Foo], RequestContext]): @staticmethod def make_context() -> RequestContext: ctx = RequestContext() ctx.foo = Foo() return ctx app = Sanic( "test", config=CustomConfig(), ctx=Foo(), request_class=CustomRequest ) @app.get("/") async def handler(request: CustomRequest): ... ``` As a side effect, now `request.ctx` is lazy initialized, which should reduce some overhead when the `request.ctx` is unused. One further change you may have noticed in the above snippet is the `make_context` method. This new method can be used by custom `Request` types to inject an object different from a `SimpleNamespace` similar to how Sanic has allowed custom application context objects for a while. For a more thorough discussion, see [custom typed application](../../guide/basics/app.md#custom-typed-application) and [custom typed request](../../guide/basics/app.md#custom-typed-request). See [#2785](https://github.com/sanic-org/sanic/pull/2785). ### Universal exception signal A new exception signal added for **ALL** exceptions raised while the server is running: `"server.exception.reporting"`. This is a universal signal that will be emitted for any exception raised, and dispatched as its own task. This means that it will *not* block the request handler, and will *not* be affected by any middleware. This is useful for catching exceptions that may occur outside of the request handler (for example in signals, or in a background task), and it intended for use to create a consistent error handling experience for the user. ```python from sanic.signals import Event @app.signal(Event.SERVER_LIFECYCLE_EXCEPTION) async def catch_any_exception(app: Sanic, exception: Exception): app.ctx.my_error_reporter_utility.error(exception) ``` This pattern can be simplified with a new decorator `@app.report_exception`: ```python @app.report_exception async def catch_any_exception(app: Sanic, exception: Exception): print("Caught exception:", exception) ``` It should be pointed out that this happens in a background task and is **NOT** for manipulation of an error response. It is only for reporting, logging, or other purposes that should be triggered when an application error occurs. See [#2724](https://github.com/sanic-org/sanic/pull/2724) and [#2792](https://github.com/sanic-org/sanic/pull/2792). ### Add name prefixing to BP groups Sanic had been raising a warning on duplicate route names for a while, and started to enforce route name uniqueness in [v23.3](https://sanic.dev/en/guide/release-notes/v23.3.html#deprecations-and-removals). This created a complication for blueprint composition. New name prefixing parameter for blueprints groups has been added to alleviate this issue. It allows nesting of blueprints and groups to make them composable. The addition is the new `name_prefix` parameter as shown in this snippet. ```python bp1 = Blueprint("bp1", url_prefix="/bp1") bp2 = Blueprint("bp2", url_prefix="/bp2") bp1.add_route(lambda _: ..., "/", name="route1") bp2.add_route(lambda _: ..., "/", name="route2") group_a = Blueprint.group( bp1, bp2, url_prefix="/group-a", name_prefix="group-a" ) group_b = Blueprint.group( bp1, bp2, url_prefix="/group-b", name_prefix="group-b" ) app = Sanic("TestApp") app.blueprint(group_a) app.blueprint(group_b) ``` The routes built will be named as follows: - `TestApp.group-a_bp1.route1` - `TestApp.group-a_bp2.route2` - `TestApp.group-b_bp1.route1` - `TestApp.group-b_bp2.route2` See [#2727](https://github.com/sanic-org/sanic/pull/2727). ### Add `request.client_ip` Sanic has introduced `request.client_ip`, a new accessor that provides client's IP address from both local and proxy data. It allows running the application directly on Internet or behind a proxy. This is equivalent to `request.remote_addr or request.ip`, providing the client IP regardless of how the application is deployed. See [#2790](https://github.com/sanic-org/sanic/pull/2790). ### Increase of `KEEP_ALIVE_TIMEOUT` default to 120 seconds The default `KEEP_ALIVE_TIMEOUT` value changed from 5 seconds to 120 seconds. It is of course still configurable, but this change should improve performance on long latency connections, where reconnecting is expensive, and better fits typical user flow browsing pages with longer-than-5-second intervals. Sanic has historically used 5 second timeouts to quickly close idle connections. The chosen value of **120 seconds** is indeed larger than Nginx default of 75, and is the same value that Caddy server has by default. Related to [#2531](https://github.com/sanic-org/sanic/issues/2531) and [#2681](https://github.com/sanic-org/sanic/issues/2681). See [#2670](https://github.com/sanic-org/sanic/pull/2670). ### Set multiprocessing start method early Due to how Python handles `multiprocessing`, it may be confusing to some users how to properly create synchronization primitives. This is due to how Sanic creates the `multiprocessing` context. This change sets the start method early so that any primitives created will properly attach to the correct context. For most users, this should not be noticeable or impactful. But, it should make creation of something like this easier and work as expected. ```python from multiprocessing import Queue @app.main_process_start async def main_process_start(app): app.shared_ctx.queue = Queue() ``` See [#2776](https://github.com/sanic-org/sanic/pull/2776). ## Thank you Thank you to everyone that participated in this release: :clap: [@ahopkins](https://github.com/ahopkins) [@ChihweiLHBird](https://github.com/ChihweiLHBird) [@chuckds](https://github.com/chuckds) [@deounix](https://github.com/deounix) [@guacs](https://github.com/guacs) [@liamcoatman](https://github.com/liamcoatman) [@moshe742](https://github.com/moshe742) [@prryplatypus](https://github.com/prryplatypus) [@SaidBySolo](https://github.com/SaidBySolo) [@Thirumalai](https://github.com/Thirumalai) [@Tronic](https://github.com/Tronic) --- If you enjoy the project, please consider contributing. Of course we love code contributions, but we also love contributions in any form. Consider writing some documentation, showing off use cases, joining conversations and making your voice known, and if you are able: [financial contributions](https://opencollective.com/sanic-org/). ================================================ FILE: guide/content/en/release-notes/2023/v23.9.md ================================================ --- title: Version 23.9 --- # Version 23.9 _Due to circumstances at the time, v.23.9 was skipped._ ================================================ FILE: guide/content/en/release-notes/2024/v24.12.md ================================================ --- title: Version 24.12 --- # Version 24.12 .. toc:: ## Introduction This is the first release of the version 24 [release cycle](../../organization/policies.md#release-schedule). The release cadence for v24 may be slightly altered from years past. Make sure to stay up to date in the Discord server for latest updates. If you run into any issues, please raise a concern on [GitHub](https://github.com/sanic-org/sanic/issues/new/choose). ## What to know More details in the [Changelog](../changelog.html). Notable new or breaking features, and what to upgrade: ### 👶 _BETA_ Custom CLI commands The `sanic` CLI utility now allows for custom commands to be invoked. Commands can be added using the decorator syntax below. ```python @app.command async def foo(one, two: str, three: str = "..."): logger.info(f"FOO {one=} {two=} {three=}") @app.command def bar(): logger.info("BAR") @app.command(name="qqq") async def baz(): logger.info("BAZ") ``` These are invoked using the `exec` command as follows. ```sh sanic server:app exec [--arg=value] ``` Any arguments in the function's signature will be added as arguments. For example: ```sh sanic server:app exec command --one=1 --two=2 --three=3 ``` .. warning:: This is in **BETA** and the functionality is subject to change in upcoming versions. ### Add Python 3.13 support We have added Python 3.13 to the supported versions. ### Remove Python 3.8 support Python 3.8 reached end-of-life. Sanic is now dropping support for Python 3.8, and requires Python 3.9 or newer. ### Old response cookie accessors removed Prior to v23, cookies on `Response` objects were set and accessed as dictionary objects. That was deprecated in v23.3 when the new [convenience methods](../2023/v23.3.html#more-convenient-methods-for-setting-and-deleting-cookies) were added. The old patterns have been removed. ## Thank you Thank you to everyone that participated in this release: :clap: [@ahopkins](https://github.com/ahopkins) [@C5H12O5](https://github.com/C5H12O5) [@ChihweiLHBird](https://github.com/ChihweiLHBird) [@HyperKiko](https://github.com/HyperKiko) [@imnotjames](https://github.com/imnotjames) [@pygeek](https://github.com/pygeek) --- If you enjoy the project, please consider contributing. Of course we love code contributions, but we also love contributions in any form. Consider writing some documentation, showing off use cases, joining conversations and making your voice known, and if you are able: [financial contributions](https://opencollective.com/sanic-org/). ================================================ FILE: guide/content/en/release-notes/2024/v24.6.md ================================================ --- title: Version 24.6 --- # Version 24.6 .. toc:: ## Introduction This is the first release of the version 24 [release cycle](../../organization/policies.md#release-schedule). The release cadence for v24 may be slightly altered from years past. Make sure to stay up to date in the Discord server for latest updates. If you run into any issues, please raise a concern on [GitHub](https://github.com/sanic-org/sanic/issues/new/choose). ## What to know More details in the [Changelog](../changelog.html). Notable new or breaking features, and what to upgrade: ### Logging improvements The default logging patterns have been cleaned up to make them much more developer-friendly when viewing from a terminal session. This includes the use of color and less verbose formatting. Sanic will select between two slight variations depending upon whether your server is in DEBUG mode. You can always opt to remove colors by using: ```python app.config.NO_COLOR = True ``` The color will automatically be stripped out from logs not in TTY terminal. Sanic will switch between the DEBUG and PROD formatters automatically using `sanic.logging.formatter.AutoFormatter` and `sanic.logging.formatter.AutoAccessFormatter`. Of course, you can force one version or the other using the appropriately named formatters #### In DEBUG mode ```python sanic.logging.formatter.DebugFormatter sanic.logging.formatter.DebugAccessFormatter ``` ![](/assets/images/logging-dev.png) #### In PROD mode ```python sanic.logging.formatter.ProdFormatter sanic.logging.formatter.ProdAccessFormatter ``` ![](/assets/images/logging-prod.png) #### Legacy If you prefer the old-style of logging, these have been preserved for you as logging formatters: `sanic.logging.formatter.LegacyFormatter` and `sanic.logging.formatter.LegacyAccessFormatter`. One way to implement these formatters: ```python from sanic.log import LOGGING_CONFIG_DEFAULTS LOGGING_CONFIG_DEFAULTS["formatters"] = { "generic": { "class": "sanic.logging.formatter.LegacyFormatter" }, "access": { "class": "sanic.logging.formatter.LegacyAccessFormatter" }, } ``` #### New JSON formatter There also is a new JSON log formatter that will output the logs in JSON format for integration with other third part logging platforms. ```python from sanic.log import LOGGING_CONFIG_DEFAULTS LOGGING_CONFIG_DEFAULTS["formatters"] = { "generic": { "class": "sanic.logging.formatter.JSONFormatter" }, "access": { "class": "sanic.logging.formatter.JSONAccessFormatter" }, } ``` ### Using Paths in unix sockets When creating a unix socket for your server, you can now perform that by passing a `pathlib.Path` object instead of just a string-based path ### Custom route names You can override the `generate_name` method on either a custom `Sanic` or a `Blueprint`. This will allow you to modify the route names at will. ```python from sanic import Sanic, text, class Custom(Sanic): def generate_name(self, *objects): existing = self._generate_name(*objects) return existing.upper() app = Sanic("Foo") @app.get("/") async def handler(request): return text(request.name) # FOO.HANDLER return app ``` ### 🚨 BREAKING CHANGES 1. `Request.cookies.getlist` always returns a `list`. This means when no cookie of `key` exists, it will be an empty `list` instead of `None`. Use `Request.cookies.getlist("something", None)` to retain existing behavior. ## Thank you Thank you to everyone that participated in this release: :clap: [@ahopkins](https://github.com/ahopkins) [@ashleysommer](https://github.com/ashleysommer) [@ChihweiLHBird](https://github.com/ChihweiLHBird) [@DeJayDev](https://github.com/DeJayDev) [@ekzhang](https://github.com/ekzhang) [@Huy-Ngo](https://github.com/Huy-Ngo) [@iAndriy](https://github.com/iAndriy) [@jakkaz](https://github.com/jakkaz) [@Nano112](https://github.com/Nano112) [@prryplatypus](https://github.com/prryplatypus) [@razodactyl](https://github.com/razodactyl) [@Tronic](https://github.com/Tronic) [@wieczorek1990](https://github.com/wieczorek1990) --- If you enjoy the project, please consider contributing. Of course we love code contributions, but we also love contributions in any form. Consider writing some documentation, showing off use cases, joining conversations and making your voice known, and if you are able: [financial contributions](https://opencollective.com/sanic-org/). ================================================ FILE: guide/content/en/release-notes/2025/v25.12.md ================================================ --- title: Version 25.12 (LTS) --- # Version 25.12 (LTS) .. toc:: ## Introduction Version 25.12 is the **Long Term Support (LTS)** release for the version 25 [release cycle](../../organization/policies.md#release-schedule). As an LTS release, it will receive security updates and critical bug fixes for an extended period. If you run into any issues, please raise a concern on [GitHub](https://github.com/sanic-org/sanic/issues/new/choose). ## What to know More details in the [Changelog](../changelog.html). Notable new or breaking features, and what to upgrade: ### Python 3.9 removed, Python 3.14 added Sanic now requires **Python 3.10 or newer**. Python 3.9 has been dropped, and Python 3.14 support has been added. ### Daemon mode You can now run Sanic as a background daemon process directly from the CLI. ```sh sanic path.to.app -D sanic path.to.app --daemon ``` This also introduces convenience commands for managing daemon processes: ```sh sanic path.to.app status # Check if running sanic path.to.app stop # Stop the daemon ``` Additional options are available: ```sh --pidfile PATH # Custom PID file location --logfile PATH # Log output to file --user USER # Run as specified user --group GROUP # Run as specified group ``` Lower-level commands are also available: ```sh sanic kill --pid= sanic kill --pidfile= sanic status --pid= sanic status --pidfile= ``` ### Symlink control for static files Sanic now provides granular control over symlinks in static file serving with two new parameters: | Parameter | Default | Description | |-------------------------------|---------|--------------------------------------------------------------------------------| | `follow_external_symlink_files` | `False` | Allow serving file symlinks that point outside the static root | | `follow_external_symlink_dirs` | `False` | Allow serving files from directory symlinks that point outside the static root | **Examples** Secure defaults (block external symlinks): ```python # Symlinks pointing outside /var/www/static will return 404 app.static("/static", "/var/www/static") ``` Allow file symlinks only: ```python # Serves /var/www/static/config.json -> /etc/app/config.json app.static("/static", "/var/www/static", follow_external_symlink_files=True) ``` Allow directory symlinks only: ```python # Serves files from /var/www/static/images/ -> /shared/images/ app.static("/static", "/var/www/static", follow_external_symlink_dirs=True) ``` ### Custom configuration converters You can now extend how Sanic parses environment variables into configuration values. By default, Sanic converts environment variables using `str`, `str_to_bool`, `float`, and `int` converters (tried in reverse order). You can add your own converters to handle custom types. **Simple converter** - a callable that takes a string and returns a converted value: ```python class UltimateAnswer: def __init__(self, answer): self.answer = int(answer) config = Config(converters=[UltimateAnswer]) app = Sanic("MyApp", config=config) # Or register after creation app.config.register_type(UltimateAnswer) ``` **DetailedConverter** - for converters that need more context (full key name, config key, value, and defaults): ```python from sanic.config import Config, DetailedConverter class TypeAwareConverter(DetailedConverter): def __call__(self, full_key: str, config_key: str, value: str, defaults: dict): if config_key in defaults: # Cast to the same type as the default value return type(defaults[config_key])(value) raise ValueError # Fall through to next converter config = Config( defaults={"PORT": 8000, "DEBUG": False}, converters=[TypeAwareConverter()] ) ``` ### Automatic charset for text content types Text content types (`text/*`) now automatically include `charset=UTF-8` when serving static files and file responses. ### Task creation returns the task When creating a task via `app.add_task()`, the asyncio `Task` object is now returned, allowing you to await or check its result later. ```python task = app.add_task(some_coroutine()) # Later... result = await task ``` ### Improved CLI error messages Tracerite has been upgraded to v2.2.0, providing better formatted exception tracebacks in the CLI with improved chained exception display. ## Thank you Thank you to everyone that participated in this release: :clap: [@ahopkins](https://github.com/ahopkins) [@amarquard089](https://github.com/amarquard089) [@ChihweiLHBird](https://github.com/ChihweiLHBird) [@dhensen](https://github.com/dhensen) [@dungarpan](https://github.com/dungarpan) [@gazpachoking](https://github.com/gazpachoking) [@helioascorreia](https://github.com/helioascorreia) [@jameslovespancakes](https://github.com/jameslovespancakes) [@Peopl3s](https://github.com/Peopl3s) [@tdaron](https://github.com/tdaron) [@tiejunhu](https://github.com/tiejunhu) [@tkosman](https://github.com/tkosman) [@Tronic](https://github.com/Tronic) [@wojonet](https://github.com/wojonet) --- If you enjoy the project, please consider contributing. Of course we love code contributions, but we also love contributions in any form. Consider writing some documentation, showing off use cases, joining conversations and making your voice known, and if you are able: [financial contributions](https://opencollective.com/sanic-org/). ================================================ FILE: guide/content/en/release-notes/2025/v25.3.md ================================================ --- title: Version 25.3 --- # Version 25.3 .. toc:: ## Introduction This is the first release of the version 25 [release cycle](../../organization/policies.md#release-schedule). The release cadence for v24 may be slightly altered from years past. Make sure to stay up to date in the Discord server for latest updates. If you run into any issues, please raise a concern on [GitHub](https://github.com/sanic-org/sanic/issues/new/choose). ## What to know More details in the [Changelog](../changelog.html). Notable new or breaking features, and what to upgrade: ### REPL Context In [v23.12](../2023/v23.12.md#-embetaem-welcome-to-the-sanic-interactive-console) we introduced the [Development REPL](/en/guide/running/development.html#development-repl). The goal was to allow you to enter into an enhanced Python REPL from inside your running Sanic application. One of its features is several built-ins to allow you to easily interact with your app and with Sanic. You now can add your own custom objects to the REPL ```python import os def foo(): """This docstring will show in the REPL""" app.repl_ctx.foo = foo app.repl_ctx.os = os ``` There is also a lower-level API that you can use if (for example) you want to control the help test displayed in the REPL for your objects: ```python app.repl_ctx.add(foo) app.repl_ctx.add(os, desc="Standard os module.") ``` ## Thank you Thank you to everyone that participated in this release: :clap: [@ahopkins](https://github.com/ahopkins) [@erhuabushuo](https://github.com/erhuabushuo) [@eric-spitler](https://github.com/eric-spitler) [@goodki-d](https://github.com/goodki-d) [@SaidBySolo](https://github.com/SaidBySolo) --- If you enjoy the project, please consider contributing. Of course we love code contributions, but we also love contributions in any form. Consider writing some documentation, showing off use cases, joining conversations and making your voice known, and if you are able: [financial contributions](https://opencollective.com/sanic-org/). ================================================ FILE: guide/content/en/release-notes/changelog.md ================================================ --- content_class: changelog --- # Changelog 🔶 Current release 🔷 In support LTS release ## Version 25.12.0 🔶 _Current LTS version_ ### Features - [#3071](https://github.com/sanic-org/sanic/pull/3071) Add automatic `charset=UTF-8` to text content types - [#3079](https://github.com/sanic-org/sanic/pull/3079) Add `DetailedConverter` for advanced environment variable conversion - [#3080](https://github.com/sanic-org/sanic/pull/3080) Update `str_to_bool` function to include `nope` as a valid false value - [#3102](https://github.com/sanic-org/sanic/pull/3102) Better server error messaging - [#3110](https://github.com/sanic-org/sanic/pull/3110) Add daemon mode to Sanic CLI - [#3114](https://github.com/sanic-org/sanic/pull/3114) Return task when creating a task - [#3117](https://github.com/sanic-org/sanic/pull/3117) Explicit symlink params for static files/dirs ### Bugfixes - [#3064](https://github.com/sanic-org/sanic/pull/3064) Change the log type to debug - [#3068](https://github.com/sanic-org/sanic/pull/3068) Silent on `RuntimeError` when `write_eof` - [#3077](https://github.com/sanic-org/sanic/pull/3077) Fix `WorkerManager.kill` on Windows - [#3085](https://github.com/sanic-org/sanic/pull/3085) Fix `AttributeError` in `close_if_idle()` when `_http` is not initialized - [#3086](https://github.com/sanic-org/sanic/pull/3086) Fix race condition in worker restart causing spawn failure - [#3088](https://github.com/sanic-org/sanic/pull/3088) Fixing bad term cleanup at exit - [#3119](https://github.com/sanic-org/sanic/pull/3119) Fix static file serving for directories with CJK characters - [#3120](https://github.com/sanic-org/sanic/pull/3120) Respect `LOG_EXTRA` in all cases - [#3121](https://github.com/sanic-org/sanic/pull/3121) Respect `KEEP_ALIVE` config - [#3122](https://github.com/sanic-org/sanic/pull/3122) Check state in shutdown for handling uvloop double kill ### Deprecations and Removals - [#3115](https://github.com/sanic-org/sanic/pull/3115) Remove Python 3.9 support and add Python 3.14 ### Developer infrastructure - [#3083](https://github.com/sanic-org/sanic/pull/3083) Add typing for parameters of constructor of `WorkerManager` - [#3084](https://github.com/sanic-org/sanic/pull/3084) Create baseline for bandit to remove false positives - [#3091](https://github.com/sanic-org/sanic/pull/3091) Use secrets for generating unique ping payloads - [#3094](https://github.com/sanic-org/sanic/pull/3094) Add some typing and fix some tests - [#3095](https://github.com/sanic-org/sanic/pull/3095) Update required Python to >=3.10 - [#3101](https://github.com/sanic-org/sanic/pull/3101) Upgrade tracerite to latest - [#3107](https://github.com/sanic-org/sanic/pull/3107) Testing improvements - [#3108](https://github.com/sanic-org/sanic/pull/3108) Move to 2-stage coverage check - [#3109](https://github.com/sanic-org/sanic/pull/3109) Bump `dawidd6/action-download-artifact` from 3 to 6 ### Improved Documentation - [#3035](https://github.com/sanic-org/sanic/pull/3035) Fixes `sanic_ext` openapi component documentation - [#3054](https://github.com/sanic-org/sanic/pull/3054) Fix 'how we built sanic' sidebar link - [#3056](https://github.com/sanic-org/sanic/pull/3056) Fix broken link in website - [#3057](https://github.com/sanic-org/sanic/pull/3057) Add correct path for Contribution guidelines - [#3065](https://github.com/sanic-org/sanic/pull/3065) Fixed incorrect links throughout the documentation - [#3066](https://github.com/sanic-org/sanic/pull/3066) Single letter typo fix for request.md documentation ## Version 25.3.0 ### Features - [#3030](https://github.com/sanic-org/sanic/pull/3030) Improve `websockets` import ordering - [#3042](https://github.com/sanic-org/sanic/pull/3042) Add REPL context - [#3046](https://github.com/sanic-org/sanic/pull/3046) Support latest v14 `websockets` - [#3049](https://github.com/sanic-org/sanic/pull/3049) Subclassing `HTTPMethodView` to allow generics ### Bugfixes - [#3047](https://github.com/sanic-org/sanic/pull/3047) Add default to `response.cookies` - [#3048](https://github.com/sanic-org/sanic/pull/3048) Add exception logging on connection auto close ### Developer infrastructure - [#3023](https://github.com/sanic-org/sanic/pull/3023) Cleanup from Python 3.8 removal - [#3024](https://github.com/sanic-org/sanic/pull/3024) Improve type hinting - [#3028](https://github.com/sanic-org/sanic/pull/3028) Add missing tests - [#3041](https://github.com/sanic-org/sanic/pull/3041) Improve GitHub Actions checks ## Version 24.12.0 🔷 ### Features - [#3019](https://github.com/sanic-org/sanic/pull/3019) Add custom commands to `sanic` CLI ### Bugfixes - [#2992](https://github.com/sanic-org/sanic/pull/2992) Fix `mixins.startup.serve` UnboundLocalError - [#3000](https://github.com/sanic-org/sanic/pull/3000) Fix type annocation for `JSONResponse` method for return type `bytes` allowed for `dumps` callable - [#3009](https://github.com/sanic-org/sanic/pull/3009) Fix `SanicException.quiet` attribute handling when set to `False` - [#3014](https://github.com/sanic-org/sanic/pull/3014) Cleanup some typing - [#3015](https://github.com/sanic-org/sanic/pull/3015) Kill the entire process group if applicable - [#3016](https://github.com/sanic-org/sanic/pull/3016) Fix incompatible type annotation of get method in the HTTPMethodView class ### Deprecations and Removals - [#3020](https://github.com/sanic-org/sanic/pull/3020) Remove Python 3.8 support ### Developer infrastructure - [#3017](https://github.com/sanic-org/sanic/pull/3017) Cleanup setup.cfg ### Improved Documentation - [#3007](https://github.com/sanic-org/sanic/pull/3007) Fix typo in documentation for `sanic-ext` ## Version 24.6.0 ### Features - [#2838](https://github.com/sanic-org/sanic/pull/2838) Simplify request cookies `getlist` - [#2850](https://github.com/sanic-org/sanic/pull/2850) Unix sockets can now use `pathlib.Path` - [#2931](https://github.com/sanic-org/sanic/pull/2931) [#2958](https://github.com/sanic-org/sanic/pull/2958) Logging improvements - [#2947](https://github.com/sanic-org/sanic/pull/2947) Make the .message field on exceptions non-empty - [#2961](https://github.com/sanic-org/sanic/pull/2961) [#2964](https://github.com/sanic-org/sanic/pull/2964) Allow for custom name generation ### Bugfixes - [#2919](https://github.com/sanic-org/sanic/pull/2919) Remove deprecation notice in websockets - [#2937](https://github.com/sanic-org/sanic/pull/2937) Resolve response streaming error when in ASGI mode - [#2959](https://github.com/sanic-org/sanic/pull/2959) Resolve Python 3.12 deprecation notic - [#2960](https://github.com/sanic-org/sanic/pull/2960) Ensure proper intent for noisy exceptions - [#2970](https://github.com/sanic-org/sanic/pull/2970) [#2978](https://github.com/sanic-org/sanic/pull/2978) Fix missing dependencies for 3.12 - [#2971](https://github.com/sanic-org/sanic/pull/2971) Fix middleware exceptions on Not Found routes with error in middleware - [#2973](https://github.com/sanic-org/sanic/pull/2973) Resolve cheduling logic for `transport.close` and `transport.abort` - [#2976](https://github.com/sanic-org/sanic/pull/2976) Fix deleting a cookie that was created with `secure=False` - [#2979](https://github.com/sanic-org/sanic/pull/2979) Throw error on bad body length - [#2980](https://github.com/sanic-org/sanic/pull/2980) Throw error on bad body encoding ### Deprecations and Removals - [#2899](https://github.com/sanic-org/sanic/pull/2899) Remove erroneous line from REPL impacting environments without HTTPX - [#2962](https://github.com/sanic-org/sanic/pull/2962) Merge entity header removal ### Developer infrastructure - [#2882](https://github.com/sanic-org/sanic/pull/2882) [#2896](https://github.com/sanic-org/sanic/pull/2896) Apply dynamic port fixture for improving tests with port selection - [#2887](https://github.com/sanic-org/sanic/pull/2887) Updates to docker image builds - [#2932](https://github.com/sanic-org/sanic/pull/2932) Cleanup code base with Ruff ### Improved Documentation - [#2924](https://github.com/sanic-org/sanic/pull/2924) Cleanup markdown on html5tagger page - [#2930](https://github.com/sanic-org/sanic/pull/2930) Cleanup typo on Sanic Extensions README.md - [#2934](https://github.com/sanic-org/sanic/pull/2934) Add more context to the health check documents - [#2936](https://github.com/sanic-org/sanic/pull/2936) Improve worker manager documentation - [#2955](https://github.com/sanic-org/sanic/pull/2955) Fixed wrong formatting in `request.md` ## Version 23.12.0 🔷 ### Features - [#2775](https://github.com/sanic-org/sanic/pull/2775) Start and restart arbitrary processes - [#2811](https://github.com/sanic-org/sanic/pull/2811) Cleaner process management in shutdown - [#2812](https://github.com/sanic-org/sanic/pull/2812) Suppress task cancel traceback on open websocket - [#2822](https://github.com/sanic-org/sanic/pull/2822) Listener and signal prioritization - [#2831](https://github.com/sanic-org/sanic/pull/2831) Reduce memory consumption - [#2837](https://github.com/sanic-org/sanic/pull/2837) Accept bare cookies - [#2841](https://github.com/sanic-org/sanic/pull/2841) Add `websocket.handler.` signals - [#2805](https://github.com/sanic-org/sanic/pull/2805) Add changed files to reload trigger listeners - [#2813](https://github.com/sanic-org/sanic/pull/2813) Allow for simple signals - [#2827](https://github.com/sanic-org/sanic/pull/2827) Improve functionality and consistency of `Sanic.event()` - [#2851](https://github.com/sanic-org/sanic/pull/2851) Allow range requests for a single byte - [#2854](https://github.com/sanic-org/sanic/pull/2854) Better `Request.scheme` for websocket requests - [#2858](https://github.com/sanic-org/sanic/pull/2858) Convert Sanic `Request` to a Websockets `Request` for handshake - [#2859](https://github.com/sanic-org/sanic/pull/2859) Add a REPL to the `sanic` CLI - [#2870](https://github.com/sanic-org/sanic/pull/2870) Add Python 3.12 support - [#2875](https://github.com/sanic-org/sanic/pull/2875) Better exception on multiprocessing context conflicts ### Bugfixes - [#2803](https://github.com/sanic-org/sanic/pull/2803) Fix MOTD display for extra data ### Developer infrastructure - [#2796](https://github.com/sanic-org/sanic/pull/2796) Refactor unit test cases - [#2801](https://github.com/sanic-org/sanic/pull/2801) Fix `test_fast` when there is only one CPU - [#2807](https://github.com/sanic-org/sanic/pull/2807) Add constraint for autodocsum (lint issue in old package version) - [#2808](https://github.com/sanic-org/sanic/pull/2808) Refactor GitHub Actions - [#2814](https://github.com/sanic-org/sanic/pull/2814) Run CI pipeline on git push - [#2846](https://github.com/sanic-org/sanic/pull/2846) Drop old performance tests/benchmarks - [#2848](https://github.com/sanic-org/sanic/pull/2848) Makefile cleanup - [#2865](https://github.com/sanic-org/sanic/pull/2865) [#2869](https://github.com/sanic-org/sanic/pull/2869) [#2872](https://github.com/sanic-org/sanic/pull/2872) [#2879](https://github.com/sanic-org/sanic/pull/2879) Add ruff to toolchain - [#2866](https://github.com/sanic-org/sanic/pull/2866) Fix the alt svc test to run locally with explicit buffer nbytes - [#2877](https://github.com/sanic-org/sanic/pull/2877) Use Python's trusted publisher in deployments - [#2882](https://github.com/sanic-org/sanic/pull/2882) Introduce dynamic port fixture in targeted locations in the test suite ### Improved Documentation - [#2781](https://github.com/sanic-org/sanic/pull/2781) [#2821](https://github.com/sanic-org/sanic/pull/2821) [#2861](https://github.com/sanic-org/sanic/pull/2861) [#2863](https://github.com/sanic-org/sanic/pull/2863) Conversion of User Guide to the SHH (Sanic, html5tagger, HTMX) stack - [#2810](https://github.com/sanic-org/sanic/pull/2810) Update README - [#2855](https://github.com/sanic-org/sanic/pull/2855) Edit Discord badge - [#2864](https://github.com/sanic-org/sanic/pull/2864) Adjust documentation for using state properties within http/https redirection document ## Version 23.9.0 _Due to circumstances at the time, v.23.9 was skipped._ ## Version 23.6.0 ### Features - [#2670](https://github.com/sanic-org/sanic/pull/2670) Increase `KEEP_ALIVE_TIMEOUT` default to 120 seconds - [#2716](https://github.com/sanic-org/sanic/pull/2716) Adding allow route overwrite option in blueprint - [#2724](https://github.com/sanic-org/sanic/pull/2724) and [#2792](https://github.com/sanic-org/sanic/pull/2792) Add a new exception signal for ALL exceptions raised anywhere in application - [#2727](https://github.com/sanic-org/sanic/pull/2727) Add name prefixing to BP groups - [#2754](https://github.com/sanic-org/sanic/pull/2754) Update request type on middleware types - [#2770](https://github.com/sanic-org/sanic/pull/2770) Better exception message on startup time application induced import error - [#2776](https://github.com/sanic-org/sanic/pull/2776) Set multiprocessing start method early - [#2785](https://github.com/sanic-org/sanic/pull/2785) Add custom typing to config and ctx objects - [#2790](https://github.com/sanic-org/sanic/pull/2790) Add `request.client_ip` ### Bugfixes - [#2728](https://github.com/sanic-org/sanic/pull/2728) Fix traversals for intended results - [#2729](https://github.com/sanic-org/sanic/pull/2729) Handle case when headers argument of ResponseStream constructor is None - [#2737](https://github.com/sanic-org/sanic/pull/2737) Fix type annotation for `JSONREsponse` default content type - [#2740](https://github.com/sanic-org/sanic/pull/2740) Use Sanic's serializer for JSON responses in the Inspector - [#2760](https://github.com/sanic-org/sanic/pull/2760) Support for `Request.get_current` in ASGI mode - [#2773](https://github.com/sanic-org/sanic/pull/2773) Alow Blueprint routes to explicitly define error_format - [#2774](https://github.com/sanic-org/sanic/pull/2774) Resolve headers on different renderers - [#2782](https://github.com/sanic-org/sanic/pull/2782) Resolve pypy compatibility issues ### Deprecations and Removals - [#2777](https://github.com/sanic-org/sanic/pull/2777) Remove Python 3.7 support ### Developer infrastructure - [#2766](https://github.com/sanic-org/sanic/pull/2766) Unpin setuptools version - [#2779](https://github.com/sanic-org/sanic/pull/2779) Run keep alive tests in loop to get available port ### Improved Documentation - [#2741](https://github.com/sanic-org/sanic/pull/2741) Better documentation examples about running Sanic From that list, the items to highlight in the release notes: ## Version 23.3.0 ### Features - [#2545](https://github.com/sanic-org/sanic/pull/2545) Standardize init of exceptions for more consistent control of HTTP responses using exceptions - [#2606](https://github.com/sanic-org/sanic/pull/2606) Decode headers as UTF-8 also in ASGI - [#2646](https://github.com/sanic-org/sanic/pull/2646) Separate ASGI request and lifespan callables - [#2659](https://github.com/sanic-org/sanic/pull/2659) Use ``FALLBACK_ERROR_FORMAT`` for handlers that return ``empty()`` - [#2662](https://github.com/sanic-org/sanic/pull/2662) Add basic file browser (HTML page) and auto-index serving - [#2667](https://github.com/sanic-org/sanic/pull/2667) Nicer traceback formatting (HTML page) - [#2668](https://github.com/sanic-org/sanic/pull/2668) Smarter error page rendering format selection; more reliant upon header and "common sense" defaults - [#2680](https://github.com/sanic-org/sanic/pull/2680) Check the status of socket before shutting down with ``SHUT_RDWR`` - [#2687](https://github.com/sanic-org/sanic/pull/2687) Refresh ``Request.accept`` functionality to be more performant and spec-compliant - [#2696](https://github.com/sanic-org/sanic/pull/2696) Add header accessors as properties ``` Example-Field: Foo, Bar Example-Field: Baz ``` ```python request.headers.example_field == "Foo, Bar,Baz" ``` - [#2700](https://github.com/sanic-org/sanic/pull/2700) Simpler CLI targets ```sh $ sanic path.to.module:app # global app instance $ sanic path.to.module:create_app # factory pattern $ sanic ./path/to/directory/ # simple serve ``` - [#2701](https://github.com/sanic-org/sanic/pull/2701) API to define a number of workers in managed processes - [#2704](https://github.com/sanic-org/sanic/pull/2704) Add convenience for dynamic changes to routing - [#2706](https://github.com/sanic-org/sanic/pull/2706) Add convenience methods for cookie creation and deletion ```python response = text("...") response.add_cookie("test", "It worked!", domain=".yummy-yummy-cookie.com") ``` - [#2707](https://github.com/sanic-org/sanic/pull/2707) Simplified ``parse_content_header`` escaping to be RFC-compliant and remove outdated FF hack - [#2710](https://github.com/sanic-org/sanic/pull/2710) Stricter charset handling and escaping of request URLs - [#2711](https://github.com/sanic-org/sanic/pull/2711) Consume body on ``DELETE`` by default - [#2719](https://github.com/sanic-org/sanic/pull/2719) Allow ``password`` to be passed to TLS context - [#2720](https://github.com/sanic-org/sanic/pull/2720) Skip middleware on ``RequestCancelled`` - [#2721](https://github.com/sanic-org/sanic/pull/2721) Change access logging format to ``%s`` - [#2722](https://github.com/sanic-org/sanic/pull/2722) Add ``CertLoader`` as application option for directly controlling ``SSLContext`` objects - [#2725](https://github.com/sanic-org/sanic/pull/2725) Worker sync state tolerance on race condition ### Bugfixes - [#2651](https://github.com/sanic-org/sanic/pull/2651) ASGI websocket to pass thru bytes as is - [#2697](https://github.com/sanic-org/sanic/pull/2697) Fix comparison between datetime aware and naive in ``file`` when using ``If-Modified-Since`` ### Deprecations and Removals - [#2666](https://github.com/sanic-org/sanic/pull/2666) Remove deprecated ``__blueprintname__`` property ### Improved Documentation - [#2712](https://github.com/sanic-org/sanic/pull/2712) Improved example using ``'https'`` to create the redirect ## Version 22.12.0 _Current LTS version_ ### Features - [#2569](https://github.com/sanic-org/sanic/pull/2569) Add `JSONResponse` class with some convenient methods when updating a response object - [#2598](https://github.com/sanic-org/sanic/pull/2598) Change `uvloop` requirement to `>=0.15.0` - [#2609](https://github.com/sanic-org/sanic/pull/2609) Add compatibility with `websockets` v11.0 - [#2610](https://github.com/sanic-org/sanic/pull/2610) Kill server early on worker error - Raise deadlock timeout to 30s - [#2617](https://github.com/sanic-org/sanic/pull/2617) Scale number of running server workers - [#2621](https://github.com/sanic-org/sanic/pull/2621) [#2634](https://github.com/sanic-org/sanic/pull/2634) Send `SIGKILL` on subsequent `ctrl+c` to force worker exit - [#2622](https://github.com/sanic-org/sanic/pull/2622) Add API to restart all workers from the multiplexer - [#2624](https://github.com/sanic-org/sanic/pull/2624) Default to `spawn` for all subprocesses unless specifically set: ```python from sanic import Sanic Sanic.start_method = "fork" ``` - [#2625](https://github.com/sanic-org/sanic/pull/2625) Filename normalisation of form-data/multipart file uploads - [#2626](https://github.com/sanic-org/sanic/pull/2626) Move to HTTP Inspector: - Remote access to inspect running Sanic instances - TLS support for encrypted calls to Inspector - Authentication to Inspector with API key - Ability to extend Inspector with custom commands - [#2632](https://github.com/sanic-org/sanic/pull/2632) Control order of restart operations - [#2633](https://github.com/sanic-org/sanic/pull/2633) Move reload interval to class variable - [#2636](https://github.com/sanic-org/sanic/pull/2636) Add `priority` to `register_middleware` method - [#2639](https://github.com/sanic-org/sanic/pull/2639) Add `unquote` to `add_route` method - [#2640](https://github.com/sanic-org/sanic/pull/2640) ASGI websockets to receive `text` or `bytes` ### Bugfixes - [#2607](https://github.com/sanic-org/sanic/pull/2607) Force socket shutdown before close to allow rebinding - [#2590](https://github.com/sanic-org/sanic/pull/2590) Use actual `StrEnum` in Python 3.11+ - [#2615](https://github.com/sanic-org/sanic/pull/2615) Ensure middleware executes only once per request timeout - [#2627](https://github.com/sanic-org/sanic/pull/2627) Crash ASGI application on lifespan failure - [#2635](https://github.com/sanic-org/sanic/pull/2635) Resolve error with low-level server creation on Windows ### Deprecations and Removals - [#2608](https://github.com/sanic-org/sanic/pull/2608) [#2630](https://github.com/sanic-org/sanic/pull/2630) Signal conditions and triggers saved on `signal.extra` - [#2626](https://github.com/sanic-org/sanic/pull/2626) Move to HTTP Inspector - 🚨 *BREAKING CHANGE*: Moves the Inspector to a Sanic app from a simple TCP socket with a custom protocol - *DEPRECATE*: The `--inspect*` commands have been deprecated in favor of `inspect ...` commands - [#2628](https://github.com/sanic-org/sanic/pull/2628) Replace deprecated `distutils.strtobool` ### Developer infrastructure - [#2612](https://github.com/sanic-org/sanic/pull/2612) Add CI testing for Python 3.11 ## Version 22.9.1 ### Features - [#2585](https://github.com/sanic-org/sanic/pull/2585) Improved error message when no applications have been registered ### Bugfixes - [#2578](https://github.com/sanic-org/sanic/pull/2578) Add certificate loader for in process certificate creation - [#2591](https://github.com/sanic-org/sanic/pull/2591) Do not use sentinel identity for `spawn` compatibility - [#2592](https://github.com/sanic-org/sanic/pull/2592) Fix properties in nested blueprint groups - [#2595](https://github.com/sanic-org/sanic/pull/2595) Introduce sleep interval on new worker reloader ### Deprecations and Removals ### Developer infrastructure - [#2588](https://github.com/sanic-org/sanic/pull/2588) Markdown templates on issue forms ### Improved Documentation - [#2556](https://github.com/sanic-org/sanic/pull/2556) v22.9 documentation - [#2582](https://github.com/sanic-org/sanic/pull/2582) Cleanup documentation on Windows support ## Version 22.9.0 ### Features - [#2445](https://github.com/sanic-org/sanic/pull/2445) Add custom loads function - [#2490](https://github.com/sanic-org/sanic/pull/2490) Make `WebsocketImplProtocol` async iterable - [#2499](https://github.com/sanic-org/sanic/pull/2499) Sanic Server WorkerManager refactor - [#2506](https://github.com/sanic-org/sanic/pull/2506) Use `pathlib` for path resolution (for static file serving) - [#2508](https://github.com/sanic-org/sanic/pull/2508) Use `path.parts` instead of `match` (for static file serving) - [#2513](https://github.com/sanic-org/sanic/pull/2513) Better request cancel handling - [#2516](https://github.com/sanic-org/sanic/pull/2516) Add request properties for HTTP method info: - `request.is_safe` - `request.is_idempotent` - `request.is_cacheable` - *See* [MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods) *for more information about when these apply* - [#2522](https://github.com/sanic-org/sanic/pull/2522) Always show server location in ASGI - [#2526](https://github.com/sanic-org/sanic/pull/2526) Cache control support for static files for returning 304 when appropriate - [#2533](https://github.com/sanic-org/sanic/pull/2533) Refactor `_static_request_handler` - [#2540](https://github.com/sanic-org/sanic/pull/2540) Add signals before and after handler execution - `http.handler.before` - `http.handler.after` - [#2542](https://github.com/sanic-org/sanic/pull/2542) Add *[redacted]* to CLI :) - [#2546](https://github.com/sanic-org/sanic/pull/2546) Add deprecation warning filter - [#2550](https://github.com/sanic-org/sanic/pull/2550) Middleware priority and performance enhancements ### Bugfixes - [#2495](https://github.com/sanic-org/sanic/pull/2495) Prevent directory traversion with static files - [#2515](https://github.com/sanic-org/sanic/pull/2515) Do not apply double slash to paths in certain static dirs in Blueprints ### Deprecations and Removals - [#2525](https://github.com/sanic-org/sanic/pull/2525) Warn on duplicate route names, will be prevented outright in v23.3 - [#2537](https://github.com/sanic-org/sanic/pull/2537) Raise warning and deprecation notice on duplicate exceptions, will be prevented outright in v23.3 ### Developer infrastructure - [#2504](https://github.com/sanic-org/sanic/pull/2504) Cleanup test suite - [#2505](https://github.com/sanic-org/sanic/pull/2505) Replace Unsupported Python Version Number from the Contributing Doc - [#2530](https://github.com/sanic-org/sanic/pull/2530) Do not include tests folder in installed package resolver ### Improved Documentation - [#2502](https://github.com/sanic-org/sanic/pull/2502) Fix a few typos - [#2517](https://github.com/sanic-org/sanic/pull/2517) [#2536](https://github.com/sanic-org/sanic/pull/2536) Add some type hints ## Version 22.6.2 ### Bugfixes - [#2522](https://github.com/sanic-org/sanic/pull/2522) Always show server location in ASGI ## Version 22.6.1 ### Bugfixes - [#2477](https://github.com/sanic-org/sanic/pull/2477) Sanic static directory fails when folder name ends with ".." ## Version 22.6.0 ### Features - [#2378](https://github.com/sanic-org/sanic/pull/2378) Introduce HTTP/3 and autogeneration of TLS certificates in `DEBUG` mode - 👶 *EARLY RELEASE FEATURE*: Serving Sanic over HTTP/3 is an early release feature. It does not yet fully cover the HTTP/3 spec, but instead aims for feature parity with Sanic's existing HTTP/1.1 server. Websockets, WebTransport, push responses are examples of some features not yet implemented. - 📦 *EXTRA REQUIREMENT*: Not all HTTP clients are capable of interfacing with HTTP/3 servers. You may need to install a [HTTP/3 capable client](https://curl.se/docs/http3.html). - 📦 *EXTRA REQUIREMENT*: In order to use TLS autogeneration, you must install either [mkcert](https://github.com/FiloSottile/mkcert) or [trustme](https://github.com/python-trio/trustme). - [#2416](https://github.com/sanic-org/sanic/pull/2416) Add message to `task.cancel` - [#2420](https://github.com/sanic-org/sanic/pull/2420) Add exception aliases for more consistent naming with standard HTTP response types (`BadRequest`, `MethodNotAllowed`, `RangeNotSatisfiable`) - [#2432](https://github.com/sanic-org/sanic/pull/2432) Expose ASGI `scope` as a property on the `Request` object - [#2438](https://github.com/sanic-org/sanic/pull/2438) Easier access to websocket class for annotation: `from sanic import Websocket` - [#2439](https://github.com/sanic-org/sanic/pull/2439) New API for reading form values with options: `Request.get_form` - [#2445](https://github.com/sanic-org/sanic/pull/2445) Add custom `loads` function - [#2447](https://github.com/sanic-org/sanic/pull/2447), [#2486](https://github.com/sanic-org/sanic/pull/2486) Improved API to support setting cache control headers - [#2453](https://github.com/sanic-org/sanic/pull/2453) Move verbosity filtering to logger - [#2475](https://github.com/sanic-org/sanic/pull/2475) Expose getter for current request using `Request.get_current()` ### Bugfixes - [#2448](https://github.com/sanic-org/sanic/pull/2448) Fix to allow running with `pythonw.exe` or places where there is no `sys.stdout` - [#2451](https://github.com/sanic-org/sanic/pull/2451) Trigger `http.lifecycle.request` signal in ASGI mode - [#2455](https://github.com/sanic-org/sanic/pull/2455) Resolve typing of stacked route definitions - [#2463](https://github.com/sanic-org/sanic/pull/2463) Properly catch websocket CancelledError in websocket handler in Python 3.7 ### Deprecations and Removals - [#2487](https://github.com/sanic-org/sanic/pull/2487) v22.6 deprecations and changes 1. Optional application registry 1. Execution of custom handlers after some part of response was sent 1. Configuring fallback handlers on the `ErrorHandler` 1. Custom `LOGO` setting 1. `sanic.response.stream` 1. `AsyncioServer.init` ### Developer infrastructure - [#2449](https://github.com/sanic-org/sanic/pull/2449) Clean up `black` and `isort` config - [#2479](https://github.com/sanic-org/sanic/pull/2479) Fix some flappy tests ### Improved Documentation - [#2461](https://github.com/sanic-org/sanic/pull/2461) Update example to match current application naming standards - [#2466](https://github.com/sanic-org/sanic/pull/2466) Better type annotation for `Extend` - [#2485](https://github.com/sanic-org/sanic/pull/2485) Improved help messages in CLI ## Version 22.3.0 ### Features - [#2347](https://github.com/sanic-org/sanic/pull/2347) API for multi-application server - 🚨 *BREAKING CHANGE*: The old `sanic.worker.GunicornWorker` has been **removed**. To run Sanic with `gunicorn`, you should use it thru `uvicorn` [as described in their docs](https://www.uvicorn.org/#running-with-gunicorn). - 🧁 *SIDE EFFECT*: Named background tasks are now supported, even in Python 3.7 - [#2357](https://github.com/sanic-org/sanic/pull/2357) Parse `Authorization` header as `Request.credentials` - [#2361](https://github.com/sanic-org/sanic/pull/2361) Add config option to skip `Touchup` step in application startup - [#2372](https://github.com/sanic-org/sanic/pull/2372) Updates to CLI help messaging - [#2382](https://github.com/sanic-org/sanic/pull/2382) Downgrade warnings to backwater debug messages - [#2396](https://github.com/sanic-org/sanic/pull/2396) Allow for `multidict` v0.6 - [#2401](https://github.com/sanic-org/sanic/pull/2401) Upgrade CLI catching for alternative application run types - [#2402](https://github.com/sanic-org/sanic/pull/2402) Conditionally inject CLI arguments into factory - [#2413](https://github.com/sanic-org/sanic/pull/2413) Add new start and stop event listeners to reloader process - [#2414](https://github.com/sanic-org/sanic/pull/2414) Remove loop as required listener arg - [#2415](https://github.com/sanic-org/sanic/pull/2415) Better exception for bad URL parsing - [sanic-routing#47](https://github.com/sanic-org/sanic-routing/pull/47) Add a new extention parameter type: ``, ``, ``, ``, ``, `` - 👶 *BETA FEATURE*: This feature will not work with `path` type matching, and is being released as a beta feature only. - [sanic-routing#57](https://github.com/sanic-org/sanic-routing/pull/57) Change `register_pattern` to accept a `str` or `Pattern` - [sanic-routing#58](https://github.com/sanic-org/sanic-routing/pull/58) Default matching on non-empty strings only, and new `strorempty` pattern type - 🚨 *BREAKING CHANGE*: Previously a route with a dynamic string parameter (`/` or `/`) would match on any string, including empty strings. It will now **only** match a non-empty string. To retain the old behavior, you should use the new parameter type: `/`. ### Bugfixes - [#2373](https://github.com/sanic-org/sanic/pull/2373) Remove `error_logger` on websockets - [#2381](https://github.com/sanic-org/sanic/pull/2381) Fix newly assigned `None` in task registry - [sanic-routing#52](https://github.com/sanic-org/sanic-routing/pull/52) Add type casting to regex route matching - [sanic-routing#60](https://github.com/sanic-org/sanic-routing/pull/60) Add requirements check on regex routes (this resolves, for example, multiple static directories with differing `host` values) ### Deprecations and Removals - [#2362](https://github.com/sanic-org/sanic/pull/2362) 22.3 Deprecations and changes 1. `debug=True` and `--debug` do _NOT_ automatically run `auto_reload` 2. Default error render is with plain text (browsers still get HTML by default because `auto` looks at headers) 3. `config` is required for `ErrorHandler.finalize` 4. `ErrorHandler.lookup` requires two positional args 5. Unused websocket protocol args removed - [#2344](https://github.com/sanic-org/sanic/pull/2344) Deprecate loading of lowercase environment variables ### Developer infrastructure - [#2363](https://github.com/sanic-org/sanic/pull/2363) Revert code coverage back to Codecov - [#2405](https://github.com/sanic-org/sanic/pull/2405) Upgrade tests for `sanic-routing` changes - [sanic-testing#35](https://github.com/sanic-org/sanic-testing/pull/35) Allow for httpx v0.22 ### Improved Documentation - [#2350](https://github.com/sanic-org/sanic/pull/2350) Fix link in README for ASGI - [#2398](https://github.com/sanic-org/sanic/pull/2398) Document middleware on_request and on_response - [#2409](https://github.com/sanic-org/sanic/pull/2409) Add missing documentation for `Request.respond` ### Miscellaneous - [#2376](https://github.com/sanic-org/sanic/pull/2376) Fix typing for `ListenerMixin.listener` - [#2383](https://github.com/sanic-org/sanic/pull/2383) Clear deprecation warning in `asyncio.wait` - [#2387](https://github.com/sanic-org/sanic/pull/2387) Cleanup `__slots__` implementations - [#2390](https://github.com/sanic-org/sanic/pull/2390) Clear deprecation warning in `asyncio.get_event_loop` ## Version 21.12.1 - [#2349](https://github.com/sanic-org/sanic/pull/2349) Only display MOTD on startup - [#2354](https://github.com/sanic-org/sanic/pull/2354) Ignore name argument in Python 3.7 - [#2355](https://github.com/sanic-org/sanic/pull/2355) Add config.update support for all config values ## Version 21.12.0 ### Features - [#2260](https://github.com/sanic-org/sanic/pull/2260) Allow early Blueprint registrations to still apply later added objects - [#2262](https://github.com/sanic-org/sanic/pull/2262) Noisy exceptions - force logging of all exceptions - [#2264](https://github.com/sanic-org/sanic/pull/2264) Optional `uvloop` by configuration - [#2270](https://github.com/sanic-org/sanic/pull/2270) Vhost support using multiple TLS certificates - [#2277](https://github.com/sanic-org/sanic/pull/2277) Change signal routing for increased consistency - *BREAKING CHANGE*: If you were manually routing signals there is a breaking change. The signal router's `get` is no longer 100% determinative. There is now an additional step to loop thru the returned signals for proper matching on the requirements. If signals are being dispatched using `app.dispatch` or `bp.dispatch`, there is no change. - [#2290](https://github.com/sanic-org/sanic/pull/2290) Add contextual exceptions - [#2291](https://github.com/sanic-org/sanic/pull/2291) Increase join concat performance - [#2295](https://github.com/sanic-org/sanic/pull/2295), [#2316](https://github.com/sanic-org/sanic/pull/2316), [#2331](https://github.com/sanic-org/sanic/pull/2331) Restructure of CLI and application state with new displays and more command parity with `app.run` - [#2302](https://github.com/sanic-org/sanic/pull/2302) Add route context at definition time - [#2304](https://github.com/sanic-org/sanic/pull/2304) Named tasks and new API for managing background tasks - [#2307](https://github.com/sanic-org/sanic/pull/2307) On app auto-reload, provide insight of changed files - [#2308](https://github.com/sanic-org/sanic/pull/2308) Auto extend application with [Sanic Extensions](https://sanicframework.org/en/plugins/sanic-ext/getting-started.html) if it is installed, and provide first class support for accessing the extensions - [#2309](https://github.com/sanic-org/sanic/pull/2309) Builtin signals changed to `Enum` - [#2313](https://github.com/sanic-org/sanic/pull/2313) Support additional config implementation use case - [#2321](https://github.com/sanic-org/sanic/pull/2321) Refactor environment variable hydration logic - [#2327](https://github.com/sanic-org/sanic/pull/2327) Prevent sending multiple or mixed responses on a single request - [#2330](https://github.com/sanic-org/sanic/pull/2330) Custom type casting on environment variables - [#2332](https://github.com/sanic-org/sanic/pull/2332) Make all deprecation notices consistent - [#2335](https://github.com/sanic-org/sanic/pull/2335) Allow underscore to start instance names ### Bugfixes - [#2273](https://github.com/sanic-org/sanic/pull/2273) Replace assignation by typing for `websocket_handshake` - [#2285](https://github.com/sanic-org/sanic/pull/2285) Fix IPv6 display in startup logs - [#2299](https://github.com/sanic-org/sanic/pull/2299) Dispatch `http.lifecyle.response` from exception handler ### Deprecations and Removals - [#2306](https://github.com/sanic-org/sanic/pull/2306) Removal of deprecated items - `Sanic` and `Blueprint` may no longer have arbitrary properties attached to them - `Sanic` and `Blueprint` forced to have compliant names - alphanumeric + `_` + `-` - must start with letter or `_` - `load_env` keyword argument of `Sanic` - `sanic.exceptions.abort` - `sanic.views.CompositionView` - `sanic.response.StreamingHTTPResponse` - *NOTE:* the `stream()` response method (where you pass a callable streaming function) has been deprecated and will be removed in v22.6. You should upgrade all streaming responses to the new style: https://sanicframework.org/en/guide/advanced/streaming.html#response-streaming - [#2320](https://github.com/sanic-org/sanic/pull/2320) Remove app instance from Config for error handler setting ### Developer infrastructure - [#2251](https://github.com/sanic-org/sanic/pull/2251) Change dev install command - [#2286](https://github.com/sanic-org/sanic/pull/2286) Change codeclimate complexity threshold from 5 to 10 - [#2287](https://github.com/sanic-org/sanic/pull/2287) Update host test function names so they are not overwritten - [#2292](https://github.com/sanic-org/sanic/pull/2292) Fail CI on error - [#2311](https://github.com/sanic-org/sanic/pull/2311), [#2324](https://github.com/sanic-org/sanic/pull/2324) Do not run tests for draft PRs - [#2336](https://github.com/sanic-org/sanic/pull/2336) Remove paths from coverage checks - [#2338](https://github.com/sanic-org/sanic/pull/2338) Cleanup ports on tests ### Improved Documentation - [#2269](https://github.com/sanic-org/sanic/pull/2269), [#2329](https://github.com/sanic-org/sanic/pull/2329), [#2333](https://github.com/sanic-org/sanic/pull/2333) Cleanup typos and fix language ### Miscellaneous - [#2257](https://github.com/sanic-org/sanic/pull/2257), [#2294](https://github.com/sanic-org/sanic/pull/2294), [#2341](https://github.com/sanic-org/sanic/pull/2341) Add Python 3.10 support - [#2279](https://github.com/sanic-org/sanic/pull/2279), [#2317](https://github.com/sanic-org/sanic/pull/2317), [#2322](https://github.com/sanic-org/sanic/pull/2322) Add/correct missing type annotations - [#2305](https://github.com/sanic-org/sanic/pull/2305) Fix examples to use modern implementations ## Version 21.9.3 *Rerelease of v21.9.2 with some cleanup* ## Version 21.9.2 - [#2268](https://github.com/sanic-org/sanic/pull/2268) Make HTTP connections start in IDLE stage, avoiding delays and error messages - [#2310](https://github.com/sanic-org/sanic/pull/2310) More consistent config setting with post-FALLBACK_ERROR_FORMAT apply ## Version 21.9.1 - [#2259](https://github.com/sanic-org/sanic/pull/2259) Allow non-conforming ErrorHandlers ## Version 21.9.0 ### Features - [#2158](https://github.com/sanic-org/sanic/pull/2158), [#2248](https://github.com/sanic-org/sanic/pull/2248) Complete overhaul of I/O to websockets - [#2160](https://github.com/sanic-org/sanic/pull/2160) Add new 17 signals into server and request lifecycles - [#2162](https://github.com/sanic-org/sanic/pull/2162) Smarter `auto` fallback formatting upon exception - [#2184](https://github.com/sanic-org/sanic/pull/2184) Introduce implementation for copying a Blueprint - [#2200](https://github.com/sanic-org/sanic/pull/2200) Accept header parsing - [#2207](https://github.com/sanic-org/sanic/pull/2207) Log remote address if available - [#2209](https://github.com/sanic-org/sanic/pull/2209) Add convenience methods to BP groups - [#2216](https://github.com/sanic-org/sanic/pull/2216) Add default messages to SanicExceptions - [#2225](https://github.com/sanic-org/sanic/pull/2225) Type annotation convenience for annotated handlers with path parameters - [#2236](https://github.com/sanic-org/sanic/pull/2236) Allow Falsey (but not-None) responses from route handlers - [#2238](https://github.com/sanic-org/sanic/pull/2238) Add `exception` decorator to Blueprint Groups - [#2244](https://github.com/sanic-org/sanic/pull/2244) Explicit static directive for serving file or dir (ex: `static(..., resource_type="file")`) - [#2245](https://github.com/sanic-org/sanic/pull/2245) Close HTTP loop when connection task cancelled ### Bugfixes - [#2188](https://github.com/sanic-org/sanic/pull/2188) Fix the handling of the end of a chunked request - [#2195](https://github.com/sanic-org/sanic/pull/2195) Resolve unexpected error handling on static requests - [#2208](https://github.com/sanic-org/sanic/pull/2208) Make blueprint-based exceptions attach and trigger in a more intuitive manner - [#2211](https://github.com/sanic-org/sanic/pull/2211) Fixed for handling exceptions of asgi app call - [#2213](https://github.com/sanic-org/sanic/pull/2213) Fix bug where ws exceptions not being logged - [#2231](https://github.com/sanic-org/sanic/pull/2231) Cleaner closing of tasks by using `abort()` in strategic places to avoid dangling sockets - [#2247](https://github.com/sanic-org/sanic/pull/2247) Fix logging of auto-reload status in debug mode - [#2246](https://github.com/sanic-org/sanic/pull/2246) Account for BP with exception handler but no routes ### Developer infrastructure - [#2194](https://github.com/sanic-org/sanic/pull/2194) HTTP unit tests with raw client - [#2199](https://github.com/sanic-org/sanic/pull/2199) Switch to codeclimate - [#2214](https://github.com/sanic-org/sanic/pull/2214) Try Reopening Windows Tests - [#2229](https://github.com/sanic-org/sanic/pull/2229) Refactor `HttpProtocol` into a base class - [#2230](https://github.com/sanic-org/sanic/pull/2230) Refactor `server.py` into multi-file module ### Miscellaneous - [#2173](https://github.com/sanic-org/sanic/pull/2173) Remove Duplicated Dependencies and PEP 517 Support - [#2193](https://github.com/sanic-org/sanic/pull/2193), [#2196](https://github.com/sanic-org/sanic/pull/2196), [#2217](https://github.com/sanic-org/sanic/pull/2217) Type annotation changes ## Version 21.6.1 **Bugfixes** - [#2178](https://github.com/sanic-org/sanic/pull/2178) Update sanic-routing to allow for better splitting of complex URI templates - [#2183](https://github.com/sanic-org/sanic/pull/2183) Proper handling of chunked request bodies to resolve phantom 503 in logs - [#2181](https://github.com/sanic-org/sanic/pull/2181) Resolve regression in exception logging - [#2201](https://github.com/sanic-org/sanic/pull/2201) Cleanup request info in pipelined requests ## Version 21.6.0 **Features** - [#2094](https://github.com/sanic-org/sanic/pull/2094) Add `response.eof()` method for closing a stream in a handler - [#2097](https://github.com/sanic-org/sanic/pull/2097) Allow case-insensitive HTTP Upgrade header - [#2104](https://github.com/sanic-org/sanic/pull/2104) Explicit usage of CIMultiDict getters - [#2109](https://github.com/sanic-org/sanic/pull/2109) Consistent use of error loggers - [#2114](https://github.com/sanic-org/sanic/pull/2114) New `client_ip` access of connection info instance - [#2119](https://github.com/sanic-org/sanic/pull/2119) Alternatate classes on instantiation for `Config` and `Sanic.ctx` - [#2133](https://github.com/sanic-org/sanic/pull/2133) Implement new version of AST router - Proper differentiation between `alpha` and `string` param types - Adds a `slug` param type, example: `` - Deprecates `` in favor of `` - Deprecates `` in favor of `` - Adds a `route.uri` accessor - [#2136](https://github.com/sanic-org/sanic/pull/2136) CLI improvements with new optional params - [#2137](https://github.com/sanic-org/sanic/pull/2137) Add `version_prefix` to URL builders - [#2140](https://github.com/sanic-org/sanic/pull/2140) Event autoregistration with `EVENT_AUTOREGISTER` - [#2146](https://github.com/sanic-org/sanic/pull/2146), [#2147](https://github.com/sanic-org/sanic/pull/2147) Require stricter names on `Sanic()` and `Blueprint()` - [#2150](https://github.com/sanic-org/sanic/pull/2150) Infinitely reusable and nestable `Blueprint` and `BlueprintGroup` - [#2154](https://github.com/sanic-org/sanic/pull/2154) Upgrade `websockets` dependency to min version - [#2155](https://github.com/sanic-org/sanic/pull/2155) Allow for maximum header sizes to be increased: `REQUEST_MAX_HEADER_SIZE` - [#2157](https://github.com/sanic-org/sanic/pull/2157) Allow app factory pattern in CLI - [#2165](https://github.com/sanic-org/sanic/pull/2165) Change HTTP methods to enums - [#2167](https://github.com/sanic-org/sanic/pull/2167) Allow auto-reloading on additional directories - [#2168](https://github.com/sanic-org/sanic/pull/2168) Add simple HTTP server to CLI - [#2170](https://github.com/sanic-org/sanic/pull/2170) Additional methods for attaching `HTTPMethodView` **Bugfixes** - [#2091](https://github.com/sanic-org/sanic/pull/2091) Fix `UserWarning` in ASGI mode for missing `__slots__` - [#2099](https://github.com/sanic-org/sanic/pull/2099) Fix static request handler logging exception on 404 - [#2110](https://github.com/sanic-org/sanic/pull/2110) Fix request.args.pop removes parameters inconsistently - [#2107](https://github.com/sanic-org/sanic/pull/2107) Fix type hinting for load_env - [#2127](https://github.com/sanic-org/sanic/pull/2127) Make sure ASGI ws subprotocols is a list - [#2128](https://github.com/sanic-org/sanic/pull/2128) Fix issue where Blueprint exception handlers do not consistently route to proper handler **Deprecations and Removals** - [#2156](https://github.com/sanic-org/sanic/pull/2156) Remove config value `REQUEST_BUFFER_QUEUE_SIZE` - [#2170](https://github.com/sanic-org/sanic/pull/2170) `CompositionView` deprecated and marked for removal in 21.12 - [#2172](https://github.com/sanic-org/sanic/pull/2170) Deprecate StreamingHTTPResponse **Developer infrastructure** - [#2149](https://github.com/sanic-org/sanic/pull/2149) Remove Travis CI in favor of GitHub Actions **Improved Documentation** - [#2164](https://github.com/sanic-org/sanic/pull/2164) Fix typo in documentation - [#2100](https://github.com/sanic-org/sanic/pull/2100) Remove documentation for non-existent arguments ## Version 21.3.2 **Bugfixes** - [#2081](https://github.com/sanic-org/sanic/pull/2081) Disable response timeout on websocket connections - [#2085](https://github.com/sanic-org/sanic/pull/2085) Make sure that blueprints with no slash is maintained when applied ## Version 21.3.1 **Bugfixes** - [#2076](https://github.com/sanic-org/sanic/pull/2076) Static files inside subfolders are not accessible (404) ## Version 21.3.0 [Release Notes](https://sanicframework.org/en/guide/release-notes/v21.3.html) **Features** - [#1876](https://github.com/sanic-org/sanic/pull/1876) Unified streaming server - [#2005](https://github.com/sanic-org/sanic/pull/2005) New `Request.id` property - [#2008](https://github.com/sanic-org/sanic/pull/2008) Allow Pathlib Path objects to be passed to `app.static()` helper - [#2010](https://github.com/sanic-org/sanic/pull/2010), [#2031](https://github.com/sanic-org/sanic/pull/2031) New startup-optimized router - [#2018](https://github.com/sanic-org/sanic/pull/2018) [#2064](https://github.com/sanic-org/sanic/pull/2064) Listeners for main server process - [#2032](https://github.com/sanic-org/sanic/pull/2032) Add raw header info to request object - [#2042](https://github.com/sanic-org/sanic/pull/2042) [#2060](https://github.com/sanic-org/sanic/pull/2060) [#2061](https://github.com/sanic-org/sanic/pull/2061) Introduce Signals API - [#2043](https://github.com/sanic-org/sanic/pull/2043) Add `__str__` and `__repr__` to Sanic and Blueprint - [#2047](https://github.com/sanic-org/sanic/pull/2047) Enable versioning and strict slash on BlueprintGroup - [#2053](https://github.com/sanic-org/sanic/pull/2053) Make `get_app` name argument optional - [#2055](https://github.com/sanic-org/sanic/pull/2055) JSON encoder change via app - [#2063](https://github.com/sanic-org/sanic/pull/2063) App and connection level context objects **Bugfixes** - Resolve [#1420](https://github.com/sanic-org/sanic/pull/1420) `url_for` where `strict_slashes` are on for a path ending in `/` - Resolve [#1525](https://github.com/sanic-org/sanic/pull/1525) Routing is incorrect with some special characters - Resolve [#1653](https://github.com/sanic-org/sanic/pull/1653) ASGI headers in body - Resolve [#1722](https://github.com/sanic-org/sanic/pull/1722) Using curl in chunk mode - Resolve [#1730](https://github.com/sanic-org/sanic/pull/1730) Extra content in ASGI streaming response - Resolve [#1749](https://github.com/sanic-org/sanic/pull/1749) Restore broken middleware edge cases - Resolve [#1785](https://github.com/sanic-org/sanic/pull/1785) [#1804](https://github.com/sanic-org/sanic/pull/1804) Synchronous error handlers - Resolve [#1790](https://github.com/sanic-org/sanic/pull/1790) Protocol errors did not support async error handlers #1790 - Resolve [#1824](https://github.com/sanic-org/sanic/pull/1824) Timeout on specific methods - Resolve [#1875](https://github.com/sanic-org/sanic/pull/1875) Response timeout error from all routes after returning several timeouts from a specific route - Resolve [#1988](https://github.com/sanic-org/sanic/pull/1988) Handling of safe methods with body - [#2001](https://github.com/sanic-org/sanic/pull/2001) Raise ValueError when cookie max-age is not an integer **Deprecations and Removals** - [#2007](https://github.com/sanic-org/sanic/pull/2007) \* Config using `from_envvar` \* Config using `from_pyfile` \* Config using `from_object` - [#2009](https://github.com/sanic-org/sanic/pull/2009) Remove Sanic test client to its own package - [#2036](https://github.com/sanic-org/sanic/pull/2036), [#2037](https://github.com/sanic-org/sanic/pull/2037) Drop Python 3.6 support - `Request.endpoint` deprecated in favor of `Request.name` - handler type name prefixes removed (static, websocket, etc) **Developer infrastructure** - [#1995](https://github.com/sanic-org/sanic/pull/1995) Create FUNDING.yml - [#2013](https://github.com/sanic-org/sanic/pull/2013) Add codeql to CI pipeline - [#2038](https://github.com/sanic-org/sanic/pull/2038) Codecov configuration updates - [#2049](https://github.com/sanic-org/sanic/pull/2049) Updated setup.py to use `find_packages` **Improved Documentation** - [#1218](https://github.com/sanic-org/sanic/pull/1218) Documentation for sanic.log.\* is missing - [#1608](https://github.com/sanic-org/sanic/pull/1608) Add documentation on calver and LTS - [#1731](https://github.com/sanic-org/sanic/pull/1731) Support mounting application elsewhere than at root path - [#2006](https://github.com/sanic-org/sanic/pull/2006) Upgraded type annotations and improved docstrings and API documentation - [#2052](https://github.com/sanic-org/sanic/pull/2052) Fix some examples and docs **Miscellaneous** - `Request.route` property - Better websocket subprotocols support - Resolve bug with middleware in Blueprint Group when passed callable - Moves common logic between Blueprint and Sanic into mixins - Route naming changed to be more consistent - request endpoint is the route name - route names are fully namespaced - Some new convenience decorators: - `@app.main_process_start` - `@app.main_process_stop` - `@app.before_server_start` - `@app.after_server_start` - `@app.before_server_stop` - `@app.after_server_stop` - `@app.on_request` - `@app.on_response` - Fixes `Allow` header that did not include `HEAD` - Using \"name\" keyword in `url_for` for a \"static\" route where name does not exist - Cannot have multiple `app.static()` without using the named param - Using \"filename\" keyword in `url_for` on a file route - `unquote` in route def (not automatic) - `routes_all` is tuples - Handler arguments are kwarg only - `request.match_info` is now a cached (and not computed) property - Unknown static file mimetype is sent as `application/octet-stream` - `_host` keyword in `url_for` - Add charset default to `utf-8` for text and js content types if not specified - Version for a route can be str, float, or int - Route has ctx property - App has `routes_static`, `routes_dynamic`, `routes_regex` - [#2044](https://github.com/sanic-org/sanic/pull/2044) Code cleanup and refactoring - [#2072](https://github.com/sanic-org/sanic/pull/2072) Remove `BaseSanic` metaclass - [#2074](https://github.com/sanic-org/sanic/pull/2074) Performance adjustments in `handle_request_` ## Version 20.12.3 **Bugfixes** - [#2021](https://github.com/sanic-org/sanic/pull/2021) Remove prefix from websocket handler name ## Version 20.12.2 **Dependencies** - [#2026](https://github.com/sanic-org/sanic/pull/2026) Fix uvloop to 0.14 because 0.15 drops Python 3.6 support - [#2029](https://github.com/sanic-org/sanic/pull/2029) Remove old chardet requirement, add in hard multidict requirement ## Version 19.12.5 **Dependencies** - [#2025](https://github.com/sanic-org/sanic/pull/2025) Fix uvloop to 0.14 because 0.15 drops Python 3.6 support - [#2027](https://github.com/sanic-org/sanic/pull/2027) Remove old chardet requirement, add in hard multidict requirement ## Version 20.12.0 **Features** - [#1993](https://github.com/sanic-org/sanic/pull/1993) Add disable app registry - [#1945](https://github.com/sanic-org/sanic/pull/1945) Static route more verbose if file not found - [#1954](https://github.com/sanic-org/sanic/pull/1954) Fix static routes registration on a blueprint - [#1961](https://github.com/sanic-org/sanic/pull/1961) Add Python 3.9 support - [#1962](https://github.com/sanic-org/sanic/pull/1962) Sanic CLI upgrade - [#1967](https://github.com/sanic-org/sanic/pull/1967) Update aiofile version requirements - [#1969](https://github.com/sanic-org/sanic/pull/1969) Update multidict version requirements - [#1970](https://github.com/sanic-org/sanic/pull/1970) Add py.typed file - [#1972](https://github.com/sanic-org/sanic/pull/1972) Speed optimization in request handler - [#1979](https://github.com/sanic-org/sanic/pull/1979) Add app registry and Sanic class level app retrieval **Bugfixes** - [#1965](https://github.com/sanic-org/sanic/pull/1965) Fix Chunked Transport-Encoding in ASGI streaming response **Deprecations and Removals** - [#1981](https://github.com/sanic-org/sanic/pull/1981) Cleanup and remove deprecated code **Developer infrastructure** - [#1956](https://github.com/sanic-org/sanic/pull/1956) Fix load module test - [#1973](https://github.com/sanic-org/sanic/pull/1973) Transition Travis from .org to .com - [#1986](https://github.com/sanic-org/sanic/pull/1986) Update tox requirements **Improved Documentation** - [#1951](https://github.com/sanic-org/sanic/pull/1951) Documentation improvements - [#1983](https://github.com/sanic-org/sanic/pull/1983) Remove duplicate contents in testing.rst - [#1984](https://github.com/sanic-org/sanic/pull/1984) Fix typo in routing.rst ## Version 20.9.1 **Bugfixes** - [#1954](https://github.com/sanic-org/sanic/pull/1954) Fix static route registration on blueprints - [#1957](https://github.com/sanic-org/sanic/pull/1957) Removes duplicate headers in ASGI streaming body ## Version 19.12.3 **Bugfixes** - [#1959](https://github.com/sanic-org/sanic/pull/1959) Removes duplicate headers in ASGI streaming body ## Version 20.9.0 **Features** - [#1887](https://github.com/sanic-org/sanic/pull/1887) Pass subprotocols in websockets (both sanic server and ASGI) - [#1894](https://github.com/sanic-org/sanic/pull/1894) Automatically set `test_mode` flag on app instance - [#1903](https://github.com/sanic-org/sanic/pull/1903) Add new unified method for updating app values - [#1906](https://github.com/sanic-org/sanic/pull/1906), [#1909](https://github.com/sanic-org/sanic/pull/1909) Adds WEBSOCKET_PING_TIMEOUT and WEBSOCKET_PING_INTERVAL configuration values - [#1935](https://github.com/sanic-org/sanic/pull/1935) httpx version dependency updated, it is slated for removal as a dependency in v20.12 - [#1937](https://github.com/sanic-org/sanic/pull/1937) Added auto, text, and json fallback error handlers (in v21.3, the default will change form html to auto) **Bugfixes** - [#1897](https://github.com/sanic-org/sanic/pull/1897) Resolves exception from unread bytes in stream **Deprecations and Removals** - [#1903](https://github.com/sanic-org/sanic/pull/1903) config.from_envar, config.from_pyfile, and config.from_object are deprecated and set to be removed in v21.3 **Developer infrastructure** - [#1890](https://github.com/sanic-org/sanic/pull/1890), [#1891](https://github.com/sanic-org/sanic/pull/1891) Update isort calls to be compatible with new API - [#1893](https://github.com/sanic-org/sanic/pull/1893) Remove version section from setup.cfg - [#1924](https://github.com/sanic-org/sanic/pull/1924) Adding \--strict-markers for pytest **Improved Documentation** - [#1922](https://github.com/sanic-org/sanic/pull/1922) Add explicit ASGI compliance to the README ## Version 20.6.3 **Bugfixes** - [#1884](https://github.com/sanic-org/sanic/pull/1884) Revert change to multiprocessing mode ## Version 20.6.2 **Features** - [#1641](https://github.com/sanic-org/sanic/pull/1641) Socket binding implemented properly for IPv6 and UNIX sockets ## Version 20.6.1 **Features** - [#1760](https://github.com/sanic-org/sanic/pull/1760) Add version parameter to websocket routes - [#1866](https://github.com/sanic-org/sanic/pull/1866) Add `sanic` as an entry point command - [#1880](https://github.com/sanic-org/sanic/pull/1880) Add handler names for websockets for url_for usage **Bugfixes** - [#1776](https://github.com/sanic-org/sanic/pull/1776) Bug fix for host parameter issue with lists - [#1842](https://github.com/sanic-org/sanic/pull/1842) Fix static \_handler pickling error - [#1827](https://github.com/sanic-org/sanic/pull/1827) Fix reloader on OSX py38 and Windows - [#1848](https://github.com/sanic-org/sanic/pull/1848) Reverse named_response_middlware execution order, to match normal response middleware execution order - [#1853](https://github.com/sanic-org/sanic/pull/1853) Fix pickle error when attempting to pickle an application which contains websocket routes **Deprecations and Removals** - [#1739](https://github.com/sanic-org/sanic/pull/1739) Deprecate body_bytes to merge into body **Developer infrastructure** - [#1852](https://github.com/sanic-org/sanic/pull/1852) Fix naming of CI test env on Python nightlies - [#1857](https://github.com/sanic-org/sanic/pull/1857) Adjust websockets version to setup.py - [#1869](https://github.com/sanic-org/sanic/pull/1869) Wrap run()\'s \"protocol\" type annotation in Optional\[\] **Improved Documentation** - [#1846](https://github.com/sanic-org/sanic/pull/1846) Update docs to clarify response middleware execution order - [#1865](https://github.com/sanic-org/sanic/pull/1865) Fixing rst format issue that was hiding documentation ## Version 20.6.0 *Released, but unintentionally omitting PR #1880, so was replaced by 20.6.1* ## Version 20.3.0 **Features** - [#1762](https://github.com/sanic-org/sanic/pull/1762) Add `srv.start_serving()` and `srv.serve_forever()` to `AsyncioServer` - [#1767](https://github.com/sanic-org/sanic/pull/1767) Make Sanic usable on `hypercorn -k trio myweb.app` - [#1768](https://github.com/sanic-org/sanic/pull/1768) No tracebacks on normal errors and prettier error pages - [#1769](https://github.com/sanic-org/sanic/pull/1769) Code cleanup in file responses - [#1793](https://github.com/sanic-org/sanic/pull/1793) and [#1819](https://github.com/sanic-org/sanic/pull/1819) Upgrade `str.format()` to f-strings - [#1798](https://github.com/sanic-org/sanic/pull/1798) Allow multiple workers on MacOS with Python 3.8 - [#1820](https://github.com/sanic-org/sanic/pull/1820) Do not set content-type and content-length headers in exceptions **Bugfixes** - [#1748](https://github.com/sanic-org/sanic/pull/1748) Remove loop argument in `asyncio.Event` in Python 3.8 - [#1764](https://github.com/sanic-org/sanic/pull/1764) Allow route decorators to stack up again - [#1789](https://github.com/sanic-org/sanic/pull/1789) Fix tests using hosts yielding incorrect `url_for` - [#1808](https://github.com/sanic-org/sanic/pull/1808) Fix Ctrl+C and tests on Windows **Deprecations and Removals** - [#1800](https://github.com/sanic-org/sanic/pull/1800) Begin deprecation in way of first-class streaming, removal of `body_init`, `body_push`, and `body_finish` - [#1801](https://github.com/sanic-org/sanic/pull/1801) Complete deprecation from [#1666](https://github.com/sanic-org/sanic/pull/1666) of dictionary context on `request` objects. - [#1807](https://github.com/sanic-org/sanic/pull/1807) Remove server config args that can be read directly from app - [#1818](https://github.com/sanic-org/sanic/pull/1818) Complete deprecation of `app.remove_route` and `request.raw_args` **Dependencies** - [#1794](https://github.com/sanic-org/sanic/pull/1794) Bump `httpx` to 0.11.1 - [#1806](https://github.com/sanic-org/sanic/pull/1806) Import `ASGIDispatch` from top-level `httpx` (from third-party deprecation) **Developer infrastructure** - [#1833](https://github.com/sanic-org/sanic/pull/1833) Resolve broken documentation builds **Improved Documentation** - [#1755](https://github.com/sanic-org/sanic/pull/1755) Usage of `response.empty()` - [#1778](https://github.com/sanic-org/sanic/pull/1778) Update README - [#1783](https://github.com/sanic-org/sanic/pull/1783) Fix typo - [#1784](https://github.com/sanic-org/sanic/pull/1784) Corrected changelog for docs move of MD to RST ([#1691](https://github.com/sanic-org/sanic/pull/1691)) - [#1803](https://github.com/sanic-org/sanic/pull/1803) Update config docs to match DEFAULT_CONFIG - [#1814](https://github.com/sanic-org/sanic/pull/1814) Update getting_started.rst - [#1821](https://github.com/sanic-org/sanic/pull/1821) Update to deployment - [#1822](https://github.com/sanic-org/sanic/pull/1822) Update docs with changes done in 20.3 - [#1834](https://github.com/sanic-org/sanic/pull/1834) Order of listeners ## Version 19.12.0 **Bugfixes** - Fix blueprint middleware application Currently, any blueprint middleware registered, irrespective of which blueprint was used to do so, was being applied to all of the routes created by the `@app` and `@blueprint` alike. As part of this change, the blueprint based middleware application is enforced based on where they are registered. - If you register a middleware via `@blueprint.middleware` then it will apply only to the routes defined by the blueprint. - If you register a middleware via `@blueprint_group.middleware` then it will apply to all blueprint based routes that are part of the group. - If you define a middleware via `@app.middleware` then it will be applied on all available routes ([#37](https://github.com/sanic-org/sanic/issues/37)) - Fix [url_for]{.title-ref} behavior with missing SERVER_NAME If the [SERVER_NAME]{.title-ref} was missing in the [app.config]{.title-ref} entity, the [url_for]{.title-ref} on the [request]{.title-ref} and [app]{.title-ref} were failing due to an [AttributeError]{.title-ref}. This fix makes the availability of [SERVER_NAME]{.title-ref} on our [app.config]{.title-ref} an optional behavior. ([#1707](https://github.com/sanic-org/sanic/issues/1707)) **Improved Documentation** - Move docs from MD to RST Moved all docs from markdown to restructured text like the rest of the docs to unify the scheme and make it easier in the future to update documentation. ([#1691](https://github.com/sanic-org/sanic/issues/1691)) - Fix documentation for [get]{.title-ref} and [getlist]{.title-ref} of the [request.args]{.title-ref} Add additional example for showing the usage of [getlist]{.title-ref} and fix the documentation string for [request.args]{.title-ref} behavior ([#1704](https://github.com/sanic-org/sanic/issues/1704)) ## Version 19.6.3 **Features** - Enable Towncrier Support As part of this feature, [towncrier]{.title-ref} is being introduced as a mechanism to partially automate the process of generating and managing change logs as part of each of pull requests. ([#1631](https://github.com/sanic-org/sanic/issues/1631)) **Improved Documentation** - Documentation infrastructure changes - Enable having a single common [CHANGELOG]{.title-ref} file for both GitHub page and documentation - Fix Sphinix deprecation warnings - Fix documentation warnings due to invalid [rst]{.title-ref} indentation - Enable common contribution guidelines file across GitHub and documentation via [CONTRIBUTING.rst]{.title-ref} ([#1631](https://github.com/sanic-org/sanic/issues/1631)) ## Version 19.6.2 **Features** - [#1562](https://github.com/sanic-org/sanic/pull/1562) Remove `aiohttp` dependency and create new `SanicTestClient` based upon [requests-async](https://github.com/encode/requests-async) - [#1475](https://github.com/sanic-org/sanic/pull/1475) Added ASGI support (Beta) - [#1436](https://github.com/sanic-org/sanic/pull/1436) Add Configure support from object string **Bugfixes** - [#1587](https://github.com/sanic-org/sanic/pull/1587) Add missing handle for Expect header. - [#1560](https://github.com/sanic-org/sanic/pull/1560) Allow to disable Transfer-Encoding: chunked. - [#1558](https://github.com/sanic-org/sanic/pull/1558) Fix graceful shutdown. - [#1594](https://github.com/sanic-org/sanic/pull/1594) Strict Slashes behavior fix **Deprecations and Removals** - [#1544](https://github.com/sanic-org/sanic/pull/1544) Drop dependency on distutil - [#1562](https://github.com/sanic-org/sanic/pull/1562) Drop support for Python 3.5 - [#1568](https://github.com/sanic-org/sanic/pull/1568) Deprecate route removal. .. warning:: Warning Sanic will not support Python 3.5 from version 19.6 and forward. However, version 18.12LTS will have its support period extended thru December 2020, and therefore passing Python\'s official support version 3.5, which is set to expire in September 2020. ## Version 19.3 **Features** - [#1497](https://github.com/sanic-org/sanic/pull/1497) Add support for zero-length and RFC 5987 encoded filename for multipart/form-data requests. - [#1484](https://github.com/sanic-org/sanic/pull/1484) The type of `expires` attribute of `sanic.cookies.Cookie` is now enforced to be of type `datetime`. - [#1482](https://github.com/sanic-org/sanic/pull/1482) Add support for the `stream` parameter of `sanic.Sanic.add_route()` available to `sanic.Blueprint.add_route()`. - [#1481](https://github.com/sanic-org/sanic/pull/1481) Accept negative values for route parameters with type `int` or `number`. - [#1476](https://github.com/sanic-org/sanic/pull/1476) Deprecated the use of `sanic.request.Request.raw_args` - it has a fundamental flaw in which is drops repeated query string parameters. Added `sanic.request.Request.query_args` as a replacement for the original use-case. - [#1472](https://github.com/sanic-org/sanic/pull/1472) Remove an unwanted `None` check in Request class `repr` implementation. This changes the default `repr` of a Request from `` to `` - [#1470](https://github.com/sanic-org/sanic/pull/1470) Added 2 new parameters to `sanic.app.Sanic.create_server`: - `return_asyncio_server` - whether to return an asyncio.Server. - `asyncio_server_kwargs` - kwargs to pass to `loop.create_server` for the event loop that sanic is using. > This is a breaking change. - [#1499](https://github.com/sanic-org/sanic/pull/1499) Added a set of test cases that test and benchmark route resolution. - [#1457](https://github.com/sanic-org/sanic/pull/1457) The type of the `"max-age"` value in a `sanic.cookies.Cookie` is now enforced to be an integer. Non-integer values are replaced with `0`. - [#1445](https://github.com/sanic-org/sanic/pull/1445) Added the `endpoint` attribute to an incoming `request`, containing the name of the handler function. - [#1423](https://github.com/sanic-org/sanic/pull/1423) Improved request streaming. `request.stream` is now a bounded-size buffer instead of an unbounded queue. Callers must now call `await request.stream.read()` instead of `await request.stream.get()` to read each portion of the body. This is a breaking change. **Bugfixes** - [#1502](https://github.com/sanic-org/sanic/pull/1502) Sanic was prefetching `time.time()` and updating it once per second to avoid excessive `time.time()` calls. The implementation was observed to cause memory leaks in some cases. The benefit of the prefetch appeared to negligible, so this has been removed. Fixes [#1500](https://github.com/sanic-org/sanic/pull/1500) - [#1501](https://github.com/sanic-org/sanic/pull/1501) Fix a bug in the auto-reloader when the process was launched as a module i.e. `python -m init0.mod1` where the sanic server is started in `init0/mod1.py` with `debug` enabled and imports another module in `init0`. - [#1376](https://github.com/sanic-org/sanic/pull/1376) Allow sanic test client to bind to a random port by specifying `port=None` when constructing a `SanicTestClient` - [#1399](https://github.com/sanic-org/sanic/pull/1399) Added the ability to specify middleware on a blueprint group, so that all routes produced from the blueprints in the group have the middleware applied. - [#1442](https://github.com/sanic-org/sanic/pull/1442) Allow the the use the `SANIC_ACCESS_LOG` environment variable to enable/disable the access log when not explicitly passed to `app.run()`. This allows the access log to be disabled for example when running via gunicorn. **Developer infrastructure** - [#1529](https://github.com/sanic-org/sanic/pull/1529) Update project PyPI credentials - [#1515](https://github.com/sanic-org/sanic/pull/1515) fix linter issue causing travis build failures (fix #1514) - [#1490](https://github.com/sanic-org/sanic/pull/1490) Fix python version in doc build - [#1478](https://github.com/sanic-org/sanic/pull/1478) Upgrade setuptools version and use native docutils in doc build - [#1464](https://github.com/sanic-org/sanic/pull/1464) Upgrade pytest, and fix caplog unit tests **Improved Documentation** - [#1516](https://github.com/sanic-org/sanic/pull/1516) Fix typo at the exception documentation - [#1510](https://github.com/sanic-org/sanic/pull/1510) fix typo in Asyncio example - [#1486](https://github.com/sanic-org/sanic/pull/1486) Documentation typo - [#1477](https://github.com/sanic-org/sanic/pull/1477) Fix grammar in README.md - [#1489](https://github.com/sanic-org/sanic/pull/1489) Added \"databases\" to the extensions list - [#1483](https://github.com/sanic-org/sanic/pull/1483) Add sanic-zipkin to extensions list - [#1487](https://github.com/sanic-org/sanic/pull/1487) Removed link to deleted repo, Sanic-OAuth, from the extensions list - [#1460](https://github.com/sanic-org/sanic/pull/1460) 18.12 changelog - [#1449](https://github.com/sanic-org/sanic/pull/1449) Add example of amending request object - [#1446](https://github.com/sanic-org/sanic/pull/1446) Update README - [#1444](https://github.com/sanic-org/sanic/pull/1444) Update README - [#1443](https://github.com/sanic-org/sanic/pull/1443) Update README, including new logo - [#1440](https://github.com/sanic-org/sanic/pull/1440) fix minor type and pip install instruction mismatch - [#1424](https://github.com/sanic-org/sanic/pull/1424) Documentation Enhancements Note: 19.3.0 was skipped for packagement purposes and not released on PyPI ## Version 18.12 ### 18.12.0 - Changes: - Improved codebase test coverage from 81% to 91%. - Added stream_large_files and host examples in static_file document - Added methods to append and finish body content on Request (#1379) - Integrated with .appveyor.yml for windows ci support - Added documentation for AF_INET6 and AF_UNIX socket usage - Adopt black/isort for codestyle - Cancel task when connection_lost - Simplify request ip and port retrieval logic - Handle config error in load config file. - Integrate with codecov for CI - Add missed documentation for config section. - Deprecate Handler.log - Pinned httptools requirement to version 0.0.10+ - Fixes: - Fix `remove_entity_headers` helper function (#1415) - Fix TypeError when use Blueprint.group() to group blueprint with default url_prefix, Use os.path.normpath to avoid invalid url_prefix like api//v1 f8a6af1 Rename the `http` module to `helpers` to prevent conflicts with the built-in Python http library (fixes #1323) - Fix unittests on windows - Fix Namespacing of sanic logger - Fix missing quotes in decorator example - Fix redirect with quoted param - Fix doc for latest blueprint code - Fix build of latex documentation relating to markdown lists - Fix loop exception handling in app.py - Fix content length mismatch in windows and other platform - Fix Range header handling for static files (#1402) - Fix the logger and make it work (#1397) - Fix type pikcle-\>pickle in multiprocessing test - Fix pickling blueprints Change the string passed in the \"name\" section of the namedtuples in Blueprint to match the name of the Blueprint module attribute name. This allows blueprints to be pickled and unpickled, without errors, which is a requirement of running Sanic in multiprocessing mode in Windows. Added a test for pickling and unpickling blueprints Added a test for pickling and unpickling sanic itself Added a test for enabling multiprocessing on an app with a blueprint (only useful to catch this bug if the tests are run on Windows). - Fix document for logging ## Version 0.8 **0.8.3** - Changes: - Ownership changed to org \'sanic-org\' **0.8.0** - Changes: - Add Server-Sent Events extension (Innokenty Lebedev) - Graceful handling of request_handler_task cancellation (Ashley Sommer) - Sanitize URL before redirection (aveao) - Add url_bytes to request (johndoe46) - py37 support for travisci (yunstanford) - Auto reloader support for OSX (garyo) - Add UUID route support (Volodymyr Maksymiv) - Add pausable response streams (Ashley Sommer) - Add weakref to request slots (vopankov) - remove ubuntu 12.04 from test fixture due to deprecation (yunstanford) - Allow streaming handlers in add_route (kinware) - use travis_retry for tox (Raphael Deem) - update aiohttp version for test client (yunstanford) - add redirect import for clarity (yingshaoxo) - Update HTTP Entity headers (Arnulfo Solís) - Add register_listener method (Stephan Fitzpatrick) - Remove uvloop/ujson dependencies for Windows (abuckenheimer) - Content-length header on 204/304 responses (Arnulfo Solís) - Extend WebSocketProtocol arguments and add docs (Bob Olde Hampsink, yunstanford) - Update development status from pre-alpha to beta (Maksim Anisenkov) - KeepAlive Timeout log level changed to debug (Arnulfo Solís) - Pin pytest to 3.3.2 because of pytest-dev/pytest#3170 (Maksim Aniskenov) - Install Python 3.5 and 3.6 on docker container for tests (Shahin Azad) - Add support for blueprint groups and nesting (Elias Tarhini) - Remove uvloop for windows setup (Aleksandr Kurlov) - Auto Reload (Yaser Amari) - Documentation updates/fixups (multiple contributors) - Fixes: - Fix: auto_reload in Linux (Ashley Sommer) - Fix: broken tests for aiohttp \>= 3.3.0 (Ashley Sommer) - Fix: disable auto_reload by default on windows (abuckenheimer) - Fix (1143): Turn off access log with gunicorn (hqy) - Fix (1268): Support status code for file response (Cosmo Borsky) - Fix (1266): Add content_type flag to Sanic.static (Cosmo Borsky) - Fix: subprotocols parameter missing from add_websocket_route (ciscorn) - Fix (1242): Responses for CI header (yunstanford) - Fix (1237): add version constraint for websockets (yunstanford) - Fix (1231): memory leak - always release resource (Phillip Xu) - Fix (1221): make request truthy if transport exists (Raphael Deem) - Fix failing tests for aiohttp\>=3.1.0 (Ashley Sommer) - Fix try_everything examples (PyManiacGR, kot83) - Fix (1158): default to auto_reload in debug mode (Raphael Deem) - Fix (1136): ErrorHandler.response handler call too restrictive (Julien Castiaux) - Fix: raw requires bytes-like object (cloudship) - Fix (1120): passing a list in to a route decorator\'s host arg (Timothy Ebiuwhe) - Fix: Bug in multipart/form-data parser (DirkGuijt) - Fix: Exception for missing parameter when value is null (NyanKiyoshi) - Fix: Parameter check (Howie Hu) - Fix (1089): Routing issue with named parameters and different methods (yunstanford) - Fix (1085): Signal handling in multi-worker mode (yunstanford) - Fix: single quote in readme.rst (Cosven) - Fix: method typos (Dmitry Dygalo) - Fix: log_response correct output for ip and port (Wibowo Arindrarto) - Fix (1042): Exception Handling (Raphael Deem) - Fix: Chinese URIs (Howie Hu) - Fix (1079): timeout bug when self.transport is None (Raphael Deem) - Fix (1074): fix strict_slashes when route has slash (Raphael Deem) - Fix (1050): add samesite cookie to cookie keys (Raphael Deem) - Fix (1065): allow add_task after server starts (Raphael Deem) - Fix (1061): double quotes in unauthorized exception (Raphael Deem) - Fix (1062): inject the app in add_task method (Raphael Deem) - Fix: update environment.yml for readthedocs (Eli Uriegas) - Fix: Cancel request task when response timeout is triggered (Jeong YunWon) - Fix (1052): Method not allowed response for RFC7231 compliance (Raphael Deem) - Fix: IPv6 Address and Socket Data Format (Dan Palmer) Note: Changelog was unmaintained between 0.1 and 0.7 ## Version 0.1 **0.1.7** - Reversed static url and directory arguments to meet spec **0.1.6** - Static files - Lazy Cookie Loading **0.1.5** - Cookies - Blueprint listeners and ordering - Faster Router - Fix: Incomplete file reads on medium+ sized post requests - Breaking: after_start and before_stop now pass sanic as their first argument **0.1.4** - Multiprocessing **0.1.3** - Blueprint support - Faster Response processing **0.1.1 - 0.1.2** - Struggling to update pypi via CI **0.1.0** - Released to public ================================================ FILE: guide/public/assets/.gitkeep ================================================ ================================================ FILE: guide/public/assets/code.css ================================================ pre { line-height: 125%; } td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .hll { background-color: #ffffcc } .c { color: #A2A2A2; font-style: italic } /* Comment */ .err { color: #777 } /* Error */ .esc { color: #777 } /* Escape */ .g { color: #777 } /* Generic */ .k { color: #FF0D68 } /* Keyword */ .l { color: #777 } /* Literal */ .n { color: #333 } /* Name */ .o { color: #777 } /* Operator */ .x { color: #777 } /* Other */ .p { color: #777 } /* Punctuation */ .ch { color: #A2A2A2; font-style: italic } /* Comment.Hashbang */ .cm { color: #A2A2A2; font-style: italic } /* Comment.Multiline */ .cp { color: #A2A2A2; font-style: italic } /* Comment.Preproc */ .cpf { color: #A2A2A2; font-style: italic } /* Comment.PreprocFile */ .c1 { color: #A2A2A2; font-style: italic } /* Comment.Single */ .cs { color: #A2A2A2; font-style: italic } /* Comment.Special */ .gd { color: #777 } /* Generic.Deleted */ .ge { color: #777 } /* Generic.Emph */ .ges { color: #777 } /* Generic.EmphStrong */ .gr { color: #777 } /* Generic.Error */ .gh { color: #777 } /* Generic.Heading */ .gi { color: #777 } /* Generic.Inserted */ .go { color: #777 } /* Generic.Output */ .gp { color: #777 } /* Generic.Prompt */ .gs { color: #777 } /* Generic.Strong */ .gu { color: #777 } /* Generic.Subheading */ .gt { color: #777 } /* Generic.Traceback */ .kc { color: #FF0D68 } /* Keyword.Constant */ .kd { color: #FF0D68 } /* Keyword.Declaration */ .kn { color: #FF0D68 } /* Keyword.Namespace */ .kp { color: #FF0D68 } /* Keyword.Pseudo */ .kr { color: #FF0D68 } /* Keyword.Reserved */ .kt { color: #FF0D68 } /* Keyword.Type */ .ld { color: #777 } /* Literal.Date */ .m { color: #777 } /* Literal.Number */ .s { color: #833FE3; background-color: #EEE } /* Literal.String */ .na { color: #333 } /* Name.Attribute */ .nb { color: #333 } /* Name.Builtin */ .nc { color: #37AE6F; font-weight: bold } /* Name.Class */ .no { color: #333 } /* Name.Constant */ .nd { color: #333 } /* Name.Decorator */ .ni { color: #333 } /* Name.Entity */ .ne { color: #333 } /* Name.Exception */ .nf { color: #0092FF } /* Name.Function */ .nl { color: #333 } /* Name.Label */ .nn { color: #333 } /* Name.Namespace */ .nx { color: #333 } /* Name.Other */ .py { color: #333 } /* Name.Property */ .nt { color: #333 } /* Name.Tag */ .nv { color: #333 } /* Name.Variable */ .ow { color: #777 } /* Operator.Word */ .pm { color: #777 } /* Punctuation.Marker */ .w { color: #777 } /* Text.Whitespace */ .mb { color: #777 } /* Literal.Number.Bin */ .mf { color: #777 } /* Literal.Number.Float */ .mh { color: #777 } /* Literal.Number.Hex */ .mi { color: #777 } /* Literal.Number.Integer */ .mo { color: #777 } /* Literal.Number.Oct */ .sa { color: #833FE3; background-color: #EEE } /* Literal.String.Affix */ .sb { color: #833FE3; background-color: #EEE } /* Literal.String.Backtick */ .sc { color: #833FE3; background-color: #EEE } /* Literal.String.Char */ .dl { color: #833FE3; background-color: #EEE } /* Literal.String.Delimiter */ .sd { color: #833FE3; background-color: #EEE } /* Literal.String.Doc */ .s2 { color: #833FE3; background-color: #EEE } /* Literal.String.Double */ .se { color: #833FE3; background-color: #EEE } /* Literal.String.Escape */ .sh { color: #833FE3; background-color: #EEE } /* Literal.String.Heredoc */ .si { color: #833FE3; background-color: #EEE } /* Literal.String.Interpol */ .sx { color: #833FE3; background-color: #EEE } /* Literal.String.Other */ .sr { color: #833FE3; background-color: #EEE } /* Literal.String.Regex */ .s1 { color: #833FE3; background-color: #EEE } /* Literal.String.Single */ .ss { color: #833FE3; background-color: #EEE } /* Literal.String.Symbol */ .bp { color: #333 } /* Name.Builtin.Pseudo */ .fm { color: #0092FF } /* Name.Function.Magic */ .vc { color: #333 } /* Name.Variable.Class */ .vg { color: #333 } /* Name.Variable.Global */ .vi { color: #333 } /* Name.Variable.Instance */ .vm { color: #333 } /* Name.Variable.Magic */ .il { color: #777 } /* Literal.Number.Integer.Long */ ================================================ FILE: guide/public/assets/docs.js ================================================ let burger; let menu; let menuLinks; let menuGroups; let anchors; let lastUpdated = 0; let updateFrequency = 300; function trigger(el, eventType) { if (typeof eventType === "string" && typeof el[eventType] === "function") { el[eventType](); } else { const event = typeof eventType === "string" ? new Event(eventType, { bubbles: true }) : eventType; el.dispatchEvent(event); } } function refreshBurger() { burger = document.querySelector(".burger"); } function refreshMenu() { menu = document.querySelector(".menu"); } function refreshMenuLinks() { menuLinks = document.querySelectorAll(".menu a[hx-get]"); } function refreshMenuGroups() { menuGroups = document.querySelectorAll(".menu li.is-group a:not([href])"); } function hasActiveLink(element) { if (!element) { return false; } let nextElementSibling = element.nextElementSibling; let menuList = null; while (!menuList && nextElementSibling) { if (nextElementSibling.classList.contains("menu-list")) { menuList = nextElementSibling; } else { nextElementSibling = nextElementSibling.nextElementSibling; } } if (menuList) { const siblinkLinks = [...menuList.querySelectorAll("a")]; return siblinkLinks.some((el) => el.classList.contains("is-active")); } return false; } function scrollHandler(e) { let now = Date.now(); if (now - lastUpdated < updateFrequency) return; let closestAnchor = null; let closestDistance = Infinity; if (!anchors) { return; } anchors.forEach(anchor => { const rect = anchor.getBoundingClientRect(); const distance = Math.abs(rect.top); if (distance < closestDistance) { closestDistance = distance; closestAnchor = anchor; } }); if (closestAnchor) { history.replaceState(null, null, "#" + closestAnchor.id); lastUpdated = now; } } function initBurger() { if (!burger || !menu) { return; } burger.addEventListener("click", (e) => { e.preventDefault(); burger.classList.toggle("is-active"); menu.classList.toggle("is-active"); }); } function initMenuGroups() { menuGroups.forEach((el) => { el.addEventListener("click", (e) => { e.preventDefault(); menuGroups.forEach((g) => { if (g === el) { g.classList.toggle("is-open"); } else { g.classList.remove("is-open"); } }); }); }); } function initDetails() { const detailsElements = document.querySelectorAll(".details"); detailsElements.forEach((element) => { element.addEventListener("click", function () { this.classList.toggle("is-active"); }); }); } function initTabs() { const tabsElements = document.querySelectorAll(".tabs"); tabsElements.forEach((element) => { const tabTriggers = element.querySelectorAll("li>a"); const tabs = element.querySelectorAll("li"); tabTriggers.forEach((trigger) => { trigger.addEventListener("click", function () { tabs.forEach((tab) => { tab.classList.remove("is-active"); }); const content = this.nextElementSibling; // this.parentElement.querySelector(".tab-content"); this.parentElement.classList.add("is-active"); const tabDisplay = this.parentElement.parentElement.parentElement .nextElementSibling; tabDisplay.innerHTML = content.innerHTML; }); }); const firstTabTrigger = tabTriggers[0]; firstTabTrigger.click(); }); } function initSearch() { const searchInput = document.querySelector("#search"); if (!searchInput) { return; } searchInput.addEventListener("keyup", () => { const value = searchInput.value; searchInput.setAttribute( "hx-vals", `{"q": "${encodeURIComponent(value)}"}` ); }); } function initMermaid() { const mermaids = document.querySelectorAll(".mermaid"); mermaid.init(undefined, mermaids); } function refreshAnchors() { anchors = document.querySelectorAll("h1[id], h2[id], h3[id], h4[id], h5[id], h6[id]"); }; function setMenuLinkActive(href) { burger.classList.remove("is-active"); menu.classList.remove("is-active"); menuLinks.forEach((element) => { if (element.attributes.href.value === href) { element.classList.add("is-active"); } else { element.classList.remove("is-active"); } }); menuGroups.forEach((g) => { if (hasActiveLink(g)) { g.classList.add("is-open"); } else { g.classList.remove("is-open"); } }); } function copyCode(button) { const codeBlock = button.parentElement; const code = codeBlock.querySelector("code").innerText; const textarea = document.createElement("textarea"); textarea.value = code; document.body.appendChild(textarea); textarea.select(); document.execCommand("copy"); document.body.removeChild(textarea); button.classList.add("clicked"); // Add class for animation setTimeout(() => { button.classList.remove("clicked"); // Remove class to revert to original state }, 1500); } function init() { refreshBurger(); refreshMenu(); refreshMenuLinks(); refreshMenuGroups(); refreshAnchors(); initBurger(); initMenuGroups(); initDetails(); initTabs(); initSearch(); } function afterSwap(e) { setMenuLinkActive(e.detail.pathInfo.requestPath); initMermaid(); window.scrollTo(0, 0); const newTitle = event.detail.xhr.getResponseHeader('X-Title'); if (newTitle) { document.title = newTitle; } } function beforeRequest() { console.log("beforeRequest") document.querySelector(".loading-bar").classList.add("is-loading"); this.requestStartTime = new Date().getTime(); } function afterRequest() { const currentTime = new Date().getTime(); const elapsedTime = currentTime - this.requestStartTime; const delay = Math.max(0, 1000 - elapsedTime); setTimeout(() => { console.log("afterRequest") document.querySelector(".loading-bar").classList.remove("is-loading"); }, delay); } document.addEventListener("DOMContentLoaded", init); document.body.addEventListener("htmx:afterSwap", afterSwap); document.addEventListener("scroll", scrollHandler); document.body.addEventListener("htmx:beforeRequest", beforeRequest); document.body.addEventListener("htmx:afterRequest", afterRequest); ================================================ FILE: guide/public/assets/style.css ================================================ @charset "UTF-8"; .has-text-purple { color: #833FE3; } /*! bulma.io v0.9.4 | MIT License | github.com/jgthms/bulma */ /* Bulma Utilities */ .pagination-previous, .pagination-next, .pagination-link, .pagination-ellipsis, .file-cta, .file-name, .select select, .textarea, .input, .button { -moz-appearance: none; -webkit-appearance: none; align-items: center; border: 1px solid transparent; border-radius: 4px; box-shadow: none; display: inline-flex; font-size: 1rem; height: 2.5em; justify-content: flex-start; line-height: 1.5; padding-bottom: calc(0.5em - 1px); padding-left: calc(0.75em - 1px); padding-right: calc(0.75em - 1px); padding-top: calc(0.5em - 1px); position: relative; vertical-align: top; } .pagination-previous:focus, .pagination-next:focus, .pagination-link:focus, .pagination-ellipsis:focus, .file-cta:focus, .file-name:focus, .select select:focus, .textarea:focus, .input:focus, .button:focus, .is-focused.pagination-previous, .is-focused.pagination-next, .is-focused.pagination-link, .is-focused.pagination-ellipsis, .is-focused.file-cta, .is-focused.file-name, .select select.is-focused, .is-focused.textarea, .is-focused.input, .is-focused.button, .pagination-previous:active, .pagination-next:active, .pagination-link:active, .pagination-ellipsis:active, .file-cta:active, .file-name:active, .select select:active, .textarea:active, .input:active, .button:active, .is-active.pagination-previous, .is-active.pagination-next, .is-active.pagination-link, .is-active.pagination-ellipsis, .is-active.file-cta, .is-active.file-name, .select select.is-active, .is-active.textarea, .is-active.input, .is-active.button { outline: none; } [disabled].pagination-previous, [disabled].pagination-next, [disabled].pagination-link, [disabled].pagination-ellipsis, [disabled].file-cta, [disabled].file-name, .select select[disabled], [disabled].textarea, [disabled].input, [disabled].button, fieldset[disabled] .pagination-previous, fieldset[disabled] .pagination-next, fieldset[disabled] .pagination-link, fieldset[disabled] .pagination-ellipsis, fieldset[disabled] .file-cta, fieldset[disabled] .file-name, fieldset[disabled] .select select, .select fieldset[disabled] select, fieldset[disabled] .textarea, fieldset[disabled] .input, fieldset[disabled] .button { cursor: not-allowed; } .is-unselectable, .tabs, .pagination-previous, .pagination-next, .pagination-link, .pagination-ellipsis, .breadcrumb, .file, .button { -webkit-touch-callout: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .navbar-link:not(.is-arrowless)::after, .select:not(.is-multiple):not(.is-loading)::after { border: 3px solid transparent; border-radius: 2px; border-right: 0; border-top: 0; content: " "; display: block; height: 0.625em; margin-top: -0.4375em; pointer-events: none; position: absolute; top: 50%; transform: rotate(-45deg); transform-origin: center; width: 0.625em; } .tabs:not(:last-child), .pagination:not(:last-child), .message:not(:last-child), .level:not(:last-child), .breadcrumb:not(:last-child), .block:not(:last-child), .title:not(:last-child), .subtitle:not(:last-child), .table-container:not(:last-child), .table:not(:last-child), .progress:not(:last-child), .notification:not(:last-child), .content:not(:last-child), .box:not(:last-child) { margin-bottom: 1.5rem; } .modal-close, .delete { -webkit-touch-callout: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -moz-appearance: none; -webkit-appearance: none; background-color: rgba(10, 10, 10, 0.2); border: none; border-radius: 9999px; cursor: pointer; pointer-events: auto; display: inline-block; flex-grow: 0; flex-shrink: 0; font-size: 0; height: 20px; max-height: 20px; max-width: 20px; min-height: 20px; min-width: 20px; outline: none; position: relative; vertical-align: top; width: 20px; } .modal-close::before, .delete::before, .modal-close::after, .delete::after { background-color: white; content: ""; display: block; left: 50%; position: absolute; top: 50%; transform: translateX(-50%) translateY(-50%) rotate(45deg); transform-origin: center center; } .modal-close::before, .delete::before { height: 2px; width: 50%; } .modal-close::after, .delete::after { height: 50%; width: 2px; } .modal-close:hover, .delete:hover, .modal-close:focus, .delete:focus { background-color: rgba(10, 10, 10, 0.3); } .modal-close:active, .delete:active { background-color: rgba(10, 10, 10, 0.4); } .is-small.modal-close, .is-small.delete { height: 16px; max-height: 16px; max-width: 16px; min-height: 16px; min-width: 16px; width: 16px; } .is-medium.modal-close, .is-medium.delete { height: 24px; max-height: 24px; max-width: 24px; min-height: 24px; min-width: 24px; width: 24px; } .is-large.modal-close, .is-large.delete { height: 32px; max-height: 32px; max-width: 32px; min-height: 32px; min-width: 32px; width: 32px; } .control.is-loading::after, .select.is-loading::after, .loader, .button.is-loading::after { animation: spinAround 500ms infinite linear; border: 2px solid #dbdbdb; border-radius: 9999px; border-right-color: transparent; border-top-color: transparent; content: ""; display: block; height: 1em; position: relative; width: 1em; } .hero-video, .is-overlay, .modal-background, .modal, .image.is-square img, .image.is-square .has-ratio, .image.is-1by1 img, .image.is-1by1 .has-ratio, .image.is-5by4 img, .image.is-5by4 .has-ratio, .image.is-4by3 img, .image.is-4by3 .has-ratio, .image.is-3by2 img, .image.is-3by2 .has-ratio, .image.is-5by3 img, .image.is-5by3 .has-ratio, .image.is-16by9 img, .image.is-16by9 .has-ratio, .image.is-2by1 img, .image.is-2by1 .has-ratio, .image.is-3by1 img, .image.is-3by1 .has-ratio, .image.is-4by5 img, .image.is-4by5 .has-ratio, .image.is-3by4 img, .image.is-3by4 .has-ratio, .image.is-2by3 img, .image.is-2by3 .has-ratio, .image.is-3by5 img, .image.is-3by5 .has-ratio, .image.is-9by16 img, .image.is-9by16 .has-ratio, .image.is-1by2 img, .image.is-1by2 .has-ratio, .image.is-1by3 img, .image.is-1by3 .has-ratio { bottom: 0; left: 0; position: absolute; right: 0; top: 0; } .navbar-burger { -moz-appearance: none; -webkit-appearance: none; appearance: none; background: none; border: none; color: currentColor; font-family: inherit; font-size: 1em; margin: 0; padding: 0; } /* Bulma Base */ /*! minireset.css v0.0.6 | MIT License | github.com/jgthms/minireset.css */ html, body, p, ol, ul, li, dl, dt, dd, blockquote, figure, fieldset, legend, textarea, pre, iframe, hr, h1, h2, h3, h4, h5, h6 { margin: 0; padding: 0; } h1, h2, h3, h4, h5, h6 { font-size: 100%; font-weight: normal; } ul { list-style: none; } button, input, select, textarea { margin: 0; } html { box-sizing: border-box; } *, *::before, *::after { box-sizing: inherit; } img, video { height: auto; max-width: 100%; } iframe { border: 0; } table { border-collapse: collapse; border-spacing: 0; } td, th { padding: 0; } td:not([align]), th:not([align]) { text-align: inherit; } html { background-color: white; font-size: 20px; -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; min-width: 300px; overflow-x: hidden; overflow-y: scroll; text-rendering: optimizeLegibility; text-size-adjust: 100%; } article, aside, figure, footer, header, hgroup, section { display: block; } body, button, input, optgroup, select, textarea { font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif; } code, pre { -moz-osx-font-smoothing: auto; -webkit-font-smoothing: auto; font-family: monospace; } body { color: #4a4a4a; font-size: 1em; font-weight: 400; line-height: 1.5; } a { color: #ff0d68; cursor: pointer; text-decoration: none; } a strong { color: currentColor; } a:hover { color: #363636; } code { background-color: whitesmoke; color: #da1039; font-size: 0.875em; font-weight: normal; padding: 0.25em 0.5em 0.25em; } hr { background-color: whitesmoke; border: none; display: block; height: 2px; margin: 1.5rem 0; } img { height: auto; max-width: 100%; } input[type="checkbox"], input[type="radio"] { vertical-align: baseline; } small { font-size: 0.875em; } span { font-style: inherit; font-weight: inherit; } strong { color: #363636; font-weight: 700; } fieldset { border: none; } pre { -webkit-overflow-scrolling: touch; background-color: whitesmoke; color: #4a4a4a; font-size: 0.875em; overflow-x: auto; padding: 1.25rem 1.5rem; white-space: pre; word-wrap: normal; } pre code { background-color: transparent; color: currentColor; font-size: 1em; padding: 0; } table td, table th { vertical-align: top; } table td:not([align]), table th:not([align]) { text-align: inherit; } table th { color: #363636; } @keyframes spinAround { from { transform: rotate(0deg); } to { transform: rotate(359deg); } } /* Bulma Elements */ .box { background-color: white; border-radius: 6px; box-shadow: 0 0.5em 1em -0.125em rgba(10, 10, 10, 0.1), 0 0px 0 1px rgba(10, 10, 10, 0.02); color: #4a4a4a; display: block; padding: 1.25rem; } a.box:hover, a.box:focus { box-shadow: 0 0.5em 1em -0.125em rgba(10, 10, 10, 0.1), 0 0 0 1px #ff0d68; } a.box:active { box-shadow: inset 0 1px 2px rgba(10, 10, 10, 0.2), 0 0 0 1px #ff0d68; } .button { background-color: white; border-color: #dbdbdb; border-width: 1px; color: #363636; cursor: pointer; justify-content: center; padding-bottom: calc(0.5em - 1px); padding-left: 1em; padding-right: 1em; padding-top: calc(0.5em - 1px); text-align: center; white-space: nowrap; } .button strong { color: inherit; } .button .icon, .button .icon.is-small, .button .icon.is-medium, .button .icon.is-large { height: 1.5em; width: 1.5em; } .button .icon:first-child:not(:last-child) { margin-left: calc(-0.5em - 1px); margin-right: 0.25em; } .button .icon:last-child:not(:first-child) { margin-left: 0.25em; margin-right: calc(-0.5em - 1px); } .button .icon:first-child:last-child { margin-left: calc(-0.5em - 1px); margin-right: calc(-0.5em - 1px); } .button:hover, .button.is-hovered { border-color: #b5b5b5; color: #363636; } .button:focus, .button.is-focused { border-color: #0092FF; color: #363636; } .button:focus:not(:active), .button.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(255, 13, 104, 0.25); } .button:active, .button.is-active { border-color: #4a4a4a; color: #363636; } .button.is-text { background-color: transparent; border-color: transparent; color: #4a4a4a; text-decoration: underline; } .button.is-text:hover, .button.is-text.is-hovered, .button.is-text:focus, .button.is-text.is-focused { background-color: whitesmoke; color: #363636; } .button.is-text:active, .button.is-text.is-active { background-color: #e8e8e8; color: #363636; } .button.is-text[disabled], fieldset[disabled] .button.is-text { background-color: transparent; border-color: transparent; box-shadow: none; } .button.is-ghost { background: none; border-color: transparent; color: #ff0d68; text-decoration: none; } .button.is-ghost:hover, .button.is-ghost.is-hovered { color: #ff0d68; text-decoration: underline; } .button.is-white { background-color: white; border-color: transparent; color: #0a0a0a; } .button.is-white:hover, .button.is-white.is-hovered { background-color: #f9f9f9; border-color: transparent; color: #0a0a0a; } .button.is-white:focus, .button.is-white.is-focused { border-color: transparent; color: #0a0a0a; } .button.is-white:focus:not(:active), .button.is-white.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(255, 255, 255, 0.25); } .button.is-white:active, .button.is-white.is-active { background-color: #f2f2f2; border-color: transparent; color: #0a0a0a; } .button.is-white[disabled], fieldset[disabled] .button.is-white { background-color: white; border-color: white; box-shadow: none; } .button.is-white.is-inverted { background-color: #0a0a0a; color: white; } .button.is-white.is-inverted:hover, .button.is-white.is-inverted.is-hovered { background-color: black; } .button.is-white.is-inverted[disabled], fieldset[disabled] .button.is-white.is-inverted { background-color: #0a0a0a; border-color: transparent; box-shadow: none; color: white; } .button.is-white.is-loading::after { border-color: transparent transparent #0a0a0a #0a0a0a !important; } .button.is-white.is-outlined { background-color: transparent; border-color: white; color: white; } .button.is-white.is-outlined:hover, .button.is-white.is-outlined.is-hovered, .button.is-white.is-outlined:focus, .button.is-white.is-outlined.is-focused { background-color: white; border-color: white; color: #0a0a0a; } .button.is-white.is-outlined.is-loading::after { border-color: transparent transparent white white !important; } .button.is-white.is-outlined.is-loading:hover::after, .button.is-white.is-outlined.is-loading.is-hovered::after, .button.is-white.is-outlined.is-loading:focus::after, .button.is-white.is-outlined.is-loading.is-focused::after { border-color: transparent transparent #0a0a0a #0a0a0a !important; } .button.is-white.is-outlined[disabled], fieldset[disabled] .button.is-white.is-outlined { background-color: transparent; border-color: white; box-shadow: none; color: white; } .button.is-white.is-inverted.is-outlined { background-color: transparent; border-color: #0a0a0a; color: #0a0a0a; } .button.is-white.is-inverted.is-outlined:hover, .button.is-white.is-inverted.is-outlined.is-hovered, .button.is-white.is-inverted.is-outlined:focus, .button.is-white.is-inverted.is-outlined.is-focused { background-color: #0a0a0a; color: white; } .button.is-white.is-inverted.is-outlined.is-loading:hover::after, .button.is-white.is-inverted.is-outlined.is-loading.is-hovered::after, .button.is-white.is-inverted.is-outlined.is-loading:focus::after, .button.is-white.is-inverted.is-outlined.is-loading.is-focused::after { border-color: transparent transparent white white !important; } .button.is-white.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-white.is-inverted.is-outlined { background-color: transparent; border-color: #0a0a0a; box-shadow: none; color: #0a0a0a; } .button.is-black { background-color: #0a0a0a; border-color: transparent; color: white; } .button.is-black:hover, .button.is-black.is-hovered { background-color: #040404; border-color: transparent; color: white; } .button.is-black:focus, .button.is-black.is-focused { border-color: transparent; color: white; } .button.is-black:focus:not(:active), .button.is-black.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(10, 10, 10, 0.25); } .button.is-black:active, .button.is-black.is-active { background-color: black; border-color: transparent; color: white; } .button.is-black[disabled], fieldset[disabled] .button.is-black { background-color: #0a0a0a; border-color: #0a0a0a; box-shadow: none; } .button.is-black.is-inverted { background-color: white; color: #0a0a0a; } .button.is-black.is-inverted:hover, .button.is-black.is-inverted.is-hovered { background-color: #f2f2f2; } .button.is-black.is-inverted[disabled], fieldset[disabled] .button.is-black.is-inverted { background-color: white; border-color: transparent; box-shadow: none; color: #0a0a0a; } .button.is-black.is-loading::after { border-color: transparent transparent white white !important; } .button.is-black.is-outlined { background-color: transparent; border-color: #0a0a0a; color: #0a0a0a; } .button.is-black.is-outlined:hover, .button.is-black.is-outlined.is-hovered, .button.is-black.is-outlined:focus, .button.is-black.is-outlined.is-focused { background-color: #0a0a0a; border-color: #0a0a0a; color: white; } .button.is-black.is-outlined.is-loading::after { border-color: transparent transparent #0a0a0a #0a0a0a !important; } .button.is-black.is-outlined.is-loading:hover::after, .button.is-black.is-outlined.is-loading.is-hovered::after, .button.is-black.is-outlined.is-loading:focus::after, .button.is-black.is-outlined.is-loading.is-focused::after { border-color: transparent transparent white white !important; } .button.is-black.is-outlined[disabled], fieldset[disabled] .button.is-black.is-outlined { background-color: transparent; border-color: #0a0a0a; box-shadow: none; color: #0a0a0a; } .button.is-black.is-inverted.is-outlined { background-color: transparent; border-color: white; color: white; } .button.is-black.is-inverted.is-outlined:hover, .button.is-black.is-inverted.is-outlined.is-hovered, .button.is-black.is-inverted.is-outlined:focus, .button.is-black.is-inverted.is-outlined.is-focused { background-color: white; color: #0a0a0a; } .button.is-black.is-inverted.is-outlined.is-loading:hover::after, .button.is-black.is-inverted.is-outlined.is-loading.is-hovered::after, .button.is-black.is-inverted.is-outlined.is-loading:focus::after, .button.is-black.is-inverted.is-outlined.is-loading.is-focused::after { border-color: transparent transparent #0a0a0a #0a0a0a !important; } .button.is-black.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-black.is-inverted.is-outlined { background-color: transparent; border-color: white; box-shadow: none; color: white; } .button.is-light { background-color: whitesmoke; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-light:hover, .button.is-light.is-hovered { background-color: #eeeeee; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-light:focus, .button.is-light.is-focused { border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-light:focus:not(:active), .button.is-light.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(245, 245, 245, 0.25); } .button.is-light:active, .button.is-light.is-active { background-color: #e8e8e8; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-light[disabled], fieldset[disabled] .button.is-light { background-color: whitesmoke; border-color: whitesmoke; box-shadow: none; } .button.is-light.is-inverted { background-color: rgba(0, 0, 0, 0.7); color: whitesmoke; } .button.is-light.is-inverted:hover, .button.is-light.is-inverted.is-hovered { background-color: rgba(0, 0, 0, 0.7); } .button.is-light.is-inverted[disabled], fieldset[disabled] .button.is-light.is-inverted { background-color: rgba(0, 0, 0, 0.7); border-color: transparent; box-shadow: none; color: whitesmoke; } .button.is-light.is-loading::after { border-color: transparent transparent rgba(0, 0, 0, 0.7) rgba(0, 0, 0, 0.7) !important; } .button.is-light.is-outlined { background-color: transparent; border-color: whitesmoke; color: whitesmoke; } .button.is-light.is-outlined:hover, .button.is-light.is-outlined.is-hovered, .button.is-light.is-outlined:focus, .button.is-light.is-outlined.is-focused { background-color: whitesmoke; border-color: whitesmoke; color: rgba(0, 0, 0, 0.7); } .button.is-light.is-outlined.is-loading::after { border-color: transparent transparent whitesmoke whitesmoke !important; } .button.is-light.is-outlined.is-loading:hover::after, .button.is-light.is-outlined.is-loading.is-hovered::after, .button.is-light.is-outlined.is-loading:focus::after, .button.is-light.is-outlined.is-loading.is-focused::after { border-color: transparent transparent rgba(0, 0, 0, 0.7) rgba(0, 0, 0, 0.7) !important; } .button.is-light.is-outlined[disabled], fieldset[disabled] .button.is-light.is-outlined { background-color: transparent; border-color: whitesmoke; box-shadow: none; color: whitesmoke; } .button.is-light.is-inverted.is-outlined { background-color: transparent; border-color: rgba(0, 0, 0, 0.7); color: rgba(0, 0, 0, 0.7); } .button.is-light.is-inverted.is-outlined:hover, .button.is-light.is-inverted.is-outlined.is-hovered, .button.is-light.is-inverted.is-outlined:focus, .button.is-light.is-inverted.is-outlined.is-focused { background-color: rgba(0, 0, 0, 0.7); color: whitesmoke; } .button.is-light.is-inverted.is-outlined.is-loading:hover::after, .button.is-light.is-inverted.is-outlined.is-loading.is-hovered::after, .button.is-light.is-inverted.is-outlined.is-loading:focus::after, .button.is-light.is-inverted.is-outlined.is-loading.is-focused::after { border-color: transparent transparent whitesmoke whitesmoke !important; } .button.is-light.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-light.is-inverted.is-outlined { background-color: transparent; border-color: rgba(0, 0, 0, 0.7); box-shadow: none; color: rgba(0, 0, 0, 0.7); } .button.is-dark { background-color: #363636; border-color: transparent; color: #fff; } .button.is-dark:hover, .button.is-dark.is-hovered { background-color: #2f2f2f; border-color: transparent; color: #fff; } .button.is-dark:focus, .button.is-dark.is-focused { border-color: transparent; color: #fff; } .button.is-dark:focus:not(:active), .button.is-dark.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(54, 54, 54, 0.25); } .button.is-dark:active, .button.is-dark.is-active { background-color: #292929; border-color: transparent; color: #fff; } .button.is-dark[disabled], fieldset[disabled] .button.is-dark { background-color: #363636; border-color: #363636; box-shadow: none; } .button.is-dark.is-inverted { background-color: #fff; color: #363636; } .button.is-dark.is-inverted:hover, .button.is-dark.is-inverted.is-hovered { background-color: #f2f2f2; } .button.is-dark.is-inverted[disabled], fieldset[disabled] .button.is-dark.is-inverted { background-color: #fff; border-color: transparent; box-shadow: none; color: #363636; } .button.is-dark.is-loading::after { border-color: transparent transparent #fff #fff !important; } .button.is-dark.is-outlined { background-color: transparent; border-color: #363636; color: #363636; } .button.is-dark.is-outlined:hover, .button.is-dark.is-outlined.is-hovered, .button.is-dark.is-outlined:focus, .button.is-dark.is-outlined.is-focused { background-color: #363636; border-color: #363636; color: #fff; } .button.is-dark.is-outlined.is-loading::after { border-color: transparent transparent #363636 #363636 !important; } .button.is-dark.is-outlined.is-loading:hover::after, .button.is-dark.is-outlined.is-loading.is-hovered::after, .button.is-dark.is-outlined.is-loading:focus::after, .button.is-dark.is-outlined.is-loading.is-focused::after { border-color: transparent transparent #fff #fff !important; } .button.is-dark.is-outlined[disabled], fieldset[disabled] .button.is-dark.is-outlined { background-color: transparent; border-color: #363636; box-shadow: none; color: #363636; } .button.is-dark.is-inverted.is-outlined { background-color: transparent; border-color: #fff; color: #fff; } .button.is-dark.is-inverted.is-outlined:hover, .button.is-dark.is-inverted.is-outlined.is-hovered, .button.is-dark.is-inverted.is-outlined:focus, .button.is-dark.is-inverted.is-outlined.is-focused { background-color: #fff; color: #363636; } .button.is-dark.is-inverted.is-outlined.is-loading:hover::after, .button.is-dark.is-inverted.is-outlined.is-loading.is-hovered::after, .button.is-dark.is-inverted.is-outlined.is-loading:focus::after, .button.is-dark.is-inverted.is-outlined.is-loading.is-focused::after { border-color: transparent transparent #363636 #363636 !important; } .button.is-dark.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-dark.is-inverted.is-outlined { background-color: transparent; border-color: #fff; box-shadow: none; color: #fff; } .button.is-primary { background-color: #ff0d68; border-color: transparent; color: #fff; } .button.is-primary:hover, .button.is-primary.is-hovered { background-color: #ff0060; border-color: transparent; color: #fff; } .button.is-primary:focus, .button.is-primary.is-focused { border-color: transparent; color: #fff; } .button.is-primary:focus:not(:active), .button.is-primary.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(255, 13, 104, 0.25); } .button.is-primary:active, .button.is-primary.is-active { background-color: #f3005b; border-color: transparent; color: #fff; } .button.is-primary[disabled], fieldset[disabled] .button.is-primary { background-color: #ff0d68; border-color: #ff0d68; box-shadow: none; } .button.is-primary.is-inverted { background-color: #fff; color: #ff0d68; } .button.is-primary.is-inverted:hover, .button.is-primary.is-inverted.is-hovered { background-color: #f2f2f2; } .button.is-primary.is-inverted[disabled], fieldset[disabled] .button.is-primary.is-inverted { background-color: #fff; border-color: transparent; box-shadow: none; color: #ff0d68; } .button.is-primary.is-loading::after { border-color: transparent transparent #fff #fff !important; } .button.is-primary.is-outlined { background-color: transparent; border-color: #ff0d68; color: #ff0d68; } .button.is-primary.is-outlined:hover, .button.is-primary.is-outlined.is-hovered, .button.is-primary.is-outlined:focus, .button.is-primary.is-outlined.is-focused { background-color: #ff0d68; border-color: #ff0d68; color: #fff; } .button.is-primary.is-outlined.is-loading::after { border-color: transparent transparent #ff0d68 #ff0d68 !important; } .button.is-primary.is-outlined.is-loading:hover::after, .button.is-primary.is-outlined.is-loading.is-hovered::after, .button.is-primary.is-outlined.is-loading:focus::after, .button.is-primary.is-outlined.is-loading.is-focused::after { border-color: transparent transparent #fff #fff !important; } .button.is-primary.is-outlined[disabled], fieldset[disabled] .button.is-primary.is-outlined { background-color: transparent; border-color: #ff0d68; box-shadow: none; color: #ff0d68; } .button.is-primary.is-inverted.is-outlined { background-color: transparent; border-color: #fff; color: #fff; } .button.is-primary.is-inverted.is-outlined:hover, .button.is-primary.is-inverted.is-outlined.is-hovered, .button.is-primary.is-inverted.is-outlined:focus, .button.is-primary.is-inverted.is-outlined.is-focused { background-color: #fff; color: #ff0d68; } .button.is-primary.is-inverted.is-outlined.is-loading:hover::after, .button.is-primary.is-inverted.is-outlined.is-loading.is-hovered::after, .button.is-primary.is-inverted.is-outlined.is-loading:focus::after, .button.is-primary.is-inverted.is-outlined.is-loading.is-focused::after { border-color: transparent transparent #ff0d68 #ff0d68 !important; } .button.is-primary.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-primary.is-inverted.is-outlined { background-color: transparent; border-color: #fff; box-shadow: none; color: #fff; } .button.is-primary.is-light { background-color: #ffebf2; color: #e60056; } .button.is-primary.is-light:hover, .button.is-primary.is-light.is-hovered { background-color: #ffdeea; border-color: transparent; color: #e60056; } .button.is-primary.is-light:active, .button.is-primary.is-light.is-active { background-color: #ffd1e2; border-color: transparent; color: #e60056; } .button.is-link { background-color: #ff0d68; border-color: transparent; color: #fff; } .button.is-link:hover, .button.is-link.is-hovered { background-color: #ff0060; border-color: transparent; color: #fff; } .button.is-link:focus, .button.is-link.is-focused { border-color: transparent; color: #fff; } .button.is-link:focus:not(:active), .button.is-link.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(255, 13, 104, 0.25); } .button.is-link:active, .button.is-link.is-active { background-color: #f3005b; border-color: transparent; color: #fff; } .button.is-link[disabled], fieldset[disabled] .button.is-link { background-color: #ff0d68; border-color: #ff0d68; box-shadow: none; } .button.is-link.is-inverted { background-color: #fff; color: #ff0d68; } .button.is-link.is-inverted:hover, .button.is-link.is-inverted.is-hovered { background-color: #f2f2f2; } .button.is-link.is-inverted[disabled], fieldset[disabled] .button.is-link.is-inverted { background-color: #fff; border-color: transparent; box-shadow: none; color: #ff0d68; } .button.is-link.is-loading::after { border-color: transparent transparent #fff #fff !important; } .button.is-link.is-outlined { background-color: transparent; border-color: #ff0d68; color: #ff0d68; } .button.is-link.is-outlined:hover, .button.is-link.is-outlined.is-hovered, .button.is-link.is-outlined:focus, .button.is-link.is-outlined.is-focused { background-color: #ff0d68; border-color: #ff0d68; color: #fff; } .button.is-link.is-outlined.is-loading::after { border-color: transparent transparent #ff0d68 #ff0d68 !important; } .button.is-link.is-outlined.is-loading:hover::after, .button.is-link.is-outlined.is-loading.is-hovered::after, .button.is-link.is-outlined.is-loading:focus::after, .button.is-link.is-outlined.is-loading.is-focused::after { border-color: transparent transparent #fff #fff !important; } .button.is-link.is-outlined[disabled], fieldset[disabled] .button.is-link.is-outlined { background-color: transparent; border-color: #ff0d68; box-shadow: none; color: #ff0d68; } .button.is-link.is-inverted.is-outlined { background-color: transparent; border-color: #fff; color: #fff; } .button.is-link.is-inverted.is-outlined:hover, .button.is-link.is-inverted.is-outlined.is-hovered, .button.is-link.is-inverted.is-outlined:focus, .button.is-link.is-inverted.is-outlined.is-focused { background-color: #fff; color: #ff0d68; } .button.is-link.is-inverted.is-outlined.is-loading:hover::after, .button.is-link.is-inverted.is-outlined.is-loading.is-hovered::after, .button.is-link.is-inverted.is-outlined.is-loading:focus::after, .button.is-link.is-inverted.is-outlined.is-loading.is-focused::after { border-color: transparent transparent #ff0d68 #ff0d68 !important; } .button.is-link.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-link.is-inverted.is-outlined { background-color: transparent; border-color: #fff; box-shadow: none; color: #fff; } .button.is-link.is-light { background-color: #ffebf2; color: #e60056; } .button.is-link.is-light:hover, .button.is-link.is-light.is-hovered { background-color: #ffdeea; border-color: transparent; color: #e60056; } .button.is-link.is-light:active, .button.is-link.is-light.is-active { background-color: #ffd1e2; border-color: transparent; color: #e60056; } .button.is-info { background-color: #0092FF; border-color: transparent; color: #fff; } .button.is-info:hover, .button.is-info.is-hovered { background-color: #008bf2; border-color: transparent; color: #fff; } .button.is-info:focus, .button.is-info.is-focused { border-color: transparent; color: #fff; } .button.is-info:focus:not(:active), .button.is-info.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(0, 146, 255, 0.25); } .button.is-info:active, .button.is-info.is-active { background-color: #0083e6; border-color: transparent; color: #fff; } .button.is-info[disabled], fieldset[disabled] .button.is-info { background-color: #0092FF; border-color: #0092FF; box-shadow: none; } .button.is-info.is-inverted { background-color: #fff; color: #0092FF; } .button.is-info.is-inverted:hover, .button.is-info.is-inverted.is-hovered { background-color: #f2f2f2; } .button.is-info.is-inverted[disabled], fieldset[disabled] .button.is-info.is-inverted { background-color: #fff; border-color: transparent; box-shadow: none; color: #0092FF; } .button.is-info.is-loading::after { border-color: transparent transparent #fff #fff !important; } .button.is-info.is-outlined { background-color: transparent; border-color: #0092FF; color: #0092FF; } .button.is-info.is-outlined:hover, .button.is-info.is-outlined.is-hovered, .button.is-info.is-outlined:focus, .button.is-info.is-outlined.is-focused { background-color: #0092FF; border-color: #0092FF; color: #fff; } .button.is-info.is-outlined.is-loading::after { border-color: transparent transparent #0092FF #0092FF !important; } .button.is-info.is-outlined.is-loading:hover::after, .button.is-info.is-outlined.is-loading.is-hovered::after, .button.is-info.is-outlined.is-loading:focus::after, .button.is-info.is-outlined.is-loading.is-focused::after { border-color: transparent transparent #fff #fff !important; } .button.is-info.is-outlined[disabled], fieldset[disabled] .button.is-info.is-outlined { background-color: transparent; border-color: #0092FF; box-shadow: none; color: #0092FF; } .button.is-info.is-inverted.is-outlined { background-color: transparent; border-color: #fff; color: #fff; } .button.is-info.is-inverted.is-outlined:hover, .button.is-info.is-inverted.is-outlined.is-hovered, .button.is-info.is-inverted.is-outlined:focus, .button.is-info.is-inverted.is-outlined.is-focused { background-color: #fff; color: #0092FF; } .button.is-info.is-inverted.is-outlined.is-loading:hover::after, .button.is-info.is-inverted.is-outlined.is-loading.is-hovered::after, .button.is-info.is-inverted.is-outlined.is-loading:focus::after, .button.is-info.is-inverted.is-outlined.is-loading.is-focused::after { border-color: transparent transparent #0092FF #0092FF !important; } .button.is-info.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-info.is-inverted.is-outlined { background-color: transparent; border-color: #fff; box-shadow: none; color: #fff; } .button.is-info.is-light { background-color: #ebf6ff; color: #0075cc; } .button.is-info.is-light:hover, .button.is-info.is-light.is-hovered { background-color: #def1ff; border-color: transparent; color: #0075cc; } .button.is-info.is-light:active, .button.is-info.is-light.is-active { background-color: #d1ebff; border-color: transparent; color: #0075cc; } .button.is-success { background-color: #16DB93; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-success:hover, .button.is-success.is-hovered { background-color: #15cf8b; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-success:focus, .button.is-success.is-focused { border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-success:focus:not(:active), .button.is-success.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(22, 219, 147, 0.25); } .button.is-success:active, .button.is-success.is-active { background-color: #14c483; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-success[disabled], fieldset[disabled] .button.is-success { background-color: #16DB93; border-color: #16DB93; box-shadow: none; } .button.is-success.is-inverted { background-color: rgba(0, 0, 0, 0.7); color: #16DB93; } .button.is-success.is-inverted:hover, .button.is-success.is-inverted.is-hovered { background-color: rgba(0, 0, 0, 0.7); } .button.is-success.is-inverted[disabled], fieldset[disabled] .button.is-success.is-inverted { background-color: rgba(0, 0, 0, 0.7); border-color: transparent; box-shadow: none; color: #16DB93; } .button.is-success.is-loading::after { border-color: transparent transparent rgba(0, 0, 0, 0.7) rgba(0, 0, 0, 0.7) !important; } .button.is-success.is-outlined { background-color: transparent; border-color: #16DB93; color: #16DB93; } .button.is-success.is-outlined:hover, .button.is-success.is-outlined.is-hovered, .button.is-success.is-outlined:focus, .button.is-success.is-outlined.is-focused { background-color: #16DB93; border-color: #16DB93; color: rgba(0, 0, 0, 0.7); } .button.is-success.is-outlined.is-loading::after { border-color: transparent transparent #16DB93 #16DB93 !important; } .button.is-success.is-outlined.is-loading:hover::after, .button.is-success.is-outlined.is-loading.is-hovered::after, .button.is-success.is-outlined.is-loading:focus::after, .button.is-success.is-outlined.is-loading.is-focused::after { border-color: transparent transparent rgba(0, 0, 0, 0.7) rgba(0, 0, 0, 0.7) !important; } .button.is-success.is-outlined[disabled], fieldset[disabled] .button.is-success.is-outlined { background-color: transparent; border-color: #16DB93; box-shadow: none; color: #16DB93; } .button.is-success.is-inverted.is-outlined { background-color: transparent; border-color: rgba(0, 0, 0, 0.7); color: rgba(0, 0, 0, 0.7); } .button.is-success.is-inverted.is-outlined:hover, .button.is-success.is-inverted.is-outlined.is-hovered, .button.is-success.is-inverted.is-outlined:focus, .button.is-success.is-inverted.is-outlined.is-focused { background-color: rgba(0, 0, 0, 0.7); color: #16DB93; } .button.is-success.is-inverted.is-outlined.is-loading:hover::after, .button.is-success.is-inverted.is-outlined.is-loading.is-hovered::after, .button.is-success.is-inverted.is-outlined.is-loading:focus::after, .button.is-success.is-inverted.is-outlined.is-loading.is-focused::after { border-color: transparent transparent #16DB93 #16DB93 !important; } .button.is-success.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-success.is-inverted.is-outlined { background-color: transparent; border-color: rgba(0, 0, 0, 0.7); box-shadow: none; color: rgba(0, 0, 0, 0.7); } .button.is-success.is-light { background-color: #ecfdf7; color: #0e865a; } .button.is-success.is-light:hover, .button.is-success.is-light.is-hovered { background-color: #e1fcf2; border-color: transparent; color: #0e865a; } .button.is-success.is-light:active, .button.is-success.is-light.is-active { background-color: #d5fbed; border-color: transparent; color: #0e865a; } .button.is-warning { background-color: #FFE900; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-warning:hover, .button.is-warning.is-hovered { background-color: #f2dd00; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-warning:focus, .button.is-warning.is-focused { border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-warning:focus:not(:active), .button.is-warning.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(255, 233, 0, 0.25); } .button.is-warning:active, .button.is-warning.is-active { background-color: #e6d200; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-warning[disabled], fieldset[disabled] .button.is-warning { background-color: #FFE900; border-color: #FFE900; box-shadow: none; } .button.is-warning.is-inverted { background-color: rgba(0, 0, 0, 0.7); color: #FFE900; } .button.is-warning.is-inverted:hover, .button.is-warning.is-inverted.is-hovered { background-color: rgba(0, 0, 0, 0.7); } .button.is-warning.is-inverted[disabled], fieldset[disabled] .button.is-warning.is-inverted { background-color: rgba(0, 0, 0, 0.7); border-color: transparent; box-shadow: none; color: #FFE900; } .button.is-warning.is-loading::after { border-color: transparent transparent rgba(0, 0, 0, 0.7) rgba(0, 0, 0, 0.7) !important; } .button.is-warning.is-outlined { background-color: transparent; border-color: #FFE900; color: #FFE900; } .button.is-warning.is-outlined:hover, .button.is-warning.is-outlined.is-hovered, .button.is-warning.is-outlined:focus, .button.is-warning.is-outlined.is-focused { background-color: #FFE900; border-color: #FFE900; color: rgba(0, 0, 0, 0.7); } .button.is-warning.is-outlined.is-loading::after { border-color: transparent transparent #FFE900 #FFE900 !important; } .button.is-warning.is-outlined.is-loading:hover::after, .button.is-warning.is-outlined.is-loading.is-hovered::after, .button.is-warning.is-outlined.is-loading:focus::after, .button.is-warning.is-outlined.is-loading.is-focused::after { border-color: transparent transparent rgba(0, 0, 0, 0.7) rgba(0, 0, 0, 0.7) !important; } .button.is-warning.is-outlined[disabled], fieldset[disabled] .button.is-warning.is-outlined { background-color: transparent; border-color: #FFE900; box-shadow: none; color: #FFE900; } .button.is-warning.is-inverted.is-outlined { background-color: transparent; border-color: rgba(0, 0, 0, 0.7); color: rgba(0, 0, 0, 0.7); } .button.is-warning.is-inverted.is-outlined:hover, .button.is-warning.is-inverted.is-outlined.is-hovered, .button.is-warning.is-inverted.is-outlined:focus, .button.is-warning.is-inverted.is-outlined.is-focused { background-color: rgba(0, 0, 0, 0.7); color: #FFE900; } .button.is-warning.is-inverted.is-outlined.is-loading:hover::after, .button.is-warning.is-inverted.is-outlined.is-loading.is-hovered::after, .button.is-warning.is-inverted.is-outlined.is-loading:focus::after, .button.is-warning.is-inverted.is-outlined.is-loading.is-focused::after { border-color: transparent transparent #FFE900 #FFE900 !important; } .button.is-warning.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-warning.is-inverted.is-outlined { background-color: transparent; border-color: rgba(0, 0, 0, 0.7); box-shadow: none; color: rgba(0, 0, 0, 0.7); } .button.is-warning.is-light { background-color: #fffdeb; color: #948700; } .button.is-warning.is-light:hover, .button.is-warning.is-light.is-hovered { background-color: #fffcde; border-color: transparent; color: #948700; } .button.is-warning.is-light:active, .button.is-warning.is-light.is-active { background-color: #fffbd1; border-color: transparent; color: #948700; } .button.is-danger { background-color: #f14668; border-color: transparent; color: #fff; } .button.is-danger:hover, .button.is-danger.is-hovered { background-color: #f03a5f; border-color: transparent; color: #fff; } .button.is-danger:focus, .button.is-danger.is-focused { border-color: transparent; color: #fff; } .button.is-danger:focus:not(:active), .button.is-danger.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(241, 70, 104, 0.25); } .button.is-danger:active, .button.is-danger.is-active { background-color: #ef2e55; border-color: transparent; color: #fff; } .button.is-danger[disabled], fieldset[disabled] .button.is-danger { background-color: #f14668; border-color: #f14668; box-shadow: none; } .button.is-danger.is-inverted { background-color: #fff; color: #f14668; } .button.is-danger.is-inverted:hover, .button.is-danger.is-inverted.is-hovered { background-color: #f2f2f2; } .button.is-danger.is-inverted[disabled], fieldset[disabled] .button.is-danger.is-inverted { background-color: #fff; border-color: transparent; box-shadow: none; color: #f14668; } .button.is-danger.is-loading::after { border-color: transparent transparent #fff #fff !important; } .button.is-danger.is-outlined { background-color: transparent; border-color: #f14668; color: #f14668; } .button.is-danger.is-outlined:hover, .button.is-danger.is-outlined.is-hovered, .button.is-danger.is-outlined:focus, .button.is-danger.is-outlined.is-focused { background-color: #f14668; border-color: #f14668; color: #fff; } .button.is-danger.is-outlined.is-loading::after { border-color: transparent transparent #f14668 #f14668 !important; } .button.is-danger.is-outlined.is-loading:hover::after, .button.is-danger.is-outlined.is-loading.is-hovered::after, .button.is-danger.is-outlined.is-loading:focus::after, .button.is-danger.is-outlined.is-loading.is-focused::after { border-color: transparent transparent #fff #fff !important; } .button.is-danger.is-outlined[disabled], fieldset[disabled] .button.is-danger.is-outlined { background-color: transparent; border-color: #f14668; box-shadow: none; color: #f14668; } .button.is-danger.is-inverted.is-outlined { background-color: transparent; border-color: #fff; color: #fff; } .button.is-danger.is-inverted.is-outlined:hover, .button.is-danger.is-inverted.is-outlined.is-hovered, .button.is-danger.is-inverted.is-outlined:focus, .button.is-danger.is-inverted.is-outlined.is-focused { background-color: #fff; color: #f14668; } .button.is-danger.is-inverted.is-outlined.is-loading:hover::after, .button.is-danger.is-inverted.is-outlined.is-loading.is-hovered::after, .button.is-danger.is-inverted.is-outlined.is-loading:focus::after, .button.is-danger.is-inverted.is-outlined.is-loading.is-focused::after { border-color: transparent transparent #f14668 #f14668 !important; } .button.is-danger.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-danger.is-inverted.is-outlined { background-color: transparent; border-color: #fff; box-shadow: none; color: #fff; } .button.is-danger.is-light { background-color: #feecf0; color: #cc0f35; } .button.is-danger.is-light:hover, .button.is-danger.is-light.is-hovered { background-color: #fde0e6; border-color: transparent; color: #cc0f35; } .button.is-danger.is-light:active, .button.is-danger.is-light.is-active { background-color: #fcd4dc; border-color: transparent; color: #cc0f35; } .button.is-small { font-size: 0.75rem; } .button.is-small:not(.is-rounded) { border-radius: 2px; } .button.is-normal { font-size: 1rem; } .button.is-medium { font-size: 1.25rem; } .button.is-large { font-size: 1.5rem; } .button[disabled], fieldset[disabled] .button { background-color: white; border-color: #dbdbdb; box-shadow: none; opacity: 0.5; } .button.is-fullwidth { display: flex; width: 100%; } .button.is-loading { color: transparent !important; pointer-events: none; } .button.is-loading::after { position: absolute; left: calc(50% - (1em * 0.5)); top: calc(50% - (1em * 0.5)); position: absolute !important; } .button.is-static { background-color: whitesmoke; border-color: #dbdbdb; color: #7a7a7a; box-shadow: none; pointer-events: none; } .button.is-rounded { border-radius: 9999px; padding-left: calc(1em + 0.25em); padding-right: calc(1em + 0.25em); } .buttons { align-items: center; display: flex; flex-wrap: wrap; justify-content: flex-start; } .buttons .button { margin-bottom: 0.5rem; } .buttons .button:not(:last-child):not(.is-fullwidth) { margin-right: 0.5rem; } .buttons:last-child { margin-bottom: -0.5rem; } .buttons:not(:last-child) { margin-bottom: 1rem; } .buttons.are-small .button:not(.is-normal):not(.is-medium):not(.is-large) { font-size: 0.75rem; } .buttons.are-small .button:not(.is-normal):not(.is-medium):not(.is-large):not(.is-rounded) { border-radius: 2px; } .buttons.are-medium .button:not(.is-small):not(.is-normal):not(.is-large) { font-size: 1.25rem; } .buttons.are-large .button:not(.is-small):not(.is-normal):not(.is-medium) { font-size: 1.5rem; } .buttons.has-addons .button:not(:first-child) { border-bottom-left-radius: 0; border-top-left-radius: 0; } .buttons.has-addons .button:not(:last-child) { border-bottom-right-radius: 0; border-top-right-radius: 0; margin-right: -1px; } .buttons.has-addons .button:last-child { margin-right: 0; } .buttons.has-addons .button:hover, .buttons.has-addons .button.is-hovered { z-index: 2; } .buttons.has-addons .button:focus, .buttons.has-addons .button.is-focused, .buttons.has-addons .button:active, .buttons.has-addons .button.is-active, .buttons.has-addons .button.is-selected { z-index: 3; } .buttons.has-addons .button:focus:hover, .buttons.has-addons .button.is-focused:hover, .buttons.has-addons .button:active:hover, .buttons.has-addons .button.is-active:hover, .buttons.has-addons .button.is-selected:hover { z-index: 4; } .buttons.has-addons .button.is-expanded { flex-grow: 1; flex-shrink: 1; } .buttons.is-centered { justify-content: center; } .buttons.is-centered:not(.has-addons) .button:not(.is-fullwidth) { margin-left: 0.25rem; margin-right: 0.25rem; } .buttons.is-right { justify-content: flex-end; } .buttons.is-right:not(.has-addons) .button:not(.is-fullwidth) { margin-left: 0.25rem; margin-right: 0.25rem; } @media screen and (max-width: 768px) { .button.is-responsive.is-small { font-size: 0.5625rem; } .button.is-responsive, .button.is-responsive.is-normal { font-size: 0.65625rem; } .button.is-responsive.is-medium { font-size: 0.75rem; } .button.is-responsive.is-large { font-size: 1rem; } } @media screen and (min-width: 769px) and (max-width: 1023px) { .button.is-responsive.is-small { font-size: 0.65625rem; } .button.is-responsive, .button.is-responsive.is-normal { font-size: 0.75rem; } .button.is-responsive.is-medium { font-size: 1rem; } .button.is-responsive.is-large { font-size: 1.25rem; } } .container { flex-grow: 1; margin: 0 auto; position: relative; width: auto; } .container.is-fluid { max-width: none !important; padding-left: 32px; padding-right: 32px; width: 100%; } @media screen and (min-width: 1024px) { .container { max-width: 960px; } } @media screen and (max-width: 1215px) { .container.is-widescreen:not(.is-max-desktop) { max-width: 1152px; } } @media screen and (max-width: 1407px) { .container.is-fullhd:not(.is-max-desktop):not(.is-max-widescreen) { max-width: 1344px; } } @media screen and (min-width: 1216px) { .container:not(.is-max-desktop) { max-width: 1152px; } } @media screen and (min-width: 1408px) { .container:not(.is-max-desktop):not(.is-max-widescreen) { max-width: 1344px; } } .content li + li { margin-top: 0.25em; } .content p:not(:last-child), .content dl:not(:last-child), .content ol:not(:last-child), .content ul:not(:last-child), .content blockquote:not(:last-child), .content pre:not(:last-child), .content table:not(:last-child) { margin-bottom: 1em; } .content h1, .content h2, .content h3, .content h4, .content h5, .content h6 { color: #363636; font-weight: 600; line-height: 1.125; } .content h1 { font-size: 2em; margin-bottom: 0.5em; } .content h1:not(:first-child) { margin-top: 1em; } .content h2 { font-size: 1.75em; margin-bottom: 0.5714em; } .content h2:not(:first-child) { margin-top: 1.1428em; } .content h3 { font-size: 1.5em; margin-bottom: 0.6666em; } .content h3:not(:first-child) { margin-top: 1.3333em; } .content h4 { font-size: 1.25em; margin-bottom: 0.8em; } .content h5 { font-size: 1.125em; margin-bottom: 0.8888em; } .content h6 { font-size: 1em; margin-bottom: 1em; } .content blockquote { background-color: whitesmoke; border-left: 5px solid #dbdbdb; padding: 1.25em 1.5em; } .content ol { list-style-position: outside; margin-left: 2em; margin-top: 1em; } .content ol:not([type]) { list-style-type: decimal; } .content ol:not([type]).is-lower-alpha { list-style-type: lower-alpha; } .content ol:not([type]).is-lower-roman { list-style-type: lower-roman; } .content ol:not([type]).is-upper-alpha { list-style-type: upper-alpha; } .content ol:not([type]).is-upper-roman { list-style-type: upper-roman; } .content ul { list-style: disc outside; margin-left: 2em; margin-top: 1em; } .content ul ul { list-style-type: circle; margin-top: 0.5em; } .content ul ul ul { list-style-type: square; } .content dd { margin-left: 2em; } .content figure { margin-left: 2em; margin-right: 2em; text-align: center; } .content figure:not(:first-child) { margin-top: 2em; } .content figure:not(:last-child) { margin-bottom: 2em; } .content figure img { display: inline-block; } .content figure figcaption { font-style: italic; } .content pre { -webkit-overflow-scrolling: touch; overflow-x: auto; padding: 1.25em 1.5em; white-space: pre; word-wrap: normal; } .content sup, .content sub { font-size: 75%; } .content table { width: 100%; } .content table td, .content table th { border: 1px solid #dbdbdb; border-width: 0 0 1px; padding: 0.5em 0.75em; vertical-align: top; } .content table th { color: #363636; } .content table th:not([align]) { text-align: inherit; } .content table thead td, .content table thead th { border-width: 0 0 2px; color: #363636; } .content table tfoot td, .content table tfoot th { border-width: 2px 0 0; color: #363636; } .content table tbody tr:last-child td, .content table tbody tr:last-child th { border-bottom-width: 0; } .content .tabs li + li { margin-top: 0; } .content.is-small { font-size: 0.75rem; } .content.is-normal { font-size: 1rem; } .content.is-medium { font-size: 1.25rem; } .content.is-large { font-size: 1.5rem; } .icon { align-items: center; display: inline-flex; justify-content: center; height: 1.5rem; width: 1.5rem; } .icon.is-small { height: 1rem; width: 1rem; } .icon.is-medium { height: 2rem; width: 2rem; } .icon.is-large { height: 3rem; width: 3rem; } .icon-text { align-items: flex-start; color: inherit; display: inline-flex; flex-wrap: wrap; line-height: 1.5rem; vertical-align: top; } .icon-text .icon { flex-grow: 0; flex-shrink: 0; } .icon-text .icon:not(:last-child) { margin-right: 0.25em; } .icon-text .icon:not(:first-child) { margin-left: 0.25em; } div.icon-text { display: flex; } .image { display: block; position: relative; } .image img { display: block; height: auto; width: 100%; } .image img.is-rounded { border-radius: 9999px; } .image.is-fullwidth { width: 100%; } .image.is-square img, .image.is-square .has-ratio, .image.is-1by1 img, .image.is-1by1 .has-ratio, .image.is-5by4 img, .image.is-5by4 .has-ratio, .image.is-4by3 img, .image.is-4by3 .has-ratio, .image.is-3by2 img, .image.is-3by2 .has-ratio, .image.is-5by3 img, .image.is-5by3 .has-ratio, .image.is-16by9 img, .image.is-16by9 .has-ratio, .image.is-2by1 img, .image.is-2by1 .has-ratio, .image.is-3by1 img, .image.is-3by1 .has-ratio, .image.is-4by5 img, .image.is-4by5 .has-ratio, .image.is-3by4 img, .image.is-3by4 .has-ratio, .image.is-2by3 img, .image.is-2by3 .has-ratio, .image.is-3by5 img, .image.is-3by5 .has-ratio, .image.is-9by16 img, .image.is-9by16 .has-ratio, .image.is-1by2 img, .image.is-1by2 .has-ratio, .image.is-1by3 img, .image.is-1by3 .has-ratio { height: 100%; width: 100%; } .image.is-square, .image.is-1by1 { padding-top: 100%; } .image.is-5by4 { padding-top: 80%; } .image.is-4by3 { padding-top: 75%; } .image.is-3by2 { padding-top: 66.6666%; } .image.is-5by3 { padding-top: 60%; } .image.is-16by9 { padding-top: 56.25%; } .image.is-2by1 { padding-top: 50%; } .image.is-3by1 { padding-top: 33.3333%; } .image.is-4by5 { padding-top: 125%; } .image.is-3by4 { padding-top: 133.3333%; } .image.is-2by3 { padding-top: 150%; } .image.is-3by5 { padding-top: 166.6666%; } .image.is-9by16 { padding-top: 177.7777%; } .image.is-1by2 { padding-top: 200%; } .image.is-1by3 { padding-top: 300%; } .image.is-16x16 { height: 16px; width: 16px; } .image.is-24x24 { height: 24px; width: 24px; } .image.is-32x32 { height: 32px; width: 32px; } .image.is-48x48 { height: 48px; width: 48px; } .image.is-64x64 { height: 64px; width: 64px; } .image.is-96x96 { height: 96px; width: 96px; } .image.is-128x128 { height: 128px; width: 128px; } .notification { background-color: whitesmoke; border-radius: 4px; position: relative; padding: 1.25rem 2.5rem 1.25rem 1.5rem; } .notification a:not(.button):not(.dropdown-item) { color: currentColor; text-decoration: underline; } .notification strong { color: currentColor; } .notification code, .notification pre { background: white; } .notification pre code { background: transparent; } .notification > .delete { right: 0.5rem; position: absolute; top: 0.5rem; } .notification .title, .notification .subtitle, .notification .content { color: currentColor; } .notification.is-white { background-color: white; color: #0a0a0a; } .notification.is-black { background-color: #0a0a0a; color: white; } .notification.is-light { background-color: whitesmoke; color: rgba(0, 0, 0, 0.7); } .notification.is-dark { background-color: #363636; color: #fff; } .notification.is-primary { background-color: #ff0d68; color: #fff; } .notification.is-primary.is-light { background-color: #ffebf2; color: #e60056; } .notification.is-link { background-color: #ff0d68; color: #fff; } .notification.is-link.is-light { background-color: #ffebf2; color: #e60056; } .notification.is-info { background-color: #0092FF; color: #fff; } .notification.is-info.is-light { background-color: #ebf6ff; color: #0075cc; } .notification.is-success { background-color: #16DB93; color: rgba(0, 0, 0, 0.7); } .notification.is-success.is-light { background-color: #ecfdf7; color: #0e865a; } .notification.is-warning { background-color: #FFE900; color: rgba(0, 0, 0, 0.7); } .notification.is-warning.is-light { background-color: #fffdeb; color: #948700; } .notification.is-danger { background-color: #f14668; color: #fff; } .notification.is-danger.is-light { background-color: #feecf0; color: #cc0f35; } .progress { -moz-appearance: none; -webkit-appearance: none; border: none; border-radius: 9999px; display: block; height: 1rem; overflow: hidden; padding: 0; width: 100%; } .progress::-webkit-progress-bar { background-color: #ededed; } .progress::-webkit-progress-value { background-color: #4a4a4a; } .progress::-moz-progress-bar { background-color: #4a4a4a; } .progress::-ms-fill { background-color: #4a4a4a; border: none; } .progress.is-white::-webkit-progress-value { background-color: white; } .progress.is-white::-moz-progress-bar { background-color: white; } .progress.is-white::-ms-fill { background-color: white; } .progress.is-white:indeterminate { background-image: linear-gradient(to right, white 30%, #ededed 30%); } .progress.is-black::-webkit-progress-value { background-color: #0a0a0a; } .progress.is-black::-moz-progress-bar { background-color: #0a0a0a; } .progress.is-black::-ms-fill { background-color: #0a0a0a; } .progress.is-black:indeterminate { background-image: linear-gradient(to right, #0a0a0a 30%, #ededed 30%); } .progress.is-light::-webkit-progress-value { background-color: whitesmoke; } .progress.is-light::-moz-progress-bar { background-color: whitesmoke; } .progress.is-light::-ms-fill { background-color: whitesmoke; } .progress.is-light:indeterminate { background-image: linear-gradient(to right, whitesmoke 30%, #ededed 30%); } .progress.is-dark::-webkit-progress-value { background-color: #363636; } .progress.is-dark::-moz-progress-bar { background-color: #363636; } .progress.is-dark::-ms-fill { background-color: #363636; } .progress.is-dark:indeterminate { background-image: linear-gradient(to right, #363636 30%, #ededed 30%); } .progress.is-primary::-webkit-progress-value { background-color: #ff0d68; } .progress.is-primary::-moz-progress-bar { background-color: #ff0d68; } .progress.is-primary::-ms-fill { background-color: #ff0d68; } .progress.is-primary:indeterminate { background-image: linear-gradient(to right, #ff0d68 30%, #ededed 30%); } .progress.is-link::-webkit-progress-value { background-color: #ff0d68; } .progress.is-link::-moz-progress-bar { background-color: #ff0d68; } .progress.is-link::-ms-fill { background-color: #ff0d68; } .progress.is-link:indeterminate { background-image: linear-gradient(to right, #ff0d68 30%, #ededed 30%); } .progress.is-info::-webkit-progress-value { background-color: #0092FF; } .progress.is-info::-moz-progress-bar { background-color: #0092FF; } .progress.is-info::-ms-fill { background-color: #0092FF; } .progress.is-info:indeterminate { background-image: linear-gradient(to right, #0092FF 30%, #ededed 30%); } .progress.is-success::-webkit-progress-value { background-color: #16DB93; } .progress.is-success::-moz-progress-bar { background-color: #16DB93; } .progress.is-success::-ms-fill { background-color: #16DB93; } .progress.is-success:indeterminate { background-image: linear-gradient(to right, #16DB93 30%, #ededed 30%); } .progress.is-warning::-webkit-progress-value { background-color: #FFE900; } .progress.is-warning::-moz-progress-bar { background-color: #FFE900; } .progress.is-warning::-ms-fill { background-color: #FFE900; } .progress.is-warning:indeterminate { background-image: linear-gradient(to right, #FFE900 30%, #ededed 30%); } .progress.is-danger::-webkit-progress-value { background-color: #f14668; } .progress.is-danger::-moz-progress-bar { background-color: #f14668; } .progress.is-danger::-ms-fill { background-color: #f14668; } .progress.is-danger:indeterminate { background-image: linear-gradient(to right, #f14668 30%, #ededed 30%); } .progress:indeterminate { animation-duration: 1.5s; animation-iteration-count: infinite; animation-name: moveIndeterminate; animation-timing-function: linear; background-color: #ededed; background-image: linear-gradient(to right, #4a4a4a 30%, #ededed 30%); background-position: top left; background-repeat: no-repeat; background-size: 150% 150%; } .progress:indeterminate::-webkit-progress-bar { background-color: transparent; } .progress:indeterminate::-moz-progress-bar { background-color: transparent; } .progress:indeterminate::-ms-fill { animation-name: none; } .progress.is-small { height: 0.75rem; } .progress.is-medium { height: 1.25rem; } .progress.is-large { height: 1.5rem; } @keyframes moveIndeterminate { from { background-position: 200% 0; } to { background-position: -200% 0; } } .table { background-color: white; color: #363636; } .table td, .table th { border: 1px solid #dbdbdb; border-width: 0 0 1px; padding: 0.5em 0.75em; vertical-align: top; } .table td.is-white, .table th.is-white { background-color: white; border-color: white; color: #0a0a0a; } .table td.is-black, .table th.is-black { background-color: #0a0a0a; border-color: #0a0a0a; color: white; } .table td.is-light, .table th.is-light { background-color: whitesmoke; border-color: whitesmoke; color: rgba(0, 0, 0, 0.7); } .table td.is-dark, .table th.is-dark { background-color: #363636; border-color: #363636; color: #fff; } .table td.is-primary, .table th.is-primary { background-color: #ff0d68; border-color: #ff0d68; color: #fff; } .table td.is-link, .table th.is-link { background-color: #ff0d68; border-color: #ff0d68; color: #fff; } .table td.is-info, .table th.is-info { background-color: #0092FF; border-color: #0092FF; color: #fff; } .table td.is-success, .table th.is-success { background-color: #16DB93; border-color: #16DB93; color: rgba(0, 0, 0, 0.7); } .table td.is-warning, .table th.is-warning { background-color: #FFE900; border-color: #FFE900; color: rgba(0, 0, 0, 0.7); } .table td.is-danger, .table th.is-danger { background-color: #f14668; border-color: #f14668; color: #fff; } .table td.is-narrow, .table th.is-narrow { white-space: nowrap; width: 1%; } .table td.is-selected, .table th.is-selected { background-color: #ff0d68; color: #fff; } .table td.is-selected a, .table td.is-selected strong, .table th.is-selected a, .table th.is-selected strong { color: currentColor; } .table td.is-vcentered, .table th.is-vcentered { vertical-align: middle; } .table th { color: #363636; } .table th:not([align]) { text-align: left; } .table tr.is-selected { background-color: #ff0d68; color: #fff; } .table tr.is-selected a, .table tr.is-selected strong { color: currentColor; } .table tr.is-selected td, .table tr.is-selected th { border-color: #fff; color: currentColor; } .table thead { background-color: transparent; } .table thead td, .table thead th { border-width: 0 0 2px; color: #363636; } .table tfoot { background-color: transparent; } .table tfoot td, .table tfoot th { border-width: 2px 0 0; color: #363636; } .table tbody { background-color: transparent; } .table tbody tr:last-child td, .table tbody tr:last-child th { border-bottom-width: 0; } .table.is-bordered td, .table.is-bordered th { border-width: 1px; } .table.is-bordered tr:last-child td, .table.is-bordered tr:last-child th { border-bottom-width: 1px; } .table.is-fullwidth { width: 100%; } .table.is-hoverable tbody tr:not(.is-selected):hover { background-color: #fafafa; } .table.is-hoverable.is-striped tbody tr:not(.is-selected):hover { background-color: #fafafa; } .table.is-hoverable.is-striped tbody tr:not(.is-selected):hover:nth-child(even) { background-color: whitesmoke; } .table.is-narrow td, .table.is-narrow th { padding: 0.25em 0.5em; } .table.is-striped tbody tr:not(.is-selected):nth-child(even) { background-color: #fafafa; } .table-container { -webkit-overflow-scrolling: touch; overflow: auto; overflow-y: hidden; max-width: 100%; } .tags { align-items: center; display: flex; flex-wrap: wrap; justify-content: flex-start; } .tags .tag { margin-bottom: 0.5rem; } .tags .tag:not(:last-child) { margin-right: 0.5rem; } .tags:last-child { margin-bottom: -0.5rem; } .tags:not(:last-child) { margin-bottom: 1rem; } .tags.are-medium .tag:not(.is-normal):not(.is-large) { font-size: 1rem; } .tags.are-large .tag:not(.is-normal):not(.is-medium) { font-size: 1.25rem; } .tags.is-centered { justify-content: center; } .tags.is-centered .tag { margin-right: 0.25rem; margin-left: 0.25rem; } .tags.is-right { justify-content: flex-end; } .tags.is-right .tag:not(:first-child) { margin-left: 0.5rem; } .tags.is-right .tag:not(:last-child) { margin-right: 0; } .tags.has-addons .tag { margin-right: 0; } .tags.has-addons .tag:not(:first-child) { margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; } .tags.has-addons .tag:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; } .tag:not(body) { align-items: center; background-color: whitesmoke; border-radius: 4px; color: #4a4a4a; display: inline-flex; font-size: 0.75rem; height: 2em; justify-content: center; line-height: 1.5; padding-left: 0.75em; padding-right: 0.75em; white-space: nowrap; } .tag:not(body) .delete { margin-left: 0.25rem; margin-right: -0.375rem; } .tag:not(body).is-white { background-color: white; color: #0a0a0a; } .tag:not(body).is-black { background-color: #0a0a0a; color: white; } .tag:not(body).is-light { background-color: whitesmoke; color: rgba(0, 0, 0, 0.7); } .tag:not(body).is-dark { background-color: #363636; color: #fff; } .tag:not(body).is-primary { background-color: #ff0d68; color: #fff; } .tag:not(body).is-primary.is-light { background-color: #ffebf2; color: #e60056; } .tag:not(body).is-link { background-color: #ff0d68; color: #fff; } .tag:not(body).is-link.is-light { background-color: #ffebf2; color: #e60056; } .tag:not(body).is-info { background-color: #0092FF; color: #fff; } .tag:not(body).is-info.is-light { background-color: #ebf6ff; color: #0075cc; } .tag:not(body).is-success { background-color: #16DB93; color: rgba(0, 0, 0, 0.7); } .tag:not(body).is-success.is-light { background-color: #ecfdf7; color: #0e865a; } .tag:not(body).is-warning { background-color: #FFE900; color: rgba(0, 0, 0, 0.7); } .tag:not(body).is-warning.is-light { background-color: #fffdeb; color: #948700; } .tag:not(body).is-danger { background-color: #f14668; color: #fff; } .tag:not(body).is-danger.is-light { background-color: #feecf0; color: #cc0f35; } .tag:not(body).is-normal { font-size: 0.75rem; } .tag:not(body).is-medium { font-size: 1rem; } .tag:not(body).is-large { font-size: 1.25rem; } .tag:not(body) .icon:first-child:not(:last-child) { margin-left: -0.375em; margin-right: 0.1875em; } .tag:not(body) .icon:last-child:not(:first-child) { margin-left: 0.1875em; margin-right: -0.375em; } .tag:not(body) .icon:first-child:last-child { margin-left: -0.375em; margin-right: -0.375em; } .tag:not(body).is-delete { margin-left: 1px; padding: 0; position: relative; width: 2em; } .tag:not(body).is-delete::before, .tag:not(body).is-delete::after { background-color: currentColor; content: ""; display: block; left: 50%; position: absolute; top: 50%; transform: translateX(-50%) translateY(-50%) rotate(45deg); transform-origin: center center; } .tag:not(body).is-delete::before { height: 1px; width: 50%; } .tag:not(body).is-delete::after { height: 50%; width: 1px; } .tag:not(body).is-delete:hover, .tag:not(body).is-delete:focus { background-color: #e8e8e8; } .tag:not(body).is-delete:active { background-color: #dbdbdb; } .tag:not(body).is-rounded { border-radius: 9999px; } a.tag:hover { text-decoration: underline; } .title, .subtitle { word-break: break-word; } .title em, .title span, .subtitle em, .subtitle span { font-weight: inherit; } .title sub, .subtitle sub { font-size: 0.75em; } .title sup, .subtitle sup { font-size: 0.75em; } .title .tag, .subtitle .tag { vertical-align: middle; } .title { color: #363636; font-size: 2rem; font-weight: 600; line-height: 1.125; } .title strong { color: inherit; font-weight: inherit; } .title:not(.is-spaced) + .subtitle { margin-top: -1.25rem; } .title.is-1 { font-size: 3rem; } .title.is-2 { font-size: 2.5rem; } .title.is-3 { font-size: 2rem; } .title.is-4 { font-size: 1.5rem; } .title.is-5 { font-size: 1.25rem; } .title.is-6 { font-size: 1rem; } .title.is-7 { font-size: 0.75rem; } .subtitle { color: #4a4a4a; font-size: 1.25rem; font-weight: 400; line-height: 1.25; } .subtitle strong { color: #363636; font-weight: 600; } .subtitle:not(.is-spaced) + .title { margin-top: -1.25rem; } .subtitle.is-1 { font-size: 3rem; } .subtitle.is-2 { font-size: 2.5rem; } .subtitle.is-3 { font-size: 2rem; } .subtitle.is-4 { font-size: 1.5rem; } .subtitle.is-5 { font-size: 1.25rem; } .subtitle.is-6 { font-size: 1rem; } .subtitle.is-7 { font-size: 0.75rem; } .heading { display: block; font-size: 11px; letter-spacing: 1px; margin-bottom: 5px; text-transform: uppercase; } .number { align-items: center; background-color: whitesmoke; border-radius: 9999px; display: inline-flex; font-size: 1.25rem; height: 2em; justify-content: center; margin-right: 1.5rem; min-width: 2.5em; padding: 0.25rem 0.5rem; text-align: center; vertical-align: top; } /* Bulma Form */ .select select, .textarea, .input { background-color: white; border-color: #dbdbdb; border-radius: 4px; color: #363636; } .select select::-moz-placeholder, .textarea::-moz-placeholder, .input::-moz-placeholder { color: rgba(54, 54, 54, 0.3); } .select select::-webkit-input-placeholder, .textarea::-webkit-input-placeholder, .input::-webkit-input-placeholder { color: rgba(54, 54, 54, 0.3); } .select select:-moz-placeholder, .textarea:-moz-placeholder, .input:-moz-placeholder { color: rgba(54, 54, 54, 0.3); } .select select:-ms-input-placeholder, .textarea:-ms-input-placeholder, .input:-ms-input-placeholder { color: rgba(54, 54, 54, 0.3); } .select select:hover, .textarea:hover, .input:hover, .select select.is-hovered, .is-hovered.textarea, .is-hovered.input { border-color: #b5b5b5; } .select select:focus, .textarea:focus, .input:focus, .select select.is-focused, .is-focused.textarea, .is-focused.input, .select select:active, .textarea:active, .input:active, .select select.is-active, .is-active.textarea, .is-active.input { border-color: #ff0d68; box-shadow: 0 0 0 0.125em rgba(255, 13, 104, 0.25); } .select select[disabled], [disabled].textarea, [disabled].input, fieldset[disabled] .select select, .select fieldset[disabled] select, fieldset[disabled] .textarea, fieldset[disabled] .input { background-color: whitesmoke; border-color: whitesmoke; box-shadow: none; color: #7a7a7a; } .select select[disabled]::-moz-placeholder, [disabled].textarea::-moz-placeholder, [disabled].input::-moz-placeholder, fieldset[disabled] .select select::-moz-placeholder, .select fieldset[disabled] select::-moz-placeholder, fieldset[disabled] .textarea::-moz-placeholder, fieldset[disabled] .input::-moz-placeholder { color: rgba(122, 122, 122, 0.3); } .select select[disabled]::-webkit-input-placeholder, [disabled].textarea::-webkit-input-placeholder, [disabled].input::-webkit-input-placeholder, fieldset[disabled] .select select::-webkit-input-placeholder, .select fieldset[disabled] select::-webkit-input-placeholder, fieldset[disabled] .textarea::-webkit-input-placeholder, fieldset[disabled] .input::-webkit-input-placeholder { color: rgba(122, 122, 122, 0.3); } .select select[disabled]:-moz-placeholder, [disabled].textarea:-moz-placeholder, [disabled].input:-moz-placeholder, fieldset[disabled] .select select:-moz-placeholder, .select fieldset[disabled] select:-moz-placeholder, fieldset[disabled] .textarea:-moz-placeholder, fieldset[disabled] .input:-moz-placeholder { color: rgba(122, 122, 122, 0.3); } .select select[disabled]:-ms-input-placeholder, [disabled].textarea:-ms-input-placeholder, [disabled].input:-ms-input-placeholder, fieldset[disabled] .select select:-ms-input-placeholder, .select fieldset[disabled] select:-ms-input-placeholder, fieldset[disabled] .textarea:-ms-input-placeholder, fieldset[disabled] .input:-ms-input-placeholder { color: rgba(122, 122, 122, 0.3); } .textarea, .input { box-shadow: inset 0 0.0625em 0.125em rgba(10, 10, 10, 0.05); max-width: 100%; width: 100%; } [readonly].textarea, [readonly].input { box-shadow: none; } .is-white.textarea, .is-white.input { border-color: white; } .is-white.textarea:focus, .is-white.input:focus, .is-white.is-focused.textarea, .is-white.is-focused.input, .is-white.textarea:active, .is-white.input:active, .is-white.is-active.textarea, .is-white.is-active.input { box-shadow: 0 0 0 0.125em rgba(255, 255, 255, 0.25); } .is-black.textarea, .is-black.input { border-color: #0a0a0a; } .is-black.textarea:focus, .is-black.input:focus, .is-black.is-focused.textarea, .is-black.is-focused.input, .is-black.textarea:active, .is-black.input:active, .is-black.is-active.textarea, .is-black.is-active.input { box-shadow: 0 0 0 0.125em rgba(10, 10, 10, 0.25); } .is-light.textarea, .is-light.input { border-color: whitesmoke; } .is-light.textarea:focus, .is-light.input:focus, .is-light.is-focused.textarea, .is-light.is-focused.input, .is-light.textarea:active, .is-light.input:active, .is-light.is-active.textarea, .is-light.is-active.input { box-shadow: 0 0 0 0.125em rgba(245, 245, 245, 0.25); } .is-dark.textarea, .is-dark.input { border-color: #363636; } .is-dark.textarea:focus, .is-dark.input:focus, .is-dark.is-focused.textarea, .is-dark.is-focused.input, .is-dark.textarea:active, .is-dark.input:active, .is-dark.is-active.textarea, .is-dark.is-active.input { box-shadow: 0 0 0 0.125em rgba(54, 54, 54, 0.25); } .is-primary.textarea, .is-primary.input { border-color: #ff0d68; } .is-primary.textarea:focus, .is-primary.input:focus, .is-primary.is-focused.textarea, .is-primary.is-focused.input, .is-primary.textarea:active, .is-primary.input:active, .is-primary.is-active.textarea, .is-primary.is-active.input { box-shadow: 0 0 0 0.125em rgba(255, 13, 104, 0.25); } .is-link.textarea, .is-link.input { border-color: #ff0d68; } .is-link.textarea:focus, .is-link.input:focus, .is-link.is-focused.textarea, .is-link.is-focused.input, .is-link.textarea:active, .is-link.input:active, .is-link.is-active.textarea, .is-link.is-active.input { box-shadow: 0 0 0 0.125em rgba(255, 13, 104, 0.25); } .is-info.textarea, .is-info.input { border-color: #0092FF; } .is-info.textarea:focus, .is-info.input:focus, .is-info.is-focused.textarea, .is-info.is-focused.input, .is-info.textarea:active, .is-info.input:active, .is-info.is-active.textarea, .is-info.is-active.input { box-shadow: 0 0 0 0.125em rgba(0, 146, 255, 0.25); } .is-success.textarea, .is-success.input { border-color: #16DB93; } .is-success.textarea:focus, .is-success.input:focus, .is-success.is-focused.textarea, .is-success.is-focused.input, .is-success.textarea:active, .is-success.input:active, .is-success.is-active.textarea, .is-success.is-active.input { box-shadow: 0 0 0 0.125em rgba(22, 219, 147, 0.25); } .is-warning.textarea, .is-warning.input { border-color: #FFE900; } .is-warning.textarea:focus, .is-warning.input:focus, .is-warning.is-focused.textarea, .is-warning.is-focused.input, .is-warning.textarea:active, .is-warning.input:active, .is-warning.is-active.textarea, .is-warning.is-active.input { box-shadow: 0 0 0 0.125em rgba(255, 233, 0, 0.25); } .is-danger.textarea, .is-danger.input { border-color: #f14668; } .is-danger.textarea:focus, .is-danger.input:focus, .is-danger.is-focused.textarea, .is-danger.is-focused.input, .is-danger.textarea:active, .is-danger.input:active, .is-danger.is-active.textarea, .is-danger.is-active.input { box-shadow: 0 0 0 0.125em rgba(241, 70, 104, 0.25); } .is-small.textarea, .is-small.input { border-radius: 2px; font-size: 0.75rem; } .is-medium.textarea, .is-medium.input { font-size: 1.25rem; } .is-large.textarea, .is-large.input { font-size: 1.5rem; } .is-fullwidth.textarea, .is-fullwidth.input { display: block; width: 100%; } .is-inline.textarea, .is-inline.input { display: inline; width: auto; } .input.is-rounded { border-radius: 9999px; padding-left: calc(calc(0.75em - 1px) + 0.375em); padding-right: calc(calc(0.75em - 1px) + 0.375em); } .input.is-static { background-color: transparent; border-color: transparent; box-shadow: none; padding-left: 0; padding-right: 0; } .textarea { display: block; max-width: 100%; min-width: 100%; padding: calc(0.75em - 1px); resize: vertical; } .textarea:not([rows]) { max-height: 40em; min-height: 8em; } .textarea[rows] { height: initial; } .textarea.has-fixed-size { resize: none; } .radio, .checkbox { cursor: pointer; display: inline-block; line-height: 1.25; position: relative; } .radio input, .checkbox input { cursor: pointer; } .radio:hover, .checkbox:hover { color: #363636; } [disabled].radio, [disabled].checkbox, fieldset[disabled] .radio, fieldset[disabled] .checkbox, .radio input[disabled], .checkbox input[disabled] { color: #7a7a7a; cursor: not-allowed; } .radio + .radio { margin-left: 0.5em; } .select { display: inline-block; max-width: 100%; position: relative; vertical-align: top; } .select:not(.is-multiple) { height: 2.5em; } .select:not(.is-multiple):not(.is-loading)::after { border-color: #ff0d68; right: 1.125em; z-index: 4; } .select.is-rounded select { border-radius: 9999px; padding-left: 1em; } .select select { cursor: pointer; display: block; font-size: 1em; max-width: 100%; outline: none; } .select select::-ms-expand { display: none; } .select select[disabled]:hover, fieldset[disabled] .select select:hover { border-color: whitesmoke; } .select select:not([multiple]) { padding-right: 2.5em; } .select select[multiple] { height: auto; padding: 0; } .select select[multiple] option { padding: 0.5em 1em; } .select:not(.is-multiple):not(.is-loading):hover::after { border-color: #363636; } .select.is-white:not(:hover)::after { border-color: white; } .select.is-white select { border-color: white; } .select.is-white select:hover, .select.is-white select.is-hovered { border-color: #f2f2f2; } .select.is-white select:focus, .select.is-white select.is-focused, .select.is-white select:active, .select.is-white select.is-active { box-shadow: 0 0 0 0.125em rgba(255, 255, 255, 0.25); } .select.is-black:not(:hover)::after { border-color: #0a0a0a; } .select.is-black select { border-color: #0a0a0a; } .select.is-black select:hover, .select.is-black select.is-hovered { border-color: black; } .select.is-black select:focus, .select.is-black select.is-focused, .select.is-black select:active, .select.is-black select.is-active { box-shadow: 0 0 0 0.125em rgba(10, 10, 10, 0.25); } .select.is-light:not(:hover)::after { border-color: whitesmoke; } .select.is-light select { border-color: whitesmoke; } .select.is-light select:hover, .select.is-light select.is-hovered { border-color: #e8e8e8; } .select.is-light select:focus, .select.is-light select.is-focused, .select.is-light select:active, .select.is-light select.is-active { box-shadow: 0 0 0 0.125em rgba(245, 245, 245, 0.25); } .select.is-dark:not(:hover)::after { border-color: #363636; } .select.is-dark select { border-color: #363636; } .select.is-dark select:hover, .select.is-dark select.is-hovered { border-color: #292929; } .select.is-dark select:focus, .select.is-dark select.is-focused, .select.is-dark select:active, .select.is-dark select.is-active { box-shadow: 0 0 0 0.125em rgba(54, 54, 54, 0.25); } .select.is-primary:not(:hover)::after { border-color: #ff0d68; } .select.is-primary select { border-color: #ff0d68; } .select.is-primary select:hover, .select.is-primary select.is-hovered { border-color: #f3005b; } .select.is-primary select:focus, .select.is-primary select.is-focused, .select.is-primary select:active, .select.is-primary select.is-active { box-shadow: 0 0 0 0.125em rgba(255, 13, 104, 0.25); } .select.is-link:not(:hover)::after { border-color: #ff0d68; } .select.is-link select { border-color: #ff0d68; } .select.is-link select:hover, .select.is-link select.is-hovered { border-color: #f3005b; } .select.is-link select:focus, .select.is-link select.is-focused, .select.is-link select:active, .select.is-link select.is-active { box-shadow: 0 0 0 0.125em rgba(255, 13, 104, 0.25); } .select.is-info:not(:hover)::after { border-color: #0092FF; } .select.is-info select { border-color: #0092FF; } .select.is-info select:hover, .select.is-info select.is-hovered { border-color: #0083e6; } .select.is-info select:focus, .select.is-info select.is-focused, .select.is-info select:active, .select.is-info select.is-active { box-shadow: 0 0 0 0.125em rgba(0, 146, 255, 0.25); } .select.is-success:not(:hover)::after { border-color: #16DB93; } .select.is-success select { border-color: #16DB93; } .select.is-success select:hover, .select.is-success select.is-hovered { border-color: #14c483; } .select.is-success select:focus, .select.is-success select.is-focused, .select.is-success select:active, .select.is-success select.is-active { box-shadow: 0 0 0 0.125em rgba(22, 219, 147, 0.25); } .select.is-warning:not(:hover)::after { border-color: #FFE900; } .select.is-warning select { border-color: #FFE900; } .select.is-warning select:hover, .select.is-warning select.is-hovered { border-color: #e6d200; } .select.is-warning select:focus, .select.is-warning select.is-focused, .select.is-warning select:active, .select.is-warning select.is-active { box-shadow: 0 0 0 0.125em rgba(255, 233, 0, 0.25); } .select.is-danger:not(:hover)::after { border-color: #f14668; } .select.is-danger select { border-color: #f14668; } .select.is-danger select:hover, .select.is-danger select.is-hovered { border-color: #ef2e55; } .select.is-danger select:focus, .select.is-danger select.is-focused, .select.is-danger select:active, .select.is-danger select.is-active { box-shadow: 0 0 0 0.125em rgba(241, 70, 104, 0.25); } .select.is-small { border-radius: 2px; font-size: 0.75rem; } .select.is-medium { font-size: 1.25rem; } .select.is-large { font-size: 1.5rem; } .select.is-disabled::after { border-color: #7a7a7a !important; opacity: 0.5; } .select.is-fullwidth { width: 100%; } .select.is-fullwidth select { width: 100%; } .select.is-loading::after { margin-top: 0; position: absolute; right: 0.625em; top: 0.625em; transform: none; } .select.is-loading.is-small:after { font-size: 0.75rem; } .select.is-loading.is-medium:after { font-size: 1.25rem; } .select.is-loading.is-large:after { font-size: 1.5rem; } .file { align-items: stretch; display: flex; justify-content: flex-start; position: relative; } .file.is-white .file-cta { background-color: white; border-color: transparent; color: #0a0a0a; } .file.is-white:hover .file-cta, .file.is-white.is-hovered .file-cta { background-color: #f9f9f9; border-color: transparent; color: #0a0a0a; } .file.is-white:focus .file-cta, .file.is-white.is-focused .file-cta { border-color: transparent; box-shadow: 0 0 0.5em rgba(255, 255, 255, 0.25); color: #0a0a0a; } .file.is-white:active .file-cta, .file.is-white.is-active .file-cta { background-color: #f2f2f2; border-color: transparent; color: #0a0a0a; } .file.is-black .file-cta { background-color: #0a0a0a; border-color: transparent; color: white; } .file.is-black:hover .file-cta, .file.is-black.is-hovered .file-cta { background-color: #040404; border-color: transparent; color: white; } .file.is-black:focus .file-cta, .file.is-black.is-focused .file-cta { border-color: transparent; box-shadow: 0 0 0.5em rgba(10, 10, 10, 0.25); color: white; } .file.is-black:active .file-cta, .file.is-black.is-active .file-cta { background-color: black; border-color: transparent; color: white; } .file.is-light .file-cta { background-color: whitesmoke; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .file.is-light:hover .file-cta, .file.is-light.is-hovered .file-cta { background-color: #eeeeee; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .file.is-light:focus .file-cta, .file.is-light.is-focused .file-cta { border-color: transparent; box-shadow: 0 0 0.5em rgba(245, 245, 245, 0.25); color: rgba(0, 0, 0, 0.7); } .file.is-light:active .file-cta, .file.is-light.is-active .file-cta { background-color: #e8e8e8; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .file.is-dark .file-cta { background-color: #363636; border-color: transparent; color: #fff; } .file.is-dark:hover .file-cta, .file.is-dark.is-hovered .file-cta { background-color: #2f2f2f; border-color: transparent; color: #fff; } .file.is-dark:focus .file-cta, .file.is-dark.is-focused .file-cta { border-color: transparent; box-shadow: 0 0 0.5em rgba(54, 54, 54, 0.25); color: #fff; } .file.is-dark:active .file-cta, .file.is-dark.is-active .file-cta { background-color: #292929; border-color: transparent; color: #fff; } .file.is-primary .file-cta { background-color: #ff0d68; border-color: transparent; color: #fff; } .file.is-primary:hover .file-cta, .file.is-primary.is-hovered .file-cta { background-color: #ff0060; border-color: transparent; color: #fff; } .file.is-primary:focus .file-cta, .file.is-primary.is-focused .file-cta { border-color: transparent; box-shadow: 0 0 0.5em rgba(255, 13, 104, 0.25); color: #fff; } .file.is-primary:active .file-cta, .file.is-primary.is-active .file-cta { background-color: #f3005b; border-color: transparent; color: #fff; } .file.is-link .file-cta { background-color: #ff0d68; border-color: transparent; color: #fff; } .file.is-link:hover .file-cta, .file.is-link.is-hovered .file-cta { background-color: #ff0060; border-color: transparent; color: #fff; } .file.is-link:focus .file-cta, .file.is-link.is-focused .file-cta { border-color: transparent; box-shadow: 0 0 0.5em rgba(255, 13, 104, 0.25); color: #fff; } .file.is-link:active .file-cta, .file.is-link.is-active .file-cta { background-color: #f3005b; border-color: transparent; color: #fff; } .file.is-info .file-cta { background-color: #0092FF; border-color: transparent; color: #fff; } .file.is-info:hover .file-cta, .file.is-info.is-hovered .file-cta { background-color: #008bf2; border-color: transparent; color: #fff; } .file.is-info:focus .file-cta, .file.is-info.is-focused .file-cta { border-color: transparent; box-shadow: 0 0 0.5em rgba(0, 146, 255, 0.25); color: #fff; } .file.is-info:active .file-cta, .file.is-info.is-active .file-cta { background-color: #0083e6; border-color: transparent; color: #fff; } .file.is-success .file-cta { background-color: #16DB93; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .file.is-success:hover .file-cta, .file.is-success.is-hovered .file-cta { background-color: #15cf8b; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .file.is-success:focus .file-cta, .file.is-success.is-focused .file-cta { border-color: transparent; box-shadow: 0 0 0.5em rgba(22, 219, 147, 0.25); color: rgba(0, 0, 0, 0.7); } .file.is-success:active .file-cta, .file.is-success.is-active .file-cta { background-color: #14c483; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .file.is-warning .file-cta { background-color: #FFE900; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .file.is-warning:hover .file-cta, .file.is-warning.is-hovered .file-cta { background-color: #f2dd00; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .file.is-warning:focus .file-cta, .file.is-warning.is-focused .file-cta { border-color: transparent; box-shadow: 0 0 0.5em rgba(255, 233, 0, 0.25); color: rgba(0, 0, 0, 0.7); } .file.is-warning:active .file-cta, .file.is-warning.is-active .file-cta { background-color: #e6d200; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .file.is-danger .file-cta { background-color: #f14668; border-color: transparent; color: #fff; } .file.is-danger:hover .file-cta, .file.is-danger.is-hovered .file-cta { background-color: #f03a5f; border-color: transparent; color: #fff; } .file.is-danger:focus .file-cta, .file.is-danger.is-focused .file-cta { border-color: transparent; box-shadow: 0 0 0.5em rgba(241, 70, 104, 0.25); color: #fff; } .file.is-danger:active .file-cta, .file.is-danger.is-active .file-cta { background-color: #ef2e55; border-color: transparent; color: #fff; } .file.is-small { font-size: 0.75rem; } .file.is-normal { font-size: 1rem; } .file.is-medium { font-size: 1.25rem; } .file.is-medium .file-icon .fa { font-size: 21px; } .file.is-large { font-size: 1.5rem; } .file.is-large .file-icon .fa { font-size: 28px; } .file.has-name .file-cta { border-bottom-right-radius: 0; border-top-right-radius: 0; } .file.has-name .file-name { border-bottom-left-radius: 0; border-top-left-radius: 0; } .file.has-name.is-empty .file-cta { border-radius: 4px; } .file.has-name.is-empty .file-name { display: none; } .file.is-boxed .file-label { flex-direction: column; } .file.is-boxed .file-cta { flex-direction: column; height: auto; padding: 1em 3em; } .file.is-boxed .file-name { border-width: 0 1px 1px; } .file.is-boxed .file-icon { height: 1.5em; width: 1.5em; } .file.is-boxed .file-icon .fa { font-size: 21px; } .file.is-boxed.is-small .file-icon .fa { font-size: 14px; } .file.is-boxed.is-medium .file-icon .fa { font-size: 28px; } .file.is-boxed.is-large .file-icon .fa { font-size: 35px; } .file.is-boxed.has-name .file-cta { border-radius: 4px 4px 0 0; } .file.is-boxed.has-name .file-name { border-radius: 0 0 4px 4px; border-width: 0 1px 1px; } .file.is-centered { justify-content: center; } .file.is-fullwidth .file-label { width: 100%; } .file.is-fullwidth .file-name { flex-grow: 1; max-width: none; } .file.is-right { justify-content: flex-end; } .file.is-right .file-cta { border-radius: 0 4px 4px 0; } .file.is-right .file-name { border-radius: 4px 0 0 4px; border-width: 1px 0 1px 1px; order: -1; } .file-label { align-items: stretch; display: flex; cursor: pointer; justify-content: flex-start; overflow: hidden; position: relative; } .file-label:hover .file-cta { background-color: #eeeeee; color: #363636; } .file-label:hover .file-name { border-color: #d5d5d5; } .file-label:active .file-cta { background-color: #e8e8e8; color: #363636; } .file-label:active .file-name { border-color: #cfcfcf; } .file-input { height: 100%; left: 0; opacity: 0; outline: none; position: absolute; top: 0; width: 100%; } .file-cta, .file-name { border-color: #dbdbdb; border-radius: 4px; font-size: 1em; padding-left: 1em; padding-right: 1em; white-space: nowrap; } .file-cta { background-color: whitesmoke; color: #4a4a4a; } .file-name { border-color: #dbdbdb; border-style: solid; border-width: 1px 1px 1px 0; display: block; max-width: 16em; overflow: hidden; text-align: inherit; text-overflow: ellipsis; } .file-icon { align-items: center; display: flex; height: 1em; justify-content: center; margin-right: 0.5em; width: 1em; } .file-icon .fa { font-size: 14px; } .label { color: #363636; display: block; font-size: 1rem; font-weight: 700; } .label:not(:last-child) { margin-bottom: 0.5em; } .label.is-small { font-size: 0.75rem; } .label.is-medium { font-size: 1.25rem; } .label.is-large { font-size: 1.5rem; } .help { display: block; font-size: 0.75rem; margin-top: 0.25rem; } .help.is-white { color: white; } .help.is-black { color: #0a0a0a; } .help.is-light { color: whitesmoke; } .help.is-dark { color: #363636; } .help.is-primary { color: #ff0d68; } .help.is-link { color: #ff0d68; } .help.is-info { color: #0092FF; } .help.is-success { color: #16DB93; } .help.is-warning { color: #FFE900; } .help.is-danger { color: #f14668; } .field:not(:last-child) { margin-bottom: 0.75rem; } .field.has-addons { display: flex; justify-content: flex-start; } .field.has-addons .control:not(:last-child) { margin-right: -1px; } .field.has-addons .control:not(:first-child):not(:last-child) .button, .field.has-addons .control:not(:first-child):not(:last-child) .input, .field.has-addons .control:not(:first-child):not(:last-child) .select select { border-radius: 0; } .field.has-addons .control:first-child:not(:only-child) .button, .field.has-addons .control:first-child:not(:only-child) .input, .field.has-addons .control:first-child:not(:only-child) .select select { border-bottom-right-radius: 0; border-top-right-radius: 0; } .field.has-addons .control:last-child:not(:only-child) .button, .field.has-addons .control:last-child:not(:only-child) .input, .field.has-addons .control:last-child:not(:only-child) .select select { border-bottom-left-radius: 0; border-top-left-radius: 0; } .field.has-addons .control .button:not([disabled]):hover, .field.has-addons .control .button:not([disabled]).is-hovered, .field.has-addons .control .input:not([disabled]):hover, .field.has-addons .control .input:not([disabled]).is-hovered, .field.has-addons .control .select select:not([disabled]):hover, .field.has-addons .control .select select:not([disabled]).is-hovered { z-index: 2; } .field.has-addons .control .button:not([disabled]):focus, .field.has-addons .control .button:not([disabled]).is-focused, .field.has-addons .control .button:not([disabled]):active, .field.has-addons .control .button:not([disabled]).is-active, .field.has-addons .control .input:not([disabled]):focus, .field.has-addons .control .input:not([disabled]).is-focused, .field.has-addons .control .input:not([disabled]):active, .field.has-addons .control .input:not([disabled]).is-active, .field.has-addons .control .select select:not([disabled]):focus, .field.has-addons .control .select select:not([disabled]).is-focused, .field.has-addons .control .select select:not([disabled]):active, .field.has-addons .control .select select:not([disabled]).is-active { z-index: 3; } .field.has-addons .control .button:not([disabled]):focus:hover, .field.has-addons .control .button:not([disabled]).is-focused:hover, .field.has-addons .control .button:not([disabled]):active:hover, .field.has-addons .control .button:not([disabled]).is-active:hover, .field.has-addons .control .input:not([disabled]):focus:hover, .field.has-addons .control .input:not([disabled]).is-focused:hover, .field.has-addons .control .input:not([disabled]):active:hover, .field.has-addons .control .input:not([disabled]).is-active:hover, .field.has-addons .control .select select:not([disabled]):focus:hover, .field.has-addons .control .select select:not([disabled]).is-focused:hover, .field.has-addons .control .select select:not([disabled]):active:hover, .field.has-addons .control .select select:not([disabled]).is-active:hover { z-index: 4; } .field.has-addons .control.is-expanded { flex-grow: 1; flex-shrink: 1; } .field.has-addons.has-addons-centered { justify-content: center; } .field.has-addons.has-addons-right { justify-content: flex-end; } .field.has-addons.has-addons-fullwidth .control { flex-grow: 1; flex-shrink: 0; } .field.is-grouped { display: flex; justify-content: flex-start; } .field.is-grouped > .control { flex-shrink: 0; } .field.is-grouped > .control:not(:last-child) { margin-bottom: 0; margin-right: 0.75rem; } .field.is-grouped > .control.is-expanded { flex-grow: 1; flex-shrink: 1; } .field.is-grouped.is-grouped-centered { justify-content: center; } .field.is-grouped.is-grouped-right { justify-content: flex-end; } .field.is-grouped.is-grouped-multiline { flex-wrap: wrap; } .field.is-grouped.is-grouped-multiline > .control:last-child, .field.is-grouped.is-grouped-multiline > .control:not(:last-child) { margin-bottom: 0.75rem; } .field.is-grouped.is-grouped-multiline:last-child { margin-bottom: -0.75rem; } .field.is-grouped.is-grouped-multiline:not(:last-child) { margin-bottom: 0; } @media screen and (min-width: 769px), print { .field.is-horizontal { display: flex; } } .field-label .label { font-size: inherit; } @media screen and (max-width: 768px) { .field-label { margin-bottom: 0.5rem; } } @media screen and (min-width: 769px), print { .field-label { flex-basis: 0; flex-grow: 1; flex-shrink: 0; margin-right: 1.5rem; text-align: right; } .field-label.is-small { font-size: 0.75rem; padding-top: 0.375em; } .field-label.is-normal { padding-top: 0.375em; } .field-label.is-medium { font-size: 1.25rem; padding-top: 0.375em; } .field-label.is-large { font-size: 1.5rem; padding-top: 0.375em; } } .field-body .field .field { margin-bottom: 0; } @media screen and (min-width: 769px), print { .field-body { display: flex; flex-basis: 0; flex-grow: 5; flex-shrink: 1; } .field-body .field { margin-bottom: 0; } .field-body > .field { flex-shrink: 1; } .field-body > .field:not(.is-narrow) { flex-grow: 1; } .field-body > .field:not(:last-child) { margin-right: 0.75rem; } } .control { box-sizing: border-box; clear: both; font-size: 1rem; position: relative; text-align: inherit; } .control.has-icons-left .input:focus ~ .icon, .control.has-icons-left .select:focus ~ .icon, .control.has-icons-right .input:focus ~ .icon, .control.has-icons-right .select:focus ~ .icon { color: #4a4a4a; } .control.has-icons-left .input.is-small ~ .icon, .control.has-icons-left .select.is-small ~ .icon, .control.has-icons-right .input.is-small ~ .icon, .control.has-icons-right .select.is-small ~ .icon { font-size: 0.75rem; } .control.has-icons-left .input.is-medium ~ .icon, .control.has-icons-left .select.is-medium ~ .icon, .control.has-icons-right .input.is-medium ~ .icon, .control.has-icons-right .select.is-medium ~ .icon { font-size: 1.25rem; } .control.has-icons-left .input.is-large ~ .icon, .control.has-icons-left .select.is-large ~ .icon, .control.has-icons-right .input.is-large ~ .icon, .control.has-icons-right .select.is-large ~ .icon { font-size: 1.5rem; } .control.has-icons-left .icon, .control.has-icons-right .icon { color: #dbdbdb; height: 2.5em; pointer-events: none; position: absolute; top: 0; width: 2.5em; z-index: 4; } .control.has-icons-left .input, .control.has-icons-left .select select { padding-left: 2.5em; } .control.has-icons-left .icon.is-left { left: 0; } .control.has-icons-right .input, .control.has-icons-right .select select { padding-right: 2.5em; } .control.has-icons-right .icon.is-right { right: 0; } .control.is-loading::after { position: absolute !important; right: 0.625em; top: 0.625em; z-index: 4; } .control.is-loading.is-small:after { font-size: 0.75rem; } .control.is-loading.is-medium:after { font-size: 1.25rem; } .control.is-loading.is-large:after { font-size: 1.5rem; } /* Bulma Components */ .breadcrumb { font-size: 1rem; white-space: nowrap; } .breadcrumb a { align-items: center; color: #ff0d68; display: flex; justify-content: center; padding: 0 0.75em; } .breadcrumb a:hover { color: #363636; } .breadcrumb li { align-items: center; display: flex; } .breadcrumb li:first-child a { padding-left: 0; } .breadcrumb li.is-active a { color: #363636; cursor: default; pointer-events: none; } .breadcrumb li + li::before { color: #b5b5b5; content: "\0002f"; } .breadcrumb ul, .breadcrumb ol { align-items: flex-start; display: flex; flex-wrap: wrap; justify-content: flex-start; } .breadcrumb .icon:first-child { margin-right: 0.5em; } .breadcrumb .icon:last-child { margin-left: 0.5em; } .breadcrumb.is-centered ol, .breadcrumb.is-centered ul { justify-content: center; } .breadcrumb.is-right ol, .breadcrumb.is-right ul { justify-content: flex-end; } .breadcrumb.is-small { font-size: 0.75rem; } .breadcrumb.is-medium { font-size: 1.25rem; } .breadcrumb.is-large { font-size: 1.5rem; } .breadcrumb.has-arrow-separator li + li::before { content: "\02192"; } .breadcrumb.has-bullet-separator li + li::before { content: "\02022"; } .breadcrumb.has-dot-separator li + li::before { content: "\000b7"; } .breadcrumb.has-succeeds-separator li + li::before { content: "\0227B"; } .card { background-color: white; border-radius: 0.25rem; box-shadow: 0 0.5em 1em -0.125em rgba(10, 10, 10, 0.1), 0 0px 0 1px rgba(10, 10, 10, 0.02); color: #4a4a4a; max-width: 100%; position: relative; } .card-footer:first-child, .card-content:first-child, .card-header:first-child { border-top-left-radius: 0.25rem; border-top-right-radius: 0.25rem; } .card-footer:last-child, .card-content:last-child, .card-header:last-child { border-bottom-left-radius: 0.25rem; border-bottom-right-radius: 0.25rem; } .card-header { background-color: transparent; align-items: stretch; box-shadow: 0 0.125em 0.25em rgba(10, 10, 10, 0.1); display: flex; } .card-header-title { align-items: center; color: #363636; display: flex; flex-grow: 1; font-weight: 700; padding: 0.75rem 1rem; } .card-header-title.is-centered { justify-content: center; } .card-header-icon { -moz-appearance: none; -webkit-appearance: none; appearance: none; background: none; border: none; color: currentColor; font-family: inherit; font-size: 1em; margin: 0; padding: 0; align-items: center; cursor: pointer; display: flex; justify-content: center; padding: 0.75rem 1rem; } .card-image { display: block; position: relative; } .card-image:first-child img { border-top-left-radius: 0.25rem; border-top-right-radius: 0.25rem; } .card-image:last-child img { border-bottom-left-radius: 0.25rem; border-bottom-right-radius: 0.25rem; } .card-content { background-color: transparent; padding: 1.5rem; } .card-footer { background-color: transparent; border-top: 1px solid #ededed; align-items: stretch; display: flex; } .card-footer-item { align-items: center; display: flex; flex-basis: 0; flex-grow: 1; flex-shrink: 0; justify-content: center; padding: 0.75rem; } .card-footer-item:not(:last-child) { border-right: 1px solid #ededed; } .card .media:not(:last-child) { margin-bottom: 1.5rem; } .dropdown { display: inline-flex; position: relative; vertical-align: top; } .dropdown.is-active .dropdown-menu, .dropdown.is-hoverable:hover .dropdown-menu { display: block; } .dropdown.is-right .dropdown-menu { left: auto; right: 0; } .dropdown.is-up .dropdown-menu { bottom: 100%; padding-bottom: 4px; padding-top: initial; top: auto; } .dropdown-menu { display: none; left: 0; min-width: 12rem; padding-top: 4px; position: absolute; top: 100%; z-index: 20; } .dropdown-content { background-color: white; border-radius: 4px; box-shadow: 0 0.5em 1em -0.125em rgba(10, 10, 10, 0.1), 0 0px 0 1px rgba(10, 10, 10, 0.02); padding-bottom: 0.5rem; padding-top: 0.5rem; } .dropdown-item { color: #4a4a4a; display: block; font-size: 0.875rem; line-height: 1.5; padding: 0.375rem 1rem; position: relative; } a.dropdown-item, button.dropdown-item { padding-right: 3rem; text-align: inherit; white-space: nowrap; width: 100%; } a.dropdown-item:hover, button.dropdown-item:hover { background-color: whitesmoke; color: #0a0a0a; } a.dropdown-item.is-active, button.dropdown-item.is-active { background-color: #ff0d68; color: #fff; } .dropdown-divider { background-color: #ededed; border: none; display: block; height: 1px; margin: 0.5rem 0; } .level { align-items: center; justify-content: space-between; } .level code { border-radius: 4px; } .level img { display: inline-block; vertical-align: top; } .level.is-mobile { display: flex; } .level.is-mobile .level-left, .level.is-mobile .level-right { display: flex; } .level.is-mobile .level-left + .level-right { margin-top: 0; } .level.is-mobile .level-item:not(:last-child) { margin-bottom: 0; margin-right: 0.75rem; } .level.is-mobile .level-item:not(.is-narrow) { flex-grow: 1; } @media screen and (min-width: 769px), print { .level { display: flex; } .level > .level-item:not(.is-narrow) { flex-grow: 1; } } .level-item { align-items: center; display: flex; flex-basis: auto; flex-grow: 0; flex-shrink: 0; justify-content: center; } .level-item .title, .level-item .subtitle { margin-bottom: 0; } @media screen and (max-width: 768px) { .level-item:not(:last-child) { margin-bottom: 0.75rem; } } .level-left, .level-right { flex-basis: auto; flex-grow: 0; flex-shrink: 0; } .level-left .level-item.is-flexible, .level-right .level-item.is-flexible { flex-grow: 1; } @media screen and (min-width: 769px), print { .level-left .level-item:not(:last-child), .level-right .level-item:not(:last-child) { margin-right: 0.75rem; } } .level-left { align-items: center; justify-content: flex-start; } @media screen and (max-width: 768px) { .level-left + .level-right { margin-top: 1.5rem; } } @media screen and (min-width: 769px), print { .level-left { display: flex; } } .level-right { align-items: center; justify-content: flex-end; } @media screen and (min-width: 769px), print { .level-right { display: flex; } } .media { align-items: flex-start; display: flex; text-align: inherit; } .media .content:not(:last-child) { margin-bottom: 0.75rem; } .media .media { border-top: 1px solid rgba(219, 219, 219, 0.5); display: flex; padding-top: 0.75rem; } .media .media .content:not(:last-child), .media .media .control:not(:last-child) { margin-bottom: 0.5rem; } .media .media .media { padding-top: 0.5rem; } .media .media .media + .media { margin-top: 0.5rem; } .media + .media { border-top: 1px solid rgba(219, 219, 219, 0.5); margin-top: 1rem; padding-top: 1rem; } .media.is-large + .media { margin-top: 1.5rem; padding-top: 1.5rem; } .media-left, .media-right { flex-basis: auto; flex-grow: 0; flex-shrink: 0; } .media-left { margin-right: 1rem; } .media-right { margin-left: 1rem; } .media-content { flex-basis: auto; flex-grow: 1; flex-shrink: 1; text-align: inherit; } @media screen and (max-width: 768px) { .media-content { overflow-x: auto; } } .menu { font-size: 1rem; } .menu.is-small { font-size: 0.75rem; } .menu.is-medium { font-size: 1.25rem; } .menu.is-large { font-size: 1.5rem; } .menu-list { line-height: 1.25; } .menu-list a { border-radius: 2px; color: #4a4a4a; display: block; padding: 0.5em 0.75em; } .menu-list a:hover { background-color: whitesmoke; color: #363636; } .menu-list a.is-active { background-color: #ff0d68; color: #fff; } .menu-list li ul { border-left: 1px solid #dbdbdb; margin: 0.75em; padding-left: 0.75em; } .menu-label { color: #7a7a7a; font-size: 0.75em; letter-spacing: 0.1em; text-transform: uppercase; } .menu-label:not(:first-child) { margin-top: 1em; } .menu-label:not(:last-child) { margin-bottom: 1em; } .message { background-color: whitesmoke; border-radius: 4px; font-size: 1rem; } .message strong { color: currentColor; } .message a:not(.button):not(.tag):not(.dropdown-item) { color: currentColor; text-decoration: underline; } .message.is-small { font-size: 0.75rem; } .message.is-medium { font-size: 1.25rem; } .message.is-large { font-size: 1.5rem; } .message.is-white { background-color: white; } .message.is-white .message-header { background-color: white; color: #0a0a0a; } .message.is-white .message-body { border-color: white; } .message.is-black { background-color: #fafafa; } .message.is-black .message-header { background-color: #0a0a0a; color: white; } .message.is-black .message-body { border-color: #0a0a0a; } .message.is-light { background-color: #fafafa; } .message.is-light .message-header { background-color: whitesmoke; color: rgba(0, 0, 0, 0.7); } .message.is-light .message-body { border-color: whitesmoke; } .message.is-dark { background-color: #fafafa; } .message.is-dark .message-header { background-color: #363636; color: #fff; } .message.is-dark .message-body { border-color: #363636; } .message.is-primary { background-color: #ffebf2; } .message.is-primary .message-header { background-color: #ff0d68; color: #fff; } .message.is-primary .message-body { border-color: #ff0d68; color: #e60056; } .message.is-link { background-color: #ffebf2; } .message.is-link .message-header { background-color: #ff0d68; color: #fff; } .message.is-link .message-body { border-color: #ff0d68; color: #e60056; } .message.is-info { background-color: #ebf6ff; } .message.is-info .message-header { background-color: #0092FF; color: #fff; } .message.is-info .message-body { border-color: #0092FF; color: #0075cc; } .message.is-success { background-color: #ecfdf7; } .message.is-success .message-header { background-color: #16DB93; color: rgba(0, 0, 0, 0.7); } .message.is-success .message-body { border-color: #16DB93; color: #0e865a; } .message.is-warning { background-color: #fffdeb; } .message.is-warning .message-header { background-color: #FFE900; color: rgba(0, 0, 0, 0.7); } .message.is-warning .message-body { border-color: #FFE900; color: #948700; } .message.is-danger { background-color: #feecf0; } .message.is-danger .message-header { background-color: #f14668; color: #fff; } .message.is-danger .message-body { border-color: #f14668; color: #cc0f35; } .message-header { align-items: center; background-color: #4a4a4a; border-radius: 4px 4px 0 0; color: #fff; display: flex; font-weight: 700; justify-content: space-between; line-height: 1.25; padding: 0.75em 1em; position: relative; } .message-header .delete { flex-grow: 0; flex-shrink: 0; margin-left: 0.75em; } .message-header + .message-body { border-width: 0; border-top-left-radius: 0; border-top-right-radius: 0; } .message-body { border-color: #dbdbdb; border-radius: 4px; border-style: solid; border-width: 0 0 0 4px; color: #4a4a4a; padding: 1.25em 1.5em; } .message-body code, .message-body pre { background-color: white; } .message-body pre code { background-color: transparent; } .modal { align-items: center; display: none; flex-direction: column; justify-content: center; overflow: hidden; position: fixed; z-index: 40; } .modal.is-active { display: flex; } .modal-background { background-color: rgba(10, 10, 10, 0.86); } .modal-content, .modal-card { margin: 0 20px; max-height: calc(100vh - 160px); overflow: auto; position: relative; width: 100%; } @media screen and (min-width: 769px) { .modal-content, .modal-card { margin: 0 auto; max-height: calc(100vh - 40px); width: 640px; } } .modal-close { background: none; height: 40px; position: fixed; right: 20px; top: 20px; width: 40px; } .modal-card { display: flex; flex-direction: column; max-height: calc(100vh - 40px); overflow: hidden; -ms-overflow-y: visible; } .modal-card-head, .modal-card-foot { align-items: center; background-color: whitesmoke; display: flex; flex-shrink: 0; justify-content: flex-start; padding: 20px; position: relative; } .modal-card-head { border-bottom: 1px solid #dbdbdb; border-top-left-radius: 6px; border-top-right-radius: 6px; } .modal-card-title { color: #363636; flex-grow: 1; flex-shrink: 0; font-size: 1.5rem; line-height: 1; } .modal-card-foot { border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; border-top: 1px solid #dbdbdb; } .modal-card-foot .button:not(:last-child) { margin-right: 0.5em; } .modal-card-body { -webkit-overflow-scrolling: touch; background-color: white; flex-grow: 1; flex-shrink: 1; overflow: auto; padding: 20px; } .navbar { background-color: white; min-height: 3.25rem; position: relative; z-index: 30; } .navbar.is-white { background-color: white; color: #0a0a0a; } .navbar.is-white .navbar-brand > .navbar-item, .navbar.is-white .navbar-brand .navbar-link { color: #0a0a0a; } .navbar.is-white .navbar-brand > a.navbar-item:focus, .navbar.is-white .navbar-brand > a.navbar-item:hover, .navbar.is-white .navbar-brand > a.navbar-item.is-active, .navbar.is-white .navbar-brand .navbar-link:focus, .navbar.is-white .navbar-brand .navbar-link:hover, .navbar.is-white .navbar-brand .navbar-link.is-active { background-color: #f2f2f2; color: #0a0a0a; } .navbar.is-white .navbar-brand .navbar-link::after { border-color: #0a0a0a; } .navbar.is-white .navbar-burger { color: #0a0a0a; } @media screen and (min-width: 1024px) { .navbar.is-white .navbar-start > .navbar-item, .navbar.is-white .navbar-start .navbar-link, .navbar.is-white .navbar-end > .navbar-item, .navbar.is-white .navbar-end .navbar-link { color: #0a0a0a; } .navbar.is-white .navbar-start > a.navbar-item:focus, .navbar.is-white .navbar-start > a.navbar-item:hover, .navbar.is-white .navbar-start > a.navbar-item.is-active, .navbar.is-white .navbar-start .navbar-link:focus, .navbar.is-white .navbar-start .navbar-link:hover, .navbar.is-white .navbar-start .navbar-link.is-active, .navbar.is-white .navbar-end > a.navbar-item:focus, .navbar.is-white .navbar-end > a.navbar-item:hover, .navbar.is-white .navbar-end > a.navbar-item.is-active, .navbar.is-white .navbar-end .navbar-link:focus, .navbar.is-white .navbar-end .navbar-link:hover, .navbar.is-white .navbar-end .navbar-link.is-active { background-color: #f2f2f2; color: #0a0a0a; } .navbar.is-white .navbar-start .navbar-link::after, .navbar.is-white .navbar-end .navbar-link::after { border-color: #0a0a0a; } .navbar.is-white .navbar-item.has-dropdown:focus .navbar-link, .navbar.is-white .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-white .navbar-item.has-dropdown.is-active .navbar-link { background-color: #f2f2f2; color: #0a0a0a; } .navbar.is-white .navbar-dropdown a.navbar-item.is-active { background-color: white; color: #0a0a0a; } } .navbar.is-black { background-color: #0a0a0a; color: white; } .navbar.is-black .navbar-brand > .navbar-item, .navbar.is-black .navbar-brand .navbar-link { color: white; } .navbar.is-black .navbar-brand > a.navbar-item:focus, .navbar.is-black .navbar-brand > a.navbar-item:hover, .navbar.is-black .navbar-brand > a.navbar-item.is-active, .navbar.is-black .navbar-brand .navbar-link:focus, .navbar.is-black .navbar-brand .navbar-link:hover, .navbar.is-black .navbar-brand .navbar-link.is-active { background-color: black; color: white; } .navbar.is-black .navbar-brand .navbar-link::after { border-color: white; } .navbar.is-black .navbar-burger { color: white; } @media screen and (min-width: 1024px) { .navbar.is-black .navbar-start > .navbar-item, .navbar.is-black .navbar-start .navbar-link, .navbar.is-black .navbar-end > .navbar-item, .navbar.is-black .navbar-end .navbar-link { color: white; } .navbar.is-black .navbar-start > a.navbar-item:focus, .navbar.is-black .navbar-start > a.navbar-item:hover, .navbar.is-black .navbar-start > a.navbar-item.is-active, .navbar.is-black .navbar-start .navbar-link:focus, .navbar.is-black .navbar-start .navbar-link:hover, .navbar.is-black .navbar-start .navbar-link.is-active, .navbar.is-black .navbar-end > a.navbar-item:focus, .navbar.is-black .navbar-end > a.navbar-item:hover, .navbar.is-black .navbar-end > a.navbar-item.is-active, .navbar.is-black .navbar-end .navbar-link:focus, .navbar.is-black .navbar-end .navbar-link:hover, .navbar.is-black .navbar-end .navbar-link.is-active { background-color: black; color: white; } .navbar.is-black .navbar-start .navbar-link::after, .navbar.is-black .navbar-end .navbar-link::after { border-color: white; } .navbar.is-black .navbar-item.has-dropdown:focus .navbar-link, .navbar.is-black .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-black .navbar-item.has-dropdown.is-active .navbar-link { background-color: black; color: white; } .navbar.is-black .navbar-dropdown a.navbar-item.is-active { background-color: #0a0a0a; color: white; } } .navbar.is-light { background-color: whitesmoke; color: rgba(0, 0, 0, 0.7); } .navbar.is-light .navbar-brand > .navbar-item, .navbar.is-light .navbar-brand .navbar-link { color: rgba(0, 0, 0, 0.7); } .navbar.is-light .navbar-brand > a.navbar-item:focus, .navbar.is-light .navbar-brand > a.navbar-item:hover, .navbar.is-light .navbar-brand > a.navbar-item.is-active, .navbar.is-light .navbar-brand .navbar-link:focus, .navbar.is-light .navbar-brand .navbar-link:hover, .navbar.is-light .navbar-brand .navbar-link.is-active { background-color: #e8e8e8; color: rgba(0, 0, 0, 0.7); } .navbar.is-light .navbar-brand .navbar-link::after { border-color: rgba(0, 0, 0, 0.7); } .navbar.is-light .navbar-burger { color: rgba(0, 0, 0, 0.7); } @media screen and (min-width: 1024px) { .navbar.is-light .navbar-start > .navbar-item, .navbar.is-light .navbar-start .navbar-link, .navbar.is-light .navbar-end > .navbar-item, .navbar.is-light .navbar-end .navbar-link { color: rgba(0, 0, 0, 0.7); } .navbar.is-light .navbar-start > a.navbar-item:focus, .navbar.is-light .navbar-start > a.navbar-item:hover, .navbar.is-light .navbar-start > a.navbar-item.is-active, .navbar.is-light .navbar-start .navbar-link:focus, .navbar.is-light .navbar-start .navbar-link:hover, .navbar.is-light .navbar-start .navbar-link.is-active, .navbar.is-light .navbar-end > a.navbar-item:focus, .navbar.is-light .navbar-end > a.navbar-item:hover, .navbar.is-light .navbar-end > a.navbar-item.is-active, .navbar.is-light .navbar-end .navbar-link:focus, .navbar.is-light .navbar-end .navbar-link:hover, .navbar.is-light .navbar-end .navbar-link.is-active { background-color: #e8e8e8; color: rgba(0, 0, 0, 0.7); } .navbar.is-light .navbar-start .navbar-link::after, .navbar.is-light .navbar-end .navbar-link::after { border-color: rgba(0, 0, 0, 0.7); } .navbar.is-light .navbar-item.has-dropdown:focus .navbar-link, .navbar.is-light .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-light .navbar-item.has-dropdown.is-active .navbar-link { background-color: #e8e8e8; color: rgba(0, 0, 0, 0.7); } .navbar.is-light .navbar-dropdown a.navbar-item.is-active { background-color: whitesmoke; color: rgba(0, 0, 0, 0.7); } } .navbar.is-dark { background-color: #363636; color: #fff; } .navbar.is-dark .navbar-brand > .navbar-item, .navbar.is-dark .navbar-brand .navbar-link { color: #fff; } .navbar.is-dark .navbar-brand > a.navbar-item:focus, .navbar.is-dark .navbar-brand > a.navbar-item:hover, .navbar.is-dark .navbar-brand > a.navbar-item.is-active, .navbar.is-dark .navbar-brand .navbar-link:focus, .navbar.is-dark .navbar-brand .navbar-link:hover, .navbar.is-dark .navbar-brand .navbar-link.is-active { background-color: #292929; color: #fff; } .navbar.is-dark .navbar-brand .navbar-link::after { border-color: #fff; } .navbar.is-dark .navbar-burger { color: #fff; } @media screen and (min-width: 1024px) { .navbar.is-dark .navbar-start > .navbar-item, .navbar.is-dark .navbar-start .navbar-link, .navbar.is-dark .navbar-end > .navbar-item, .navbar.is-dark .navbar-end .navbar-link { color: #fff; } .navbar.is-dark .navbar-start > a.navbar-item:focus, .navbar.is-dark .navbar-start > a.navbar-item:hover, .navbar.is-dark .navbar-start > a.navbar-item.is-active, .navbar.is-dark .navbar-start .navbar-link:focus, .navbar.is-dark .navbar-start .navbar-link:hover, .navbar.is-dark .navbar-start .navbar-link.is-active, .navbar.is-dark .navbar-end > a.navbar-item:focus, .navbar.is-dark .navbar-end > a.navbar-item:hover, .navbar.is-dark .navbar-end > a.navbar-item.is-active, .navbar.is-dark .navbar-end .navbar-link:focus, .navbar.is-dark .navbar-end .navbar-link:hover, .navbar.is-dark .navbar-end .navbar-link.is-active { background-color: #292929; color: #fff; } .navbar.is-dark .navbar-start .navbar-link::after, .navbar.is-dark .navbar-end .navbar-link::after { border-color: #fff; } .navbar.is-dark .navbar-item.has-dropdown:focus .navbar-link, .navbar.is-dark .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-dark .navbar-item.has-dropdown.is-active .navbar-link { background-color: #292929; color: #fff; } .navbar.is-dark .navbar-dropdown a.navbar-item.is-active { background-color: #363636; color: #fff; } } .navbar.is-primary { background-color: #ff0d68; color: #fff; } .navbar.is-primary .navbar-brand > .navbar-item, .navbar.is-primary .navbar-brand .navbar-link { color: #fff; } .navbar.is-primary .navbar-brand > a.navbar-item:focus, .navbar.is-primary .navbar-brand > a.navbar-item:hover, .navbar.is-primary .navbar-brand > a.navbar-item.is-active, .navbar.is-primary .navbar-brand .navbar-link:focus, .navbar.is-primary .navbar-brand .navbar-link:hover, .navbar.is-primary .navbar-brand .navbar-link.is-active { background-color: #f3005b; color: #fff; } .navbar.is-primary .navbar-brand .navbar-link::after { border-color: #fff; } .navbar.is-primary .navbar-burger { color: #fff; } @media screen and (min-width: 1024px) { .navbar.is-primary .navbar-start > .navbar-item, .navbar.is-primary .navbar-start .navbar-link, .navbar.is-primary .navbar-end > .navbar-item, .navbar.is-primary .navbar-end .navbar-link { color: #fff; } .navbar.is-primary .navbar-start > a.navbar-item:focus, .navbar.is-primary .navbar-start > a.navbar-item:hover, .navbar.is-primary .navbar-start > a.navbar-item.is-active, .navbar.is-primary .navbar-start .navbar-link:focus, .navbar.is-primary .navbar-start .navbar-link:hover, .navbar.is-primary .navbar-start .navbar-link.is-active, .navbar.is-primary .navbar-end > a.navbar-item:focus, .navbar.is-primary .navbar-end > a.navbar-item:hover, .navbar.is-primary .navbar-end > a.navbar-item.is-active, .navbar.is-primary .navbar-end .navbar-link:focus, .navbar.is-primary .navbar-end .navbar-link:hover, .navbar.is-primary .navbar-end .navbar-link.is-active { background-color: #f3005b; color: #fff; } .navbar.is-primary .navbar-start .navbar-link::after, .navbar.is-primary .navbar-end .navbar-link::after { border-color: #fff; } .navbar.is-primary .navbar-item.has-dropdown:focus .navbar-link, .navbar.is-primary .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-primary .navbar-item.has-dropdown.is-active .navbar-link { background-color: #f3005b; color: #fff; } .navbar.is-primary .navbar-dropdown a.navbar-item.is-active { background-color: #ff0d68; color: #fff; } } .navbar.is-link { background-color: #ff0d68; color: #fff; } .navbar.is-link .navbar-brand > .navbar-item, .navbar.is-link .navbar-brand .navbar-link { color: #fff; } .navbar.is-link .navbar-brand > a.navbar-item:focus, .navbar.is-link .navbar-brand > a.navbar-item:hover, .navbar.is-link .navbar-brand > a.navbar-item.is-active, .navbar.is-link .navbar-brand .navbar-link:focus, .navbar.is-link .navbar-brand .navbar-link:hover, .navbar.is-link .navbar-brand .navbar-link.is-active { background-color: #f3005b; color: #fff; } .navbar.is-link .navbar-brand .navbar-link::after { border-color: #fff; } .navbar.is-link .navbar-burger { color: #fff; } @media screen and (min-width: 1024px) { .navbar.is-link .navbar-start > .navbar-item, .navbar.is-link .navbar-start .navbar-link, .navbar.is-link .navbar-end > .navbar-item, .navbar.is-link .navbar-end .navbar-link { color: #fff; } .navbar.is-link .navbar-start > a.navbar-item:focus, .navbar.is-link .navbar-start > a.navbar-item:hover, .navbar.is-link .navbar-start > a.navbar-item.is-active, .navbar.is-link .navbar-start .navbar-link:focus, .navbar.is-link .navbar-start .navbar-link:hover, .navbar.is-link .navbar-start .navbar-link.is-active, .navbar.is-link .navbar-end > a.navbar-item:focus, .navbar.is-link .navbar-end > a.navbar-item:hover, .navbar.is-link .navbar-end > a.navbar-item.is-active, .navbar.is-link .navbar-end .navbar-link:focus, .navbar.is-link .navbar-end .navbar-link:hover, .navbar.is-link .navbar-end .navbar-link.is-active { background-color: #f3005b; color: #fff; } .navbar.is-link .navbar-start .navbar-link::after, .navbar.is-link .navbar-end .navbar-link::after { border-color: #fff; } .navbar.is-link .navbar-item.has-dropdown:focus .navbar-link, .navbar.is-link .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-link .navbar-item.has-dropdown.is-active .navbar-link { background-color: #f3005b; color: #fff; } .navbar.is-link .navbar-dropdown a.navbar-item.is-active { background-color: #ff0d68; color: #fff; } } .navbar.is-info { background-color: #0092FF; color: #fff; } .navbar.is-info .navbar-brand > .navbar-item, .navbar.is-info .navbar-brand .navbar-link { color: #fff; } .navbar.is-info .navbar-brand > a.navbar-item:focus, .navbar.is-info .navbar-brand > a.navbar-item:hover, .navbar.is-info .navbar-brand > a.navbar-item.is-active, .navbar.is-info .navbar-brand .navbar-link:focus, .navbar.is-info .navbar-brand .navbar-link:hover, .navbar.is-info .navbar-brand .navbar-link.is-active { background-color: #0083e6; color: #fff; } .navbar.is-info .navbar-brand .navbar-link::after { border-color: #fff; } .navbar.is-info .navbar-burger { color: #fff; } @media screen and (min-width: 1024px) { .navbar.is-info .navbar-start > .navbar-item, .navbar.is-info .navbar-start .navbar-link, .navbar.is-info .navbar-end > .navbar-item, .navbar.is-info .navbar-end .navbar-link { color: #fff; } .navbar.is-info .navbar-start > a.navbar-item:focus, .navbar.is-info .navbar-start > a.navbar-item:hover, .navbar.is-info .navbar-start > a.navbar-item.is-active, .navbar.is-info .navbar-start .navbar-link:focus, .navbar.is-info .navbar-start .navbar-link:hover, .navbar.is-info .navbar-start .navbar-link.is-active, .navbar.is-info .navbar-end > a.navbar-item:focus, .navbar.is-info .navbar-end > a.navbar-item:hover, .navbar.is-info .navbar-end > a.navbar-item.is-active, .navbar.is-info .navbar-end .navbar-link:focus, .navbar.is-info .navbar-end .navbar-link:hover, .navbar.is-info .navbar-end .navbar-link.is-active { background-color: #0083e6; color: #fff; } .navbar.is-info .navbar-start .navbar-link::after, .navbar.is-info .navbar-end .navbar-link::after { border-color: #fff; } .navbar.is-info .navbar-item.has-dropdown:focus .navbar-link, .navbar.is-info .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-info .navbar-item.has-dropdown.is-active .navbar-link { background-color: #0083e6; color: #fff; } .navbar.is-info .navbar-dropdown a.navbar-item.is-active { background-color: #0092FF; color: #fff; } } .navbar.is-success { background-color: #16DB93; color: rgba(0, 0, 0, 0.7); } .navbar.is-success .navbar-brand > .navbar-item, .navbar.is-success .navbar-brand .navbar-link { color: rgba(0, 0, 0, 0.7); } .navbar.is-success .navbar-brand > a.navbar-item:focus, .navbar.is-success .navbar-brand > a.navbar-item:hover, .navbar.is-success .navbar-brand > a.navbar-item.is-active, .navbar.is-success .navbar-brand .navbar-link:focus, .navbar.is-success .navbar-brand .navbar-link:hover, .navbar.is-success .navbar-brand .navbar-link.is-active { background-color: #14c483; color: rgba(0, 0, 0, 0.7); } .navbar.is-success .navbar-brand .navbar-link::after { border-color: rgba(0, 0, 0, 0.7); } .navbar.is-success .navbar-burger { color: rgba(0, 0, 0, 0.7); } @media screen and (min-width: 1024px) { .navbar.is-success .navbar-start > .navbar-item, .navbar.is-success .navbar-start .navbar-link, .navbar.is-success .navbar-end > .navbar-item, .navbar.is-success .navbar-end .navbar-link { color: rgba(0, 0, 0, 0.7); } .navbar.is-success .navbar-start > a.navbar-item:focus, .navbar.is-success .navbar-start > a.navbar-item:hover, .navbar.is-success .navbar-start > a.navbar-item.is-active, .navbar.is-success .navbar-start .navbar-link:focus, .navbar.is-success .navbar-start .navbar-link:hover, .navbar.is-success .navbar-start .navbar-link.is-active, .navbar.is-success .navbar-end > a.navbar-item:focus, .navbar.is-success .navbar-end > a.navbar-item:hover, .navbar.is-success .navbar-end > a.navbar-item.is-active, .navbar.is-success .navbar-end .navbar-link:focus, .navbar.is-success .navbar-end .navbar-link:hover, .navbar.is-success .navbar-end .navbar-link.is-active { background-color: #14c483; color: rgba(0, 0, 0, 0.7); } .navbar.is-success .navbar-start .navbar-link::after, .navbar.is-success .navbar-end .navbar-link::after { border-color: rgba(0, 0, 0, 0.7); } .navbar.is-success .navbar-item.has-dropdown:focus .navbar-link, .navbar.is-success .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-success .navbar-item.has-dropdown.is-active .navbar-link { background-color: #14c483; color: rgba(0, 0, 0, 0.7); } .navbar.is-success .navbar-dropdown a.navbar-item.is-active { background-color: #16DB93; color: rgba(0, 0, 0, 0.7); } } .navbar.is-warning { background-color: #FFE900; color: rgba(0, 0, 0, 0.7); } .navbar.is-warning .navbar-brand > .navbar-item, .navbar.is-warning .navbar-brand .navbar-link { color: rgba(0, 0, 0, 0.7); } .navbar.is-warning .navbar-brand > a.navbar-item:focus, .navbar.is-warning .navbar-brand > a.navbar-item:hover, .navbar.is-warning .navbar-brand > a.navbar-item.is-active, .navbar.is-warning .navbar-brand .navbar-link:focus, .navbar.is-warning .navbar-brand .navbar-link:hover, .navbar.is-warning .navbar-brand .navbar-link.is-active { background-color: #e6d200; color: rgba(0, 0, 0, 0.7); } .navbar.is-warning .navbar-brand .navbar-link::after { border-color: rgba(0, 0, 0, 0.7); } .navbar.is-warning .navbar-burger { color: rgba(0, 0, 0, 0.7); } @media screen and (min-width: 1024px) { .navbar.is-warning .navbar-start > .navbar-item, .navbar.is-warning .navbar-start .navbar-link, .navbar.is-warning .navbar-end > .navbar-item, .navbar.is-warning .navbar-end .navbar-link { color: rgba(0, 0, 0, 0.7); } .navbar.is-warning .navbar-start > a.navbar-item:focus, .navbar.is-warning .navbar-start > a.navbar-item:hover, .navbar.is-warning .navbar-start > a.navbar-item.is-active, .navbar.is-warning .navbar-start .navbar-link:focus, .navbar.is-warning .navbar-start .navbar-link:hover, .navbar.is-warning .navbar-start .navbar-link.is-active, .navbar.is-warning .navbar-end > a.navbar-item:focus, .navbar.is-warning .navbar-end > a.navbar-item:hover, .navbar.is-warning .navbar-end > a.navbar-item.is-active, .navbar.is-warning .navbar-end .navbar-link:focus, .navbar.is-warning .navbar-end .navbar-link:hover, .navbar.is-warning .navbar-end .navbar-link.is-active { background-color: #e6d200; color: rgba(0, 0, 0, 0.7); } .navbar.is-warning .navbar-start .navbar-link::after, .navbar.is-warning .navbar-end .navbar-link::after { border-color: rgba(0, 0, 0, 0.7); } .navbar.is-warning .navbar-item.has-dropdown:focus .navbar-link, .navbar.is-warning .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-warning .navbar-item.has-dropdown.is-active .navbar-link { background-color: #e6d200; color: rgba(0, 0, 0, 0.7); } .navbar.is-warning .navbar-dropdown a.navbar-item.is-active { background-color: #FFE900; color: rgba(0, 0, 0, 0.7); } } .navbar.is-danger { background-color: #f14668; color: #fff; } .navbar.is-danger .navbar-brand > .navbar-item, .navbar.is-danger .navbar-brand .navbar-link { color: #fff; } .navbar.is-danger .navbar-brand > a.navbar-item:focus, .navbar.is-danger .navbar-brand > a.navbar-item:hover, .navbar.is-danger .navbar-brand > a.navbar-item.is-active, .navbar.is-danger .navbar-brand .navbar-link:focus, .navbar.is-danger .navbar-brand .navbar-link:hover, .navbar.is-danger .navbar-brand .navbar-link.is-active { background-color: #ef2e55; color: #fff; } .navbar.is-danger .navbar-brand .navbar-link::after { border-color: #fff; } .navbar.is-danger .navbar-burger { color: #fff; } @media screen and (min-width: 1024px) { .navbar.is-danger .navbar-start > .navbar-item, .navbar.is-danger .navbar-start .navbar-link, .navbar.is-danger .navbar-end > .navbar-item, .navbar.is-danger .navbar-end .navbar-link { color: #fff; } .navbar.is-danger .navbar-start > a.navbar-item:focus, .navbar.is-danger .navbar-start > a.navbar-item:hover, .navbar.is-danger .navbar-start > a.navbar-item.is-active, .navbar.is-danger .navbar-start .navbar-link:focus, .navbar.is-danger .navbar-start .navbar-link:hover, .navbar.is-danger .navbar-start .navbar-link.is-active, .navbar.is-danger .navbar-end > a.navbar-item:focus, .navbar.is-danger .navbar-end > a.navbar-item:hover, .navbar.is-danger .navbar-end > a.navbar-item.is-active, .navbar.is-danger .navbar-end .navbar-link:focus, .navbar.is-danger .navbar-end .navbar-link:hover, .navbar.is-danger .navbar-end .navbar-link.is-active { background-color: #ef2e55; color: #fff; } .navbar.is-danger .navbar-start .navbar-link::after, .navbar.is-danger .navbar-end .navbar-link::after { border-color: #fff; } .navbar.is-danger .navbar-item.has-dropdown:focus .navbar-link, .navbar.is-danger .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-danger .navbar-item.has-dropdown.is-active .navbar-link { background-color: #ef2e55; color: #fff; } .navbar.is-danger .navbar-dropdown a.navbar-item.is-active { background-color: #f14668; color: #fff; } } .navbar > .container { align-items: stretch; display: flex; min-height: 3.25rem; width: 100%; } .navbar.has-shadow { box-shadow: 0 2px 0 0 whitesmoke; } .navbar.is-fixed-bottom, .navbar.is-fixed-top { left: 0; position: fixed; right: 0; z-index: 30; } .navbar.is-fixed-bottom { bottom: 0; } .navbar.is-fixed-bottom.has-shadow { box-shadow: 0 -2px 0 0 whitesmoke; } .navbar.is-fixed-top { top: 0; } html.has-navbar-fixed-top, body.has-navbar-fixed-top { padding-top: 3.25rem; } html.has-navbar-fixed-bottom, body.has-navbar-fixed-bottom { padding-bottom: 3.25rem; } .navbar-brand, .navbar-tabs { align-items: stretch; display: flex; flex-shrink: 0; min-height: 3.25rem; } .navbar-brand a.navbar-item:focus, .navbar-brand a.navbar-item:hover { background-color: transparent; } .navbar-tabs { -webkit-overflow-scrolling: touch; max-width: 100vw; overflow-x: auto; overflow-y: hidden; } .navbar-burger { color: #4a4a4a; -moz-appearance: none; -webkit-appearance: none; appearance: none; background: none; border: none; cursor: pointer; display: block; height: 3.25rem; position: relative; width: 3.25rem; margin-left: auto; } .navbar-burger span { background-color: currentColor; display: block; height: 1px; left: calc(50% - 8px); position: absolute; transform-origin: center; transition-duration: 86ms; transition-property: background-color, opacity, transform; transition-timing-function: ease-out; width: 16px; } .navbar-burger span:nth-child(1) { top: calc(50% - 6px); } .navbar-burger span:nth-child(2) { top: calc(50% - 1px); } .navbar-burger span:nth-child(3) { top: calc(50% + 4px); } .navbar-burger:hover { background-color: rgba(0, 0, 0, 0.05); } .navbar-burger.is-active span:nth-child(1) { transform: translateY(5px) rotate(45deg); } .navbar-burger.is-active span:nth-child(2) { opacity: 0; } .navbar-burger.is-active span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); } .navbar-menu { display: none; } .navbar-item, .navbar-link { color: #4a4a4a; display: block; line-height: 1.5; padding: 0.5rem 0.75rem; position: relative; } .navbar-item .icon:only-child, .navbar-link .icon:only-child { margin-left: -0.25rem; margin-right: -0.25rem; } a.navbar-item, .navbar-link { cursor: pointer; } a.navbar-item:focus, a.navbar-item:focus-within, a.navbar-item:hover, a.navbar-item.is-active, .navbar-link:focus, .navbar-link:focus-within, .navbar-link:hover, .navbar-link.is-active { background-color: #fafafa; color: #ff0d68; } .navbar-item { flex-grow: 0; flex-shrink: 0; } .navbar-item img { max-height: 1.75rem; } .navbar-item.has-dropdown { padding: 0; } .navbar-item.is-expanded { flex-grow: 1; flex-shrink: 1; } .navbar-item.is-tab { border-bottom: 1px solid transparent; min-height: 3.25rem; padding-bottom: calc(0.5rem - 1px); } .navbar-item.is-tab:focus, .navbar-item.is-tab:hover { background-color: transparent; border-bottom-color: #ff0d68; } .navbar-item.is-tab.is-active { background-color: transparent; border-bottom-color: #ff0d68; border-bottom-style: solid; border-bottom-width: 3px; color: #ff0d68; padding-bottom: calc(0.5rem - 3px); } .navbar-content { flex-grow: 1; flex-shrink: 1; } .navbar-link:not(.is-arrowless) { padding-right: 2.5em; } .navbar-link:not(.is-arrowless)::after { border-color: #ff0d68; margin-top: -0.375em; right: 1.125em; } .navbar-dropdown { font-size: 0.875rem; padding-bottom: 0.5rem; padding-top: 0.5rem; } .navbar-dropdown .navbar-item { padding-left: 1.5rem; padding-right: 1.5rem; } .navbar-divider { background-color: whitesmoke; border: none; display: none; height: 2px; margin: 0.5rem 0; } @media screen and (max-width: 1023px) { .navbar > .container { display: block; } .navbar-brand .navbar-item, .navbar-tabs .navbar-item { align-items: center; display: flex; } .navbar-link::after { display: none; } .navbar-menu { background-color: white; box-shadow: 0 8px 16px rgba(10, 10, 10, 0.1); padding: 0.5rem 0; } .navbar-menu.is-active { display: block; } .navbar.is-fixed-bottom-touch, .navbar.is-fixed-top-touch { left: 0; position: fixed; right: 0; z-index: 30; } .navbar.is-fixed-bottom-touch { bottom: 0; } .navbar.is-fixed-bottom-touch.has-shadow { box-shadow: 0 -2px 3px rgba(10, 10, 10, 0.1); } .navbar.is-fixed-top-touch { top: 0; } .navbar.is-fixed-top .navbar-menu, .navbar.is-fixed-top-touch .navbar-menu { -webkit-overflow-scrolling: touch; max-height: calc(100vh - 3.25rem); overflow: auto; } html.has-navbar-fixed-top-touch, body.has-navbar-fixed-top-touch { padding-top: 3.25rem; } html.has-navbar-fixed-bottom-touch, body.has-navbar-fixed-bottom-touch { padding-bottom: 3.25rem; } } @media screen and (min-width: 1024px) { .navbar, .navbar-menu, .navbar-start, .navbar-end { align-items: stretch; display: flex; } .navbar { min-height: 3.25rem; } .navbar.is-spaced { padding: 1rem 2rem; } .navbar.is-spaced .navbar-start, .navbar.is-spaced .navbar-end { align-items: center; } .navbar.is-spaced a.navbar-item, .navbar.is-spaced .navbar-link { border-radius: 4px; } .navbar.is-transparent a.navbar-item:focus, .navbar.is-transparent a.navbar-item:hover, .navbar.is-transparent a.navbar-item.is-active, .navbar.is-transparent .navbar-link:focus, .navbar.is-transparent .navbar-link:hover, .navbar.is-transparent .navbar-link.is-active { background-color: transparent !important; } .navbar.is-transparent .navbar-item.has-dropdown.is-active .navbar-link, .navbar.is-transparent .navbar-item.has-dropdown.is-hoverable:focus .navbar-link, .navbar.is-transparent .navbar-item.has-dropdown.is-hoverable:focus-within .navbar-link, .navbar.is-transparent .navbar-item.has-dropdown.is-hoverable:hover .navbar-link { background-color: transparent !important; } .navbar.is-transparent .navbar-dropdown a.navbar-item:focus, .navbar.is-transparent .navbar-dropdown a.navbar-item:hover { background-color: whitesmoke; color: #0a0a0a; } .navbar.is-transparent .navbar-dropdown a.navbar-item.is-active { background-color: whitesmoke; color: #ff0d68; } .navbar-burger { display: none; } .navbar-item, .navbar-link { align-items: center; display: flex; } .navbar-item.has-dropdown { align-items: stretch; } .navbar-item.has-dropdown-up .navbar-link::after { transform: rotate(135deg) translate(0.25em, -0.25em); } .navbar-item.has-dropdown-up .navbar-dropdown { border-bottom: 2px solid #dbdbdb; border-radius: 6px 6px 0 0; border-top: none; bottom: 100%; box-shadow: 0 -8px 8px rgba(10, 10, 10, 0.1); top: auto; } .navbar-item.is-active .navbar-dropdown, .navbar-item.is-hoverable:focus .navbar-dropdown, .navbar-item.is-hoverable:focus-within .navbar-dropdown, .navbar-item.is-hoverable:hover .navbar-dropdown { display: block; } .navbar.is-spaced .navbar-item.is-active .navbar-dropdown, .navbar-item.is-active .navbar-dropdown.is-boxed, .navbar.is-spaced .navbar-item.is-hoverable:focus .navbar-dropdown, .navbar-item.is-hoverable:focus .navbar-dropdown.is-boxed, .navbar.is-spaced .navbar-item.is-hoverable:focus-within .navbar-dropdown, .navbar-item.is-hoverable:focus-within .navbar-dropdown.is-boxed, .navbar.is-spaced .navbar-item.is-hoverable:hover .navbar-dropdown, .navbar-item.is-hoverable:hover .navbar-dropdown.is-boxed { opacity: 1; pointer-events: auto; transform: translateY(0); } .navbar-menu { flex-grow: 1; flex-shrink: 0; } .navbar-start { justify-content: flex-start; margin-right: auto; } .navbar-end { justify-content: flex-end; margin-left: auto; } .navbar-dropdown { background-color: white; border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; border-top: 2px solid #dbdbdb; box-shadow: 0 8px 8px rgba(10, 10, 10, 0.1); display: none; font-size: 0.875rem; left: 0; min-width: 100%; position: absolute; top: 100%; z-index: 20; } .navbar-dropdown .navbar-item { padding: 0.375rem 1rem; white-space: nowrap; } .navbar-dropdown a.navbar-item { padding-right: 3rem; } .navbar-dropdown a.navbar-item:focus, .navbar-dropdown a.navbar-item:hover { background-color: whitesmoke; color: #0a0a0a; } .navbar-dropdown a.navbar-item.is-active { background-color: whitesmoke; color: #ff0d68; } .navbar.is-spaced .navbar-dropdown, .navbar-dropdown.is-boxed { border-radius: 6px; border-top: none; box-shadow: 0 8px 8px rgba(10, 10, 10, 0.1), 0 0 0 1px rgba(10, 10, 10, 0.1); display: block; opacity: 0; pointer-events: none; top: calc(100% + (-4px)); transform: translateY(-5px); transition-duration: 86ms; transition-property: opacity, transform; } .navbar-dropdown.is-right { left: auto; right: 0; } .navbar-divider { display: block; } .navbar > .container .navbar-brand, .container > .navbar .navbar-brand { margin-left: -0.75rem; } .navbar > .container .navbar-menu, .container > .navbar .navbar-menu { margin-right: -0.75rem; } .navbar.is-fixed-bottom-desktop, .navbar.is-fixed-top-desktop { left: 0; position: fixed; right: 0; z-index: 30; } .navbar.is-fixed-bottom-desktop { bottom: 0; } .navbar.is-fixed-bottom-desktop.has-shadow { box-shadow: 0 -2px 3px rgba(10, 10, 10, 0.1); } .navbar.is-fixed-top-desktop { top: 0; } html.has-navbar-fixed-top-desktop, body.has-navbar-fixed-top-desktop { padding-top: 3.25rem; } html.has-navbar-fixed-bottom-desktop, body.has-navbar-fixed-bottom-desktop { padding-bottom: 3.25rem; } html.has-spaced-navbar-fixed-top, body.has-spaced-navbar-fixed-top { padding-top: 5.25rem; } html.has-spaced-navbar-fixed-bottom, body.has-spaced-navbar-fixed-bottom { padding-bottom: 5.25rem; } a.navbar-item.is-active, .navbar-link.is-active { color: #0a0a0a; } a.navbar-item.is-active:not(:focus):not(:hover), .navbar-link.is-active:not(:focus):not(:hover) { background-color: transparent; } .navbar-item.has-dropdown:focus .navbar-link, .navbar-item.has-dropdown:hover .navbar-link, .navbar-item.has-dropdown.is-active .navbar-link { background-color: #fafafa; } } .hero.is-fullheight-with-navbar { min-height: calc(100vh - 3.25rem); } .pagination { font-size: 1rem; margin: -0.25rem; } .pagination.is-small { font-size: 0.75rem; } .pagination.is-medium { font-size: 1.25rem; } .pagination.is-large { font-size: 1.5rem; } .pagination.is-rounded .pagination-previous, .pagination.is-rounded .pagination-next { padding-left: 1em; padding-right: 1em; border-radius: 9999px; } .pagination.is-rounded .pagination-link { border-radius: 9999px; } .pagination, .pagination-list { align-items: center; display: flex; justify-content: center; text-align: center; } .pagination-previous, .pagination-next, .pagination-link, .pagination-ellipsis { font-size: 1em; justify-content: center; margin: 0.25rem; padding-left: 0.5em; padding-right: 0.5em; text-align: center; } .pagination-previous, .pagination-next, .pagination-link { border-color: #dbdbdb; color: #363636; min-width: 2.5em; } .pagination-previous:hover, .pagination-next:hover, .pagination-link:hover { border-color: #b5b5b5; color: #363636; } .pagination-previous:focus, .pagination-next:focus, .pagination-link:focus { border-color: #0092FF; } .pagination-previous:active, .pagination-next:active, .pagination-link:active { box-shadow: inset 0 1px 2px rgba(10, 10, 10, 0.2); } .pagination-previous[disabled], .pagination-previous.is-disabled, .pagination-next[disabled], .pagination-next.is-disabled, .pagination-link[disabled], .pagination-link.is-disabled { background-color: #dbdbdb; border-color: #dbdbdb; box-shadow: none; color: #7a7a7a; opacity: 0.5; } .pagination-previous, .pagination-next { padding-left: 0.75em; padding-right: 0.75em; white-space: nowrap; } .pagination-link.is-current { background-color: #ff0d68; border-color: #ff0d68; color: #fff; } .pagination-ellipsis { color: #b5b5b5; pointer-events: none; } .pagination-list { flex-wrap: wrap; } .pagination-list li { list-style: none; } @media screen and (max-width: 768px) { .pagination { flex-wrap: wrap; } .pagination-previous, .pagination-next { flex-grow: 1; flex-shrink: 1; } .pagination-list li { flex-grow: 1; flex-shrink: 1; } } @media screen and (min-width: 769px), print { .pagination-list { flex-grow: 1; flex-shrink: 1; justify-content: flex-start; order: 1; } .pagination-previous, .pagination-next, .pagination-link, .pagination-ellipsis { margin-bottom: 0; margin-top: 0; } .pagination-previous { order: 2; } .pagination-next { order: 3; } .pagination { justify-content: space-between; margin-bottom: 0; margin-top: 0; } .pagination.is-centered .pagination-previous { order: 1; } .pagination.is-centered .pagination-list { justify-content: center; order: 2; } .pagination.is-centered .pagination-next { order: 3; } .pagination.is-right .pagination-previous { order: 1; } .pagination.is-right .pagination-next { order: 2; } .pagination.is-right .pagination-list { justify-content: flex-end; order: 3; } } .panel { border-radius: 6px; box-shadow: 0 0.5em 1em -0.125em rgba(10, 10, 10, 0.1), 0 0px 0 1px rgba(10, 10, 10, 0.02); font-size: 1rem; } .panel:not(:last-child) { margin-bottom: 1.5rem; } .panel.is-white .panel-heading { background-color: white; color: #0a0a0a; } .panel.is-white .panel-tabs a.is-active { border-bottom-color: white; } .panel.is-white .panel-block.is-active .panel-icon { color: white; } .panel.is-black .panel-heading { background-color: #0a0a0a; color: white; } .panel.is-black .panel-tabs a.is-active { border-bottom-color: #0a0a0a; } .panel.is-black .panel-block.is-active .panel-icon { color: #0a0a0a; } .panel.is-light .panel-heading { background-color: whitesmoke; color: rgba(0, 0, 0, 0.7); } .panel.is-light .panel-tabs a.is-active { border-bottom-color: whitesmoke; } .panel.is-light .panel-block.is-active .panel-icon { color: whitesmoke; } .panel.is-dark .panel-heading { background-color: #363636; color: #fff; } .panel.is-dark .panel-tabs a.is-active { border-bottom-color: #363636; } .panel.is-dark .panel-block.is-active .panel-icon { color: #363636; } .panel.is-primary .panel-heading { background-color: #ff0d68; color: #fff; } .panel.is-primary .panel-tabs a.is-active { border-bottom-color: #ff0d68; } .panel.is-primary .panel-block.is-active .panel-icon { color: #ff0d68; } .panel.is-link .panel-heading { background-color: #ff0d68; color: #fff; } .panel.is-link .panel-tabs a.is-active { border-bottom-color: #ff0d68; } .panel.is-link .panel-block.is-active .panel-icon { color: #ff0d68; } .panel.is-info .panel-heading { background-color: #0092FF; color: #fff; } .panel.is-info .panel-tabs a.is-active { border-bottom-color: #0092FF; } .panel.is-info .panel-block.is-active .panel-icon { color: #0092FF; } .panel.is-success .panel-heading { background-color: #16DB93; color: rgba(0, 0, 0, 0.7); } .panel.is-success .panel-tabs a.is-active { border-bottom-color: #16DB93; } .panel.is-success .panel-block.is-active .panel-icon { color: #16DB93; } .panel.is-warning .panel-heading { background-color: #FFE900; color: rgba(0, 0, 0, 0.7); } .panel.is-warning .panel-tabs a.is-active { border-bottom-color: #FFE900; } .panel.is-warning .panel-block.is-active .panel-icon { color: #FFE900; } .panel.is-danger .panel-heading { background-color: #f14668; color: #fff; } .panel.is-danger .panel-tabs a.is-active { border-bottom-color: #f14668; } .panel.is-danger .panel-block.is-active .panel-icon { color: #f14668; } .panel-tabs:not(:last-child), .panel-block:not(:last-child) { border-bottom: 1px solid #ededed; } .panel-heading { background-color: #ededed; border-radius: 6px 6px 0 0; color: #363636; font-size: 1.25em; font-weight: 700; line-height: 1.25; padding: 0.75em 1em; } .panel-tabs { align-items: flex-end; display: flex; font-size: 0.875em; justify-content: center; } .panel-tabs a { border-bottom: 1px solid #dbdbdb; margin-bottom: -1px; padding: 0.5em; } .panel-tabs a.is-active { border-bottom-color: #4a4a4a; color: #363636; } .panel-list a { color: #4a4a4a; } .panel-list a:hover { color: #ff0d68; } .panel-block { align-items: center; color: #363636; display: flex; justify-content: flex-start; padding: 0.5em 0.75em; } .panel-block input[type="checkbox"] { margin-right: 0.75em; } .panel-block > .control { flex-grow: 1; flex-shrink: 1; width: 100%; } .panel-block.is-wrapped { flex-wrap: wrap; } .panel-block.is-active { border-left-color: #ff0d68; color: #363636; } .panel-block.is-active .panel-icon { color: #ff0d68; } .panel-block:last-child { border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; } a.panel-block, label.panel-block { cursor: pointer; } a.panel-block:hover, label.panel-block:hover { background-color: whitesmoke; } .panel-icon { display: inline-block; font-size: 14px; height: 1em; line-height: 1em; text-align: center; vertical-align: top; width: 1em; color: #7a7a7a; margin-right: 0.75em; } .panel-icon .fa { font-size: inherit; line-height: inherit; } .tabs { -webkit-overflow-scrolling: touch; align-items: stretch; display: flex; font-size: 1rem; justify-content: space-between; overflow: hidden; overflow-x: auto; white-space: nowrap; } .tabs a { align-items: center; border-bottom-color: #dbdbdb; border-bottom-style: solid; border-bottom-width: 1px; color: #4a4a4a; display: flex; justify-content: center; margin-bottom: -1px; padding: 0.5em 1em; vertical-align: top; } .tabs a:hover { border-bottom-color: #363636; color: #363636; } .tabs li { display: block; } .tabs li.is-active a { border-bottom-color: #ff0d68; color: #ff0d68; } .tabs ul { align-items: center; border-bottom-color: #dbdbdb; border-bottom-style: solid; border-bottom-width: 1px; display: flex; flex-grow: 1; flex-shrink: 0; justify-content: flex-start; } .tabs ul.is-left { padding-right: 0.75em; } .tabs ul.is-center { flex: none; justify-content: center; padding-left: 0.75em; padding-right: 0.75em; } .tabs ul.is-right { justify-content: flex-end; padding-left: 0.75em; } .tabs .icon:first-child { margin-right: 0.5em; } .tabs .icon:last-child { margin-left: 0.5em; } .tabs.is-centered ul { justify-content: center; } .tabs.is-right ul { justify-content: flex-end; } .tabs.is-boxed a { border: 1px solid transparent; border-radius: 4px 4px 0 0; } .tabs.is-boxed a:hover { background-color: whitesmoke; border-bottom-color: #dbdbdb; } .tabs.is-boxed li.is-active a { background-color: white; border-color: #dbdbdb; border-bottom-color: transparent !important; } .tabs.is-fullwidth li { flex-grow: 1; flex-shrink: 0; } .tabs.is-toggle a { border-color: #dbdbdb; border-style: solid; border-width: 1px; margin-bottom: 0; position: relative; } .tabs.is-toggle a:hover { background-color: whitesmoke; border-color: #b5b5b5; z-index: 2; } .tabs.is-toggle li + li { margin-left: -1px; } .tabs.is-toggle li:first-child a { border-top-left-radius: 4px; border-bottom-left-radius: 4px; } .tabs.is-toggle li:last-child a { border-top-right-radius: 4px; border-bottom-right-radius: 4px; } .tabs.is-toggle li.is-active a { background-color: #ff0d68; border-color: #ff0d68; color: #fff; z-index: 1; } .tabs.is-toggle ul { border-bottom: none; } .tabs.is-toggle.is-toggle-rounded li:first-child a { border-bottom-left-radius: 9999px; border-top-left-radius: 9999px; padding-left: 1.25em; } .tabs.is-toggle.is-toggle-rounded li:last-child a { border-bottom-right-radius: 9999px; border-top-right-radius: 9999px; padding-right: 1.25em; } .tabs.is-small { font-size: 0.75rem; } .tabs.is-medium { font-size: 1.25rem; } .tabs.is-large { font-size: 1.5rem; } /* Bulma Grid */ .column { display: block; flex-basis: 0; flex-grow: 1; flex-shrink: 1; padding: 0.75rem; } .columns.is-mobile > .column.is-narrow { flex: none; width: unset; } .columns.is-mobile > .column.is-full { flex: none; width: 100%; } .columns.is-mobile > .column.is-three-quarters { flex: none; width: 75%; } .columns.is-mobile > .column.is-two-thirds { flex: none; width: 66.6666%; } .columns.is-mobile > .column.is-half { flex: none; width: 50%; } .columns.is-mobile > .column.is-one-third { flex: none; width: 33.3333%; } .columns.is-mobile > .column.is-one-quarter { flex: none; width: 25%; } .columns.is-mobile > .column.is-one-fifth { flex: none; width: 20%; } .columns.is-mobile > .column.is-two-fifths { flex: none; width: 40%; } .columns.is-mobile > .column.is-three-fifths { flex: none; width: 60%; } .columns.is-mobile > .column.is-four-fifths { flex: none; width: 80%; } .columns.is-mobile > .column.is-offset-three-quarters { margin-left: 75%; } .columns.is-mobile > .column.is-offset-two-thirds { margin-left: 66.6666%; } .columns.is-mobile > .column.is-offset-half { margin-left: 50%; } .columns.is-mobile > .column.is-offset-one-third { margin-left: 33.3333%; } .columns.is-mobile > .column.is-offset-one-quarter { margin-left: 25%; } .columns.is-mobile > .column.is-offset-one-fifth { margin-left: 20%; } .columns.is-mobile > .column.is-offset-two-fifths { margin-left: 40%; } .columns.is-mobile > .column.is-offset-three-fifths { margin-left: 60%; } .columns.is-mobile > .column.is-offset-four-fifths { margin-left: 80%; } .columns.is-mobile > .column.is-0 { flex: none; width: 0%; } .columns.is-mobile > .column.is-offset-0 { margin-left: 0%; } .columns.is-mobile > .column.is-1 { flex: none; width: 8.33333%; } .columns.is-mobile > .column.is-offset-1 { margin-left: 8.33333%; } .columns.is-mobile > .column.is-2 { flex: none; width: 16.66667%; } .columns.is-mobile > .column.is-offset-2 { margin-left: 16.66667%; } .columns.is-mobile > .column.is-3 { flex: none; width: 25%; } .columns.is-mobile > .column.is-offset-3 { margin-left: 25%; } .columns.is-mobile > .column.is-4 { flex: none; width: 33.33333%; } .columns.is-mobile > .column.is-offset-4 { margin-left: 33.33333%; } .columns.is-mobile > .column.is-5 { flex: none; width: 41.66667%; } .columns.is-mobile > .column.is-offset-5 { margin-left: 41.66667%; } .columns.is-mobile > .column.is-6 { flex: none; width: 50%; } .columns.is-mobile > .column.is-offset-6 { margin-left: 50%; } .columns.is-mobile > .column.is-7 { flex: none; width: 58.33333%; } .columns.is-mobile > .column.is-offset-7 { margin-left: 58.33333%; } .columns.is-mobile > .column.is-8 { flex: none; width: 66.66667%; } .columns.is-mobile > .column.is-offset-8 { margin-left: 66.66667%; } .columns.is-mobile > .column.is-9 { flex: none; width: 75%; } .columns.is-mobile > .column.is-offset-9 { margin-left: 75%; } .columns.is-mobile > .column.is-10 { flex: none; width: 83.33333%; } .columns.is-mobile > .column.is-offset-10 { margin-left: 83.33333%; } .columns.is-mobile > .column.is-11 { flex: none; width: 91.66667%; } .columns.is-mobile > .column.is-offset-11 { margin-left: 91.66667%; } .columns.is-mobile > .column.is-12 { flex: none; width: 100%; } .columns.is-mobile > .column.is-offset-12 { margin-left: 100%; } @media screen and (max-width: 768px) { .column.is-narrow-mobile { flex: none; width: unset; } .column.is-full-mobile { flex: none; width: 100%; } .column.is-three-quarters-mobile { flex: none; width: 75%; } .column.is-two-thirds-mobile { flex: none; width: 66.6666%; } .column.is-half-mobile { flex: none; width: 50%; } .column.is-one-third-mobile { flex: none; width: 33.3333%; } .column.is-one-quarter-mobile { flex: none; width: 25%; } .column.is-one-fifth-mobile { flex: none; width: 20%; } .column.is-two-fifths-mobile { flex: none; width: 40%; } .column.is-three-fifths-mobile { flex: none; width: 60%; } .column.is-four-fifths-mobile { flex: none; width: 80%; } .column.is-offset-three-quarters-mobile { margin-left: 75%; } .column.is-offset-two-thirds-mobile { margin-left: 66.6666%; } .column.is-offset-half-mobile { margin-left: 50%; } .column.is-offset-one-third-mobile { margin-left: 33.3333%; } .column.is-offset-one-quarter-mobile { margin-left: 25%; } .column.is-offset-one-fifth-mobile { margin-left: 20%; } .column.is-offset-two-fifths-mobile { margin-left: 40%; } .column.is-offset-three-fifths-mobile { margin-left: 60%; } .column.is-offset-four-fifths-mobile { margin-left: 80%; } .column.is-0-mobile { flex: none; width: 0%; } .column.is-offset-0-mobile { margin-left: 0%; } .column.is-1-mobile { flex: none; width: 8.33333%; } .column.is-offset-1-mobile { margin-left: 8.33333%; } .column.is-2-mobile { flex: none; width: 16.66667%; } .column.is-offset-2-mobile { margin-left: 16.66667%; } .column.is-3-mobile { flex: none; width: 25%; } .column.is-offset-3-mobile { margin-left: 25%; } .column.is-4-mobile { flex: none; width: 33.33333%; } .column.is-offset-4-mobile { margin-left: 33.33333%; } .column.is-5-mobile { flex: none; width: 41.66667%; } .column.is-offset-5-mobile { margin-left: 41.66667%; } .column.is-6-mobile { flex: none; width: 50%; } .column.is-offset-6-mobile { margin-left: 50%; } .column.is-7-mobile { flex: none; width: 58.33333%; } .column.is-offset-7-mobile { margin-left: 58.33333%; } .column.is-8-mobile { flex: none; width: 66.66667%; } .column.is-offset-8-mobile { margin-left: 66.66667%; } .column.is-9-mobile { flex: none; width: 75%; } .column.is-offset-9-mobile { margin-left: 75%; } .column.is-10-mobile { flex: none; width: 83.33333%; } .column.is-offset-10-mobile { margin-left: 83.33333%; } .column.is-11-mobile { flex: none; width: 91.66667%; } .column.is-offset-11-mobile { margin-left: 91.66667%; } .column.is-12-mobile { flex: none; width: 100%; } .column.is-offset-12-mobile { margin-left: 100%; } } @media screen and (min-width: 769px), print { .column.is-narrow, .column.is-narrow-tablet { flex: none; width: unset; } .column.is-full, .column.is-full-tablet { flex: none; width: 100%; } .column.is-three-quarters, .column.is-three-quarters-tablet { flex: none; width: 75%; } .column.is-two-thirds, .column.is-two-thirds-tablet { flex: none; width: 66.6666%; } .column.is-half, .column.is-half-tablet { flex: none; width: 50%; } .column.is-one-third, .column.is-one-third-tablet { flex: none; width: 33.3333%; } .column.is-one-quarter, .column.is-one-quarter-tablet { flex: none; width: 25%; } .column.is-one-fifth, .column.is-one-fifth-tablet { flex: none; width: 20%; } .column.is-two-fifths, .column.is-two-fifths-tablet { flex: none; width: 40%; } .column.is-three-fifths, .column.is-three-fifths-tablet { flex: none; width: 60%; } .column.is-four-fifths, .column.is-four-fifths-tablet { flex: none; width: 80%; } .column.is-offset-three-quarters, .column.is-offset-three-quarters-tablet { margin-left: 75%; } .column.is-offset-two-thirds, .column.is-offset-two-thirds-tablet { margin-left: 66.6666%; } .column.is-offset-half, .column.is-offset-half-tablet { margin-left: 50%; } .column.is-offset-one-third, .column.is-offset-one-third-tablet { margin-left: 33.3333%; } .column.is-offset-one-quarter, .column.is-offset-one-quarter-tablet { margin-left: 25%; } .column.is-offset-one-fifth, .column.is-offset-one-fifth-tablet { margin-left: 20%; } .column.is-offset-two-fifths, .column.is-offset-two-fifths-tablet { margin-left: 40%; } .column.is-offset-three-fifths, .column.is-offset-three-fifths-tablet { margin-left: 60%; } .column.is-offset-four-fifths, .column.is-offset-four-fifths-tablet { margin-left: 80%; } .column.is-0, .column.is-0-tablet { flex: none; width: 0%; } .column.is-offset-0, .column.is-offset-0-tablet { margin-left: 0%; } .column.is-1, .column.is-1-tablet { flex: none; width: 8.33333%; } .column.is-offset-1, .column.is-offset-1-tablet { margin-left: 8.33333%; } .column.is-2, .column.is-2-tablet { flex: none; width: 16.66667%; } .column.is-offset-2, .column.is-offset-2-tablet { margin-left: 16.66667%; } .column.is-3, .column.is-3-tablet { flex: none; width: 25%; } .column.is-offset-3, .column.is-offset-3-tablet { margin-left: 25%; } .column.is-4, .column.is-4-tablet { flex: none; width: 33.33333%; } .column.is-offset-4, .column.is-offset-4-tablet { margin-left: 33.33333%; } .column.is-5, .column.is-5-tablet { flex: none; width: 41.66667%; } .column.is-offset-5, .column.is-offset-5-tablet { margin-left: 41.66667%; } .column.is-6, .column.is-6-tablet { flex: none; width: 50%; } .column.is-offset-6, .column.is-offset-6-tablet { margin-left: 50%; } .column.is-7, .column.is-7-tablet { flex: none; width: 58.33333%; } .column.is-offset-7, .column.is-offset-7-tablet { margin-left: 58.33333%; } .column.is-8, .column.is-8-tablet { flex: none; width: 66.66667%; } .column.is-offset-8, .column.is-offset-8-tablet { margin-left: 66.66667%; } .column.is-9, .column.is-9-tablet { flex: none; width: 75%; } .column.is-offset-9, .column.is-offset-9-tablet { margin-left: 75%; } .column.is-10, .column.is-10-tablet { flex: none; width: 83.33333%; } .column.is-offset-10, .column.is-offset-10-tablet { margin-left: 83.33333%; } .column.is-11, .column.is-11-tablet { flex: none; width: 91.66667%; } .column.is-offset-11, .column.is-offset-11-tablet { margin-left: 91.66667%; } .column.is-12, .column.is-12-tablet { flex: none; width: 100%; } .column.is-offset-12, .column.is-offset-12-tablet { margin-left: 100%; } } @media screen and (max-width: 1023px) { .column.is-narrow-touch { flex: none; width: unset; } .column.is-full-touch { flex: none; width: 100%; } .column.is-three-quarters-touch { flex: none; width: 75%; } .column.is-two-thirds-touch { flex: none; width: 66.6666%; } .column.is-half-touch { flex: none; width: 50%; } .column.is-one-third-touch { flex: none; width: 33.3333%; } .column.is-one-quarter-touch { flex: none; width: 25%; } .column.is-one-fifth-touch { flex: none; width: 20%; } .column.is-two-fifths-touch { flex: none; width: 40%; } .column.is-three-fifths-touch { flex: none; width: 60%; } .column.is-four-fifths-touch { flex: none; width: 80%; } .column.is-offset-three-quarters-touch { margin-left: 75%; } .column.is-offset-two-thirds-touch { margin-left: 66.6666%; } .column.is-offset-half-touch { margin-left: 50%; } .column.is-offset-one-third-touch { margin-left: 33.3333%; } .column.is-offset-one-quarter-touch { margin-left: 25%; } .column.is-offset-one-fifth-touch { margin-left: 20%; } .column.is-offset-two-fifths-touch { margin-left: 40%; } .column.is-offset-three-fifths-touch { margin-left: 60%; } .column.is-offset-four-fifths-touch { margin-left: 80%; } .column.is-0-touch { flex: none; width: 0%; } .column.is-offset-0-touch { margin-left: 0%; } .column.is-1-touch { flex: none; width: 8.33333%; } .column.is-offset-1-touch { margin-left: 8.33333%; } .column.is-2-touch { flex: none; width: 16.66667%; } .column.is-offset-2-touch { margin-left: 16.66667%; } .column.is-3-touch { flex: none; width: 25%; } .column.is-offset-3-touch { margin-left: 25%; } .column.is-4-touch { flex: none; width: 33.33333%; } .column.is-offset-4-touch { margin-left: 33.33333%; } .column.is-5-touch { flex: none; width: 41.66667%; } .column.is-offset-5-touch { margin-left: 41.66667%; } .column.is-6-touch { flex: none; width: 50%; } .column.is-offset-6-touch { margin-left: 50%; } .column.is-7-touch { flex: none; width: 58.33333%; } .column.is-offset-7-touch { margin-left: 58.33333%; } .column.is-8-touch { flex: none; width: 66.66667%; } .column.is-offset-8-touch { margin-left: 66.66667%; } .column.is-9-touch { flex: none; width: 75%; } .column.is-offset-9-touch { margin-left: 75%; } .column.is-10-touch { flex: none; width: 83.33333%; } .column.is-offset-10-touch { margin-left: 83.33333%; } .column.is-11-touch { flex: none; width: 91.66667%; } .column.is-offset-11-touch { margin-left: 91.66667%; } .column.is-12-touch { flex: none; width: 100%; } .column.is-offset-12-touch { margin-left: 100%; } } @media screen and (min-width: 1024px) { .column.is-narrow-desktop { flex: none; width: unset; } .column.is-full-desktop { flex: none; width: 100%; } .column.is-three-quarters-desktop { flex: none; width: 75%; } .column.is-two-thirds-desktop { flex: none; width: 66.6666%; } .column.is-half-desktop { flex: none; width: 50%; } .column.is-one-third-desktop { flex: none; width: 33.3333%; } .column.is-one-quarter-desktop { flex: none; width: 25%; } .column.is-one-fifth-desktop { flex: none; width: 20%; } .column.is-two-fifths-desktop { flex: none; width: 40%; } .column.is-three-fifths-desktop { flex: none; width: 60%; } .column.is-four-fifths-desktop { flex: none; width: 80%; } .column.is-offset-three-quarters-desktop { margin-left: 75%; } .column.is-offset-two-thirds-desktop { margin-left: 66.6666%; } .column.is-offset-half-desktop { margin-left: 50%; } .column.is-offset-one-third-desktop { margin-left: 33.3333%; } .column.is-offset-one-quarter-desktop { margin-left: 25%; } .column.is-offset-one-fifth-desktop { margin-left: 20%; } .column.is-offset-two-fifths-desktop { margin-left: 40%; } .column.is-offset-three-fifths-desktop { margin-left: 60%; } .column.is-offset-four-fifths-desktop { margin-left: 80%; } .column.is-0-desktop { flex: none; width: 0%; } .column.is-offset-0-desktop { margin-left: 0%; } .column.is-1-desktop { flex: none; width: 8.33333%; } .column.is-offset-1-desktop { margin-left: 8.33333%; } .column.is-2-desktop { flex: none; width: 16.66667%; } .column.is-offset-2-desktop { margin-left: 16.66667%; } .column.is-3-desktop { flex: none; width: 25%; } .column.is-offset-3-desktop { margin-left: 25%; } .column.is-4-desktop { flex: none; width: 33.33333%; } .column.is-offset-4-desktop { margin-left: 33.33333%; } .column.is-5-desktop { flex: none; width: 41.66667%; } .column.is-offset-5-desktop { margin-left: 41.66667%; } .column.is-6-desktop { flex: none; width: 50%; } .column.is-offset-6-desktop { margin-left: 50%; } .column.is-7-desktop { flex: none; width: 58.33333%; } .column.is-offset-7-desktop { margin-left: 58.33333%; } .column.is-8-desktop { flex: none; width: 66.66667%; } .column.is-offset-8-desktop { margin-left: 66.66667%; } .column.is-9-desktop { flex: none; width: 75%; } .column.is-offset-9-desktop { margin-left: 75%; } .column.is-10-desktop { flex: none; width: 83.33333%; } .column.is-offset-10-desktop { margin-left: 83.33333%; } .column.is-11-desktop { flex: none; width: 91.66667%; } .column.is-offset-11-desktop { margin-left: 91.66667%; } .column.is-12-desktop { flex: none; width: 100%; } .column.is-offset-12-desktop { margin-left: 100%; } } @media screen and (min-width: 1216px) { .column.is-narrow-widescreen { flex: none; width: unset; } .column.is-full-widescreen { flex: none; width: 100%; } .column.is-three-quarters-widescreen { flex: none; width: 75%; } .column.is-two-thirds-widescreen { flex: none; width: 66.6666%; } .column.is-half-widescreen { flex: none; width: 50%; } .column.is-one-third-widescreen { flex: none; width: 33.3333%; } .column.is-one-quarter-widescreen { flex: none; width: 25%; } .column.is-one-fifth-widescreen { flex: none; width: 20%; } .column.is-two-fifths-widescreen { flex: none; width: 40%; } .column.is-three-fifths-widescreen { flex: none; width: 60%; } .column.is-four-fifths-widescreen { flex: none; width: 80%; } .column.is-offset-three-quarters-widescreen { margin-left: 75%; } .column.is-offset-two-thirds-widescreen { margin-left: 66.6666%; } .column.is-offset-half-widescreen { margin-left: 50%; } .column.is-offset-one-third-widescreen { margin-left: 33.3333%; } .column.is-offset-one-quarter-widescreen { margin-left: 25%; } .column.is-offset-one-fifth-widescreen { margin-left: 20%; } .column.is-offset-two-fifths-widescreen { margin-left: 40%; } .column.is-offset-three-fifths-widescreen { margin-left: 60%; } .column.is-offset-four-fifths-widescreen { margin-left: 80%; } .column.is-0-widescreen { flex: none; width: 0%; } .column.is-offset-0-widescreen { margin-left: 0%; } .column.is-1-widescreen { flex: none; width: 8.33333%; } .column.is-offset-1-widescreen { margin-left: 8.33333%; } .column.is-2-widescreen { flex: none; width: 16.66667%; } .column.is-offset-2-widescreen { margin-left: 16.66667%; } .column.is-3-widescreen { flex: none; width: 25%; } .column.is-offset-3-widescreen { margin-left: 25%; } .column.is-4-widescreen { flex: none; width: 33.33333%; } .column.is-offset-4-widescreen { margin-left: 33.33333%; } .column.is-5-widescreen { flex: none; width: 41.66667%; } .column.is-offset-5-widescreen { margin-left: 41.66667%; } .column.is-6-widescreen { flex: none; width: 50%; } .column.is-offset-6-widescreen { margin-left: 50%; } .column.is-7-widescreen { flex: none; width: 58.33333%; } .column.is-offset-7-widescreen { margin-left: 58.33333%; } .column.is-8-widescreen { flex: none; width: 66.66667%; } .column.is-offset-8-widescreen { margin-left: 66.66667%; } .column.is-9-widescreen { flex: none; width: 75%; } .column.is-offset-9-widescreen { margin-left: 75%; } .column.is-10-widescreen { flex: none; width: 83.33333%; } .column.is-offset-10-widescreen { margin-left: 83.33333%; } .column.is-11-widescreen { flex: none; width: 91.66667%; } .column.is-offset-11-widescreen { margin-left: 91.66667%; } .column.is-12-widescreen { flex: none; width: 100%; } .column.is-offset-12-widescreen { margin-left: 100%; } } @media screen and (min-width: 1408px) { .column.is-narrow-fullhd { flex: none; width: unset; } .column.is-full-fullhd { flex: none; width: 100%; } .column.is-three-quarters-fullhd { flex: none; width: 75%; } .column.is-two-thirds-fullhd { flex: none; width: 66.6666%; } .column.is-half-fullhd { flex: none; width: 50%; } .column.is-one-third-fullhd { flex: none; width: 33.3333%; } .column.is-one-quarter-fullhd { flex: none; width: 25%; } .column.is-one-fifth-fullhd { flex: none; width: 20%; } .column.is-two-fifths-fullhd { flex: none; width: 40%; } .column.is-three-fifths-fullhd { flex: none; width: 60%; } .column.is-four-fifths-fullhd { flex: none; width: 80%; } .column.is-offset-three-quarters-fullhd { margin-left: 75%; } .column.is-offset-two-thirds-fullhd { margin-left: 66.6666%; } .column.is-offset-half-fullhd { margin-left: 50%; } .column.is-offset-one-third-fullhd { margin-left: 33.3333%; } .column.is-offset-one-quarter-fullhd { margin-left: 25%; } .column.is-offset-one-fifth-fullhd { margin-left: 20%; } .column.is-offset-two-fifths-fullhd { margin-left: 40%; } .column.is-offset-three-fifths-fullhd { margin-left: 60%; } .column.is-offset-four-fifths-fullhd { margin-left: 80%; } .column.is-0-fullhd { flex: none; width: 0%; } .column.is-offset-0-fullhd { margin-left: 0%; } .column.is-1-fullhd { flex: none; width: 8.33333%; } .column.is-offset-1-fullhd { margin-left: 8.33333%; } .column.is-2-fullhd { flex: none; width: 16.66667%; } .column.is-offset-2-fullhd { margin-left: 16.66667%; } .column.is-3-fullhd { flex: none; width: 25%; } .column.is-offset-3-fullhd { margin-left: 25%; } .column.is-4-fullhd { flex: none; width: 33.33333%; } .column.is-offset-4-fullhd { margin-left: 33.33333%; } .column.is-5-fullhd { flex: none; width: 41.66667%; } .column.is-offset-5-fullhd { margin-left: 41.66667%; } .column.is-6-fullhd { flex: none; width: 50%; } .column.is-offset-6-fullhd { margin-left: 50%; } .column.is-7-fullhd { flex: none; width: 58.33333%; } .column.is-offset-7-fullhd { margin-left: 58.33333%; } .column.is-8-fullhd { flex: none; width: 66.66667%; } .column.is-offset-8-fullhd { margin-left: 66.66667%; } .column.is-9-fullhd { flex: none; width: 75%; } .column.is-offset-9-fullhd { margin-left: 75%; } .column.is-10-fullhd { flex: none; width: 83.33333%; } .column.is-offset-10-fullhd { margin-left: 83.33333%; } .column.is-11-fullhd { flex: none; width: 91.66667%; } .column.is-offset-11-fullhd { margin-left: 91.66667%; } .column.is-12-fullhd { flex: none; width: 100%; } .column.is-offset-12-fullhd { margin-left: 100%; } } .columns { margin-left: -0.75rem; margin-right: -0.75rem; margin-top: -0.75rem; } .columns:last-child { margin-bottom: -0.75rem; } .columns:not(:last-child) { margin-bottom: calc(1.5rem - 0.75rem); } .columns.is-centered { justify-content: center; } .columns.is-gapless { margin-left: 0; margin-right: 0; margin-top: 0; } .columns.is-gapless > .column { margin: 0; padding: 0 !important; } .columns.is-gapless:not(:last-child) { margin-bottom: 1.5rem; } .columns.is-gapless:last-child { margin-bottom: 0; } .columns.is-mobile { display: flex; } .columns.is-multiline { flex-wrap: wrap; } .columns.is-vcentered { align-items: center; } @media screen and (min-width: 769px), print { .columns:not(.is-desktop) { display: flex; } } @media screen and (min-width: 1024px) { .columns.is-desktop { display: flex; } } .columns.is-variable { --columnGap: 0.75rem; margin-left: calc(-1 * var(--columnGap)); margin-right: calc(-1 * var(--columnGap)); } .columns.is-variable > .column { padding-left: var(--columnGap); padding-right: var(--columnGap); } .columns.is-variable.is-0 { --columnGap: 0rem; } @media screen and (max-width: 768px) { .columns.is-variable.is-0-mobile { --columnGap: 0rem; } } @media screen and (min-width: 769px), print { .columns.is-variable.is-0-tablet { --columnGap: 0rem; } } @media screen and (min-width: 769px) and (max-width: 1023px) { .columns.is-variable.is-0-tablet-only { --columnGap: 0rem; } } @media screen and (max-width: 1023px) { .columns.is-variable.is-0-touch { --columnGap: 0rem; } } @media screen and (min-width: 1024px) { .columns.is-variable.is-0-desktop { --columnGap: 0rem; } } @media screen and (min-width: 1024px) and (max-width: 1215px) { .columns.is-variable.is-0-desktop-only { --columnGap: 0rem; } } @media screen and (min-width: 1216px) { .columns.is-variable.is-0-widescreen { --columnGap: 0rem; } } @media screen and (min-width: 1216px) and (max-width: 1407px) { .columns.is-variable.is-0-widescreen-only { --columnGap: 0rem; } } @media screen and (min-width: 1408px) { .columns.is-variable.is-0-fullhd { --columnGap: 0rem; } } .columns.is-variable.is-1 { --columnGap: 0.25rem; } @media screen and (max-width: 768px) { .columns.is-variable.is-1-mobile { --columnGap: 0.25rem; } } @media screen and (min-width: 769px), print { .columns.is-variable.is-1-tablet { --columnGap: 0.25rem; } } @media screen and (min-width: 769px) and (max-width: 1023px) { .columns.is-variable.is-1-tablet-only { --columnGap: 0.25rem; } } @media screen and (max-width: 1023px) { .columns.is-variable.is-1-touch { --columnGap: 0.25rem; } } @media screen and (min-width: 1024px) { .columns.is-variable.is-1-desktop { --columnGap: 0.25rem; } } @media screen and (min-width: 1024px) and (max-width: 1215px) { .columns.is-variable.is-1-desktop-only { --columnGap: 0.25rem; } } @media screen and (min-width: 1216px) { .columns.is-variable.is-1-widescreen { --columnGap: 0.25rem; } } @media screen and (min-width: 1216px) and (max-width: 1407px) { .columns.is-variable.is-1-widescreen-only { --columnGap: 0.25rem; } } @media screen and (min-width: 1408px) { .columns.is-variable.is-1-fullhd { --columnGap: 0.25rem; } } .columns.is-variable.is-2 { --columnGap: 0.5rem; } @media screen and (max-width: 768px) { .columns.is-variable.is-2-mobile { --columnGap: 0.5rem; } } @media screen and (min-width: 769px), print { .columns.is-variable.is-2-tablet { --columnGap: 0.5rem; } } @media screen and (min-width: 769px) and (max-width: 1023px) { .columns.is-variable.is-2-tablet-only { --columnGap: 0.5rem; } } @media screen and (max-width: 1023px) { .columns.is-variable.is-2-touch { --columnGap: 0.5rem; } } @media screen and (min-width: 1024px) { .columns.is-variable.is-2-desktop { --columnGap: 0.5rem; } } @media screen and (min-width: 1024px) and (max-width: 1215px) { .columns.is-variable.is-2-desktop-only { --columnGap: 0.5rem; } } @media screen and (min-width: 1216px) { .columns.is-variable.is-2-widescreen { --columnGap: 0.5rem; } } @media screen and (min-width: 1216px) and (max-width: 1407px) { .columns.is-variable.is-2-widescreen-only { --columnGap: 0.5rem; } } @media screen and (min-width: 1408px) { .columns.is-variable.is-2-fullhd { --columnGap: 0.5rem; } } .columns.is-variable.is-3 { --columnGap: 0.75rem; } @media screen and (max-width: 768px) { .columns.is-variable.is-3-mobile { --columnGap: 0.75rem; } } @media screen and (min-width: 769px), print { .columns.is-variable.is-3-tablet { --columnGap: 0.75rem; } } @media screen and (min-width: 769px) and (max-width: 1023px) { .columns.is-variable.is-3-tablet-only { --columnGap: 0.75rem; } } @media screen and (max-width: 1023px) { .columns.is-variable.is-3-touch { --columnGap: 0.75rem; } } @media screen and (min-width: 1024px) { .columns.is-variable.is-3-desktop { --columnGap: 0.75rem; } } @media screen and (min-width: 1024px) and (max-width: 1215px) { .columns.is-variable.is-3-desktop-only { --columnGap: 0.75rem; } } @media screen and (min-width: 1216px) { .columns.is-variable.is-3-widescreen { --columnGap: 0.75rem; } } @media screen and (min-width: 1216px) and (max-width: 1407px) { .columns.is-variable.is-3-widescreen-only { --columnGap: 0.75rem; } } @media screen and (min-width: 1408px) { .columns.is-variable.is-3-fullhd { --columnGap: 0.75rem; } } .columns.is-variable.is-4 { --columnGap: 1rem; } @media screen and (max-width: 768px) { .columns.is-variable.is-4-mobile { --columnGap: 1rem; } } @media screen and (min-width: 769px), print { .columns.is-variable.is-4-tablet { --columnGap: 1rem; } } @media screen and (min-width: 769px) and (max-width: 1023px) { .columns.is-variable.is-4-tablet-only { --columnGap: 1rem; } } @media screen and (max-width: 1023px) { .columns.is-variable.is-4-touch { --columnGap: 1rem; } } @media screen and (min-width: 1024px) { .columns.is-variable.is-4-desktop { --columnGap: 1rem; } } @media screen and (min-width: 1024px) and (max-width: 1215px) { .columns.is-variable.is-4-desktop-only { --columnGap: 1rem; } } @media screen and (min-width: 1216px) { .columns.is-variable.is-4-widescreen { --columnGap: 1rem; } } @media screen and (min-width: 1216px) and (max-width: 1407px) { .columns.is-variable.is-4-widescreen-only { --columnGap: 1rem; } } @media screen and (min-width: 1408px) { .columns.is-variable.is-4-fullhd { --columnGap: 1rem; } } .columns.is-variable.is-5 { --columnGap: 1.25rem; } @media screen and (max-width: 768px) { .columns.is-variable.is-5-mobile { --columnGap: 1.25rem; } } @media screen and (min-width: 769px), print { .columns.is-variable.is-5-tablet { --columnGap: 1.25rem; } } @media screen and (min-width: 769px) and (max-width: 1023px) { .columns.is-variable.is-5-tablet-only { --columnGap: 1.25rem; } } @media screen and (max-width: 1023px) { .columns.is-variable.is-5-touch { --columnGap: 1.25rem; } } @media screen and (min-width: 1024px) { .columns.is-variable.is-5-desktop { --columnGap: 1.25rem; } } @media screen and (min-width: 1024px) and (max-width: 1215px) { .columns.is-variable.is-5-desktop-only { --columnGap: 1.25rem; } } @media screen and (min-width: 1216px) { .columns.is-variable.is-5-widescreen { --columnGap: 1.25rem; } } @media screen and (min-width: 1216px) and (max-width: 1407px) { .columns.is-variable.is-5-widescreen-only { --columnGap: 1.25rem; } } @media screen and (min-width: 1408px) { .columns.is-variable.is-5-fullhd { --columnGap: 1.25rem; } } .columns.is-variable.is-6 { --columnGap: 1.5rem; } @media screen and (max-width: 768px) { .columns.is-variable.is-6-mobile { --columnGap: 1.5rem; } } @media screen and (min-width: 769px), print { .columns.is-variable.is-6-tablet { --columnGap: 1.5rem; } } @media screen and (min-width: 769px) and (max-width: 1023px) { .columns.is-variable.is-6-tablet-only { --columnGap: 1.5rem; } } @media screen and (max-width: 1023px) { .columns.is-variable.is-6-touch { --columnGap: 1.5rem; } } @media screen and (min-width: 1024px) { .columns.is-variable.is-6-desktop { --columnGap: 1.5rem; } } @media screen and (min-width: 1024px) and (max-width: 1215px) { .columns.is-variable.is-6-desktop-only { --columnGap: 1.5rem; } } @media screen and (min-width: 1216px) { .columns.is-variable.is-6-widescreen { --columnGap: 1.5rem; } } @media screen and (min-width: 1216px) and (max-width: 1407px) { .columns.is-variable.is-6-widescreen-only { --columnGap: 1.5rem; } } @media screen and (min-width: 1408px) { .columns.is-variable.is-6-fullhd { --columnGap: 1.5rem; } } .columns.is-variable.is-7 { --columnGap: 1.75rem; } @media screen and (max-width: 768px) { .columns.is-variable.is-7-mobile { --columnGap: 1.75rem; } } @media screen and (min-width: 769px), print { .columns.is-variable.is-7-tablet { --columnGap: 1.75rem; } } @media screen and (min-width: 769px) and (max-width: 1023px) { .columns.is-variable.is-7-tablet-only { --columnGap: 1.75rem; } } @media screen and (max-width: 1023px) { .columns.is-variable.is-7-touch { --columnGap: 1.75rem; } } @media screen and (min-width: 1024px) { .columns.is-variable.is-7-desktop { --columnGap: 1.75rem; } } @media screen and (min-width: 1024px) and (max-width: 1215px) { .columns.is-variable.is-7-desktop-only { --columnGap: 1.75rem; } } @media screen and (min-width: 1216px) { .columns.is-variable.is-7-widescreen { --columnGap: 1.75rem; } } @media screen and (min-width: 1216px) and (max-width: 1407px) { .columns.is-variable.is-7-widescreen-only { --columnGap: 1.75rem; } } @media screen and (min-width: 1408px) { .columns.is-variable.is-7-fullhd { --columnGap: 1.75rem; } } .columns.is-variable.is-8 { --columnGap: 2rem; } @media screen and (max-width: 768px) { .columns.is-variable.is-8-mobile { --columnGap: 2rem; } } @media screen and (min-width: 769px), print { .columns.is-variable.is-8-tablet { --columnGap: 2rem; } } @media screen and (min-width: 769px) and (max-width: 1023px) { .columns.is-variable.is-8-tablet-only { --columnGap: 2rem; } } @media screen and (max-width: 1023px) { .columns.is-variable.is-8-touch { --columnGap: 2rem; } } @media screen and (min-width: 1024px) { .columns.is-variable.is-8-desktop { --columnGap: 2rem; } } @media screen and (min-width: 1024px) and (max-width: 1215px) { .columns.is-variable.is-8-desktop-only { --columnGap: 2rem; } } @media screen and (min-width: 1216px) { .columns.is-variable.is-8-widescreen { --columnGap: 2rem; } } @media screen and (min-width: 1216px) and (max-width: 1407px) { .columns.is-variable.is-8-widescreen-only { --columnGap: 2rem; } } @media screen and (min-width: 1408px) { .columns.is-variable.is-8-fullhd { --columnGap: 2rem; } } .tile { align-items: stretch; display: block; flex-basis: 0; flex-grow: 1; flex-shrink: 1; min-height: min-content; } .tile.is-ancestor { margin-left: -0.75rem; margin-right: -0.75rem; margin-top: -0.75rem; } .tile.is-ancestor:last-child { margin-bottom: -0.75rem; } .tile.is-ancestor:not(:last-child) { margin-bottom: 0.75rem; } .tile.is-child { margin: 0 !important; } .tile.is-parent { padding: 0.75rem; } .tile.is-vertical { flex-direction: column; } .tile.is-vertical > .tile.is-child:not(:last-child) { margin-bottom: 1.5rem !important; } @media screen and (min-width: 769px), print { .tile:not(.is-child) { display: flex; } .tile.is-1 { flex: none; width: 8.33333%; } .tile.is-2 { flex: none; width: 16.66667%; } .tile.is-3 { flex: none; width: 25%; } .tile.is-4 { flex: none; width: 33.33333%; } .tile.is-5 { flex: none; width: 41.66667%; } .tile.is-6 { flex: none; width: 50%; } .tile.is-7 { flex: none; width: 58.33333%; } .tile.is-8 { flex: none; width: 66.66667%; } .tile.is-9 { flex: none; width: 75%; } .tile.is-10 { flex: none; width: 83.33333%; } .tile.is-11 { flex: none; width: 91.66667%; } .tile.is-12 { flex: none; width: 100%; } } /* Bulma Helpers */ .has-text-white { color: white !important; } a.has-text-white:hover, a.has-text-white:focus { color: #e6e6e6 !important; } .has-background-white { background-color: white !important; } .has-text-black { color: #0a0a0a !important; } a.has-text-black:hover, a.has-text-black:focus { color: black !important; } .has-background-black { background-color: #0a0a0a !important; } .has-text-light { color: whitesmoke !important; } a.has-text-light:hover, a.has-text-light:focus { color: #dbdbdb !important; } .has-background-light { background-color: whitesmoke !important; } .has-text-dark { color: #363636 !important; } a.has-text-dark:hover, a.has-text-dark:focus { color: #1c1c1c !important; } .has-background-dark { background-color: #363636 !important; } .has-text-primary { color: #ff0d68 !important; } a.has-text-primary:hover, a.has-text-primary:focus { color: #d90052 !important; } .has-background-primary { background-color: #ff0d68 !important; } .has-text-primary-light { color: #ffebf2 !important; } a.has-text-primary-light:hover, a.has-text-primary-light:focus { color: #ffb8d2 !important; } .has-background-primary-light { background-color: #ffebf2 !important; } .has-text-primary-dark { color: #e60056 !important; } a.has-text-primary-dark:hover, a.has-text-primary-dark:focus { color: #ff1a70 !important; } .has-background-primary-dark { background-color: #e60056 !important; } .has-text-link { color: #ff0d68 !important; } a.has-text-link:hover, a.has-text-link:focus { color: #d90052 !important; } .has-background-link { background-color: #ff0d68 !important; } .has-text-link-light { color: #ffebf2 !important; } a.has-text-link-light:hover, a.has-text-link-light:focus { color: #ffb8d2 !important; } .has-background-link-light { background-color: #ffebf2 !important; } .has-text-link-dark { color: #e60056 !important; } a.has-text-link-dark:hover, a.has-text-link-dark:focus { color: #ff1a70 !important; } .has-background-link-dark { background-color: #e60056 !important; } .has-text-info { color: #0092FF !important; } a.has-text-info:hover, a.has-text-info:focus { color: #0075cc !important; } .has-background-info { background-color: #0092FF !important; } .has-text-info-light { color: #ebf6ff !important; } a.has-text-info-light:hover, a.has-text-info-light:focus { color: #b8e0ff !important; } .has-background-info-light { background-color: #ebf6ff !important; } .has-text-info-dark { color: #0075cc !important; } a.has-text-info-dark:hover, a.has-text-info-dark:focus { color: #0092ff !important; } .has-background-info-dark { background-color: #0075cc !important; } .has-text-success { color: #16DB93 !important; } a.has-text-success:hover, a.has-text-success:focus { color: #11ad74 !important; } .has-background-success { background-color: #16DB93 !important; } .has-text-success-light { color: #ecfdf7 !important; } a.has-text-success-light:hover, a.has-text-success-light:focus { color: #bef8e3 !important; } .has-background-success-light { background-color: #ecfdf7 !important; } .has-text-success-dark { color: #0e865a !important; } a.has-text-success-dark:hover, a.has-text-success-dark:focus { color: #12b579 !important; } .has-background-success-dark { background-color: #0e865a !important; } .has-text-warning { color: #FFE900 !important; } a.has-text-warning:hover, a.has-text-warning:focus { color: #ccba00 !important; } .has-background-warning { background-color: #FFE900 !important; } .has-text-warning-light { color: #fffdeb !important; } a.has-text-warning-light:hover, a.has-text-warning-light:focus { color: #fff9b8 !important; } .has-background-warning-light { background-color: #fffdeb !important; } .has-text-warning-dark { color: #948700 !important; } a.has-text-warning-dark:hover, a.has-text-warning-dark:focus { color: #c7b600 !important; } .has-background-warning-dark { background-color: #948700 !important; } .has-text-danger { color: #f14668 !important; } a.has-text-danger:hover, a.has-text-danger:focus { color: #ee1742 !important; } .has-background-danger { background-color: #f14668 !important; } .has-text-danger-light { color: #feecf0 !important; } a.has-text-danger-light:hover, a.has-text-danger-light:focus { color: #fabdc9 !important; } .has-background-danger-light { background-color: #feecf0 !important; } .has-text-danger-dark { color: #cc0f35 !important; } a.has-text-danger-dark:hover, a.has-text-danger-dark:focus { color: #ee2049 !important; } .has-background-danger-dark { background-color: #cc0f35 !important; } .has-text-black-bis { color: #121212 !important; } .has-background-black-bis { background-color: #121212 !important; } .has-text-black-ter { color: #242424 !important; } .has-background-black-ter { background-color: #242424 !important; } .has-text-grey-darker { color: #363636 !important; } .has-background-grey-darker { background-color: #363636 !important; } .has-text-grey-dark { color: #4a4a4a !important; } .has-background-grey-dark { background-color: #4a4a4a !important; } .has-text-grey { color: #7a7a7a !important; } .has-background-grey { background-color: #7a7a7a !important; } .has-text-grey-light { color: #b5b5b5 !important; } .has-background-grey-light { background-color: #b5b5b5 !important; } .has-text-grey-lighter { color: #dbdbdb !important; } .has-background-grey-lighter { background-color: #dbdbdb !important; } .has-text-white-ter { color: whitesmoke !important; } .has-background-white-ter { background-color: whitesmoke !important; } .has-text-white-bis { color: #fafafa !important; } .has-background-white-bis { background-color: #fafafa !important; } .is-flex-direction-row { flex-direction: row !important; } .is-flex-direction-row-reverse { flex-direction: row-reverse !important; } .is-flex-direction-column { flex-direction: column !important; } .is-flex-direction-column-reverse { flex-direction: column-reverse !important; } .is-flex-wrap-nowrap { flex-wrap: nowrap !important; } .is-flex-wrap-wrap { flex-wrap: wrap !important; } .is-flex-wrap-wrap-reverse { flex-wrap: wrap-reverse !important; } .is-justify-content-flex-start { justify-content: flex-start !important; } .is-justify-content-flex-end { justify-content: flex-end !important; } .is-justify-content-center { justify-content: center !important; } .is-justify-content-space-between { justify-content: space-between !important; } .is-justify-content-space-around { justify-content: space-around !important; } .is-justify-content-space-evenly { justify-content: space-evenly !important; } .is-justify-content-start { justify-content: start !important; } .is-justify-content-end { justify-content: end !important; } .is-justify-content-left { justify-content: left !important; } .is-justify-content-right { justify-content: right !important; } .is-align-content-flex-start { align-content: flex-start !important; } .is-align-content-flex-end { align-content: flex-end !important; } .is-align-content-center { align-content: center !important; } .is-align-content-space-between { align-content: space-between !important; } .is-align-content-space-around { align-content: space-around !important; } .is-align-content-space-evenly { align-content: space-evenly !important; } .is-align-content-stretch { align-content: stretch !important; } .is-align-content-start { align-content: start !important; } .is-align-content-end { align-content: end !important; } .is-align-content-baseline { align-content: baseline !important; } .is-align-items-stretch { align-items: stretch !important; } .is-align-items-flex-start { align-items: flex-start !important; } .is-align-items-flex-end { align-items: flex-end !important; } .is-align-items-center { align-items: center !important; } .is-align-items-baseline { align-items: baseline !important; } .is-align-items-start { align-items: start !important; } .is-align-items-end { align-items: end !important; } .is-align-items-self-start { align-items: self-start !important; } .is-align-items-self-end { align-items: self-end !important; } .is-align-self-auto { align-self: auto !important; } .is-align-self-flex-start { align-self: flex-start !important; } .is-align-self-flex-end { align-self: flex-end !important; } .is-align-self-center { align-self: center !important; } .is-align-self-baseline { align-self: baseline !important; } .is-align-self-stretch { align-self: stretch !important; } .is-flex-grow-0 { flex-grow: 0 !important; } .is-flex-grow-1 { flex-grow: 1 !important; } .is-flex-grow-2 { flex-grow: 2 !important; } .is-flex-grow-3 { flex-grow: 3 !important; } .is-flex-grow-4 { flex-grow: 4 !important; } .is-flex-grow-5 { flex-grow: 5 !important; } .is-flex-shrink-0 { flex-shrink: 0 !important; } .is-flex-shrink-1 { flex-shrink: 1 !important; } .is-flex-shrink-2 { flex-shrink: 2 !important; } .is-flex-shrink-3 { flex-shrink: 3 !important; } .is-flex-shrink-4 { flex-shrink: 4 !important; } .is-flex-shrink-5 { flex-shrink: 5 !important; } .is-clearfix::after { clear: both; content: " "; display: table; } .is-pulled-left { float: left !important; } .is-pulled-right { float: right !important; } .is-radiusless { border-radius: 0 !important; } .is-shadowless { box-shadow: none !important; } .is-clickable { cursor: pointer !important; pointer-events: all !important; } .is-clipped { overflow: hidden !important; } .is-relative { position: relative !important; } .is-marginless { margin: 0 !important; } .is-paddingless { padding: 0 !important; } .m-0 { margin: 0 !important; } .mt-0 { margin-top: 0 !important; } .mr-0 { margin-right: 0 !important; } .mb-0 { margin-bottom: 0 !important; } .ml-0 { margin-left: 0 !important; } .mx-0 { margin-left: 0 !important; margin-right: 0 !important; } .my-0 { margin-top: 0 !important; margin-bottom: 0 !important; } .m-1 { margin: 0.25rem !important; } .mt-1 { margin-top: 0.25rem !important; } .mr-1 { margin-right: 0.25rem !important; } .mb-1 { margin-bottom: 0.25rem !important; } .ml-1 { margin-left: 0.25rem !important; } .mx-1 { margin-left: 0.25rem !important; margin-right: 0.25rem !important; } .my-1 { margin-top: 0.25rem !important; margin-bottom: 0.25rem !important; } .m-2 { margin: 0.5rem !important; } .mt-2 { margin-top: 0.5rem !important; } .mr-2 { margin-right: 0.5rem !important; } .mb-2 { margin-bottom: 0.5rem !important; } .ml-2 { margin-left: 0.5rem !important; } .mx-2 { margin-left: 0.5rem !important; margin-right: 0.5rem !important; } .my-2 { margin-top: 0.5rem !important; margin-bottom: 0.5rem !important; } .m-3 { margin: 0.75rem !important; } .mt-3 { margin-top: 0.75rem !important; } .mr-3 { margin-right: 0.75rem !important; } .mb-3 { margin-bottom: 0.75rem !important; } .ml-3 { margin-left: 0.75rem !important; } .mx-3 { margin-left: 0.75rem !important; margin-right: 0.75rem !important; } .my-3 { margin-top: 0.75rem !important; margin-bottom: 0.75rem !important; } .m-4 { margin: 1rem !important; } .mt-4 { margin-top: 1rem !important; } .mr-4 { margin-right: 1rem !important; } .mb-4 { margin-bottom: 1rem !important; } .ml-4 { margin-left: 1rem !important; } .mx-4 { margin-left: 1rem !important; margin-right: 1rem !important; } .my-4 { margin-top: 1rem !important; margin-bottom: 1rem !important; } .m-5 { margin: 1.5rem !important; } .mt-5 { margin-top: 1.5rem !important; } .mr-5 { margin-right: 1.5rem !important; } .mb-5 { margin-bottom: 1.5rem !important; } .ml-5 { margin-left: 1.5rem !important; } .mx-5 { margin-left: 1.5rem !important; margin-right: 1.5rem !important; } .my-5 { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; } .m-6 { margin: 3rem !important; } .mt-6 { margin-top: 3rem !important; } .mr-6 { margin-right: 3rem !important; } .mb-6 { margin-bottom: 3rem !important; } .ml-6 { margin-left: 3rem !important; } .mx-6 { margin-left: 3rem !important; margin-right: 3rem !important; } .my-6 { margin-top: 3rem !important; margin-bottom: 3rem !important; } .m-auto { margin: auto !important; } .mt-auto { margin-top: auto !important; } .mr-auto { margin-right: auto !important; } .mb-auto { margin-bottom: auto !important; } .ml-auto { margin-left: auto !important; } .mx-auto { margin-left: auto !important; margin-right: auto !important; } .my-auto { margin-top: auto !important; margin-bottom: auto !important; } .p-0 { padding: 0 !important; } .pt-0 { padding-top: 0 !important; } .pr-0 { padding-right: 0 !important; } .pb-0 { padding-bottom: 0 !important; } .pl-0 { padding-left: 0 !important; } .px-0 { padding-left: 0 !important; padding-right: 0 !important; } .py-0 { padding-top: 0 !important; padding-bottom: 0 !important; } .p-1 { padding: 0.25rem !important; } .pt-1 { padding-top: 0.25rem !important; } .pr-1 { padding-right: 0.25rem !important; } .pb-1 { padding-bottom: 0.25rem !important; } .pl-1 { padding-left: 0.25rem !important; } .px-1 { padding-left: 0.25rem !important; padding-right: 0.25rem !important; } .py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; } .p-2 { padding: 0.5rem !important; } .pt-2 { padding-top: 0.5rem !important; } .pr-2 { padding-right: 0.5rem !important; } .pb-2 { padding-bottom: 0.5rem !important; } .pl-2 { padding-left: 0.5rem !important; } .px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; } .py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; } .p-3 { padding: 0.75rem !important; } .pt-3 { padding-top: 0.75rem !important; } .pr-3 { padding-right: 0.75rem !important; } .pb-3 { padding-bottom: 0.75rem !important; } .pl-3 { padding-left: 0.75rem !important; } .px-3 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; } .py-3 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; } .p-4 { padding: 1rem !important; } .pt-4 { padding-top: 1rem !important; } .pr-4 { padding-right: 1rem !important; } .pb-4 { padding-bottom: 1rem !important; } .pl-4 { padding-left: 1rem !important; } .px-4 { padding-left: 1rem !important; padding-right: 1rem !important; } .py-4 { padding-top: 1rem !important; padding-bottom: 1rem !important; } .p-5 { padding: 1.5rem !important; } .pt-5 { padding-top: 1.5rem !important; } .pr-5 { padding-right: 1.5rem !important; } .pb-5 { padding-bottom: 1.5rem !important; } .pl-5 { padding-left: 1.5rem !important; } .px-5 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; } .py-5 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; } .p-6 { padding: 3rem !important; } .pt-6 { padding-top: 3rem !important; } .pr-6 { padding-right: 3rem !important; } .pb-6 { padding-bottom: 3rem !important; } .pl-6 { padding-left: 3rem !important; } .px-6 { padding-left: 3rem !important; padding-right: 3rem !important; } .py-6 { padding-top: 3rem !important; padding-bottom: 3rem !important; } .p-auto { padding: auto !important; } .pt-auto { padding-top: auto !important; } .pr-auto { padding-right: auto !important; } .pb-auto { padding-bottom: auto !important; } .pl-auto { padding-left: auto !important; } .px-auto { padding-left: auto !important; padding-right: auto !important; } .py-auto { padding-top: auto !important; padding-bottom: auto !important; } .is-size-1 { font-size: 3rem !important; } .is-size-2 { font-size: 2.5rem !important; } .is-size-3 { font-size: 2rem !important; } .is-size-4 { font-size: 1.5rem !important; } .is-size-5 { font-size: 1.25rem !important; } .is-size-6 { font-size: 1rem !important; } .is-size-7 { font-size: 0.75rem !important; } @media screen and (max-width: 768px) { .is-size-1-mobile { font-size: 3rem !important; } .is-size-2-mobile { font-size: 2.5rem !important; } .is-size-3-mobile { font-size: 2rem !important; } .is-size-4-mobile { font-size: 1.5rem !important; } .is-size-5-mobile { font-size: 1.25rem !important; } .is-size-6-mobile { font-size: 1rem !important; } .is-size-7-mobile { font-size: 0.75rem !important; } } @media screen and (min-width: 769px), print { .is-size-1-tablet { font-size: 3rem !important; } .is-size-2-tablet { font-size: 2.5rem !important; } .is-size-3-tablet { font-size: 2rem !important; } .is-size-4-tablet { font-size: 1.5rem !important; } .is-size-5-tablet { font-size: 1.25rem !important; } .is-size-6-tablet { font-size: 1rem !important; } .is-size-7-tablet { font-size: 0.75rem !important; } } @media screen and (max-width: 1023px) { .is-size-1-touch { font-size: 3rem !important; } .is-size-2-touch { font-size: 2.5rem !important; } .is-size-3-touch { font-size: 2rem !important; } .is-size-4-touch { font-size: 1.5rem !important; } .is-size-5-touch { font-size: 1.25rem !important; } .is-size-6-touch { font-size: 1rem !important; } .is-size-7-touch { font-size: 0.75rem !important; } } @media screen and (min-width: 1024px) { .is-size-1-desktop { font-size: 3rem !important; } .is-size-2-desktop { font-size: 2.5rem !important; } .is-size-3-desktop { font-size: 2rem !important; } .is-size-4-desktop { font-size: 1.5rem !important; } .is-size-5-desktop { font-size: 1.25rem !important; } .is-size-6-desktop { font-size: 1rem !important; } .is-size-7-desktop { font-size: 0.75rem !important; } } @media screen and (min-width: 1216px) { .is-size-1-widescreen { font-size: 3rem !important; } .is-size-2-widescreen { font-size: 2.5rem !important; } .is-size-3-widescreen { font-size: 2rem !important; } .is-size-4-widescreen { font-size: 1.5rem !important; } .is-size-5-widescreen { font-size: 1.25rem !important; } .is-size-6-widescreen { font-size: 1rem !important; } .is-size-7-widescreen { font-size: 0.75rem !important; } } @media screen and (min-width: 1408px) { .is-size-1-fullhd { font-size: 3rem !important; } .is-size-2-fullhd { font-size: 2.5rem !important; } .is-size-3-fullhd { font-size: 2rem !important; } .is-size-4-fullhd { font-size: 1.5rem !important; } .is-size-5-fullhd { font-size: 1.25rem !important; } .is-size-6-fullhd { font-size: 1rem !important; } .is-size-7-fullhd { font-size: 0.75rem !important; } } .has-text-centered { text-align: center !important; } .has-text-justified { text-align: justify !important; } .has-text-left { text-align: left !important; } .has-text-right { text-align: right !important; } @media screen and (max-width: 768px) { .has-text-centered-mobile { text-align: center !important; } } @media screen and (min-width: 769px), print { .has-text-centered-tablet { text-align: center !important; } } @media screen and (min-width: 769px) and (max-width: 1023px) { .has-text-centered-tablet-only { text-align: center !important; } } @media screen and (max-width: 1023px) { .has-text-centered-touch { text-align: center !important; } } @media screen and (min-width: 1024px) { .has-text-centered-desktop { text-align: center !important; } } @media screen and (min-width: 1024px) and (max-width: 1215px) { .has-text-centered-desktop-only { text-align: center !important; } } @media screen and (min-width: 1216px) { .has-text-centered-widescreen { text-align: center !important; } } @media screen and (min-width: 1216px) and (max-width: 1407px) { .has-text-centered-widescreen-only { text-align: center !important; } } @media screen and (min-width: 1408px) { .has-text-centered-fullhd { text-align: center !important; } } @media screen and (max-width: 768px) { .has-text-justified-mobile { text-align: justify !important; } } @media screen and (min-width: 769px), print { .has-text-justified-tablet { text-align: justify !important; } } @media screen and (min-width: 769px) and (max-width: 1023px) { .has-text-justified-tablet-only { text-align: justify !important; } } @media screen and (max-width: 1023px) { .has-text-justified-touch { text-align: justify !important; } } @media screen and (min-width: 1024px) { .has-text-justified-desktop { text-align: justify !important; } } @media screen and (min-width: 1024px) and (max-width: 1215px) { .has-text-justified-desktop-only { text-align: justify !important; } } @media screen and (min-width: 1216px) { .has-text-justified-widescreen { text-align: justify !important; } } @media screen and (min-width: 1216px) and (max-width: 1407px) { .has-text-justified-widescreen-only { text-align: justify !important; } } @media screen and (min-width: 1408px) { .has-text-justified-fullhd { text-align: justify !important; } } @media screen and (max-width: 768px) { .has-text-left-mobile { text-align: left !important; } } @media screen and (min-width: 769px), print { .has-text-left-tablet { text-align: left !important; } } @media screen and (min-width: 769px) and (max-width: 1023px) { .has-text-left-tablet-only { text-align: left !important; } } @media screen and (max-width: 1023px) { .has-text-left-touch { text-align: left !important; } } @media screen and (min-width: 1024px) { .has-text-left-desktop { text-align: left !important; } } @media screen and (min-width: 1024px) and (max-width: 1215px) { .has-text-left-desktop-only { text-align: left !important; } } @media screen and (min-width: 1216px) { .has-text-left-widescreen { text-align: left !important; } } @media screen and (min-width: 1216px) and (max-width: 1407px) { .has-text-left-widescreen-only { text-align: left !important; } } @media screen and (min-width: 1408px) { .has-text-left-fullhd { text-align: left !important; } } @media screen and (max-width: 768px) { .has-text-right-mobile { text-align: right !important; } } @media screen and (min-width: 769px), print { .has-text-right-tablet { text-align: right !important; } } @media screen and (min-width: 769px) and (max-width: 1023px) { .has-text-right-tablet-only { text-align: right !important; } } @media screen and (max-width: 1023px) { .has-text-right-touch { text-align: right !important; } } @media screen and (min-width: 1024px) { .has-text-right-desktop { text-align: right !important; } } @media screen and (min-width: 1024px) and (max-width: 1215px) { .has-text-right-desktop-only { text-align: right !important; } } @media screen and (min-width: 1216px) { .has-text-right-widescreen { text-align: right !important; } } @media screen and (min-width: 1216px) and (max-width: 1407px) { .has-text-right-widescreen-only { text-align: right !important; } } @media screen and (min-width: 1408px) { .has-text-right-fullhd { text-align: right !important; } } .is-capitalized { text-transform: capitalize !important; } .is-lowercase { text-transform: lowercase !important; } .is-uppercase { text-transform: uppercase !important; } .is-italic { font-style: italic !important; } .is-underlined { text-decoration: underline !important; } .has-text-weight-light { font-weight: 300 !important; } .has-text-weight-normal { font-weight: 400 !important; } .has-text-weight-medium { font-weight: 500 !important; } .has-text-weight-semibold { font-weight: 600 !important; } .has-text-weight-bold { font-weight: 700 !important; } .is-family-primary { font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif !important; } .is-family-secondary { font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif !important; } .is-family-sans-serif { font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif !important; } .is-family-monospace { font-family: monospace !important; } .is-family-code { font-family: monospace !important; } .is-block { display: block !important; } @media screen and (max-width: 768px) { .is-block-mobile { display: block !important; } } @media screen and (min-width: 769px), print { .is-block-tablet { display: block !important; } } @media screen and (min-width: 769px) and (max-width: 1023px) { .is-block-tablet-only { display: block !important; } } @media screen and (max-width: 1023px) { .is-block-touch { display: block !important; } } @media screen and (min-width: 1024px) { .is-block-desktop { display: block !important; } } @media screen and (min-width: 1024px) and (max-width: 1215px) { .is-block-desktop-only { display: block !important; } } @media screen and (min-width: 1216px) { .is-block-widescreen { display: block !important; } } @media screen and (min-width: 1216px) and (max-width: 1407px) { .is-block-widescreen-only { display: block !important; } } @media screen and (min-width: 1408px) { .is-block-fullhd { display: block !important; } } .is-flex { display: flex !important; } @media screen and (max-width: 768px) { .is-flex-mobile { display: flex !important; } } @media screen and (min-width: 769px), print { .is-flex-tablet { display: flex !important; } } @media screen and (min-width: 769px) and (max-width: 1023px) { .is-flex-tablet-only { display: flex !important; } } @media screen and (max-width: 1023px) { .is-flex-touch { display: flex !important; } } @media screen and (min-width: 1024px) { .is-flex-desktop { display: flex !important; } } @media screen and (min-width: 1024px) and (max-width: 1215px) { .is-flex-desktop-only { display: flex !important; } } @media screen and (min-width: 1216px) { .is-flex-widescreen { display: flex !important; } } @media screen and (min-width: 1216px) and (max-width: 1407px) { .is-flex-widescreen-only { display: flex !important; } } @media screen and (min-width: 1408px) { .is-flex-fullhd { display: flex !important; } } .is-inline { display: inline !important; } @media screen and (max-width: 768px) { .is-inline-mobile { display: inline !important; } } @media screen and (min-width: 769px), print { .is-inline-tablet { display: inline !important; } } @media screen and (min-width: 769px) and (max-width: 1023px) { .is-inline-tablet-only { display: inline !important; } } @media screen and (max-width: 1023px) { .is-inline-touch { display: inline !important; } } @media screen and (min-width: 1024px) { .is-inline-desktop { display: inline !important; } } @media screen and (min-width: 1024px) and (max-width: 1215px) { .is-inline-desktop-only { display: inline !important; } } @media screen and (min-width: 1216px) { .is-inline-widescreen { display: inline !important; } } @media screen and (min-width: 1216px) and (max-width: 1407px) { .is-inline-widescreen-only { display: inline !important; } } @media screen and (min-width: 1408px) { .is-inline-fullhd { display: inline !important; } } .is-inline-block { display: inline-block !important; } @media screen and (max-width: 768px) { .is-inline-block-mobile { display: inline-block !important; } } @media screen and (min-width: 769px), print { .is-inline-block-tablet { display: inline-block !important; } } @media screen and (min-width: 769px) and (max-width: 1023px) { .is-inline-block-tablet-only { display: inline-block !important; } } @media screen and (max-width: 1023px) { .is-inline-block-touch { display: inline-block !important; } } @media screen and (min-width: 1024px) { .is-inline-block-desktop { display: inline-block !important; } } @media screen and (min-width: 1024px) and (max-width: 1215px) { .is-inline-block-desktop-only { display: inline-block !important; } } @media screen and (min-width: 1216px) { .is-inline-block-widescreen { display: inline-block !important; } } @media screen and (min-width: 1216px) and (max-width: 1407px) { .is-inline-block-widescreen-only { display: inline-block !important; } } @media screen and (min-width: 1408px) { .is-inline-block-fullhd { display: inline-block !important; } } .is-inline-flex { display: inline-flex !important; } @media screen and (max-width: 768px) { .is-inline-flex-mobile { display: inline-flex !important; } } @media screen and (min-width: 769px), print { .is-inline-flex-tablet { display: inline-flex !important; } } @media screen and (min-width: 769px) and (max-width: 1023px) { .is-inline-flex-tablet-only { display: inline-flex !important; } } @media screen and (max-width: 1023px) { .is-inline-flex-touch { display: inline-flex !important; } } @media screen and (min-width: 1024px) { .is-inline-flex-desktop { display: inline-flex !important; } } @media screen and (min-width: 1024px) and (max-width: 1215px) { .is-inline-flex-desktop-only { display: inline-flex !important; } } @media screen and (min-width: 1216px) { .is-inline-flex-widescreen { display: inline-flex !important; } } @media screen and (min-width: 1216px) and (max-width: 1407px) { .is-inline-flex-widescreen-only { display: inline-flex !important; } } @media screen and (min-width: 1408px) { .is-inline-flex-fullhd { display: inline-flex !important; } } .is-hidden { display: none !important; } .is-sr-only { border: none !important; clip: rect(0, 0, 0, 0) !important; height: 0.01em !important; overflow: hidden !important; padding: 0 !important; position: absolute !important; white-space: nowrap !important; width: 0.01em !important; } @media screen and (max-width: 768px) { .is-hidden-mobile { display: none !important; } } @media screen and (min-width: 769px), print { .is-hidden-tablet { display: none !important; } } @media screen and (min-width: 769px) and (max-width: 1023px) { .is-hidden-tablet-only { display: none !important; } } @media screen and (max-width: 1023px) { .is-hidden-touch { display: none !important; } } @media screen and (min-width: 1024px) { .is-hidden-desktop { display: none !important; } } @media screen and (min-width: 1024px) and (max-width: 1215px) { .is-hidden-desktop-only { display: none !important; } } @media screen and (min-width: 1216px) { .is-hidden-widescreen { display: none !important; } } @media screen and (min-width: 1216px) and (max-width: 1407px) { .is-hidden-widescreen-only { display: none !important; } } @media screen and (min-width: 1408px) { .is-hidden-fullhd { display: none !important; } } .is-invisible { visibility: hidden !important; } @media screen and (max-width: 768px) { .is-invisible-mobile { visibility: hidden !important; } } @media screen and (min-width: 769px), print { .is-invisible-tablet { visibility: hidden !important; } } @media screen and (min-width: 769px) and (max-width: 1023px) { .is-invisible-tablet-only { visibility: hidden !important; } } @media screen and (max-width: 1023px) { .is-invisible-touch { visibility: hidden !important; } } @media screen and (min-width: 1024px) { .is-invisible-desktop { visibility: hidden !important; } } @media screen and (min-width: 1024px) and (max-width: 1215px) { .is-invisible-desktop-only { visibility: hidden !important; } } @media screen and (min-width: 1216px) { .is-invisible-widescreen { visibility: hidden !important; } } @media screen and (min-width: 1216px) and (max-width: 1407px) { .is-invisible-widescreen-only { visibility: hidden !important; } } @media screen and (min-width: 1408px) { .is-invisible-fullhd { visibility: hidden !important; } } /* Bulma Layout */ .hero { align-items: stretch; display: flex; flex-direction: column; justify-content: space-between; } .hero .navbar { background: none; } .hero .tabs ul { border-bottom: none; } .hero.is-white { background-color: white; color: #0a0a0a; } .hero.is-white a:not(.button):not(.dropdown-item):not(.tag):not(.pagination-link.is-current), .hero.is-white strong { color: inherit; } .hero.is-white .title { color: #0a0a0a; } .hero.is-white .subtitle { color: rgba(10, 10, 10, 0.9); } .hero.is-white .subtitle a:not(.button), .hero.is-white .subtitle strong { color: #0a0a0a; } @media screen and (max-width: 1023px) { .hero.is-white .navbar-menu { background-color: white; } } .hero.is-white .navbar-item, .hero.is-white .navbar-link { color: rgba(10, 10, 10, 0.7); } .hero.is-white a.navbar-item:hover, .hero.is-white a.navbar-item.is-active, .hero.is-white .navbar-link:hover, .hero.is-white .navbar-link.is-active { background-color: #f2f2f2; color: #0a0a0a; } .hero.is-white .tabs a { color: #0a0a0a; opacity: 0.9; } .hero.is-white .tabs a:hover { opacity: 1; } .hero.is-white .tabs li.is-active a { color: white !important; opacity: 1; } .hero.is-white .tabs.is-boxed a, .hero.is-white .tabs.is-toggle a { color: #0a0a0a; } .hero.is-white .tabs.is-boxed a:hover, .hero.is-white .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-white .tabs.is-boxed li.is-active a, .hero.is-white .tabs.is-boxed li.is-active a:hover, .hero.is-white .tabs.is-toggle li.is-active a, .hero.is-white .tabs.is-toggle li.is-active a:hover { background-color: #0a0a0a; border-color: #0a0a0a; color: white; } .hero.is-white.is-bold { background-image: linear-gradient(141deg, #e8e3e4 0%, white 71%, white 100%); } @media screen and (max-width: 768px) { .hero.is-white.is-bold .navbar-menu { background-image: linear-gradient(141deg, #e8e3e4 0%, white 71%, white 100%); } } .hero.is-black { background-color: #0a0a0a; color: white; } .hero.is-black a:not(.button):not(.dropdown-item):not(.tag):not(.pagination-link.is-current), .hero.is-black strong { color: inherit; } .hero.is-black .title { color: white; } .hero.is-black .subtitle { color: rgba(255, 255, 255, 0.9); } .hero.is-black .subtitle a:not(.button), .hero.is-black .subtitle strong { color: white; } @media screen and (max-width: 1023px) { .hero.is-black .navbar-menu { background-color: #0a0a0a; } } .hero.is-black .navbar-item, .hero.is-black .navbar-link { color: rgba(255, 255, 255, 0.7); } .hero.is-black a.navbar-item:hover, .hero.is-black a.navbar-item.is-active, .hero.is-black .navbar-link:hover, .hero.is-black .navbar-link.is-active { background-color: black; color: white; } .hero.is-black .tabs a { color: white; opacity: 0.9; } .hero.is-black .tabs a:hover { opacity: 1; } .hero.is-black .tabs li.is-active a { color: #0a0a0a !important; opacity: 1; } .hero.is-black .tabs.is-boxed a, .hero.is-black .tabs.is-toggle a { color: white; } .hero.is-black .tabs.is-boxed a:hover, .hero.is-black .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-black .tabs.is-boxed li.is-active a, .hero.is-black .tabs.is-boxed li.is-active a:hover, .hero.is-black .tabs.is-toggle li.is-active a, .hero.is-black .tabs.is-toggle li.is-active a:hover { background-color: white; border-color: white; color: #0a0a0a; } .hero.is-black.is-bold { background-image: linear-gradient(141deg, black 0%, #0a0a0a 71%, #181616 100%); } @media screen and (max-width: 768px) { .hero.is-black.is-bold .navbar-menu { background-image: linear-gradient(141deg, black 0%, #0a0a0a 71%, #181616 100%); } } .hero.is-light { background-color: whitesmoke; color: rgba(0, 0, 0, 0.7); } .hero.is-light a:not(.button):not(.dropdown-item):not(.tag):not(.pagination-link.is-current), .hero.is-light strong { color: inherit; } .hero.is-light .title { color: rgba(0, 0, 0, 0.7); } .hero.is-light .subtitle { color: rgba(0, 0, 0, 0.9); } .hero.is-light .subtitle a:not(.button), .hero.is-light .subtitle strong { color: rgba(0, 0, 0, 0.7); } @media screen and (max-width: 1023px) { .hero.is-light .navbar-menu { background-color: whitesmoke; } } .hero.is-light .navbar-item, .hero.is-light .navbar-link { color: rgba(0, 0, 0, 0.7); } .hero.is-light a.navbar-item:hover, .hero.is-light a.navbar-item.is-active, .hero.is-light .navbar-link:hover, .hero.is-light .navbar-link.is-active { background-color: #e8e8e8; color: rgba(0, 0, 0, 0.7); } .hero.is-light .tabs a { color: rgba(0, 0, 0, 0.7); opacity: 0.9; } .hero.is-light .tabs a:hover { opacity: 1; } .hero.is-light .tabs li.is-active a { color: whitesmoke !important; opacity: 1; } .hero.is-light .tabs.is-boxed a, .hero.is-light .tabs.is-toggle a { color: rgba(0, 0, 0, 0.7); } .hero.is-light .tabs.is-boxed a:hover, .hero.is-light .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-light .tabs.is-boxed li.is-active a, .hero.is-light .tabs.is-boxed li.is-active a:hover, .hero.is-light .tabs.is-toggle li.is-active a, .hero.is-light .tabs.is-toggle li.is-active a:hover { background-color: rgba(0, 0, 0, 0.7); border-color: rgba(0, 0, 0, 0.7); color: whitesmoke; } .hero.is-light.is-bold { background-image: linear-gradient(141deg, #dfd8d9 0%, whitesmoke 71%, white 100%); } @media screen and (max-width: 768px) { .hero.is-light.is-bold .navbar-menu { background-image: linear-gradient(141deg, #dfd8d9 0%, whitesmoke 71%, white 100%); } } .hero.is-dark { background-color: #363636; color: #fff; } .hero.is-dark a:not(.button):not(.dropdown-item):not(.tag):not(.pagination-link.is-current), .hero.is-dark strong { color: inherit; } .hero.is-dark .title { color: #fff; } .hero.is-dark .subtitle { color: rgba(255, 255, 255, 0.9); } .hero.is-dark .subtitle a:not(.button), .hero.is-dark .subtitle strong { color: #fff; } @media screen and (max-width: 1023px) { .hero.is-dark .navbar-menu { background-color: #363636; } } .hero.is-dark .navbar-item, .hero.is-dark .navbar-link { color: rgba(255, 255, 255, 0.7); } .hero.is-dark a.navbar-item:hover, .hero.is-dark a.navbar-item.is-active, .hero.is-dark .navbar-link:hover, .hero.is-dark .navbar-link.is-active { background-color: #292929; color: #fff; } .hero.is-dark .tabs a { color: #fff; opacity: 0.9; } .hero.is-dark .tabs a:hover { opacity: 1; } .hero.is-dark .tabs li.is-active a { color: #363636 !important; opacity: 1; } .hero.is-dark .tabs.is-boxed a, .hero.is-dark .tabs.is-toggle a { color: #fff; } .hero.is-dark .tabs.is-boxed a:hover, .hero.is-dark .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-dark .tabs.is-boxed li.is-active a, .hero.is-dark .tabs.is-boxed li.is-active a:hover, .hero.is-dark .tabs.is-toggle li.is-active a, .hero.is-dark .tabs.is-toggle li.is-active a:hover { background-color: #fff; border-color: #fff; color: #363636; } .hero.is-dark.is-bold { background-image: linear-gradient(141deg, #1f191a 0%, #363636 71%, #46403f 100%); } @media screen and (max-width: 768px) { .hero.is-dark.is-bold .navbar-menu { background-image: linear-gradient(141deg, #1f191a 0%, #363636 71%, #46403f 100%); } } .hero.is-primary { background-color: #ff0d68; color: #fff; } .hero.is-primary a:not(.button):not(.dropdown-item):not(.tag):not(.pagination-link.is-current), .hero.is-primary strong { color: inherit; } .hero.is-primary .title { color: #fff; } .hero.is-primary .subtitle { color: rgba(255, 255, 255, 0.9); } .hero.is-primary .subtitle a:not(.button), .hero.is-primary .subtitle strong { color: #fff; } @media screen and (max-width: 1023px) { .hero.is-primary .navbar-menu { background-color: #ff0d68; } } .hero.is-primary .navbar-item, .hero.is-primary .navbar-link { color: rgba(255, 255, 255, 0.7); } .hero.is-primary a.navbar-item:hover, .hero.is-primary a.navbar-item.is-active, .hero.is-primary .navbar-link:hover, .hero.is-primary .navbar-link.is-active { background-color: #f3005b; color: #fff; } .hero.is-primary .tabs a { color: #fff; opacity: 0.9; } .hero.is-primary .tabs a:hover { opacity: 1; } .hero.is-primary .tabs li.is-active a { color: #ff0d68 !important; opacity: 1; } .hero.is-primary .tabs.is-boxed a, .hero.is-primary .tabs.is-toggle a { color: #fff; } .hero.is-primary .tabs.is-boxed a:hover, .hero.is-primary .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-primary .tabs.is-boxed li.is-active a, .hero.is-primary .tabs.is-boxed li.is-active a:hover, .hero.is-primary .tabs.is-toggle li.is-active a, .hero.is-primary .tabs.is-toggle li.is-active a:hover { background-color: #fff; border-color: #fff; color: #ff0d68; } .hero.is-primary.is-bold { background-image: linear-gradient(141deg, #d90076 0%, #ff0d68 71%, #ff2754 100%); } @media screen and (max-width: 768px) { .hero.is-primary.is-bold .navbar-menu { background-image: linear-gradient(141deg, #d90076 0%, #ff0d68 71%, #ff2754 100%); } } .hero.is-link { background-color: #ff0d68; color: #fff; } .hero.is-link a:not(.button):not(.dropdown-item):not(.tag):not(.pagination-link.is-current), .hero.is-link strong { color: inherit; } .hero.is-link .title { color: #fff; } .hero.is-link .subtitle { color: rgba(255, 255, 255, 0.9); } .hero.is-link .subtitle a:not(.button), .hero.is-link .subtitle strong { color: #fff; } @media screen and (max-width: 1023px) { .hero.is-link .navbar-menu { background-color: #ff0d68; } } .hero.is-link .navbar-item, .hero.is-link .navbar-link { color: rgba(255, 255, 255, 0.7); } .hero.is-link a.navbar-item:hover, .hero.is-link a.navbar-item.is-active, .hero.is-link .navbar-link:hover, .hero.is-link .navbar-link.is-active { background-color: #f3005b; color: #fff; } .hero.is-link .tabs a { color: #fff; opacity: 0.9; } .hero.is-link .tabs a:hover { opacity: 1; } .hero.is-link .tabs li.is-active a { color: #ff0d68 !important; opacity: 1; } .hero.is-link .tabs.is-boxed a, .hero.is-link .tabs.is-toggle a { color: #fff; } .hero.is-link .tabs.is-boxed a:hover, .hero.is-link .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-link .tabs.is-boxed li.is-active a, .hero.is-link .tabs.is-boxed li.is-active a:hover, .hero.is-link .tabs.is-toggle li.is-active a, .hero.is-link .tabs.is-toggle li.is-active a:hover { background-color: #fff; border-color: #fff; color: #ff0d68; } .hero.is-link.is-bold { background-image: linear-gradient(141deg, #d90076 0%, #ff0d68 71%, #ff2754 100%); } @media screen and (max-width: 768px) { .hero.is-link.is-bold .navbar-menu { background-image: linear-gradient(141deg, #d90076 0%, #ff0d68 71%, #ff2754 100%); } } .hero.is-info { background-color: #0092FF; color: #fff; } .hero.is-info a:not(.button):not(.dropdown-item):not(.tag):not(.pagination-link.is-current), .hero.is-info strong { color: inherit; } .hero.is-info .title { color: #fff; } .hero.is-info .subtitle { color: rgba(255, 255, 255, 0.9); } .hero.is-info .subtitle a:not(.button), .hero.is-info .subtitle strong { color: #fff; } @media screen and (max-width: 1023px) { .hero.is-info .navbar-menu { background-color: #0092FF; } } .hero.is-info .navbar-item, .hero.is-info .navbar-link { color: rgba(255, 255, 255, 0.7); } .hero.is-info a.navbar-item:hover, .hero.is-info a.navbar-item.is-active, .hero.is-info .navbar-link:hover, .hero.is-info .navbar-link.is-active { background-color: #0083e6; color: #fff; } .hero.is-info .tabs a { color: #fff; opacity: 0.9; } .hero.is-info .tabs a:hover { opacity: 1; } .hero.is-info .tabs li.is-active a { color: #0092FF !important; opacity: 1; } .hero.is-info .tabs.is-boxed a, .hero.is-info .tabs.is-toggle a { color: #fff; } .hero.is-info .tabs.is-boxed a:hover, .hero.is-info .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-info .tabs.is-boxed li.is-active a, .hero.is-info .tabs.is-boxed li.is-active a:hover, .hero.is-info .tabs.is-toggle li.is-active a, .hero.is-info .tabs.is-toggle li.is-active a:hover { background-color: #fff; border-color: #fff; color: #0092FF; } .hero.is-info.is-bold { background-image: linear-gradient(141deg, #0097cc 0%, #0092FF 71%, #1a77ff 100%); } @media screen and (max-width: 768px) { .hero.is-info.is-bold .navbar-menu { background-image: linear-gradient(141deg, #0097cc 0%, #0092FF 71%, #1a77ff 100%); } } .hero.is-success { background-color: #16DB93; color: rgba(0, 0, 0, 0.7); } .hero.is-success a:not(.button):not(.dropdown-item):not(.tag):not(.pagination-link.is-current), .hero.is-success strong { color: inherit; } .hero.is-success .title { color: rgba(0, 0, 0, 0.7); } .hero.is-success .subtitle { color: rgba(0, 0, 0, 0.9); } .hero.is-success .subtitle a:not(.button), .hero.is-success .subtitle strong { color: rgba(0, 0, 0, 0.7); } @media screen and (max-width: 1023px) { .hero.is-success .navbar-menu { background-color: #16DB93; } } .hero.is-success .navbar-item, .hero.is-success .navbar-link { color: rgba(0, 0, 0, 0.7); } .hero.is-success a.navbar-item:hover, .hero.is-success a.navbar-item.is-active, .hero.is-success .navbar-link:hover, .hero.is-success .navbar-link.is-active { background-color: #14c483; color: rgba(0, 0, 0, 0.7); } .hero.is-success .tabs a { color: rgba(0, 0, 0, 0.7); opacity: 0.9; } .hero.is-success .tabs a:hover { opacity: 1; } .hero.is-success .tabs li.is-active a { color: #16DB93 !important; opacity: 1; } .hero.is-success .tabs.is-boxed a, .hero.is-success .tabs.is-toggle a { color: rgba(0, 0, 0, 0.7); } .hero.is-success .tabs.is-boxed a:hover, .hero.is-success .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-success .tabs.is-boxed li.is-active a, .hero.is-success .tabs.is-boxed li.is-active a:hover, .hero.is-success .tabs.is-toggle li.is-active a, .hero.is-success .tabs.is-toggle li.is-active a:hover { background-color: rgba(0, 0, 0, 0.7); border-color: rgba(0, 0, 0, 0.7); color: #16DB93; } .hero.is-success.is-bold { background-image: linear-gradient(141deg, #08b659 0%, #16DB93 71%, #1cefc5 100%); } @media screen and (max-width: 768px) { .hero.is-success.is-bold .navbar-menu { background-image: linear-gradient(141deg, #08b659 0%, #16DB93 71%, #1cefc5 100%); } } .hero.is-warning { background-color: #FFE900; color: rgba(0, 0, 0, 0.7); } .hero.is-warning a:not(.button):not(.dropdown-item):not(.tag):not(.pagination-link.is-current), .hero.is-warning strong { color: inherit; } .hero.is-warning .title { color: rgba(0, 0, 0, 0.7); } .hero.is-warning .subtitle { color: rgba(0, 0, 0, 0.9); } .hero.is-warning .subtitle a:not(.button), .hero.is-warning .subtitle strong { color: rgba(0, 0, 0, 0.7); } @media screen and (max-width: 1023px) { .hero.is-warning .navbar-menu { background-color: #FFE900; } } .hero.is-warning .navbar-item, .hero.is-warning .navbar-link { color: rgba(0, 0, 0, 0.7); } .hero.is-warning a.navbar-item:hover, .hero.is-warning a.navbar-item.is-active, .hero.is-warning .navbar-link:hover, .hero.is-warning .navbar-link.is-active { background-color: #e6d200; color: rgba(0, 0, 0, 0.7); } .hero.is-warning .tabs a { color: rgba(0, 0, 0, 0.7); opacity: 0.9; } .hero.is-warning .tabs a:hover { opacity: 1; } .hero.is-warning .tabs li.is-active a { color: #FFE900 !important; opacity: 1; } .hero.is-warning .tabs.is-boxed a, .hero.is-warning .tabs.is-toggle a { color: rgba(0, 0, 0, 0.7); } .hero.is-warning .tabs.is-boxed a:hover, .hero.is-warning .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-warning .tabs.is-boxed li.is-active a, .hero.is-warning .tabs.is-boxed li.is-active a:hover, .hero.is-warning .tabs.is-toggle li.is-active a, .hero.is-warning .tabs.is-toggle li.is-active a:hover { background-color: rgba(0, 0, 0, 0.7); border-color: rgba(0, 0, 0, 0.7); color: #FFE900; } .hero.is-warning.is-bold { background-image: linear-gradient(141deg, #cc9800 0%, #FFE900 71%, #edff1a 100%); } @media screen and (max-width: 768px) { .hero.is-warning.is-bold .navbar-menu { background-image: linear-gradient(141deg, #cc9800 0%, #FFE900 71%, #edff1a 100%); } } .hero.is-danger { background-color: #f14668; color: #fff; } .hero.is-danger a:not(.button):not(.dropdown-item):not(.tag):not(.pagination-link.is-current), .hero.is-danger strong { color: inherit; } .hero.is-danger .title { color: #fff; } .hero.is-danger .subtitle { color: rgba(255, 255, 255, 0.9); } .hero.is-danger .subtitle a:not(.button), .hero.is-danger .subtitle strong { color: #fff; } @media screen and (max-width: 1023px) { .hero.is-danger .navbar-menu { background-color: #f14668; } } .hero.is-danger .navbar-item, .hero.is-danger .navbar-link { color: rgba(255, 255, 255, 0.7); } .hero.is-danger a.navbar-item:hover, .hero.is-danger a.navbar-item.is-active, .hero.is-danger .navbar-link:hover, .hero.is-danger .navbar-link.is-active { background-color: #ef2e55; color: #fff; } .hero.is-danger .tabs a { color: #fff; opacity: 0.9; } .hero.is-danger .tabs a:hover { opacity: 1; } .hero.is-danger .tabs li.is-active a { color: #f14668 !important; opacity: 1; } .hero.is-danger .tabs.is-boxed a, .hero.is-danger .tabs.is-toggle a { color: #fff; } .hero.is-danger .tabs.is-boxed a:hover, .hero.is-danger .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-danger .tabs.is-boxed li.is-active a, .hero.is-danger .tabs.is-boxed li.is-active a:hover, .hero.is-danger .tabs.is-toggle li.is-active a, .hero.is-danger .tabs.is-toggle li.is-active a:hover { background-color: #fff; border-color: #fff; color: #f14668; } .hero.is-danger.is-bold { background-image: linear-gradient(141deg, #fa0a62 0%, #f14668 71%, #f7595f 100%); } @media screen and (max-width: 768px) { .hero.is-danger.is-bold .navbar-menu { background-image: linear-gradient(141deg, #fa0a62 0%, #f14668 71%, #f7595f 100%); } } .hero.is-small .hero-body { padding: 1.5rem; } @media screen and (min-width: 769px), print { .hero.is-medium .hero-body { padding: 9rem 4.5rem; } } @media screen and (min-width: 769px), print { .hero.is-large .hero-body { padding: 18rem 6rem; } } .hero.is-halfheight .hero-body, .hero.is-fullheight .hero-body, .hero.is-fullheight-with-navbar .hero-body { align-items: center; display: flex; } .hero.is-halfheight .hero-body > .container, .hero.is-fullheight .hero-body > .container, .hero.is-fullheight-with-navbar .hero-body > .container { flex-grow: 1; flex-shrink: 1; } .hero.is-halfheight { min-height: 50vh; } .hero.is-fullheight { min-height: 100vh; } .hero-video { overflow: hidden; } .hero-video video { left: 50%; min-height: 100%; min-width: 100%; position: absolute; top: 50%; transform: translate3d(-50%, -50%, 0); } .hero-video.is-transparent { opacity: 0.3; } @media screen and (max-width: 768px) { .hero-video { display: none; } } .hero-buttons { margin-top: 1.5rem; } @media screen and (max-width: 768px) { .hero-buttons .button { display: flex; } .hero-buttons .button:not(:last-child) { margin-bottom: 0.75rem; } } @media screen and (min-width: 769px), print { .hero-buttons { display: flex; justify-content: center; } .hero-buttons .button:not(:last-child) { margin-right: 1.5rem; } } .hero-head, .hero-foot { flex-grow: 0; flex-shrink: 0; } .hero-body { flex-grow: 1; flex-shrink: 0; padding: 3rem 1.5rem; } @media screen and (min-width: 769px), print { .hero-body { padding: 3rem 3rem; } } .section { padding: 3rem 1.5rem; } @media screen and (min-width: 1024px) { .section { padding: 3rem 3rem; } .section.is-medium { padding: 9rem 4.5rem; } .section.is-large { padding: 18rem 6rem; } } .footer { background-color: #fafafa; padding: 3rem 1.5rem 6rem; } /*! Bulma Prefers Dark | MIT License | github.com/jloh/bulma-prefers-dark */ @media (prefers-color-scheme: dark) { html { background-color: #17181c; } body { color: #b5b5b5; } a { color: #e60056; } a:hover { color: #dbdbdb; } code { background-color: #242424; color: #da1039; } hr { background-color: #242424; } strong { color: #dbdbdb; } pre { background-color: #242424; color: #b5b5b5; } table th { color: #dbdbdb; } .has-text-white-dark { color: white !important; } a.has-text-white-dark:hover, a.has-text-white-dark:focus { color: white !important; } .has-background-white-dark { background-color: white !important; } .has-text-black-dark { color: #0a0a0a !important; } a.has-text-black-dark:hover, a.has-text-black-dark:focus { color: #242424 !important; } .has-background-black-dark { background-color: #0a0a0a !important; } .has-text-light-dark { color: whitesmoke !important; } a.has-text-light-dark:hover, a.has-text-light-dark:focus { color: white !important; } .has-background-light-dark { background-color: whitesmoke !important; } .has-text-dark-dark { color: #363636 !important; } a.has-text-dark-dark:hover, a.has-text-dark-dark:focus { color: #4f4f4f !important; } .has-background-dark-dark { background-color: #363636 !important; } .has-text-primary-dark { color: #ff0d68 !important; } a.has-text-primary-dark:hover, a.has-text-primary-dark:focus { color: #ff4088 !important; } .has-background-primary-dark { background-color: #ff0d68 !important; } .has-text-link-dark { color: #ff0d68 !important; } a.has-text-link-dark:hover, a.has-text-link-dark:focus { color: #ff4088 !important; } .has-background-link-dark { background-color: #ff0d68 !important; } .has-text-info-dark { color: #0092FF !important; } a.has-text-info-dark:hover, a.has-text-info-dark:focus { color: #33a8ff !important; } .has-background-info-dark { background-color: #0092FF !important; } .has-text-success-dark { color: #16DB93 !important; } a.has-text-success-dark:hover, a.has-text-success-dark:focus { color: #39ebaa !important; } .has-background-success-dark { background-color: #16DB93 !important; } .has-text-warning-dark { color: #FFE900 !important; } a.has-text-warning-dark:hover, a.has-text-warning-dark:focus { color: #ffed33 !important; } .has-background-warning-dark { background-color: #FFE900 !important; } .has-text-danger-dark { color: #f14668 !important; } a.has-text-danger-dark:hover, a.has-text-danger-dark:focus { color: #f5758f !important; } .has-background-danger-dark { background-color: #f14668 !important; } .has-text-black-bis-dark { color: #121212 !important; } .has-background-black-bis-dark { background-color: #121212 !important; } .has-text-black-ter-dark { color: #242424 !important; } .has-background-black-ter-dark { background-color: #242424 !important; } .has-text-grey-darker-dark { color: #363636 !important; } .has-background-grey-darker-dark { background-color: #363636 !important; } .has-text-grey-dark-dark { color: #4a4a4a !important; } .has-background-grey-dark-dark { background-color: #4a4a4a !important; } .has-text-grey-dark { color: #7a7a7a !important; } .has-background-grey-dark { background-color: #7a7a7a !important; } .has-text-grey-light-dark { color: #b5b5b5 !important; } .has-background-grey-light-dark { background-color: #b5b5b5 !important; } .has-text-grey-lighter-dark { color: #dbdbdb !important; } .has-background-grey-lighter-dark { background-color: #dbdbdb !important; } .has-text-white-ter-dark { color: whitesmoke !important; } .has-background-white-ter-dark { background-color: whitesmoke !important; } .has-text-white-bis-dark { color: #fafafa !important; } .has-background-white-bis-dark { background-color: #fafafa !important; } .box { background-color: #0a0a0a; box-shadow: 0 2px 3px rgba(255, 255, 255, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.1); color: #b5b5b5; } a.box:hover, a.box:focus { box-shadow: 0 2px 3px rgba(255, 255, 255, 0.1), 0 0 0 1px #e60056; } a.box:active { box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.2), 0 0 0 1px #e60056; } .button { background-color: #0a0a0a; border-color: #363636; color: #dbdbdb; } .button:hover, .button.is-hovered { border-color: #4a4a4a; color: #dbdbdb; } .button:focus, .button.is-focused { border-color: #5ea3e4; color: #dbdbdb; } .button:focus:not(:active), .button.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(230, 0, 86, 0.25); } .button:active, .button.is-active { border-color: #b5b5b5; color: #dbdbdb; } .button.is-text { color: #b5b5b5; } .button.is-text:hover, .button.is-text.is-hovered, .button.is-text:focus, .button.is-text.is-focused { background-color: #242424; color: #dbdbdb; } .button.is-text:active, .button.is-text.is-active { background-color: #171717; color: #dbdbdb; } .button.is-white { background-color: #e6e6e6; border-color: transparent; color: #0a0a0a; } .button.is-white:hover, .button.is-white.is-hovered { background-color: #dfdfdf; border-color: transparent; color: #0a0a0a; } .button.is-white:focus, .button.is-white.is-focused { border-color: transparent; color: #0a0a0a; } .button.is-white:focus:not(:active), .button.is-white.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(230, 230, 230, 0.25); } .button.is-white:active, .button.is-white.is-active { background-color: #d9d9d9; border-color: transparent; color: #0a0a0a; } .button.is-white[disabled], fieldset[disabled] .button.is-white { background-color: #e6e6e6; border-color: transparent; box-shadow: none; } .button.is-white.is-inverted { background-color: #0a0a0a; color: #e6e6e6; } .button.is-white.is-inverted:hover { background-color: black; } .button.is-white.is-inverted[disabled], fieldset[disabled] .button.is-white.is-inverted { background-color: #0a0a0a; border-color: transparent; box-shadow: none; color: #e6e6e6; } .button.is-white.is-loading::after { border-color: transparent transparent #0a0a0a #0a0a0a !important; } .button.is-white.is-outlined { background-color: transparent; border-color: #e6e6e6; color: #e6e6e6; } .button.is-white.is-outlined:hover, .button.is-white.is-outlined:focus { background-color: #e6e6e6; border-color: #e6e6e6; color: #0a0a0a; } .button.is-white.is-outlined.is-loading::after { border-color: transparent transparent #e6e6e6 #e6e6e6 !important; } .button.is-white.is-outlined[disabled], fieldset[disabled] .button.is-white.is-outlined { background-color: transparent; border-color: #e6e6e6; box-shadow: none; color: #e6e6e6; } .button.is-white.is-inverted.is-outlined { background-color: transparent; border-color: #0a0a0a; color: #0a0a0a; } .button.is-white.is-inverted.is-outlined:hover, .button.is-white.is-inverted.is-outlined:focus { background-color: #0a0a0a; color: #e6e6e6; } .button.is-white.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-white.is-inverted.is-outlined { background-color: transparent; border-color: #0a0a0a; box-shadow: none; color: #0a0a0a; } .button.is-black { background-color: black; border-color: transparent; color: white; } .button.is-black:hover, .button.is-black.is-hovered { background-color: black; border-color: transparent; color: white; } .button.is-black:focus, .button.is-black.is-focused { border-color: transparent; color: white; } .button.is-black:focus:not(:active), .button.is-black.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(0, 0, 0, 0.25); } .button.is-black:active, .button.is-black.is-active { background-color: black; border-color: transparent; color: white; } .button.is-black[disabled], fieldset[disabled] .button.is-black { background-color: black; border-color: transparent; box-shadow: none; } .button.is-black.is-inverted { background-color: white; color: black; } .button.is-black.is-inverted:hover { background-color: #f2f2f2; } .button.is-black.is-inverted[disabled], fieldset[disabled] .button.is-black.is-inverted { background-color: white; border-color: transparent; box-shadow: none; color: black; } .button.is-black.is-loading::after { border-color: transparent transparent white white !important; } .button.is-black.is-outlined { background-color: transparent; border-color: black; color: black; } .button.is-black.is-outlined:hover, .button.is-black.is-outlined:focus { background-color: black; border-color: black; color: white; } .button.is-black.is-outlined.is-loading::after { border-color: transparent transparent black black !important; } .button.is-black.is-outlined[disabled], fieldset[disabled] .button.is-black.is-outlined { background-color: transparent; border-color: black; box-shadow: none; color: black; } .button.is-black.is-inverted.is-outlined { background-color: transparent; border-color: white; color: white; } .button.is-black.is-inverted.is-outlined:hover, .button.is-black.is-inverted.is-outlined:focus { background-color: white; color: black; } .button.is-black.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-black.is-inverted.is-outlined { background-color: transparent; border-color: white; box-shadow: none; color: white; } .button.is-light { background-color: #dbdbdb; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-light:hover, .button.is-light.is-hovered { background-color: #d5d5d5; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-light:focus, .button.is-light.is-focused { border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-light:focus:not(:active), .button.is-light.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(219, 219, 219, 0.25); } .button.is-light:active, .button.is-light.is-active { background-color: #cfcfcf; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-light[disabled], fieldset[disabled] .button.is-light { background-color: #dbdbdb; border-color: transparent; box-shadow: none; } .button.is-light.is-inverted { background-color: rgba(0, 0, 0, 0.7); color: #dbdbdb; } .button.is-light.is-inverted:hover { background-color: rgba(0, 0, 0, 0.7); } .button.is-light.is-inverted[disabled], fieldset[disabled] .button.is-light.is-inverted { background-color: rgba(0, 0, 0, 0.7); border-color: transparent; box-shadow: none; color: #dbdbdb; } .button.is-light.is-loading::after { border-color: transparent transparent rgba(0, 0, 0, 0.7) rgba(0, 0, 0, 0.7) !important; } .button.is-light.is-outlined { background-color: transparent; border-color: #dbdbdb; color: #dbdbdb; } .button.is-light.is-outlined:hover, .button.is-light.is-outlined:focus { background-color: #dbdbdb; border-color: #dbdbdb; color: rgba(0, 0, 0, 0.7); } .button.is-light.is-outlined.is-loading::after { border-color: transparent transparent #dbdbdb #dbdbdb !important; } .button.is-light.is-outlined[disabled], fieldset[disabled] .button.is-light.is-outlined { background-color: transparent; border-color: #dbdbdb; box-shadow: none; color: #dbdbdb; } .button.is-light.is-inverted.is-outlined { background-color: transparent; border-color: rgba(0, 0, 0, 0.7); color: rgba(0, 0, 0, 0.7); } .button.is-light.is-inverted.is-outlined:hover, .button.is-light.is-inverted.is-outlined:focus { background-color: rgba(0, 0, 0, 0.7); color: #dbdbdb; } .button.is-light.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-light.is-inverted.is-outlined { background-color: transparent; border-color: rgba(0, 0, 0, 0.7); box-shadow: none; color: rgba(0, 0, 0, 0.7); } .button.is-dark { background-color: #1c1c1c; border-color: transparent; color: #fff; } .button.is-dark:hover, .button.is-dark.is-hovered { background-color: #161616; border-color: transparent; color: #fff; } .button.is-dark:focus, .button.is-dark.is-focused { border-color: transparent; color: #fff; } .button.is-dark:focus:not(:active), .button.is-dark.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(28, 28, 28, 0.25); } .button.is-dark:active, .button.is-dark.is-active { background-color: #0f0f0f; border-color: transparent; color: #fff; } .button.is-dark[disabled], fieldset[disabled] .button.is-dark { background-color: #1c1c1c; border-color: transparent; box-shadow: none; } .button.is-dark.is-inverted { background-color: #fff; color: #1c1c1c; } .button.is-dark.is-inverted:hover { background-color: #f2f2f2; } .button.is-dark.is-inverted[disabled], fieldset[disabled] .button.is-dark.is-inverted { background-color: #fff; border-color: transparent; box-shadow: none; color: #1c1c1c; } .button.is-dark.is-loading::after { border-color: transparent transparent #fff #fff !important; } .button.is-dark.is-outlined { background-color: transparent; border-color: #1c1c1c; color: #1c1c1c; } .button.is-dark.is-outlined:hover, .button.is-dark.is-outlined:focus { background-color: #1c1c1c; border-color: #1c1c1c; color: #fff; } .button.is-dark.is-outlined.is-loading::after { border-color: transparent transparent #1c1c1c #1c1c1c !important; } .button.is-dark.is-outlined[disabled], fieldset[disabled] .button.is-dark.is-outlined { background-color: transparent; border-color: #1c1c1c; box-shadow: none; color: #1c1c1c; } .button.is-dark.is-inverted.is-outlined { background-color: transparent; border-color: #fff; color: #fff; } .button.is-dark.is-inverted.is-outlined:hover, .button.is-dark.is-inverted.is-outlined:focus { background-color: #fff; color: #1c1c1c; } .button.is-dark.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-dark.is-inverted.is-outlined { background-color: transparent; border-color: #fff; box-shadow: none; color: #fff; } .button.is-primary { background-color: #d90052; border-color: transparent; color: #fff; } .button.is-primary:hover, .button.is-primary.is-hovered { background-color: #cc004d; border-color: transparent; color: #fff; } .button.is-primary:focus, .button.is-primary.is-focused { border-color: transparent; color: #fff; } .button.is-primary:focus:not(:active), .button.is-primary.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(217, 0, 82, 0.25); } .button.is-primary:active, .button.is-primary.is-active { background-color: #c00048; border-color: transparent; color: #fff; } .button.is-primary[disabled], fieldset[disabled] .button.is-primary { background-color: #d90052; border-color: transparent; box-shadow: none; } .button.is-primary.is-inverted { background-color: #fff; color: #d90052; } .button.is-primary.is-inverted:hover { background-color: #f2f2f2; } .button.is-primary.is-inverted[disabled], fieldset[disabled] .button.is-primary.is-inverted { background-color: #fff; border-color: transparent; box-shadow: none; color: #d90052; } .button.is-primary.is-loading::after { border-color: transparent transparent #fff #fff !important; } .button.is-primary.is-outlined { background-color: transparent; border-color: #d90052; color: #d90052; } .button.is-primary.is-outlined:hover, .button.is-primary.is-outlined:focus { background-color: #d90052; border-color: #d90052; color: #fff; } .button.is-primary.is-outlined.is-loading::after { border-color: transparent transparent #d90052 #d90052 !important; } .button.is-primary.is-outlined[disabled], fieldset[disabled] .button.is-primary.is-outlined { background-color: transparent; border-color: #d90052; box-shadow: none; color: #d90052; } .button.is-primary.is-inverted.is-outlined { background-color: transparent; border-color: #fff; color: #fff; } .button.is-primary.is-inverted.is-outlined:hover, .button.is-primary.is-inverted.is-outlined:focus { background-color: #fff; color: #d90052; } .button.is-primary.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-primary.is-inverted.is-outlined { background-color: transparent; border-color: #fff; box-shadow: none; color: #fff; } .button.is-link { background-color: #d90052; border-color: transparent; color: #fff; } .button.is-link:hover, .button.is-link.is-hovered { background-color: #cc004d; border-color: transparent; color: #fff; } .button.is-link:focus, .button.is-link.is-focused { border-color: transparent; color: #fff; } .button.is-link:focus:not(:active), .button.is-link.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(217, 0, 82, 0.25); } .button.is-link:active, .button.is-link.is-active { background-color: #c00048; border-color: transparent; color: #fff; } .button.is-link[disabled], fieldset[disabled] .button.is-link { background-color: #d90052; border-color: transparent; box-shadow: none; } .button.is-link.is-inverted { background-color: #fff; color: #d90052; } .button.is-link.is-inverted:hover { background-color: #f2f2f2; } .button.is-link.is-inverted[disabled], fieldset[disabled] .button.is-link.is-inverted { background-color: #fff; border-color: transparent; box-shadow: none; color: #d90052; } .button.is-link.is-loading::after { border-color: transparent transparent #fff #fff !important; } .button.is-link.is-outlined { background-color: transparent; border-color: #d90052; color: #d90052; } .button.is-link.is-outlined:hover, .button.is-link.is-outlined:focus { background-color: #d90052; border-color: #d90052; color: #fff; } .button.is-link.is-outlined.is-loading::after { border-color: transparent transparent #d90052 #d90052 !important; } .button.is-link.is-outlined[disabled], fieldset[disabled] .button.is-link.is-outlined { background-color: transparent; border-color: #d90052; box-shadow: none; color: #d90052; } .button.is-link.is-inverted.is-outlined { background-color: transparent; border-color: #fff; color: #fff; } .button.is-link.is-inverted.is-outlined:hover, .button.is-link.is-inverted.is-outlined:focus { background-color: #fff; color: #d90052; } .button.is-link.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-link.is-inverted.is-outlined { background-color: transparent; border-color: #fff; box-shadow: none; color: #fff; } .button.is-info { background-color: #0075cc; border-color: transparent; color: #fff; } .button.is-info:hover, .button.is-info.is-hovered { background-color: #006ebf; border-color: transparent; color: #fff; } .button.is-info:focus, .button.is-info.is-focused { border-color: transparent; color: #fff; } .button.is-info:focus:not(:active), .button.is-info.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(0, 117, 204, 0.25); } .button.is-info:active, .button.is-info.is-active { background-color: #0066b3; border-color: transparent; color: #fff; } .button.is-info[disabled], fieldset[disabled] .button.is-info { background-color: #0075cc; border-color: transparent; box-shadow: none; } .button.is-info.is-inverted { background-color: #fff; color: #0075cc; } .button.is-info.is-inverted:hover { background-color: #f2f2f2; } .button.is-info.is-inverted[disabled], fieldset[disabled] .button.is-info.is-inverted { background-color: #fff; border-color: transparent; box-shadow: none; color: #0075cc; } .button.is-info.is-loading::after { border-color: transparent transparent #fff #fff !important; } .button.is-info.is-outlined { background-color: transparent; border-color: #0075cc; color: #0075cc; } .button.is-info.is-outlined:hover, .button.is-info.is-outlined:focus { background-color: #0075cc; border-color: #0075cc; color: #fff; } .button.is-info.is-outlined.is-loading::after { border-color: transparent transparent #0075cc #0075cc !important; } .button.is-info.is-outlined[disabled], fieldset[disabled] .button.is-info.is-outlined { background-color: transparent; border-color: #0075cc; box-shadow: none; color: #0075cc; } .button.is-info.is-inverted.is-outlined { background-color: transparent; border-color: #fff; color: #fff; } .button.is-info.is-inverted.is-outlined:hover, .button.is-info.is-inverted.is-outlined:focus { background-color: #fff; color: #0075cc; } .button.is-info.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-info.is-inverted.is-outlined { background-color: transparent; border-color: #fff; box-shadow: none; color: #fff; } .button.is-success { background-color: #11ad74; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-success:hover, .button.is-success.is-hovered { background-color: #10a16c; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-success:focus, .button.is-success.is-focused { border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-success:focus:not(:active), .button.is-success.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(17, 173, 116, 0.25); } .button.is-success:active, .button.is-success.is-active { background-color: #0f9564; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-success[disabled], fieldset[disabled] .button.is-success { background-color: #11ad74; border-color: transparent; box-shadow: none; } .button.is-success.is-inverted { background-color: rgba(0, 0, 0, 0.7); color: #11ad74; } .button.is-success.is-inverted:hover { background-color: rgba(0, 0, 0, 0.7); } .button.is-success.is-inverted[disabled], fieldset[disabled] .button.is-success.is-inverted { background-color: rgba(0, 0, 0, 0.7); border-color: transparent; box-shadow: none; color: #11ad74; } .button.is-success.is-loading::after { border-color: transparent transparent rgba(0, 0, 0, 0.7) rgba(0, 0, 0, 0.7) !important; } .button.is-success.is-outlined { background-color: transparent; border-color: #11ad74; color: #11ad74; } .button.is-success.is-outlined:hover, .button.is-success.is-outlined:focus { background-color: #11ad74; border-color: #11ad74; color: rgba(0, 0, 0, 0.7); } .button.is-success.is-outlined.is-loading::after { border-color: transparent transparent #11ad74 #11ad74 !important; } .button.is-success.is-outlined[disabled], fieldset[disabled] .button.is-success.is-outlined { background-color: transparent; border-color: #11ad74; box-shadow: none; color: #11ad74; } .button.is-success.is-inverted.is-outlined { background-color: transparent; border-color: rgba(0, 0, 0, 0.7); color: rgba(0, 0, 0, 0.7); } .button.is-success.is-inverted.is-outlined:hover, .button.is-success.is-inverted.is-outlined:focus { background-color: rgba(0, 0, 0, 0.7); color: #11ad74; } .button.is-success.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-success.is-inverted.is-outlined { background-color: transparent; border-color: rgba(0, 0, 0, 0.7); box-shadow: none; color: rgba(0, 0, 0, 0.7); } .button.is-warning { background-color: #ccba00; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-warning:hover, .button.is-warning.is-hovered { background-color: #bfaf00; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-warning:focus, .button.is-warning.is-focused { border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-warning:focus:not(:active), .button.is-warning.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(204, 186, 0, 0.25); } .button.is-warning:active, .button.is-warning.is-active { background-color: #b3a300; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-warning[disabled], fieldset[disabled] .button.is-warning { background-color: #ccba00; border-color: transparent; box-shadow: none; } .button.is-warning.is-inverted { background-color: rgba(0, 0, 0, 0.7); color: #ccba00; } .button.is-warning.is-inverted:hover { background-color: rgba(0, 0, 0, 0.7); } .button.is-warning.is-inverted[disabled], fieldset[disabled] .button.is-warning.is-inverted { background-color: rgba(0, 0, 0, 0.7); border-color: transparent; box-shadow: none; color: #ccba00; } .button.is-warning.is-loading::after { border-color: transparent transparent rgba(0, 0, 0, 0.7) rgba(0, 0, 0, 0.7) !important; } .button.is-warning.is-outlined { background-color: transparent; border-color: #ccba00; color: #ccba00; } .button.is-warning.is-outlined:hover, .button.is-warning.is-outlined:focus { background-color: #ccba00; border-color: #ccba00; color: rgba(0, 0, 0, 0.7); } .button.is-warning.is-outlined.is-loading::after { border-color: transparent transparent #ccba00 #ccba00 !important; } .button.is-warning.is-outlined[disabled], fieldset[disabled] .button.is-warning.is-outlined { background-color: transparent; border-color: #ccba00; box-shadow: none; color: #ccba00; } .button.is-warning.is-inverted.is-outlined { background-color: transparent; border-color: rgba(0, 0, 0, 0.7); color: rgba(0, 0, 0, 0.7); } .button.is-warning.is-inverted.is-outlined:hover, .button.is-warning.is-inverted.is-outlined:focus { background-color: rgba(0, 0, 0, 0.7); color: #ccba00; } .button.is-warning.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-warning.is-inverted.is-outlined { background-color: transparent; border-color: rgba(0, 0, 0, 0.7); box-shadow: none; color: rgba(0, 0, 0, 0.7); } .button.is-danger { background-color: #ee1742; border-color: transparent; color: #fff; } .button.is-danger:hover, .button.is-danger.is-hovered { background-color: #e6113c; border-color: transparent; color: #fff; } .button.is-danger:focus, .button.is-danger.is-focused { border-color: transparent; color: #fff; } .button.is-danger:focus:not(:active), .button.is-danger.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(238, 23, 66, 0.25); } .button.is-danger:active, .button.is-danger.is-active { background-color: #da1039; border-color: transparent; color: #fff; } .button.is-danger[disabled], fieldset[disabled] .button.is-danger { background-color: #ee1742; border-color: transparent; box-shadow: none; } .button.is-danger.is-inverted { background-color: #fff; color: #ee1742; } .button.is-danger.is-inverted:hover { background-color: #f2f2f2; } .button.is-danger.is-inverted[disabled], fieldset[disabled] .button.is-danger.is-inverted { background-color: #fff; border-color: transparent; box-shadow: none; color: #ee1742; } .button.is-danger.is-loading::after { border-color: transparent transparent #fff #fff !important; } .button.is-danger.is-outlined { background-color: transparent; border-color: #ee1742; color: #ee1742; } .button.is-danger.is-outlined:hover, .button.is-danger.is-outlined:focus { background-color: #ee1742; border-color: #ee1742; color: #fff; } .button.is-danger.is-outlined.is-loading::after { border-color: transparent transparent #ee1742 #ee1742 !important; } .button.is-danger.is-outlined[disabled], fieldset[disabled] .button.is-danger.is-outlined { background-color: transparent; border-color: #ee1742; box-shadow: none; color: #ee1742; } .button.is-danger.is-inverted.is-outlined { background-color: transparent; border-color: #fff; color: #fff; } .button.is-danger.is-inverted.is-outlined:hover, .button.is-danger.is-inverted.is-outlined:focus { background-color: #fff; color: #ee1742; } .button.is-danger.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-danger.is-inverted.is-outlined { background-color: transparent; border-color: #fff; box-shadow: none; color: #fff; } .button.is-white-dark { background-color: white; border-color: transparent; color: #0a0a0a; } .button.is-white-dark:hover, .button.is-white-dark.is-hovered { background-color: #f9f9f9; border-color: transparent; color: #0a0a0a; } .button.is-white-dark:focus, .button.is-white-dark.is-focused { border-color: transparent; color: #0a0a0a; } .button.is-white-dark:focus:not(:active), .button.is-white-dark.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(255, 255, 255, 0.25); } .button.is-white-dark:active, .button.is-white-dark.is-active { background-color: #f2f2f2; border-color: transparent; color: #0a0a0a; } .button.is-white-dark[disabled], fieldset[disabled] .button.is-white-dark { background-color: white; border-color: transparent; box-shadow: none; } .button.is-white-dark.is-inverted { background-color: #0a0a0a; color: white; } .button.is-white-dark.is-inverted:hover { background-color: black; } .button.is-white-dark.is-inverted[disabled], fieldset[disabled] .button.is-white-dark.is-inverted { background-color: #0a0a0a; border-color: transparent; box-shadow: none; color: white; } .button.is-white-dark.is-loading::after { border-color: transparent transparent #0a0a0a #0a0a0a !important; } .button.is-white-dark.is-outlined { background-color: transparent; border-color: white; color: white; } .button.is-white-dark.is-outlined:hover, .button.is-white-dark.is-outlined:focus { background-color: white; border-color: white; color: #0a0a0a; } .button.is-white-dark.is-outlined.is-loading::after { border-color: transparent transparent white white !important; } .button.is-white-dark.is-outlined[disabled], fieldset[disabled] .button.is-white-dark.is-outlined { background-color: transparent; border-color: white; box-shadow: none; color: white; } .button.is-white-dark.is-inverted.is-outlined { background-color: transparent; border-color: #0a0a0a; color: #0a0a0a; } .button.is-white-dark.is-inverted.is-outlined:hover, .button.is-white-dark.is-inverted.is-outlined:focus { background-color: #0a0a0a; color: white; } .button.is-white-dark.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-white-dark.is-inverted.is-outlined { background-color: transparent; border-color: #0a0a0a; box-shadow: none; color: #0a0a0a; } .button.is-black-dark { background-color: #0a0a0a; border-color: transparent; color: white; } .button.is-black-dark:hover, .button.is-black-dark.is-hovered { background-color: #040404; border-color: transparent; color: white; } .button.is-black-dark:focus, .button.is-black-dark.is-focused { border-color: transparent; color: white; } .button.is-black-dark:focus:not(:active), .button.is-black-dark.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(10, 10, 10, 0.25); } .button.is-black-dark:active, .button.is-black-dark.is-active { background-color: black; border-color: transparent; color: white; } .button.is-black-dark[disabled], fieldset[disabled] .button.is-black-dark { background-color: #0a0a0a; border-color: transparent; box-shadow: none; } .button.is-black-dark.is-inverted { background-color: white; color: #0a0a0a; } .button.is-black-dark.is-inverted:hover { background-color: #f2f2f2; } .button.is-black-dark.is-inverted[disabled], fieldset[disabled] .button.is-black-dark.is-inverted { background-color: white; border-color: transparent; box-shadow: none; color: #0a0a0a; } .button.is-black-dark.is-loading::after { border-color: transparent transparent white white !important; } .button.is-black-dark.is-outlined { background-color: transparent; border-color: #0a0a0a; color: #0a0a0a; } .button.is-black-dark.is-outlined:hover, .button.is-black-dark.is-outlined:focus { background-color: #0a0a0a; border-color: #0a0a0a; color: white; } .button.is-black-dark.is-outlined.is-loading::after { border-color: transparent transparent #0a0a0a #0a0a0a !important; } .button.is-black-dark.is-outlined[disabled], fieldset[disabled] .button.is-black-dark.is-outlined { background-color: transparent; border-color: #0a0a0a; box-shadow: none; color: #0a0a0a; } .button.is-black-dark.is-inverted.is-outlined { background-color: transparent; border-color: white; color: white; } .button.is-black-dark.is-inverted.is-outlined:hover, .button.is-black-dark.is-inverted.is-outlined:focus { background-color: white; color: #0a0a0a; } .button.is-black-dark.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-black-dark.is-inverted.is-outlined { background-color: transparent; border-color: white; box-shadow: none; color: white; } .button.is-light-dark { background-color: whitesmoke; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-light-dark:hover, .button.is-light-dark.is-hovered { background-color: #eeeeee; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-light-dark:focus, .button.is-light-dark.is-focused { border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-light-dark:focus:not(:active), .button.is-light-dark.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(245, 245, 245, 0.25); } .button.is-light-dark:active, .button.is-light-dark.is-active { background-color: #e8e8e8; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-light-dark[disabled], fieldset[disabled] .button.is-light-dark { background-color: whitesmoke; border-color: transparent; box-shadow: none; } .button.is-light-dark.is-inverted { background-color: rgba(0, 0, 0, 0.7); color: whitesmoke; } .button.is-light-dark.is-inverted:hover { background-color: rgba(0, 0, 0, 0.7); } .button.is-light-dark.is-inverted[disabled], fieldset[disabled] .button.is-light-dark.is-inverted { background-color: rgba(0, 0, 0, 0.7); border-color: transparent; box-shadow: none; color: whitesmoke; } .button.is-light-dark.is-loading::after { border-color: transparent transparent rgba(0, 0, 0, 0.7) rgba(0, 0, 0, 0.7) !important; } .button.is-light-dark.is-outlined { background-color: transparent; border-color: whitesmoke; color: whitesmoke; } .button.is-light-dark.is-outlined:hover, .button.is-light-dark.is-outlined:focus { background-color: whitesmoke; border-color: whitesmoke; color: rgba(0, 0, 0, 0.7); } .button.is-light-dark.is-outlined.is-loading::after { border-color: transparent transparent whitesmoke whitesmoke !important; } .button.is-light-dark.is-outlined[disabled], fieldset[disabled] .button.is-light-dark.is-outlined { background-color: transparent; border-color: whitesmoke; box-shadow: none; color: whitesmoke; } .button.is-light-dark.is-inverted.is-outlined { background-color: transparent; border-color: rgba(0, 0, 0, 0.7); color: rgba(0, 0, 0, 0.7); } .button.is-light-dark.is-inverted.is-outlined:hover, .button.is-light-dark.is-inverted.is-outlined:focus { background-color: rgba(0, 0, 0, 0.7); color: whitesmoke; } .button.is-light-dark.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-light-dark.is-inverted.is-outlined { background-color: transparent; border-color: rgba(0, 0, 0, 0.7); box-shadow: none; color: rgba(0, 0, 0, 0.7); } .button.is-dark-dark { background-color: #363636; border-color: transparent; color: #fff; } .button.is-dark-dark:hover, .button.is-dark-dark.is-hovered { background-color: #2f2f2f; border-color: transparent; color: #fff; } .button.is-dark-dark:focus, .button.is-dark-dark.is-focused { border-color: transparent; color: #fff; } .button.is-dark-dark:focus:not(:active), .button.is-dark-dark.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(54, 54, 54, 0.25); } .button.is-dark-dark:active, .button.is-dark-dark.is-active { background-color: #292929; border-color: transparent; color: #fff; } .button.is-dark-dark[disabled], fieldset[disabled] .button.is-dark-dark { background-color: #363636; border-color: transparent; box-shadow: none; } .button.is-dark-dark.is-inverted { background-color: #fff; color: #363636; } .button.is-dark-dark.is-inverted:hover { background-color: #f2f2f2; } .button.is-dark-dark.is-inverted[disabled], fieldset[disabled] .button.is-dark-dark.is-inverted { background-color: #fff; border-color: transparent; box-shadow: none; color: #363636; } .button.is-dark-dark.is-loading::after { border-color: transparent transparent #fff #fff !important; } .button.is-dark-dark.is-outlined { background-color: transparent; border-color: #363636; color: #363636; } .button.is-dark-dark.is-outlined:hover, .button.is-dark-dark.is-outlined:focus { background-color: #363636; border-color: #363636; color: #fff; } .button.is-dark-dark.is-outlined.is-loading::after { border-color: transparent transparent #363636 #363636 !important; } .button.is-dark-dark.is-outlined[disabled], fieldset[disabled] .button.is-dark-dark.is-outlined { background-color: transparent; border-color: #363636; box-shadow: none; color: #363636; } .button.is-dark-dark.is-inverted.is-outlined { background-color: transparent; border-color: #fff; color: #fff; } .button.is-dark-dark.is-inverted.is-outlined:hover, .button.is-dark-dark.is-inverted.is-outlined:focus { background-color: #fff; color: #363636; } .button.is-dark-dark.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-dark-dark.is-inverted.is-outlined { background-color: transparent; border-color: #fff; box-shadow: none; color: #fff; } .button.is-primary-dark { background-color: #ff0d68; border-color: transparent; color: #fff; } .button.is-primary-dark:hover, .button.is-primary-dark.is-hovered { background-color: #ff0060; border-color: transparent; color: #fff; } .button.is-primary-dark:focus, .button.is-primary-dark.is-focused { border-color: transparent; color: #fff; } .button.is-primary-dark:focus:not(:active), .button.is-primary-dark.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(255, 13, 104, 0.25); } .button.is-primary-dark:active, .button.is-primary-dark.is-active { background-color: #f3005b; border-color: transparent; color: #fff; } .button.is-primary-dark[disabled], fieldset[disabled] .button.is-primary-dark { background-color: #ff0d68; border-color: transparent; box-shadow: none; } .button.is-primary-dark.is-inverted { background-color: #fff; color: #ff0d68; } .button.is-primary-dark.is-inverted:hover { background-color: #f2f2f2; } .button.is-primary-dark.is-inverted[disabled], fieldset[disabled] .button.is-primary-dark.is-inverted { background-color: #fff; border-color: transparent; box-shadow: none; color: #ff0d68; } .button.is-primary-dark.is-loading::after { border-color: transparent transparent #fff #fff !important; } .button.is-primary-dark.is-outlined { background-color: transparent; border-color: #ff0d68; color: #ff0d68; } .button.is-primary-dark.is-outlined:hover, .button.is-primary-dark.is-outlined:focus { background-color: #ff0d68; border-color: #ff0d68; color: #fff; } .button.is-primary-dark.is-outlined.is-loading::after { border-color: transparent transparent #ff0d68 #ff0d68 !important; } .button.is-primary-dark.is-outlined[disabled], fieldset[disabled] .button.is-primary-dark.is-outlined { background-color: transparent; border-color: #ff0d68; box-shadow: none; color: #ff0d68; } .button.is-primary-dark.is-inverted.is-outlined { background-color: transparent; border-color: #fff; color: #fff; } .button.is-primary-dark.is-inverted.is-outlined:hover, .button.is-primary-dark.is-inverted.is-outlined:focus { background-color: #fff; color: #ff0d68; } .button.is-primary-dark.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-primary-dark.is-inverted.is-outlined { background-color: transparent; border-color: #fff; box-shadow: none; color: #fff; } .button.is-link-dark { background-color: #ff0d68; border-color: transparent; color: #fff; } .button.is-link-dark:hover, .button.is-link-dark.is-hovered { background-color: #ff0060; border-color: transparent; color: #fff; } .button.is-link-dark:focus, .button.is-link-dark.is-focused { border-color: transparent; color: #fff; } .button.is-link-dark:focus:not(:active), .button.is-link-dark.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(255, 13, 104, 0.25); } .button.is-link-dark:active, .button.is-link-dark.is-active { background-color: #f3005b; border-color: transparent; color: #fff; } .button.is-link-dark[disabled], fieldset[disabled] .button.is-link-dark { background-color: #ff0d68; border-color: transparent; box-shadow: none; } .button.is-link-dark.is-inverted { background-color: #fff; color: #ff0d68; } .button.is-link-dark.is-inverted:hover { background-color: #f2f2f2; } .button.is-link-dark.is-inverted[disabled], fieldset[disabled] .button.is-link-dark.is-inverted { background-color: #fff; border-color: transparent; box-shadow: none; color: #ff0d68; } .button.is-link-dark.is-loading::after { border-color: transparent transparent #fff #fff !important; } .button.is-link-dark.is-outlined { background-color: transparent; border-color: #ff0d68; color: #ff0d68; } .button.is-link-dark.is-outlined:hover, .button.is-link-dark.is-outlined:focus { background-color: #ff0d68; border-color: #ff0d68; color: #fff; } .button.is-link-dark.is-outlined.is-loading::after { border-color: transparent transparent #ff0d68 #ff0d68 !important; } .button.is-link-dark.is-outlined[disabled], fieldset[disabled] .button.is-link-dark.is-outlined { background-color: transparent; border-color: #ff0d68; box-shadow: none; color: #ff0d68; } .button.is-link-dark.is-inverted.is-outlined { background-color: transparent; border-color: #fff; color: #fff; } .button.is-link-dark.is-inverted.is-outlined:hover, .button.is-link-dark.is-inverted.is-outlined:focus { background-color: #fff; color: #ff0d68; } .button.is-link-dark.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-link-dark.is-inverted.is-outlined { background-color: transparent; border-color: #fff; box-shadow: none; color: #fff; } .button.is-info-dark { background-color: #0092FF; border-color: transparent; color: #fff; } .button.is-info-dark:hover, .button.is-info-dark.is-hovered { background-color: #008bf2; border-color: transparent; color: #fff; } .button.is-info-dark:focus, .button.is-info-dark.is-focused { border-color: transparent; color: #fff; } .button.is-info-dark:focus:not(:active), .button.is-info-dark.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(0, 146, 255, 0.25); } .button.is-info-dark:active, .button.is-info-dark.is-active { background-color: #0083e6; border-color: transparent; color: #fff; } .button.is-info-dark[disabled], fieldset[disabled] .button.is-info-dark { background-color: #0092FF; border-color: transparent; box-shadow: none; } .button.is-info-dark.is-inverted { background-color: #fff; color: #0092FF; } .button.is-info-dark.is-inverted:hover { background-color: #f2f2f2; } .button.is-info-dark.is-inverted[disabled], fieldset[disabled] .button.is-info-dark.is-inverted { background-color: #fff; border-color: transparent; box-shadow: none; color: #0092FF; } .button.is-info-dark.is-loading::after { border-color: transparent transparent #fff #fff !important; } .button.is-info-dark.is-outlined { background-color: transparent; border-color: #0092FF; color: #0092FF; } .button.is-info-dark.is-outlined:hover, .button.is-info-dark.is-outlined:focus { background-color: #0092FF; border-color: #0092FF; color: #fff; } .button.is-info-dark.is-outlined.is-loading::after { border-color: transparent transparent #0092FF #0092FF !important; } .button.is-info-dark.is-outlined[disabled], fieldset[disabled] .button.is-info-dark.is-outlined { background-color: transparent; border-color: #0092FF; box-shadow: none; color: #0092FF; } .button.is-info-dark.is-inverted.is-outlined { background-color: transparent; border-color: #fff; color: #fff; } .button.is-info-dark.is-inverted.is-outlined:hover, .button.is-info-dark.is-inverted.is-outlined:focus { background-color: #fff; color: #0092FF; } .button.is-info-dark.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-info-dark.is-inverted.is-outlined { background-color: transparent; border-color: #fff; box-shadow: none; color: #fff; } .button.is-success-dark { background-color: #16DB93; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-success-dark:hover, .button.is-success-dark.is-hovered { background-color: #15cf8b; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-success-dark:focus, .button.is-success-dark.is-focused { border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-success-dark:focus:not(:active), .button.is-success-dark.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(22, 219, 147, 0.25); } .button.is-success-dark:active, .button.is-success-dark.is-active { background-color: #14c483; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-success-dark[disabled], fieldset[disabled] .button.is-success-dark { background-color: #16DB93; border-color: transparent; box-shadow: none; } .button.is-success-dark.is-inverted { background-color: rgba(0, 0, 0, 0.7); color: #16DB93; } .button.is-success-dark.is-inverted:hover { background-color: rgba(0, 0, 0, 0.7); } .button.is-success-dark.is-inverted[disabled], fieldset[disabled] .button.is-success-dark.is-inverted { background-color: rgba(0, 0, 0, 0.7); border-color: transparent; box-shadow: none; color: #16DB93; } .button.is-success-dark.is-loading::after { border-color: transparent transparent rgba(0, 0, 0, 0.7) rgba(0, 0, 0, 0.7) !important; } .button.is-success-dark.is-outlined { background-color: transparent; border-color: #16DB93; color: #16DB93; } .button.is-success-dark.is-outlined:hover, .button.is-success-dark.is-outlined:focus { background-color: #16DB93; border-color: #16DB93; color: rgba(0, 0, 0, 0.7); } .button.is-success-dark.is-outlined.is-loading::after { border-color: transparent transparent #16DB93 #16DB93 !important; } .button.is-success-dark.is-outlined[disabled], fieldset[disabled] .button.is-success-dark.is-outlined { background-color: transparent; border-color: #16DB93; box-shadow: none; color: #16DB93; } .button.is-success-dark.is-inverted.is-outlined { background-color: transparent; border-color: rgba(0, 0, 0, 0.7); color: rgba(0, 0, 0, 0.7); } .button.is-success-dark.is-inverted.is-outlined:hover, .button.is-success-dark.is-inverted.is-outlined:focus { background-color: rgba(0, 0, 0, 0.7); color: #16DB93; } .button.is-success-dark.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-success-dark.is-inverted.is-outlined { background-color: transparent; border-color: rgba(0, 0, 0, 0.7); box-shadow: none; color: rgba(0, 0, 0, 0.7); } .button.is-warning-dark { background-color: #FFE900; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-warning-dark:hover, .button.is-warning-dark.is-hovered { background-color: #f2dd00; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-warning-dark:focus, .button.is-warning-dark.is-focused { border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-warning-dark:focus:not(:active), .button.is-warning-dark.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(255, 233, 0, 0.25); } .button.is-warning-dark:active, .button.is-warning-dark.is-active { background-color: #e6d200; border-color: transparent; color: rgba(0, 0, 0, 0.7); } .button.is-warning-dark[disabled], fieldset[disabled] .button.is-warning-dark { background-color: #FFE900; border-color: transparent; box-shadow: none; } .button.is-warning-dark.is-inverted { background-color: rgba(0, 0, 0, 0.7); color: #FFE900; } .button.is-warning-dark.is-inverted:hover { background-color: rgba(0, 0, 0, 0.7); } .button.is-warning-dark.is-inverted[disabled], fieldset[disabled] .button.is-warning-dark.is-inverted { background-color: rgba(0, 0, 0, 0.7); border-color: transparent; box-shadow: none; color: #FFE900; } .button.is-warning-dark.is-loading::after { border-color: transparent transparent rgba(0, 0, 0, 0.7) rgba(0, 0, 0, 0.7) !important; } .button.is-warning-dark.is-outlined { background-color: transparent; border-color: #FFE900; color: #FFE900; } .button.is-warning-dark.is-outlined:hover, .button.is-warning-dark.is-outlined:focus { background-color: #FFE900; border-color: #FFE900; color: rgba(0, 0, 0, 0.7); } .button.is-warning-dark.is-outlined.is-loading::after { border-color: transparent transparent #FFE900 #FFE900 !important; } .button.is-warning-dark.is-outlined[disabled], fieldset[disabled] .button.is-warning-dark.is-outlined { background-color: transparent; border-color: #FFE900; box-shadow: none; color: #FFE900; } .button.is-warning-dark.is-inverted.is-outlined { background-color: transparent; border-color: rgba(0, 0, 0, 0.7); color: rgba(0, 0, 0, 0.7); } .button.is-warning-dark.is-inverted.is-outlined:hover, .button.is-warning-dark.is-inverted.is-outlined:focus { background-color: rgba(0, 0, 0, 0.7); color: #FFE900; } .button.is-warning-dark.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-warning-dark.is-inverted.is-outlined { background-color: transparent; border-color: rgba(0, 0, 0, 0.7); box-shadow: none; color: rgba(0, 0, 0, 0.7); } .button.is-danger-dark { background-color: #f14668; border-color: transparent; color: #fff; } .button.is-danger-dark:hover, .button.is-danger-dark.is-hovered { background-color: #f03a5f; border-color: transparent; color: #fff; } .button.is-danger-dark:focus, .button.is-danger-dark.is-focused { border-color: transparent; color: #fff; } .button.is-danger-dark:focus:not(:active), .button.is-danger-dark.is-focused:not(:active) { box-shadow: 0 0 0 0.125em rgba(241, 70, 104, 0.25); } .button.is-danger-dark:active, .button.is-danger-dark.is-active { background-color: #ef2e55; border-color: transparent; color: #fff; } .button.is-danger-dark[disabled], fieldset[disabled] .button.is-danger-dark { background-color: #f14668; border-color: transparent; box-shadow: none; } .button.is-danger-dark.is-inverted { background-color: #fff; color: #f14668; } .button.is-danger-dark.is-inverted:hover { background-color: #f2f2f2; } .button.is-danger-dark.is-inverted[disabled], fieldset[disabled] .button.is-danger-dark.is-inverted { background-color: #fff; border-color: transparent; box-shadow: none; color: #f14668; } .button.is-danger-dark.is-loading::after { border-color: transparent transparent #fff #fff !important; } .button.is-danger-dark.is-outlined { background-color: transparent; border-color: #f14668; color: #f14668; } .button.is-danger-dark.is-outlined:hover, .button.is-danger-dark.is-outlined:focus { background-color: #f14668; border-color: #f14668; color: #fff; } .button.is-danger-dark.is-outlined.is-loading::after { border-color: transparent transparent #f14668 #f14668 !important; } .button.is-danger-dark.is-outlined[disabled], fieldset[disabled] .button.is-danger-dark.is-outlined { background-color: transparent; border-color: #f14668; box-shadow: none; color: #f14668; } .button.is-danger-dark.is-inverted.is-outlined { background-color: transparent; border-color: #fff; color: #fff; } .button.is-danger-dark.is-inverted.is-outlined:hover, .button.is-danger-dark.is-inverted.is-outlined:focus { background-color: #fff; color: #f14668; } .button.is-danger-dark.is-inverted.is-outlined[disabled], fieldset[disabled] .button.is-danger-dark.is-inverted.is-outlined { background-color: transparent; border-color: #fff; box-shadow: none; color: #fff; } .button[disabled], fieldset[disabled] .button { background-color: #0a0a0a; border-color: #363636; } .button.is-static { background-color: whitesmoke; border-color: #363636; color: #7a7a7a; } .content h1, .content h2, .content h3, .content h4, .content h5, .content h6 { color: #dbdbdb; } .content blockquote { background-color: #242424; border-left: 5px solid #363636; } .content table td, .content table th { border: 1px solid #363636; } .content table th { color: #dbdbdb; } .content table thead td, .content table thead th { color: #dbdbdb; } .content table tfoot td, .content table tfoot th { color: #dbdbdb; } .input, .textarea { background-color: #0a0a0a; border-color: #363636; color: #dbdbdb; box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.1); } .input::-moz-placeholder, .textarea::-moz-placeholder { color: rgba(219, 219, 219, 0.3); } .input::-webkit-input-placeholder, .textarea::-webkit-input-placeholder { color: rgba(219, 219, 219, 0.3); } .input:-moz-placeholder, .textarea:-moz-placeholder { color: rgba(219, 219, 219, 0.3); } .input:-ms-input-placeholder, .textarea:-ms-input-placeholder { color: rgba(219, 219, 219, 0.3); } .input:hover, .input.is-hovered, .textarea:hover, .textarea.is-hovered { border-color: #4a4a4a; } .input:focus, .input.is-focused, .input:active, .input.is-active, .textarea:focus, .textarea.is-focused, .textarea:active, .textarea.is-active { border-color: #e60056; box-shadow: 0 0 0 0.125em rgba(230, 0, 86, 0.25); } .input[disabled], fieldset[disabled] .input, .textarea[disabled], fieldset[disabled] .textarea { background-color: #242424; border-color: #242424; color: #b5b5b5; } .input[disabled]::-moz-placeholder, fieldset[disabled] .input::-moz-placeholder, .textarea[disabled]::-moz-placeholder, fieldset[disabled] .textarea::-moz-placeholder { color: rgba(181, 181, 181, 0.3); } .input[disabled]::-webkit-input-placeholder, fieldset[disabled] .input::-webkit-input-placeholder, .textarea[disabled]::-webkit-input-placeholder, fieldset[disabled] .textarea::-webkit-input-placeholder { color: rgba(181, 181, 181, 0.3); } .input[disabled]:-moz-placeholder, fieldset[disabled] .input:-moz-placeholder, .textarea[disabled]:-moz-placeholder, fieldset[disabled] .textarea:-moz-placeholder { color: rgba(181, 181, 181, 0.3); } .input[disabled]:-ms-input-placeholder, fieldset[disabled] .input:-ms-input-placeholder, .textarea[disabled]:-ms-input-placeholder, fieldset[disabled] .textarea:-ms-input-placeholder { color: rgba(181, 181, 181, 0.3); } .input.is-white, .textarea.is-white { border-color: #e6e6e6; } .input.is-white:focus, .input.is-white.is-focused, .input.is-white:active, .input.is-white.is-active, .textarea.is-white:focus, .textarea.is-white.is-focused, .textarea.is-white:active, .textarea.is-white.is-active { box-shadow: 0 0 0 0.125em rgba(230, 230, 230, 0.25); } .input.is-black, .textarea.is-black { border-color: black; } .input.is-black:focus, .input.is-black.is-focused, .input.is-black:active, .input.is-black.is-active, .textarea.is-black:focus, .textarea.is-black.is-focused, .textarea.is-black:active, .textarea.is-black.is-active { box-shadow: 0 0 0 0.125em rgba(0, 0, 0, 0.25); } .input.is-light, .textarea.is-light { border-color: #dbdbdb; } .input.is-light:focus, .input.is-light.is-focused, .input.is-light:active, .input.is-light.is-active, .textarea.is-light:focus, .textarea.is-light.is-focused, .textarea.is-light:active, .textarea.is-light.is-active { box-shadow: 0 0 0 0.125em rgba(219, 219, 219, 0.25); } .input.is-dark, .textarea.is-dark { border-color: #1c1c1c; } .input.is-dark:focus, .input.is-dark.is-focused, .input.is-dark:active, .input.is-dark.is-active, .textarea.is-dark:focus, .textarea.is-dark.is-focused, .textarea.is-dark:active, .textarea.is-dark.is-active { box-shadow: 0 0 0 0.125em rgba(28, 28, 28, 0.25); } .input.is-primary, .textarea.is-primary { border-color: #d90052; } .input.is-primary:focus, .input.is-primary.is-focused, .input.is-primary:active, .input.is-primary.is-active, .textarea.is-primary:focus, .textarea.is-primary.is-focused, .textarea.is-primary:active, .textarea.is-primary.is-active { box-shadow: 0 0 0 0.125em rgba(217, 0, 82, 0.25); } .input.is-link, .textarea.is-link { border-color: #d90052; } .input.is-link:focus, .input.is-link.is-focused, .input.is-link:active, .input.is-link.is-active, .textarea.is-link:focus, .textarea.is-link.is-focused, .textarea.is-link:active, .textarea.is-link.is-active { box-shadow: 0 0 0 0.125em rgba(217, 0, 82, 0.25); } .input.is-info, .textarea.is-info { border-color: #0075cc; } .input.is-info:focus, .input.is-info.is-focused, .input.is-info:active, .input.is-info.is-active, .textarea.is-info:focus, .textarea.is-info.is-focused, .textarea.is-info:active, .textarea.is-info.is-active { box-shadow: 0 0 0 0.125em rgba(0, 117, 204, 0.25); } .input.is-success, .textarea.is-success { border-color: #11ad74; } .input.is-success:focus, .input.is-success.is-focused, .input.is-success:active, .input.is-success.is-active, .textarea.is-success:focus, .textarea.is-success.is-focused, .textarea.is-success:active, .textarea.is-success.is-active { box-shadow: 0 0 0 0.125em rgba(17, 173, 116, 0.25); } .input.is-warning, .textarea.is-warning { border-color: #ccba00; } .input.is-warning:focus, .input.is-warning.is-focused, .input.is-warning:active, .input.is-warning.is-active, .textarea.is-warning:focus, .textarea.is-warning.is-focused, .textarea.is-warning:active, .textarea.is-warning.is-active { box-shadow: 0 0 0 0.125em rgba(204, 186, 0, 0.25); } .input.is-danger, .textarea.is-danger { border-color: #ee1742; } .input.is-danger:focus, .input.is-danger.is-focused, .input.is-danger:active, .input.is-danger.is-active, .textarea.is-danger:focus, .textarea.is-danger.is-focused, .textarea.is-danger:active, .textarea.is-danger.is-active { box-shadow: 0 0 0 0.125em rgba(238, 23, 66, 0.25); } .input.is-white-dark, .textarea.is-white-dark { border-color: white; } .input.is-white-dark:focus, .input.is-white-dark.is-focused, .input.is-white-dark:active, .input.is-white-dark.is-active, .textarea.is-white-dark:focus, .textarea.is-white-dark.is-focused, .textarea.is-white-dark:active, .textarea.is-white-dark.is-active { box-shadow: 0 0 0 0.125em rgba(255, 255, 255, 0.25); } .input.is-black-dark, .textarea.is-black-dark { border-color: #0a0a0a; } .input.is-black-dark:focus, .input.is-black-dark.is-focused, .input.is-black-dark:active, .input.is-black-dark.is-active, .textarea.is-black-dark:focus, .textarea.is-black-dark.is-focused, .textarea.is-black-dark:active, .textarea.is-black-dark.is-active { box-shadow: 0 0 0 0.125em rgba(10, 10, 10, 0.25); } .input.is-light-dark, .textarea.is-light-dark { border-color: whitesmoke; } .input.is-light-dark:focus, .input.is-light-dark.is-focused, .input.is-light-dark:active, .input.is-light-dark.is-active, .textarea.is-light-dark:focus, .textarea.is-light-dark.is-focused, .textarea.is-light-dark:active, .textarea.is-light-dark.is-active { box-shadow: 0 0 0 0.125em rgba(245, 245, 245, 0.25); } .input.is-dark-dark, .textarea.is-dark-dark { border-color: #363636; } .input.is-dark-dark:focus, .input.is-dark-dark.is-focused, .input.is-dark-dark:active, .input.is-dark-dark.is-active, .textarea.is-dark-dark:focus, .textarea.is-dark-dark.is-focused, .textarea.is-dark-dark:active, .textarea.is-dark-dark.is-active { box-shadow: 0 0 0 0.125em rgba(54, 54, 54, 0.25); } .input.is-primary-dark, .textarea.is-primary-dark { border-color: #ff0d68; } .input.is-primary-dark:focus, .input.is-primary-dark.is-focused, .input.is-primary-dark:active, .input.is-primary-dark.is-active, .textarea.is-primary-dark:focus, .textarea.is-primary-dark.is-focused, .textarea.is-primary-dark:active, .textarea.is-primary-dark.is-active { box-shadow: 0 0 0 0.125em rgba(255, 13, 104, 0.25); } .input.is-link-dark, .textarea.is-link-dark { border-color: #ff0d68; } .input.is-link-dark:focus, .input.is-link-dark.is-focused, .input.is-link-dark:active, .input.is-link-dark.is-active, .textarea.is-link-dark:focus, .textarea.is-link-dark.is-focused, .textarea.is-link-dark:active, .textarea.is-link-dark.is-active { box-shadow: 0 0 0 0.125em rgba(255, 13, 104, 0.25); } .input.is-info-dark, .textarea.is-info-dark { border-color: #0092FF; } .input.is-info-dark:focus, .input.is-info-dark.is-focused, .input.is-info-dark:active, .input.is-info-dark.is-active, .textarea.is-info-dark:focus, .textarea.is-info-dark.is-focused, .textarea.is-info-dark:active, .textarea.is-info-dark.is-active { box-shadow: 0 0 0 0.125em rgba(0, 146, 255, 0.25); } .input.is-success-dark, .textarea.is-success-dark { border-color: #16DB93; } .input.is-success-dark:focus, .input.is-success-dark.is-focused, .input.is-success-dark:active, .input.is-success-dark.is-active, .textarea.is-success-dark:focus, .textarea.is-success-dark.is-focused, .textarea.is-success-dark:active, .textarea.is-success-dark.is-active { box-shadow: 0 0 0 0.125em rgba(22, 219, 147, 0.25); } .input.is-warning-dark, .textarea.is-warning-dark { border-color: #FFE900; } .input.is-warning-dark:focus, .input.is-warning-dark.is-focused, .input.is-warning-dark:active, .input.is-warning-dark.is-active, .textarea.is-warning-dark:focus, .textarea.is-warning-dark.is-focused, .textarea.is-warning-dark:active, .textarea.is-warning-dark.is-active { box-shadow: 0 0 0 0.125em rgba(255, 233, 0, 0.25); } .input.is-danger-dark, .textarea.is-danger-dark { border-color: #f14668; } .input.is-danger-dark:focus, .input.is-danger-dark.is-focused, .input.is-danger-dark:active, .input.is-danger-dark.is-active, .textarea.is-danger-dark:focus, .textarea.is-danger-dark.is-focused, .textarea.is-danger-dark:active, .textarea.is-danger-dark.is-active { box-shadow: 0 0 0 0.125em rgba(241, 70, 104, 0.25); } .checkbox:hover, .radio:hover { color: #dbdbdb; } .checkbox[disabled], fieldset[disabled] .checkbox, .radio[disabled], fieldset[disabled] .radio { color: #b5b5b5; } .select:not(.is-multiple):not(.is-loading)::after { border-color: #e60056; } .select select { background-color: #0a0a0a; border-color: #363636; color: #dbdbdb; } .select select::-moz-placeholder { color: rgba(219, 219, 219, 0.3); } .select select::-webkit-input-placeholder { color: rgba(219, 219, 219, 0.3); } .select select:-moz-placeholder { color: rgba(219, 219, 219, 0.3); } .select select:-ms-input-placeholder { color: rgba(219, 219, 219, 0.3); } .select select:hover, .select select.is-hovered { border-color: #4a4a4a; } .select select:focus, .select select.is-focused, .select select:active, .select select.is-active { border-color: #e60056; box-shadow: 0 0 0 0.125em rgba(230, 0, 86, 0.25); } .select select[disabled], fieldset[disabled] .select select { background-color: #242424; border-color: #242424; color: #b5b5b5; } .select select[disabled]::-moz-placeholder, fieldset[disabled] .select select::-moz-placeholder { color: rgba(181, 181, 181, 0.3); } .select select[disabled]::-webkit-input-placeholder, fieldset[disabled] .select select::-webkit-input-placeholder { color: rgba(181, 181, 181, 0.3); } .select select[disabled]:-moz-placeholder, fieldset[disabled] .select select:-moz-placeholder { color: rgba(181, 181, 181, 0.3); } .select select[disabled]:-ms-input-placeholder, fieldset[disabled] .select select:-ms-input-placeholder { color: rgba(181, 181, 181, 0.3); } .select select[disabled]:hover, fieldset[disabled] .select select:hover { border-color: #242424; } .select select option { color: #dbdbdb; } .select:not(.is-multiple):not(.is-loading):hover::after { border-color: #dbdbdb; } .select.is-white:not(:hover)::after { border-color: #e6e6e6; } .select.is-white select { border-color: #e6e6e6; } .select.is-white select:hover, .select.is-white select.is-hovered { border-color: #d9d9d9; } .select.is-white select:focus, .select.is-white select.is-focused, .select.is-white select:active, .select.is-white select.is-active { box-shadow: 0 0 0 0.125em rgba(230, 230, 230, 0.25); } .select.is-black:not(:hover)::after { border-color: black; } .select.is-black select { border-color: black; } .select.is-black select:hover, .select.is-black select.is-hovered { border-color: black; } .select.is-black select:focus, .select.is-black select.is-focused, .select.is-black select:active, .select.is-black select.is-active { box-shadow: 0 0 0 0.125em rgba(0, 0, 0, 0.25); } .select.is-light:not(:hover)::after { border-color: #dbdbdb; } .select.is-light select { border-color: #dbdbdb; } .select.is-light select:hover, .select.is-light select.is-hovered { border-color: #cfcfcf; } .select.is-light select:focus, .select.is-light select.is-focused, .select.is-light select:active, .select.is-light select.is-active { box-shadow: 0 0 0 0.125em rgba(219, 219, 219, 0.25); } .select.is-dark:not(:hover)::after { border-color: #1c1c1c; } .select.is-dark select { border-color: #1c1c1c; } .select.is-dark select:hover, .select.is-dark select.is-hovered { border-color: #0f0f0f; } .select.is-dark select:focus, .select.is-dark select.is-focused, .select.is-dark select:active, .select.is-dark select.is-active { box-shadow: 0 0 0 0.125em rgba(28, 28, 28, 0.25); } .select.is-primary:not(:hover)::after { border-color: #d90052; } .select.is-primary select { border-color: #d90052; } .select.is-primary select:hover, .select.is-primary select.is-hovered { border-color: #c00048; } .select.is-primary select:focus, .select.is-primary select.is-focused, .select.is-primary select:active, .select.is-primary select.is-active { box-shadow: 0 0 0 0.125em rgba(217, 0, 82, 0.25); } .select.is-link:not(:hover)::after { border-color: #d90052; } .select.is-link select { border-color: #d90052; } .select.is-link select:hover, .select.is-link select.is-hovered { border-color: #c00048; } .select.is-link select:focus, .select.is-link select.is-focused, .select.is-link select:active, .select.is-link select.is-active { box-shadow: 0 0 0 0.125em rgba(217, 0, 82, 0.25); } .select.is-info:not(:hover)::after { border-color: #0075cc; } .select.is-info select { border-color: #0075cc; } .select.is-info select:hover, .select.is-info select.is-hovered { border-color: #0066b3; } .select.is-info select:focus, .select.is-info select.is-focused, .select.is-info select:active, .select.is-info select.is-active { box-shadow: 0 0 0 0.125em rgba(0, 117, 204, 0.25); } .select.is-success:not(:hover)::after { border-color: #11ad74; } .select.is-success select { border-color: #11ad74; } .select.is-success select:hover, .select.is-success select.is-hovered { border-color: #0f9564; } .select.is-success select:focus, .select.is-success select.is-focused, .select.is-success select:active, .select.is-success select.is-active { box-shadow: 0 0 0 0.125em rgba(17, 173, 116, 0.25); } .select.is-warning:not(:hover)::after { border-color: #ccba00; } .select.is-warning select { border-color: #ccba00; } .select.is-warning select:hover, .select.is-warning select.is-hovered { border-color: #b3a300; } .select.is-warning select:focus, .select.is-warning select.is-focused, .select.is-warning select:active, .select.is-warning select.is-active { box-shadow: 0 0 0 0.125em rgba(204, 186, 0, 0.25); } .select.is-danger:not(:hover)::after { border-color: #ee1742; } .select.is-danger select { border-color: #ee1742; } .select.is-danger select:hover, .select.is-danger select.is-hovered { border-color: #da1039; } .select.is-danger select:focus, .select.is-danger select.is-focused, .select.is-danger select:active, .select.is-danger select.is-active { box-shadow: 0 0 0 0.125em rgba(238, 23, 66, 0.25); } .select.is-white-dark:not(:hover)::after { border-color: white; } .select.is-white-dark select { border-color: white; } .select.is-white-dark select:hover, .select.is-white-dark select.is-hovered { border-color: #f2f2f2; } .select.is-white-dark select:focus, .select.is-white-dark select.is-focused, .select.is-white-dark select:active, .select.is-white-dark select.is-active { box-shadow: 0 0 0 0.125em rgba(255, 255, 255, 0.25); } .select.is-black-dark:not(:hover)::after { border-color: #0a0a0a; } .select.is-black-dark select { border-color: #0a0a0a; } .select.is-black-dark select:hover, .select.is-black-dark select.is-hovered { border-color: black; } .select.is-black-dark select:focus, .select.is-black-dark select.is-focused, .select.is-black-dark select:active, .select.is-black-dark select.is-active { box-shadow: 0 0 0 0.125em rgba(10, 10, 10, 0.25); } .select.is-light-dark:not(:hover)::after { border-color: whitesmoke; } .select.is-light-dark select { border-color: whitesmoke; } .select.is-light-dark select:hover, .select.is-light-dark select.is-hovered { border-color: #e8e8e8; } .select.is-light-dark select:focus, .select.is-light-dark select.is-focused, .select.is-light-dark select:active, .select.is-light-dark select.is-active { box-shadow: 0 0 0 0.125em rgba(245, 245, 245, 0.25); } .select.is-dark-dark:not(:hover)::after { border-color: #363636; } .select.is-dark-dark select { border-color: #363636; } .select.is-dark-dark select:hover, .select.is-dark-dark select.is-hovered { border-color: #292929; } .select.is-dark-dark select:focus, .select.is-dark-dark select.is-focused, .select.is-dark-dark select:active, .select.is-dark-dark select.is-active { box-shadow: 0 0 0 0.125em rgba(54, 54, 54, 0.25); } .select.is-primary-dark:not(:hover)::after { border-color: #ff0d68; } .select.is-primary-dark select { border-color: #ff0d68; } .select.is-primary-dark select:hover, .select.is-primary-dark select.is-hovered { border-color: #f3005b; } .select.is-primary-dark select:focus, .select.is-primary-dark select.is-focused, .select.is-primary-dark select:active, .select.is-primary-dark select.is-active { box-shadow: 0 0 0 0.125em rgba(255, 13, 104, 0.25); } .select.is-link-dark:not(:hover)::after { border-color: #ff0d68; } .select.is-link-dark select { border-color: #ff0d68; } .select.is-link-dark select:hover, .select.is-link-dark select.is-hovered { border-color: #f3005b; } .select.is-link-dark select:focus, .select.is-link-dark select.is-focused, .select.is-link-dark select:active, .select.is-link-dark select.is-active { box-shadow: 0 0 0 0.125em rgba(255, 13, 104, 0.25); } .select.is-info-dark:not(:hover)::after { border-color: #0092FF; } .select.is-info-dark select { border-color: #0092FF; } .select.is-info-dark select:hover, .select.is-info-dark select.is-hovered { border-color: #0083e6; } .select.is-info-dark select:focus, .select.is-info-dark select.is-focused, .select.is-info-dark select:active, .select.is-info-dark select.is-active { box-shadow: 0 0 0 0.125em rgba(0, 146, 255, 0.25); } .select.is-success-dark:not(:hover)::after { border-color: #16DB93; } .select.is-success-dark select { border-color: #16DB93; } .select.is-success-dark select:hover, .select.is-success-dark select.is-hovered { border-color: #14c483; } .select.is-success-dark select:focus, .select.is-success-dark select.is-focused, .select.is-success-dark select:active, .select.is-success-dark select.is-active { box-shadow: 0 0 0 0.125em rgba(22, 219, 147, 0.25); } .select.is-warning-dark:not(:hover)::after { border-color: #FFE900; } .select.is-warning-dark select { border-color: #FFE900; } .select.is-warning-dark select:hover, .select.is-warning-dark select.is-hovered { border-color: #e6d200; } .select.is-warning-dark select:focus, .select.is-warning-dark select.is-focused, .select.is-warning-dark select:active, .select.is-warning-dark select.is-active { box-shadow: 0 0 0 0.125em rgba(255, 233, 0, 0.25); } .select.is-danger-dark:not(:hover)::after { border-color: #f14668; } .select.is-danger-dark select { border-color: #f14668; } .select.is-danger-dark select:hover, .select.is-danger-dark select.is-hovered { border-color: #ef2e55; } .select.is-danger-dark select:focus, .select.is-danger-dark select.is-focused, .select.is-danger-dark select:active, .select.is-danger-dark select.is-active { box-shadow: 0 0 0 0.125em rgba(241, 70, 104, 0.25); } .select.is-disabled::after { border-color: #b5b5b5; } .file.is-white .file-cta { background-color: #e6e6e6; color: #0a0a0a; } .file.is-white:hover .file-cta, .file.is-white.is-hovered .file-cta { background-color: #dfdfdf; color: #0a0a0a; } .file.is-white:focus .file-cta, .file.is-white.is-focused .file-cta { box-shadow: 0 0 0.5em rgba(230, 230, 230, 0.25); color: #0a0a0a; } .file.is-white:active .file-cta, .file.is-white.is-active .file-cta { background-color: #d9d9d9; color: #0a0a0a; } .file.is-black .file-cta { background-color: black; color: white; } .file.is-black:hover .file-cta, .file.is-black.is-hovered .file-cta { background-color: black; color: white; } .file.is-black:focus .file-cta, .file.is-black.is-focused .file-cta { box-shadow: 0 0 0.5em rgba(0, 0, 0, 0.25); color: white; } .file.is-black:active .file-cta, .file.is-black.is-active .file-cta { background-color: black; color: white; } .file.is-light .file-cta { background-color: #dbdbdb; color: rgba(0, 0, 0, 0.7); } .file.is-light:hover .file-cta, .file.is-light.is-hovered .file-cta { background-color: #d5d5d5; color: rgba(0, 0, 0, 0.7); } .file.is-light:focus .file-cta, .file.is-light.is-focused .file-cta { box-shadow: 0 0 0.5em rgba(219, 219, 219, 0.25); color: rgba(0, 0, 0, 0.7); } .file.is-light:active .file-cta, .file.is-light.is-active .file-cta { background-color: #cfcfcf; color: rgba(0, 0, 0, 0.7); } .file.is-dark .file-cta { background-color: #1c1c1c; color: #fff; } .file.is-dark:hover .file-cta, .file.is-dark.is-hovered .file-cta { background-color: #161616; color: #fff; } .file.is-dark:focus .file-cta, .file.is-dark.is-focused .file-cta { box-shadow: 0 0 0.5em rgba(28, 28, 28, 0.25); color: #fff; } .file.is-dark:active .file-cta, .file.is-dark.is-active .file-cta { background-color: #0f0f0f; color: #fff; } .file.is-primary .file-cta { background-color: #d90052; color: #fff; } .file.is-primary:hover .file-cta, .file.is-primary.is-hovered .file-cta { background-color: #cc004d; color: #fff; } .file.is-primary:focus .file-cta, .file.is-primary.is-focused .file-cta { box-shadow: 0 0 0.5em rgba(217, 0, 82, 0.25); color: #fff; } .file.is-primary:active .file-cta, .file.is-primary.is-active .file-cta { background-color: #c00048; color: #fff; } .file.is-link .file-cta { background-color: #d90052; color: #fff; } .file.is-link:hover .file-cta, .file.is-link.is-hovered .file-cta { background-color: #cc004d; color: #fff; } .file.is-link:focus .file-cta, .file.is-link.is-focused .file-cta { box-shadow: 0 0 0.5em rgba(217, 0, 82, 0.25); color: #fff; } .file.is-link:active .file-cta, .file.is-link.is-active .file-cta { background-color: #c00048; color: #fff; } .file.is-info .file-cta { background-color: #0075cc; color: #fff; } .file.is-info:hover .file-cta, .file.is-info.is-hovered .file-cta { background-color: #006ebf; color: #fff; } .file.is-info:focus .file-cta, .file.is-info.is-focused .file-cta { box-shadow: 0 0 0.5em rgba(0, 117, 204, 0.25); color: #fff; } .file.is-info:active .file-cta, .file.is-info.is-active .file-cta { background-color: #0066b3; color: #fff; } .file.is-success .file-cta { background-color: #11ad74; color: rgba(0, 0, 0, 0.7); } .file.is-success:hover .file-cta, .file.is-success.is-hovered .file-cta { background-color: #10a16c; color: rgba(0, 0, 0, 0.7); } .file.is-success:focus .file-cta, .file.is-success.is-focused .file-cta { box-shadow: 0 0 0.5em rgba(17, 173, 116, 0.25); color: rgba(0, 0, 0, 0.7); } .file.is-success:active .file-cta, .file.is-success.is-active .file-cta { background-color: #0f9564; color: rgba(0, 0, 0, 0.7); } .file.is-warning .file-cta { background-color: #ccba00; color: rgba(0, 0, 0, 0.7); } .file.is-warning:hover .file-cta, .file.is-warning.is-hovered .file-cta { background-color: #bfaf00; color: rgba(0, 0, 0, 0.7); } .file.is-warning:focus .file-cta, .file.is-warning.is-focused .file-cta { box-shadow: 0 0 0.5em rgba(204, 186, 0, 0.25); color: rgba(0, 0, 0, 0.7); } .file.is-warning:active .file-cta, .file.is-warning.is-active .file-cta { background-color: #b3a300; color: rgba(0, 0, 0, 0.7); } .file.is-danger .file-cta { background-color: #ee1742; color: #fff; } .file.is-danger:hover .file-cta, .file.is-danger.is-hovered .file-cta { background-color: #e6113c; color: #fff; } .file.is-danger:focus .file-cta, .file.is-danger.is-focused .file-cta { box-shadow: 0 0 0.5em rgba(238, 23, 66, 0.25); color: #fff; } .file.is-danger:active .file-cta, .file.is-danger.is-active .file-cta { background-color: #da1039; color: #fff; } .file.is-white-dark .file-cta { background-color: white; color: #0a0a0a; } .file.is-white-dark:hover .file-cta, .file.is-white-dark.is-hovered .file-cta { background-color: #f9f9f9; color: #0a0a0a; } .file.is-white-dark:focus .file-cta, .file.is-white-dark.is-focused .file-cta { box-shadow: 0 0 0.5em rgba(255, 255, 255, 0.25); color: #0a0a0a; } .file.is-white-dark:active .file-cta, .file.is-white-dark.is-active .file-cta { background-color: #f2f2f2; color: #0a0a0a; } .file.is-black-dark .file-cta { background-color: #0a0a0a; color: white; } .file.is-black-dark:hover .file-cta, .file.is-black-dark.is-hovered .file-cta { background-color: #040404; color: white; } .file.is-black-dark:focus .file-cta, .file.is-black-dark.is-focused .file-cta { box-shadow: 0 0 0.5em rgba(10, 10, 10, 0.25); color: white; } .file.is-black-dark:active .file-cta, .file.is-black-dark.is-active .file-cta { background-color: black; color: white; } .file.is-light-dark .file-cta { background-color: whitesmoke; color: rgba(0, 0, 0, 0.7); } .file.is-light-dark:hover .file-cta, .file.is-light-dark.is-hovered .file-cta { background-color: #eeeeee; color: rgba(0, 0, 0, 0.7); } .file.is-light-dark:focus .file-cta, .file.is-light-dark.is-focused .file-cta { box-shadow: 0 0 0.5em rgba(245, 245, 245, 0.25); color: rgba(0, 0, 0, 0.7); } .file.is-light-dark:active .file-cta, .file.is-light-dark.is-active .file-cta { background-color: #e8e8e8; color: rgba(0, 0, 0, 0.7); } .file.is-dark-dark .file-cta { background-color: #363636; color: #fff; } .file.is-dark-dark:hover .file-cta, .file.is-dark-dark.is-hovered .file-cta { background-color: #2f2f2f; color: #fff; } .file.is-dark-dark:focus .file-cta, .file.is-dark-dark.is-focused .file-cta { box-shadow: 0 0 0.5em rgba(54, 54, 54, 0.25); color: #fff; } .file.is-dark-dark:active .file-cta, .file.is-dark-dark.is-active .file-cta { background-color: #292929; color: #fff; } .file.is-primary-dark .file-cta { background-color: #ff0d68; color: #fff; } .file.is-primary-dark:hover .file-cta, .file.is-primary-dark.is-hovered .file-cta { background-color: #ff0060; color: #fff; } .file.is-primary-dark:focus .file-cta, .file.is-primary-dark.is-focused .file-cta { box-shadow: 0 0 0.5em rgba(255, 13, 104, 0.25); color: #fff; } .file.is-primary-dark:active .file-cta, .file.is-primary-dark.is-active .file-cta { background-color: #f3005b; color: #fff; } .file.is-link-dark .file-cta { background-color: #ff0d68; color: #fff; } .file.is-link-dark:hover .file-cta, .file.is-link-dark.is-hovered .file-cta { background-color: #ff0060; color: #fff; } .file.is-link-dark:focus .file-cta, .file.is-link-dark.is-focused .file-cta { box-shadow: 0 0 0.5em rgba(255, 13, 104, 0.25); color: #fff; } .file.is-link-dark:active .file-cta, .file.is-link-dark.is-active .file-cta { background-color: #f3005b; color: #fff; } .file.is-info-dark .file-cta { background-color: #0092FF; color: #fff; } .file.is-info-dark:hover .file-cta, .file.is-info-dark.is-hovered .file-cta { background-color: #008bf2; color: #fff; } .file.is-info-dark:focus .file-cta, .file.is-info-dark.is-focused .file-cta { box-shadow: 0 0 0.5em rgba(0, 146, 255, 0.25); color: #fff; } .file.is-info-dark:active .file-cta, .file.is-info-dark.is-active .file-cta { background-color: #0083e6; color: #fff; } .file.is-success-dark .file-cta { background-color: #16DB93; color: rgba(0, 0, 0, 0.7); } .file.is-success-dark:hover .file-cta, .file.is-success-dark.is-hovered .file-cta { background-color: #15cf8b; color: rgba(0, 0, 0, 0.7); } .file.is-success-dark:focus .file-cta, .file.is-success-dark.is-focused .file-cta { box-shadow: 0 0 0.5em rgba(22, 219, 147, 0.25); color: rgba(0, 0, 0, 0.7); } .file.is-success-dark:active .file-cta, .file.is-success-dark.is-active .file-cta { background-color: #14c483; color: rgba(0, 0, 0, 0.7); } .file.is-warning-dark .file-cta { background-color: #FFE900; color: rgba(0, 0, 0, 0.7); } .file.is-warning-dark:hover .file-cta, .file.is-warning-dark.is-hovered .file-cta { background-color: #f2dd00; color: rgba(0, 0, 0, 0.7); } .file.is-warning-dark:focus .file-cta, .file.is-warning-dark.is-focused .file-cta { box-shadow: 0 0 0.5em rgba(255, 233, 0, 0.25); color: rgba(0, 0, 0, 0.7); } .file.is-warning-dark:active .file-cta, .file.is-warning-dark.is-active .file-cta { background-color: #e6d200; color: rgba(0, 0, 0, 0.7); } .file.is-danger-dark .file-cta { background-color: #f14668; color: #fff; } .file.is-danger-dark:hover .file-cta, .file.is-danger-dark.is-hovered .file-cta { background-color: #f03a5f; color: #fff; } .file.is-danger-dark:focus .file-cta, .file.is-danger-dark.is-focused .file-cta { box-shadow: 0 0 0.5em rgba(241, 70, 104, 0.25); color: #fff; } .file.is-danger-dark:active .file-cta, .file.is-danger-dark.is-active .file-cta { background-color: #ef2e55; color: #fff; } .file-label:hover .file-cta { background-color: #1d1d1d; color: #dbdbdb; } .file-label:hover .file-name { border-color: #2f2f2f; } .file-label:active .file-cta { background-color: #171717; color: #dbdbdb; } .file-label:active .file-name { border-color: #292929; } .file-cta, .file-name { border-color: #363636; } .file-cta { background-color: #242424; color: #b5b5b5; } .file-name { border-color: #363636; } .label { color: #dbdbdb; } .help.is-white { color: #e6e6e6; } .help.is-black { color: black; } .help.is-light { color: #dbdbdb; } .help.is-dark { color: #1c1c1c; } .help.is-primary { color: #d90052; } .help.is-link { color: #d90052; } .help.is-info { color: #0075cc; } .help.is-success { color: #11ad74; } .help.is-warning { color: #ccba00; } .help.is-danger { color: #ee1742; } .help.is-white-dark { color: white; } .help.is-black-dark { color: #0a0a0a; } .help.is-light-dark { color: whitesmoke; } .help.is-dark-dark { color: #363636; } .help.is-primary-dark { color: #ff0d68; } .help.is-link-dark { color: #ff0d68; } .help.is-info-dark { color: #0092FF; } .help.is-success-dark { color: #16DB93; } .help.is-warning-dark { color: #FFE900; } .help.is-danger-dark { color: #f14668; } .control.has-icons-left .icon, .control.has-icons-right .icon { color: #363636; } .notification { background-color: #242424; } .notification code, .notification pre { background: #0a0a0a; } .notification.is-white { background-color: #e6e6e6; color: #0a0a0a; } .notification.is-black { background-color: black; color: white; } .notification.is-light { background-color: #dbdbdb; color: rgba(0, 0, 0, 0.7); } .notification.is-dark { background-color: #1c1c1c; color: #fff; } .notification.is-primary { background-color: #d90052; color: #fff; } .notification.is-link { background-color: #d90052; color: #fff; } .notification.is-info { background-color: #0075cc; color: #fff; } .notification.is-success { background-color: #11ad74; color: rgba(0, 0, 0, 0.7); } .notification.is-warning { background-color: #ccba00; color: rgba(0, 0, 0, 0.7); } .notification.is-danger { background-color: #ee1742; color: #fff; } .notification.is-white-dark { background-color: white; color: #0a0a0a; } .notification.is-black-dark { background-color: #0a0a0a; color: white; } .notification.is-light-dark { background-color: whitesmoke; color: rgba(0, 0, 0, 0.7); } .notification.is-dark-dark { background-color: #363636; color: #fff; } .notification.is-primary-dark { background-color: #ff0d68; color: #fff; } .notification.is-link-dark { background-color: #ff0d68; color: #fff; } .notification.is-info-dark { background-color: #0092FF; color: #fff; } .notification.is-success-dark { background-color: #16DB93; color: rgba(0, 0, 0, 0.7); } .notification.is-warning-dark { background-color: #FFE900; color: rgba(0, 0, 0, 0.7); } .notification.is-danger-dark { background-color: #f14668; color: #fff; } .progress::-webkit-progress-bar { background-color: #363636; } .progress::-webkit-progress-value { background-color: #b5b5b5; } .progress::-moz-progress-bar { background-color: #b5b5b5; } .progress::-ms-fill { background-color: #b5b5b5; } .progress:indeterminate { background-color: #363636; background-image: linear-gradient(to right, #4a4a4a 30%, #363636 30%); } .progress.is-white::-webkit-progress-value { background-color: #e6e6e6; } .progress.is-white::-moz-progress-bar { background-color: #e6e6e6; } .progress.is-white::-ms-fill { background-color: #e6e6e6; } .progress.is-white:indeterminate { background-image: linear-gradient(to right, #e6e6e6 30%, #363636 30%); } .progress.is-black::-webkit-progress-value { background-color: black; } .progress.is-black::-moz-progress-bar { background-color: black; } .progress.is-black::-ms-fill { background-color: black; } .progress.is-black:indeterminate { background-image: linear-gradient(to right, black 30%, #363636 30%); } .progress.is-light::-webkit-progress-value { background-color: #dbdbdb; } .progress.is-light::-moz-progress-bar { background-color: #dbdbdb; } .progress.is-light::-ms-fill { background-color: #dbdbdb; } .progress.is-light:indeterminate { background-image: linear-gradient(to right, #dbdbdb 30%, #363636 30%); } .progress.is-dark::-webkit-progress-value { background-color: #1c1c1c; } .progress.is-dark::-moz-progress-bar { background-color: #1c1c1c; } .progress.is-dark::-ms-fill { background-color: #1c1c1c; } .progress.is-dark:indeterminate { background-image: linear-gradient(to right, #1c1c1c 30%, #363636 30%); } .progress.is-primary::-webkit-progress-value { background-color: #d90052; } .progress.is-primary::-moz-progress-bar { background-color: #d90052; } .progress.is-primary::-ms-fill { background-color: #d90052; } .progress.is-primary:indeterminate { background-image: linear-gradient(to right, #d90052 30%, #363636 30%); } .progress.is-link::-webkit-progress-value { background-color: #d90052; } .progress.is-link::-moz-progress-bar { background-color: #d90052; } .progress.is-link::-ms-fill { background-color: #d90052; } .progress.is-link:indeterminate { background-image: linear-gradient(to right, #d90052 30%, #363636 30%); } .progress.is-info::-webkit-progress-value { background-color: #0075cc; } .progress.is-info::-moz-progress-bar { background-color: #0075cc; } .progress.is-info::-ms-fill { background-color: #0075cc; } .progress.is-info:indeterminate { background-image: linear-gradient(to right, #0075cc 30%, #363636 30%); } .progress.is-success::-webkit-progress-value { background-color: #11ad74; } .progress.is-success::-moz-progress-bar { background-color: #11ad74; } .progress.is-success::-ms-fill { background-color: #11ad74; } .progress.is-success:indeterminate { background-image: linear-gradient(to right, #11ad74 30%, #363636 30%); } .progress.is-warning::-webkit-progress-value { background-color: #ccba00; } .progress.is-warning::-moz-progress-bar { background-color: #ccba00; } .progress.is-warning::-ms-fill { background-color: #ccba00; } .progress.is-warning:indeterminate { background-image: linear-gradient(to right, #ccba00 30%, #363636 30%); } .progress.is-danger::-webkit-progress-value { background-color: #ee1742; } .progress.is-danger::-moz-progress-bar { background-color: #ee1742; } .progress.is-danger::-ms-fill { background-color: #ee1742; } .progress.is-danger:indeterminate { background-image: linear-gradient(to right, #ee1742 30%, #363636 30%); } .progress.is-white-dark::-webkit-progress-value { background-color: white; } .progress.is-white-dark::-moz-progress-bar { background-color: white; } .progress.is-white-dark::-ms-fill { background-color: white; } .progress.is-white-dark:indeterminate { background-image: linear-gradient(to right, white 30%, #363636 30%); } .progress.is-black-dark::-webkit-progress-value { background-color: #0a0a0a; } .progress.is-black-dark::-moz-progress-bar { background-color: #0a0a0a; } .progress.is-black-dark::-ms-fill { background-color: #0a0a0a; } .progress.is-black-dark:indeterminate { background-image: linear-gradient(to right, #0a0a0a 30%, #363636 30%); } .progress.is-light-dark::-webkit-progress-value { background-color: whitesmoke; } .progress.is-light-dark::-moz-progress-bar { background-color: whitesmoke; } .progress.is-light-dark::-ms-fill { background-color: whitesmoke; } .progress.is-light-dark:indeterminate { background-image: linear-gradient(to right, whitesmoke 30%, #363636 30%); } .progress.is-dark-dark::-webkit-progress-value { background-color: #363636; } .progress.is-dark-dark::-moz-progress-bar { background-color: #363636; } .progress.is-dark-dark::-ms-fill { background-color: #363636; } .progress.is-dark-dark:indeterminate { background-image: linear-gradient(to right, #363636 30%, #363636 30%); } .progress.is-primary-dark::-webkit-progress-value { background-color: #ff0d68; } .progress.is-primary-dark::-moz-progress-bar { background-color: #ff0d68; } .progress.is-primary-dark::-ms-fill { background-color: #ff0d68; } .progress.is-primary-dark:indeterminate { background-image: linear-gradient(to right, #ff0d68 30%, #363636 30%); } .progress.is-link-dark::-webkit-progress-value { background-color: #ff0d68; } .progress.is-link-dark::-moz-progress-bar { background-color: #ff0d68; } .progress.is-link-dark::-ms-fill { background-color: #ff0d68; } .progress.is-link-dark:indeterminate { background-image: linear-gradient(to right, #ff0d68 30%, #363636 30%); } .progress.is-info-dark::-webkit-progress-value { background-color: #0092FF; } .progress.is-info-dark::-moz-progress-bar { background-color: #0092FF; } .progress.is-info-dark::-ms-fill { background-color: #0092FF; } .progress.is-info-dark:indeterminate { background-image: linear-gradient(to right, #0092FF 30%, #363636 30%); } .progress.is-success-dark::-webkit-progress-value { background-color: #16DB93; } .progress.is-success-dark::-moz-progress-bar { background-color: #16DB93; } .progress.is-success-dark::-ms-fill { background-color: #16DB93; } .progress.is-success-dark:indeterminate { background-image: linear-gradient(to right, #16DB93 30%, #363636 30%); } .progress.is-warning-dark::-webkit-progress-value { background-color: #FFE900; } .progress.is-warning-dark::-moz-progress-bar { background-color: #FFE900; } .progress.is-warning-dark::-ms-fill { background-color: #FFE900; } .progress.is-warning-dark:indeterminate { background-image: linear-gradient(to right, #FFE900 30%, #363636 30%); } .progress.is-danger-dark::-webkit-progress-value { background-color: #f14668; } .progress.is-danger-dark::-moz-progress-bar { background-color: #f14668; } .progress.is-danger-dark::-ms-fill { background-color: #f14668; } .progress.is-danger-dark:indeterminate { background-image: linear-gradient(to right, #f14668 30%, #363636 30%); } .table { background-color: #0a0a0a; color: #dbdbdb; } .table td, .table th { border: 1px solid #363636; } .table td.is-white, .table th.is-white { background-color: #e6e6e6; border-color: #e6e6e6; color: #0a0a0a; } .table td.is-black, .table th.is-black { background-color: black; border-color: black; color: white; } .table td.is-light, .table th.is-light { background-color: #dbdbdb; border-color: #dbdbdb; color: rgba(0, 0, 0, 0.7); } .table td.is-dark, .table th.is-dark { background-color: #1c1c1c; border-color: #1c1c1c; color: #fff; } .table td.is-primary, .table th.is-primary { background-color: #d90052; border-color: #d90052; color: #fff; } .table td.is-link, .table th.is-link { background-color: #d90052; border-color: #d90052; color: #fff; } .table td.is-info, .table th.is-info { background-color: #0075cc; border-color: #0075cc; color: #fff; } .table td.is-success, .table th.is-success { background-color: #11ad74; border-color: #11ad74; color: rgba(0, 0, 0, 0.7); } .table td.is-warning, .table th.is-warning { background-color: #ccba00; border-color: #ccba00; color: rgba(0, 0, 0, 0.7); } .table td.is-danger, .table th.is-danger { background-color: #ee1742; border-color: #ee1742; color: #fff; } .table td.is-white-dark, .table th.is-white-dark { background-color: white; border-color: white; color: #0a0a0a; } .table td.is-black-dark, .table th.is-black-dark { background-color: #0a0a0a; border-color: #0a0a0a; color: white; } .table td.is-light-dark, .table th.is-light-dark { background-color: whitesmoke; border-color: whitesmoke; color: rgba(0, 0, 0, 0.7); } .table td.is-dark-dark, .table th.is-dark-dark { background-color: #363636; border-color: #363636; color: #fff; } .table td.is-primary-dark, .table th.is-primary-dark { background-color: #ff0d68; border-color: #ff0d68; color: #fff; } .table td.is-link-dark, .table th.is-link-dark { background-color: #ff0d68; border-color: #ff0d68; color: #fff; } .table td.is-info-dark, .table th.is-info-dark { background-color: #0092FF; border-color: #0092FF; color: #fff; } .table td.is-success-dark, .table th.is-success-dark { background-color: #16DB93; border-color: #16DB93; color: rgba(0, 0, 0, 0.7); } .table td.is-warning-dark, .table th.is-warning-dark { background-color: #FFE900; border-color: #FFE900; color: rgba(0, 0, 0, 0.7); } .table td.is-danger-dark, .table th.is-danger-dark { background-color: #f14668; border-color: #f14668; color: #fff; } .table td.is-selected, .table th.is-selected { background-color: #e60056; color: #e6e6e6; } .table th { color: #dbdbdb; } .table tr.is-selected { background-color: #e60056; color: #e6e6e6; } .table tr.is-selected td, .table tr.is-selected th { border-color: #e6e6e6; } .table thead td, .table thead th { color: #dbdbdb; } .table tfoot td, .table tfoot th { color: #dbdbdb; } .table.is-hoverable tbody tr:not(.is-selected):hover { background-color: #121212; } .table.is-hoverable.is-striped tbody tr:not(.is-selected):hover { background-color: #121212; } .table.is-hoverable.is-striped tbody tr:not(.is-selected):hover:nth-child(even) { background-color: #242424; } .table.is-striped tbody tr:not(.is-selected):nth-child(even) { background-color: #121212; } .tag:not(body) { background-color: #242424; color: #b5b5b5; } .tag:not(body).is-white { background-color: #e6e6e6; color: #0a0a0a; } .tag:not(body).is-black { background-color: black; color: white; } .tag:not(body).is-light { background-color: #dbdbdb; color: rgba(0, 0, 0, 0.7); } .tag:not(body).is-dark { background-color: #1c1c1c; color: #fff; } .tag:not(body).is-primary { background-color: #d90052; color: #fff; } .tag:not(body).is-link { background-color: #d90052; color: #fff; } .tag:not(body).is-info { background-color: #0075cc; color: #fff; } .tag:not(body).is-success { background-color: #11ad74; color: rgba(0, 0, 0, 0.7); } .tag:not(body).is-warning { background-color: #ccba00; color: rgba(0, 0, 0, 0.7); } .tag:not(body).is-danger { background-color: #ee1742; color: #fff; } .tag:not(body).is-white-dark { background-color: white; color: #0a0a0a; } .tag:not(body).is-black-dark { background-color: #0a0a0a; color: white; } .tag:not(body).is-light-dark { background-color: whitesmoke; color: rgba(0, 0, 0, 0.7); } .tag:not(body).is-dark-dark { background-color: #363636; color: #fff; } .tag:not(body).is-primary-dark { background-color: #ff0d68; color: #fff; } .tag:not(body).is-link-dark { background-color: #ff0d68; color: #fff; } .tag:not(body).is-info-dark { background-color: #0092FF; color: #fff; } .tag:not(body).is-success-dark { background-color: #16DB93; color: rgba(0, 0, 0, 0.7); } .tag:not(body).is-warning-dark { background-color: #FFE900; color: rgba(0, 0, 0, 0.7); } .tag:not(body).is-danger-dark { background-color: #f14668; color: #fff; } .tag:not(body).is-delete:hover, .tag:not(body).is-delete:focus { background-color: #171717; } .tag:not(body).is-delete:active { background-color: #0a0a0a; } .title { color: #dbdbdb; } .subtitle { color: #b5b5b5; } .subtitle strong { color: #dbdbdb; } .number { background-color: #242424; } .breadcrumb a { color: #e60056; } .breadcrumb a:hover { color: #dbdbdb; } .breadcrumb li.is-active a { color: #dbdbdb; } .breadcrumb li + li::before { color: #4a4a4a; } .card { background-color: #0a0a0a; box-shadow: 0 2px 3px rgba(255, 255, 255, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.1); color: #b5b5b5; } .card-header { box-shadow: 0 1px 2px rgba(255, 255, 255, 0.1); } .card-header-title { color: #dbdbdb; } .card-footer { border-top: 1px solid #363636; } .card-footer-item:not(:last-child) { border-right: 1px solid #363636; } .dropdown-content { background-color: #0a0a0a; box-shadow: 0 2px 3px rgba(255, 255, 255, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.1); } .dropdown-item { color: #b5b5b5; } a.dropdown-item:hover, button.dropdown-item:hover { background-color: #242424; color: white; } a.dropdown-item.is-active, button.dropdown-item.is-active { background-color: #e60056; color: #fff; } .dropdown-divider { background-color: #363636; } .list { background-color: #0a0a0a; box-shadow: 0 2px 3px rgba(255, 255, 255, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.1); } .list-item:not(a) { color: #b5b5b5; } .list-item:not(:last-child) { border-bottom: 1px solid #363636; } .list-item.is-active { background-color: #e60056; color: #fff; } a.list-item { background-color: #242424; } .media .media { border-top: 1px solid rgba(54, 54, 54, 0.5); } .media + .media { border-top: 1px solid rgba(54, 54, 54, 0.5); } .menu-list a { color: #b5b5b5; } .menu-list a:hover { background-color: #242424; color: #dbdbdb; } .menu-list a.is-active { background-color: #e60056; color: #fff; } .menu-list li ul { border-left: 1px solid #363636; } .message { background-color: #242424; } .message.is-white { background-color: #242424; } .message.is-white .message-header { background-color: white; color: #0a0a0a; } .message.is-white .message-body { border-color: white; color: #b5b5b5; } .message.is-black { background-color: #242424; } .message.is-black .message-header { background-color: #0a0a0a; color: white; } .message.is-black .message-body { border-color: #0a0a0a; color: #b5b5b5; } .message.is-light { background-color: #242424; } .message.is-light .message-header { background-color: whitesmoke; color: rgba(0, 0, 0, 0.7); } .message.is-light .message-body { border-color: whitesmoke; color: #b5b5b5; } .message.is-dark { background-color: #242424; } .message.is-dark .message-header { background-color: #363636; color: #fff; } .message.is-dark .message-body { border-color: #363636; color: #b5b5b5; } .message.is-primary { background-color: #242424; } .message.is-primary .message-header { background-color: #ff0d68; color: #fff; } .message.is-primary .message-body { border-color: #ff0d68; color: #b5b5b5; } .message.is-link { background-color: #242424; } .message.is-link .message-header { background-color: #ff0d68; color: #fff; } .message.is-link .message-body { border-color: #ff0d68; color: #b5b5b5; } .message.is-info { background-color: #242424; } .message.is-info .message-header { background-color: #0092FF; color: #fff; } .message.is-info .message-body { border-color: #0092FF; color: #b5b5b5; } .message.is-success { background-color: #242424; } .message.is-success .message-header { background-color: #16DB93; color: rgba(0, 0, 0, 0.7); } .message.is-success .message-body { border-color: #16DB93; color: #b5b5b5; } .message.is-warning { background-color: #242424; } .message.is-warning .message-header { background-color: #FFE900; color: rgba(0, 0, 0, 0.7); } .message.is-warning .message-body { border-color: #FFE900; color: #b5b5b5; } .message.is-danger { background-color: #242424; } .message.is-danger .message-header { background-color: #f14668; color: #fff; } .message.is-danger .message-body { border-color: #f14668; color: #b5b5b5; } .message.is-white-dark { background-color: #242424; } .message.is-white-dark .message-header { background-color: white; color: #0a0a0a; } .message.is-white-dark .message-body { border-color: white; color: #b5b5b5; } .message.is-black-dark { background-color: #242424; } .message.is-black-dark .message-header { background-color: #0a0a0a; color: white; } .message.is-black-dark .message-body { border-color: #0a0a0a; color: #b5b5b5; } .message.is-light-dark { background-color: #242424; } .message.is-light-dark .message-header { background-color: whitesmoke; color: rgba(0, 0, 0, 0.7); } .message.is-light-dark .message-body { border-color: whitesmoke; color: #b5b5b5; } .message.is-dark-dark { background-color: #242424; } .message.is-dark-dark .message-header { background-color: #363636; color: #fff; } .message.is-dark-dark .message-body { border-color: #363636; color: #b5b5b5; } .message.is-primary-dark { background-color: #242424; } .message.is-primary-dark .message-header { background-color: #ff0d68; color: #fff; } .message.is-primary-dark .message-body { border-color: #ff0d68; color: #b5b5b5; } .message.is-link-dark { background-color: #242424; } .message.is-link-dark .message-header { background-color: #ff0d68; color: #fff; } .message.is-link-dark .message-body { border-color: #ff0d68; color: #b5b5b5; } .message.is-info-dark { background-color: #242424; } .message.is-info-dark .message-header { background-color: #0092FF; color: #fff; } .message.is-info-dark .message-body { border-color: #0092FF; color: #b5b5b5; } .message.is-success-dark { background-color: #242424; } .message.is-success-dark .message-header { background-color: #16DB93; color: rgba(0, 0, 0, 0.7); } .message.is-success-dark .message-body { border-color: #16DB93; color: #b5b5b5; } .message.is-warning-dark { background-color: #242424; } .message.is-warning-dark .message-header { background-color: #FFE900; color: rgba(0, 0, 0, 0.7); } .message.is-warning-dark .message-body { border-color: #FFE900; color: #b5b5b5; } .message.is-danger-dark { background-color: #242424; } .message.is-danger-dark .message-header { background-color: #f14668; color: #fff; } .message.is-danger-dark .message-body { border-color: #f14668; color: #b5b5b5; } .message-header { background-color: #b5b5b5; color: #fff; } .message-body { border-color: #363636; color: #b5b5b5; } .message-body code, .message-body pre { background-color: #0a0a0a; } .modal-background { background-color: rgba(255, 255, 255, 0.86); } .modal-card-head, .modal-card-foot { background-color: #242424; } .modal-card-head { border-bottom: 1px solid #363636; } .modal-card-title { color: #dbdbdb; } .modal-card-foot { border-top: 1px solid #363636; } .modal-card-body { -webkit-overflow-scrolling: touch; background-color: white; } .navbar { background-color: #17181c; } .navbar.is-white { background-color: #e6e6e6; color: #0a0a0a; } .navbar.is-white .navbar-brand > .navbar-item, .navbar.is-white .navbar-brand .navbar-link { color: #0a0a0a; } .navbar.is-white .navbar-brand > a.navbar-item:hover, .navbar.is-white .navbar-brand > a.navbar-item.is-active, .navbar.is-white .navbar-brand .navbar-link:hover, .navbar.is-white .navbar-brand .navbar-link.is-active { background-color: #d9d9d9; color: #0a0a0a; } .navbar.is-white .navbar-brand .navbar-link::after { border-color: #0a0a0a; } .navbar.is-white .navbar-burger { color: #0a0a0a; } } @media screen and (prefers-color-scheme: dark) and (min-width: 1024px) { .navbar.is-white .navbar-start > .navbar-item, .navbar.is-white .navbar-start .navbar-link, .navbar.is-white .navbar-end > .navbar-item, .navbar.is-white .navbar-end .navbar-link { color: #0a0a0a; } .navbar.is-white .navbar-start > a.navbar-item:hover, .navbar.is-white .navbar-start > a.navbar-item.is-active, .navbar.is-white .navbar-start .navbar-link:hover, .navbar.is-white .navbar-start .navbar-link.is-active, .navbar.is-white .navbar-end > a.navbar-item:hover, .navbar.is-white .navbar-end > a.navbar-item.is-active, .navbar.is-white .navbar-end .navbar-link:hover, .navbar.is-white .navbar-end .navbar-link.is-active { background-color: #d9d9d9; color: #0a0a0a; } .navbar.is-white .navbar-start .navbar-link::after, .navbar.is-white .navbar-end .navbar-link::after { border-color: #0a0a0a; } .navbar.is-white .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-white .navbar-item.has-dropdown.is-active .navbar-link { background-color: #d9d9d9; color: #0a0a0a; } .navbar.is-white .navbar-dropdown a.navbar-item.is-active { background-color: #e6e6e6; color: #0a0a0a; } } @media (prefers-color-scheme: dark) { .navbar.is-black { background-color: black; color: white; } .navbar.is-black .navbar-brand > .navbar-item, .navbar.is-black .navbar-brand .navbar-link { color: white; } .navbar.is-black .navbar-brand > a.navbar-item:hover, .navbar.is-black .navbar-brand > a.navbar-item.is-active, .navbar.is-black .navbar-brand .navbar-link:hover, .navbar.is-black .navbar-brand .navbar-link.is-active { background-color: black; color: white; } .navbar.is-black .navbar-brand .navbar-link::after { border-color: white; } .navbar.is-black .navbar-burger { color: white; } } @media screen and (prefers-color-scheme: dark) and (min-width: 1024px) { .navbar.is-black .navbar-start > .navbar-item, .navbar.is-black .navbar-start .navbar-link, .navbar.is-black .navbar-end > .navbar-item, .navbar.is-black .navbar-end .navbar-link { color: white; } .navbar.is-black .navbar-start > a.navbar-item:hover, .navbar.is-black .navbar-start > a.navbar-item.is-active, .navbar.is-black .navbar-start .navbar-link:hover, .navbar.is-black .navbar-start .navbar-link.is-active, .navbar.is-black .navbar-end > a.navbar-item:hover, .navbar.is-black .navbar-end > a.navbar-item.is-active, .navbar.is-black .navbar-end .navbar-link:hover, .navbar.is-black .navbar-end .navbar-link.is-active { background-color: black; color: white; } .navbar.is-black .navbar-start .navbar-link::after, .navbar.is-black .navbar-end .navbar-link::after { border-color: white; } .navbar.is-black .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-black .navbar-item.has-dropdown.is-active .navbar-link { background-color: black; color: white; } .navbar.is-black .navbar-dropdown a.navbar-item.is-active { background-color: black; color: white; } } @media (prefers-color-scheme: dark) { .navbar.is-light { background-color: #dbdbdb; color: rgba(0, 0, 0, 0.7); } .navbar.is-light .navbar-brand > .navbar-item, .navbar.is-light .navbar-brand .navbar-link { color: rgba(0, 0, 0, 0.7); } .navbar.is-light .navbar-brand > a.navbar-item:hover, .navbar.is-light .navbar-brand > a.navbar-item.is-active, .navbar.is-light .navbar-brand .navbar-link:hover, .navbar.is-light .navbar-brand .navbar-link.is-active { background-color: #cfcfcf; color: rgba(0, 0, 0, 0.7); } .navbar.is-light .navbar-brand .navbar-link::after { border-color: rgba(0, 0, 0, 0.7); } .navbar.is-light .navbar-burger { color: rgba(0, 0, 0, 0.7); } } @media screen and (prefers-color-scheme: dark) and (min-width: 1024px) { .navbar.is-light .navbar-start > .navbar-item, .navbar.is-light .navbar-start .navbar-link, .navbar.is-light .navbar-end > .navbar-item, .navbar.is-light .navbar-end .navbar-link { color: rgba(0, 0, 0, 0.7); } .navbar.is-light .navbar-start > a.navbar-item:hover, .navbar.is-light .navbar-start > a.navbar-item.is-active, .navbar.is-light .navbar-start .navbar-link:hover, .navbar.is-light .navbar-start .navbar-link.is-active, .navbar.is-light .navbar-end > a.navbar-item:hover, .navbar.is-light .navbar-end > a.navbar-item.is-active, .navbar.is-light .navbar-end .navbar-link:hover, .navbar.is-light .navbar-end .navbar-link.is-active { background-color: #cfcfcf; color: rgba(0, 0, 0, 0.7); } .navbar.is-light .navbar-start .navbar-link::after, .navbar.is-light .navbar-end .navbar-link::after { border-color: rgba(0, 0, 0, 0.7); } .navbar.is-light .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-light .navbar-item.has-dropdown.is-active .navbar-link { background-color: #cfcfcf; color: rgba(0, 0, 0, 0.7); } .navbar.is-light .navbar-dropdown a.navbar-item.is-active { background-color: #dbdbdb; color: rgba(0, 0, 0, 0.7); } } @media (prefers-color-scheme: dark) { .navbar.is-dark { background-color: #1c1c1c; color: #fff; } .navbar.is-dark .navbar-brand > .navbar-item, .navbar.is-dark .navbar-brand .navbar-link { color: #fff; } .navbar.is-dark .navbar-brand > a.navbar-item:hover, .navbar.is-dark .navbar-brand > a.navbar-item.is-active, .navbar.is-dark .navbar-brand .navbar-link:hover, .navbar.is-dark .navbar-brand .navbar-link.is-active { background-color: #0f0f0f; color: #fff; } .navbar.is-dark .navbar-brand .navbar-link::after { border-color: #fff; } .navbar.is-dark .navbar-burger { color: #fff; } } @media screen and (prefers-color-scheme: dark) and (min-width: 1024px) { .navbar.is-dark .navbar-start > .navbar-item, .navbar.is-dark .navbar-start .navbar-link, .navbar.is-dark .navbar-end > .navbar-item, .navbar.is-dark .navbar-end .navbar-link { color: #fff; } .navbar.is-dark .navbar-start > a.navbar-item:hover, .navbar.is-dark .navbar-start > a.navbar-item.is-active, .navbar.is-dark .navbar-start .navbar-link:hover, .navbar.is-dark .navbar-start .navbar-link.is-active, .navbar.is-dark .navbar-end > a.navbar-item:hover, .navbar.is-dark .navbar-end > a.navbar-item.is-active, .navbar.is-dark .navbar-end .navbar-link:hover, .navbar.is-dark .navbar-end .navbar-link.is-active { background-color: #0f0f0f; color: #fff; } .navbar.is-dark .navbar-start .navbar-link::after, .navbar.is-dark .navbar-end .navbar-link::after { border-color: #fff; } .navbar.is-dark .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-dark .navbar-item.has-dropdown.is-active .navbar-link { background-color: #0f0f0f; color: #fff; } .navbar.is-dark .navbar-dropdown a.navbar-item.is-active { background-color: #1c1c1c; color: #fff; } } @media (prefers-color-scheme: dark) { .navbar.is-primary { background-color: #d90052; color: #fff; } .navbar.is-primary .navbar-brand > .navbar-item, .navbar.is-primary .navbar-brand .navbar-link { color: #fff; } .navbar.is-primary .navbar-brand > a.navbar-item:hover, .navbar.is-primary .navbar-brand > a.navbar-item.is-active, .navbar.is-primary .navbar-brand .navbar-link:hover, .navbar.is-primary .navbar-brand .navbar-link.is-active { background-color: #c00048; color: #fff; } .navbar.is-primary .navbar-brand .navbar-link::after { border-color: #fff; } .navbar.is-primary .navbar-burger { color: #fff; } } @media screen and (prefers-color-scheme: dark) and (min-width: 1024px) { .navbar.is-primary .navbar-start > .navbar-item, .navbar.is-primary .navbar-start .navbar-link, .navbar.is-primary .navbar-end > .navbar-item, .navbar.is-primary .navbar-end .navbar-link { color: #fff; } .navbar.is-primary .navbar-start > a.navbar-item:hover, .navbar.is-primary .navbar-start > a.navbar-item.is-active, .navbar.is-primary .navbar-start .navbar-link:hover, .navbar.is-primary .navbar-start .navbar-link.is-active, .navbar.is-primary .navbar-end > a.navbar-item:hover, .navbar.is-primary .navbar-end > a.navbar-item.is-active, .navbar.is-primary .navbar-end .navbar-link:hover, .navbar.is-primary .navbar-end .navbar-link.is-active { background-color: #c00048; color: #fff; } .navbar.is-primary .navbar-start .navbar-link::after, .navbar.is-primary .navbar-end .navbar-link::after { border-color: #fff; } .navbar.is-primary .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-primary .navbar-item.has-dropdown.is-active .navbar-link { background-color: #c00048; color: #fff; } .navbar.is-primary .navbar-dropdown a.navbar-item.is-active { background-color: #d90052; color: #fff; } } @media (prefers-color-scheme: dark) { .navbar.is-link { background-color: #d90052; color: #fff; } .navbar.is-link .navbar-brand > .navbar-item, .navbar.is-link .navbar-brand .navbar-link { color: #fff; } .navbar.is-link .navbar-brand > a.navbar-item:hover, .navbar.is-link .navbar-brand > a.navbar-item.is-active, .navbar.is-link .navbar-brand .navbar-link:hover, .navbar.is-link .navbar-brand .navbar-link.is-active { background-color: #c00048; color: #fff; } .navbar.is-link .navbar-brand .navbar-link::after { border-color: #fff; } .navbar.is-link .navbar-burger { color: #fff; } } @media screen and (prefers-color-scheme: dark) and (min-width: 1024px) { .navbar.is-link .navbar-start > .navbar-item, .navbar.is-link .navbar-start .navbar-link, .navbar.is-link .navbar-end > .navbar-item, .navbar.is-link .navbar-end .navbar-link { color: #fff; } .navbar.is-link .navbar-start > a.navbar-item:hover, .navbar.is-link .navbar-start > a.navbar-item.is-active, .navbar.is-link .navbar-start .navbar-link:hover, .navbar.is-link .navbar-start .navbar-link.is-active, .navbar.is-link .navbar-end > a.navbar-item:hover, .navbar.is-link .navbar-end > a.navbar-item.is-active, .navbar.is-link .navbar-end .navbar-link:hover, .navbar.is-link .navbar-end .navbar-link.is-active { background-color: #c00048; color: #fff; } .navbar.is-link .navbar-start .navbar-link::after, .navbar.is-link .navbar-end .navbar-link::after { border-color: #fff; } .navbar.is-link .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-link .navbar-item.has-dropdown.is-active .navbar-link { background-color: #c00048; color: #fff; } .navbar.is-link .navbar-dropdown a.navbar-item.is-active { background-color: #d90052; color: #fff; } } @media (prefers-color-scheme: dark) { .navbar.is-info { background-color: #0075cc; color: #fff; } .navbar.is-info .navbar-brand > .navbar-item, .navbar.is-info .navbar-brand .navbar-link { color: #fff; } .navbar.is-info .navbar-brand > a.navbar-item:hover, .navbar.is-info .navbar-brand > a.navbar-item.is-active, .navbar.is-info .navbar-brand .navbar-link:hover, .navbar.is-info .navbar-brand .navbar-link.is-active { background-color: #0066b3; color: #fff; } .navbar.is-info .navbar-brand .navbar-link::after { border-color: #fff; } .navbar.is-info .navbar-burger { color: #fff; } } @media screen and (prefers-color-scheme: dark) and (min-width: 1024px) { .navbar.is-info .navbar-start > .navbar-item, .navbar.is-info .navbar-start .navbar-link, .navbar.is-info .navbar-end > .navbar-item, .navbar.is-info .navbar-end .navbar-link { color: #fff; } .navbar.is-info .navbar-start > a.navbar-item:hover, .navbar.is-info .navbar-start > a.navbar-item.is-active, .navbar.is-info .navbar-start .navbar-link:hover, .navbar.is-info .navbar-start .navbar-link.is-active, .navbar.is-info .navbar-end > a.navbar-item:hover, .navbar.is-info .navbar-end > a.navbar-item.is-active, .navbar.is-info .navbar-end .navbar-link:hover, .navbar.is-info .navbar-end .navbar-link.is-active { background-color: #0066b3; color: #fff; } .navbar.is-info .navbar-start .navbar-link::after, .navbar.is-info .navbar-end .navbar-link::after { border-color: #fff; } .navbar.is-info .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-info .navbar-item.has-dropdown.is-active .navbar-link { background-color: #0066b3; color: #fff; } .navbar.is-info .navbar-dropdown a.navbar-item.is-active { background-color: #0075cc; color: #fff; } } @media (prefers-color-scheme: dark) { .navbar.is-success { background-color: #11ad74; color: rgba(0, 0, 0, 0.7); } .navbar.is-success .navbar-brand > .navbar-item, .navbar.is-success .navbar-brand .navbar-link { color: rgba(0, 0, 0, 0.7); } .navbar.is-success .navbar-brand > a.navbar-item:hover, .navbar.is-success .navbar-brand > a.navbar-item.is-active, .navbar.is-success .navbar-brand .navbar-link:hover, .navbar.is-success .navbar-brand .navbar-link.is-active { background-color: #0f9564; color: rgba(0, 0, 0, 0.7); } .navbar.is-success .navbar-brand .navbar-link::after { border-color: rgba(0, 0, 0, 0.7); } .navbar.is-success .navbar-burger { color: rgba(0, 0, 0, 0.7); } } @media screen and (prefers-color-scheme: dark) and (min-width: 1024px) { .navbar.is-success .navbar-start > .navbar-item, .navbar.is-success .navbar-start .navbar-link, .navbar.is-success .navbar-end > .navbar-item, .navbar.is-success .navbar-end .navbar-link { color: rgba(0, 0, 0, 0.7); } .navbar.is-success .navbar-start > a.navbar-item:hover, .navbar.is-success .navbar-start > a.navbar-item.is-active, .navbar.is-success .navbar-start .navbar-link:hover, .navbar.is-success .navbar-start .navbar-link.is-active, .navbar.is-success .navbar-end > a.navbar-item:hover, .navbar.is-success .navbar-end > a.navbar-item.is-active, .navbar.is-success .navbar-end .navbar-link:hover, .navbar.is-success .navbar-end .navbar-link.is-active { background-color: #0f9564; color: rgba(0, 0, 0, 0.7); } .navbar.is-success .navbar-start .navbar-link::after, .navbar.is-success .navbar-end .navbar-link::after { border-color: rgba(0, 0, 0, 0.7); } .navbar.is-success .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-success .navbar-item.has-dropdown.is-active .navbar-link { background-color: #0f9564; color: rgba(0, 0, 0, 0.7); } .navbar.is-success .navbar-dropdown a.navbar-item.is-active { background-color: #11ad74; color: rgba(0, 0, 0, 0.7); } } @media (prefers-color-scheme: dark) { .navbar.is-warning { background-color: #ccba00; color: rgba(0, 0, 0, 0.7); } .navbar.is-warning .navbar-brand > .navbar-item, .navbar.is-warning .navbar-brand .navbar-link { color: rgba(0, 0, 0, 0.7); } .navbar.is-warning .navbar-brand > a.navbar-item:hover, .navbar.is-warning .navbar-brand > a.navbar-item.is-active, .navbar.is-warning .navbar-brand .navbar-link:hover, .navbar.is-warning .navbar-brand .navbar-link.is-active { background-color: #b3a300; color: rgba(0, 0, 0, 0.7); } .navbar.is-warning .navbar-brand .navbar-link::after { border-color: rgba(0, 0, 0, 0.7); } .navbar.is-warning .navbar-burger { color: rgba(0, 0, 0, 0.7); } } @media screen and (prefers-color-scheme: dark) and (min-width: 1024px) { .navbar.is-warning .navbar-start > .navbar-item, .navbar.is-warning .navbar-start .navbar-link, .navbar.is-warning .navbar-end > .navbar-item, .navbar.is-warning .navbar-end .navbar-link { color: rgba(0, 0, 0, 0.7); } .navbar.is-warning .navbar-start > a.navbar-item:hover, .navbar.is-warning .navbar-start > a.navbar-item.is-active, .navbar.is-warning .navbar-start .navbar-link:hover, .navbar.is-warning .navbar-start .navbar-link.is-active, .navbar.is-warning .navbar-end > a.navbar-item:hover, .navbar.is-warning .navbar-end > a.navbar-item.is-active, .navbar.is-warning .navbar-end .navbar-link:hover, .navbar.is-warning .navbar-end .navbar-link.is-active { background-color: #b3a300; color: rgba(0, 0, 0, 0.7); } .navbar.is-warning .navbar-start .navbar-link::after, .navbar.is-warning .navbar-end .navbar-link::after { border-color: rgba(0, 0, 0, 0.7); } .navbar.is-warning .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-warning .navbar-item.has-dropdown.is-active .navbar-link { background-color: #b3a300; color: rgba(0, 0, 0, 0.7); } .navbar.is-warning .navbar-dropdown a.navbar-item.is-active { background-color: #ccba00; color: rgba(0, 0, 0, 0.7); } } @media (prefers-color-scheme: dark) { .navbar.is-danger { background-color: #ee1742; color: #fff; } .navbar.is-danger .navbar-brand > .navbar-item, .navbar.is-danger .navbar-brand .navbar-link { color: #fff; } .navbar.is-danger .navbar-brand > a.navbar-item:hover, .navbar.is-danger .navbar-brand > a.navbar-item.is-active, .navbar.is-danger .navbar-brand .navbar-link:hover, .navbar.is-danger .navbar-brand .navbar-link.is-active { background-color: #da1039; color: #fff; } .navbar.is-danger .navbar-brand .navbar-link::after { border-color: #fff; } .navbar.is-danger .navbar-burger { color: #fff; } } @media screen and (prefers-color-scheme: dark) and (min-width: 1024px) { .navbar.is-danger .navbar-start > .navbar-item, .navbar.is-danger .navbar-start .navbar-link, .navbar.is-danger .navbar-end > .navbar-item, .navbar.is-danger .navbar-end .navbar-link { color: #fff; } .navbar.is-danger .navbar-start > a.navbar-item:hover, .navbar.is-danger .navbar-start > a.navbar-item.is-active, .navbar.is-danger .navbar-start .navbar-link:hover, .navbar.is-danger .navbar-start .navbar-link.is-active, .navbar.is-danger .navbar-end > a.navbar-item:hover, .navbar.is-danger .navbar-end > a.navbar-item.is-active, .navbar.is-danger .navbar-end .navbar-link:hover, .navbar.is-danger .navbar-end .navbar-link.is-active { background-color: #da1039; color: #fff; } .navbar.is-danger .navbar-start .navbar-link::after, .navbar.is-danger .navbar-end .navbar-link::after { border-color: #fff; } .navbar.is-danger .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-danger .navbar-item.has-dropdown.is-active .navbar-link { background-color: #da1039; color: #fff; } .navbar.is-danger .navbar-dropdown a.navbar-item.is-active { background-color: #ee1742; color: #fff; } } @media (prefers-color-scheme: dark) { .navbar.is-white-dark { background-color: white; color: #0a0a0a; } .navbar.is-white-dark .navbar-brand > .navbar-item, .navbar.is-white-dark .navbar-brand .navbar-link { color: #0a0a0a; } .navbar.is-white-dark .navbar-brand > a.navbar-item:hover, .navbar.is-white-dark .navbar-brand > a.navbar-item.is-active, .navbar.is-white-dark .navbar-brand .navbar-link:hover, .navbar.is-white-dark .navbar-brand .navbar-link.is-active { background-color: #f2f2f2; color: #0a0a0a; } .navbar.is-white-dark .navbar-brand .navbar-link::after { border-color: #0a0a0a; } .navbar.is-white-dark .navbar-burger { color: #0a0a0a; } } @media screen and (prefers-color-scheme: dark) and (min-width: 1024px) { .navbar.is-white-dark .navbar-start > .navbar-item, .navbar.is-white-dark .navbar-start .navbar-link, .navbar.is-white-dark .navbar-end > .navbar-item, .navbar.is-white-dark .navbar-end .navbar-link { color: #0a0a0a; } .navbar.is-white-dark .navbar-start > a.navbar-item:hover, .navbar.is-white-dark .navbar-start > a.navbar-item.is-active, .navbar.is-white-dark .navbar-start .navbar-link:hover, .navbar.is-white-dark .navbar-start .navbar-link.is-active, .navbar.is-white-dark .navbar-end > a.navbar-item:hover, .navbar.is-white-dark .navbar-end > a.navbar-item.is-active, .navbar.is-white-dark .navbar-end .navbar-link:hover, .navbar.is-white-dark .navbar-end .navbar-link.is-active { background-color: #f2f2f2; color: #0a0a0a; } .navbar.is-white-dark .navbar-start .navbar-link::after, .navbar.is-white-dark .navbar-end .navbar-link::after { border-color: #0a0a0a; } .navbar.is-white-dark .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-white-dark .navbar-item.has-dropdown.is-active .navbar-link { background-color: #f2f2f2; color: #0a0a0a; } .navbar.is-white-dark .navbar-dropdown a.navbar-item.is-active { background-color: white; color: #0a0a0a; } } @media (prefers-color-scheme: dark) { .navbar.is-black-dark { background-color: #0a0a0a; color: white; } .navbar.is-black-dark .navbar-brand > .navbar-item, .navbar.is-black-dark .navbar-brand .navbar-link { color: white; } .navbar.is-black-dark .navbar-brand > a.navbar-item:hover, .navbar.is-black-dark .navbar-brand > a.navbar-item.is-active, .navbar.is-black-dark .navbar-brand .navbar-link:hover, .navbar.is-black-dark .navbar-brand .navbar-link.is-active { background-color: black; color: white; } .navbar.is-black-dark .navbar-brand .navbar-link::after { border-color: white; } .navbar.is-black-dark .navbar-burger { color: white; } } @media screen and (prefers-color-scheme: dark) and (min-width: 1024px) { .navbar.is-black-dark .navbar-start > .navbar-item, .navbar.is-black-dark .navbar-start .navbar-link, .navbar.is-black-dark .navbar-end > .navbar-item, .navbar.is-black-dark .navbar-end .navbar-link { color: white; } .navbar.is-black-dark .navbar-start > a.navbar-item:hover, .navbar.is-black-dark .navbar-start > a.navbar-item.is-active, .navbar.is-black-dark .navbar-start .navbar-link:hover, .navbar.is-black-dark .navbar-start .navbar-link.is-active, .navbar.is-black-dark .navbar-end > a.navbar-item:hover, .navbar.is-black-dark .navbar-end > a.navbar-item.is-active, .navbar.is-black-dark .navbar-end .navbar-link:hover, .navbar.is-black-dark .navbar-end .navbar-link.is-active { background-color: black; color: white; } .navbar.is-black-dark .navbar-start .navbar-link::after, .navbar.is-black-dark .navbar-end .navbar-link::after { border-color: white; } .navbar.is-black-dark .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-black-dark .navbar-item.has-dropdown.is-active .navbar-link { background-color: black; color: white; } .navbar.is-black-dark .navbar-dropdown a.navbar-item.is-active { background-color: #0a0a0a; color: white; } } @media (prefers-color-scheme: dark) { .navbar.is-light-dark { background-color: whitesmoke; color: rgba(0, 0, 0, 0.7); } .navbar.is-light-dark .navbar-brand > .navbar-item, .navbar.is-light-dark .navbar-brand .navbar-link { color: rgba(0, 0, 0, 0.7); } .navbar.is-light-dark .navbar-brand > a.navbar-item:hover, .navbar.is-light-dark .navbar-brand > a.navbar-item.is-active, .navbar.is-light-dark .navbar-brand .navbar-link:hover, .navbar.is-light-dark .navbar-brand .navbar-link.is-active { background-color: #e8e8e8; color: rgba(0, 0, 0, 0.7); } .navbar.is-light-dark .navbar-brand .navbar-link::after { border-color: rgba(0, 0, 0, 0.7); } .navbar.is-light-dark .navbar-burger { color: rgba(0, 0, 0, 0.7); } } @media screen and (prefers-color-scheme: dark) and (min-width: 1024px) { .navbar.is-light-dark .navbar-start > .navbar-item, .navbar.is-light-dark .navbar-start .navbar-link, .navbar.is-light-dark .navbar-end > .navbar-item, .navbar.is-light-dark .navbar-end .navbar-link { color: rgba(0, 0, 0, 0.7); } .navbar.is-light-dark .navbar-start > a.navbar-item:hover, .navbar.is-light-dark .navbar-start > a.navbar-item.is-active, .navbar.is-light-dark .navbar-start .navbar-link:hover, .navbar.is-light-dark .navbar-start .navbar-link.is-active, .navbar.is-light-dark .navbar-end > a.navbar-item:hover, .navbar.is-light-dark .navbar-end > a.navbar-item.is-active, .navbar.is-light-dark .navbar-end .navbar-link:hover, .navbar.is-light-dark .navbar-end .navbar-link.is-active { background-color: #e8e8e8; color: rgba(0, 0, 0, 0.7); } .navbar.is-light-dark .navbar-start .navbar-link::after, .navbar.is-light-dark .navbar-end .navbar-link::after { border-color: rgba(0, 0, 0, 0.7); } .navbar.is-light-dark .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-light-dark .navbar-item.has-dropdown.is-active .navbar-link { background-color: #e8e8e8; color: rgba(0, 0, 0, 0.7); } .navbar.is-light-dark .navbar-dropdown a.navbar-item.is-active { background-color: whitesmoke; color: rgba(0, 0, 0, 0.7); } } @media (prefers-color-scheme: dark) { .navbar.is-dark-dark { background-color: #363636; color: #fff; } .navbar.is-dark-dark .navbar-brand > .navbar-item, .navbar.is-dark-dark .navbar-brand .navbar-link { color: #fff; } .navbar.is-dark-dark .navbar-brand > a.navbar-item:hover, .navbar.is-dark-dark .navbar-brand > a.navbar-item.is-active, .navbar.is-dark-dark .navbar-brand .navbar-link:hover, .navbar.is-dark-dark .navbar-brand .navbar-link.is-active { background-color: #292929; color: #fff; } .navbar.is-dark-dark .navbar-brand .navbar-link::after { border-color: #fff; } .navbar.is-dark-dark .navbar-burger { color: #fff; } } @media screen and (prefers-color-scheme: dark) and (min-width: 1024px) { .navbar.is-dark-dark .navbar-start > .navbar-item, .navbar.is-dark-dark .navbar-start .navbar-link, .navbar.is-dark-dark .navbar-end > .navbar-item, .navbar.is-dark-dark .navbar-end .navbar-link { color: #fff; } .navbar.is-dark-dark .navbar-start > a.navbar-item:hover, .navbar.is-dark-dark .navbar-start > a.navbar-item.is-active, .navbar.is-dark-dark .navbar-start .navbar-link:hover, .navbar.is-dark-dark .navbar-start .navbar-link.is-active, .navbar.is-dark-dark .navbar-end > a.navbar-item:hover, .navbar.is-dark-dark .navbar-end > a.navbar-item.is-active, .navbar.is-dark-dark .navbar-end .navbar-link:hover, .navbar.is-dark-dark .navbar-end .navbar-link.is-active { background-color: #292929; color: #fff; } .navbar.is-dark-dark .navbar-start .navbar-link::after, .navbar.is-dark-dark .navbar-end .navbar-link::after { border-color: #fff; } .navbar.is-dark-dark .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-dark-dark .navbar-item.has-dropdown.is-active .navbar-link { background-color: #292929; color: #fff; } .navbar.is-dark-dark .navbar-dropdown a.navbar-item.is-active { background-color: #363636; color: #fff; } } @media (prefers-color-scheme: dark) { .navbar.is-primary-dark { background-color: #ff0d68; color: #fff; } .navbar.is-primary-dark .navbar-brand > .navbar-item, .navbar.is-primary-dark .navbar-brand .navbar-link { color: #fff; } .navbar.is-primary-dark .navbar-brand > a.navbar-item:hover, .navbar.is-primary-dark .navbar-brand > a.navbar-item.is-active, .navbar.is-primary-dark .navbar-brand .navbar-link:hover, .navbar.is-primary-dark .navbar-brand .navbar-link.is-active { background-color: #f3005b; color: #fff; } .navbar.is-primary-dark .navbar-brand .navbar-link::after { border-color: #fff; } .navbar.is-primary-dark .navbar-burger { color: #fff; } } @media screen and (prefers-color-scheme: dark) and (min-width: 1024px) { .navbar.is-primary-dark .navbar-start > .navbar-item, .navbar.is-primary-dark .navbar-start .navbar-link, .navbar.is-primary-dark .navbar-end > .navbar-item, .navbar.is-primary-dark .navbar-end .navbar-link { color: #fff; } .navbar.is-primary-dark .navbar-start > a.navbar-item:hover, .navbar.is-primary-dark .navbar-start > a.navbar-item.is-active, .navbar.is-primary-dark .navbar-start .navbar-link:hover, .navbar.is-primary-dark .navbar-start .navbar-link.is-active, .navbar.is-primary-dark .navbar-end > a.navbar-item:hover, .navbar.is-primary-dark .navbar-end > a.navbar-item.is-active, .navbar.is-primary-dark .navbar-end .navbar-link:hover, .navbar.is-primary-dark .navbar-end .navbar-link.is-active { background-color: #f3005b; color: #fff; } .navbar.is-primary-dark .navbar-start .navbar-link::after, .navbar.is-primary-dark .navbar-end .navbar-link::after { border-color: #fff; } .navbar.is-primary-dark .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-primary-dark .navbar-item.has-dropdown.is-active .navbar-link { background-color: #f3005b; color: #fff; } .navbar.is-primary-dark .navbar-dropdown a.navbar-item.is-active { background-color: #ff0d68; color: #fff; } } @media (prefers-color-scheme: dark) { .navbar.is-link-dark { background-color: #ff0d68; color: #fff; } .navbar.is-link-dark .navbar-brand > .navbar-item, .navbar.is-link-dark .navbar-brand .navbar-link { color: #fff; } .navbar.is-link-dark .navbar-brand > a.navbar-item:hover, .navbar.is-link-dark .navbar-brand > a.navbar-item.is-active, .navbar.is-link-dark .navbar-brand .navbar-link:hover, .navbar.is-link-dark .navbar-brand .navbar-link.is-active { background-color: #f3005b; color: #fff; } .navbar.is-link-dark .navbar-brand .navbar-link::after { border-color: #fff; } .navbar.is-link-dark .navbar-burger { color: #fff; } } @media screen and (prefers-color-scheme: dark) and (min-width: 1024px) { .navbar.is-link-dark .navbar-start > .navbar-item, .navbar.is-link-dark .navbar-start .navbar-link, .navbar.is-link-dark .navbar-end > .navbar-item, .navbar.is-link-dark .navbar-end .navbar-link { color: #fff; } .navbar.is-link-dark .navbar-start > a.navbar-item:hover, .navbar.is-link-dark .navbar-start > a.navbar-item.is-active, .navbar.is-link-dark .navbar-start .navbar-link:hover, .navbar.is-link-dark .navbar-start .navbar-link.is-active, .navbar.is-link-dark .navbar-end > a.navbar-item:hover, .navbar.is-link-dark .navbar-end > a.navbar-item.is-active, .navbar.is-link-dark .navbar-end .navbar-link:hover, .navbar.is-link-dark .navbar-end .navbar-link.is-active { background-color: #f3005b; color: #fff; } .navbar.is-link-dark .navbar-start .navbar-link::after, .navbar.is-link-dark .navbar-end .navbar-link::after { border-color: #fff; } .navbar.is-link-dark .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-link-dark .navbar-item.has-dropdown.is-active .navbar-link { background-color: #f3005b; color: #fff; } .navbar.is-link-dark .navbar-dropdown a.navbar-item.is-active { background-color: #ff0d68; color: #fff; } } @media (prefers-color-scheme: dark) { .navbar.is-info-dark { background-color: #0092FF; color: #fff; } .navbar.is-info-dark .navbar-brand > .navbar-item, .navbar.is-info-dark .navbar-brand .navbar-link { color: #fff; } .navbar.is-info-dark .navbar-brand > a.navbar-item:hover, .navbar.is-info-dark .navbar-brand > a.navbar-item.is-active, .navbar.is-info-dark .navbar-brand .navbar-link:hover, .navbar.is-info-dark .navbar-brand .navbar-link.is-active { background-color: #0083e6; color: #fff; } .navbar.is-info-dark .navbar-brand .navbar-link::after { border-color: #fff; } .navbar.is-info-dark .navbar-burger { color: #fff; } } @media screen and (prefers-color-scheme: dark) and (min-width: 1024px) { .navbar.is-info-dark .navbar-start > .navbar-item, .navbar.is-info-dark .navbar-start .navbar-link, .navbar.is-info-dark .navbar-end > .navbar-item, .navbar.is-info-dark .navbar-end .navbar-link { color: #fff; } .navbar.is-info-dark .navbar-start > a.navbar-item:hover, .navbar.is-info-dark .navbar-start > a.navbar-item.is-active, .navbar.is-info-dark .navbar-start .navbar-link:hover, .navbar.is-info-dark .navbar-start .navbar-link.is-active, .navbar.is-info-dark .navbar-end > a.navbar-item:hover, .navbar.is-info-dark .navbar-end > a.navbar-item.is-active, .navbar.is-info-dark .navbar-end .navbar-link:hover, .navbar.is-info-dark .navbar-end .navbar-link.is-active { background-color: #0083e6; color: #fff; } .navbar.is-info-dark .navbar-start .navbar-link::after, .navbar.is-info-dark .navbar-end .navbar-link::after { border-color: #fff; } .navbar.is-info-dark .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-info-dark .navbar-item.has-dropdown.is-active .navbar-link { background-color: #0083e6; color: #fff; } .navbar.is-info-dark .navbar-dropdown a.navbar-item.is-active { background-color: #0092FF; color: #fff; } } @media (prefers-color-scheme: dark) { .navbar.is-success-dark { background-color: #16DB93; color: rgba(0, 0, 0, 0.7); } .navbar.is-success-dark .navbar-brand > .navbar-item, .navbar.is-success-dark .navbar-brand .navbar-link { color: rgba(0, 0, 0, 0.7); } .navbar.is-success-dark .navbar-brand > a.navbar-item:hover, .navbar.is-success-dark .navbar-brand > a.navbar-item.is-active, .navbar.is-success-dark .navbar-brand .navbar-link:hover, .navbar.is-success-dark .navbar-brand .navbar-link.is-active { background-color: #14c483; color: rgba(0, 0, 0, 0.7); } .navbar.is-success-dark .navbar-brand .navbar-link::after { border-color: rgba(0, 0, 0, 0.7); } .navbar.is-success-dark .navbar-burger { color: rgba(0, 0, 0, 0.7); } } @media screen and (prefers-color-scheme: dark) and (min-width: 1024px) { .navbar.is-success-dark .navbar-start > .navbar-item, .navbar.is-success-dark .navbar-start .navbar-link, .navbar.is-success-dark .navbar-end > .navbar-item, .navbar.is-success-dark .navbar-end .navbar-link { color: rgba(0, 0, 0, 0.7); } .navbar.is-success-dark .navbar-start > a.navbar-item:hover, .navbar.is-success-dark .navbar-start > a.navbar-item.is-active, .navbar.is-success-dark .navbar-start .navbar-link:hover, .navbar.is-success-dark .navbar-start .navbar-link.is-active, .navbar.is-success-dark .navbar-end > a.navbar-item:hover, .navbar.is-success-dark .navbar-end > a.navbar-item.is-active, .navbar.is-success-dark .navbar-end .navbar-link:hover, .navbar.is-success-dark .navbar-end .navbar-link.is-active { background-color: #14c483; color: rgba(0, 0, 0, 0.7); } .navbar.is-success-dark .navbar-start .navbar-link::after, .navbar.is-success-dark .navbar-end .navbar-link::after { border-color: rgba(0, 0, 0, 0.7); } .navbar.is-success-dark .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-success-dark .navbar-item.has-dropdown.is-active .navbar-link { background-color: #14c483; color: rgba(0, 0, 0, 0.7); } .navbar.is-success-dark .navbar-dropdown a.navbar-item.is-active { background-color: #16DB93; color: rgba(0, 0, 0, 0.7); } } @media (prefers-color-scheme: dark) { .navbar.is-warning-dark { background-color: #FFE900; color: rgba(0, 0, 0, 0.7); } .navbar.is-warning-dark .navbar-brand > .navbar-item, .navbar.is-warning-dark .navbar-brand .navbar-link { color: rgba(0, 0, 0, 0.7); } .navbar.is-warning-dark .navbar-brand > a.navbar-item:hover, .navbar.is-warning-dark .navbar-brand > a.navbar-item.is-active, .navbar.is-warning-dark .navbar-brand .navbar-link:hover, .navbar.is-warning-dark .navbar-brand .navbar-link.is-active { background-color: #e6d200; color: rgba(0, 0, 0, 0.7); } .navbar.is-warning-dark .navbar-brand .navbar-link::after { border-color: rgba(0, 0, 0, 0.7); } .navbar.is-warning-dark .navbar-burger { color: rgba(0, 0, 0, 0.7); } } @media screen and (prefers-color-scheme: dark) and (min-width: 1024px) { .navbar.is-warning-dark .navbar-start > .navbar-item, .navbar.is-warning-dark .navbar-start .navbar-link, .navbar.is-warning-dark .navbar-end > .navbar-item, .navbar.is-warning-dark .navbar-end .navbar-link { color: rgba(0, 0, 0, 0.7); } .navbar.is-warning-dark .navbar-start > a.navbar-item:hover, .navbar.is-warning-dark .navbar-start > a.navbar-item.is-active, .navbar.is-warning-dark .navbar-start .navbar-link:hover, .navbar.is-warning-dark .navbar-start .navbar-link.is-active, .navbar.is-warning-dark .navbar-end > a.navbar-item:hover, .navbar.is-warning-dark .navbar-end > a.navbar-item.is-active, .navbar.is-warning-dark .navbar-end .navbar-link:hover, .navbar.is-warning-dark .navbar-end .navbar-link.is-active { background-color: #e6d200; color: rgba(0, 0, 0, 0.7); } .navbar.is-warning-dark .navbar-start .navbar-link::after, .navbar.is-warning-dark .navbar-end .navbar-link::after { border-color: rgba(0, 0, 0, 0.7); } .navbar.is-warning-dark .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-warning-dark .navbar-item.has-dropdown.is-active .navbar-link { background-color: #e6d200; color: rgba(0, 0, 0, 0.7); } .navbar.is-warning-dark .navbar-dropdown a.navbar-item.is-active { background-color: #FFE900; color: rgba(0, 0, 0, 0.7); } } @media (prefers-color-scheme: dark) { .navbar.is-danger-dark { background-color: #f14668; color: #fff; } .navbar.is-danger-dark .navbar-brand > .navbar-item, .navbar.is-danger-dark .navbar-brand .navbar-link { color: #fff; } .navbar.is-danger-dark .navbar-brand > a.navbar-item:hover, .navbar.is-danger-dark .navbar-brand > a.navbar-item.is-active, .navbar.is-danger-dark .navbar-brand .navbar-link:hover, .navbar.is-danger-dark .navbar-brand .navbar-link.is-active { background-color: #ef2e55; color: #fff; } .navbar.is-danger-dark .navbar-brand .navbar-link::after { border-color: #fff; } .navbar.is-danger-dark .navbar-burger { color: #fff; } } @media screen and (prefers-color-scheme: dark) and (min-width: 1024px) { .navbar.is-danger-dark .navbar-start > .navbar-item, .navbar.is-danger-dark .navbar-start .navbar-link, .navbar.is-danger-dark .navbar-end > .navbar-item, .navbar.is-danger-dark .navbar-end .navbar-link { color: #fff; } .navbar.is-danger-dark .navbar-start > a.navbar-item:hover, .navbar.is-danger-dark .navbar-start > a.navbar-item.is-active, .navbar.is-danger-dark .navbar-start .navbar-link:hover, .navbar.is-danger-dark .navbar-start .navbar-link.is-active, .navbar.is-danger-dark .navbar-end > a.navbar-item:hover, .navbar.is-danger-dark .navbar-end > a.navbar-item.is-active, .navbar.is-danger-dark .navbar-end .navbar-link:hover, .navbar.is-danger-dark .navbar-end .navbar-link.is-active { background-color: #ef2e55; color: #fff; } .navbar.is-danger-dark .navbar-start .navbar-link::after, .navbar.is-danger-dark .navbar-end .navbar-link::after { border-color: #fff; } .navbar.is-danger-dark .navbar-item.has-dropdown:hover .navbar-link, .navbar.is-danger-dark .navbar-item.has-dropdown.is-active .navbar-link { background-color: #ef2e55; color: #fff; } .navbar.is-danger-dark .navbar-dropdown a.navbar-item.is-active { background-color: #f14668; color: #fff; } } @media (prefers-color-scheme: dark) { .navbar.has-shadow { box-shadow: 0 2px 0 0 #242424; } .navbar.is-fixed-bottom.has-shadow { box-shadow: 0 -2px 0 0 #242424; } .navbar-burger { color: #b5b5b5; } .navbar-item, .navbar-link { color: #b5b5b5; } a.navbar-item:hover, a.navbar-item.is-active, .navbar-link:hover, .navbar-link.is-active { background-color: #121212; color: #e60056; } .navbar-item:hover { border-bottom-color: #e60056; } .navbar-item.is-active { border-bottom-color: #e60056; color: #e60056; } .navbar-link:not(.is-arrowless)::after { border-color: #e60056; } .navbar-divider { background-color: #242424; } } @media screen and (prefers-color-scheme: dark) and (max-width: 1023px) { .navbar-menu { background-color: #17181c; box-shadow: 0 8px 16px rgba(255, 255, 255, 0.1); } .navbar.is-fixed-bottom-touch.has-shadow { box-shadow: 0 -2px 3px rgba(255, 255, 255, 0.1); } } @media screen and (prefers-color-scheme: dark) and (min-width: 1024px) { .navbar.is-transparent .navbar-dropdown a.navbar-item:hover { background-color: #242424; color: white; } .navbar.is-transparent .navbar-dropdown a.navbar-item.is-active { background-color: #242424; color: #e60056; } .navbar-item.has-dropdown-up .navbar-dropdown { border-bottom: 2px solid #363636; box-shadow: 0 -8px 8px rgba(255, 255, 255, 0.1); } .navbar-dropdown { background-color: #0a0a0a; border-top: 2px solid #363636; box-shadow: 0 8px 8px rgba(255, 255, 255, 0.1); } .navbar-dropdown a.navbar-item:hover { background-color: #242424; color: white; } .navbar-dropdown a.navbar-item.is-active { background-color: #242424; color: #e60056; } .navbar.is-spaced .navbar-dropdown, .navbar-dropdown.is-boxed { box-shadow: 0 8px 8px rgba(255, 255, 255, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.1); } .navbar.is-fixed-bottom-desktop.has-shadow { box-shadow: 0 -2px 3px rgba(255, 255, 255, 0.1); } a.navbar-item.is-active, .navbar-link.is-active { color: white; } .navbar-item.has-dropdown:hover .navbar-link, .navbar-item.has-dropdown.is-active .navbar-link { background-color: #121212; } } @media (prefers-color-scheme: dark) { .pagination-previous, .pagination-next, .pagination-link { border-color: #363636; color: #dbdbdb; } .pagination-previous:hover, .pagination-next:hover, .pagination-link:hover { border-color: #4a4a4a; color: #dbdbdb; } .pagination-previous:focus, .pagination-next:focus, .pagination-link:focus { border-color: #5ea3e4; } .pagination-previous:active, .pagination-next:active, .pagination-link:active { box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.2); } .pagination-previous[disabled], .pagination-next[disabled], .pagination-link[disabled] { background-color: #363636; border-color: #363636; color: #7a7a7a; } .pagination-link.is-current { background-color: #e60056; border-color: #e60056; color: #fff; } .pagination-ellipsis { color: #4a4a4a; } .panel-heading, .panel-tabs, .panel-block { border-bottom: 1px solid #363636; border-left: 1px solid #363636; border-right: 1px solid #363636; } .panel-heading:first-child, .panel-tabs:first-child, .panel-block:first-child { border-top: 1px solid #363636; } .panel-heading { background-color: #242424; color: #dbdbdb; } .panel-tabs a { border-bottom: 1px solid #363636; } .panel-tabs a.is-active { border-bottom-color: #b5b5b5; color: #dbdbdb; } .panel-list a { color: #b5b5b5; } .panel-list a:hover { color: #e60056; } .panel-block { color: #dbdbdb; } .panel-block.is-active { border-left-color: #e60056; color: #dbdbdb; } .panel-block.is-active .panel-icon { color: #e60056; } a.panel-block:hover, label.panel-block:hover { background-color: #242424; } .tabs a { border-bottom-color: #363636; color: #b5b5b5; } .tabs a:hover { border-bottom-color: #dbdbdb; color: #dbdbdb; } .tabs li.is-active a { border-bottom-color: #e60056; color: #e60056; } .tabs ul { border-bottom-color: #363636; } .tabs.is-boxed a:hover { background-color: #242424; border-bottom-color: #363636; } .tabs.is-boxed li.is-active a { background-color: #0a0a0a; border-color: #363636; } .tabs.is-toggle a { border-color: #363636; } .tabs.is-toggle a:hover { background-color: #242424; border-color: #4a4a4a; } .tabs.is-toggle li.is-active a { background-color: #e60056; border-color: #e60056; color: #fff; } .hero.is-white, .hero.is-white-dark { background-color: #e6e6e6; color: #0a0a0a; } .hero.is-white a:not(.button):not(.dropdown-item):not(.tag), .hero.is-white strong, .hero.is-white-dark a:not(.button):not(.dropdown-item):not(.tag), .hero.is-white-dark strong { color: inherit; } .hero.is-white .title, .hero.is-white-dark .title { color: #0a0a0a; } .hero.is-white .subtitle, .hero.is-white-dark .subtitle { color: rgba(10, 10, 10, 0.9); } .hero.is-white .subtitle a:not(.button), .hero.is-white .subtitle strong, .hero.is-white-dark .subtitle a:not(.button), .hero.is-white-dark .subtitle strong { color: #0a0a0a; } } @media screen and (prefers-color-scheme: dark) and (max-width: 1023px) { .hero.is-white .navbar-menu, .hero.is-white-dark .navbar-menu { background-color: #e6e6e6; } } @media (prefers-color-scheme: dark) { .hero.is-white .navbar-item, .hero.is-white .navbar-link, .hero.is-white-dark .navbar-item, .hero.is-white-dark .navbar-link { color: rgba(10, 10, 10, 0.7); } .hero.is-white a.navbar-item:hover, .hero.is-white a.navbar-item.is-active, .hero.is-white .navbar-link:hover, .hero.is-white .navbar-link.is-active, .hero.is-white-dark a.navbar-item:hover, .hero.is-white-dark a.navbar-item.is-active, .hero.is-white-dark .navbar-link:hover, .hero.is-white-dark .navbar-link.is-active { background-color: #d9d9d9; color: #0a0a0a; } .hero.is-white .tabs a, .hero.is-white-dark .tabs a { color: #0a0a0a; opacity: 0.9; } .hero.is-white .tabs a:hover, .hero.is-white-dark .tabs a:hover { opacity: 1; } .hero.is-white .tabs li.is-active a, .hero.is-white-dark .tabs li.is-active a { opacity: 1; } .hero.is-white .tabs.is-boxed a, .hero.is-white .tabs.is-toggle a, .hero.is-white-dark .tabs.is-boxed a, .hero.is-white-dark .tabs.is-toggle a { color: #0a0a0a; } .hero.is-white .tabs.is-boxed a:hover, .hero.is-white .tabs.is-toggle a:hover, .hero.is-white-dark .tabs.is-boxed a:hover, .hero.is-white-dark .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-white .tabs.is-boxed li.is-active a, .hero.is-white .tabs.is-boxed li.is-active a:hover, .hero.is-white .tabs.is-toggle li.is-active a, .hero.is-white .tabs.is-toggle li.is-active a:hover, .hero.is-white-dark .tabs.is-boxed li.is-active a, .hero.is-white-dark .tabs.is-boxed li.is-active a:hover, .hero.is-white-dark .tabs.is-toggle li.is-active a, .hero.is-white-dark .tabs.is-toggle li.is-active a:hover { background-color: #0a0a0a; border-color: #0a0a0a; color: #e6e6e6; } .hero.is-white.is-bold, .hero.is-white-dark.is-bold { background-image: linear-gradient(141deg, #d1c7c9 0%, #e6e6e6 71%, #f3f2f2 100%); } } @media screen and (prefers-color-scheme: dark) and (max-width: 768px) { .hero.is-white.is-bold .navbar-menu, .hero.is-white-dark.is-bold .navbar-menu { background-image: linear-gradient(141deg, #d1c7c9 0%, #e6e6e6 71%, #f3f2f2 100%); } } @media (prefers-color-scheme: dark) { .hero.is-black, .hero.is-black-dark { background-color: black; color: white; } .hero.is-black a:not(.button):not(.dropdown-item):not(.tag), .hero.is-black strong, .hero.is-black-dark a:not(.button):not(.dropdown-item):not(.tag), .hero.is-black-dark strong { color: inherit; } .hero.is-black .title, .hero.is-black-dark .title { color: white; } .hero.is-black .subtitle, .hero.is-black-dark .subtitle { color: rgba(255, 255, 255, 0.9); } .hero.is-black .subtitle a:not(.button), .hero.is-black .subtitle strong, .hero.is-black-dark .subtitle a:not(.button), .hero.is-black-dark .subtitle strong { color: white; } } @media screen and (prefers-color-scheme: dark) and (max-width: 1023px) { .hero.is-black .navbar-menu, .hero.is-black-dark .navbar-menu { background-color: black; } } @media (prefers-color-scheme: dark) { .hero.is-black .navbar-item, .hero.is-black .navbar-link, .hero.is-black-dark .navbar-item, .hero.is-black-dark .navbar-link { color: rgba(255, 255, 255, 0.7); } .hero.is-black a.navbar-item:hover, .hero.is-black a.navbar-item.is-active, .hero.is-black .navbar-link:hover, .hero.is-black .navbar-link.is-active, .hero.is-black-dark a.navbar-item:hover, .hero.is-black-dark a.navbar-item.is-active, .hero.is-black-dark .navbar-link:hover, .hero.is-black-dark .navbar-link.is-active { background-color: black; color: white; } .hero.is-black .tabs a, .hero.is-black-dark .tabs a { color: white; opacity: 0.9; } .hero.is-black .tabs a:hover, .hero.is-black-dark .tabs a:hover { opacity: 1; } .hero.is-black .tabs li.is-active a, .hero.is-black-dark .tabs li.is-active a { opacity: 1; } .hero.is-black .tabs.is-boxed a, .hero.is-black .tabs.is-toggle a, .hero.is-black-dark .tabs.is-boxed a, .hero.is-black-dark .tabs.is-toggle a { color: white; } .hero.is-black .tabs.is-boxed a:hover, .hero.is-black .tabs.is-toggle a:hover, .hero.is-black-dark .tabs.is-boxed a:hover, .hero.is-black-dark .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-black .tabs.is-boxed li.is-active a, .hero.is-black .tabs.is-boxed li.is-active a:hover, .hero.is-black .tabs.is-toggle li.is-active a, .hero.is-black .tabs.is-toggle li.is-active a:hover, .hero.is-black-dark .tabs.is-boxed li.is-active a, .hero.is-black-dark .tabs.is-boxed li.is-active a:hover, .hero.is-black-dark .tabs.is-toggle li.is-active a, .hero.is-black-dark .tabs.is-toggle li.is-active a:hover { background-color: white; border-color: white; color: black; } .hero.is-black.is-bold, .hero.is-black-dark.is-bold { background-image: linear-gradient(141deg, black 0%, black 71%, #0d0c0c 100%); } } @media screen and (prefers-color-scheme: dark) and (max-width: 768px) { .hero.is-black.is-bold .navbar-menu, .hero.is-black-dark.is-bold .navbar-menu { background-image: linear-gradient(141deg, black 0%, black 71%, #0d0c0c 100%); } } @media (prefers-color-scheme: dark) { .hero.is-light, .hero.is-light-dark { background-color: #dbdbdb; color: rgba(0, 0, 0, 0.7); } .hero.is-light a:not(.button):not(.dropdown-item):not(.tag), .hero.is-light strong, .hero.is-light-dark a:not(.button):not(.dropdown-item):not(.tag), .hero.is-light-dark strong { color: inherit; } .hero.is-light .title, .hero.is-light-dark .title { color: rgba(0, 0, 0, 0.7); } .hero.is-light .subtitle, .hero.is-light-dark .subtitle { color: rgba(0, 0, 0, 0.9); } .hero.is-light .subtitle a:not(.button), .hero.is-light .subtitle strong, .hero.is-light-dark .subtitle a:not(.button), .hero.is-light-dark .subtitle strong { color: rgba(0, 0, 0, 0.7); } } @media screen and (prefers-color-scheme: dark) and (max-width: 1023px) { .hero.is-light .navbar-menu, .hero.is-light-dark .navbar-menu { background-color: #dbdbdb; } } @media (prefers-color-scheme: dark) { .hero.is-light .navbar-item, .hero.is-light .navbar-link, .hero.is-light-dark .navbar-item, .hero.is-light-dark .navbar-link { color: rgba(0, 0, 0, 0.7); } .hero.is-light a.navbar-item:hover, .hero.is-light a.navbar-item.is-active, .hero.is-light .navbar-link:hover, .hero.is-light .navbar-link.is-active, .hero.is-light-dark a.navbar-item:hover, .hero.is-light-dark a.navbar-item.is-active, .hero.is-light-dark .navbar-link:hover, .hero.is-light-dark .navbar-link.is-active { background-color: #cfcfcf; color: rgba(0, 0, 0, 0.7); } .hero.is-light .tabs a, .hero.is-light-dark .tabs a { color: rgba(0, 0, 0, 0.7); opacity: 0.9; } .hero.is-light .tabs a:hover, .hero.is-light-dark .tabs a:hover { opacity: 1; } .hero.is-light .tabs li.is-active a, .hero.is-light-dark .tabs li.is-active a { opacity: 1; } .hero.is-light .tabs.is-boxed a, .hero.is-light .tabs.is-toggle a, .hero.is-light-dark .tabs.is-boxed a, .hero.is-light-dark .tabs.is-toggle a { color: rgba(0, 0, 0, 0.7); } .hero.is-light .tabs.is-boxed a:hover, .hero.is-light .tabs.is-toggle a:hover, .hero.is-light-dark .tabs.is-boxed a:hover, .hero.is-light-dark .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-light .tabs.is-boxed li.is-active a, .hero.is-light .tabs.is-boxed li.is-active a:hover, .hero.is-light .tabs.is-toggle li.is-active a, .hero.is-light .tabs.is-toggle li.is-active a:hover, .hero.is-light-dark .tabs.is-boxed li.is-active a, .hero.is-light-dark .tabs.is-boxed li.is-active a:hover, .hero.is-light-dark .tabs.is-toggle li.is-active a, .hero.is-light-dark .tabs.is-toggle li.is-active a:hover { background-color: rgba(0, 0, 0, 0.7); border-color: rgba(0, 0, 0, 0.7); color: #dbdbdb; } .hero.is-light.is-bold, .hero.is-light-dark.is-bold { background-image: linear-gradient(141deg, #c8bcbe 0%, #dbdbdb 71%, #e9e7e7 100%); } } @media screen and (prefers-color-scheme: dark) and (max-width: 768px) { .hero.is-light.is-bold .navbar-menu, .hero.is-light-dark.is-bold .navbar-menu { background-image: linear-gradient(141deg, #c8bcbe 0%, #dbdbdb 71%, #e9e7e7 100%); } } @media (prefers-color-scheme: dark) { .hero.is-dark, .hero.is-dark-dark { background-color: #1c1c1c; color: #fff; } .hero.is-dark a:not(.button):not(.dropdown-item):not(.tag), .hero.is-dark strong, .hero.is-dark-dark a:not(.button):not(.dropdown-item):not(.tag), .hero.is-dark-dark strong { color: inherit; } .hero.is-dark .title, .hero.is-dark-dark .title { color: #fff; } .hero.is-dark .subtitle, .hero.is-dark-dark .subtitle { color: rgba(255, 255, 255, 0.9); } .hero.is-dark .subtitle a:not(.button), .hero.is-dark .subtitle strong, .hero.is-dark-dark .subtitle a:not(.button), .hero.is-dark-dark .subtitle strong { color: #fff; } } @media screen and (prefers-color-scheme: dark) and (max-width: 1023px) { .hero.is-dark .navbar-menu, .hero.is-dark-dark .navbar-menu { background-color: #1c1c1c; } } @media (prefers-color-scheme: dark) { .hero.is-dark .navbar-item, .hero.is-dark .navbar-link, .hero.is-dark-dark .navbar-item, .hero.is-dark-dark .navbar-link { color: rgba(255, 255, 255, 0.7); } .hero.is-dark a.navbar-item:hover, .hero.is-dark a.navbar-item.is-active, .hero.is-dark .navbar-link:hover, .hero.is-dark .navbar-link.is-active, .hero.is-dark-dark a.navbar-item:hover, .hero.is-dark-dark a.navbar-item.is-active, .hero.is-dark-dark .navbar-link:hover, .hero.is-dark-dark .navbar-link.is-active { background-color: #0f0f0f; color: #fff; } .hero.is-dark .tabs a, .hero.is-dark-dark .tabs a { color: #fff; opacity: 0.9; } .hero.is-dark .tabs a:hover, .hero.is-dark-dark .tabs a:hover { opacity: 1; } .hero.is-dark .tabs li.is-active a, .hero.is-dark-dark .tabs li.is-active a { opacity: 1; } .hero.is-dark .tabs.is-boxed a, .hero.is-dark .tabs.is-toggle a, .hero.is-dark-dark .tabs.is-boxed a, .hero.is-dark-dark .tabs.is-toggle a { color: #fff; } .hero.is-dark .tabs.is-boxed a:hover, .hero.is-dark .tabs.is-toggle a:hover, .hero.is-dark-dark .tabs.is-boxed a:hover, .hero.is-dark-dark .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-dark .tabs.is-boxed li.is-active a, .hero.is-dark .tabs.is-boxed li.is-active a:hover, .hero.is-dark .tabs.is-toggle li.is-active a, .hero.is-dark .tabs.is-toggle li.is-active a:hover, .hero.is-dark-dark .tabs.is-boxed li.is-active a, .hero.is-dark-dark .tabs.is-boxed li.is-active a:hover, .hero.is-dark-dark .tabs.is-toggle li.is-active a, .hero.is-dark-dark .tabs.is-toggle li.is-active a:hover { background-color: #fff; border-color: #fff; color: #1c1c1c; } .hero.is-dark.is-bold, .hero.is-dark-dark.is-bold { background-image: linear-gradient(141deg, #030202 0%, #1c1c1c 71%, #2b2727 100%); } } @media screen and (prefers-color-scheme: dark) and (max-width: 768px) { .hero.is-dark.is-bold .navbar-menu, .hero.is-dark-dark.is-bold .navbar-menu { background-image: linear-gradient(141deg, #030202 0%, #1c1c1c 71%, #2b2727 100%); } } @media (prefers-color-scheme: dark) { .hero.is-primary, .hero.is-primary-dark { background-color: #d90052; color: #fff; } .hero.is-primary a:not(.button):not(.dropdown-item):not(.tag), .hero.is-primary strong, .hero.is-primary-dark a:not(.button):not(.dropdown-item):not(.tag), .hero.is-primary-dark strong { color: inherit; } .hero.is-primary .title, .hero.is-primary-dark .title { color: #fff; } .hero.is-primary .subtitle, .hero.is-primary-dark .subtitle { color: rgba(255, 255, 255, 0.9); } .hero.is-primary .subtitle a:not(.button), .hero.is-primary .subtitle strong, .hero.is-primary-dark .subtitle a:not(.button), .hero.is-primary-dark .subtitle strong { color: #fff; } } @media screen and (prefers-color-scheme: dark) and (max-width: 1023px) { .hero.is-primary .navbar-menu, .hero.is-primary-dark .navbar-menu { background-color: #d90052; } } @media (prefers-color-scheme: dark) { .hero.is-primary .navbar-item, .hero.is-primary .navbar-link, .hero.is-primary-dark .navbar-item, .hero.is-primary-dark .navbar-link { color: rgba(255, 255, 255, 0.7); } .hero.is-primary a.navbar-item:hover, .hero.is-primary a.navbar-item.is-active, .hero.is-primary .navbar-link:hover, .hero.is-primary .navbar-link.is-active, .hero.is-primary-dark a.navbar-item:hover, .hero.is-primary-dark a.navbar-item.is-active, .hero.is-primary-dark .navbar-link:hover, .hero.is-primary-dark .navbar-link.is-active { background-color: #c00048; color: #fff; } .hero.is-primary .tabs a, .hero.is-primary-dark .tabs a { color: #fff; opacity: 0.9; } .hero.is-primary .tabs a:hover, .hero.is-primary-dark .tabs a:hover { opacity: 1; } .hero.is-primary .tabs li.is-active a, .hero.is-primary-dark .tabs li.is-active a { opacity: 1; } .hero.is-primary .tabs.is-boxed a, .hero.is-primary .tabs.is-toggle a, .hero.is-primary-dark .tabs.is-boxed a, .hero.is-primary-dark .tabs.is-toggle a { color: #fff; } .hero.is-primary .tabs.is-boxed a:hover, .hero.is-primary .tabs.is-toggle a:hover, .hero.is-primary-dark .tabs.is-boxed a:hover, .hero.is-primary-dark .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-primary .tabs.is-boxed li.is-active a, .hero.is-primary .tabs.is-boxed li.is-active a:hover, .hero.is-primary .tabs.is-toggle li.is-active a, .hero.is-primary .tabs.is-toggle li.is-active a:hover, .hero.is-primary-dark .tabs.is-boxed li.is-active a, .hero.is-primary-dark .tabs.is-boxed li.is-active a:hover, .hero.is-primary-dark .tabs.is-toggle li.is-active a, .hero.is-primary-dark .tabs.is-toggle li.is-active a:hover { background-color: #fff; border-color: #fff; color: #d90052; } .hero.is-primary.is-bold, .hero.is-primary-dark.is-bold { background-image: linear-gradient(141deg, #a6005a 0%, #d90052 71%, #f30033 100%); } } @media screen and (prefers-color-scheme: dark) and (max-width: 768px) { .hero.is-primary.is-bold .navbar-menu, .hero.is-primary-dark.is-bold .navbar-menu { background-image: linear-gradient(141deg, #a6005a 0%, #d90052 71%, #f30033 100%); } } @media (prefers-color-scheme: dark) { .hero.is-link, .hero.is-link-dark { background-color: #d90052; color: #fff; } .hero.is-link a:not(.button):not(.dropdown-item):not(.tag), .hero.is-link strong, .hero.is-link-dark a:not(.button):not(.dropdown-item):not(.tag), .hero.is-link-dark strong { color: inherit; } .hero.is-link .title, .hero.is-link-dark .title { color: #fff; } .hero.is-link .subtitle, .hero.is-link-dark .subtitle { color: rgba(255, 255, 255, 0.9); } .hero.is-link .subtitle a:not(.button), .hero.is-link .subtitle strong, .hero.is-link-dark .subtitle a:not(.button), .hero.is-link-dark .subtitle strong { color: #fff; } } @media screen and (prefers-color-scheme: dark) and (max-width: 1023px) { .hero.is-link .navbar-menu, .hero.is-link-dark .navbar-menu { background-color: #d90052; } } @media (prefers-color-scheme: dark) { .hero.is-link .navbar-item, .hero.is-link .navbar-link, .hero.is-link-dark .navbar-item, .hero.is-link-dark .navbar-link { color: rgba(255, 255, 255, 0.7); } .hero.is-link a.navbar-item:hover, .hero.is-link a.navbar-item.is-active, .hero.is-link .navbar-link:hover, .hero.is-link .navbar-link.is-active, .hero.is-link-dark a.navbar-item:hover, .hero.is-link-dark a.navbar-item.is-active, .hero.is-link-dark .navbar-link:hover, .hero.is-link-dark .navbar-link.is-active { background-color: #c00048; color: #fff; } .hero.is-link .tabs a, .hero.is-link-dark .tabs a { color: #fff; opacity: 0.9; } .hero.is-link .tabs a:hover, .hero.is-link-dark .tabs a:hover { opacity: 1; } .hero.is-link .tabs li.is-active a, .hero.is-link-dark .tabs li.is-active a { opacity: 1; } .hero.is-link .tabs.is-boxed a, .hero.is-link .tabs.is-toggle a, .hero.is-link-dark .tabs.is-boxed a, .hero.is-link-dark .tabs.is-toggle a { color: #fff; } .hero.is-link .tabs.is-boxed a:hover, .hero.is-link .tabs.is-toggle a:hover, .hero.is-link-dark .tabs.is-boxed a:hover, .hero.is-link-dark .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-link .tabs.is-boxed li.is-active a, .hero.is-link .tabs.is-boxed li.is-active a:hover, .hero.is-link .tabs.is-toggle li.is-active a, .hero.is-link .tabs.is-toggle li.is-active a:hover, .hero.is-link-dark .tabs.is-boxed li.is-active a, .hero.is-link-dark .tabs.is-boxed li.is-active a:hover, .hero.is-link-dark .tabs.is-toggle li.is-active a, .hero.is-link-dark .tabs.is-toggle li.is-active a:hover { background-color: #fff; border-color: #fff; color: #d90052; } .hero.is-link.is-bold, .hero.is-link-dark.is-bold { background-image: linear-gradient(141deg, #a6005a 0%, #d90052 71%, #f30033 100%); } } @media screen and (prefers-color-scheme: dark) and (max-width: 768px) { .hero.is-link.is-bold .navbar-menu, .hero.is-link-dark.is-bold .navbar-menu { background-image: linear-gradient(141deg, #a6005a 0%, #d90052 71%, #f30033 100%); } } @media (prefers-color-scheme: dark) { .hero.is-info, .hero.is-info-dark { background-color: #0075cc; color: #fff; } .hero.is-info a:not(.button):not(.dropdown-item):not(.tag), .hero.is-info strong, .hero.is-info-dark a:not(.button):not(.dropdown-item):not(.tag), .hero.is-info-dark strong { color: inherit; } .hero.is-info .title, .hero.is-info-dark .title { color: #fff; } .hero.is-info .subtitle, .hero.is-info-dark .subtitle { color: rgba(255, 255, 255, 0.9); } .hero.is-info .subtitle a:not(.button), .hero.is-info .subtitle strong, .hero.is-info-dark .subtitle a:not(.button), .hero.is-info-dark .subtitle strong { color: #fff; } } @media screen and (prefers-color-scheme: dark) and (max-width: 1023px) { .hero.is-info .navbar-menu, .hero.is-info-dark .navbar-menu { background-color: #0075cc; } } @media (prefers-color-scheme: dark) { .hero.is-info .navbar-item, .hero.is-info .navbar-link, .hero.is-info-dark .navbar-item, .hero.is-info-dark .navbar-link { color: rgba(255, 255, 255, 0.7); } .hero.is-info a.navbar-item:hover, .hero.is-info a.navbar-item.is-active, .hero.is-info .navbar-link:hover, .hero.is-info .navbar-link.is-active, .hero.is-info-dark a.navbar-item:hover, .hero.is-info-dark a.navbar-item.is-active, .hero.is-info-dark .navbar-link:hover, .hero.is-info-dark .navbar-link.is-active { background-color: #0066b3; color: #fff; } .hero.is-info .tabs a, .hero.is-info-dark .tabs a { color: #fff; opacity: 0.9; } .hero.is-info .tabs a:hover, .hero.is-info-dark .tabs a:hover { opacity: 1; } .hero.is-info .tabs li.is-active a, .hero.is-info-dark .tabs li.is-active a { opacity: 1; } .hero.is-info .tabs.is-boxed a, .hero.is-info .tabs.is-toggle a, .hero.is-info-dark .tabs.is-boxed a, .hero.is-info-dark .tabs.is-toggle a { color: #fff; } .hero.is-info .tabs.is-boxed a:hover, .hero.is-info .tabs.is-toggle a:hover, .hero.is-info-dark .tabs.is-boxed a:hover, .hero.is-info-dark .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-info .tabs.is-boxed li.is-active a, .hero.is-info .tabs.is-boxed li.is-active a:hover, .hero.is-info .tabs.is-toggle li.is-active a, .hero.is-info .tabs.is-toggle li.is-active a:hover, .hero.is-info-dark .tabs.is-boxed li.is-active a, .hero.is-info-dark .tabs.is-boxed li.is-active a:hover, .hero.is-info-dark .tabs.is-toggle li.is-active a, .hero.is-info-dark .tabs.is-toggle li.is-active a:hover { background-color: #fff; border-color: #fff; color: #0075cc; } .hero.is-info.is-bold, .hero.is-info-dark.is-bold { background-image: linear-gradient(141deg, #007199 0%, #0075cc 71%, #005de6 100%); } } @media screen and (prefers-color-scheme: dark) and (max-width: 768px) { .hero.is-info.is-bold .navbar-menu, .hero.is-info-dark.is-bold .navbar-menu { background-image: linear-gradient(141deg, #007199 0%, #0075cc 71%, #005de6 100%); } } @media (prefers-color-scheme: dark) { .hero.is-success, .hero.is-success-dark { background-color: #11ad74; color: rgba(0, 0, 0, 0.7); } .hero.is-success a:not(.button):not(.dropdown-item):not(.tag), .hero.is-success strong, .hero.is-success-dark a:not(.button):not(.dropdown-item):not(.tag), .hero.is-success-dark strong { color: inherit; } .hero.is-success .title, .hero.is-success-dark .title { color: rgba(0, 0, 0, 0.7); } .hero.is-success .subtitle, .hero.is-success-dark .subtitle { color: rgba(0, 0, 0, 0.9); } .hero.is-success .subtitle a:not(.button), .hero.is-success .subtitle strong, .hero.is-success-dark .subtitle a:not(.button), .hero.is-success-dark .subtitle strong { color: rgba(0, 0, 0, 0.7); } } @media screen and (prefers-color-scheme: dark) and (max-width: 1023px) { .hero.is-success .navbar-menu, .hero.is-success-dark .navbar-menu { background-color: #11ad74; } } @media (prefers-color-scheme: dark) { .hero.is-success .navbar-item, .hero.is-success .navbar-link, .hero.is-success-dark .navbar-item, .hero.is-success-dark .navbar-link { color: rgba(0, 0, 0, 0.7); } .hero.is-success a.navbar-item:hover, .hero.is-success a.navbar-item.is-active, .hero.is-success .navbar-link:hover, .hero.is-success .navbar-link.is-active, .hero.is-success-dark a.navbar-item:hover, .hero.is-success-dark a.navbar-item.is-active, .hero.is-success-dark .navbar-link:hover, .hero.is-success-dark .navbar-link.is-active { background-color: #0f9564; color: rgba(0, 0, 0, 0.7); } .hero.is-success .tabs a, .hero.is-success-dark .tabs a { color: rgba(0, 0, 0, 0.7); opacity: 0.9; } .hero.is-success .tabs a:hover, .hero.is-success-dark .tabs a:hover { opacity: 1; } .hero.is-success .tabs li.is-active a, .hero.is-success-dark .tabs li.is-active a { opacity: 1; } .hero.is-success .tabs.is-boxed a, .hero.is-success .tabs.is-toggle a, .hero.is-success-dark .tabs.is-boxed a, .hero.is-success-dark .tabs.is-toggle a { color: rgba(0, 0, 0, 0.7); } .hero.is-success .tabs.is-boxed a:hover, .hero.is-success .tabs.is-toggle a:hover, .hero.is-success-dark .tabs.is-boxed a:hover, .hero.is-success-dark .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-success .tabs.is-boxed li.is-active a, .hero.is-success .tabs.is-boxed li.is-active a:hover, .hero.is-success .tabs.is-toggle li.is-active a, .hero.is-success .tabs.is-toggle li.is-active a:hover, .hero.is-success-dark .tabs.is-boxed li.is-active a, .hero.is-success-dark .tabs.is-boxed li.is-active a:hover, .hero.is-success-dark .tabs.is-toggle li.is-active a, .hero.is-success-dark .tabs.is-toggle li.is-active a:hover { background-color: rgba(0, 0, 0, 0.7); border-color: rgba(0, 0, 0, 0.7); color: #11ad74; } .hero.is-success.is-bold, .hero.is-success-dark.is-bold { background-image: linear-gradient(141deg, #068541 0%, #11ad74 71%, #0ec9a4 100%); } } @media screen and (prefers-color-scheme: dark) and (max-width: 768px) { .hero.is-success.is-bold .navbar-menu, .hero.is-success-dark.is-bold .navbar-menu { background-image: linear-gradient(141deg, #068541 0%, #11ad74 71%, #0ec9a4 100%); } } @media (prefers-color-scheme: dark) { .hero.is-warning, .hero.is-warning-dark { background-color: #ccba00; color: rgba(0, 0, 0, 0.7); } .hero.is-warning a:not(.button):not(.dropdown-item):not(.tag), .hero.is-warning strong, .hero.is-warning-dark a:not(.button):not(.dropdown-item):not(.tag), .hero.is-warning-dark strong { color: inherit; } .hero.is-warning .title, .hero.is-warning-dark .title { color: rgba(0, 0, 0, 0.7); } .hero.is-warning .subtitle, .hero.is-warning-dark .subtitle { color: rgba(0, 0, 0, 0.9); } .hero.is-warning .subtitle a:not(.button), .hero.is-warning .subtitle strong, .hero.is-warning-dark .subtitle a:not(.button), .hero.is-warning-dark .subtitle strong { color: rgba(0, 0, 0, 0.7); } } @media screen and (prefers-color-scheme: dark) and (max-width: 1023px) { .hero.is-warning .navbar-menu, .hero.is-warning-dark .navbar-menu { background-color: #ccba00; } } @media (prefers-color-scheme: dark) { .hero.is-warning .navbar-item, .hero.is-warning .navbar-link, .hero.is-warning-dark .navbar-item, .hero.is-warning-dark .navbar-link { color: rgba(0, 0, 0, 0.7); } .hero.is-warning a.navbar-item:hover, .hero.is-warning a.navbar-item.is-active, .hero.is-warning .navbar-link:hover, .hero.is-warning .navbar-link.is-active, .hero.is-warning-dark a.navbar-item:hover, .hero.is-warning-dark a.navbar-item.is-active, .hero.is-warning-dark .navbar-link:hover, .hero.is-warning-dark .navbar-link.is-active { background-color: #b3a300; color: rgba(0, 0, 0, 0.7); } .hero.is-warning .tabs a, .hero.is-warning-dark .tabs a { color: rgba(0, 0, 0, 0.7); opacity: 0.9; } .hero.is-warning .tabs a:hover, .hero.is-warning-dark .tabs a:hover { opacity: 1; } .hero.is-warning .tabs li.is-active a, .hero.is-warning-dark .tabs li.is-active a { opacity: 1; } .hero.is-warning .tabs.is-boxed a, .hero.is-warning .tabs.is-toggle a, .hero.is-warning-dark .tabs.is-boxed a, .hero.is-warning-dark .tabs.is-toggle a { color: rgba(0, 0, 0, 0.7); } .hero.is-warning .tabs.is-boxed a:hover, .hero.is-warning .tabs.is-toggle a:hover, .hero.is-warning-dark .tabs.is-boxed a:hover, .hero.is-warning-dark .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-warning .tabs.is-boxed li.is-active a, .hero.is-warning .tabs.is-boxed li.is-active a:hover, .hero.is-warning .tabs.is-toggle li.is-active a, .hero.is-warning .tabs.is-toggle li.is-active a:hover, .hero.is-warning-dark .tabs.is-boxed li.is-active a, .hero.is-warning-dark .tabs.is-boxed li.is-active a:hover, .hero.is-warning-dark .tabs.is-toggle li.is-active a, .hero.is-warning-dark .tabs.is-toggle li.is-active a:hover { background-color: rgba(0, 0, 0, 0.7); border-color: rgba(0, 0, 0, 0.7); color: #ccba00; } .hero.is-warning.is-bold, .hero.is-warning-dark.is-bold { background-image: linear-gradient(141deg, #997200 0%, #ccba00 71%, #d3e600 100%); } } @media screen and (prefers-color-scheme: dark) and (max-width: 768px) { .hero.is-warning.is-bold .navbar-menu, .hero.is-warning-dark.is-bold .navbar-menu { background-image: linear-gradient(141deg, #997200 0%, #ccba00 71%, #d3e600 100%); } } @media (prefers-color-scheme: dark) { .hero.is-danger, .hero.is-danger-dark { background-color: #ee1742; color: #fff; } .hero.is-danger a:not(.button):not(.dropdown-item):not(.tag), .hero.is-danger strong, .hero.is-danger-dark a:not(.button):not(.dropdown-item):not(.tag), .hero.is-danger-dark strong { color: inherit; } .hero.is-danger .title, .hero.is-danger-dark .title { color: #fff; } .hero.is-danger .subtitle, .hero.is-danger-dark .subtitle { color: rgba(255, 255, 255, 0.9); } .hero.is-danger .subtitle a:not(.button), .hero.is-danger .subtitle strong, .hero.is-danger-dark .subtitle a:not(.button), .hero.is-danger-dark .subtitle strong { color: #fff; } } @media screen and (prefers-color-scheme: dark) and (max-width: 1023px) { .hero.is-danger .navbar-menu, .hero.is-danger-dark .navbar-menu { background-color: #ee1742; } } @media (prefers-color-scheme: dark) { .hero.is-danger .navbar-item, .hero.is-danger .navbar-link, .hero.is-danger-dark .navbar-item, .hero.is-danger-dark .navbar-link { color: rgba(255, 255, 255, 0.7); } .hero.is-danger a.navbar-item:hover, .hero.is-danger a.navbar-item.is-active, .hero.is-danger .navbar-link:hover, .hero.is-danger .navbar-link.is-active, .hero.is-danger-dark a.navbar-item:hover, .hero.is-danger-dark a.navbar-item.is-active, .hero.is-danger-dark .navbar-link:hover, .hero.is-danger-dark .navbar-link.is-active { background-color: #da1039; color: #fff; } .hero.is-danger .tabs a, .hero.is-danger-dark .tabs a { color: #fff; opacity: 0.9; } .hero.is-danger .tabs a:hover, .hero.is-danger-dark .tabs a:hover { opacity: 1; } .hero.is-danger .tabs li.is-active a, .hero.is-danger-dark .tabs li.is-active a { opacity: 1; } .hero.is-danger .tabs.is-boxed a, .hero.is-danger .tabs.is-toggle a, .hero.is-danger-dark .tabs.is-boxed a, .hero.is-danger-dark .tabs.is-toggle a { color: #fff; } .hero.is-danger .tabs.is-boxed a:hover, .hero.is-danger .tabs.is-toggle a:hover, .hero.is-danger-dark .tabs.is-boxed a:hover, .hero.is-danger-dark .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-danger .tabs.is-boxed li.is-active a, .hero.is-danger .tabs.is-boxed li.is-active a:hover, .hero.is-danger .tabs.is-toggle li.is-active a, .hero.is-danger .tabs.is-toggle li.is-active a:hover, .hero.is-danger-dark .tabs.is-boxed li.is-active a, .hero.is-danger-dark .tabs.is-boxed li.is-active a:hover, .hero.is-danger-dark .tabs.is-toggle li.is-active a, .hero.is-danger-dark .tabs.is-toggle li.is-active a:hover { background-color: #fff; border-color: #fff; color: #ee1742; } .hero.is-danger.is-bold, .hero.is-danger-dark.is-bold { background-image: linear-gradient(141deg, #cd044e 0%, #ee1742 71%, #f52930 100%); } } @media screen and (prefers-color-scheme: dark) and (max-width: 768px) { .hero.is-danger.is-bold .navbar-menu, .hero.is-danger-dark.is-bold .navbar-menu { background-image: linear-gradient(141deg, #cd044e 0%, #ee1742 71%, #f52930 100%); } } @media (prefers-color-scheme: dark) { .hero.is-white-dark { background-color: white; color: #0a0a0a; } .hero.is-white-dark a:not(.button):not(.dropdown-item):not(.tag), .hero.is-white-dark strong { color: inherit; } .hero.is-white-dark .title { color: #0a0a0a; } .hero.is-white-dark .subtitle { color: rgba(10, 10, 10, 0.9); } .hero.is-white-dark .subtitle a:not(.button), .hero.is-white-dark .subtitle strong { color: #0a0a0a; } } @media screen and (prefers-color-scheme: dark) and (max-width: 1023px) { .hero.is-white-dark .navbar-menu { background-color: white; } } @media (prefers-color-scheme: dark) { .hero.is-white-dark .navbar-item, .hero.is-white-dark .navbar-link { color: rgba(10, 10, 10, 0.7); } .hero.is-white-dark a.navbar-item:hover, .hero.is-white-dark a.navbar-item.is-active, .hero.is-white-dark .navbar-link:hover, .hero.is-white-dark .navbar-link.is-active { background-color: #f2f2f2; color: #0a0a0a; } .hero.is-white-dark .tabs a { color: #0a0a0a; opacity: 0.9; } .hero.is-white-dark .tabs a:hover { opacity: 1; } .hero.is-white-dark .tabs li.is-active a { opacity: 1; } .hero.is-white-dark .tabs.is-boxed a, .hero.is-white-dark .tabs.is-toggle a { color: #0a0a0a; } .hero.is-white-dark .tabs.is-boxed a:hover, .hero.is-white-dark .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-white-dark .tabs.is-boxed li.is-active a, .hero.is-white-dark .tabs.is-boxed li.is-active a:hover, .hero.is-white-dark .tabs.is-toggle li.is-active a, .hero.is-white-dark .tabs.is-toggle li.is-active a:hover { background-color: #0a0a0a; border-color: #0a0a0a; color: white; } .hero.is-white-dark.is-bold { background-image: linear-gradient(141deg, #e8e3e4 0%, white 71%, white 100%); } } @media screen and (prefers-color-scheme: dark) and (max-width: 768px) { .hero.is-white-dark.is-bold .navbar-menu { background-image: linear-gradient(141deg, #e8e3e4 0%, white 71%, white 100%); } } @media (prefers-color-scheme: dark) { .hero.is-black-dark { background-color: #0a0a0a; color: white; } .hero.is-black-dark a:not(.button):not(.dropdown-item):not(.tag), .hero.is-black-dark strong { color: inherit; } .hero.is-black-dark .title { color: white; } .hero.is-black-dark .subtitle { color: rgba(255, 255, 255, 0.9); } .hero.is-black-dark .subtitle a:not(.button), .hero.is-black-dark .subtitle strong { color: white; } } @media screen and (prefers-color-scheme: dark) and (max-width: 1023px) { .hero.is-black-dark .navbar-menu { background-color: #0a0a0a; } } @media (prefers-color-scheme: dark) { .hero.is-black-dark .navbar-item, .hero.is-black-dark .navbar-link { color: rgba(255, 255, 255, 0.7); } .hero.is-black-dark a.navbar-item:hover, .hero.is-black-dark a.navbar-item.is-active, .hero.is-black-dark .navbar-link:hover, .hero.is-black-dark .navbar-link.is-active { background-color: black; color: white; } .hero.is-black-dark .tabs a { color: white; opacity: 0.9; } .hero.is-black-dark .tabs a:hover { opacity: 1; } .hero.is-black-dark .tabs li.is-active a { opacity: 1; } .hero.is-black-dark .tabs.is-boxed a, .hero.is-black-dark .tabs.is-toggle a { color: white; } .hero.is-black-dark .tabs.is-boxed a:hover, .hero.is-black-dark .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-black-dark .tabs.is-boxed li.is-active a, .hero.is-black-dark .tabs.is-boxed li.is-active a:hover, .hero.is-black-dark .tabs.is-toggle li.is-active a, .hero.is-black-dark .tabs.is-toggle li.is-active a:hover { background-color: white; border-color: white; color: #0a0a0a; } .hero.is-black-dark.is-bold { background-image: linear-gradient(141deg, black 0%, #0a0a0a 71%, #181616 100%); } } @media screen and (prefers-color-scheme: dark) and (max-width: 768px) { .hero.is-black-dark.is-bold .navbar-menu { background-image: linear-gradient(141deg, black 0%, #0a0a0a 71%, #181616 100%); } } @media (prefers-color-scheme: dark) { .hero.is-light-dark { background-color: whitesmoke; color: rgba(0, 0, 0, 0.7); } .hero.is-light-dark a:not(.button):not(.dropdown-item):not(.tag), .hero.is-light-dark strong { color: inherit; } .hero.is-light-dark .title { color: rgba(0, 0, 0, 0.7); } .hero.is-light-dark .subtitle { color: rgba(0, 0, 0, 0.9); } .hero.is-light-dark .subtitle a:not(.button), .hero.is-light-dark .subtitle strong { color: rgba(0, 0, 0, 0.7); } } @media screen and (prefers-color-scheme: dark) and (max-width: 1023px) { .hero.is-light-dark .navbar-menu { background-color: whitesmoke; } } @media (prefers-color-scheme: dark) { .hero.is-light-dark .navbar-item, .hero.is-light-dark .navbar-link { color: rgba(0, 0, 0, 0.7); } .hero.is-light-dark a.navbar-item:hover, .hero.is-light-dark a.navbar-item.is-active, .hero.is-light-dark .navbar-link:hover, .hero.is-light-dark .navbar-link.is-active { background-color: #e8e8e8; color: rgba(0, 0, 0, 0.7); } .hero.is-light-dark .tabs a { color: rgba(0, 0, 0, 0.7); opacity: 0.9; } .hero.is-light-dark .tabs a:hover { opacity: 1; } .hero.is-light-dark .tabs li.is-active a { opacity: 1; } .hero.is-light-dark .tabs.is-boxed a, .hero.is-light-dark .tabs.is-toggle a { color: rgba(0, 0, 0, 0.7); } .hero.is-light-dark .tabs.is-boxed a:hover, .hero.is-light-dark .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-light-dark .tabs.is-boxed li.is-active a, .hero.is-light-dark .tabs.is-boxed li.is-active a:hover, .hero.is-light-dark .tabs.is-toggle li.is-active a, .hero.is-light-dark .tabs.is-toggle li.is-active a:hover { background-color: rgba(0, 0, 0, 0.7); border-color: rgba(0, 0, 0, 0.7); color: whitesmoke; } .hero.is-light-dark.is-bold { background-image: linear-gradient(141deg, #dfd8d9 0%, whitesmoke 71%, white 100%); } } @media screen and (prefers-color-scheme: dark) and (max-width: 768px) { .hero.is-light-dark.is-bold .navbar-menu { background-image: linear-gradient(141deg, #dfd8d9 0%, whitesmoke 71%, white 100%); } } @media (prefers-color-scheme: dark) { .hero.is-dark-dark { background-color: #363636; color: #fff; } .hero.is-dark-dark a:not(.button):not(.dropdown-item):not(.tag), .hero.is-dark-dark strong { color: inherit; } .hero.is-dark-dark .title { color: #fff; } .hero.is-dark-dark .subtitle { color: rgba(255, 255, 255, 0.9); } .hero.is-dark-dark .subtitle a:not(.button), .hero.is-dark-dark .subtitle strong { color: #fff; } } @media screen and (prefers-color-scheme: dark) and (max-width: 1023px) { .hero.is-dark-dark .navbar-menu { background-color: #363636; } } @media (prefers-color-scheme: dark) { .hero.is-dark-dark .navbar-item, .hero.is-dark-dark .navbar-link { color: rgba(255, 255, 255, 0.7); } .hero.is-dark-dark a.navbar-item:hover, .hero.is-dark-dark a.navbar-item.is-active, .hero.is-dark-dark .navbar-link:hover, .hero.is-dark-dark .navbar-link.is-active { background-color: #292929; color: #fff; } .hero.is-dark-dark .tabs a { color: #fff; opacity: 0.9; } .hero.is-dark-dark .tabs a:hover { opacity: 1; } .hero.is-dark-dark .tabs li.is-active a { opacity: 1; } .hero.is-dark-dark .tabs.is-boxed a, .hero.is-dark-dark .tabs.is-toggle a { color: #fff; } .hero.is-dark-dark .tabs.is-boxed a:hover, .hero.is-dark-dark .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-dark-dark .tabs.is-boxed li.is-active a, .hero.is-dark-dark .tabs.is-boxed li.is-active a:hover, .hero.is-dark-dark .tabs.is-toggle li.is-active a, .hero.is-dark-dark .tabs.is-toggle li.is-active a:hover { background-color: #fff; border-color: #fff; color: #363636; } .hero.is-dark-dark.is-bold { background-image: linear-gradient(141deg, #1f191a 0%, #363636 71%, #46403f 100%); } } @media screen and (prefers-color-scheme: dark) and (max-width: 768px) { .hero.is-dark-dark.is-bold .navbar-menu { background-image: linear-gradient(141deg, #1f191a 0%, #363636 71%, #46403f 100%); } } @media (prefers-color-scheme: dark) { .hero.is-primary-dark { background-color: #ff0d68; color: #fff; } .hero.is-primary-dark a:not(.button):not(.dropdown-item):not(.tag), .hero.is-primary-dark strong { color: inherit; } .hero.is-primary-dark .title { color: #fff; } .hero.is-primary-dark .subtitle { color: rgba(255, 255, 255, 0.9); } .hero.is-primary-dark .subtitle a:not(.button), .hero.is-primary-dark .subtitle strong { color: #fff; } } @media screen and (prefers-color-scheme: dark) and (max-width: 1023px) { .hero.is-primary-dark .navbar-menu { background-color: #ff0d68; } } @media (prefers-color-scheme: dark) { .hero.is-primary-dark .navbar-item, .hero.is-primary-dark .navbar-link { color: rgba(255, 255, 255, 0.7); } .hero.is-primary-dark a.navbar-item:hover, .hero.is-primary-dark a.navbar-item.is-active, .hero.is-primary-dark .navbar-link:hover, .hero.is-primary-dark .navbar-link.is-active { background-color: #f3005b; color: #fff; } .hero.is-primary-dark .tabs a { color: #fff; opacity: 0.9; } .hero.is-primary-dark .tabs a:hover { opacity: 1; } .hero.is-primary-dark .tabs li.is-active a { opacity: 1; } .hero.is-primary-dark .tabs.is-boxed a, .hero.is-primary-dark .tabs.is-toggle a { color: #fff; } .hero.is-primary-dark .tabs.is-boxed a:hover, .hero.is-primary-dark .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-primary-dark .tabs.is-boxed li.is-active a, .hero.is-primary-dark .tabs.is-boxed li.is-active a:hover, .hero.is-primary-dark .tabs.is-toggle li.is-active a, .hero.is-primary-dark .tabs.is-toggle li.is-active a:hover { background-color: #fff; border-color: #fff; color: #ff0d68; } .hero.is-primary-dark.is-bold { background-image: linear-gradient(141deg, #d90076 0%, #ff0d68 71%, #ff2754 100%); } } @media screen and (prefers-color-scheme: dark) and (max-width: 768px) { .hero.is-primary-dark.is-bold .navbar-menu { background-image: linear-gradient(141deg, #d90076 0%, #ff0d68 71%, #ff2754 100%); } } @media (prefers-color-scheme: dark) { .hero.is-link-dark { background-color: #ff0d68; color: #fff; } .hero.is-link-dark a:not(.button):not(.dropdown-item):not(.tag), .hero.is-link-dark strong { color: inherit; } .hero.is-link-dark .title { color: #fff; } .hero.is-link-dark .subtitle { color: rgba(255, 255, 255, 0.9); } .hero.is-link-dark .subtitle a:not(.button), .hero.is-link-dark .subtitle strong { color: #fff; } } @media screen and (prefers-color-scheme: dark) and (max-width: 1023px) { .hero.is-link-dark .navbar-menu { background-color: #ff0d68; } } @media (prefers-color-scheme: dark) { .hero.is-link-dark .navbar-item, .hero.is-link-dark .navbar-link { color: rgba(255, 255, 255, 0.7); } .hero.is-link-dark a.navbar-item:hover, .hero.is-link-dark a.navbar-item.is-active, .hero.is-link-dark .navbar-link:hover, .hero.is-link-dark .navbar-link.is-active { background-color: #f3005b; color: #fff; } .hero.is-link-dark .tabs a { color: #fff; opacity: 0.9; } .hero.is-link-dark .tabs a:hover { opacity: 1; } .hero.is-link-dark .tabs li.is-active a { opacity: 1; } .hero.is-link-dark .tabs.is-boxed a, .hero.is-link-dark .tabs.is-toggle a { color: #fff; } .hero.is-link-dark .tabs.is-boxed a:hover, .hero.is-link-dark .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-link-dark .tabs.is-boxed li.is-active a, .hero.is-link-dark .tabs.is-boxed li.is-active a:hover, .hero.is-link-dark .tabs.is-toggle li.is-active a, .hero.is-link-dark .tabs.is-toggle li.is-active a:hover { background-color: #fff; border-color: #fff; color: #ff0d68; } .hero.is-link-dark.is-bold { background-image: linear-gradient(141deg, #d90076 0%, #ff0d68 71%, #ff2754 100%); } } @media screen and (prefers-color-scheme: dark) and (max-width: 768px) { .hero.is-link-dark.is-bold .navbar-menu { background-image: linear-gradient(141deg, #d90076 0%, #ff0d68 71%, #ff2754 100%); } } @media (prefers-color-scheme: dark) { .hero.is-info-dark { background-color: #0092FF; color: #fff; } .hero.is-info-dark a:not(.button):not(.dropdown-item):not(.tag), .hero.is-info-dark strong { color: inherit; } .hero.is-info-dark .title { color: #fff; } .hero.is-info-dark .subtitle { color: rgba(255, 255, 255, 0.9); } .hero.is-info-dark .subtitle a:not(.button), .hero.is-info-dark .subtitle strong { color: #fff; } } @media screen and (prefers-color-scheme: dark) and (max-width: 1023px) { .hero.is-info-dark .navbar-menu { background-color: #0092FF; } } @media (prefers-color-scheme: dark) { .hero.is-info-dark .navbar-item, .hero.is-info-dark .navbar-link { color: rgba(255, 255, 255, 0.7); } .hero.is-info-dark a.navbar-item:hover, .hero.is-info-dark a.navbar-item.is-active, .hero.is-info-dark .navbar-link:hover, .hero.is-info-dark .navbar-link.is-active { background-color: #0083e6; color: #fff; } .hero.is-info-dark .tabs a { color: #fff; opacity: 0.9; } .hero.is-info-dark .tabs a:hover { opacity: 1; } .hero.is-info-dark .tabs li.is-active a { opacity: 1; } .hero.is-info-dark .tabs.is-boxed a, .hero.is-info-dark .tabs.is-toggle a { color: #fff; } .hero.is-info-dark .tabs.is-boxed a:hover, .hero.is-info-dark .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-info-dark .tabs.is-boxed li.is-active a, .hero.is-info-dark .tabs.is-boxed li.is-active a:hover, .hero.is-info-dark .tabs.is-toggle li.is-active a, .hero.is-info-dark .tabs.is-toggle li.is-active a:hover { background-color: #fff; border-color: #fff; color: #0092FF; } .hero.is-info-dark.is-bold { background-image: linear-gradient(141deg, #0097cc 0%, #0092FF 71%, #1a77ff 100%); } } @media screen and (prefers-color-scheme: dark) and (max-width: 768px) { .hero.is-info-dark.is-bold .navbar-menu { background-image: linear-gradient(141deg, #0097cc 0%, #0092FF 71%, #1a77ff 100%); } } @media (prefers-color-scheme: dark) { .hero.is-success-dark { background-color: #16DB93; color: rgba(0, 0, 0, 0.7); } .hero.is-success-dark a:not(.button):not(.dropdown-item):not(.tag), .hero.is-success-dark strong { color: inherit; } .hero.is-success-dark .title { color: rgba(0, 0, 0, 0.7); } .hero.is-success-dark .subtitle { color: rgba(0, 0, 0, 0.9); } .hero.is-success-dark .subtitle a:not(.button), .hero.is-success-dark .subtitle strong { color: rgba(0, 0, 0, 0.7); } } @media screen and (prefers-color-scheme: dark) and (max-width: 1023px) { .hero.is-success-dark .navbar-menu { background-color: #16DB93; } } @media (prefers-color-scheme: dark) { .hero.is-success-dark .navbar-item, .hero.is-success-dark .navbar-link { color: rgba(0, 0, 0, 0.7); } .hero.is-success-dark a.navbar-item:hover, .hero.is-success-dark a.navbar-item.is-active, .hero.is-success-dark .navbar-link:hover, .hero.is-success-dark .navbar-link.is-active { background-color: #14c483; color: rgba(0, 0, 0, 0.7); } .hero.is-success-dark .tabs a { color: rgba(0, 0, 0, 0.7); opacity: 0.9; } .hero.is-success-dark .tabs a:hover { opacity: 1; } .hero.is-success-dark .tabs li.is-active a { opacity: 1; } .hero.is-success-dark .tabs.is-boxed a, .hero.is-success-dark .tabs.is-toggle a { color: rgba(0, 0, 0, 0.7); } .hero.is-success-dark .tabs.is-boxed a:hover, .hero.is-success-dark .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-success-dark .tabs.is-boxed li.is-active a, .hero.is-success-dark .tabs.is-boxed li.is-active a:hover, .hero.is-success-dark .tabs.is-toggle li.is-active a, .hero.is-success-dark .tabs.is-toggle li.is-active a:hover { background-color: rgba(0, 0, 0, 0.7); border-color: rgba(0, 0, 0, 0.7); color: #16DB93; } .hero.is-success-dark.is-bold { background-image: linear-gradient(141deg, #08b659 0%, #16DB93 71%, #1cefc5 100%); } } @media screen and (prefers-color-scheme: dark) and (max-width: 768px) { .hero.is-success-dark.is-bold .navbar-menu { background-image: linear-gradient(141deg, #08b659 0%, #16DB93 71%, #1cefc5 100%); } } @media (prefers-color-scheme: dark) { .hero.is-warning-dark { background-color: #FFE900; color: rgba(0, 0, 0, 0.7); } .hero.is-warning-dark a:not(.button):not(.dropdown-item):not(.tag), .hero.is-warning-dark strong { color: inherit; } .hero.is-warning-dark .title { color: rgba(0, 0, 0, 0.7); } .hero.is-warning-dark .subtitle { color: rgba(0, 0, 0, 0.9); } .hero.is-warning-dark .subtitle a:not(.button), .hero.is-warning-dark .subtitle strong { color: rgba(0, 0, 0, 0.7); } } @media screen and (prefers-color-scheme: dark) and (max-width: 1023px) { .hero.is-warning-dark .navbar-menu { background-color: #FFE900; } } @media (prefers-color-scheme: dark) { .hero.is-warning-dark .navbar-item, .hero.is-warning-dark .navbar-link { color: rgba(0, 0, 0, 0.7); } .hero.is-warning-dark a.navbar-item:hover, .hero.is-warning-dark a.navbar-item.is-active, .hero.is-warning-dark .navbar-link:hover, .hero.is-warning-dark .navbar-link.is-active { background-color: #e6d200; color: rgba(0, 0, 0, 0.7); } .hero.is-warning-dark .tabs a { color: rgba(0, 0, 0, 0.7); opacity: 0.9; } .hero.is-warning-dark .tabs a:hover { opacity: 1; } .hero.is-warning-dark .tabs li.is-active a { opacity: 1; } .hero.is-warning-dark .tabs.is-boxed a, .hero.is-warning-dark .tabs.is-toggle a { color: rgba(0, 0, 0, 0.7); } .hero.is-warning-dark .tabs.is-boxed a:hover, .hero.is-warning-dark .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-warning-dark .tabs.is-boxed li.is-active a, .hero.is-warning-dark .tabs.is-boxed li.is-active a:hover, .hero.is-warning-dark .tabs.is-toggle li.is-active a, .hero.is-warning-dark .tabs.is-toggle li.is-active a:hover { background-color: rgba(0, 0, 0, 0.7); border-color: rgba(0, 0, 0, 0.7); color: #FFE900; } .hero.is-warning-dark.is-bold { background-image: linear-gradient(141deg, #cc9800 0%, #FFE900 71%, #edff1a 100%); } } @media screen and (prefers-color-scheme: dark) and (max-width: 768px) { .hero.is-warning-dark.is-bold .navbar-menu { background-image: linear-gradient(141deg, #cc9800 0%, #FFE900 71%, #edff1a 100%); } } @media (prefers-color-scheme: dark) { .hero.is-danger-dark { background-color: #f14668; color: #fff; } .hero.is-danger-dark a:not(.button):not(.dropdown-item):not(.tag), .hero.is-danger-dark strong { color: inherit; } .hero.is-danger-dark .title { color: #fff; } .hero.is-danger-dark .subtitle { color: rgba(255, 255, 255, 0.9); } .hero.is-danger-dark .subtitle a:not(.button), .hero.is-danger-dark .subtitle strong { color: #fff; } } @media screen and (prefers-color-scheme: dark) and (max-width: 1023px) { .hero.is-danger-dark .navbar-menu { background-color: #f14668; } } @media (prefers-color-scheme: dark) { .hero.is-danger-dark .navbar-item, .hero.is-danger-dark .navbar-link { color: rgba(255, 255, 255, 0.7); } .hero.is-danger-dark a.navbar-item:hover, .hero.is-danger-dark a.navbar-item.is-active, .hero.is-danger-dark .navbar-link:hover, .hero.is-danger-dark .navbar-link.is-active { background-color: #ef2e55; color: #fff; } .hero.is-danger-dark .tabs a { color: #fff; opacity: 0.9; } .hero.is-danger-dark .tabs a:hover { opacity: 1; } .hero.is-danger-dark .tabs li.is-active a { opacity: 1; } .hero.is-danger-dark .tabs.is-boxed a, .hero.is-danger-dark .tabs.is-toggle a { color: #fff; } .hero.is-danger-dark .tabs.is-boxed a:hover, .hero.is-danger-dark .tabs.is-toggle a:hover { background-color: rgba(10, 10, 10, 0.1); } .hero.is-danger-dark .tabs.is-boxed li.is-active a, .hero.is-danger-dark .tabs.is-boxed li.is-active a:hover, .hero.is-danger-dark .tabs.is-toggle li.is-active a, .hero.is-danger-dark .tabs.is-toggle li.is-active a:hover { background-color: #fff; border-color: #fff; color: #f14668; } .hero.is-danger-dark.is-bold { background-image: linear-gradient(141deg, #fa0a62 0%, #f14668 71%, #f7595f 100%); } } @media screen and (prefers-color-scheme: dark) and (max-width: 768px) { .hero.is-danger-dark.is-bold .navbar-menu { background-image: linear-gradient(141deg, #fa0a62 0%, #f14668 71%, #f7595f 100%); } } @media (prefers-color-scheme: dark) { .footer { background-color: #121212; } } .hero .title { position: relative; } .hero .title span { display: none; } .hero .title::after { content: ""; position: absolute; top: -108px; left: 0; right: 0; margin: auto; width: 500px; height: 122px; background: url(/assets/images/logo.svg) no-repeat center center; } .sanic-simple-logo { background: url(/assets/images/logo.svg) no-repeat; background-size: 270px; height: 72px; } .sanic-simple-logo img { visibility: hidden; } :root { --menu-background: #ededed; --menu-divider: #dbdbdb; --menu-contrast: #121212; } .c1 { color: #7a7a7a; } @media (prefers-color-scheme: dark) { :root { --menu-background: #0a0a0a; --menu-divider: #242424; --menu-contrast: #7a7a7a; } html, .navbar { background-color: #121212; } .footer { background-color: #0a0a0a; } .sanic-simple-logo { background: url(/assets/images/logo-white.svg) no-repeat; background-size: 270px; } .hero .title::after { background: url(/assets/images/logo-white.svg) no-repeat center center; } .list { background-color: transparent; box-shadow: none; } .n, .na, .nb, .no, .nd, .ni, .ne, .nl, .nn, .nx, .py, .nt, .nv, .bp, .vc, .vg, .vi, .vm { color: #b5b5b5; } .s, .sa, .sb, .sc, .dl, .sd, .s2, .se, .sh, .si, .sx, .sr, .s1, .ss { background-color: transparent; color: #16DB93; } .nc { color: #FFE900; } .c1 { color: #4a4a4a; } .introduction-table .table tbody tr:last-child td { border-bottom-width: 1px; } ::-webkit-scrollbar { width: 12px; height: 12px; } ::-webkit-scrollbar-track { background: #242424; } ::-webkit-scrollbar-thumb { background: #121212; border-radius: 6px; border: 3px solid #242424; } ::-webkit-scrollbar-thumb:hover { background: #0a0a0a; } } .burger { display: none; position: fixed; top: 1rem; right: 1rem; width: 2rem; height: 2rem; cursor: pointer; z-index: 101; } .burger span { display: block; position: absolute; height: 2px; width: 100%; background: var(--menu-contrast); border-radius: 2px; opacity: 1; left: 0; transform: rotate(0deg); transition: .25s ease-in-out; } .burger span:nth-child(1) { top: 0px; } .burger span:nth-child(2), .burger span:nth-child(3) { top: 8px; } .burger span:nth-child(4) { top: 16px; } .burger.is-active span:nth-child(1) { top: 18px; width: 0%; left: 50%; } .burger.is-active span:nth-child(2) { transform: rotate(45deg); } .burger.is-active span:nth-child(3) { transform: rotate(-45deg); } .burger.is-active span:nth-child(4) { top: 18px; width: 0%; left: 50%; } .burger::after { content: ''; display: block; position: absolute; top: -1rem; left: -0.5rem; width: 3rem; height: 3rem; background: var(--menu-background); z-index: -1; } .menu { background-color: var(--menu-background); width: 360px; padding: 2rem; height: 100vh; overflow: auto; position: fixed; top: 0; left: 0; z-index: 100; } .menu hr { background-color: var(--menu-divider); } .menu .is-anchor { font-size: 0.75em; } .menu .is-anchor a::before { content: '# '; color: var(--menu-contrast); } .menu .menu-label { margin-bottom: 1rem; } .menu li.is-group > a { font-size: 0.85rem; } .menu li.is-group > a::after { content: ''; position: relative; top: -2px; left: 8px; display: inline-block; width: 0; height: 0; border-left: 8px solid var(--menu-contrast); border-top: 5.33333px solid transparent; border-bottom: 5.33333px solid transparent; transform: rotate(90deg); } .menu li.is-group > a ~ .menu-list { transition: all .15s ease-in-out; transform: scaleY(1); transform-origin: top; overflow: hidden; opacity: 1; margin: 0; } .menu li.is-group > a:not(.is-open)::after { transform: rotate(0deg); } .menu li.is-group > a:not(.is-open) ~ .menu-list { transform: scaleY(0); opacity: 0; font-size: 0; } .menu ~ main { margin-left: 360px; } .menu .anchor-list { display: none; } .menu .menu-item .is-active + .anchor-list { display: block; } @media screen and (max-width: 1024px) { .menu { left: -100vw; width: 100vw; transition: all .25s ease-in-out; } .menu.is-active { left: 0; } .menu ~ main { margin-left: 0; } .burger { display: block; } } .menu-list li ul { margin: 0; padding-left: 0; } .menu-list ul li:not(.is-anchor) { margin-left: 0.75em; } .menu-list .menu-list li a { font-size: 0.85em; } code { color: #4a4a4a; } .notification code { background-color: rgba(237, 237, 237, 0.6); } @media (prefers-color-scheme: dark) { code { color: #dbdbdb; } .notification code { background-color: rgba(36, 36, 36, 0.6); } } a[target=_blank]::after { content: "⇗"; margin-left: 0.25em; } a > code { border-bottom: 1px solid #ff0d68; } a > code:hover { background-color: #ff0d68; color: white; } h1 a.anchor, h2 a.anchor, h3 a.anchor, h4 a.anchor, h5 a.anchor, h6 a.anchor { display: none; padding-left: 0.375em; } h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, h5:hover a.anchor, h6:hover a.anchor { display: inline; } h1 { margin-left: -2rem; } h2 { margin-left: -1rem; margin-top: 3rem; } h3:not(:first-child) { margin-top: 2rem; } article { margin-left: 2rem; } p + pre, pre + p, div.highlight + p, p + div.highlight, div.highlight + div.highlight, p + h4, p + .code-block, .code-block + p, .code-block + .code-block, p + p { margin-top: 1rem; } @media screen and (max-width: 769px) { html { font-size: 18px; } h1 { margin-left: 0; } h2 { margin-left: 0; } article { margin-left: 0; } .section { padding: 1rem 0rem; max-width: 95vw; } } @media screen and (min-width: 1216px) { .section { padding: 3rem 0rem; } } @media screen and (min-width: 1216px) { .section { padding: 3rem 0rem; } } .footer { margin-bottom: 4rem; } .footer a[target=_blank]::after { display: none; } @media screen and (max-width: 1024px) { .footer .level { align-items: baseline; } .footer a { font-size: 0.75em; } } .hero .subtitle { font-size: 3rem; font-weight: 700; margin-bottom: 1rem; } .hero .tagline { font-family: Fira Code,Source Code Pro,Menlo,Monaco,Consolas,Lucisa Console,monospace; font-size: 2rem; font-weight: 300; margin-bottom: 2rem; } .language-sh code { display: inline-block; } .language-sh code::before { content: '▶ '; } .notification { margin-top: 2rem; } .notification .notification-title { font-size: 1.25rem; font-weight: 700; } .notification.is-note { background-color: #ff0d68; color: white; } .notification.is-new { background-color: #833FE3; color: white; } .notification.is-new::after { content: '🌟'; position: absolute; top: 1rem; right: 1rem; font-size: 2rem; } .notification.is-tip::after { content: '💡'; position: absolute; top: 1rem; right: 1rem; font-size: 2rem; } .ol, .ul, .list { margin: 1rem 0; } .ol .li, .ol .list-item, .ul .li, .ul .list-item, .list .li, .list .list-item { padding: 0.5rem 0; } .ul .li { margin-left: 1.5rem; list-style-type: disc; } .introduction-table { margin: 2rem 0; } .introduction-table a[target=_blank]::after { display: none; } .introduction-table th { display: none; } .docobject h2 :last-child { color: #363636; } .docobject .function-signature { color: #1e2024; } .docobject .function-signature .param-name { color: #ff0d68; font-weight: bold; } .docobject .function-signature .param-default { color: #833FE3; font-style: italic; } .docobject .function-signature .function-decorator { font-style: italic; color: #7a7a7a; } .docobject .function-signature .param-annotation { color: #0092FF; } .docobject .function-signature .return-annotation { color: #37ae6f; } .docobject dl { display: flex; flex-wrap: wrap; margin: 0; padding: 0; } .docobject dt { flex: 0 0 25%; padding: 5px 10px; font-weight: bold; color: #0092FF; } .docobject dd { flex: 1; padding: 5px 10px; margin: 0; } .docobject div.highlight + p, .docobject p + div.highlight, .docobject div.highlight + div.highlight { margin-top: 1rem; } .docobject .method { padding-left: 1rem; } .docobject .method h3 { margin-left: -1rem; } .docobject .ol, .docobject .ul, .docobject .list { margin: 1rem; } .mermaid { margin-top: 2rem; } .mermaid .actor { stroke: #ff0d68 !important; fill: #ffd9e7 !important; } .mermaid .labelBox { fill: #cce9ff !important; stroke: #0092FF !important; } .mermaid .note { fill: #fffbcc !important; stroke: #FFE900 !important; } @media (prefers-color-scheme: dark) { .docobject h2 :last-child { color: #fafafa; } .docobject .function-signature { color: #b5b5b5; } .docobject .function-signature .param-default { color: #FFE900; } .mermaid text.messageText { fill: #fafafa !important; } .mermaid .actor { fill: #ff0d68 !important; } .mermaid .labelBox { fill: #0092FF !important; } .mermaid .labelText { fill: #fafafa !important; } .mermaid .note { fill: #FFE900 !important; } } h1 + .code-block, h2 + .code-block, h3 + .code-block { margin-top: 1rem; } .code-block { position: relative; } .code-block + .code-block { margin-top: 1rem; } .code-block:hover .code-block__copy { opacity: 1; } .code-block .code-block__copy { position: absolute; right: 10px; bottom: 10px; width: 36px; height: 52px; cursor: pointer; opacity: 0; transition: all 0.3s; } .code-block .code-block__copy::before { content: "copied"; position: absolute; top: -17.33333px; margin: auto; opacity: 0; right: 9px; } .code-block .code-block__copy.clicked::before { opacity: 1; animation: all 0.3s ease-in-out; } .code-block .code-block__rectangle { position: absolute; width: 18px; height: 23.29412px; transition: all 0.3s ease; } .code-block .code-block__filled { background-color: #ff0d68; left: 5px; top: 13px; } .code-block .code-block__outlined { border: 2px solid #ff0d68; background-color: transparent; left: -3px; top: 5px; } .code-block .code-block__copy.clicked .code-block__outlined { left: -19px; top: 13px; background-color: #ff0d68; } .additional-attributes.details { display: flex; flex-direction: column; width: 100%; } .additional-attributes.details .code-block { display: none; width: 100%; } .additional-attributes.details::before { content: "▼ " attr(title); display: block; background-color: #b5b5b5; padding: 10px; cursor: pointer; width: 100%; box-sizing: border-box; } .additional-attributes.details.is-active .code-block { display: block; } .additional-attributes.details.is-active::before { content: "▲ " attr(title); background-color: #dbdbdb; } @media (prefers-color-scheme: dark) { .additional-attributes.details::before { background-color: #363636; } .additional-attributes.details.is-active::before { background-color: #4a4a4a; } } .tabs .tab-content { display: none; } .table-of-contents { position: fixed; right: 0; bottom: 0; z-index: 1000; max-width: 500px; padding: 1rem 2rem; background-color: #fafafa; box-shadow: 0 0 2px rgba(63, 63, 68, 0.5); } @media (prefers-color-scheme: dark) { .table-of-contents { background-color: #0a0a0a; box-shadow: 0 0 2px rgba(191, 191, 191, 0.5); } } .table-of-contents .table-of-contents-item { display: block; margin-bottom: 0.5rem; text-decoration: none; } .table-of-contents .table-of-contents-item:hover { text-decoration: underline; color: #ff0d68; } .table-of-contents .table-of-contents-item:hover strong, .table-of-contents .table-of-contents-item:hover small { color: #ff0d68; } .table-of-contents .table-of-contents-item strong { color: #121212; font-size: 1.15em; display: block; line-height: 1rem; margin-top: 0.75rem; } .table-of-contents .table-of-contents-item small { color: #7a7a7a; font-size: 0.85em; } @media (prefers-color-scheme: dark) { .table-of-contents .table-of-contents-item strong { color: #dbdbdb; } } @media (max-width: 768px) { .table-of-contents { position: static; max-width: calc(100vw - 2rem); } .table-of-contents .table-of-contents-item { display: flex; flex-direction: row-reverse; justify-content: start; } .table-of-contents .table-of-contents-item strong { display: inline; margin: 0 0 0 0.75rem; } } .loading-bar { position: fixed; top: 0; left: 0; width: 100%; height: 3px; background-color: transparent; z-index: 9999; } .loading-bar.is-loading { background-color: #ff0d68; animation: pulsingLoading 1s linear infinite; } @keyframes pulsingLoading { 0%, 100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(0.25); opacity: 0.5; } } .changelog .ol .li, .changelog .ol .list-item, .changelog .ul .li, .changelog .ul .list-item, .changelog .list .li, .changelog .list .list-item { padding: 0; } .sponsors { display: flex; flex-wrap: wrap; justify-content: center; text-align: center; padding: 0.25rem 0; } .sponsors .button { margin-left: 1rem; } @media screen and (min-width: 769px) { .hero.is-large .hero-body { padding: 18rem 6rem 3rem; } } @media screen and (max-width: 769px) { .hero { height: 100vh; margin-top: 15vh; } .hero .hero-body { padding: 3rem 1.5rem; display: flex; flex-direction: column; justify-content: center; } .hero .title::after { width: calc(100vw - 1.5rem); background: url(/assets/images/logo-white.svg) no-repeat center center; background-size: 100% auto; } .hero .subtitle { margin-top: 1rem; font-size: 1.4rem; } .hero .tagline { font-size: 1.1rem; } } .home .tab-container { display: flex; } .home .tab-container .tabs { flex-shrink: 0; width: 200px; } .home .tab-container .tabs ul { display: flex; flex-direction: column; border-bottom: none; } .home .tab-container .tabs li { display: block; width: 100%; } .home .tab-container .tabs li a { display: block; padding: 0.5em 1em; text-align: left; } .home .tab-container .tab-display { flex-grow: 1; min-width: 0; padding-left: 20px; } @media screen and (max-width: 768px) { .home .tab-container { flex-direction: column; } .home .tab-container .tabs { width: 100%; } .home .tab-container .tabs ul { display: block; overflow-y: auto; } .home .tab-container .tabs li { display: block; } .home .tab-container .tab-display { padding-left: 0; } } footer .level, footer .level .level-right, footer .level .level-left { display: flex !important; } .tabs li a { font-size: 0.7rem; } .box { box-shadow: 0 2px 3px rgba(10, 10, 10, 0.1), 0 0 0 1px rgba(10, 10, 10, 0.1); } .container { padding: 0 0.5rem; } @media (prefers-color-scheme: dark) { .box { box-shadow: 0 2px 3px rgba(128, 128, 128, 0.1), 0 0 0 1px rgba(128, 128, 128, 0.1); } } ================================================ FILE: guide/public/index.html ================================================ Sanic Framework

Redirecting to /en/

================================================ FILE: guide/public/web/browserconfig.xml ================================================ #da532c ================================================ FILE: guide/public/web/robots.txt ================================================ User-agent: * Allow: / Sitemap: https://sanic.dev/sitemap.xml Host: https://sanic.dev ================================================ FILE: guide/public/web/site.webmanifest ================================================ { "name": "Sanic", "short_name": "Sanic", "icons": [ { "src": "/android-chrome-192x192.png", "sizes": "192x192", "type": "image/png" }, { "src": "/android-chrome-512x512.png", "sizes": "512x512", "type": "image/png" } ], "theme_color": "#ffffff", "background_color": "#ffffff", "display": "standalone" } ================================================ FILE: guide/requirements.txt ================================================ sanic>=23.12 sanic-ext>=23.12 msgspec python-frontmatter pygments docstring-parser libsass mistune ================================================ FILE: guide/server.py ================================================ """Sanic User Guide https://sanic.dev Built using the SHH stack: - Sanic - html5tagger - HTMX""" from pathlib import Path from webapp.worker.factory import create_app app = create_app(Path(__file__).parent) ================================================ FILE: guide/style/bulma/LICENSE ================================================ The MIT License (MIT) Copyright (c) 2022 Jeremy Thomas Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: guide/style/bulma/bulma.sass ================================================ @charset "utf-8" /*! bulma.io v0.9.4 | MIT License | github.com/jgthms/bulma */ @import "sass/utilities/_all" @import "sass/base/_all" @import "sass/elements/_all" @import "sass/form/_all" @import "sass/components/_all" @import "sass/grid/_all" @import "sass/helpers/_all" @import "sass/layout/_all" ================================================ FILE: guide/style/bulma/sass/base/_all.sass ================================================ /* Bulma Base */ @charset "utf-8" @import "minireset" @import "generic" @import "animations" ================================================ FILE: guide/style/bulma/sass/base/animations.sass ================================================ @keyframes spinAround from transform: rotate(0deg) to transform: rotate(359deg) ================================================ FILE: guide/style/bulma/sass/base/generic.sass ================================================ @import "../utilities/mixins" $body-background-color: $scheme-main !default $body-size: 16px !default $body-min-width: 300px !default $body-rendering: optimizeLegibility !default $body-family: $family-primary !default $body-overflow-x: hidden !default $body-overflow-y: scroll !default $body-color: $text !default $body-font-size: 1em !default $body-weight: $weight-normal !default $body-line-height: 1.5 !default $code-family: $family-code !default $code-padding: 0.25em 0.5em 0.25em !default $code-weight: normal !default $code-size: 0.875em !default $small-font-size: 0.875em !default $hr-background-color: $background !default $hr-height: 2px !default $hr-margin: 1.5rem 0 !default $strong-color: $text-strong !default $strong-weight: $weight-bold !default $pre-font-size: 0.875em !default $pre-padding: 1.25rem 1.5rem !default $pre-code-font-size: 1em !default html background-color: $body-background-color font-size: $body-size -moz-osx-font-smoothing: grayscale -webkit-font-smoothing: antialiased min-width: $body-min-width overflow-x: $body-overflow-x overflow-y: $body-overflow-y text-rendering: $body-rendering text-size-adjust: 100% article, aside, figure, footer, header, hgroup, section display: block body, button, input, optgroup, select, textarea font-family: $body-family code, pre -moz-osx-font-smoothing: auto -webkit-font-smoothing: auto font-family: $code-family body color: $body-color font-size: $body-font-size font-weight: $body-weight line-height: $body-line-height // Inline a color: $link cursor: pointer text-decoration: none strong color: currentColor &:hover color: $link-hover code background-color: $code-background color: $code font-size: $code-size font-weight: $code-weight padding: $code-padding hr background-color: $hr-background-color border: none display: block height: $hr-height margin: $hr-margin img height: auto max-width: 100% input[type="checkbox"], input[type="radio"] vertical-align: baseline small font-size: $small-font-size span font-style: inherit font-weight: inherit strong color: $strong-color font-weight: $strong-weight // Block fieldset border: none pre +overflow-touch background-color: $pre-background color: $pre font-size: $pre-font-size overflow-x: auto padding: $pre-padding white-space: pre word-wrap: normal code background-color: transparent color: currentColor font-size: $pre-code-font-size padding: 0 table td, th vertical-align: top &:not([align]) text-align: inherit th color: $text-strong ================================================ FILE: guide/style/bulma/sass/base/helpers.sass ================================================ @warn "The helpers.sass file is DEPRECATED. It has moved into its own /helpers folder. Please import sass/helpers/_all instead." ================================================ FILE: guide/style/bulma/sass/base/minireset.sass ================================================ /*! minireset.css v0.0.6 | MIT License | github.com/jgthms/minireset.css */ // Blocks html, body, p, ol, ul, li, dl, dt, dd, blockquote, figure, fieldset, legend, textarea, pre, iframe, hr, h1, h2, h3, h4, h5, h6 margin: 0 padding: 0 // Headings h1, h2, h3, h4, h5, h6 font-size: 100% font-weight: normal // List ul list-style: none // Form button, input, select, textarea margin: 0 // Box sizing html box-sizing: border-box * &, &::before, &::after box-sizing: inherit // Media img, video height: auto max-width: 100% // Iframe iframe border: 0 // Table table border-collapse: collapse border-spacing: 0 td, th padding: 0 &:not([align]) text-align: inherit ================================================ FILE: guide/style/bulma/sass/components/_all.sass ================================================ /* Bulma Components */ @charset "utf-8" @import "breadcrumb" @import "card" @import "dropdown" @import "level" @import "media" @import "menu" @import "message" @import "modal" @import "navbar" @import "pagination" @import "panel" @import "tabs" ================================================ FILE: guide/style/bulma/sass/components/breadcrumb.sass ================================================ @import "../utilities/mixins" $breadcrumb-item-color: $link !default $breadcrumb-item-hover-color: $link-hover !default $breadcrumb-item-active-color: $text-strong !default $breadcrumb-item-padding-vertical: 0 !default $breadcrumb-item-padding-horizontal: 0.75em !default $breadcrumb-item-separator-color: $border-hover !default .breadcrumb @extend %block @extend %unselectable font-size: $size-normal white-space: nowrap a align-items: center color: $breadcrumb-item-color display: flex justify-content: center padding: $breadcrumb-item-padding-vertical $breadcrumb-item-padding-horizontal &:hover color: $breadcrumb-item-hover-color li align-items: center display: flex &:first-child a +ltr-property("padding", 0, false) &.is-active a color: $breadcrumb-item-active-color cursor: default pointer-events: none & + li::before color: $breadcrumb-item-separator-color content: "\0002f" ul, ol align-items: flex-start display: flex flex-wrap: wrap justify-content: flex-start .icon &:first-child +ltr-property("margin", 0.5em) &:last-child +ltr-property("margin", 0.5em, false) // Alignment &.is-centered ol, ul justify-content: center &.is-right ol, ul justify-content: flex-end // Sizes &.is-small font-size: $size-small &.is-medium font-size: $size-medium &.is-large font-size: $size-large // Styles &.has-arrow-separator li + li::before content: "\02192" &.has-bullet-separator li + li::before content: "\02022" &.has-dot-separator li + li::before content: "\000b7" &.has-succeeds-separator li + li::before content: "\0227B" ================================================ FILE: guide/style/bulma/sass/components/card.sass ================================================ @import "../utilities/mixins" $card-color: $text !default $card-background-color: $scheme-main !default $card-shadow: $shadow !default $card-radius: 0.25rem !default $card-header-background-color: transparent !default $card-header-color: $text-strong !default $card-header-padding: 0.75rem 1rem !default $card-header-shadow: 0 0.125em 0.25em rgba($scheme-invert, 0.1) !default $card-header-weight: $weight-bold !default $card-content-background-color: transparent !default $card-content-padding: 1.5rem !default $card-footer-background-color: transparent !default $card-footer-border-top: 1px solid $border-light !default $card-footer-padding: 0.75rem !default $card-media-margin: $block-spacing !default .card background-color: $card-background-color border-radius: $card-radius box-shadow: $card-shadow color: $card-color max-width: 100% position: relative %card-item &:first-child border-top-left-radius: $card-radius border-top-right-radius: $card-radius &:last-child border-bottom-left-radius: $card-radius border-bottom-right-radius: $card-radius .card-header @extend %card-item background-color: $card-header-background-color align-items: stretch box-shadow: $card-header-shadow display: flex .card-header-title align-items: center color: $card-header-color display: flex flex-grow: 1 font-weight: $card-header-weight padding: $card-header-padding &.is-centered justify-content: center .card-header-icon +reset align-items: center cursor: pointer display: flex justify-content: center padding: $card-header-padding .card-image display: block position: relative &:first-child img border-top-left-radius: $card-radius border-top-right-radius: $card-radius &:last-child img border-bottom-left-radius: $card-radius border-bottom-right-radius: $card-radius .card-content @extend %card-item background-color: $card-content-background-color padding: $card-content-padding .card-footer @extend %card-item background-color: $card-footer-background-color border-top: $card-footer-border-top align-items: stretch display: flex .card-footer-item align-items: center display: flex flex-basis: 0 flex-grow: 1 flex-shrink: 0 justify-content: center padding: $card-footer-padding &:not(:last-child) +ltr-property("border", $card-footer-border-top) // Combinations .card .media:not(:last-child) margin-bottom: $card-media-margin ================================================ FILE: guide/style/bulma/sass/components/dropdown.sass ================================================ @import "../utilities/mixins" $dropdown-menu-min-width: 12rem !default $dropdown-content-background-color: $scheme-main !default $dropdown-content-arrow: $link !default $dropdown-content-offset: 4px !default $dropdown-content-padding-bottom: 0.5rem !default $dropdown-content-padding-top: 0.5rem !default $dropdown-content-radius: $radius !default $dropdown-content-shadow: $shadow !default $dropdown-content-z: 20 !default $dropdown-item-color: $text !default $dropdown-item-hover-color: $scheme-invert !default $dropdown-item-hover-background-color: $background !default $dropdown-item-active-color: $link-invert !default $dropdown-item-active-background-color: $link !default $dropdown-divider-background-color: $border-light !default .dropdown display: inline-flex position: relative vertical-align: top &.is-active, &.is-hoverable:hover .dropdown-menu display: block &.is-right .dropdown-menu left: auto right: 0 &.is-up .dropdown-menu bottom: 100% padding-bottom: $dropdown-content-offset padding-top: initial top: auto .dropdown-menu display: none +ltr-position(0, false) min-width: $dropdown-menu-min-width padding-top: $dropdown-content-offset position: absolute top: 100% z-index: $dropdown-content-z .dropdown-content background-color: $dropdown-content-background-color border-radius: $dropdown-content-radius box-shadow: $dropdown-content-shadow padding-bottom: $dropdown-content-padding-bottom padding-top: $dropdown-content-padding-top .dropdown-item color: $dropdown-item-color display: block font-size: 0.875rem line-height: 1.5 padding: 0.375rem 1rem position: relative a.dropdown-item, button.dropdown-item +ltr-property("padding", 3rem) text-align: inherit white-space: nowrap width: 100% &:hover background-color: $dropdown-item-hover-background-color color: $dropdown-item-hover-color &.is-active background-color: $dropdown-item-active-background-color color: $dropdown-item-active-color .dropdown-divider background-color: $dropdown-divider-background-color border: none display: block height: 1px margin: 0.5rem 0 ================================================ FILE: guide/style/bulma/sass/components/level.sass ================================================ @import "../utilities/mixins" $level-item-spacing: ($block-spacing * 0.5) !default .level @extend %block align-items: center justify-content: space-between code border-radius: $radius img display: inline-block vertical-align: top // Modifiers &.is-mobile display: flex .level-left, .level-right display: flex .level-left + .level-right margin-top: 0 .level-item &:not(:last-child) margin-bottom: 0 +ltr-property("margin", $level-item-spacing) &:not(.is-narrow) flex-grow: 1 // Responsiveness +tablet display: flex & > .level-item &:not(.is-narrow) flex-grow: 1 .level-item align-items: center display: flex flex-basis: auto flex-grow: 0 flex-shrink: 0 justify-content: center .title, .subtitle margin-bottom: 0 // Responsiveness +mobile &:not(:last-child) margin-bottom: $level-item-spacing .level-left, .level-right flex-basis: auto flex-grow: 0 flex-shrink: 0 .level-item // Modifiers &.is-flexible flex-grow: 1 // Responsiveness +tablet &:not(:last-child) +ltr-property("margin", $level-item-spacing) .level-left align-items: center justify-content: flex-start // Responsiveness +mobile & + .level-right margin-top: 1.5rem +tablet display: flex .level-right align-items: center justify-content: flex-end // Responsiveness +tablet display: flex ================================================ FILE: guide/style/bulma/sass/components/media.sass ================================================ @import "../utilities/mixins" $media-border-color: bulmaRgba($border, 0.5) !default $media-border-size: 1px !default $media-spacing: 1rem !default $media-spacing-large: 1.5rem !default $media-content-spacing: 0.75rem !default $media-level-1-spacing: 0.75rem !default $media-level-1-content-spacing: 0.5rem !default $media-level-2-spacing: 0.5rem !default .media align-items: flex-start display: flex text-align: inherit .content:not(:last-child) margin-bottom: $media-content-spacing .media border-top: $media-border-size solid $media-border-color display: flex padding-top: $media-level-1-spacing .content:not(:last-child), .control:not(:last-child) margin-bottom: $media-level-1-content-spacing .media padding-top: $media-level-2-spacing & + .media margin-top: $media-level-2-spacing & + .media border-top: $media-border-size solid $media-border-color margin-top: $media-spacing padding-top: $media-spacing // Sizes &.is-large & + .media margin-top: $media-spacing-large padding-top: $media-spacing-large .media-left, .media-right flex-basis: auto flex-grow: 0 flex-shrink: 0 .media-left +ltr-property("margin", $media-spacing) .media-right +ltr-property("margin", $media-spacing, false) .media-content flex-basis: auto flex-grow: 1 flex-shrink: 1 text-align: inherit +mobile .media-content overflow-x: auto ================================================ FILE: guide/style/bulma/sass/components/menu.sass ================================================ @import "../utilities/mixins" $menu-item-color: $text !default $menu-item-radius: $radius-small !default $menu-item-hover-color: $text-strong !default $menu-item-hover-background-color: $background !default $menu-item-active-color: $link-invert !default $menu-item-active-background-color: $link !default $menu-list-border-left: 1px solid $border !default $menu-list-line-height: 1.25 !default $menu-list-link-padding: 0.5em 0.75em !default $menu-nested-list-margin: 0.75em !default $menu-nested-list-padding-left: 0.75em !default $menu-label-color: $text-light !default $menu-label-font-size: 0.75em !default $menu-label-letter-spacing: 0.1em !default $menu-label-spacing: 1em !default .menu font-size: $size-normal // Sizes &.is-small font-size: $size-small &.is-medium font-size: $size-medium &.is-large font-size: $size-large .menu-list line-height: $menu-list-line-height a border-radius: $menu-item-radius color: $menu-item-color display: block padding: $menu-list-link-padding &:hover background-color: $menu-item-hover-background-color color: $menu-item-hover-color // Modifiers &.is-active background-color: $menu-item-active-background-color color: $menu-item-active-color li ul +ltr-property("border", $menu-list-border-left, false) margin: $menu-nested-list-margin +ltr-property("padding", $menu-nested-list-padding-left, false) .menu-label color: $menu-label-color font-size: $menu-label-font-size letter-spacing: $menu-label-letter-spacing text-transform: uppercase &:not(:first-child) margin-top: $menu-label-spacing &:not(:last-child) margin-bottom: $menu-label-spacing ================================================ FILE: guide/style/bulma/sass/components/message.sass ================================================ @import "../utilities/mixins" $message-background-color: $background !default $message-radius: $radius !default $message-header-background-color: $text !default $message-header-color: $text-invert !default $message-header-weight: $weight-bold !default $message-header-padding: 0.75em 1em !default $message-header-radius: $radius !default $message-body-border-color: $border !default $message-body-border-width: 0 0 0 4px !default $message-body-color: $text !default $message-body-padding: 1.25em 1.5em !default $message-body-radius: $radius !default $message-body-pre-background-color: $scheme-main !default $message-body-pre-code-background-color: transparent !default $message-header-body-border-width: 0 !default $message-colors: $colors !default .message @extend %block background-color: $message-background-color border-radius: $message-radius font-size: $size-normal strong color: currentColor a:not(.button):not(.tag):not(.dropdown-item) color: currentColor text-decoration: underline // Sizes &.is-small font-size: $size-small &.is-medium font-size: $size-medium &.is-large font-size: $size-large // Colors @each $name, $components in $message-colors $color: nth($components, 1) $color-invert: nth($components, 2) $color-light: null $color-dark: null @if length($components) >= 3 $color-light: nth($components, 3) @if length($components) >= 4 $color-dark: nth($components, 4) @else $color-luminance: colorLuminance($color) $darken-percentage: $color-luminance * 70% $desaturate-percentage: $color-luminance * 30% $color-dark: desaturate(darken($color, $darken-percentage), $desaturate-percentage) @else $color-lightning: max((100% - lightness($color)) - 2%, 0%) $color-light: lighten($color, $color-lightning) &.is-#{$name} background-color: $color-light .message-header background-color: $color color: $color-invert .message-body border-color: $color color: $color-dark .message-header align-items: center background-color: $message-header-background-color border-radius: $message-header-radius $message-header-radius 0 0 color: $message-header-color display: flex font-weight: $message-header-weight justify-content: space-between line-height: 1.25 padding: $message-header-padding position: relative .delete flex-grow: 0 flex-shrink: 0 +ltr-property("margin", 0.75em, false) & + .message-body border-width: $message-header-body-border-width border-top-left-radius: 0 border-top-right-radius: 0 .message-body border-color: $message-body-border-color border-radius: $message-body-radius border-style: solid border-width: $message-body-border-width color: $message-body-color padding: $message-body-padding code, pre background-color: $message-body-pre-background-color pre code background-color: $message-body-pre-code-background-color ================================================ FILE: guide/style/bulma/sass/components/modal.sass ================================================ @import "../utilities/mixins" $modal-z: 40 !default $modal-background-background-color: bulmaRgba($scheme-invert, 0.86) !default $modal-content-width: 640px !default $modal-content-margin-mobile: 20px !default $modal-content-spacing-mobile: 160px !default $modal-content-spacing-tablet: 40px !default $modal-close-dimensions: 40px !default $modal-close-right: 20px !default $modal-close-top: 20px !default $modal-card-spacing: 40px !default $modal-card-head-background-color: $background !default $modal-card-head-border-bottom: 1px solid $border !default $modal-card-head-padding: 20px !default $modal-card-head-radius: $radius-large !default $modal-card-title-color: $text-strong !default $modal-card-title-line-height: 1 !default $modal-card-title-size: $size-4 !default $modal-card-foot-radius: $radius-large !default $modal-card-foot-border-top: 1px solid $border !default $modal-card-body-background-color: $scheme-main !default $modal-card-body-padding: 20px !default $modal-breakpoint: $tablet !default .modal @extend %overlay align-items: center display: none flex-direction: column justify-content: center overflow: hidden position: fixed z-index: $modal-z // Modifiers &.is-active display: flex .modal-background @extend %overlay background-color: $modal-background-background-color .modal-content, .modal-card margin: 0 $modal-content-margin-mobile max-height: calc(100vh - #{$modal-content-spacing-mobile}) overflow: auto position: relative width: 100% // Responsiveness +from($modal-breakpoint) margin: 0 auto max-height: calc(100vh - #{$modal-content-spacing-tablet}) width: $modal-content-width .modal-close @extend %delete background: none height: $modal-close-dimensions position: fixed +ltr-position($modal-close-right) top: $modal-close-top width: $modal-close-dimensions .modal-card display: flex flex-direction: column max-height: calc(100vh - #{$modal-card-spacing}) overflow: hidden -ms-overflow-y: visible .modal-card-head, .modal-card-foot align-items: center background-color: $modal-card-head-background-color display: flex flex-shrink: 0 justify-content: flex-start padding: $modal-card-head-padding position: relative .modal-card-head border-bottom: $modal-card-head-border-bottom border-top-left-radius: $modal-card-head-radius border-top-right-radius: $modal-card-head-radius .modal-card-title color: $modal-card-title-color flex-grow: 1 flex-shrink: 0 font-size: $modal-card-title-size line-height: $modal-card-title-line-height .modal-card-foot border-bottom-left-radius: $modal-card-foot-radius border-bottom-right-radius: $modal-card-foot-radius border-top: $modal-card-foot-border-top .button &:not(:last-child) +ltr-property("margin", 0.5em) .modal-card-body +overflow-touch background-color: $modal-card-body-background-color flex-grow: 1 flex-shrink: 1 overflow: auto padding: $modal-card-body-padding ================================================ FILE: guide/style/bulma/sass/components/navbar.sass ================================================ @import "../utilities/mixins" $navbar-background-color: $scheme-main !default $navbar-box-shadow-size: 0 2px 0 0 !default $navbar-box-shadow-color: $background !default $navbar-height: 3.25rem !default $navbar-padding-vertical: 1rem !default $navbar-padding-horizontal: 2rem !default $navbar-z: 30 !default $navbar-fixed-z: 30 !default $navbar-item-color: $text !default $navbar-item-hover-color: $link !default $navbar-item-hover-background-color: $scheme-main-bis !default $navbar-item-active-color: $scheme-invert !default $navbar-item-active-background-color: transparent !default $navbar-item-img-max-height: 1.75rem !default $navbar-burger-color: $navbar-item-color !default $navbar-tab-hover-background-color: transparent !default $navbar-tab-hover-border-bottom-color: $link !default $navbar-tab-active-color: $link !default $navbar-tab-active-background-color: transparent !default $navbar-tab-active-border-bottom-color: $link !default $navbar-tab-active-border-bottom-style: solid !default $navbar-tab-active-border-bottom-width: 3px !default $navbar-dropdown-background-color: $scheme-main !default $navbar-dropdown-border-top: 2px solid $border !default $navbar-dropdown-offset: -4px !default $navbar-dropdown-arrow: $link !default $navbar-dropdown-radius: $radius-large !default $navbar-dropdown-z: 20 !default $navbar-dropdown-boxed-radius: $radius-large !default $navbar-dropdown-boxed-shadow: 0 8px 8px bulmaRgba($scheme-invert, 0.1), 0 0 0 1px bulmaRgba($scheme-invert, 0.1) !default $navbar-dropdown-item-hover-color: $scheme-invert !default $navbar-dropdown-item-hover-background-color: $background !default $navbar-dropdown-item-active-color: $link !default $navbar-dropdown-item-active-background-color: $background !default $navbar-divider-background-color: $background !default $navbar-divider-height: 2px !default $navbar-bottom-box-shadow-size: 0 -2px 0 0 !default $navbar-breakpoint: $desktop !default $navbar-colors: $colors !default =navbar-fixed left: 0 position: fixed right: 0 z-index: $navbar-fixed-z .navbar background-color: $navbar-background-color min-height: $navbar-height position: relative z-index: $navbar-z @each $name, $pair in $navbar-colors $color: nth($pair, 1) $color-invert: nth($pair, 2) &.is-#{$name} background-color: $color color: $color-invert .navbar-brand & > .navbar-item, .navbar-link color: $color-invert & > a.navbar-item, .navbar-link &:focus, &:hover, &.is-active background-color: bulmaDarken($color, 5%) color: $color-invert .navbar-link &::after border-color: $color-invert .navbar-burger color: $color-invert +from($navbar-breakpoint) .navbar-start, .navbar-end & > .navbar-item, .navbar-link color: $color-invert & > a.navbar-item, .navbar-link &:focus, &:hover, &.is-active background-color: bulmaDarken($color, 5%) color: $color-invert .navbar-link &::after border-color: $color-invert .navbar-item.has-dropdown:focus .navbar-link, .navbar-item.has-dropdown:hover .navbar-link, .navbar-item.has-dropdown.is-active .navbar-link background-color: bulmaDarken($color, 5%) color: $color-invert .navbar-dropdown a.navbar-item &.is-active background-color: $color color: $color-invert & > .container align-items: stretch display: flex min-height: $navbar-height width: 100% &.has-shadow box-shadow: $navbar-box-shadow-size $navbar-box-shadow-color &.is-fixed-bottom, &.is-fixed-top +navbar-fixed &.is-fixed-bottom bottom: 0 &.has-shadow box-shadow: $navbar-bottom-box-shadow-size $navbar-box-shadow-color &.is-fixed-top top: 0 html, body &.has-navbar-fixed-top padding-top: $navbar-height &.has-navbar-fixed-bottom padding-bottom: $navbar-height .navbar-brand, .navbar-tabs align-items: stretch display: flex flex-shrink: 0 min-height: $navbar-height .navbar-brand a.navbar-item &:focus, &:hover background-color: transparent .navbar-tabs +overflow-touch max-width: 100vw overflow-x: auto overflow-y: hidden .navbar-burger @extend %reset color: $navbar-burger-color +hamburger($navbar-height) +ltr-property("margin", auto, false) .navbar-menu display: none .navbar-item, .navbar-link color: $navbar-item-color display: block line-height: 1.5 padding: 0.5rem 0.75rem position: relative .icon &:only-child margin-left: -0.25rem margin-right: -0.25rem a.navbar-item, .navbar-link cursor: pointer &:focus, &:focus-within, &:hover, &.is-active background-color: $navbar-item-hover-background-color color: $navbar-item-hover-color .navbar-item flex-grow: 0 flex-shrink: 0 img max-height: $navbar-item-img-max-height &.has-dropdown padding: 0 &.is-expanded flex-grow: 1 flex-shrink: 1 &.is-tab border-bottom: 1px solid transparent min-height: $navbar-height padding-bottom: calc(0.5rem - 1px) &:focus, &:hover background-color: $navbar-tab-hover-background-color border-bottom-color: $navbar-tab-hover-border-bottom-color &.is-active background-color: $navbar-tab-active-background-color border-bottom-color: $navbar-tab-active-border-bottom-color border-bottom-style: $navbar-tab-active-border-bottom-style border-bottom-width: $navbar-tab-active-border-bottom-width color: $navbar-tab-active-color padding-bottom: calc(0.5rem - #{$navbar-tab-active-border-bottom-width}) .navbar-content flex-grow: 1 flex-shrink: 1 .navbar-link:not(.is-arrowless) +ltr-property("padding", 2.5em) &::after @extend %arrow border-color: $navbar-dropdown-arrow margin-top: -0.375em +ltr-position(1.125em) .navbar-dropdown font-size: 0.875rem padding-bottom: 0.5rem padding-top: 0.5rem .navbar-item padding-left: 1.5rem padding-right: 1.5rem .navbar-divider background-color: $navbar-divider-background-color border: none display: none height: $navbar-divider-height margin: 0.5rem 0 +until($navbar-breakpoint) .navbar > .container display: block .navbar-brand, .navbar-tabs .navbar-item align-items: center display: flex .navbar-link &::after display: none .navbar-menu background-color: $navbar-background-color box-shadow: 0 8px 16px bulmaRgba($scheme-invert, 0.1) padding: 0.5rem 0 &.is-active display: block // Fixed navbar .navbar &.is-fixed-bottom-touch, &.is-fixed-top-touch +navbar-fixed &.is-fixed-bottom-touch bottom: 0 &.has-shadow box-shadow: 0 -2px 3px bulmaRgba($scheme-invert, 0.1) &.is-fixed-top-touch top: 0 &.is-fixed-top, &.is-fixed-top-touch .navbar-menu +overflow-touch max-height: calc(100vh - #{$navbar-height}) overflow: auto html, body &.has-navbar-fixed-top-touch padding-top: $navbar-height &.has-navbar-fixed-bottom-touch padding-bottom: $navbar-height +from($navbar-breakpoint) .navbar, .navbar-menu, .navbar-start, .navbar-end align-items: stretch display: flex .navbar min-height: $navbar-height &.is-spaced padding: $navbar-padding-vertical $navbar-padding-horizontal .navbar-start, .navbar-end align-items: center a.navbar-item, .navbar-link border-radius: $radius &.is-transparent a.navbar-item, .navbar-link &:focus, &:hover, &.is-active background-color: transparent !important .navbar-item.has-dropdown &.is-active, &.is-hoverable:focus, &.is-hoverable:focus-within, &.is-hoverable:hover .navbar-link background-color: transparent !important .navbar-dropdown a.navbar-item &:focus, &:hover background-color: $navbar-dropdown-item-hover-background-color color: $navbar-dropdown-item-hover-color &.is-active background-color: $navbar-dropdown-item-active-background-color color: $navbar-dropdown-item-active-color .navbar-burger display: none .navbar-item, .navbar-link align-items: center display: flex .navbar-item &.has-dropdown align-items: stretch &.has-dropdown-up .navbar-link::after transform: rotate(135deg) translate(0.25em, -0.25em) .navbar-dropdown border-bottom: $navbar-dropdown-border-top border-radius: $navbar-dropdown-radius $navbar-dropdown-radius 0 0 border-top: none bottom: 100% box-shadow: 0 -8px 8px bulmaRgba($scheme-invert, 0.1) top: auto &.is-active, &.is-hoverable:focus, &.is-hoverable:focus-within, &.is-hoverable:hover .navbar-dropdown display: block .navbar.is-spaced &, &.is-boxed opacity: 1 pointer-events: auto transform: translateY(0) .navbar-menu flex-grow: 1 flex-shrink: 0 .navbar-start justify-content: flex-start +ltr-property("margin", auto) .navbar-end justify-content: flex-end +ltr-property("margin", auto, false) .navbar-dropdown background-color: $navbar-dropdown-background-color border-bottom-left-radius: $navbar-dropdown-radius border-bottom-right-radius: $navbar-dropdown-radius border-top: $navbar-dropdown-border-top box-shadow: 0 8px 8px bulmaRgba($scheme-invert, 0.1) display: none font-size: 0.875rem +ltr-position(0, false) min-width: 100% position: absolute top: 100% z-index: $navbar-dropdown-z .navbar-item padding: 0.375rem 1rem white-space: nowrap a.navbar-item +ltr-property("padding", 3rem) &:focus, &:hover background-color: $navbar-dropdown-item-hover-background-color color: $navbar-dropdown-item-hover-color &.is-active background-color: $navbar-dropdown-item-active-background-color color: $navbar-dropdown-item-active-color .navbar.is-spaced &, &.is-boxed border-radius: $navbar-dropdown-boxed-radius border-top: none box-shadow: $navbar-dropdown-boxed-shadow display: block opacity: 0 pointer-events: none top: calc(100% + (#{$navbar-dropdown-offset})) transform: translateY(-5px) transition-duration: $speed transition-property: opacity, transform &.is-right left: auto right: 0 .navbar-divider display: block .navbar > .container, .container > .navbar .navbar-brand +ltr-property("margin", -.75rem, false) .navbar-menu +ltr-property("margin", -.75rem) // Fixed navbar .navbar &.is-fixed-bottom-desktop, &.is-fixed-top-desktop +navbar-fixed &.is-fixed-bottom-desktop bottom: 0 &.has-shadow box-shadow: 0 -2px 3px bulmaRgba($scheme-invert, 0.1) &.is-fixed-top-desktop top: 0 html, body &.has-navbar-fixed-top-desktop padding-top: $navbar-height &.has-navbar-fixed-bottom-desktop padding-bottom: $navbar-height &.has-spaced-navbar-fixed-top padding-top: $navbar-height + ($navbar-padding-vertical * 2) &.has-spaced-navbar-fixed-bottom padding-bottom: $navbar-height + ($navbar-padding-vertical * 2) // Hover/Active states a.navbar-item, .navbar-link &.is-active color: $navbar-item-active-color &.is-active:not(:focus):not(:hover) background-color: $navbar-item-active-background-color .navbar-item.has-dropdown &:focus, &:hover, &.is-active .navbar-link background-color: $navbar-item-hover-background-color // Combination .hero &.is-fullheight-with-navbar min-height: calc(100vh - #{$navbar-height}) ================================================ FILE: guide/style/bulma/sass/components/pagination.sass ================================================ @import "../utilities/controls" @import "../utilities/mixins" $pagination-color: $text-strong !default $pagination-border-color: $border !default $pagination-margin: -0.25rem !default $pagination-min-width: $control-height !default $pagination-item-font-size: 1em !default $pagination-item-margin: 0.25rem !default $pagination-item-padding-left: 0.5em !default $pagination-item-padding-right: 0.5em !default $pagination-nav-padding-left: 0.75em !default $pagination-nav-padding-right: 0.75em !default $pagination-hover-color: $link-hover !default $pagination-hover-border-color: $link-hover-border !default $pagination-focus-color: $link-focus !default $pagination-focus-border-color: $link-focus-border !default $pagination-active-color: $link-active !default $pagination-active-border-color: $link-active-border !default $pagination-disabled-color: $text-light !default $pagination-disabled-background-color: $border !default $pagination-disabled-border-color: $border !default $pagination-current-color: $link-invert !default $pagination-current-background-color: $link !default $pagination-current-border-color: $link !default $pagination-ellipsis-color: $grey-light !default $pagination-shadow-inset: inset 0 1px 2px rgba($scheme-invert, 0.2) !default .pagination @extend %block font-size: $size-normal margin: $pagination-margin // Sizes &.is-small font-size: $size-small &.is-medium font-size: $size-medium &.is-large font-size: $size-large &.is-rounded .pagination-previous, .pagination-next padding-left: 1em padding-right: 1em border-radius: $radius-rounded .pagination-link border-radius: $radius-rounded .pagination, .pagination-list align-items: center display: flex justify-content: center text-align: center .pagination-previous, .pagination-next, .pagination-link, .pagination-ellipsis @extend %control @extend %unselectable font-size: $pagination-item-font-size justify-content: center margin: $pagination-item-margin padding-left: $pagination-item-padding-left padding-right: $pagination-item-padding-right text-align: center .pagination-previous, .pagination-next, .pagination-link border-color: $pagination-border-color color: $pagination-color min-width: $pagination-min-width &:hover border-color: $pagination-hover-border-color color: $pagination-hover-color &:focus border-color: $pagination-focus-border-color &:active box-shadow: $pagination-shadow-inset &[disabled], &.is-disabled background-color: $pagination-disabled-background-color border-color: $pagination-disabled-border-color box-shadow: none color: $pagination-disabled-color opacity: 0.5 .pagination-previous, .pagination-next padding-left: $pagination-nav-padding-left padding-right: $pagination-nav-padding-right white-space: nowrap .pagination-link &.is-current background-color: $pagination-current-background-color border-color: $pagination-current-border-color color: $pagination-current-color .pagination-ellipsis color: $pagination-ellipsis-color pointer-events: none .pagination-list flex-wrap: wrap li list-style: none +mobile .pagination flex-wrap: wrap .pagination-previous, .pagination-next flex-grow: 1 flex-shrink: 1 .pagination-list li flex-grow: 1 flex-shrink: 1 +tablet .pagination-list flex-grow: 1 flex-shrink: 1 justify-content: flex-start order: 1 .pagination-previous, .pagination-next, .pagination-link, .pagination-ellipsis margin-bottom: 0 margin-top: 0 .pagination-previous order: 2 .pagination-next order: 3 .pagination justify-content: space-between margin-bottom: 0 margin-top: 0 &.is-centered .pagination-previous order: 1 .pagination-list justify-content: center order: 2 .pagination-next order: 3 &.is-right .pagination-previous order: 1 .pagination-next order: 2 .pagination-list justify-content: flex-end order: 3 ================================================ FILE: guide/style/bulma/sass/components/panel.sass ================================================ @import "../utilities/mixins" $panel-margin: $block-spacing !default $panel-item-border: 1px solid $border-light !default $panel-radius: $radius-large !default $panel-shadow: $shadow !default $panel-heading-background-color: $border-light !default $panel-heading-color: $text-strong !default $panel-heading-line-height: 1.25 !default $panel-heading-padding: 0.75em 1em !default $panel-heading-radius: $radius !default $panel-heading-size: 1.25em !default $panel-heading-weight: $weight-bold !default $panel-tabs-font-size: 0.875em !default $panel-tab-border-bottom: 1px solid $border !default $panel-tab-active-border-bottom-color: $link-active-border !default $panel-tab-active-color: $link-active !default $panel-list-item-color: $text !default $panel-list-item-hover-color: $link !default $panel-block-color: $text-strong !default $panel-block-hover-background-color: $background !default $panel-block-active-border-left-color: $link !default $panel-block-active-color: $link-active !default $panel-block-active-icon-color: $link !default $panel-icon-color: $text-light !default $panel-colors: $colors !default .panel border-radius: $panel-radius box-shadow: $panel-shadow font-size: $size-normal &:not(:last-child) margin-bottom: $panel-margin // Colors @each $name, $components in $panel-colors $color: nth($components, 1) $color-invert: nth($components, 2) &.is-#{$name} .panel-heading background-color: $color color: $color-invert .panel-tabs a.is-active border-bottom-color: $color .panel-block.is-active .panel-icon color: $color .panel-tabs, .panel-block &:not(:last-child) border-bottom: $panel-item-border .panel-heading background-color: $panel-heading-background-color border-radius: $panel-radius $panel-radius 0 0 color: $panel-heading-color font-size: $panel-heading-size font-weight: $panel-heading-weight line-height: $panel-heading-line-height padding: $panel-heading-padding .panel-tabs align-items: flex-end display: flex font-size: $panel-tabs-font-size justify-content: center a border-bottom: $panel-tab-border-bottom margin-bottom: -1px padding: 0.5em // Modifiers &.is-active border-bottom-color: $panel-tab-active-border-bottom-color color: $panel-tab-active-color .panel-list a color: $panel-list-item-color &:hover color: $panel-list-item-hover-color .panel-block align-items: center color: $panel-block-color display: flex justify-content: flex-start padding: 0.5em 0.75em input[type="checkbox"] +ltr-property("margin", 0.75em) & > .control flex-grow: 1 flex-shrink: 1 width: 100% &.is-wrapped flex-wrap: wrap &.is-active border-left-color: $panel-block-active-border-left-color color: $panel-block-active-color .panel-icon color: $panel-block-active-icon-color &:last-child border-bottom-left-radius: $panel-radius border-bottom-right-radius: $panel-radius a.panel-block, label.panel-block cursor: pointer &:hover background-color: $panel-block-hover-background-color .panel-icon +fa(14px, 1em) color: $panel-icon-color +ltr-property("margin", 0.75em) .fa font-size: inherit line-height: inherit ================================================ FILE: guide/style/bulma/sass/components/tabs.sass ================================================ @import "../utilities/mixins" $tabs-border-bottom-color: $border !default $tabs-border-bottom-style: solid !default $tabs-border-bottom-width: 1px !default $tabs-link-color: $text !default $tabs-link-hover-border-bottom-color: $text-strong !default $tabs-link-hover-color: $text-strong !default $tabs-link-active-border-bottom-color: $link !default $tabs-link-active-color: $link !default $tabs-link-padding: 0.5em 1em !default $tabs-boxed-link-radius: $radius !default $tabs-boxed-link-hover-background-color: $background !default $tabs-boxed-link-hover-border-bottom-color: $border !default $tabs-boxed-link-active-background-color: $scheme-main !default $tabs-boxed-link-active-border-color: $border !default $tabs-boxed-link-active-border-bottom-color: transparent !default $tabs-toggle-link-border-color: $border !default $tabs-toggle-link-border-style: solid !default $tabs-toggle-link-border-width: 1px !default $tabs-toggle-link-hover-background-color: $background !default $tabs-toggle-link-hover-border-color: $border-hover !default $tabs-toggle-link-radius: $radius !default $tabs-toggle-link-active-background-color: $link !default $tabs-toggle-link-active-border-color: $link !default $tabs-toggle-link-active-color: $link-invert !default .tabs @extend %block +overflow-touch @extend %unselectable align-items: stretch display: flex font-size: $size-normal justify-content: space-between overflow: hidden overflow-x: auto white-space: nowrap a align-items: center border-bottom-color: $tabs-border-bottom-color border-bottom-style: $tabs-border-bottom-style border-bottom-width: $tabs-border-bottom-width color: $tabs-link-color display: flex justify-content: center margin-bottom: -#{$tabs-border-bottom-width} padding: $tabs-link-padding vertical-align: top &:hover border-bottom-color: $tabs-link-hover-border-bottom-color color: $tabs-link-hover-color li display: block &.is-active a border-bottom-color: $tabs-link-active-border-bottom-color color: $tabs-link-active-color ul align-items: center border-bottom-color: $tabs-border-bottom-color border-bottom-style: $tabs-border-bottom-style border-bottom-width: $tabs-border-bottom-width display: flex flex-grow: 1 flex-shrink: 0 justify-content: flex-start &.is-left padding-right: 0.75em &.is-center flex: none justify-content: center padding-left: 0.75em padding-right: 0.75em &.is-right justify-content: flex-end padding-left: 0.75em .icon &:first-child +ltr-property("margin", 0.5em) &:last-child +ltr-property("margin", 0.5em, false) // Alignment &.is-centered ul justify-content: center &.is-right ul justify-content: flex-end // Styles &.is-boxed a border: 1px solid transparent +ltr border-radius: $tabs-boxed-link-radius $tabs-boxed-link-radius 0 0 +rtl border-radius: 0 0 $tabs-boxed-link-radius $tabs-boxed-link-radius &:hover background-color: $tabs-boxed-link-hover-background-color border-bottom-color: $tabs-boxed-link-hover-border-bottom-color li &.is-active a background-color: $tabs-boxed-link-active-background-color border-color: $tabs-boxed-link-active-border-color border-bottom-color: $tabs-boxed-link-active-border-bottom-color !important &.is-fullwidth li flex-grow: 1 flex-shrink: 0 &.is-toggle a border-color: $tabs-toggle-link-border-color border-style: $tabs-toggle-link-border-style border-width: $tabs-toggle-link-border-width margin-bottom: 0 position: relative &:hover background-color: $tabs-toggle-link-hover-background-color border-color: $tabs-toggle-link-hover-border-color z-index: 2 li & + li +ltr-property("margin", -#{$tabs-toggle-link-border-width}, false) &:first-child a +ltr border-top-left-radius: $tabs-toggle-link-radius border-bottom-left-radius: $tabs-toggle-link-radius +rtl border-top-right-radius: $tabs-toggle-link-radius border-bottom-right-radius: $tabs-toggle-link-radius &:last-child a +ltr border-top-right-radius: $tabs-toggle-link-radius border-bottom-right-radius: $tabs-toggle-link-radius +rtl border-top-left-radius: $tabs-toggle-link-radius border-bottom-left-radius: $tabs-toggle-link-radius &.is-active a background-color: $tabs-toggle-link-active-background-color border-color: $tabs-toggle-link-active-border-color color: $tabs-toggle-link-active-color z-index: 1 ul border-bottom: none &.is-toggle-rounded li &:first-child a +ltr border-bottom-left-radius: $radius-rounded border-top-left-radius: $radius-rounded padding-left: 1.25em +rtl border-bottom-right-radius: $radius-rounded border-top-right-radius: $radius-rounded padding-right: 1.25em &:last-child a +ltr border-bottom-right-radius: $radius-rounded border-top-right-radius: $radius-rounded padding-right: 1.25em +rtl border-bottom-left-radius: $radius-rounded border-top-left-radius: $radius-rounded padding-left: 1.25em // Sizes &.is-small font-size: $size-small &.is-medium font-size: $size-medium &.is-large font-size: $size-large ================================================ FILE: guide/style/bulma/sass/elements/_all.sass ================================================ /* Bulma Elements */ @charset "utf-8" @import "box" @import "button" @import "container" @import "content" @import "icon" @import "image" @import "notification" @import "progress" @import "table" @import "tag" @import "title" @import "other" ================================================ FILE: guide/style/bulma/sass/elements/box.sass ================================================ @import "../utilities/mixins" $box-color: $text !default $box-background-color: $scheme-main !default $box-radius: $radius-large !default $box-shadow: $shadow !default $box-padding: 1.25rem !default $box-link-hover-shadow: 0 0.5em 1em -0.125em rgba($scheme-invert, 0.1), 0 0 0 1px $link !default $box-link-active-shadow: inset 0 1px 2px rgba($scheme-invert, 0.2), 0 0 0 1px $link !default .box @extend %block background-color: $box-background-color border-radius: $box-radius box-shadow: $box-shadow color: $box-color display: block padding: $box-padding a.box &:hover, &:focus box-shadow: $box-link-hover-shadow &:active box-shadow: $box-link-active-shadow ================================================ FILE: guide/style/bulma/sass/elements/button.sass ================================================ @import "../utilities/controls" @import "../utilities/mixins" $button-color: $text-strong !default $button-background-color: $scheme-main !default $button-family: false !default $button-border-color: $border !default $button-border-width: $control-border-width !default $button-padding-vertical: calc(0.5em - #{$button-border-width}) !default $button-padding-horizontal: 1em !default $button-hover-color: $link-hover !default $button-hover-border-color: $link-hover-border !default $button-focus-color: $link-focus !default $button-focus-border-color: $link-focus-border !default $button-focus-box-shadow-size: 0 0 0 0.125em !default $button-focus-box-shadow-color: bulmaRgba($link, 0.25) !default $button-active-color: $link-active !default $button-active-border-color: $link-active-border !default $button-text-color: $text !default $button-text-decoration: underline !default $button-text-hover-background-color: $background !default $button-text-hover-color: $text-strong !default $button-ghost-background: none !default $button-ghost-border-color: transparent !default $button-ghost-color: $link !default $button-ghost-decoration: none !default $button-ghost-hover-color: $link !default $button-ghost-hover-decoration: underline !default $button-disabled-background-color: $scheme-main !default $button-disabled-border-color: $border !default $button-disabled-shadow: none !default $button-disabled-opacity: 0.5 !default $button-static-color: $text-light !default $button-static-background-color: $scheme-main-ter !default $button-static-border-color: $border !default $button-colors: $colors !default $button-responsive-sizes: ("mobile": ("small": ($size-small * 0.75), "normal": ($size-small * 0.875), "medium": $size-small, "large": $size-normal), "tablet-only": ("small": ($size-small * 0.875), "normal": ($size-small), "medium": $size-normal, "large": $size-medium)) !default // The button sizes use mixins so they can be used at different breakpoints =button-small &:not(.is-rounded) border-radius: $radius-small font-size: $size-small =button-normal font-size: $size-normal =button-medium font-size: $size-medium =button-large font-size: $size-large .button @extend %control @extend %unselectable background-color: $button-background-color border-color: $button-border-color border-width: $button-border-width color: $button-color cursor: pointer @if $button-family font-family: $button-family justify-content: center padding-bottom: $button-padding-vertical padding-left: $button-padding-horizontal padding-right: $button-padding-horizontal padding-top: $button-padding-vertical text-align: center white-space: nowrap strong color: inherit .icon &, &.is-small, &.is-medium, &.is-large height: 1.5em width: 1.5em &:first-child:not(:last-child) +ltr-property("margin", calc(#{-0.5 * $button-padding-horizontal} - #{$button-border-width}), false) +ltr-property("margin", $button-padding-horizontal * 0.25) &:last-child:not(:first-child) +ltr-property("margin", $button-padding-horizontal * 0.25, false) +ltr-property("margin", calc(#{-0.5 * $button-padding-horizontal} - #{$button-border-width})) &:first-child:last-child margin-left: calc(#{-0.5 * $button-padding-horizontal} - #{$button-border-width}) margin-right: calc(#{-0.5 * $button-padding-horizontal} - #{$button-border-width}) // States &:hover, &.is-hovered border-color: $button-hover-border-color color: $button-hover-color &:focus, &.is-focused border-color: $button-focus-border-color color: $button-focus-color &:not(:active) box-shadow: $button-focus-box-shadow-size $button-focus-box-shadow-color &:active, &.is-active border-color: $button-active-border-color color: $button-active-color // Colors &.is-text background-color: transparent border-color: transparent color: $button-text-color text-decoration: $button-text-decoration &:hover, &.is-hovered, &:focus, &.is-focused background-color: $button-text-hover-background-color color: $button-text-hover-color &:active, &.is-active background-color: bulmaDarken($button-text-hover-background-color, 5%) color: $button-text-hover-color &[disabled], fieldset[disabled] & background-color: transparent border-color: transparent box-shadow: none &.is-ghost background: $button-ghost-background border-color: $button-ghost-border-color color: $button-ghost-color text-decoration: $button-ghost-decoration &:hover, &.is-hovered color: $button-ghost-hover-color text-decoration: $button-ghost-hover-decoration @each $name, $pair in $button-colors $color: nth($pair, 1) $color-invert: nth($pair, 2) &.is-#{$name} background-color: $color border-color: transparent color: $color-invert &:hover, &.is-hovered background-color: bulmaDarken($color, 2.5%) border-color: transparent color: $color-invert &:focus, &.is-focused border-color: transparent color: $color-invert &:not(:active) box-shadow: $button-focus-box-shadow-size bulmaRgba($color, 0.25) &:active, &.is-active background-color: bulmaDarken($color, 5%) border-color: transparent color: $color-invert &[disabled], fieldset[disabled] & background-color: $color border-color: $color box-shadow: none &.is-inverted background-color: $color-invert color: $color &:hover, &.is-hovered background-color: bulmaDarken($color-invert, 5%) &[disabled], fieldset[disabled] & background-color: $color-invert border-color: transparent box-shadow: none color: $color &.is-loading &::after border-color: transparent transparent $color-invert $color-invert !important &.is-outlined background-color: transparent border-color: $color color: $color &:hover, &.is-hovered, &:focus, &.is-focused background-color: $color border-color: $color color: $color-invert &.is-loading &::after border-color: transparent transparent $color $color !important &:hover, &.is-hovered, &:focus, &.is-focused &::after border-color: transparent transparent $color-invert $color-invert !important &[disabled], fieldset[disabled] & background-color: transparent border-color: $color box-shadow: none color: $color &.is-inverted.is-outlined background-color: transparent border-color: $color-invert color: $color-invert &:hover, &.is-hovered, &:focus, &.is-focused background-color: $color-invert color: $color &.is-loading &:hover, &.is-hovered, &:focus, &.is-focused &::after border-color: transparent transparent $color $color !important &[disabled], fieldset[disabled] & background-color: transparent border-color: $color-invert box-shadow: none color: $color-invert // If light and dark colors are provided @if length($pair) >= 4 $color-light: nth($pair, 3) $color-dark: nth($pair, 4) &.is-light background-color: $color-light color: $color-dark &:hover, &.is-hovered background-color: bulmaDarken($color-light, 2.5%) border-color: transparent color: $color-dark &:active, &.is-active background-color: bulmaDarken($color-light, 5%) border-color: transparent color: $color-dark // Sizes &.is-small +button-small &.is-normal +button-normal &.is-medium +button-medium &.is-large +button-large // Modifiers &[disabled], fieldset[disabled] & background-color: $button-disabled-background-color border-color: $button-disabled-border-color box-shadow: $button-disabled-shadow opacity: $button-disabled-opacity &.is-fullwidth display: flex width: 100% &.is-loading color: transparent !important pointer-events: none &::after @extend %loader +center(1em) position: absolute !important &.is-static background-color: $button-static-background-color border-color: $button-static-border-color color: $button-static-color box-shadow: none pointer-events: none &.is-rounded border-radius: $radius-rounded padding-left: calc(#{$button-padding-horizontal} + 0.25em) padding-right: calc(#{$button-padding-horizontal} + 0.25em) .buttons align-items: center display: flex flex-wrap: wrap justify-content: flex-start .button margin-bottom: 0.5rem &:not(:last-child):not(.is-fullwidth) +ltr-property("margin", 0.5rem) &:last-child margin-bottom: -0.5rem &:not(:last-child) margin-bottom: 1rem // Sizes &.are-small .button:not(.is-normal):not(.is-medium):not(.is-large) +button-small &.are-medium .button:not(.is-small):not(.is-normal):not(.is-large) +button-medium &.are-large .button:not(.is-small):not(.is-normal):not(.is-medium) +button-large &.has-addons .button &:not(:first-child) border-bottom-left-radius: 0 border-top-left-radius: 0 &:not(:last-child) border-bottom-right-radius: 0 border-top-right-radius: 0 +ltr-property("margin", -1px) &:last-child +ltr-property("margin", 0) &:hover, &.is-hovered z-index: 2 &:focus, &.is-focused, &:active, &.is-active, &.is-selected z-index: 3 &:hover z-index: 4 &.is-expanded flex-grow: 1 flex-shrink: 1 &.is-centered justify-content: center &:not(.has-addons) .button:not(.is-fullwidth) margin-left: 0.25rem margin-right: 0.25rem &.is-right justify-content: flex-end &:not(.has-addons) .button:not(.is-fullwidth) margin-left: 0.25rem margin-right: 0.25rem @each $bp-name, $bp-sizes in $button-responsive-sizes +breakpoint($bp-name) @each $size, $value in $bp-sizes @if $size != "normal" .button.is-responsive.is-#{$size} font-size: $value @else .button.is-responsive, .button.is-responsive.is-normal font-size: $value ================================================ FILE: guide/style/bulma/sass/elements/container.sass ================================================ @import "../utilities/mixins" $container-offset: (2 * $gap) !default $container-max-width: $fullhd !default .container flex-grow: 1 margin: 0 auto position: relative width: auto &.is-fluid max-width: none !important padding-left: $gap padding-right: $gap width: 100% +desktop max-width: $desktop - $container-offset +until-widescreen &.is-widescreen:not(.is-max-desktop) max-width: min($widescreen, $container-max-width) - $container-offset +until-fullhd &.is-fullhd:not(.is-max-desktop):not(.is-max-widescreen) max-width: min($fullhd, $container-max-width) - $container-offset +widescreen &:not(.is-max-desktop) max-width: min($widescreen, $container-max-width) - $container-offset +fullhd &:not(.is-max-desktop):not(.is-max-widescreen) max-width: min($fullhd, $container-max-width) - $container-offset ================================================ FILE: guide/style/bulma/sass/elements/content.sass ================================================ @import "../utilities/mixins" $content-heading-color: $text-strong !default $content-heading-weight: $weight-semibold !default $content-heading-line-height: 1.125 !default $content-block-margin-bottom: 1em !default $content-blockquote-background-color: $background !default $content-blockquote-border-left: 5px solid $border !default $content-blockquote-padding: 1.25em 1.5em !default $content-pre-padding: 1.25em 1.5em !default $content-table-cell-border: 1px solid $border !default $content-table-cell-border-width: 0 0 1px !default $content-table-cell-padding: 0.5em 0.75em !default $content-table-cell-heading-color: $text-strong !default $content-table-head-cell-border-width: 0 0 2px !default $content-table-head-cell-color: $text-strong !default $content-table-body-last-row-cell-border-bottom-width: 0 !default $content-table-foot-cell-border-width: 2px 0 0 !default $content-table-foot-cell-color: $text-strong !default .content @extend %block // Inline li + li margin-top: 0.25em // Block p, dl, ol, ul, blockquote, pre, table &:not(:last-child) margin-bottom: $content-block-margin-bottom h1, h2, h3, h4, h5, h6 color: $content-heading-color font-weight: $content-heading-weight line-height: $content-heading-line-height h1 font-size: 2em margin-bottom: 0.5em &:not(:first-child) margin-top: 1em h2 font-size: 1.75em margin-bottom: 0.5714em &:not(:first-child) margin-top: 1.1428em h3 font-size: 1.5em margin-bottom: 0.6666em &:not(:first-child) margin-top: 1.3333em h4 font-size: 1.25em margin-bottom: 0.8em h5 font-size: 1.125em margin-bottom: 0.8888em h6 font-size: 1em margin-bottom: 1em blockquote background-color: $content-blockquote-background-color +ltr-property("border", $content-blockquote-border-left, false) padding: $content-blockquote-padding ol list-style-position: outside +ltr-property("margin", 2em, false) margin-top: 1em &:not([type]) list-style-type: decimal &.is-lower-alpha list-style-type: lower-alpha &.is-lower-roman list-style-type: lower-roman &.is-upper-alpha list-style-type: upper-alpha &.is-upper-roman list-style-type: upper-roman ul list-style: disc outside +ltr-property("margin", 2em, false) margin-top: 1em ul list-style-type: circle margin-top: 0.5em ul list-style-type: square dd +ltr-property("margin", 2em, false) figure margin-left: 2em margin-right: 2em text-align: center &:not(:first-child) margin-top: 2em &:not(:last-child) margin-bottom: 2em img display: inline-block figcaption font-style: italic pre +overflow-touch overflow-x: auto padding: $content-pre-padding white-space: pre word-wrap: normal sup, sub font-size: 75% table width: 100% td, th border: $content-table-cell-border border-width: $content-table-cell-border-width padding: $content-table-cell-padding vertical-align: top th color: $content-table-cell-heading-color &:not([align]) text-align: inherit thead td, th border-width: $content-table-head-cell-border-width color: $content-table-head-cell-color tfoot td, th border-width: $content-table-foot-cell-border-width color: $content-table-foot-cell-color tbody tr &:last-child td, th border-bottom-width: $content-table-body-last-row-cell-border-bottom-width .tabs li + li margin-top: 0 // Sizes &.is-small font-size: $size-small &.is-normal font-size: $size-normal &.is-medium font-size: $size-medium &.is-large font-size: $size-large ================================================ FILE: guide/style/bulma/sass/elements/form.sass ================================================ @warn "The form.sass file is DEPRECATED. It has moved into its own /form folder. Please import sass/form/_all instead." ================================================ FILE: guide/style/bulma/sass/elements/icon.sass ================================================ $icon-dimensions: 1.5rem !default $icon-dimensions-small: 1rem !default $icon-dimensions-medium: 2rem !default $icon-dimensions-large: 3rem !default $icon-text-spacing: 0.25em !default .icon align-items: center display: inline-flex justify-content: center height: $icon-dimensions width: $icon-dimensions // Sizes &.is-small height: $icon-dimensions-small width: $icon-dimensions-small &.is-medium height: $icon-dimensions-medium width: $icon-dimensions-medium &.is-large height: $icon-dimensions-large width: $icon-dimensions-large .icon-text align-items: flex-start color: inherit display: inline-flex flex-wrap: wrap line-height: $icon-dimensions vertical-align: top .icon flex-grow: 0 flex-shrink: 0 &:not(:last-child) +ltr margin-right: $icon-text-spacing +rtl margin-left: $icon-text-spacing &:not(:first-child) +ltr margin-left: $icon-text-spacing +rtl margin-right: $icon-text-spacing div.icon-text display: flex ================================================ FILE: guide/style/bulma/sass/elements/image.sass ================================================ @import "../utilities/mixins" $dimensions: 16 24 32 48 64 96 128 !default .image display: block position: relative img display: block height: auto width: 100% &.is-rounded border-radius: $radius-rounded &.is-fullwidth width: 100% // Ratio &.is-square, &.is-1by1, &.is-5by4, &.is-4by3, &.is-3by2, &.is-5by3, &.is-16by9, &.is-2by1, &.is-3by1, &.is-4by5, &.is-3by4, &.is-2by3, &.is-3by5, &.is-9by16, &.is-1by2, &.is-1by3 img, .has-ratio @extend %overlay height: 100% width: 100% &.is-square, &.is-1by1 padding-top: 100% &.is-5by4 padding-top: 80% &.is-4by3 padding-top: 75% &.is-3by2 padding-top: 66.6666% &.is-5by3 padding-top: 60% &.is-16by9 padding-top: 56.25% &.is-2by1 padding-top: 50% &.is-3by1 padding-top: 33.3333% &.is-4by5 padding-top: 125% &.is-3by4 padding-top: 133.3333% &.is-2by3 padding-top: 150% &.is-3by5 padding-top: 166.6666% &.is-9by16 padding-top: 177.7777% &.is-1by2 padding-top: 200% &.is-1by3 padding-top: 300% // Sizes @each $dimension in $dimensions &.is-#{$dimension}x#{$dimension} height: $dimension * 1px width: $dimension * 1px ================================================ FILE: guide/style/bulma/sass/elements/notification.sass ================================================ @import "../utilities/mixins" $notification-background-color: $background !default $notification-code-background-color: $scheme-main !default $notification-radius: $radius !default $notification-padding: 1.25rem 2.5rem 1.25rem 1.5rem !default $notification-padding-ltr: 1.25rem 2.5rem 1.25rem 1.5rem !default $notification-padding-rtl: 1.25rem 1.5rem 1.25rem 2.5rem !default $notification-colors: $colors !default .notification @extend %block background-color: $notification-background-color border-radius: $notification-radius position: relative +ltr padding: $notification-padding-ltr +rtl padding: $notification-padding-rtl a:not(.button):not(.dropdown-item) color: currentColor text-decoration: underline strong color: currentColor code, pre background: $notification-code-background-color pre code background: transparent & > .delete +ltr-position(0.5rem) position: absolute top: 0.5rem .title, .subtitle, .content color: currentColor // Colors @each $name, $pair in $notification-colors $color: nth($pair, 1) $color-invert: nth($pair, 2) &.is-#{$name} background-color: $color color: $color-invert // If light and dark colors are provided @if length($pair) >= 4 $color-light: nth($pair, 3) $color-dark: nth($pair, 4) &.is-light background-color: $color-light color: $color-dark ================================================ FILE: guide/style/bulma/sass/elements/other.sass ================================================ @import "../utilities/mixins" .block @extend %block .delete @extend %delete .heading display: block font-size: 11px letter-spacing: 1px margin-bottom: 5px text-transform: uppercase .loader @extend %loader .number align-items: center background-color: $background border-radius: $radius-rounded display: inline-flex font-size: $size-medium height: 2em justify-content: center margin-right: 1.5rem min-width: 2.5em padding: 0.25rem 0.5rem text-align: center vertical-align: top ================================================ FILE: guide/style/bulma/sass/elements/progress.sass ================================================ @import "../utilities/mixins" $progress-bar-background-color: $border-light !default $progress-value-background-color: $text !default $progress-border-radius: $radius-rounded !default $progress-indeterminate-duration: 1.5s !default $progress-colors: $colors !default .progress @extend %block -moz-appearance: none -webkit-appearance: none border: none border-radius: $progress-border-radius display: block height: $size-normal overflow: hidden padding: 0 width: 100% &::-webkit-progress-bar background-color: $progress-bar-background-color &::-webkit-progress-value background-color: $progress-value-background-color &::-moz-progress-bar background-color: $progress-value-background-color &::-ms-fill background-color: $progress-value-background-color border: none // Colors @each $name, $pair in $progress-colors $color: nth($pair, 1) &.is-#{$name} &::-webkit-progress-value background-color: $color &::-moz-progress-bar background-color: $color &::-ms-fill background-color: $color &:indeterminate background-image: linear-gradient(to right, $color 30%, $progress-bar-background-color 30%) &:indeterminate animation-duration: $progress-indeterminate-duration animation-iteration-count: infinite animation-name: moveIndeterminate animation-timing-function: linear background-color: $progress-bar-background-color background-image: linear-gradient(to right, $text 30%, $progress-bar-background-color 30%) background-position: top left background-repeat: no-repeat background-size: 150% 150% &::-webkit-progress-bar background-color: transparent &::-moz-progress-bar background-color: transparent &::-ms-fill animation-name: none // Sizes &.is-small height: $size-small &.is-medium height: $size-medium &.is-large height: $size-large @keyframes moveIndeterminate from background-position: 200% 0 to background-position: -200% 0 ================================================ FILE: guide/style/bulma/sass/elements/table.sass ================================================ @import "../utilities/mixins" $table-color: $text-strong !default $table-background-color: $scheme-main !default $table-cell-border: 1px solid $border !default $table-cell-border-width: 0 0 1px !default $table-cell-padding: 0.5em 0.75em !default $table-cell-heading-color: $text-strong !default $table-cell-text-align: left !default $table-head-cell-border-width: 0 0 2px !default $table-head-cell-color: $text-strong !default $table-foot-cell-border-width: 2px 0 0 !default $table-foot-cell-color: $text-strong !default $table-head-background-color: transparent !default $table-body-background-color: transparent !default $table-foot-background-color: transparent !default $table-row-hover-background-color: $scheme-main-bis !default $table-row-active-background-color: $primary !default $table-row-active-color: $primary-invert !default $table-striped-row-even-background-color: $scheme-main-bis !default $table-striped-row-even-hover-background-color: $scheme-main-ter !default $table-colors: $colors !default .table @extend %block background-color: $table-background-color color: $table-color td, th border: $table-cell-border border-width: $table-cell-border-width padding: $table-cell-padding vertical-align: top // Colors @each $name, $pair in $table-colors $color: nth($pair, 1) $color-invert: nth($pair, 2) &.is-#{$name} background-color: $color border-color: $color color: $color-invert // Modifiers &.is-narrow white-space: nowrap width: 1% &.is-selected background-color: $table-row-active-background-color color: $table-row-active-color a, strong color: currentColor &.is-vcentered vertical-align: middle th color: $table-cell-heading-color &:not([align]) text-align: $table-cell-text-align tr &.is-selected background-color: $table-row-active-background-color color: $table-row-active-color a, strong color: currentColor td, th border-color: $table-row-active-color color: currentColor thead background-color: $table-head-background-color td, th border-width: $table-head-cell-border-width color: $table-head-cell-color tfoot background-color: $table-foot-background-color td, th border-width: $table-foot-cell-border-width color: $table-foot-cell-color tbody background-color: $table-body-background-color tr &:last-child td, th border-bottom-width: 0 // Modifiers &.is-bordered td, th border-width: 1px tr &:last-child td, th border-bottom-width: 1px &.is-fullwidth width: 100% &.is-hoverable tbody tr:not(.is-selected) &:hover background-color: $table-row-hover-background-color &.is-striped tbody tr:not(.is-selected) &:hover background-color: $table-row-hover-background-color &:nth-child(even) background-color: $table-striped-row-even-hover-background-color &.is-narrow td, th padding: 0.25em 0.5em &.is-striped tbody tr:not(.is-selected) &:nth-child(even) background-color: $table-striped-row-even-background-color .table-container @extend %block +overflow-touch overflow: auto overflow-y: hidden max-width: 100% ================================================ FILE: guide/style/bulma/sass/elements/tag.sass ================================================ @import "../utilities/mixins" $tag-background-color: $background !default $tag-color: $text !default $tag-radius: $radius !default $tag-delete-margin: 1px !default $tag-colors: $colors !default .tags align-items: center display: flex flex-wrap: wrap justify-content: flex-start .tag margin-bottom: 0.5rem &:not(:last-child) +ltr-property("margin", 0.5rem) &:last-child margin-bottom: -0.5rem &:not(:last-child) margin-bottom: 1rem // Sizes &.are-medium .tag:not(.is-normal):not(.is-large) font-size: $size-normal &.are-large .tag:not(.is-normal):not(.is-medium) font-size: $size-medium &.is-centered justify-content: center .tag margin-right: 0.25rem margin-left: 0.25rem &.is-right justify-content: flex-end .tag &:not(:first-child) margin-left: 0.5rem &:not(:last-child) margin-right: 0 &.has-addons .tag +ltr-property("margin", 0) &:not(:first-child) +ltr-property("margin", 0, false) +ltr border-top-left-radius: 0 border-bottom-left-radius: 0 +rtl border-top-right-radius: 0 border-bottom-right-radius: 0 &:not(:last-child) +ltr border-top-right-radius: 0 border-bottom-right-radius: 0 +rtl border-top-left-radius: 0 border-bottom-left-radius: 0 .tag:not(body) align-items: center background-color: $tag-background-color border-radius: $tag-radius color: $tag-color display: inline-flex font-size: $size-small height: 2em justify-content: center line-height: 1.5 padding-left: 0.75em padding-right: 0.75em white-space: nowrap .delete +ltr-property("margin", 0.25rem, false) +ltr-property("margin", -0.375rem) // Colors @each $name, $pair in $tag-colors $color: nth($pair, 1) $color-invert: nth($pair, 2) &.is-#{$name} background-color: $color color: $color-invert // If a light and dark colors are provided @if length($pair) > 3 $color-light: nth($pair, 3) $color-dark: nth($pair, 4) &.is-light background-color: $color-light color: $color-dark // Sizes &.is-normal font-size: $size-small &.is-medium font-size: $size-normal &.is-large font-size: $size-medium .icon &:first-child:not(:last-child) +ltr-property("margin", -0.375em, false) +ltr-property("margin", 0.1875em) &:last-child:not(:first-child) +ltr-property("margin", 0.1875em, false) +ltr-property("margin", -0.375em) &:first-child:last-child +ltr-property("margin", -0.375em, false) +ltr-property("margin", -0.375em) // Modifiers &.is-delete +ltr-property("margin", $tag-delete-margin, false) padding: 0 position: relative width: 2em &::before, &::after background-color: currentColor content: "" display: block left: 50% position: absolute top: 50% transform: translateX(-50%) translateY(-50%) rotate(45deg) transform-origin: center center &::before height: 1px width: 50% &::after height: 50% width: 1px &:hover, &:focus background-color: darken($tag-background-color, 5%) &:active background-color: darken($tag-background-color, 10%) &.is-rounded border-radius: $radius-rounded a.tag &:hover text-decoration: underline ================================================ FILE: guide/style/bulma/sass/elements/title.sass ================================================ @import "../utilities/mixins" $title-color: $text-strong !default $title-family: false !default $title-size: $size-3 !default $title-weight: $weight-semibold !default $title-line-height: 1.125 !default $title-strong-color: inherit !default $title-strong-weight: inherit !default $title-sub-size: 0.75em !default $title-sup-size: 0.75em !default $subtitle-color: $text !default $subtitle-family: false !default $subtitle-size: $size-5 !default $subtitle-weight: $weight-normal !default $subtitle-line-height: 1.25 !default $subtitle-strong-color: $text-strong !default $subtitle-strong-weight: $weight-semibold !default $subtitle-negative-margin: -1.25rem !default .title, .subtitle @extend %block word-break: break-word em, span font-weight: inherit sub font-size: $title-sub-size sup font-size: $title-sup-size .tag vertical-align: middle .title color: $title-color @if $title-family font-family: $title-family font-size: $title-size font-weight: $title-weight line-height: $title-line-height strong color: $title-strong-color font-weight: $title-strong-weight &:not(.is-spaced) + .subtitle margin-top: $subtitle-negative-margin // Sizes @each $size in $sizes $i: index($sizes, $size) &.is-#{$i} font-size: $size .subtitle color: $subtitle-color @if $subtitle-family font-family: $subtitle-family font-size: $subtitle-size font-weight: $subtitle-weight line-height: $subtitle-line-height strong color: $subtitle-strong-color font-weight: $subtitle-strong-weight &:not(.is-spaced) + .title margin-top: $subtitle-negative-margin // Sizes @each $size in $sizes $i: index($sizes, $size) &.is-#{$i} font-size: $size ================================================ FILE: guide/style/bulma/sass/form/_all.sass ================================================ /* Bulma Form */ @charset "utf-8" @import "shared" @import "input-textarea" @import "checkbox-radio" @import "select" @import "file" @import "tools" ================================================ FILE: guide/style/bulma/sass/form/checkbox-radio.sass ================================================ %checkbox-radio cursor: pointer display: inline-block line-height: 1.25 position: relative input cursor: pointer &:hover color: $input-hover-color &[disabled], fieldset[disabled] &, input[disabled] color: $input-disabled-color cursor: not-allowed .checkbox @extend %checkbox-radio .radio @extend %checkbox-radio & + .radio +ltr-property("margin", 0.5em, false) ================================================ FILE: guide/style/bulma/sass/form/file.sass ================================================ $file-border-color: $border !default $file-radius: $radius !default $file-cta-background-color: $scheme-main-ter !default $file-cta-color: $text !default $file-cta-hover-color: $text-strong !default $file-cta-active-color: $text-strong !default $file-name-border-color: $border !default $file-name-border-style: solid !default $file-name-border-width: 1px 1px 1px 0 !default $file-name-max-width: 16em !default $file-colors: $form-colors !default .file @extend %unselectable align-items: stretch display: flex justify-content: flex-start position: relative // Colors @each $name, $pair in $file-colors $color: nth($pair, 1) $color-invert: nth($pair, 2) &.is-#{$name} .file-cta background-color: $color border-color: transparent color: $color-invert &:hover, &.is-hovered .file-cta background-color: bulmaDarken($color, 2.5%) border-color: transparent color: $color-invert &:focus, &.is-focused .file-cta border-color: transparent box-shadow: 0 0 0.5em bulmaRgba($color, 0.25) color: $color-invert &:active, &.is-active .file-cta background-color: bulmaDarken($color, 5%) border-color: transparent color: $color-invert // Sizes &.is-small font-size: $size-small &.is-normal font-size: $size-normal &.is-medium font-size: $size-medium .file-icon .fa font-size: 21px &.is-large font-size: $size-large .file-icon .fa font-size: 28px // Modifiers &.has-name .file-cta border-bottom-right-radius: 0 border-top-right-radius: 0 .file-name border-bottom-left-radius: 0 border-top-left-radius: 0 &.is-empty .file-cta border-radius: $file-radius .file-name display: none &.is-boxed .file-label flex-direction: column .file-cta flex-direction: column height: auto padding: 1em 3em .file-name border-width: 0 1px 1px .file-icon height: 1.5em width: 1.5em .fa font-size: 21px &.is-small .file-icon .fa font-size: 14px &.is-medium .file-icon .fa font-size: 28px &.is-large .file-icon .fa font-size: 35px &.has-name .file-cta border-radius: $file-radius $file-radius 0 0 .file-name border-radius: 0 0 $file-radius $file-radius border-width: 0 1px 1px &.is-centered justify-content: center &.is-fullwidth .file-label width: 100% .file-name flex-grow: 1 max-width: none &.is-right justify-content: flex-end .file-cta border-radius: 0 $file-radius $file-radius 0 .file-name border-radius: $file-radius 0 0 $file-radius border-width: 1px 0 1px 1px order: -1 .file-label align-items: stretch display: flex cursor: pointer justify-content: flex-start overflow: hidden position: relative &:hover .file-cta background-color: bulmaDarken($file-cta-background-color, 2.5%) color: $file-cta-hover-color .file-name border-color: bulmaDarken($file-name-border-color, 2.5%) &:active .file-cta background-color: bulmaDarken($file-cta-background-color, 5%) color: $file-cta-active-color .file-name border-color: bulmaDarken($file-name-border-color, 5%) .file-input height: 100% left: 0 opacity: 0 outline: none position: absolute top: 0 width: 100% .file-cta, .file-name @extend %control border-color: $file-border-color border-radius: $file-radius font-size: 1em padding-left: 1em padding-right: 1em white-space: nowrap .file-cta background-color: $file-cta-background-color color: $file-cta-color .file-name border-color: $file-name-border-color border-style: $file-name-border-style border-width: $file-name-border-width display: block max-width: $file-name-max-width overflow: hidden text-align: inherit text-overflow: ellipsis .file-icon align-items: center display: flex height: 1em justify-content: center +ltr-property("margin", 0.5em) width: 1em .fa font-size: 14px ================================================ FILE: guide/style/bulma/sass/form/input-textarea.sass ================================================ $textarea-padding: $control-padding-horizontal !default $textarea-max-height: 40em !default $textarea-min-height: 8em !default $textarea-colors: $form-colors !default %input-textarea @extend %input box-shadow: $input-shadow max-width: 100% width: 100% &[readonly] box-shadow: none // Colors @each $name, $pair in $textarea-colors $color: nth($pair, 1) &.is-#{$name} border-color: $color &:focus, &.is-focused, &:active, &.is-active box-shadow: $input-focus-box-shadow-size bulmaRgba($color, 0.25) // Sizes &.is-small +control-small &.is-medium +control-medium &.is-large +control-large // Modifiers &.is-fullwidth display: block width: 100% &.is-inline display: inline width: auto .input @extend %input-textarea &.is-rounded border-radius: $radius-rounded padding-left: calc(#{$control-padding-horizontal} + 0.375em) padding-right: calc(#{$control-padding-horizontal} + 0.375em) &.is-static background-color: transparent border-color: transparent box-shadow: none padding-left: 0 padding-right: 0 .textarea @extend %input-textarea display: block max-width: 100% min-width: 100% padding: $textarea-padding resize: vertical &:not([rows]) max-height: $textarea-max-height min-height: $textarea-min-height &[rows] height: initial // Modifiers &.has-fixed-size resize: none ================================================ FILE: guide/style/bulma/sass/form/select.sass ================================================ $select-colors: $form-colors !default .select display: inline-block max-width: 100% position: relative vertical-align: top &:not(.is-multiple) height: $input-height &:not(.is-multiple):not(.is-loading) &::after @extend %arrow border-color: $input-arrow +ltr-position(1.125em) z-index: 4 &.is-rounded select border-radius: $radius-rounded +ltr-property("padding", 1em, false) select @extend %input cursor: pointer display: block font-size: 1em max-width: 100% outline: none &::-ms-expand display: none &[disabled]:hover, fieldset[disabled] &:hover border-color: $input-disabled-border-color &:not([multiple]) +ltr-property("padding", 2.5em) &[multiple] height: auto padding: 0 option padding: 0.5em 1em // States &:not(.is-multiple):not(.is-loading):hover &::after border-color: $input-hover-color // Colors @each $name, $pair in $select-colors $color: nth($pair, 1) &.is-#{$name} &:not(:hover)::after border-color: $color select border-color: $color &:hover, &.is-hovered border-color: bulmaDarken($color, 5%) &:focus, &.is-focused, &:active, &.is-active box-shadow: $input-focus-box-shadow-size bulmaRgba($color, 0.25) // Sizes &.is-small +control-small &.is-medium +control-medium &.is-large +control-large // Modifiers &.is-disabled &::after border-color: $input-disabled-color !important opacity: 0.5 &.is-fullwidth width: 100% select width: 100% &.is-loading &::after @extend %loader margin-top: 0 position: absolute +ltr-position(0.625em) top: 0.625em transform: none &.is-small:after font-size: $size-small &.is-medium:after font-size: $size-medium &.is-large:after font-size: $size-large ================================================ FILE: guide/style/bulma/sass/form/shared.sass ================================================ @import "../utilities/controls" @import "../utilities/mixins" $form-colors: $colors !default $input-color: $text-strong !default $input-background-color: $scheme-main !default $input-border-color: $border !default $input-height: $control-height !default $input-shadow: inset 0 0.0625em 0.125em rgba($scheme-invert, 0.05) !default $input-placeholder-color: bulmaRgba($input-color, 0.3) !default $input-hover-color: $text-strong !default $input-hover-border-color: $border-hover !default $input-focus-color: $text-strong !default $input-focus-border-color: $link !default $input-focus-box-shadow-size: 0 0 0 0.125em !default $input-focus-box-shadow-color: bulmaRgba($link, 0.25) !default $input-disabled-color: $text-light !default $input-disabled-background-color: $background !default $input-disabled-border-color: $background !default $input-disabled-placeholder-color: bulmaRgba($input-disabled-color, 0.3) !default $input-arrow: $link !default $input-icon-color: $border !default $input-icon-active-color: $text !default $input-radius: $radius !default =input @extend %control background-color: $input-background-color border-color: $input-border-color border-radius: $input-radius color: $input-color +placeholder color: $input-placeholder-color &:hover, &.is-hovered border-color: $input-hover-border-color &:focus, &.is-focused, &:active, &.is-active border-color: $input-focus-border-color box-shadow: $input-focus-box-shadow-size $input-focus-box-shadow-color &[disabled], fieldset[disabled] & background-color: $input-disabled-background-color border-color: $input-disabled-border-color box-shadow: none color: $input-disabled-color +placeholder color: $input-disabled-placeholder-color %input +input ================================================ FILE: guide/style/bulma/sass/form/tools.sass ================================================ $label-color: $text-strong !default $label-weight: $weight-bold !default $help-size: $size-small !default $label-colors: $form-colors !default .label color: $label-color display: block font-size: $size-normal font-weight: $label-weight &:not(:last-child) margin-bottom: 0.5em // Sizes &.is-small font-size: $size-small &.is-medium font-size: $size-medium &.is-large font-size: $size-large .help display: block font-size: $help-size margin-top: 0.25rem @each $name, $pair in $label-colors $color: nth($pair, 1) &.is-#{$name} color: $color // Containers .field &:not(:last-child) margin-bottom: 0.75rem // Modifiers &.has-addons display: flex justify-content: flex-start .control &:not(:last-child) +ltr-property("margin", -1px) &:not(:first-child):not(:last-child) .button, .input, .select select border-radius: 0 &:first-child:not(:only-child) .button, .input, .select select +ltr border-bottom-right-radius: 0 border-top-right-radius: 0 +rtl border-bottom-left-radius: 0 border-top-left-radius: 0 &:last-child:not(:only-child) .button, .input, .select select +ltr border-bottom-left-radius: 0 border-top-left-radius: 0 +rtl border-bottom-right-radius: 0 border-top-right-radius: 0 .button, .input, .select select &:not([disabled]) &:hover, &.is-hovered z-index: 2 &:focus, &.is-focused, &:active, &.is-active z-index: 3 &:hover z-index: 4 &.is-expanded flex-grow: 1 flex-shrink: 1 &.has-addons-centered justify-content: center &.has-addons-right justify-content: flex-end &.has-addons-fullwidth .control flex-grow: 1 flex-shrink: 0 &.is-grouped display: flex justify-content: flex-start & > .control flex-shrink: 0 &:not(:last-child) margin-bottom: 0 +ltr-property("margin", 0.75rem) &.is-expanded flex-grow: 1 flex-shrink: 1 &.is-grouped-centered justify-content: center &.is-grouped-right justify-content: flex-end &.is-grouped-multiline flex-wrap: wrap & > .control &:last-child, &:not(:last-child) margin-bottom: 0.75rem &:last-child margin-bottom: -0.75rem &:not(:last-child) margin-bottom: 0 &.is-horizontal +tablet display: flex .field-label .label font-size: inherit +mobile margin-bottom: 0.5rem +tablet flex-basis: 0 flex-grow: 1 flex-shrink: 0 +ltr-property("margin", 1.5rem) text-align: right &.is-small font-size: $size-small padding-top: 0.375em &.is-normal padding-top: 0.375em &.is-medium font-size: $size-medium padding-top: 0.375em &.is-large font-size: $size-large padding-top: 0.375em .field-body .field .field margin-bottom: 0 +tablet display: flex flex-basis: 0 flex-grow: 5 flex-shrink: 1 .field margin-bottom: 0 & > .field flex-shrink: 1 &:not(.is-narrow) flex-grow: 1 &:not(:last-child) +ltr-property("margin", 0.75rem) .control box-sizing: border-box clear: both font-size: $size-normal position: relative text-align: inherit // Modifiers &.has-icons-left, &.has-icons-right .input, .select &:focus & ~ .icon color: $input-icon-active-color &.is-small ~ .icon font-size: $size-small &.is-medium ~ .icon font-size: $size-medium &.is-large ~ .icon font-size: $size-large .icon color: $input-icon-color height: $input-height pointer-events: none position: absolute top: 0 width: $input-height z-index: 4 &.has-icons-left .input, .select select padding-left: $input-height .icon.is-left left: 0 &.has-icons-right .input, .select select padding-right: $input-height .icon.is-right right: 0 &.is-loading &::after @extend %loader position: absolute !important +ltr-position(0.625em) top: 0.625em z-index: 4 &.is-small:after font-size: $size-small &.is-medium:after font-size: $size-medium &.is-large:after font-size: $size-large ================================================ FILE: guide/style/bulma/sass/grid/_all.sass ================================================ /* Bulma Grid */ @charset "utf-8" @import "columns" @import "tiles" ================================================ FILE: guide/style/bulma/sass/grid/columns.sass ================================================ @import "../utilities/mixins" $column-gap: 0.75rem !default .column display: block flex-basis: 0 flex-grow: 1 flex-shrink: 1 padding: $column-gap .columns.is-mobile > &.is-narrow flex: none width: unset .columns.is-mobile > &.is-full flex: none width: 100% .columns.is-mobile > &.is-three-quarters flex: none width: 75% .columns.is-mobile > &.is-two-thirds flex: none width: 66.6666% .columns.is-mobile > &.is-half flex: none width: 50% .columns.is-mobile > &.is-one-third flex: none width: 33.3333% .columns.is-mobile > &.is-one-quarter flex: none width: 25% .columns.is-mobile > &.is-one-fifth flex: none width: 20% .columns.is-mobile > &.is-two-fifths flex: none width: 40% .columns.is-mobile > &.is-three-fifths flex: none width: 60% .columns.is-mobile > &.is-four-fifths flex: none width: 80% .columns.is-mobile > &.is-offset-three-quarters +ltr-property("margin", 75%, false) .columns.is-mobile > &.is-offset-two-thirds +ltr-property("margin", 66.6666%, false) .columns.is-mobile > &.is-offset-half +ltr-property("margin", 50%, false) .columns.is-mobile > &.is-offset-one-third +ltr-property("margin", 33.3333%, false) .columns.is-mobile > &.is-offset-one-quarter +ltr-property("margin", 25%, false) .columns.is-mobile > &.is-offset-one-fifth +ltr-property("margin", 20%, false) .columns.is-mobile > &.is-offset-two-fifths +ltr-property("margin", 40%, false) .columns.is-mobile > &.is-offset-three-fifths +ltr-property("margin", 60%, false) .columns.is-mobile > &.is-offset-four-fifths +ltr-property("margin", 80%, false) @for $i from 0 through 12 .columns.is-mobile > &.is-#{$i} flex: none width: percentage(divide($i, 12)) .columns.is-mobile > &.is-offset-#{$i} +ltr-property("margin", percentage(divide($i, 12)), false) +mobile &.is-narrow-mobile flex: none width: unset &.is-full-mobile flex: none width: 100% &.is-three-quarters-mobile flex: none width: 75% &.is-two-thirds-mobile flex: none width: 66.6666% &.is-half-mobile flex: none width: 50% &.is-one-third-mobile flex: none width: 33.3333% &.is-one-quarter-mobile flex: none width: 25% &.is-one-fifth-mobile flex: none width: 20% &.is-two-fifths-mobile flex: none width: 40% &.is-three-fifths-mobile flex: none width: 60% &.is-four-fifths-mobile flex: none width: 80% &.is-offset-three-quarters-mobile +ltr-property("margin", 75%, false) &.is-offset-two-thirds-mobile +ltr-property("margin", 66.6666%, false) &.is-offset-half-mobile +ltr-property("margin", 50%, false) &.is-offset-one-third-mobile +ltr-property("margin", 33.3333%, false) &.is-offset-one-quarter-mobile +ltr-property("margin", 25%, false) &.is-offset-one-fifth-mobile +ltr-property("margin", 20%, false) &.is-offset-two-fifths-mobile +ltr-property("margin", 40%, false) &.is-offset-three-fifths-mobile +ltr-property("margin", 60%, false) &.is-offset-four-fifths-mobile +ltr-property("margin", 80%, false) @for $i from 0 through 12 &.is-#{$i}-mobile flex: none width: percentage(divide($i, 12)) &.is-offset-#{$i}-mobile +ltr-property("margin", percentage(divide($i, 12)), false) +tablet &.is-narrow, &.is-narrow-tablet flex: none width: unset &.is-full, &.is-full-tablet flex: none width: 100% &.is-three-quarters, &.is-three-quarters-tablet flex: none width: 75% &.is-two-thirds, &.is-two-thirds-tablet flex: none width: 66.6666% &.is-half, &.is-half-tablet flex: none width: 50% &.is-one-third, &.is-one-third-tablet flex: none width: 33.3333% &.is-one-quarter, &.is-one-quarter-tablet flex: none width: 25% &.is-one-fifth, &.is-one-fifth-tablet flex: none width: 20% &.is-two-fifths, &.is-two-fifths-tablet flex: none width: 40% &.is-three-fifths, &.is-three-fifths-tablet flex: none width: 60% &.is-four-fifths, &.is-four-fifths-tablet flex: none width: 80% &.is-offset-three-quarters, &.is-offset-three-quarters-tablet +ltr-property("margin", 75%, false) &.is-offset-two-thirds, &.is-offset-two-thirds-tablet +ltr-property("margin", 66.6666%, false) &.is-offset-half, &.is-offset-half-tablet +ltr-property("margin", 50%, false) &.is-offset-one-third, &.is-offset-one-third-tablet +ltr-property("margin", 33.3333%, false) &.is-offset-one-quarter, &.is-offset-one-quarter-tablet +ltr-property("margin", 25%, false) &.is-offset-one-fifth, &.is-offset-one-fifth-tablet +ltr-property("margin", 20%, false) &.is-offset-two-fifths, &.is-offset-two-fifths-tablet +ltr-property("margin", 40%, false) &.is-offset-three-fifths, &.is-offset-three-fifths-tablet +ltr-property("margin", 60%, false) &.is-offset-four-fifths, &.is-offset-four-fifths-tablet +ltr-property("margin", 80%, false) @for $i from 0 through 12 &.is-#{$i}, &.is-#{$i}-tablet flex: none width: percentage(divide($i, 12)) &.is-offset-#{$i}, &.is-offset-#{$i}-tablet +ltr-property("margin", percentage(divide($i, 12)), false) +touch &.is-narrow-touch flex: none width: unset &.is-full-touch flex: none width: 100% &.is-three-quarters-touch flex: none width: 75% &.is-two-thirds-touch flex: none width: 66.6666% &.is-half-touch flex: none width: 50% &.is-one-third-touch flex: none width: 33.3333% &.is-one-quarter-touch flex: none width: 25% &.is-one-fifth-touch flex: none width: 20% &.is-two-fifths-touch flex: none width: 40% &.is-three-fifths-touch flex: none width: 60% &.is-four-fifths-touch flex: none width: 80% &.is-offset-three-quarters-touch +ltr-property("margin", 75%, false) &.is-offset-two-thirds-touch +ltr-property("margin", 66.6666%, false) &.is-offset-half-touch +ltr-property("margin", 50%, false) &.is-offset-one-third-touch +ltr-property("margin", 33.3333%, false) &.is-offset-one-quarter-touch +ltr-property("margin", 25%, false) &.is-offset-one-fifth-touch +ltr-property("margin", 20%, false) &.is-offset-two-fifths-touch +ltr-property("margin", 40%, false) &.is-offset-three-fifths-touch +ltr-property("margin", 60%, false) &.is-offset-four-fifths-touch +ltr-property("margin", 80%, false) @for $i from 0 through 12 &.is-#{$i}-touch flex: none width: percentage(divide($i, 12)) &.is-offset-#{$i}-touch +ltr-property("margin", percentage(divide($i, 12)), false) +desktop &.is-narrow-desktop flex: none width: unset &.is-full-desktop flex: none width: 100% &.is-three-quarters-desktop flex: none width: 75% &.is-two-thirds-desktop flex: none width: 66.6666% &.is-half-desktop flex: none width: 50% &.is-one-third-desktop flex: none width: 33.3333% &.is-one-quarter-desktop flex: none width: 25% &.is-one-fifth-desktop flex: none width: 20% &.is-two-fifths-desktop flex: none width: 40% &.is-three-fifths-desktop flex: none width: 60% &.is-four-fifths-desktop flex: none width: 80% &.is-offset-three-quarters-desktop +ltr-property("margin", 75%, false) &.is-offset-two-thirds-desktop +ltr-property("margin", 66.6666%, false) &.is-offset-half-desktop +ltr-property("margin", 50%, false) &.is-offset-one-third-desktop +ltr-property("margin", 33.3333%, false) &.is-offset-one-quarter-desktop +ltr-property("margin", 25%, false) &.is-offset-one-fifth-desktop +ltr-property("margin", 20%, false) &.is-offset-two-fifths-desktop +ltr-property("margin", 40%, false) &.is-offset-three-fifths-desktop +ltr-property("margin", 60%, false) &.is-offset-four-fifths-desktop +ltr-property("margin", 80%, false) @for $i from 0 through 12 &.is-#{$i}-desktop flex: none width: percentage(divide($i, 12)) &.is-offset-#{$i}-desktop +ltr-property("margin", percentage(divide($i, 12)), false) +widescreen &.is-narrow-widescreen flex: none width: unset &.is-full-widescreen flex: none width: 100% &.is-three-quarters-widescreen flex: none width: 75% &.is-two-thirds-widescreen flex: none width: 66.6666% &.is-half-widescreen flex: none width: 50% &.is-one-third-widescreen flex: none width: 33.3333% &.is-one-quarter-widescreen flex: none width: 25% &.is-one-fifth-widescreen flex: none width: 20% &.is-two-fifths-widescreen flex: none width: 40% &.is-three-fifths-widescreen flex: none width: 60% &.is-four-fifths-widescreen flex: none width: 80% &.is-offset-three-quarters-widescreen +ltr-property("margin", 75%, false) &.is-offset-two-thirds-widescreen +ltr-property("margin", 66.6666%, false) &.is-offset-half-widescreen +ltr-property("margin", 50%, false) &.is-offset-one-third-widescreen +ltr-property("margin", 33.3333%, false) &.is-offset-one-quarter-widescreen +ltr-property("margin", 25%, false) &.is-offset-one-fifth-widescreen +ltr-property("margin", 20%, false) &.is-offset-two-fifths-widescreen +ltr-property("margin", 40%, false) &.is-offset-three-fifths-widescreen +ltr-property("margin", 60%, false) &.is-offset-four-fifths-widescreen +ltr-property("margin", 80%, false) @for $i from 0 through 12 &.is-#{$i}-widescreen flex: none width: percentage(divide($i, 12)) &.is-offset-#{$i}-widescreen +ltr-property("margin", percentage(divide($i, 12)), false) +fullhd &.is-narrow-fullhd flex: none width: unset &.is-full-fullhd flex: none width: 100% &.is-three-quarters-fullhd flex: none width: 75% &.is-two-thirds-fullhd flex: none width: 66.6666% &.is-half-fullhd flex: none width: 50% &.is-one-third-fullhd flex: none width: 33.3333% &.is-one-quarter-fullhd flex: none width: 25% &.is-one-fifth-fullhd flex: none width: 20% &.is-two-fifths-fullhd flex: none width: 40% &.is-three-fifths-fullhd flex: none width: 60% &.is-four-fifths-fullhd flex: none width: 80% &.is-offset-three-quarters-fullhd +ltr-property("margin", 75%, false) &.is-offset-two-thirds-fullhd +ltr-property("margin", 66.6666%, false) &.is-offset-half-fullhd +ltr-property("margin", 50%, false) &.is-offset-one-third-fullhd +ltr-property("margin", 33.3333%, false) &.is-offset-one-quarter-fullhd +ltr-property("margin", 25%, false) &.is-offset-one-fifth-fullhd +ltr-property("margin", 20%, false) &.is-offset-two-fifths-fullhd +ltr-property("margin", 40%, false) &.is-offset-three-fifths-fullhd +ltr-property("margin", 60%, false) &.is-offset-four-fifths-fullhd +ltr-property("margin", 80%, false) @for $i from 0 through 12 &.is-#{$i}-fullhd flex: none width: percentage(divide($i, 12)) &.is-offset-#{$i}-fullhd +ltr-property("margin", percentage(divide($i, 12)), false) .columns +ltr-property("margin", (-$column-gap), false) +ltr-property("margin", (-$column-gap)) margin-top: (-$column-gap) &:last-child margin-bottom: (-$column-gap) &:not(:last-child) margin-bottom: calc(1.5rem - #{$column-gap}) // Modifiers &.is-centered justify-content: center &.is-gapless +ltr-property("margin", 0, false) +ltr-property("margin", 0) margin-top: 0 & > .column margin: 0 padding: 0 !important &:not(:last-child) margin-bottom: 1.5rem &:last-child margin-bottom: 0 &.is-mobile display: flex &.is-multiline flex-wrap: wrap &.is-vcentered align-items: center // Responsiveness +tablet &:not(.is-desktop) display: flex +desktop // Modifiers &.is-desktop display: flex @if $variable-columns .columns.is-variable --columnGap: 0.75rem +ltr-property("margin", calc(-1 * var(--columnGap)), false) +ltr-property("margin", calc(-1 * var(--columnGap))) > .column padding-left: var(--columnGap) padding-right: var(--columnGap) @for $i from 0 through 8 &.is-#{$i} --columnGap: #{$i * 0.25rem} +mobile &.is-#{$i}-mobile --columnGap: #{$i * 0.25rem} +tablet &.is-#{$i}-tablet --columnGap: #{$i * 0.25rem} +tablet-only &.is-#{$i}-tablet-only --columnGap: #{$i * 0.25rem} +touch &.is-#{$i}-touch --columnGap: #{$i * 0.25rem} +desktop &.is-#{$i}-desktop --columnGap: #{$i * 0.25rem} +desktop-only &.is-#{$i}-desktop-only --columnGap: #{$i * 0.25rem} +widescreen &.is-#{$i}-widescreen --columnGap: #{$i * 0.25rem} +widescreen-only &.is-#{$i}-widescreen-only --columnGap: #{$i * 0.25rem} +fullhd &.is-#{$i}-fullhd --columnGap: #{$i * 0.25rem} ================================================ FILE: guide/style/bulma/sass/grid/tiles.sass ================================================ @import "../utilities/mixins" $tile-spacing: 0.75rem !default .tile align-items: stretch display: block flex-basis: 0 flex-grow: 1 flex-shrink: 1 min-height: min-content // Modifiers &.is-ancestor margin-left: $tile-spacing * -1 margin-right: $tile-spacing * -1 margin-top: $tile-spacing * -1 &:last-child margin-bottom: $tile-spacing * -1 &:not(:last-child) margin-bottom: $tile-spacing &.is-child margin: 0 !important &.is-parent padding: $tile-spacing &.is-vertical flex-direction: column & > .tile.is-child:not(:last-child) margin-bottom: 1.5rem !important // Responsiveness +tablet &:not(.is-child) display: flex @for $i from 1 through 12 &.is-#{$i} flex: none width: (divide($i, 12)) * 100% ================================================ FILE: guide/style/bulma/sass/helpers/_all.sass ================================================ /* Bulma Helpers */ @charset "utf-8" @import "color" @import "flexbox" @import "float" @import "other" @import "overflow" @import "position" @import "spacing" @import "typography" @import "visibility" ================================================ FILE: guide/style/bulma/sass/helpers/color.sass ================================================ @import "../utilities/derived-variables" @each $name, $pair in $colors $color: nth($pair, 1) .has-text-#{$name} color: $color !important a.has-text-#{$name} &:hover, &:focus color: bulmaDarken($color, 10%) !important .has-background-#{$name} background-color: $color !important @if length($pair) >= 4 $color-light: nth($pair, 3) $color-dark: nth($pair, 4) // Light .has-text-#{$name}-light color: $color-light !important a.has-text-#{$name}-light &:hover, &:focus color: bulmaDarken($color-light, 10%) !important .has-background-#{$name}-light background-color: $color-light !important // Dark .has-text-#{$name}-dark color: $color-dark !important a.has-text-#{$name}-dark &:hover, &:focus color: bulmaLighten($color-dark, 10%) !important .has-background-#{$name}-dark background-color: $color-dark !important @each $name, $shade in $shades .has-text-#{$name} color: $shade !important .has-background-#{$name} background-color: $shade !important ================================================ FILE: guide/style/bulma/sass/helpers/flexbox.sass ================================================ $flex-direction-values: row, row-reverse, column, column-reverse @each $value in $flex-direction-values .is-flex-direction-#{$value} flex-direction: $value !important $flex-wrap-values: nowrap, wrap, wrap-reverse @each $value in $flex-wrap-values .is-flex-wrap-#{$value} flex-wrap: $value !important $justify-content-values: flex-start, flex-end, center, space-between, space-around, space-evenly, start, end, left, right @each $value in $justify-content-values .is-justify-content-#{$value} justify-content: $value !important $align-content-values: flex-start, flex-end, center, space-between, space-around, space-evenly, stretch, start, end, baseline @each $value in $align-content-values .is-align-content-#{$value} align-content: $value !important $align-items-values: stretch, flex-start, flex-end, center, baseline, start, end, self-start, self-end @each $value in $align-items-values .is-align-items-#{$value} align-items: $value !important $align-self-values: auto, flex-start, flex-end, center, baseline, stretch @each $value in $align-self-values .is-align-self-#{$value} align-self: $value !important $flex-operators: grow, shrink @each $operator in $flex-operators @for $i from 0 through 5 .is-flex-#{$operator}-#{$i} flex-#{$operator}: $i !important ================================================ FILE: guide/style/bulma/sass/helpers/float.sass ================================================ @import "../utilities/mixins" .is-clearfix +clearfix .is-pulled-left float: left !important .is-pulled-right float: right !important ================================================ FILE: guide/style/bulma/sass/helpers/other.sass ================================================ @import "../utilities/mixins" .is-radiusless border-radius: 0 !important .is-shadowless box-shadow: none !important .is-clickable cursor: pointer !important pointer-events: all !important .is-unselectable @extend %unselectable ================================================ FILE: guide/style/bulma/sass/helpers/overflow.sass ================================================ .is-clipped overflow: hidden !important ================================================ FILE: guide/style/bulma/sass/helpers/position.sass ================================================ @import "../utilities/mixins" .is-overlay @extend %overlay .is-relative position: relative !important ================================================ FILE: guide/style/bulma/sass/helpers/spacing.sass ================================================ .is-marginless margin: 0 !important .is-paddingless padding: 0 !important $spacing-shortcuts: ("margin": "m", "padding": "p") !default $spacing-directions: ("top": "t", "right": "r", "bottom": "b", "left": "l") !default $spacing-horizontal: "x" !default $spacing-vertical: "y" !default $spacing-values: ("0": 0, "1": 0.25rem, "2": 0.5rem, "3": 0.75rem, "4": 1rem, "5": 1.5rem, "6": 3rem, "auto": auto) !default @each $property, $shortcut in $spacing-shortcuts @each $name, $value in $spacing-values // All directions .#{$shortcut}-#{$name} #{$property}: $value !important // Cardinal directions @each $direction, $suffix in $spacing-directions .#{$shortcut}#{$suffix}-#{$name} #{$property}-#{$direction}: $value !important // Horizontal axis @if $spacing-horizontal != null .#{$shortcut}#{$spacing-horizontal}-#{$name} #{$property}-left: $value !important #{$property}-right: $value !important // Vertical axis @if $spacing-vertical != null .#{$shortcut}#{$spacing-vertical}-#{$name} #{$property}-top: $value !important #{$property}-bottom: $value !important ================================================ FILE: guide/style/bulma/sass/helpers/typography.sass ================================================ @import "../utilities/mixins" =typography-size($target:'') @each $size in $sizes $i: index($sizes, $size) .is-size-#{$i}#{if($target == '', '', '-' + $target)} font-size: $size !important +typography-size() +mobile +typography-size('mobile') +tablet +typography-size('tablet') +touch +typography-size('touch') +desktop +typography-size('desktop') +widescreen +typography-size('widescreen') +fullhd +typography-size('fullhd') $alignments: ('centered': 'center', 'justified': 'justify', 'left': 'left', 'right': 'right') @each $alignment, $text-align in $alignments .has-text-#{$alignment} text-align: #{$text-align} !important @each $alignment, $text-align in $alignments +mobile .has-text-#{$alignment}-mobile text-align: #{$text-align} !important +tablet .has-text-#{$alignment}-tablet text-align: #{$text-align} !important +tablet-only .has-text-#{$alignment}-tablet-only text-align: #{$text-align} !important +touch .has-text-#{$alignment}-touch text-align: #{$text-align} !important +desktop .has-text-#{$alignment}-desktop text-align: #{$text-align} !important +desktop-only .has-text-#{$alignment}-desktop-only text-align: #{$text-align} !important +widescreen .has-text-#{$alignment}-widescreen text-align: #{$text-align} !important +widescreen-only .has-text-#{$alignment}-widescreen-only text-align: #{$text-align} !important +fullhd .has-text-#{$alignment}-fullhd text-align: #{$text-align} !important .is-capitalized text-transform: capitalize !important .is-lowercase text-transform: lowercase !important .is-uppercase text-transform: uppercase !important .is-italic font-style: italic !important .is-underlined text-decoration: underline !important .has-text-weight-light font-weight: $weight-light !important .has-text-weight-normal font-weight: $weight-normal !important .has-text-weight-medium font-weight: $weight-medium !important .has-text-weight-semibold font-weight: $weight-semibold !important .has-text-weight-bold font-weight: $weight-bold !important .is-family-primary font-family: $family-primary !important .is-family-secondary font-family: $family-secondary !important .is-family-sans-serif font-family: $family-sans-serif !important .is-family-monospace font-family: $family-monospace !important .is-family-code font-family: $family-code !important ================================================ FILE: guide/style/bulma/sass/helpers/visibility.sass ================================================ @import "../utilities/mixins" $displays: 'block' 'flex' 'inline' 'inline-block' 'inline-flex' @each $display in $displays .is-#{$display} display: #{$display} !important +mobile .is-#{$display}-mobile display: #{$display} !important +tablet .is-#{$display}-tablet display: #{$display} !important +tablet-only .is-#{$display}-tablet-only display: #{$display} !important +touch .is-#{$display}-touch display: #{$display} !important +desktop .is-#{$display}-desktop display: #{$display} !important +desktop-only .is-#{$display}-desktop-only display: #{$display} !important +widescreen .is-#{$display}-widescreen display: #{$display} !important +widescreen-only .is-#{$display}-widescreen-only display: #{$display} !important +fullhd .is-#{$display}-fullhd display: #{$display} !important .is-hidden display: none !important .is-sr-only border: none !important clip: rect(0, 0, 0, 0) !important height: 0.01em !important overflow: hidden !important padding: 0 !important position: absolute !important white-space: nowrap !important width: 0.01em !important +mobile .is-hidden-mobile display: none !important +tablet .is-hidden-tablet display: none !important +tablet-only .is-hidden-tablet-only display: none !important +touch .is-hidden-touch display: none !important +desktop .is-hidden-desktop display: none !important +desktop-only .is-hidden-desktop-only display: none !important +widescreen .is-hidden-widescreen display: none !important +widescreen-only .is-hidden-widescreen-only display: none !important +fullhd .is-hidden-fullhd display: none !important .is-invisible visibility: hidden !important +mobile .is-invisible-mobile visibility: hidden !important +tablet .is-invisible-tablet visibility: hidden !important +tablet-only .is-invisible-tablet-only visibility: hidden !important +touch .is-invisible-touch visibility: hidden !important +desktop .is-invisible-desktop visibility: hidden !important +desktop-only .is-invisible-desktop-only visibility: hidden !important +widescreen .is-invisible-widescreen visibility: hidden !important +widescreen-only .is-invisible-widescreen-only visibility: hidden !important +fullhd .is-invisible-fullhd visibility: hidden !important ================================================ FILE: guide/style/bulma/sass/layout/_all.sass ================================================ /* Bulma Layout */ @charset "utf-8" @import "hero" @import "section" @import "footer" ================================================ FILE: guide/style/bulma/sass/layout/footer.sass ================================================ @import "../utilities/derived-variables" $footer-background-color: $scheme-main-bis !default $footer-color: false !default $footer-padding: 3rem 1.5rem 6rem !default .footer background-color: $footer-background-color padding: $footer-padding @if $footer-color color: $footer-color ================================================ FILE: guide/style/bulma/sass/layout/hero.sass ================================================ @import "../utilities/mixins" $hero-body-padding: 3rem 1.5rem !default $hero-body-padding-tablet: 3rem 3rem !default $hero-body-padding-small: 1.5rem !default $hero-body-padding-medium: 9rem 4.5rem !default $hero-body-padding-large: 18rem 6rem !default $hero-colors: $colors !default // Main container .hero align-items: stretch display: flex flex-direction: column justify-content: space-between .navbar background: none .tabs ul border-bottom: none // Colors @each $name, $pair in $hero-colors $color: nth($pair, 1) $color-invert: nth($pair, 2) &.is-#{$name} background-color: $color color: $color-invert a:not(.button):not(.dropdown-item):not(.tag):not(.pagination-link.is-current), strong color: inherit .title color: $color-invert .subtitle color: bulmaRgba($color-invert, 0.9) a:not(.button), strong color: $color-invert .navbar-menu +touch background-color: $color .navbar-item, .navbar-link color: bulmaRgba($color-invert, 0.7) a.navbar-item, .navbar-link &:hover, &.is-active background-color: bulmaDarken($color, 5%) color: $color-invert .tabs a color: $color-invert opacity: 0.9 &:hover opacity: 1 li &.is-active a color: $color !important opacity: 1 &.is-boxed, &.is-toggle a color: $color-invert &:hover background-color: bulmaRgba($scheme-invert, 0.1) li.is-active a &, &:hover background-color: $color-invert border-color: $color-invert color: $color // Modifiers @if type-of($color) == 'color' &.is-bold $gradient-top-left: darken(saturate(adjust-hue($color, -10deg), 10%), 10%) $gradient-bottom-right: lighten(saturate(adjust-hue($color, 10deg), 5%), 5%) background-image: linear-gradient(141deg, $gradient-top-left 0%, $color 71%, $gradient-bottom-right 100%) +mobile .navbar-menu background-image: linear-gradient(141deg, $gradient-top-left 0%, $color 71%, $gradient-bottom-right 100%) // Sizes &.is-small .hero-body padding: $hero-body-padding-small &.is-medium +tablet .hero-body padding: $hero-body-padding-medium &.is-large +tablet .hero-body padding: $hero-body-padding-large &.is-halfheight, &.is-fullheight, &.is-fullheight-with-navbar .hero-body align-items: center display: flex & > .container flex-grow: 1 flex-shrink: 1 &.is-halfheight min-height: 50vh &.is-fullheight min-height: 100vh // Components .hero-video @extend %overlay overflow: hidden video left: 50% min-height: 100% min-width: 100% position: absolute top: 50% transform: translate3d(-50%, -50%, 0) // Modifiers &.is-transparent opacity: 0.3 // Responsiveness +mobile display: none .hero-buttons margin-top: 1.5rem // Responsiveness +mobile .button display: flex &:not(:last-child) margin-bottom: 0.75rem +tablet display: flex justify-content: center .button:not(:last-child) +ltr-property("margin", 1.5rem) // Containers .hero-head, .hero-foot flex-grow: 0 flex-shrink: 0 .hero-body flex-grow: 1 flex-shrink: 0 padding: $hero-body-padding +tablet padding: $hero-body-padding-tablet ================================================ FILE: guide/style/bulma/sass/layout/section.sass ================================================ @import "../utilities/mixins" $section-padding: 3rem 1.5rem !default $section-padding-desktop: 3rem 3rem !default $section-padding-medium: 9rem 4.5rem !default $section-padding-large: 18rem 6rem !default .section padding: $section-padding // Responsiveness +desktop padding: $section-padding-desktop // Sizes &.is-medium padding: $section-padding-medium &.is-large padding: $section-padding-large ================================================ FILE: guide/style/bulma/sass/utilities/_all.sass ================================================ /* Bulma Utilities */ @charset "utf-8" @import "initial-variables" @import "functions" @import "derived-variables" @import "mixins" @import "controls" @import "extends" ================================================ FILE: guide/style/bulma/sass/utilities/animations.sass ================================================ @warn "The animations.sass file has MOVED. It is now in the /base folder. Please import sass/base/animations instead." ================================================ FILE: guide/style/bulma/sass/utilities/controls.sass ================================================ @import "derived-variables" $control-radius: $radius !default $control-radius-small: $radius-small !default $control-border-width: 1px !default $control-height: 2.5em !default $control-line-height: 1.5 !default $control-padding-vertical: calc(0.5em - #{$control-border-width}) !default $control-padding-horizontal: calc(0.75em - #{$control-border-width}) !default =control -moz-appearance: none -webkit-appearance: none align-items: center border: $control-border-width solid transparent border-radius: $control-radius box-shadow: none display: inline-flex font-size: $size-normal height: $control-height justify-content: flex-start line-height: $control-line-height padding-bottom: $control-padding-vertical padding-left: $control-padding-horizontal padding-right: $control-padding-horizontal padding-top: $control-padding-vertical position: relative vertical-align: top // States &:focus, &.is-focused, &:active, &.is-active outline: none &[disabled], fieldset[disabled] & cursor: not-allowed // The controls sizes use mixins so they can be used at different breakpoints =control-small border-radius: $control-radius-small font-size: $size-small =control-medium font-size: $size-medium =control-large font-size: $size-large ================================================ FILE: guide/style/bulma/sass/utilities/derived-variables.sass ================================================ @import "initial-variables" @import "functions" $primary: $turquoise !default $info: $cyan !default $success: $green !default $warning: $yellow !default $danger: $red !default $light: $white-ter !default $dark: $grey-darker !default // Invert colors $orange-invert: findColorInvert($orange) !default $yellow-invert: findColorInvert($yellow) !default $green-invert: findColorInvert($green) !default $turquoise-invert: findColorInvert($turquoise) !default $cyan-invert: findColorInvert($cyan) !default $blue-invert: findColorInvert($blue) !default $purple-invert: findColorInvert($purple) !default $red-invert: findColorInvert($red) !default $primary-invert: findColorInvert($primary) !default $primary-light: findLightColor($primary) !default $primary-dark: findDarkColor($primary) !default $info-invert: findColorInvert($info) !default $info-light: findLightColor($info) !default $info-dark: findDarkColor($info) !default $success-invert: findColorInvert($success) !default $success-light: findLightColor($success) !default $success-dark: findDarkColor($success) !default $warning-invert: findColorInvert($warning) !default $warning-light: findLightColor($warning) !default $warning-dark: findDarkColor($warning) !default $danger-invert: findColorInvert($danger) !default $danger-light: findLightColor($danger) !default $danger-dark: findDarkColor($danger) !default $light-invert: findColorInvert($light) !default $dark-invert: findColorInvert($dark) !default // General colors $scheme-main: $white !default $scheme-main-bis: $white-bis !default $scheme-main-ter: $white-ter !default $scheme-invert: $black !default $scheme-invert-bis: $black-bis !default $scheme-invert-ter: $black-ter !default $background: $white-ter !default $border: $grey-lighter !default $border-hover: $grey-light !default $border-light: $grey-lightest !default $border-light-hover: $grey-light !default // Text colors $text: $grey-dark !default $text-invert: findColorInvert($text) !default $text-light: $grey !default $text-strong: $grey-darker !default // Code colors $code: darken($red, 15%) !default $code-background: $background !default $pre: $text !default $pre-background: $background !default // Link colors $link: $blue !default $link-invert: findColorInvert($link) !default $link-light: findLightColor($link) !default $link-dark: findDarkColor($link) !default $link-visited: $purple !default $link-hover: $grey-darker !default $link-hover-border: $grey-light !default $link-focus: $grey-darker !default $link-focus-border: $blue !default $link-active: $grey-darker !default $link-active-border: $grey-dark !default // Typography $family-primary: $family-sans-serif !default $family-secondary: $family-sans-serif !default $family-code: $family-monospace !default $size-small: $size-7 !default $size-normal: $size-6 !default $size-medium: $size-5 !default $size-large: $size-4 !default // Effects $shadow: 0 0.5em 1em -0.125em rgba($scheme-invert, 0.1), 0 0px 0 1px rgba($scheme-invert, 0.02) !default // Lists and maps $custom-colors: null !default $custom-shades: null !default $colors: mergeColorMaps(("white": ($white, $black), "black": ($black, $white), "light": ($light, $light-invert), "dark": ($dark, $dark-invert), "primary": ($primary, $primary-invert, $primary-light, $primary-dark), "link": ($link, $link-invert, $link-light, $link-dark), "info": ($info, $info-invert, $info-light, $info-dark), "success": ($success, $success-invert, $success-light, $success-dark), "warning": ($warning, $warning-invert, $warning-light, $warning-dark), "danger": ($danger, $danger-invert, $danger-light, $danger-dark)), $custom-colors) !default $shades: mergeColorMaps(("black-bis": $black-bis, "black-ter": $black-ter, "grey-darker": $grey-darker, "grey-dark": $grey-dark, "grey": $grey, "grey-light": $grey-light, "grey-lighter": $grey-lighter, "white-ter": $white-ter, "white-bis": $white-bis), $custom-shades) !default $sizes: $size-1 $size-2 $size-3 $size-4 $size-5 $size-6 $size-7 !default ================================================ FILE: guide/style/bulma/sass/utilities/extends.sass ================================================ @import "mixins" %control +control %unselectable +unselectable %arrow +arrow %block +block %delete +delete %loader +loader %overlay +overlay %reset +reset ================================================ FILE: guide/style/bulma/sass/utilities/functions.sass ================================================ @function mergeColorMaps($bulma-colors, $custom-colors) // We return at least Bulma's hard-coded colors $merged-colors: $bulma-colors // We want a map as input @if type-of($custom-colors) == 'map' @each $name, $components in $custom-colors // The color name should be a string // and the components either a single color // or a colors list with at least one element @if type-of($name) == 'string' and (type-of($components) == 'list' or type-of($components) == 'color') and length($components) >= 1 $color-base: null $color-invert: null $color-light: null $color-dark: null $value: null // The param can either be a single color // or a list of 2 colors @if type-of($components) == 'color' $color-base: $components $color-invert: findColorInvert($color-base) $color-light: findLightColor($color-base) $color-dark: findDarkColor($color-base) @else if type-of($components) == 'list' $color-base: nth($components, 1) // If Invert, Light and Dark are provided @if length($components) > 3 $color-invert: nth($components, 2) $color-light: nth($components, 3) $color-dark: nth($components, 4) // If only Invert and Light are provided @else if length($components) > 2 $color-invert: nth($components, 2) $color-light: nth($components, 3) $color-dark: findDarkColor($color-base) // If only Invert is provided @else $color-invert: nth($components, 2) $color-light: findLightColor($color-base) $color-dark: findDarkColor($color-base) $value: ($color-base, $color-invert, $color-light, $color-dark) // We only want to merge the map if the color base is an actual color @if type-of($color-base) == 'color' // We merge this colors elements as map with Bulma's colors map // (we can override them this way, no multiple definition for the same name) // $merged-colors: map_merge($merged-colors, ($name: ($color-base, $color-invert, $color-light, $color-dark))) $merged-colors: map_merge($merged-colors, ($name: $value)) @return $merged-colors @function powerNumber($number, $exp) $value: 1 @if $exp > 0 @for $i from 1 through $exp $value: $value * $number @else if $exp < 0 @for $i from 1 through -$exp $value: divide($value, $number) @return $value @function colorLuminance($color) @if type-of($color) != 'color' @return 0.55 $color-rgb: ('red': red($color),'green': green($color),'blue': blue($color)) @each $name, $value in $color-rgb $adjusted: 0 $value: divide($value, 255) @if $value < 0.03928 $value: divide($value, 12.92) @else $value: divide(($value + .055), 1.055) $value: powerNumber($value, 2) $color-rgb: map-merge($color-rgb, ($name: $value)) @return (map-get($color-rgb, 'red') * .2126) + (map-get($color-rgb, 'green') * .7152) + (map-get($color-rgb, 'blue') * .0722) @function findColorInvert($color) @if (colorLuminance($color) > 0.55) @return rgba(#000, 0.7) @else @return #fff @function findLightColor($color, $l: 96%) @if type-of($color) == 'color' $l: 96% @if lightness($color) > 96% $l: lightness($color) @return change-color($color, $lightness: $l) @return $background @function findDarkColor($color, $base-l: 29%) @if type-of($color) == 'color' $luminance: colorLuminance($color) $luminance-delta: (0.53 - $luminance) $target-l: round($base-l + ($luminance-delta * 53)) @return change-color($color, $lightness: max($base-l, $target-l)) @return $text-strong @function bulmaRgba($color, $alpha) @if type-of($color) != 'color' @return $color @return rgba($color, $alpha) @function bulmaDarken($color, $amount) @if type-of($color) != 'color' @return $color @return darken($color, $amount) @function bulmaLighten($color, $amount) @if type-of($color) != 'color' @return $color @return lighten($color, $amount) // Custom divide function by @mdo from https://github.com/twbs/bootstrap/pull/34245 // Replaces old slash division deprecated in Dart Sass @function divide($dividend, $divisor, $precision: 10) $sign: if($dividend > 0 and $divisor > 0, 1, -1) $dividend: abs($dividend) $divisor: abs($divisor) $quotient: 0 $remainder: $dividend @if $dividend == 0 @return 0 @if $divisor == 0 @error "Cannot divide by 0" @if $divisor == 1 @return $dividend @while $remainder >= $divisor $quotient: $quotient + 1 $remainder: $remainder - $divisor @if $remainder > 0 and $precision > 0 $remainder: divide($remainder * 10, $divisor, $precision - 1) * .1 @return ($quotient + $remainder) * $sign ================================================ FILE: guide/style/bulma/sass/utilities/initial-variables.sass ================================================ // Colors $black: hsl(0, 0%, 4%) !default $black-bis: hsl(0, 0%, 7%) !default $black-ter: hsl(0, 0%, 14%) !default $grey-darker: hsl(0, 0%, 21%) !default $grey-dark: hsl(0, 0%, 29%) !default $grey: hsl(0, 0%, 48%) !default $grey-light: hsl(0, 0%, 71%) !default $grey-lighter: hsl(0, 0%, 86%) !default $grey-lightest: hsl(0, 0%, 93%) !default $white-ter: hsl(0, 0%, 96%) !default $white-bis: hsl(0, 0%, 98%) !default $white: hsl(0, 0%, 100%) !default $orange: hsl(14, 100%, 53%) !default $yellow: hsl(44, 100%, 77%) !default $green: hsl(153, 53%, 53%) !default $turquoise: hsl(171, 100%, 41%) !default $cyan: hsl(207, 61%, 53%) !default $blue: hsl(229, 53%, 53%) !default $purple: hsl(271, 100%, 71%) !default $red: hsl(348, 86%, 61%) !default // Typography $family-sans-serif: BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif !default $family-monospace: monospace !default $render-mode: optimizeLegibility !default $size-1: 3rem !default $size-2: 2.5rem !default $size-3: 2rem !default $size-4: 1.5rem !default $size-5: 1.25rem !default $size-6: 1rem !default $size-7: 0.75rem !default $weight-light: 300 !default $weight-normal: 400 !default $weight-medium: 500 !default $weight-semibold: 600 !default $weight-bold: 700 !default // Spacing $block-spacing: 1.5rem !default // Responsiveness // The container horizontal gap, which acts as the offset for breakpoints $gap: 32px !default // 960, 1152, and 1344 have been chosen because they are divisible by both 12 and 16 $tablet: 769px !default // 960px container + 4rem $desktop: 960px + (2 * $gap) !default // 1152px container + 4rem $widescreen: 1152px + (2 * $gap) !default $widescreen-enabled: true !default // 1344px container + 4rem $fullhd: 1344px + (2 * $gap) !default $fullhd-enabled: true !default $breakpoints: ("mobile": ("until": $tablet), "tablet": ("from": $tablet), "tablet-only": ("from": $tablet, "until": $desktop), "touch": ("from": $desktop), "desktop": ("from": $desktop), "desktop-only": ("from": $desktop, "until": $widescreen), "until-widescreen": ("until": $widescreen), "widescreen": ("from": $widescreen), "widescreen-only": ("from": $widescreen, "until": $fullhd), "until-fullhd": ("until": $fullhd), "fullhd": ("from": $fullhd)) !default // Miscellaneous $easing: ease-out !default $radius-small: 2px !default $radius: 4px !default $radius-large: 6px !default $radius-rounded: 9999px !default $speed: 86ms !default // Flags $variable-columns: true !default $rtl: false !default ================================================ FILE: guide/style/bulma/sass/utilities/mixins.sass ================================================ @import "derived-variables" =clearfix &::after clear: both content: " " display: table =center($width, $height: 0) position: absolute @if $height != 0 left: calc(50% - (#{$width} * 0.5)) top: calc(50% - (#{$height} * 0.5)) @else left: calc(50% - (#{$width} * 0.5)) top: calc(50% - (#{$width} * 0.5)) =fa($size, $dimensions) display: inline-block font-size: $size height: $dimensions line-height: $dimensions text-align: center vertical-align: top width: $dimensions =hamburger($dimensions) -moz-appearance: none -webkit-appearance: none appearance: none background: none border: none cursor: pointer display: block height: $dimensions position: relative width: $dimensions span background-color: currentColor display: block height: 1px left: calc(50% - 8px) position: absolute transform-origin: center transition-duration: $speed transition-property: background-color, opacity, transform transition-timing-function: $easing width: 16px &:nth-child(1) top: calc(50% - 6px) &:nth-child(2) top: calc(50% - 1px) &:nth-child(3) top: calc(50% + 4px) &:hover background-color: bulmaRgba(black, 0.05) // Modifers &.is-active span &:nth-child(1) transform: translateY(5px) rotate(45deg) &:nth-child(2) opacity: 0 &:nth-child(3) transform: translateY(-5px) rotate(-45deg) =overflow-touch -webkit-overflow-scrolling: touch =placeholder $placeholders: ':-moz' ':-webkit-input' '-moz' '-ms-input' @each $placeholder in $placeholders &:#{$placeholder}-placeholder @content =reset -moz-appearance: none -webkit-appearance: none appearance: none background: none border: none color: currentColor font-family: inherit font-size: 1em margin: 0 padding: 0 // Responsiveness =from($device) @media screen and (min-width: $device) @content =until($device) @media screen and (max-width: $device - 1px) @content =between($from, $until) @media screen and (min-width: $from) and (max-width: $until - 1px) @content =mobile @media screen and (max-width: $tablet - 1px) @content =tablet @media screen and (min-width: $tablet), print @content =tablet-only @media screen and (min-width: $tablet) and (max-width: $desktop - 1px) @content =touch @media screen and (max-width: $desktop - 1px) @content =desktop @media screen and (min-width: $desktop) @content =desktop-only @if $widescreen-enabled @media screen and (min-width: $desktop) and (max-width: $widescreen - 1px) @content =until-widescreen @if $widescreen-enabled @media screen and (max-width: $widescreen - 1px) @content =widescreen @if $widescreen-enabled @media screen and (min-width: $widescreen) @content =widescreen-only @if $widescreen-enabled and $fullhd-enabled @media screen and (min-width: $widescreen) and (max-width: $fullhd - 1px) @content =until-fullhd @if $fullhd-enabled @media screen and (max-width: $fullhd - 1px) @content =fullhd @if $fullhd-enabled @media screen and (min-width: $fullhd) @content =breakpoint($name) $breakpoint: map-get($breakpoints, $name) @if $breakpoint $from: map-get($breakpoint, "from") $until: map-get($breakpoint, "until") @if $from and $until +between($from, $until) @content @else if $from +from($from) @content @else if $until +until($until) @content =ltr @if not $rtl @content =rtl @if $rtl @content =ltr-property($property, $spacing, $right: true) $normal: if($right, "right", "left") $opposite: if($right, "left", "right") @if $rtl #{$property}-#{$opposite}: $spacing @else #{$property}-#{$normal}: $spacing =ltr-position($spacing, $right: true) $normal: if($right, "right", "left") $opposite: if($right, "left", "right") @if $rtl #{$opposite}: $spacing @else #{$normal}: $spacing // Placeholders =unselectable -webkit-touch-callout: none -webkit-user-select: none -moz-user-select: none -ms-user-select: none user-select: none =arrow($color: transparent) border: 3px solid $color border-radius: 2px border-right: 0 border-top: 0 content: " " display: block height: 0.625em margin-top: -0.4375em pointer-events: none position: absolute top: 50% transform: rotate(-45deg) transform-origin: center width: 0.625em =block($spacing: $block-spacing) &:not(:last-child) margin-bottom: $spacing =delete +unselectable -moz-appearance: none -webkit-appearance: none background-color: bulmaRgba($scheme-invert, 0.2) border: none border-radius: $radius-rounded cursor: pointer pointer-events: auto display: inline-block flex-grow: 0 flex-shrink: 0 font-size: 0 height: 20px max-height: 20px max-width: 20px min-height: 20px min-width: 20px outline: none position: relative vertical-align: top width: 20px &::before, &::after background-color: $scheme-main content: "" display: block left: 50% position: absolute top: 50% transform: translateX(-50%) translateY(-50%) rotate(45deg) transform-origin: center center &::before height: 2px width: 50% &::after height: 50% width: 2px &:hover, &:focus background-color: bulmaRgba($scheme-invert, 0.3) &:active background-color: bulmaRgba($scheme-invert, 0.4) // Sizes &.is-small height: 16px max-height: 16px max-width: 16px min-height: 16px min-width: 16px width: 16px &.is-medium height: 24px max-height: 24px max-width: 24px min-height: 24px min-width: 24px width: 24px &.is-large height: 32px max-height: 32px max-width: 32px min-height: 32px min-width: 32px width: 32px =loader animation: spinAround 500ms infinite linear border: 2px solid $grey-lighter border-radius: $radius-rounded border-right-color: transparent border-top-color: transparent content: "" display: block height: 1em position: relative width: 1em =overlay($offset: 0) bottom: $offset left: $offset position: absolute right: $offset top: $offset ================================================ FILE: guide/style/bulma-prefers-dark/LICENSE ================================================ MIT License Copyright (c) 2019 James Loh Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: guide/style/bulma-prefers-dark/bulma-prefers-dark.sass ================================================ @charset "utf-8" /*! Bulma Prefers Dark | MIT License | github.com/jloh/bulma-prefers-dark */ @import "sass/utilities/_all" +prefers-scheme(dark) @import "sass/base/_all" @import "sass/elements/_all" @import "sass/components/_all" @import "sass/layout/_all" ================================================ FILE: guide/style/bulma-prefers-dark/sass/base/_all.sass ================================================ @charset "utf-8" @import "generic.sass" @import "helpers.sass" ================================================ FILE: guide/style/bulma-prefers-dark/sass/base/generic.sass ================================================ $body-background-color-dark: $body-background-dark !default $body-color-dark: $text-dark !default $hr-background-color-dark: $background-dark !default $strong-color-dark: $text-strong-dark !default html background-color: $body-background-color-dark body color: $body-color-dark // Inline a color: $link-dark &:hover color: $link-hover-dark code background-color: $code-background-dark color: $code-dark hr background-color: $hr-background-color-dark strong color: $strong-color-dark // Block pre background-color: $pre-background-dark color: $pre-dark table th color: $text-strong-dark ================================================ FILE: guide/style/bulma-prefers-dark/sass/base/helpers.sass ================================================ @each $name, $pair in $colors $color: nth($pair, 1) .has-text-#{$name}-dark color: $color !important a.has-text-#{$name}-dark &:hover, &:focus color: lighten($color, 10%) !important .has-background-#{$name}-dark background-color: $color !important @each $name, $shade in $shades .has-text-#{$name}-dark color: $shade !important .has-background-#{$name}-dark background-color: $shade !important ================================================ FILE: guide/style/bulma-prefers-dark/sass/components/_all.sass ================================================ @charset "utf-8" @import "breadcrumb.sass" @import "card.sass" @import "dropdown.sass" @import "list.sass" @import "media.sass" @import "menu.sass" @import "message.sass" @import "modal.sass" @import "navbar.sass" @import "pagination.sass" @import "panel.sass" @import "tabs.sass" ================================================ FILE: guide/style/bulma-prefers-dark/sass/components/breadcrumb.sass ================================================ $breadcrumb-item-color-dark: $link-dark !default $breadcrumb-item-hover-color-dark: $link-hover-dark !default $breadcrumb-item-active-color-dark: $text-strong-dark !default $breadcrumb-item-separator-color-dark: $grey-dark !default .breadcrumb a color: $breadcrumb-item-color-dark &:hover color: $breadcrumb-item-hover-color-dark li &.is-active a color: $breadcrumb-item-active-color-dark & + li::before color: $breadcrumb-item-separator-color-dark ================================================ FILE: guide/style/bulma-prefers-dark/sass/components/card.sass ================================================ $card-color-dark: $text-dark !default $card-background-color-dark: $black !default $card-shadow-dark: 0 2px 3px rgba($white, 0.1), 0 0 0 1px rgba($white, 0.1) !default $card-header-color-dark: $text-strong-dark !default $card-header-shadow-dark: 0 1px 2px rgba($white, 0.1) !default $card-footer-border-top-dark: 1px solid $border-dark !default .card background-color: $card-background-color-dark box-shadow: $card-shadow-dark color: $card-color-dark .card-header box-shadow: $card-header-shadow-dark .card-header-title color: $card-header-color-dark .card-footer border-top: $card-footer-border-top-dark .card-footer-item &:not(:last-child) border-right: $card-footer-border-top-dark ================================================ FILE: guide/style/bulma-prefers-dark/sass/components/dropdown.sass ================================================ $dropdown-content-background-color-dark: $black !default $dropdown-content-arrow: $link-dark !default $dropdown-content-shadow-dark: 0 2px 3px rgba($white, 0.1), 0 0 0 1px rgba($white, 0.1) !default $dropdown-item-color-dark: $grey-light !default $dropdown-item-hover-color-dark: $white !default $dropdown-item-hover-background-color-dark: $background-dark !default $dropdown-item-active-color-dark: $link-invert-dark !default $dropdown-item-active-background-color-dark: $link-dark !default $dropdown-divider-background-color-dark: $border-dark !default .dropdown-content background-color: $dropdown-content-background-color-dark box-shadow: $dropdown-content-shadow-dark .dropdown-item color: $dropdown-item-color-dark a.dropdown-item, button.dropdown-item &:hover background-color: $dropdown-item-hover-background-color-dark color: $dropdown-item-hover-color-dark &.is-active background-color: $dropdown-item-active-background-color-dark color: $dropdown-item-active-color-dark .dropdown-divider background-color: $dropdown-divider-background-color-dark ================================================ FILE: guide/style/bulma-prefers-dark/sass/components/list.sass ================================================ $list-background-color-dark: $black !default $list-shadow-dark: 0 2px 3px rgba($white, 0.1), 0 0 0 1px rgba($white, 0.1) !default $list-item-border-dark: 1px solid $border-dark !default $list-item-color-dark: $text-dark !default $list-item-active-background-color-dark: $link-dark !default $list-item-active-color-dark: $link-invert-dark !default $list-item-hover-background-color-dark: $background-dark !default .list background-color: $list-background-color-dark box-shadow: $list-shadow-dark // &.is-hoverable > .list-item:hover:not(.is-active) // background-color: $list-item-hover-background-color-dark // cursor: pointer .list-item &:not(a) color: $list-item-color-dark &:not(:last-child) border-bottom: $list-item-border-dark &.is-active background-color: $list-item-active-background-color-dark color: $list-item-active-color-dark a.list-item background-color: $list-item-hover-background-color-dark ================================================ FILE: guide/style/bulma-prefers-dark/sass/components/media.sass ================================================ .media .media border-top: 1px solid rgba($border-dark, 0.5) & + .media border-top: 1px solid rgba($border-dark, 0.5) ================================================ FILE: guide/style/bulma-prefers-dark/sass/components/menu.sass ================================================ $menu-item-color-dark: $text-dark !default $menu-item-hover-color-dark: $text-strong-dark !default $menu-item-hover-background-color-dark: $background-dark !default $menu-item-active-color-dark: $link-invert-dark !default $menu-item-active-background-color-dark: $link-dark !default $menu-list-border-left-dark: 1px solid $border-dark !default .menu-list a color: $menu-item-color-dark &:hover background-color: $menu-item-hover-background-color-dark color: $menu-item-hover-color-dark // Modifiers &.is-active background-color: $menu-item-active-background-color-dark color: $menu-item-active-color-dark li ul border-left: $menu-list-border-left-dark ================================================ FILE: guide/style/bulma-prefers-dark/sass/components/message.sass ================================================ $message-background-color-dark: $background-dark !default $message-header-background-color-dark: $text-dark !default $message-header-color-dark: $text-invert-dark !default $message-body-border-color-dark: $border-dark !default $message-body-color-dark: $text-dark !default $message-body-pre-background-color-dark: $black !default .message background-color: $message-background-color-dark // Colors @each $name, $pair in $colors $color: nth($pair, 1) $color-invert: nth($pair, 2) &.is-#{$name} background-color: $background-dark .message-header background-color: $color color: $color-invert .message-body border-color: $color color: $text-dark // Dark Colors @each $name, $pair in $colors $color: nth($pair, 1) $color-invert: nth($pair, 2) &.is-#{$name}-dark background-color: $background-dark .message-header background-color: $color color: $color-invert .message-body border-color: $color color: $text-dark .message-header background-color: $message-header-background-color-dark color: $message-header-color-dark .message-body border-color: $message-body-border-color-dark color: $message-body-color-dark code, pre background-color: $message-body-pre-background-color-dark ================================================ FILE: guide/style/bulma-prefers-dark/sass/components/modal.sass ================================================ $modal-background-background-color-dark: rgba($white, 0.86) !default $modal-card-head-background-color-dark: $background-dark !default $modal-card-head-border-bottom-dark: 1px solid $border-dark !default $modal-card-title-color-dark: $text-strong-dark !default $modal-card-foot-border-top-dark: 1px solid $border-dark !default $modal-card-body-background-color-dark: $white !default .modal-background background-color: $modal-background-background-color-dark .modal-card-head, .modal-card-foot background-color: $modal-card-head-background-color-dark .modal-card-head border-bottom: $modal-card-head-border-bottom-dark .modal-card-title color: $modal-card-title-color-dark .modal-card-foot border-top: $modal-card-foot-border-top-dark .modal-card-body +overflow-touch background-color: $modal-card-body-background-color-dark ================================================ FILE: guide/style/bulma-prefers-dark/sass/components/navbar.sass ================================================ $navbar-background-color-dark: $body-background-dark !default $navbar-box-shadow-size: 0 2px 0 0 !default $navbar-box-shadow-color-dark: $background-dark !default $navbar-item-color-dark: $grey-light !default $navbar-item-hover-color-dark: $link-dark !default $navbar-item-hover-background-color-dark: $black-bis !default $navbar-item-active-color-dark: $white !default $navbar-burger-color-dark: $navbar-item-color-dark !default $navbar-tab-hover-border-bottom-color-dark: $link-dark !default $navbar-tab-active-color-dark: $link-dark !default $navbar-tab-active-border-bottom-color-dark: $link-dark !default $navbar-dropdown-background-color-dark: $black !default $navbar-dropdown-border-top-dark: 2px solid $border-dark !default $navbar-dropdown-arrow-dark: $link-dark !default $navbar-dropdown-boxed-shadow-dark: 0 8px 8px rgba($white, 0.1), 0 0 0 1px rgba($white, 0.1) !default $navbar-dropdown-item-hover-color-dark: $white !default $navbar-dropdown-item-hover-background-color-dark: $background-dark !default $navbar-dropdown-item-active-color-dark: $link-dark !default $navbar-dropdown-item-active-background-color-dark: $background-dark !default $navbar-divider-background-color-dark: $background-dark !default $navbar-bottom-box-shadow-size: 0 -2px 0 0 !default $navbar-breakpoint: $desktop !default .navbar background-color: $navbar-background-color-dark @each $name, $pair in $colors $color: darken(nth($pair, 1), 10%) $color-invert: nth($pair, 2) &.is-#{$name} background-color: $color color: $color-invert .navbar-brand & > .navbar-item, .navbar-link color: $color-invert & > a.navbar-item, .navbar-link &:hover, &.is-active background-color: darken($color, 5%) color: $color-invert .navbar-link &::after border-color: $color-invert .navbar-burger color: $color-invert +from($navbar-breakpoint) .navbar-start, .navbar-end & > .navbar-item, .navbar-link color: $color-invert & > a.navbar-item, .navbar-link &:hover, &.is-active background-color: darken($color, 5%) color: $color-invert .navbar-link &::after border-color: $color-invert .navbar-item.has-dropdown:hover .navbar-link, .navbar-item.has-dropdown.is-active .navbar-link background-color: darken($color, 5%) color: $color-invert .navbar-dropdown a.navbar-item &.is-active background-color: $color color: $color-invert // Colors Dark @each $name, $pair in $colors $color: nth($pair, 1) $color-invert: nth($pair, 2) &.is-#{$name}-dark background-color: $color color: $color-invert .navbar-brand & > .navbar-item, .navbar-link color: $color-invert & > a.navbar-item, .navbar-link &:hover, &.is-active background-color: darken($color, 5%) color: $color-invert .navbar-link &::after border-color: $color-invert .navbar-burger color: $color-invert +from($navbar-breakpoint) .navbar-start, .navbar-end & > .navbar-item, .navbar-link color: $color-invert & > a.navbar-item, .navbar-link &:hover, &.is-active background-color: darken($color, 5%) color: $color-invert .navbar-link &::after border-color: $color-invert .navbar-item.has-dropdown:hover .navbar-link, .navbar-item.has-dropdown.is-active .navbar-link background-color: darken($color, 5%) color: $color-invert .navbar-dropdown a.navbar-item &.is-active background-color: $color color: $color-invert &.has-shadow box-shadow: $navbar-box-shadow-size $navbar-box-shadow-color-dark &.is-fixed-bottom &.has-shadow box-shadow: $navbar-bottom-box-shadow-size $navbar-box-shadow-color-dark .navbar-burger color: $navbar-burger-color-dark .navbar-item, .navbar-link color: $navbar-item-color-dark a.navbar-item, .navbar-link &:hover, &.is-active background-color: $navbar-item-hover-background-color-dark color: $navbar-item-hover-color-dark .navbar-item &:hover border-bottom-color: $navbar-tab-hover-border-bottom-color-dark &.is-active border-bottom-color: $navbar-tab-active-border-bottom-color-dark color: $navbar-tab-active-color-dark .navbar-link:not(.is-arrowless) &::after border-color: $navbar-dropdown-arrow-dark .navbar-divider background-color: $navbar-divider-background-color-dark +until($navbar-breakpoint) .navbar-menu background-color: $navbar-background-color-dark box-shadow: 0 8px 16px rgba($white, 0.1) // Fixed navbar .navbar &.is-fixed-bottom-touch &.has-shadow box-shadow: 0 -2px 3px rgba($white, 0.1) +from($navbar-breakpoint) .navbar &.is-transparent .navbar-dropdown a.navbar-item &:hover background-color: $navbar-dropdown-item-hover-background-color-dark color: $navbar-dropdown-item-hover-color-dark &.is-active background-color: $navbar-dropdown-item-active-background-color-dark color: $navbar-dropdown-item-active-color-dark .navbar-item &.has-dropdown-up .navbar-dropdown border-bottom: $navbar-dropdown-border-top-dark box-shadow: 0 -8px 8px rgba($white, 0.1) .navbar-dropdown background-color: $navbar-dropdown-background-color-dark border-top: $navbar-dropdown-border-top-dark box-shadow: 0 8px 8px rgba($white, 0.1) a.navbar-item &:hover background-color: $navbar-dropdown-item-hover-background-color-dark color: $navbar-dropdown-item-hover-color-dark &.is-active background-color: $navbar-dropdown-item-active-background-color-dark color: $navbar-dropdown-item-active-color-dark .navbar.is-spaced &, &.is-boxed box-shadow: $navbar-dropdown-boxed-shadow-dark // Fixed navbar .navbar &.is-fixed-bottom-desktop &.has-shadow box-shadow: 0 -2px 3px rgba($white, 0.1) // Hover/Active states a.navbar-item, .navbar-link &.is-active color: $navbar-item-active-color-dark .navbar-item.has-dropdown &:hover, &.is-active .navbar-link background-color: $navbar-item-hover-background-color-dark ================================================ FILE: guide/style/bulma-prefers-dark/sass/components/pagination.sass ================================================ $pagination-color-dark: $grey-lighter !default $pagination-border-color-dark: $grey-darker !default $pagination-hover-color-dark: $link-hover-dark !default $pagination-hover-border-color-dark: $link-hover-border-dark !default $pagination-focus-color-dark: $link-focus-dark !default $pagination-focus-border-color-dark: $link-focus-border-dark !default $pagination-active-color-dark: $link-active-dark !default $pagination-active-border-color-dark: $link-active-border-dark !default $pagination-disabled-color-dark: $grey !default $pagination-disabled-background-color-dark: $grey-darker !default $pagination-disabled-border-color-dark: $grey-darker !default $pagination-current-color-dark: $link-invert-dark !default $pagination-current-background-color-dark: $link-dark !default $pagination-current-border-color-dark: $link-dark !default $pagination-ellipsis-color-dark: $grey-dark !default $pagination-shadow-inset-dark: inset 0 1px 2px rgba($white, 0.2) .pagination-previous, .pagination-next, .pagination-link border-color: $pagination-border-color-dark color: $pagination-color-dark &:hover border-color: $pagination-hover-border-color-dark color: $pagination-hover-color-dark &:focus border-color: $pagination-focus-border-color-dark &:active box-shadow: $pagination-shadow-inset-dark &[disabled] background-color: $pagination-disabled-background-color-dark border-color: $pagination-disabled-border-color-dark color: $pagination-disabled-color-dark .pagination-link &.is-current background-color: $pagination-current-background-color-dark border-color: $pagination-current-border-color-dark color: $pagination-current-color-dark .pagination-ellipsis color: $pagination-ellipsis-color-dark ================================================ FILE: guide/style/bulma-prefers-dark/sass/components/panel.sass ================================================ $panel-item-border-dark: 1px solid $border-dark !default $panel-heading-background-color-dark: $background-dark !default $panel-heading-color-dark: $text-strong-dark !default $panel-tab-border-bottom-dark: 1px solid $border-dark !default $panel-tab-active-border-bottom-color-dark: $link-active-border-dark !default $panel-tab-active-color-dark: $link-active-dark !default $panel-list-item-color-dark: $text-dark !default $panel-list-item-hover-color-dark: $link-dark !default $panel-block-color-dark: $text-strong-dark !default $panel-block-hover-background-color-dark: $background-dark !default $panel-block-active-border-left-color-dark: $link-dark !default $panel-block-active-color-dark: $link-active-dark !default $panel-block-active-icon-color-dark: $link-dark !default .panel-heading, .panel-tabs, .panel-block border-bottom: $panel-item-border-dark border-left: $panel-item-border-dark border-right: $panel-item-border-dark &:first-child border-top: $panel-item-border-dark .panel-heading background-color: $panel-heading-background-color-dark color: $panel-heading-color-dark .panel-tabs a border-bottom: $panel-tab-border-bottom-dark // Modifiers &.is-active border-bottom-color: $panel-tab-active-border-bottom-color-dark color: $panel-tab-active-color-dark .panel-list a color: $panel-list-item-color-dark &:hover color: $panel-list-item-hover-color-dark .panel-block color: $panel-block-color-dark &.is-active border-left-color: $panel-block-active-border-left-color-dark color: $panel-block-active-color-dark .panel-icon color: $panel-block-active-icon-color-dark a.panel-block, label.panel-block &:hover background-color: $panel-block-hover-background-color-dark ================================================ FILE: guide/style/bulma-prefers-dark/sass/components/tabs.sass ================================================ $tabs-border-bottom-color-dark: $border-dark !default $tabs-link-color-dark: $text-dark !default $tabs-link-hover-border-bottom-color-dark: $text-strong-dark !default $tabs-link-hover-color-dark: $text-strong-dark !default $tabs-link-active-border-bottom-color-dark: $link-dark !default $tabs-link-active-color-dark: $link-dark !default $tabs-boxed-link-hover-background-color-dark: $background-dark !default $tabs-boxed-link-hover-border-bottom-color-dark: $border-dark !default $tabs-boxed-link-active-background-color-dark: $black !default $tabs-boxed-link-active-border-color-dark: $border-dark !default $tabs-toggle-link-border-color-dark: $border-dark !default $tabs-toggle-link-hover-background-color-dark: $background-dark !default $tabs-toggle-link-hover-border-color-dark: $border-hover-dark !default $tabs-toggle-link-active-background-color-dark: $link-dark !default $tabs-toggle-link-active-border-color-dark: $link-dark !default $tabs-toggle-link-active-color-dark: $link-invert-dark !default .tabs a border-bottom-color: $tabs-border-bottom-color-dark color: $tabs-link-color-dark &:hover border-bottom-color: $tabs-link-hover-border-bottom-color-dark color: $tabs-link-hover-color-dark li &.is-active a border-bottom-color: $tabs-link-active-border-bottom-color-dark color: $tabs-link-active-color-dark ul border-bottom-color: $tabs-border-bottom-color-dark // Styles &.is-boxed a &:hover background-color: $tabs-boxed-link-hover-background-color-dark border-bottom-color: $tabs-boxed-link-hover-border-bottom-color-dark li &.is-active a background-color: $tabs-boxed-link-active-background-color-dark border-color: $tabs-boxed-link-active-border-color-dark &.is-toggle a border-color: $tabs-toggle-link-border-color-dark &:hover background-color: $tabs-toggle-link-hover-background-color-dark border-color: $tabs-toggle-link-hover-border-color-dark li &.is-active a background-color: $tabs-toggle-link-active-background-color-dark border-color: $tabs-toggle-link-active-border-color-dark color: $tabs-toggle-link-active-color-dark ================================================ FILE: guide/style/bulma-prefers-dark/sass/elements/_all.sass ================================================ @charset "utf-8" @import "box.sass" @import "button.sass" @import "content.sass" @import "form.sass" @import "notification.sass" @import "progress.sass" @import "table.sass" @import "tag.sass" @import "title.sass" @import "other.sass" ================================================ FILE: guide/style/bulma-prefers-dark/sass/elements/box.sass ================================================ $box-color-dark: $text-dark !default $box-background-color-dark: $black !default $box-shadow-dark: 0 2px 3px rgba($white, 0.1), 0 0 0 1px rgba($white, 0.1) !default $box-link-hover-shadow-dark: 0 2px 3px rgba($white, 0.1), 0 0 0 1px $link-dark !default $box-link-active-shadow-dark: inset 0 1px 2px rgba($white, 0.2), 0 0 0 1px $link-dark !default .box background-color: $box-background-color-dark box-shadow: $box-shadow-dark color: $box-color-dark a.box &:hover, &:focus box-shadow: $box-link-hover-shadow-dark &:active box-shadow: $box-link-active-shadow-dark ================================================ FILE: guide/style/bulma-prefers-dark/sass/elements/button.sass ================================================ $button-color-dark: $grey-lighter !default $button-background-color-dark: $black !default $button-border-color-dark: $grey-darker !default $button-hover-color-dark: $link-hover-dark !default $button-hover-border-color-dark: $link-hover-border-dark !default $button-focus-color-dark: $link-focus-dark !default $button-focus-border-color-dark: $link-focus-border-dark !default $button-focus-box-shadow-size: 0 0 0 0.125em !default $button-focus-box-shadow-color-dark: rgba($link-dark, 0.25) !default $button-active-color-dark: $link-active-dark !default $button-active-border-color-dark: $link-active-border-dark !default $button-text-color-dark: $text-dark !default $button-text-hover-background-color-dark: $background-dark !default $button-text-hover-color-dark: $text-strong-dark !default $button-disabled-background-color-dark: $black !default $button-disabled-border-color-dark: $grey-darker !default $button-static-color-dark: $grey !default $button-static-background-color-dark: $white-ter !default $button-static-border-color-dark: $grey-darker !default .button background-color: $button-background-color-dark border-color: $button-border-color-dark color: $button-color-dark // States &:hover, &.is-hovered border-color: $button-hover-border-color-dark color: $button-hover-color-dark &:focus, &.is-focused border-color: $button-focus-border-color-dark color: $button-focus-color-dark &:not(:active) box-shadow: $button-focus-box-shadow-size $button-focus-box-shadow-color-dark &:active, &.is-active border-color: $button-active-border-color-dark color: $button-active-color-dark // Colors &.is-text color: $button-text-color-dark &:hover, &.is-hovered, &:focus, &.is-focused background-color: $button-text-hover-background-color-dark color: $button-text-hover-color-dark &:active, &.is-active background-color: darken($button-text-hover-background-color-dark, 5%) color: $button-text-hover-color-dark // Colors @each $name, $pair in $colors $color: darken(nth($pair, 1), 10%) $color-invert: nth($pair, 2) &.is-#{$name} background-color: $color border-color: transparent color: $color-invert &:hover, &.is-hovered background-color: darken($color, 2.5%) border-color: transparent color: $color-invert &:focus, &.is-focused border-color: transparent color: $color-invert &:not(:active) box-shadow: $button-focus-box-shadow-size rgba($color, 0.25) &:active, &.is-active background-color: darken($color, 5%) border-color: transparent color: $color-invert &[disabled], fieldset[disabled] & background-color: $color border-color: transparent box-shadow: none &.is-inverted background-color: $color-invert color: $color &:hover background-color: darken($color-invert, 5%) &[disabled], fieldset[disabled] & background-color: $color-invert border-color: transparent box-shadow: none color: $color &.is-loading &::after border-color: transparent transparent $color-invert $color-invert !important &.is-outlined background-color: transparent border-color: $color color: $color &:hover, &:focus background-color: $color border-color: $color color: $color-invert &.is-loading &::after border-color: transparent transparent $color $color !important &[disabled], fieldset[disabled] & background-color: transparent border-color: $color box-shadow: none color: $color &.is-inverted.is-outlined background-color: transparent border-color: $color-invert color: $color-invert &:hover, &:focus background-color: $color-invert color: $color &[disabled], fieldset[disabled] & background-color: transparent border-color: $color-invert box-shadow: none color: $color-invert // Colors Dark @each $name, $pair in $colors $color: nth($pair, 1) $color-invert: nth($pair, 2) &.is-#{$name}-dark background-color: $color border-color: transparent color: $color-invert &:hover, &.is-hovered background-color: darken($color, 2.5%) border-color: transparent color: $color-invert &:focus, &.is-focused border-color: transparent color: $color-invert &:not(:active) box-shadow: $button-focus-box-shadow-size rgba($color, 0.25) &:active, &.is-active background-color: darken($color, 5%) border-color: transparent color: $color-invert &[disabled], fieldset[disabled] & background-color: $color border-color: transparent box-shadow: none &.is-inverted background-color: $color-invert color: $color &:hover background-color: darken($color-invert, 5%) &[disabled], fieldset[disabled] & background-color: $color-invert border-color: transparent box-shadow: none color: $color &.is-loading &::after border-color: transparent transparent $color-invert $color-invert !important &.is-outlined background-color: transparent border-color: $color color: $color &:hover, &:focus background-color: $color border-color: $color color: $color-invert &.is-loading &::after border-color: transparent transparent $color $color !important &[disabled], fieldset[disabled] & background-color: transparent border-color: $color box-shadow: none color: $color &.is-inverted.is-outlined background-color: transparent border-color: $color-invert color: $color-invert &:hover, &:focus background-color: $color-invert color: $color &[disabled], fieldset[disabled] & background-color: transparent border-color: $color-invert box-shadow: none color: $color-invert // Modifiers &[disabled], fieldset[disabled] & background-color: $button-disabled-background-color-dark border-color: $button-disabled-border-color-dark &.is-static background-color: $button-static-background-color-dark border-color: $button-static-border-color-dark color: $button-static-color-dark ================================================ FILE: guide/style/bulma-prefers-dark/sass/elements/content.sass ================================================ $content-heading-color-dark: $text-strong-dark !default $content-blockquote-background-color-dark: $background-dark !default $content-blockquote-border-left-dark: 5px solid $border-dark !default $content-table-cell-border-dark: 1px solid $border-dark !default $content-table-cell-heading-color-dark: $text-strong-dark !default $content-table-head-cell-color-dark: $text-strong-dark !default $content-table-foot-cell-color-dark: $text-strong-dark !default .content h1, h2, h3, h4, h5, h6 color: $content-heading-color-dark blockquote background-color: $content-blockquote-background-color-dark border-left: $content-blockquote-border-left-dark table td, th border: $content-table-cell-border-dark th color: $content-table-cell-heading-color-dark thead td, th color: $content-table-head-cell-color-dark tfoot td, th color: $content-table-foot-cell-color-dark ================================================ FILE: guide/style/bulma-prefers-dark/sass/elements/form.sass ================================================ $input-color-dark: $grey-lighter !default $input-background-color-dark: $black !default $input-border-color-dark: $grey-darker !default $input-shadow-dark: inset 0 1px 2px rgba($white, 0.1) !default $input-placeholder-color-dark: rgba($input-color-dark, 0.3) !default $input-hover-color-dark: $grey-lighter !default $input-hover-border-color-dark: $grey-dark !default $input-focus-color-dark: $grey-lighter !default $input-focus-border-color-dark: $link-dark !default $input-focus-box-shadow-size: 0 0 0 0.125em !default $input-focus-box-shadow-color-dark: rgba($link-dark, 0.25) !default $input-disabled-color-dark: $text-dark !default $input-disabled-background-color-dark: $background-dark !default $input-disabled-border-color-dark: $background-dark !default $input-disabled-placeholder-color-dark: rgba($input-disabled-color-dark, 0.3) !default $input-arrow-dark: $link-dark !default $input-icon-color-dark: $grey-darker !default $file-border-color-dark: $border-dark !default $file-cta-background-color-dark: $black-ter !default $file-cta-color-dark: $grey-light !default $file-cta-hover-color-dark: $grey-lighter !default $file-cta-active-color-dark: $grey-lighter !default $file-name-border-color-dark: $border-dark !default $label-color-dark: $grey-lighter !default =input background-color: $input-background-color-dark border-color: $input-border-color-dark color: $input-color-dark +placeholder color: $input-placeholder-color-dark &:hover, &.is-hovered border-color: $input-hover-border-color-dark &:focus, &.is-focused, &:active, &.is-active border-color: $input-focus-border-color-dark box-shadow: $input-focus-box-shadow-size $input-focus-box-shadow-color-dark &[disabled], fieldset[disabled] & background-color: $input-disabled-background-color-dark border-color: $input-disabled-border-color-dark color: $input-disabled-color-dark +placeholder color: $input-disabled-placeholder-color-dark .input, .textarea +input box-shadow: $input-shadow-dark // Colors @each $name, $pair in $colors $color: darken(nth($pair, 1), 10%) &.is-#{$name} border-color: $color &:focus, &.is-focused, &:active, &.is-active box-shadow: $input-focus-box-shadow-size rgba($color, 0.25) // Colors Dark @each $name, $pair in $colors $color: nth($pair, 1) &.is-#{$name}-dark border-color: $color &:focus, &.is-focused, &:active, &.is-active box-shadow: $input-focus-box-shadow-size rgba($color, 0.25) .checkbox, .radio &:hover color: $input-hover-color-dark &[disabled], fieldset[disabled] & color: $input-disabled-color-dark .select &:not(.is-multiple):not(.is-loading) &::after border-color: $input-arrow-dark select +input &[disabled]:hover, fieldset[disabled] &:hover border-color: $input-disabled-border-color-dark option color: $input-color-dark // States &:not(.is-multiple):not(.is-loading):hover &::after border-color: $input-hover-color-dark // Colors @each $name, $pair in $colors $color: darken(nth($pair, 1), 10%) &.is-#{$name} &:not(:hover)::after border-color: $color select border-color: $color &:hover, &.is-hovered border-color: darken($color, 5%) &:focus, &.is-focused, &:active, &.is-active box-shadow: $input-focus-box-shadow-size rgba($color, 0.25) // Colors Dark @each $name, $pair in $colors $color: nth($pair, 1) &.is-#{$name}-dark &:not(:hover)::after border-color: $color select border-color: $color &:hover, &.is-hovered border-color: darken($color, 5%) &:focus, &.is-focused, &:active, &.is-active box-shadow: $input-focus-box-shadow-size rgba($color, 0.25) // Modifiers &.is-disabled &::after border-color: $input-disabled-color-dark .file // Colors @each $name, $pair in $colors $color: darken(nth($pair, 1), 10%) $color-invert: nth($pair, 2) &.is-#{$name} .file-cta background-color: $color color: $color-invert &:hover, &.is-hovered .file-cta background-color: darken($color, 2.5%) color: $color-invert &:focus, &.is-focused .file-cta box-shadow: 0 0 0.5em rgba($color, 0.25) color: $color-invert &:active, &.is-active .file-cta background-color: darken($color, 5%) color: $color-invert // Colors Dark @each $name, $pair in $colors $color: nth($pair, 1) $color-invert: nth($pair, 2) &.is-#{$name}-dark .file-cta background-color: $color color: $color-invert &:hover, &.is-hovered .file-cta background-color: darken($color, 2.5%) color: $color-invert &:focus, &.is-focused .file-cta box-shadow: 0 0 0.5em rgba($color, 0.25) color: $color-invert &:active, &.is-active .file-cta background-color: darken($color, 5%) color: $color-invert .file-label &:hover .file-cta background-color: darken($file-cta-background-color-dark, 2.5%) color: $file-cta-hover-color-dark .file-name border-color: darken($file-name-border-color-dark, 2.5%) &:active .file-cta background-color: darken($file-cta-background-color-dark, 5%) color: $file-cta-active-color-dark .file-name border-color: darken($file-name-border-color-dark, 5%) .file-cta, .file-name border-color: $file-border-color-dark .file-cta background-color: $file-cta-background-color-dark color: $file-cta-color-dark .file-name border-color: $file-name-border-color-dark .label color: $label-color-dark .help @each $name, $pair in $colors $color: darken(nth($pair, 1), 10%) &.is-#{$name} color: $color @each $name, $pair in $colors $color: nth($pair, 1) &.is-#{$name}-dark color: $color // Containers .control // Modifiers &.has-icons-left, &.has-icons-right .icon color: $input-icon-color-dark ================================================ FILE: guide/style/bulma-prefers-dark/sass/elements/notification.sass ================================================ $notification-background-color-dark: $background-dark !default .notification background-color: $notification-background-color-dark code, pre background: $black // Colors @each $name, $pair in $colors $color: darken(nth($pair, 1), 10%) $color-invert: nth($pair, 2) &.is-#{$name} background-color: $color color: $color-invert // Colors Dark @each $name, $pair in $colors $color: nth($pair, 1) $color-invert: nth($pair, 2) &.is-#{$name}-dark background-color: $color color: $color-invert ================================================ FILE: guide/style/bulma-prefers-dark/sass/elements/other.sass ================================================ .number background-color: $background-dark ================================================ FILE: guide/style/bulma-prefers-dark/sass/elements/progress.sass ================================================ $progress-bar-background-color-dark: $border-dark !default $progress-value-background-color-dark: $text-dark !default .progress &::-webkit-progress-bar background-color: $progress-bar-background-color-dark &::-webkit-progress-value background-color: $progress-value-background-color-dark &::-moz-progress-bar background-color: $progress-value-background-color-dark &::-ms-fill background-color: $progress-value-background-color-dark &:indeterminate background-color: $progress-bar-background-color-dark background-image: linear-gradient(to right, $text 30%, $progress-bar-background-color-dark 30%) // Colors @each $name, $pair in $colors $color: darken(nth($pair, 1), 10%) &.is-#{$name} &::-webkit-progress-value background-color: $color &::-moz-progress-bar background-color: $color &::-ms-fill background-color: $color &:indeterminate background-image: linear-gradient(to right, $color 30%, $progress-bar-background-color-dark 30%) // Colors Dark @each $name, $pair in $colors $color: nth($pair, 1) &.is-#{$name}-dark &::-webkit-progress-value background-color: $color &::-moz-progress-bar background-color: $color &::-ms-fill background-color: $color &:indeterminate background-image: linear-gradient(to right, $color 30%, $progress-bar-background-color-dark 30%) ================================================ FILE: guide/style/bulma-prefers-dark/sass/elements/table.sass ================================================ $table-color-dark: $grey-lighter !default $table-background-color-dark: $black !default $table-cell-border-dark: 1px solid $grey-darker !default $table-cell-heading-color-dark: $text-strong-dark !default $table-head-cell-color-dark: $text-strong-dark !default $table-foot-cell-color-dark: $text-strong-dark !default $table-row-hover-background-color-dark: $black-bis !default $table-row-active-background-color-dark: $primary-dark !default $table-row-active-color-dark: $primary-invert-dark !default $table-striped-row-even-background-color-dark: $black-bis !default $table-striped-row-even-hover-background-color-dark: $black-ter !default .table background-color: $table-background-color-dark color: $table-color-dark td, th border: $table-cell-border-dark // Colors @each $name, $pair in $colors $color: darken(nth($pair, 1), 10%) $color-invert: nth($pair, 2) &.is-#{$name} background-color: $color border-color: $color color: $color-invert // Colors Dark @each $name, $pair in $colors $color: nth($pair, 1) $color-invert: nth($pair, 2) &.is-#{$name}-dark background-color: $color border-color: $color color: $color-invert // Modifiers &.is-selected background-color: $table-row-active-background-color-dark color: $table-row-active-color-dark th color: $table-cell-heading-color-dark tr &.is-selected background-color: $table-row-active-background-color-dark color: $table-row-active-color-dark td, th border-color: $table-row-active-color-dark thead td, th color: $table-head-cell-color-dark tfoot td, th color: $table-foot-cell-color-dark // Modifiers &.is-hoverable tbody tr:not(.is-selected) &:hover background-color: $table-row-hover-background-color-dark &.is-striped tbody tr:not(.is-selected) &:hover background-color: $table-row-hover-background-color-dark &:nth-child(even) background-color: $table-striped-row-even-hover-background-color-dark &.is-striped tbody tr:not(.is-selected) &:nth-child(even) background-color: $table-striped-row-even-background-color-dark ================================================ FILE: guide/style/bulma-prefers-dark/sass/elements/tag.sass ================================================ $tag-background-color-dark: $background-dark !default $tag-color-dark: $text-dark !default .tag:not(body) background-color: $tag-background-color-dark color: $tag-color-dark // Colors @each $name, $pair in $colors $color: darken(nth($pair, 1), 10%) $color-invert: nth($pair, 2) &.is-#{$name} background-color: $color color: $color-invert // Colors Dark @each $name, $pair in $colors $color: nth($pair, 1) $color-invert: nth($pair, 2) &.is-#{$name}-dark background-color: $color color: $color-invert // Modifiers &.is-delete &:hover, &:focus background-color: darken($tag-background-color-dark, 5%) &:active background-color: darken($tag-background-color-dark, 10%) ================================================ FILE: guide/style/bulma-prefers-dark/sass/elements/title.sass ================================================ $title-color-dark: $grey-lighter !default $subtitle-color-dark: $grey-light !default $subtitle-strong-color-dark: $grey-lighter !default .title color: $title-color-dark .subtitle color: $subtitle-color-dark strong color: $subtitle-strong-color-dark ================================================ FILE: guide/style/bulma-prefers-dark/sass/layout/_all.sass ================================================ @charset "utf-8" @import "hero.sass" @import "footer.sass" ================================================ FILE: guide/style/bulma-prefers-dark/sass/layout/footer.sass ================================================ $footer-background-color-dark: $black-bis !default .footer background-color: $footer-background-color-dark ================================================ FILE: guide/style/bulma-prefers-dark/sass/layout/hero.sass ================================================ // Main container .hero // Colors @each $name, $pair in $colors $color: darken(nth($pair, 1), 10%) $color-invert: nth($pair, 2) &.is-#{$name}, &.is-#{$name}-dark background-color: $color color: $color-invert a:not(.button):not(.dropdown-item):not(.tag), strong color: inherit .title color: $color-invert .subtitle color: rgba($color-invert, 0.9) a:not(.button), strong color: $color-invert .navbar-menu +touch background-color: $color .navbar-item, .navbar-link color: rgba($color-invert, 0.7) a.navbar-item, .navbar-link &:hover, &.is-active background-color: darken($color, 5%) color: $color-invert .tabs a color: $color-invert opacity: 0.9 &:hover opacity: 1 li &.is-active a opacity: 1 &.is-boxed, &.is-toggle a color: $color-invert &:hover background-color: rgba($black, 0.1) li.is-active a &, &:hover background-color: $color-invert border-color: $color-invert color: $color // Modifiers &.is-bold $gradient-top-left: darken(saturate(adjust-hue($color, -10deg), 10%), 10%) $gradient-bottom-right: lighten(saturate(adjust-hue($color, 10deg), 5%), 5%) background-image: linear-gradient(141deg, $gradient-top-left 0%, $color 71%, $gradient-bottom-right 100%) +mobile .navbar-menu background-image: linear-gradient(141deg, $gradient-top-left 0%, $color 71%, $gradient-bottom-right 100%) // Responsiveness // +mobile // .nav-toggle // span // background-color: $color-invert // &:hover // background-color: rgba($black, 0.1) // &.is-active // span // background-color: $color-invert // .nav-menu // .nav-item // border-top-color: rgba($color-invert, 0.2) // Colors dark @each $name, $pair in $colors $color: nth($pair, 1) $color-invert: nth($pair, 2) &.is-#{$name}-dark background-color: $color color: $color-invert a:not(.button):not(.dropdown-item):not(.tag), strong color: inherit .title color: $color-invert .subtitle color: rgba($color-invert, 0.9) a:not(.button), strong color: $color-invert .navbar-menu +touch background-color: $color .navbar-item, .navbar-link color: rgba($color-invert, 0.7) a.navbar-item, .navbar-link &:hover, &.is-active background-color: darken($color, 5%) color: $color-invert .tabs a color: $color-invert opacity: 0.9 &:hover opacity: 1 li &.is-active a opacity: 1 &.is-boxed, &.is-toggle a color: $color-invert &:hover background-color: rgba($black, 0.1) li.is-active a &, &:hover background-color: $color-invert border-color: $color-invert color: $color // Modifiers &.is-bold $gradient-top-left: darken(saturate(adjust-hue($color, -10deg), 10%), 10%) $gradient-bottom-right: lighten(saturate(adjust-hue($color, 10deg), 5%), 5%) background-image: linear-gradient(141deg, $gradient-top-left 0%, $color 71%, $gradient-bottom-right 100%) +mobile .navbar-menu background-image: linear-gradient(141deg, $gradient-top-left 0%, $color 71%, $gradient-bottom-right 100%) // Responsiveness // +mobile // .nav-toggle // span // background-color: $color-invert // &:hover // background-color: rgba($black, 0.1) // &.is-active // span // background-color: $color-invert // .nav-menu // .nav-item // border-top-color: rgba($color-invert, 0.2) ================================================ FILE: guide/style/bulma-prefers-dark/sass/utilities/_all.sass ================================================ @charset "utf-8" @import "initial-variables.sass" @import "derived-variables.sass" @import "mixins.sass" ================================================ FILE: guide/style/bulma-prefers-dark/sass/utilities/derived-variables.sass ================================================ $primary-dark: darken($turquoise, 10%) !default $info: darken($cyan, 10%) !default $success: darken($green, 10%) !default $warning: darken($yellow, 10%) !default $danger: darken($red, 10%) !default $light: $white-ter !default $dark: $grey-darker !default // Invert colors $orange-invert: findColorInvert($orange) !default $yellow-invert: findColorInvert($yellow) !default $green-invert: findColorInvert($green) !default $turquoise-invert: findColorInvert($turquoise) !default $cyan-invert: findColorInvert($cyan) !default $blue-invert: findColorInvert($blue) !default $purple-invert: findColorInvert($purple) !default $red-invert: findColorInvert($red) !default $primary-invert: $turquoise-invert !default $primary-invert-dark: darken($turquoise-invert, 10%) !default $info-invert: $cyan-invert !default $success-invert: $green-invert !default $warning-invert: $yellow-invert !default $danger-invert: $red-invert !default $light-invert: $dark !default $dark-invert: $light !default // General colors $background: $white-ter !default $background-dark: $black-ter !default $border-dark: $grey-darker !default $border-hover-dark: $grey-dark !default // Text colors $text-dark: $grey-light !default $text-invert: findColorInvert($text) !default $text-invert-dark: findColorInvert($text-dark) !default $text-light: $grey !default $text-strong-dark: $grey-lighter !default // Code colors $code-dark: darken($red, 15%) !default $code-background-dark: $background-dark !default $pre-dark: $text-dark !default $pre-background-dark: $background-dark !default // Link colors $link-dark: $blue-light !default $link-invert-dark: $blue-invert !default $link-hover-dark: $grey-lighter !default $link-hover-border-dark: $grey-dark !default $link-focus-dark: $grey-lighter !default $link-focus-border-dark: $blue-light !default $link-active-dark: $grey-lighter !default $link-active-border-dark: $grey-light !default ================================================ FILE: guide/style/bulma-prefers-dark/sass/utilities/initial-variables.sass ================================================ // Colors $blue-light: hsl(209, 71%, 63%) !default // Background $body-background-dark: #17181c !default ================================================ FILE: guide/style/bulma-prefers-dark/sass/utilities/mixins.sass ================================================ // Color schemes =prefers-scheme($scheme) @media (prefers-color-scheme: $scheme) @content ================================================ FILE: guide/style/colors.scss ================================================ $sanic: #ff0d68; $primary: $sanic; $link: $sanic; $blue: #0092FF; $cyan: $blue; $green: #16DB93; $yellow: #FFE900; $menu-item-active-background-color: $sanic; $green_1: #37ae6f; $green_2: #16DB93; $purple: #833FE3; $dark_1: #1e2024; $orange: #d98404; .has-text-purple { color: $purple; } ================================================ FILE: guide/style/elements.scss ================================================ .footer { a[target=_blank]::after { display: none; } margin-bottom: 4rem; } @media screen and (max-width: $desktop) { .footer .level { align-items: baseline; } .footer a { font-size: 0.75em; } } .hero { .subtitle { font-size: 3rem; font-weight: 700; margin-bottom: 1rem; } .tagline { font-family: Fira Code,Source Code Pro,Menlo,Monaco,Consolas,Lucisa Console,monospace; font-size: 2rem; font-weight: 300; margin-bottom: 2rem } } .language-sh { code { display: inline-block; &::before { content: '▶ ' } } } .notification { margin-top: 2rem; .notification-title { font-size: 1.25rem; font-weight: 700; } &.is-note { background-color: $primary; color: $white; } &.is-new { background-color: $purple; color: $white; &::after { content: '🌟'; position: absolute; top: 1rem; right: 1rem; font-size: 2rem; } } &.is-tip { &::after { content: '💡'; position: absolute; top: 1rem; right: 1rem; font-size: 2rem; } } } .ol, .ul, .list { margin: 1rem 0; .li, .list-item { padding: 0.5rem 0; } } .ul .li { margin-left: 1.5rem; list-style-type: disc; } .introduction-table { margin: 2rem 0; a[target=_blank]::after { display: none; } th { display: none; } } .docobject { h2 :last-child { color: $dark; } .function-signature { color: $dark_1; .param-name { color: $primary; font-weight: bold; } .param-default { color: $purple; font-style: italic; } .function-decorator { font-style: italic; color: $grey } .param-annotation { color: $blue; } .return-annotation { color: $green_1; } } dl { display: flex; flex-wrap: wrap; margin: 0; padding: 0; } dt { flex: 0 0 25%; padding: 5px 10px; font-weight: bold; color: $blue; } dd { flex: 1; padding: 5px 10px; margin: 0; } div.highlight + p, p + div.highlight, div.highlight + div.highlight { margin-top: 1rem; } .method { padding-left: 1rem; h3 { margin-left: -1rem; } } .ol, .ul, .list { margin: 1rem; } } .mermaid { margin-top: 2rem; .actor { stroke: $primary !important; fill: lighten($primary, 40%) !important; } .labelBox { fill: lighten($blue, 40%) !important; stroke: $blue !important; } // .labelText { // fill: $white-bis !important; // } .note { fill: lighten($yellow, 40%) !important; stroke: $yellow !important; } } @media (prefers-color-scheme: dark) { .docobject { h2 :last-child { color: $white-bis; } .function-signature { color: $grey-light; .param-default { color: $yellow; } } } .mermaid { text.messageText { fill: $white-bis !important; } .actor { fill: $primary !important; } .labelBox { fill: $blue !important; } .labelText { fill: $white-bis !important; } .note { fill: $yellow !important; } } } $button-width: 36px; $button-height: 52px; // 36 x 52 for portrait paper ratio $rectangle-width: $button-width / 2; $rectangle-height: $rectangle-width / 8.5 * 11; $left-offset-filled: 5px; $top-offset-filled: 13px; $left-offset-outlined: -3px; $top-offset-outlined: 5px; $animation-slide: -$button-width / 1.5; // space for sliding and the gap h1 + .code-block, h2 + .code-block, h3 + .code-block { margin-top: 1rem; } .code-block { position: relative; & + .code-block { margin-top: 1rem; } &:hover { .code-block__copy { opacity: 1; } } .code-block__copy { position: absolute; right: 10px; bottom: 10px; width: $button-width; height: $button-height; cursor: pointer; opacity: 0; transition: all 0.3s; &::before { content: "copied"; position: absolute; top: -$button-height / 3; margin: auto; opacity: 0; right: $button-width / 4; } &.clicked::before { opacity: 1; animation: all 0.3s ease-in-out; } } .code-block__rectangle { position: absolute; width: $rectangle-width; height: $rectangle-height; transition: all 0.3s ease; } .code-block__filled { background-color: $primary; left: $left-offset-filled; top: $top-offset-filled; } .code-block__outlined { border: 2px solid $primary; background-color: transparent; left: $left-offset-outlined; top: $top-offset-outlined; } .code-block__copy.clicked { .code-block__outlined { left: $left-offset-filled + $animation-slide; top: $top-offset-filled; background-color: $primary; } } } .additional-attributes.details { display: flex; flex-direction: column; width: 100%; .code-block { display: none; width: 100%; } &::before { content: "▼ " attr(title); display: block; background-color: $grey-light; padding: 10px; cursor: pointer; width: 100%; box-sizing: border-box; } &.is-active { .code-block { display: block; } &::before { content: "▲ " attr(title); background-color: $grey-lighter; } } } // dark mode @media (prefers-color-scheme: dark) { .additional-attributes.details{ &::before { background-color: $grey-darker; } &.is-active { &::before { background-color: $grey-dark; } } } } .tabs { .tab-content { display: none; } } .table-of-contents { position: fixed; right: 0; bottom: 0; z-index: 1000; max-width: 500px; padding: 1rem 2rem; background-color: $white-bis; box-shadow: 0 0 2px rgba(63, 63, 68, 0.5); @media (prefers-color-scheme: dark) { background-color: $black; box-shadow: 0 0 2px rgba(191, 191, 191, 0.5); } .table-of-contents-item { display: block; margin-bottom: 0.5rem; text-decoration: none; &:hover { text-decoration: underline; color: $primary; strong, small { color: $primary; } } strong { color: $black-bis; font-size: 1.15em; display: block; line-height: 1rem; margin-top: 0.75rem; } small { color: $grey; font-size: 0.85em; } @media (prefers-color-scheme: dark) { strong { color: $grey-lighter; } } } @media (max-width: 768px) { position: static; max-width: calc(100vw - 2rem); .table-of-contents-item { display: flex; flex-direction: row-reverse; justify-content: start; strong { display: inline; margin: 0 0 0 0.75rem; } } } } .loading-bar { position: fixed; top: 0; left: 0; width: 100%; height: 3px; background-color: transparent; z-index: 9999; &.is-loading { background-color: $primary; animation: pulsingLoading 1s linear infinite; } } @keyframes pulsingLoading { 0%, 100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(0.25); opacity: 0.5; } } .changelog { .ol, .ul, .list { .li, .list-item { padding: 0; } } } .sponsors { display: flex; flex-wrap: wrap; justify-content: center; text-align: center; padding: 0.25rem 0; .button { margin-left: 1rem; } } ================================================ FILE: guide/style/general.scss ================================================ code { color: #{$grey-dark}; } .notification code { background-color: #{rgba($grey-lightest, 0.6)}; } @media (prefers-color-scheme: dark) { code { color: #{$grey-lighter}; } .notification code { background-color: #{rgba($black-ter, 0.6)}; } } a{ &[target=_blank]::after { content: "⇗"; margin-left: 0.25em; } & > code { border-bottom: 1px solid $primary; &:hover { background-color: $primary; color: $white; } } } h1 a.anchor, h2 a.anchor, h3 a.anchor, h4 a.anchor, h5 a.anchor, h6 a.anchor { display: none; padding-left: 0.375em; } h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, h5:hover a.anchor, h6:hover a.anchor { display: inline; } h1 { margin-left: -2rem; } h2 { margin-left: -1rem; margin-top: 3rem; } h3:not(:first-child) { margin-top: 2rem; } article { margin-left: 2rem; } p + pre, pre + p, div.highlight + p, p + div.highlight, div.highlight + div.highlight, p + h4, p + .code-block, .code-block + p, .code-block + .code-block, p + p { margin-top: 1rem; } @media screen and (max-width: $tablet) { html { font-size: 18px; } h1 { margin-left: 0; } h2 { margin-left: 0; } article { margin-left: 0; } .section { padding: 1rem 0rem; max-width: 95vw; } } @media screen and (min-width: $widescreen) { .section { padding: 3rem 0rem; } } @media screen and (min-width: $widescreen) { .section { padding: 3rem 0rem; } } ================================================ FILE: guide/style/home.scss ================================================ @media screen and (min-width: 769px) { .hero.is-large .hero-body { padding: 18rem 6rem 3rem; } } @media screen and (max-width: 769px) { .hero { height: 100vh; margin-top: 15vh; .hero-body { padding: 3rem 1.5rem; display: flex; flex-direction: column; justify-content: center; } & .title::after { width: calc(100vw - 1.5rem); background: url(/assets/images/logo-white.svg) no-repeat center center; background-size: 100% auto; } .subtitle { margin-top: 1rem; font-size: 1.4rem; } .tagline { font-size: 1.1rem; } } } .home .tab-container { display: flex; .tabs { flex-shrink: 0; // Prevent the tabs from shrinking width: 200px; // Fixed width for the tabs ul { display: flex; flex-direction: column; border-bottom: none; // Remove the border between tabs } li { display: block; width: 100%; a { display: block; padding: 0.5em 1em; // Adjust padding as needed text-align: left; // Align text to the left } } } .tab-display { flex-grow: 1; // Allow the content to grow as needed min-width: 0; // Allows the flex item to shrink below its content size padding-left: 20px; // Adjust the spacing between tabs and content as needed } @media screen and (max-width: 768px) { flex-direction: column; .tabs { width: 100%; // Tabs take full width for mobile ul { display: block; // Vertical tabs overflow-y: auto; // For scrollable tabs vertically } li { display: block; // Keep tabs vertical } } .tab-display { padding-left: 0; // Reset padding for mobile view } } } ================================================ FILE: guide/style/index.scss ================================================ $body-size: 20px; @import "./colors.scss"; @import "./bulma/bulma.sass"; @import "./bulma-prefers-dark/bulma-prefers-dark.sass"; @import "./theme.scss"; @import "./menu.scss"; @import "./general.scss"; @import "./elements.scss"; @import "./home.scss"; @import "./overrides.scss"; ================================================ FILE: guide/style/menu.scss ================================================ $arrow-size: 8px; $burger-size: 2rem; $menu-width: 360px; .burger { display: none; position: fixed; top: 1rem; right: $burger-size / 2; width: $burger-size; height: $burger-size; cursor: pointer; z-index: 101; span { display: block; position: absolute; height: 2px; width: 100%; background: var(--menu-contrast); border-radius: 2px; opacity: 1; left: 0; transform: rotate(0deg); transition: .25s ease-in-out; &:nth-child(1) { top: 0px; } &:nth-child(2), &:nth-child(3) { top: 8px; } &:nth-child(4) { top: 16px; } } &.is-active { span { &:nth-child(1) { top: 18px; width: 0%; left: 50%; } &:nth-child(2) { transform: rotate(45deg); } &:nth-child(3) { transform: rotate(-45deg); } &:nth-child(4) { top: 18px; width: 0%; left: 50%; } } } &::after { content: ''; display: block; position: absolute; top: -$burger-size / 2; left: -$burger-size / 4; width: $burger-size * 1.5; height: $burger-size * 1.5; background: var(--menu-background); z-index: -1; } } .menu { background-color: var(--menu-background); width: $menu-width; padding: 2rem; height: 100vh; overflow: auto; position: fixed; top: 0; left: 0; z-index: 100; hr { background-color: var(--menu-divider); } .is-anchor { font-size: 0.75em; & a::before { content: '# '; color: var(--menu-contrast); } } .menu-label { margin-bottom: 1rem; } li.is-group > a { font-size: 0.85rem; &::after { content: ''; position: relative; top: -$arrow-size / 4; left: $arrow-size; display: inline-block; width: 0; height: 0; border-left: $arrow-size solid var(--menu-contrast); border-top: $arrow-size * 2/3 solid transparent; border-bottom: $arrow-size * 2/3 solid transparent; transform: rotate(90deg); } & ~ .menu-list { transition: all .15s ease-in-out; transform: scaleY(1); transform-origin: top; overflow: hidden; opacity: 1; margin: 0; } &:not(.is-open) { &::after { transform: rotate(0deg); } & ~ .menu-list { transform: scaleY(0); opacity: 0; font-size: 0; } } } & ~ main { margin-left: $menu-width; } .anchor-list { display: none; } .menu-item .is-active + .anchor-list { display: block; } } // On mobile breakpoints, we want to hide the menu and show the burger @media screen and (max-width: $desktop) { .menu { left: -100vw; width: 100vw; transition: all .25s ease-in-out; &.is-active { left: 0; } & ~ main { margin-left: 0; } } .burger { display: block; } } .menu-list li ul { margin: 0; padding-left: 0; } .menu-list ul li:not(.is-anchor) { margin-left: 0.75em; } .menu-list .menu-list li a { font-size: 0.85em; } ================================================ FILE: guide/style/overrides.scss ================================================ footer .level, footer .level .level-right, footer .level .level-left { display: flex !important; } .tabs li a { font-size: 0.7rem; } .box { box-shadow: 0 2px 3px rgba(10, 10, 10, 0.1), 0 0 0 1px rgba(10, 10, 10, 0.1); } .container { padding: 0 0.5rem; } @media (prefers-color-scheme: dark) { .box { box-shadow: 0 2px 3px rgba(128, 128, 128, 0.1), 0 0 0 1px rgba(128, 128, 128, 0.1); } } ================================================ FILE: guide/style/theme.scss ================================================ $background-image-size: 270px; .hero .title { position: relative; span { display: none; } &::after { content: ""; position: absolute; top: -108px; left: 0; right: 0; margin: auto; width: 500px; height: 122px; background: url(/assets/images/logo.svg) no-repeat center center; } } .sanic-simple-logo { background: url(/assets/images/logo.svg) no-repeat; background-size: $background-image-size; height: 72px; & img { visibility: hidden; } } :root { --menu-background: #{$grey-lightest}; --menu-divider: #{$grey-lighter}; --menu-contrast: #{$black-bis}; } .c1 { color: #{$grey}; } @media (prefers-color-scheme: dark) { :root { --menu-background: #{$black}; --menu-divider: #{$black-ter}; --menu-contrast: #{$grey}; } html, .navbar { background-color: #{$black-bis}; } .footer { background-color: #{$black}; } .sanic-simple-logo { background: url(/assets/images/logo-white.svg) no-repeat; background-size: $background-image-size; } .hero .title::after { background: url(/assets/images/logo-white.svg) no-repeat center center; } .list { background-color: transparent; box-shadow: none; } .n,.na,.nb,.no,.nd,.ni,.ne,.nl, .nn,.nx,.py,.nt,.nv,.bp,.vc,.vg, .vi,.vm { color: #{$grey-light}; } .s,.sa,.sb,.sc,.dl,.sd,.s2,.se, .sh,.si,.sx,.sr,.s1,.ss{ background-color: transparent; color: #{$green}; } .nc { color: #{$yellow}; } .c1 { color: #{$grey-dark}; } .introduction-table .table tbody tr:last-child td { border-bottom-width: 1px; } $scrollbar-width: 12px; ::-webkit-scrollbar { width: $scrollbar-width; height: $scrollbar-width; } ::-webkit-scrollbar-track { background: #{$black-ter}; } ::-webkit-scrollbar-thumb { background: #{$black-bis}; border-radius: 6px; border: 3px solid #{$black-ter}; } ::-webkit-scrollbar-thumb:hover { background: #{$black}; } } ================================================ FILE: guide/webapp/__init__.py ================================================ ================================================ FILE: guide/webapp/display/__init__.py ================================================ ================================================ FILE: guide/webapp/display/base.py ================================================ from __future__ import annotations from os import environ from html5tagger import Builder, Document, E # type: ignore class BaseRenderer: def __init__(self, base_title: str): self.base_title = base_title def get_builder(self, full: bool, language: str) -> Builder: if full: urls = [ "/assets/code.css", "/assets/style.css", "/assets/docs.js", "https://unpkg.com/htmx.org@1.9.2/dist/htmx.min.js", "https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js", ] builder = Document( self.title(), lang=language, _urls=urls, _viewport=True ) builder(*self._head()) builder.full = True else: builder = Builder(name="Partial") builder.full = False return builder def title(self) -> str: return self.base_title def _head(self) -> list[Builder]: head = [ E.meta(name="theme-color", content="#ff0d68"), E.meta(name="title", content=self.title()), E.meta( name="description", content=( "Sanic is a Python 3.10+ web server and " "web framework that's written to go fast." ), ), E.link(rel="icon", href="/favicon.ico", sizes="any"), E.link(rel="icon", href="/favicon-32x32.png", type="image/png"), E.link(rel="icon", href="/favicon-16x16.png", type="image/png"), E.link( rel="apple-touch-icon", sizes="180x180", href="/apple-touch-icon.png", ), E.link(rel="manifest", href="/site.webmanifest"), E.link( rel="android-chrome", sizes="192x192", href="/android-chrome-192x192.png", ), E.link( rel="android-chrome", sizes="512x512", href="/android-chrome-512x512.png", ), E.meta(name="msapplication-config", content="/browserconfig.xml"), E.meta(name="msapplication-TileColor", content="#ffffff"), E.meta( name="msapplication-TileImage", content="/mstile-144x144.png" ), E.meta(name="theme-color", content="#ff0d68"), E.link( rel="mask-icon", href="/safari-pinned-tab.svg", color="#ff0d68" ), ] umami = E.script( None, async_=True, defer=True, data_website_id="0131e426-4d6d-476b-a84b-34a45e0be6de", src="https://analytics.sanicframework.org/umami.js", ) if environ.get("UMAMI"): head.append(umami) return head ================================================ FILE: guide/webapp/display/code_style.py ================================================ from pygments.style import Style from pygments.token import ( # Error,; Generic,; Number,; Operator, Comment, Keyword, Name, String, Token, ) class SanicCodeStyle(Style): styles = { Token: "#777", Comment: "italic #a2a2a2", Keyword: "#ff0d68", Name: "#333", Name.Class: "bold #37ae6f", Name.Function: "#0092FF", String: "bg:#eee #833FE3", } ================================================ FILE: guide/webapp/display/layouts/__init__.py ================================================ ================================================ FILE: guide/webapp/display/layouts/base.py ================================================ from __future__ import annotations from collections.abc import Generator from contextlib import contextmanager from html5tagger import Builder from sanic import Request class BaseLayout: def __init__(self, builder: Builder): self.builder = builder @contextmanager def __call__( self, request: Request, full: bool = True ) -> Generator[BaseLayout, None, None]: with self.layout(request, full=full): yield self @contextmanager def layout( self, request: Request, full: bool = True ) -> Generator[None, None, None]: yield ================================================ FILE: guide/webapp/display/layouts/elements/__init__.py ================================================ ================================================ FILE: guide/webapp/display/layouts/elements/footer.py ================================================ from collections import deque from datetime import datetime from html5tagger import Builder, E # type: ignore from sanic import Request def do_footer( builder: Builder, request: Request, extra_classes: str = "", with_pagination: bool = True, ) -> None: content = deque([_content()]) if with_pagination: content.appendleft(_pagination(request)) css_classes = "footer" if extra_classes: css_classes += f" {extra_classes}" builder.footer( *content, class_=css_classes, ) def _pagination(request: Request) -> Builder: return E.div( _pagination_left(request), _pagination_right(request), class_="level" ) def _pagination_left(request: Request) -> Builder: item = E.div(class_="level-item") if not hasattr(request.ctx, "previous_page"): return E.div(item, class_="level-left") with item: if p := request.ctx.previous_page: path = p.relative_path.with_suffix(".html") item.a( f"← {p.meta.title}", href=f"/{path}", hx_get=f"/{path}", hx_target="#content", hx_swap="innerHTML", hx_push_url="true", class_="button pagination", ) return E.div(item, class_="level-left") def _pagination_right(request: Request) -> Builder: item = E.div(class_="level-item") if not hasattr(request.ctx, "next_page"): return E.div(item, class_="level-right") with item: if p := request.ctx.next_page: path = p.relative_path.with_suffix(".html") item.a( f"{p.meta.title} →", href=f"/{path}", hx_get=f"/{path}", hx_target="#content", hx_swap="innerHTML", hx_push_url="true", class_="button pagination", ) return E.div(item, class_="level-right") def _content() -> Builder: year = datetime.now().year legal = E.p( E.a( "MIT Licensed", href="https://github.com/sanic-org/sanic/blob/master/LICENSE", target="_blank", rel="nofollow noopener noreferrer", ).br()( E.small(f"Copyright © 2018-{year} Sanic Community Organization") ), ) powered = E.p( E.a("This site is powered", href="/en/built-with-sanic.html"), E.img( src="/assets/images/sanic-framework-logo-circle-32x32.png", alt="Sanic Logo", style="vertical-align: middle;", class_="ml-1", ), ) with_love = E.p("~ Made with ❤️ and ☕️ ~") return E.div( legal, powered, with_love, class_="content has-text-centered", ) ================================================ FILE: guide/webapp/display/layouts/elements/navbar.py ================================================ from html5tagger import Builder, E # type: ignore from sanic import Request from webapp.display.layouts.models import MenuItem def do_navbar(builder: Builder, request: Request) -> None: navbar_items = [ _render_navbar_item(item, request) for item in request.app.config.NAVBAR ] container = E.div( _search_form(request), *navbar_items, class_="navbar-end" ) builder.nav( E.div(container, class_="navbar-menu"), class_="navbar is-hidden-touch", ) def _search_form(request: Request) -> Builder: return E.div( E.div( E.input( id_="search", type_="text", placeholder="Search", class_="input", value=request.args.get("q", ""), hx_target="#content", hx_swap="innerHTML", hx_push_url="true", hx_trigger="keyup changed delay:500ms", hx_get=f"/{request.ctx.language}/search", hx_params="*", ), class_="control", ), class_="navbar-item", ) def _render_navbar_item(item: MenuItem, request: Request) -> Builder: if item.items: return E.div( E.a(item.label, class_="navbar-link"), E.div( *( _render_navbar_item(subitem, request) for subitem in item.items ), class_="navbar-dropdown", ), class_="navbar-item has-dropdown is-hoverable", ) kwargs = { "class_": "navbar-item", } if item.href: kwargs["href"] = item.href kwargs["target"] = "_blank" kwargs["rel"] = "nofollow noopener noreferrer" elif item.path: kwargs["href"] = f"/{request.ctx.language}/{item.path}" internal = [item.label] return E.a(*internal, **kwargs) ================================================ FILE: guide/webapp/display/layouts/elements/sidebar.py ================================================ from html5tagger import Builder, E # type: ignore from sanic import Request from webapp.display.layouts.models import MenuItem from webapp.display.text import slugify def do_sidebar(builder: Builder, request: Request) -> None: builder.a(class_="burger")(E.span().span().span().span()) builder.aside(*_menu_items(request), class_="menu") def _menu_items(request: Request) -> list[Builder]: return [ _sanic_logo(request), *_sidebar_items(request), E.hr(), E.p("Current with version ").strong( request.app.config.GENERAL.current_version ), E.hr(), E.ul.li("Need ").a("help", href=f"/{request.ctx.language}/help.html")( "?" ), E.li("How we ").a( "built this site w/ Sanic", href=f"/{request.ctx.language}/built-with-sanic.html", ), E.li("The ").a( "Awesome Sanic", href="https://github.com/mekicha/awesome-sanic", target="_blank", )(" list"), E.hr(), E.p("Want more? ") .a("sanicbook.com", href="https://sanicbook.com", target="_blank") .br.img(src="https://sanicbook.com/images/SanicCoverFinal.png"), E.br.small("Book proceeds fund our journey"), E.hr(), E.p("Secure, auto-document, and monetize your Sanic API with:").a( E.img( src="/assets/images/zuplo.svg", alt=( "Zuplo - Secure, auto-document, " "and monetize your Sanic API" ), style="width: 90%;", ), href="https://zuplo.com", target="_blank", rel="nofollow noopener noreferrer", ), ] def _sanic_logo(request: Request) -> Builder: return E.a( class_="navbar-item sanic-simple-logo my-3", href=f"https://sanic.dev/{request.ctx.language}/", )( E.img( src="/assets/images/sanic-framework-logo-simple-400x97.png", # noqa: E501 alt="Sanic Framework", ) ) def _sidebar_items(request: Request) -> list[Builder]: return [ builder for item in request.app.config.SIDEBAR for builder in _render_sidebar_item(item, request, True) ] def _render_sidebar_item( item: MenuItem, request: Request, root: bool = False ) -> list[Builder]: builders: list[Builder] = [] if root: builders.append(E.p(class_="menu-label")(item.label)) else: builders.append(_single_sidebar_item(item, request)) if item.items: ul = E.ul(class_="menu-list") with ul: for subitem in item.items: sub_builders = _render_sidebar_item(subitem, request) ul(*sub_builders) builders.append(ul) return builders def _single_sidebar_item(item: MenuItem, request: Request) -> Builder: if item.path and item.path.startswith("/"): path = item.path else: path = f"/{request.ctx.language}/{item.path}" if item.path else "" kwargs = {} classes: list[str] = [] li_classes = "menu-item" _, page, _ = request.app.ctx.get_page( request.ctx.language, item.path or "" ) if request.path == path: classes.append("is-active") if item.href: kwargs["href"] = item.href kwargs["target"] = "_blank" kwargs["rel"] = "nofollow noopener noreferrer" elif not path: li_classes += " is-group" if _is_open_item(item, request.ctx.language, request.path): classes.append("is-open") else: kwargs.update( { "href": path, "hx-get": path, "hx-target": "#content", "hx-swap": "innerHTML", "hx-push-url": "true", } ) kwargs["class_"] = " ".join(classes) inner = E().a(item.label, **kwargs) if page and page.anchors: with inner.ul(class_="anchor-list"): for anchor in page.anchors: inner.li( E.a(anchor.strip("`"), href=f"{path}#{slugify(anchor)}"), class_="is-anchor", ) return E.li(inner, class_=li_classes) def _is_open_item(item: MenuItem, language: str, current_path: str) -> bool: path = f"/{language}/{item.path}" if item.path else "" if current_path == path: return True for subitem in item.items: if _is_open_item(subitem, language, current_path): return True return False ================================================ FILE: guide/webapp/display/layouts/home.py ================================================ from __future__ import annotations from collections.abc import Generator from contextlib import contextmanager from html5tagger import Builder, E from sanic import Request from webapp.display.layouts.elements.footer import do_footer from .base import BaseLayout class HomeLayout(BaseLayout): @contextmanager def layout( self, request: Request, full: bool = True ) -> Generator[None, None, None]: self._sponsors() self._hero(request.ctx.language) with self.builder.div(class_="home container"): yield self._footer(request) def _hero(self, language: str) -> None: with self.builder.section(class_="hero is-large has-text-centered"): self.builder.div( E.h1(E.span("Sanic"), class_="title"), E.h2(class_="subtitle")("Build fast. Run fast."), E.h3(class_="tagline")("Accelerate your web app development"), self._do_buttons(language), class_="hero-body", ) def _do_buttons(self, language: str) -> Builder: builder = E.div(class_="buttons is-centered") with builder: builder.a( "Get Started", class_="button is-primary", href=f"/{language}/guide/getting-started.html", ) builder.a( "Help", class_="button is-outlined", href=f"/{language}/help.html", ) builder.a( "GitHub", class_="button is-outlined", href="https://github.com/sanic-org/sanic", target="_blank", ) return builder def _sponsors(self) -> None: with self.builder.section(class_="sponsors"): self.builder( "Secure, auto-document, and monetize " "your Sanic API with Zuplo", E.a( "Start free", href="https://zuplo.com", target="_blank", class_="button is-primary is-small", ), ) def _footer(self, request: Request) -> None: do_footer( self.builder, request, extra_classes="mb-0 mt-6", with_pagination=False, ) ================================================ FILE: guide/webapp/display/layouts/main.py ================================================ from collections.abc import Generator from contextlib import contextmanager from sanic import Request from webapp.display.layouts.elements.footer import do_footer from webapp.display.layouts.elements.navbar import do_navbar from webapp.display.layouts.elements.sidebar import do_sidebar from .base import BaseLayout class MainLayout(BaseLayout): @contextmanager def layout( self, request: Request, full: bool = True ) -> Generator[None, None, None]: if full: self.builder.div(class_="loading-bar") with self.builder.div(class_="is-flex"): self._sidebar(request) with self.builder.main(class_="is-flex-grow-1"): self._navbar(request) with self.builder.div(class_="container", id="content"): with self._content_wrapper(request): yield self._footer(request) else: with self._content_wrapper(request): yield self._footer(request) @contextmanager def _content_wrapper( self, request: Request ) -> Generator[None, None, None]: current_page = ( request.ctx.current_page if hasattr(request.ctx, "current_page") else None ) section_class = "section" if current_page and current_page.meta.content_class: section_class += f" {current_page.meta.content_class}" with self.builder.section(class_=section_class): with self.builder.article(): yield def _navbar(self, request: Request) -> None: do_navbar(self.builder, request) def _sidebar(self, request: Request) -> None: do_sidebar(self.builder, request) def _footer(self, request: Request) -> None: do_footer(self.builder, request) ================================================ FILE: guide/webapp/display/layouts/models.py ================================================ from __future__ import annotations from msgspec import Struct, field class MenuItem(Struct, kw_only=False, omit_defaults=True): label: str path: str | None = None href: str | None = None items: list[MenuItem] = field(default_factory=list) class GeneralConfig(Struct, kw_only=False): current_version: str ================================================ FILE: guide/webapp/display/markdown.py ================================================ import re from textwrap import dedent from html5tagger import HTML, Builder, E # type: ignore from mistune import HTMLRenderer, create_markdown, escape from mistune.directives import RSTDirective, TableOfContents from mistune.util import safe_entity from pygments import highlight from pygments.formatters import html from pygments.lexers import get_lexer_by_name from .code_style import SanicCodeStyle from .plugins.attrs import Attributes from .plugins.columns import Column from .plugins.hook import Hook from .plugins.inline_directive import inline_directive from .plugins.mermaid import Mermaid from .plugins.notification import Notification from .plugins.span import span from .plugins.tabs import Tabs from .text import slugify class DocsRenderer(HTMLRenderer): def block_code(self, code: str, info: str | None = None): builder = Builder("Block") with builder.div(class_="code-block"): if info: lexer = get_lexer_by_name(info, stripall=False) formatter = html.HtmlFormatter( style=SanicCodeStyle, wrapcode=True, cssclass=f"highlight language-{info}", ) builder(HTML(highlight(code, lexer, formatter))) with builder.div( class_="code-block__copy", onclick="copyCode(this)", ): builder.div( class_="code-block__rectangle code-block__filled" ).div(class_="code-block__rectangle code-block__outlined") else: builder.pre(E.code(escape(code))) return str(builder) def heading(self, text: str, level: int, **attrs) -> str: ident = slugify(text) if level > 1: text += self._make_tag( "a", {"href": f"#{ident}", "class": "anchor"}, "#" ) return self._make_tag( f"h{level}", { "id": ident, "class": ( f"is-size-{level}-desktop is-size-{level + 2}-touch" ), }, text, ) def link(self, text: str, url: str, title: str | None = None) -> str: url = self.safe_url(url).replace(".md", ".html") url, anchor = url.split("#", 1) if "#" in url else (url, None) if ( not url.endswith("/") and not url.endswith(".html") and not url.startswith("http") ): url += ".html" if anchor: url += f"#{anchor}" attributes: dict[str, str] = {"href": url} if title: attributes["title"] = safe_entity(title) if url.startswith("http"): attributes["target"] = "_blank" attributes["rel"] = "nofollow noreferrer" else: attributes["hx-get"] = url attributes["hx-target"] = "#content" attributes["hx-swap"] = "innerHTML" attributes["hx-push-url"] = "true" return self._make_tag("a", attributes, text) def span(self, text, classes, **attrs) -> str: if classes: attrs["class"] = classes return self._make_tag("span", attrs, text) def list(self, text: str, ordered: bool, **attrs) -> str: tag = "ol" if ordered else "ul" attrs["class"] = tag return self._make_tag(tag, attrs, text) def list_item(self, text: str, **attrs) -> str: attrs["class"] = "li" return self._make_tag("li", attrs, text) def table(self, text: str, **attrs) -> str: attrs["class"] = "table is-fullwidth is-bordered" return self._make_tag("table", attrs, text) def inline_directive(self, text: str, **attrs) -> str: num_dots = text.count(".") display = self.codespan(text) if num_dots <= 1: return display module, *_ = text.rsplit(".", num_dots - 1) href = f"/api/{module}.html" return self._make_tag( "a", {"href": href, "class": "inline-directive"}, display, ) def _make_tag( self, tag: str, attributes: dict[str, str], text: str | None = None ) -> str: attrs = " ".join( f'{key}="{value}"' for key, value in attributes.items() ) if text is None: return f"<{tag} {attrs} />" return f"<{tag} {attrs}>{text}" class SanicTableOfContents(TableOfContents): def generate_heading_id(self, token, index): return slugify(token["text"]) RST_CODE_BLOCK_PATTERN = re.compile( r"\.\.\scode-block::\s(\w+)\n\n((?:\n|(?:\s\s\s\s[^\n]*))+)" ) _render_markdown = create_markdown( renderer=DocsRenderer(), plugins=[ RSTDirective( [ # Admonition(), Attributes(), Notification(), SanicTableOfContents(), Column(), Mermaid(), Tabs(), Hook(), ] ), "abbr", "def_list", "footnotes", "mark", "table", span, inline_directive, ], ) def render_markdown(text: str) -> str: def replacer(match): language = match.group(1) code_block = dedent(match.group(2)).strip() return f"```{language}\n{code_block}\n```\n\n" text = RST_CODE_BLOCK_PATTERN.sub(replacer, text) return _render_markdown(text) ================================================ FILE: guide/webapp/display/page/__init__.py ================================================ from .page import Page from .renderer import PageRenderer __all__ = ["Page", "PageRenderer"] ================================================ FILE: guide/webapp/display/page/docobject.py ================================================ from __future__ import annotations import importlib import inspect import pkgutil from collections import defaultdict from dataclasses import dataclass, field from html import escape from docstring_parser import Docstring, DocstringParam, DocstringRaises from docstring_parser import parse as parse_docstring from docstring_parser.common import DocstringExample from html5tagger import HTML, Builder, E # type: ignore from ..markdown import render_markdown, slugify @dataclass class DocObject: name: str module_name: str full_name: str signature: inspect.Signature | None docstring: Docstring object_type: str = "" methods: list[DocObject] = field(default_factory=list) decorators: list[str] = field(default_factory=list) def _extract_classes_methods(obj, full_name, docstrings): methods = [] for method_name, method in inspect.getmembers(obj, _is_public_member): try: signature = _get_method_signature(method) docstring = inspect.getdoc(method) decorators = _detect_decorators(obj, method) methods.append( DocObject( name=method_name, module_name="", full_name=f"{full_name}.{method_name}", signature=signature, docstring=parse_docstring(docstring or ""), decorators=decorators, object_type=_get_object_type(method), ) ) except ValueError: pass docstrings[full_name].methods = methods def _get_method_signature(method): try: return inspect.signature(method) except TypeError: signature = None if func := getattr(method, "fget", None): signature = inspect.signature(func) return signature def _is_public_member(obj: object) -> bool: obj_name = getattr(obj, "__name__", "") if func := getattr(obj, "fget", None): obj_name = getattr(func, "__name__", "") return ( not obj_name.startswith("_") and not obj_name.isupper() and ( inspect.ismethod(obj) or inspect.isfunction(obj) or isinstance(obj, property) or isinstance(obj, property) ) ) def _detect_decorators(cls, method): decorators = [] method_name = getattr(method, "__name__", None) if isinstance(cls.__dict__.get(method_name), classmethod): decorators.append("classmethod") if isinstance(cls.__dict__.get(method_name), staticmethod): decorators.append("staticmethod") if isinstance(method, property): decorators.append("property") return decorators def _get_object_type(obj) -> str: if inspect.isclass(obj): return "class" # If the object is a method, get the underlying function if inspect.ismethod(obj): obj = obj.__func__ # If the object is a coroutine or a coroutine function if inspect.iscoroutine(obj) or inspect.iscoroutinefunction(obj): return "async def" return "def" def organize_docobjects(package_name: str) -> dict[str, str]: page_content: defaultdict[str, str] = defaultdict(str) docobjects = _extract_docobjects(package_name) page_registry: defaultdict[str, list[str]] = defaultdict(list) for module, docobject in docobjects.items(): builder = Builder(name="Partial") _docobject_to_html(docobject, builder) ref = module.rsplit(".", module.count(".") - 1)[0] page_registry[ref].append(module) page_content[f"/api/{ref}.md"] += str(builder) for ref, objects in page_registry.items(): page_content[f"/api/{ref}.md"] = ( _table_of_contents(objects) + page_content[f"/api/{ref}.md"] ) return page_content def _table_of_contents(objects: list[str]) -> str: builder = Builder(name="Partial") with builder.div(class_="table-of-contents"): builder.h3("Table of Contents", class_="is-size-4") for obj in objects: module, name = obj.rsplit(".", 1) builder.a( E.strong(name), E.small(module), href=f"#{slugify(obj.replace('.', '-'))}", class_="table-of-contents-item", ) return str(builder) def _extract_docobjects(package_name: str) -> dict[str, DocObject]: docstrings = {} package = importlib.import_module(package_name) for _, name, _ in pkgutil.walk_packages( package.__path__, package_name + "." ): module = importlib.import_module(name) for obj_name, obj in inspect.getmembers(module): if ( obj_name.startswith("_") or inspect.getmodule(obj) != module or not callable(obj) ): continue try: signature = inspect.signature(obj) except ValueError: signature = None docstring = inspect.getdoc(obj) full_name = f"{name}.{obj_name}" docstrings[full_name] = DocObject( name=obj_name, full_name=full_name, module_name=name, signature=signature, docstring=parse_docstring(docstring or ""), object_type=_get_object_type(obj), ) if inspect.isclass(obj): _extract_classes_methods(obj, full_name, docstrings) return docstrings def _docobject_to_html( docobject: DocObject, builder: Builder, as_method: bool = False ) -> None: anchor_id = slugify(docobject.full_name.replace(".", "-")) anchor = E.a("#", class_="anchor", href=f"#{anchor_id}") class_name, heading = _define_heading_and_class( docobject, anchor, as_method ) with builder.div(class_=class_name): builder(heading) if docobject.docstring.short_description: builder.div( HTML(render_markdown(docobject.docstring.short_description)), class_="short-description mt-3 is-size-5", ) if docobject.object_type == "class": mro = [ item for idx, item in enumerate( inspect.getmro( getattr( importlib.import_module(docobject.module_name), docobject.name, ) ) ) if idx > 0 and item not in (object, type) ] if mro: builder.div( E.span("Inherits from: ", class_="is-italic"), E.span( ", ".join([cls.__name__ for cls in mro]), class_="has-text-weight-bold", ), class_="short-description mt-3 is-size-5", ) builder.p( HTML( _signature_to_html( docobject.name, docobject.object_type, docobject.signature, docobject.decorators, ) ), class_="signature notification is-family-monospace", ) if docobject.docstring.long_description: builder.div( HTML(render_markdown(docobject.docstring.long_description)), class_="long-description mt-3", ) if docobject.docstring.params: with builder.div(class_="box mt-5"): builder.h5( "Parameters", class_="is-size-5 has-text-weight-bold" ) _render_params(builder, docobject.docstring.params) if docobject.docstring.returns: _render_returns(builder, docobject) if docobject.docstring.raises: _render_raises(builder, docobject.docstring.raises) if docobject.docstring.examples: _render_examples(builder, docobject.docstring.examples) for method in docobject.methods: _docobject_to_html(method, builder, as_method=True) def _signature_to_html( name: str, object_type: str, signature: inspect.Signature | None, decorators: list[str], ) -> str: parts = [] parts.append("") for decorator in decorators: parts.append( f"@{decorator}
" ) parts.append( f"{object_type} " f"{name}(" ) if not signature: parts.append("self)") parts.append("
") return "".join(parts) for i, param in enumerate(signature.parameters.values()): parts.append(f"{escape(param.name)}") annotation = "" if param.annotation != inspect.Parameter.empty: annotation = escape(str(param.annotation)) parts.append( f": {annotation}" ) if param.default != inspect.Parameter.empty: default = escape(str(param.default)) if annotation == "str": default = f'"{default}"' parts.append(f" = {default}") if i < len(signature.parameters) - 1: parts.append(", ") parts.append(")") if signature.return_annotation != inspect.Signature.empty: return_annotation = escape(str(signature.return_annotation)) parts.append( f": -> {return_annotation}" ) parts.append("") return "".join(parts) def _define_heading_and_class( docobject: DocObject, anchor: Builder, as_method: bool ) -> tuple[str, Builder]: anchor_id = slugify(docobject.full_name.replace(".", "-")) anchor = E.a("#", class_="anchor", href=f"#{anchor_id}") if as_method: class_name = "method" heading = E.h3( docobject.name, anchor, class_="is-size-4 has-text-weight-bold mt-6", id_=anchor_id, ) else: class_name = "docobject" heading = E.h2( E.span(docobject.module_name, class_="has-text-weight-light"), ".", E.span(docobject.name, class_="has-text-weight-bold is-size-1"), anchor, class_="is-size-2", id_=anchor_id, ) return class_name, heading def _render_params(builder: Builder, params: list[DocstringParam]) -> None: for param in params: with builder.dl(class_="mt-2"): dt_args = [param.arg_name] if param.type_name: parts = [ E.br(), E.span( param.type_name, class_=( "has-text-weight-normal has-text-purple " "is-size-7 ml-2" ), ), ] dt_args.extend(parts) builder.dt(*dt_args, class_="is-family-monospace") builder.dd( HTML( render_markdown( param.description or param.arg_name or param.type_name or "" ) ) ) def _render_raises(builder: Builder, raises: list[DocstringRaises]) -> None: with builder.div(class_="box mt-5"): builder.h5("Raises", class_="is-size-5 has-text-weight-bold") for raise_ in raises: with builder.dl(class_="mt-2"): builder.dt(raise_.type_name, class_="is-family-monospace") builder.dd( HTML( render_markdown( raise_.description or raise_.type_name or "" ) ) ) def _render_returns(builder: Builder, docobject: DocObject) -> None: assert docobject.docstring.returns return_type = docobject.docstring.returns.type_name if not return_type or return_type == "None": return with builder.div(class_="box mt-5"): if not return_type and docobject.signature: return_type = docobject.signature.return_annotation if not return_type or return_type == inspect.Signature.empty: return_type = "N/A" term = ( "Return" if not docobject.docstring.returns.is_generator else "Yields" ) builder.h5(term, class_="is-size-5 has-text-weight-bold") with builder.dl(class_="mt-2"): builder.dt(return_type, class_="is-family-monospace") builder.dd( HTML( render_markdown( docobject.docstring.returns.description or docobject.docstring.returns.type_name or "" ) ) ) def _render_examples( builder: Builder, examples: list[DocstringExample] ) -> None: with builder.div(class_="box mt-5"): builder.h5("Examples", class_="is-size-5 has-text-weight-bold") for example in examples: with builder.div(class_="mt-2"): builder( HTML( render_markdown( example.description or example.snippet or "" ) ) ) ================================================ FILE: guide/webapp/display/page/page.py ================================================ from __future__ import annotations from dataclasses import dataclass, field from pathlib import Path from frontmatter import parse from ..layouts.base import BaseLayout from ..layouts.home import HomeLayout from ..layouts.main import MainLayout from ..markdown import render_markdown from .docobject import organize_docobjects _PAGE_CACHE: dict[ str, dict[str, tuple[Page | None, Page | None, Page | None]] ] = {} _LAYOUTS_CACHE: dict[str, type[BaseLayout]] = { "home": HomeLayout, "main": MainLayout, } _DEFAULT = "en" @dataclass class PageMeta: language: str = _DEFAULT title: str = "" description: str = "" layout: str = "main" features: list[dict[str, str]] = field(default_factory=list) content_class: str = "" @dataclass class Page: path: Path content: str meta: PageMeta = field(default_factory=PageMeta) _relative_path: Path | None = None next_page: Page | None = None previous_page: Page | None = None anchors: list[str] = field(default_factory=list) DEFAULT_LANGUAGE = _DEFAULT def get_layout(self) -> type[BaseLayout]: return _LAYOUTS_CACHE[self.meta.layout] @property def relative_path(self) -> Path: if self._relative_path is None: raise RuntimeError("Page not initialized") return self._relative_path @classmethod def get( cls, language: str, path: str ) -> tuple[Page | None, Page | None, Page | None]: if path.endswith("/") or not path: path += "index.html" if not path.endswith(".md"): path = path.removesuffix(".html") + ".md" if language == "api": path = f"/api/{path}" return _PAGE_CACHE.get(language, {}).get(path, (None, None, None)) @classmethod def load_pages(cls, base_path: Path, page_order: list[str]) -> list[Page]: output: list[Page] = [] for path in base_path.glob("**/*.md"): relative = path.relative_to(base_path) language = relative.parts[0] name = "/".join(relative.parts[1:]) page = cls._load_page(path) output.append(page) page._relative_path = relative _PAGE_CACHE.setdefault(language, {})[name] = ( None, page, None, ) _PAGE_CACHE["api"] = {} for language, pages in _PAGE_CACHE.items(): for name, (_, current, _) in pages.items(): previous_page = None next_page = None try: index = page_order.index(name) except ValueError: continue try: if index > 0: previous_page = pages[page_order[index - 1]][1] except KeyError: pass try: if index < len(page_order) - 1: next_page = pages[page_order[index + 1]][1] except KeyError: pass pages[name] = (previous_page, current, next_page) previous_page = None next_page = None api_pages = cls._load_api_pages() filtered_order = [ref for ref in page_order if ref in api_pages] for idx, ref in enumerate(filtered_order): current_page = api_pages[ref] previous_page = None next_page = None try: if idx > 0: previous_page = api_pages[filtered_order[idx - 1]] except KeyError: pass try: if idx < len(filtered_order) - 1: next_page = api_pages[filtered_order[idx + 1]] except KeyError: pass _PAGE_CACHE["api"][ref] = (previous_page, current_page, next_page) return output @staticmethod def _load_page(path: Path) -> Page: raw = path.read_text() metadata, raw_content = parse(raw) content = render_markdown(raw_content) page = Page( path=path, content=content, meta=PageMeta(**metadata), ) if not page.meta.title: page.meta.title = page.path.stem.replace("-", " ").title() for line in raw.splitlines(): if line.startswith("##") and not line.startswith("###"): line = line.lstrip("#").strip() page.anchors.append(line) return page @staticmethod def _load_api_pages() -> dict[str, Page]: docstring_content = organize_docobjects("sanic") output: dict[str, Page] = {} for module, content in docstring_content.items(): path = Path(module) page = Page( path=path, content=content, meta=PageMeta( title=path.stem, description="", layout="main", ), ) page._relative_path = Path(f"./{module}") output[module] = page return output ================================================ FILE: guide/webapp/display/page/renderer.py ================================================ from __future__ import annotations from contextlib import contextmanager from html5tagger import HTML, Builder # type: ignore from sanic import Request from webapp.display.base import BaseRenderer from ..layouts.base import BaseLayout from .page import Page class PageRenderer(BaseRenderer): def render(self, request: Request, language: str, path: str) -> Builder: self._setup_request(request, language, path) builder = self.get_builder( full=request.headers.get("HX-Request") is None, language=language, ) self._body(request, builder, language, path) return builder def title(self) -> str: request = Request.get_current() title: str | None = None if request and ( current_page := getattr(request.ctx, "current_page", None) ): title = f"{self.base_title} - {current_page.meta.title}" return title or self.base_title def _setup_request(self, request: Request, language: str, path: str): prev_page, current_page, next_page = Page.get(language, path) request.ctx.language = ( Page.DEFAULT_LANGUAGE if language == "api" else language ) request.ctx.current_page = current_page request.ctx.previous_page = prev_page request.ctx.next_page = next_page def _body( self, request: Request, builder: Builder, language: str, path: str ): current_page = request.ctx.current_page with self._base(request, builder, current_page): if current_page is None: builder.h1("Not found") return builder(HTML(current_page.content)) @contextmanager def _base(self, request: Request, builder: Builder, page: Page | None): layout_type: type[BaseLayout] = ( page.get_layout() if page else BaseLayout ) layout = layout_type(builder) with layout(request, builder.full): yield ================================================ FILE: guide/webapp/display/plugins/__init__.py ================================================ ================================================ FILE: guide/webapp/display/plugins/attrs.py ================================================ from re import Match from textwrap import dedent from typing import Any from html5tagger import HTML, E from mistune.block_parser import BlockParser from mistune.core import BlockState from mistune.directives import DirectivePlugin class Attributes(DirectivePlugin): def __call__(self, directive, md): directive.register("attrs", self.parse) if md.renderer.NAME == "html": md.renderer.register("attrs", self._render) def parse( self, block: BlockParser, m: Match, state: BlockState ) -> dict[str, Any]: info = m.groupdict() options = dict(self.parse_options(m)) new_state = block.state_cls() new_state.process(dedent(info["text"])) block.parse(new_state) options.setdefault("class_", "additional-attributes") classes = options.pop("class", "") if classes: options["class_"] += f" {classes}" return { "type": "attrs", "text": info["text"], "children": new_state.tokens, "attrs": options, } def _render(self, _, text: str, **attrs) -> str: return str(E.div(HTML(text), **attrs)) ================================================ FILE: guide/webapp/display/plugins/columns.py ================================================ from re import Match from textwrap import dedent from typing import Any from mistune import HTMLRenderer from mistune.block_parser import BlockParser from mistune.core import BlockState from mistune.directives import DirectivePlugin, RSTDirective from mistune.markdown import Markdown class Column(DirectivePlugin): def parse( self, block: BlockParser, m: Match, state: BlockState ) -> dict[str, Any]: info = m.groupdict() new_state = block.state_cls() new_state.process(dedent(info["text"])) block.parse(new_state) return { "type": "column", "text": info["text"], "children": new_state.tokens, "attrs": {}, } def __call__( # type: ignore self, directive: RSTDirective, md: Markdown ) -> None: directive.register("column", self.parse) if md.renderer.NAME == "html": md.renderer.register("column", self._render_column) def _render_column(self, renderer: HTMLRenderer, text: str, **attrs): start = ( '
\n' if attrs.get("first") else "" ) end = "
\n" if attrs.get("last") else "" col = f'
{text}
\n' return start + (col) + end ================================================ FILE: guide/webapp/display/plugins/hook.py ================================================ from mistune.core import BlockState from mistune.directives import DirectivePlugin, RSTDirective from mistune.markdown import Markdown class Hook(DirectivePlugin): def __call__( # type: ignore self, directive: RSTDirective, md: Markdown ) -> None: if md.renderer.NAME == "html": md.before_render_hooks.append(self._hook) def _hook(self, md: Markdown, state: BlockState) -> None: prev = None for idx, token in enumerate(state.tokens): for type_ in ("column", "tab"): if token["type"] == type_: maybe_next = ( state.tokens[idx + 1] if idx + 1 < len(state.tokens) else None ) token.setdefault("attrs", {}) if prev and prev["type"] != type_: token["attrs"]["first"] = True if ( maybe_next and maybe_next["type"] != type_ ) or not maybe_next: token["attrs"]["last"] = True prev = token ================================================ FILE: guide/webapp/display/plugins/inline_directive.py ================================================ import re from mistune.markdown import Markdown DIRECTIVE_PATTERN = r":(?:class|func|meth|attr|exc|mod|data|const|obj|keyword|option|cmdoption|envvar):`(?Psanic\.[^`]+)`" # noqa: E501 def _parse_inline_directive(inline, m: re.Match, state): state.append_token( { "type": "inline_directive", "attrs": {}, "raw": m.group("ref"), } ) return m.end() def inline_directive(md: Markdown): md.inline.register( "inline_directive", DIRECTIVE_PATTERN, _parse_inline_directive, before="escape", ) ================================================ FILE: guide/webapp/display/plugins/mermaid.py ================================================ from html import unescape from re import Match from textwrap import dedent from typing import Any from html5tagger import HTML, E from mistune import HTMLRenderer from mistune.block_parser import BlockParser from mistune.core import BlockState from mistune.directives import DirectivePlugin, RSTDirective from mistune.markdown import Markdown class Mermaid(DirectivePlugin): def parse( self, block: BlockParser, m: Match, state: BlockState ) -> dict[str, Any]: info = m.groupdict() new_state = block.state_cls() new_state.process(dedent(info["text"])) block.parse(new_state) text = HTML(info["text"].strip()) return { "type": "mermaid", "text": text, "children": [{"type": "text", "text": text}], "attrs": {}, } def __call__(self, directive: RSTDirective, md: Markdown) -> None: # type: ignore directive.register("mermaid", self.parse) if md.renderer.NAME == "html": md.renderer.register("mermaid", self._render_mermaid) def _render_mermaid(self, renderer: HTMLRenderer, text: str, **attrs): return str(E.div(class_="mermaid")(HTML(unescape(text)))) ================================================ FILE: guide/webapp/display/plugins/notification.py ================================================ from html5tagger import HTML, E from mistune.directives import Admonition class Notification(Admonition): SUPPORTED_NAMES = { "success", "info", "warning", "danger", "tip", "new", "note", } def __call__(self, directive, md): for name in self.SUPPORTED_NAMES: directive.register(name, self.parse) if md.renderer.NAME == "html": md.renderer.register("admonition", self._render_admonition) md.renderer.register( "admonition_title", self._render_admonition_title ) md.renderer.register( "admonition_content", self._render_admonition_content ) def _render_admonition(self, _, text, name, **attrs) -> str: return str( E.div( HTML(text), class_=f"notification is-{name}", ) ) def _render_admonition_title(self, _, text) -> str: return str( E.p( text, class_="notification-title", ) ) def _render_admonition_content(self, _, text) -> str: return text ================================================ FILE: guide/webapp/display/plugins/span.py ================================================ import re from mistune.markdown import Markdown def parse_inline_span(inline, m: re.Match, state): state.append_token( { "type": "span", "attrs": {"classes": m.group("classes")}, "raw": m.group("content"), } ) return m.end() SPAN_PATTERN = r"{span:(?:(?P[^\:]+?):)?(?P.*?)}" def span(md: Markdown) -> None: md.inline.register( "span", SPAN_PATTERN, parse_inline_span, before="link", ) ================================================ FILE: guide/webapp/display/plugins/tabs.py ================================================ from re import Match from textwrap import dedent from typing import Any from mistune import HTMLRenderer from mistune.block_parser import BlockParser from mistune.core import BlockState from mistune.directives import DirectivePlugin, RSTDirective from mistune.markdown import Markdown class Tabs(DirectivePlugin): def parse( self, block: BlockParser, m: Match, state: BlockState ) -> dict[str, Any]: info = m.groupdict() new_state = block.state_cls() new_state.process(dedent(info["text"])) block.parse(new_state) return { "type": "tab", "text": info["text"], "children": new_state.tokens, "attrs": { "title": info["title"], }, } def __call__( # type: ignore self, directive: RSTDirective, md: Markdown, ) -> None: directive.register("tab", self.parse) if md.renderer.NAME == "html": md.renderer.register("tab", self._render_tab) def _render_tab(self, renderer: HTMLRenderer, text: str, **attrs): start = ( '
    \n' if attrs.get("first") else "" ) end = ( '
\n' if attrs.get("last") else "" ) content = f'
{text}
\n' tab = f"
  • {attrs['title']}{content}
  • \n" return start + tab + end ================================================ FILE: guide/webapp/display/search/__init__.py ================================================ ================================================ FILE: guide/webapp/display/search/renderer.py ================================================ from contextlib import contextmanager from urllib.parse import unquote from html5tagger import Builder, E # type: ignore from sanic import Request from webapp.display.search.search import Searcher from ..base import BaseRenderer from ..layouts.main import MainLayout class SearchRenderer(BaseRenderer): def render( self, request: Request, language: str, searcher: Searcher, full: bool ) -> Builder: builder = self.get_builder( full=request.headers.get("HX-Request") is None, language=language, ) self._body(request, builder, language, searcher, full) return builder def _body( self, request: Request, builder: Builder, language: str, searcher: Searcher, full: bool, ): with self._base(request, builder, full): builder.h1("Search") self._results(request, builder, searcher, language) @contextmanager def _base(self, request: Request, builder: Builder, full: bool): layout = MainLayout(builder) with layout(request, full): yield def _results( self, request: Request, builder: Builder, searcher: Searcher, language: str, ): query = unquote(request.args.get("q", "")) results = searcher.search(query, language) if not query or not results: builder.p("No results found") return with builder.div(class_="container"): with builder.ul(): for _, doc in results: builder.li( E.a( doc.title, href=f"/{doc.page.relative_path}", hx_get=f"/{doc.page.relative_path}", hx_target="#content", hx_swap="innerHTML", hx_push_url="true", ), f" - {doc.page.relative_path}", ) ================================================ FILE: guide/webapp/display/search/search.py ================================================ from __future__ import annotations from collections import Counter from pathlib import Path from typing import ClassVar from msgspec import Struct from webapp.display.page import Page class Stemmer: STOP_WORDS: ClassVar[set[str]] = set( "a about above after again against all am an and any are aren't as at be because been before being below between both but by can't cannot could couldn't did didn't do does doesn't doing don't down during each few for from further had hadn't has hasn't have haven't having he he'd he'll he's her here here's hers herself him himself his how how's i i'd i'll i'm i've if in into is isn't it it's its itself let's me more most mustn't my myself no nor not of off on once only or other ought our ours ourselves out over own same shan't she she'd she'll she's should shouldn't so some such than that that's the their theirs them themselves then there there's these they they'd they'll they're they've this those through to too under until up very was wasn't we we'd we'll we're we've were weren't what what's when when's where where's which while who who's whom why why's with won't would wouldn't you you'd you'll you're you've your yours yourself yourselves".split() # noqa: E501 ) PREFIXES = set("auto be fore over re un under".split()) SUFFIXES = set( "able al ance ant ate ed en er ful hood ing ion ish ity ive ize less ly ment ness ous ship sion tion y".split() # noqa: E501 ) VOWELS = set("aeiou") PLURALIZATION = set("s es ies".split()) def stem(self, word: str) -> str: if word in self.STOP_WORDS: return word if word in self.PREFIXES: return word for suffix in self.SUFFIXES | self.PLURALIZATION: if word.endswith(suffix): return self._stem(word[: -len(suffix)]) return word def _stem(self, word: str) -> str: if word.endswith("e"): return word[:-1] if word.endswith("y") and word[-2] not in self.VOWELS: return word[:-1] return word def __call__(self, word: str) -> str: return self.stem(word) class Document(Struct, kw_only=True): TITLE_WEIGHT: ClassVar[int] = 3 BODY_WEIGHT: ClassVar[int] = 1 page: Page language: str term_frequency: dict[str, float] = {} @property def title(self) -> str: return self.page.meta.title @property def text(self) -> str: return self.page.content @property def weighted_text(self) -> str: """Return the text with the title repeated.""" return " ".join( [self.title] * self.TITLE_WEIGHT + [self.text] * self.BODY_WEIGHT ) def _term_frequency(self, stemmer: Stemmer) -> None: """Count the number of times each word appears in the document.""" words = [ stemmer(word) for word in self.weighted_text.lower().split() if word not in Stemmer.STOP_WORDS ] num_words = len(words) word_count = Counter(words) self.term_frequency = { word: count / num_words for word, count in word_count.items() } def process(self, stemmer: Stemmer) -> Document: """Process the document.""" self._term_frequency(stemmer) return self def _inverse_document_frequency(docs: list[Document]) -> dict[str, float]: """Count the number of documents each word appears in.""" num_docs = len(docs) word_count: Counter[str] = Counter() for doc in docs: word_count.update(doc.term_frequency.keys()) return {word: num_docs / count for word, count in word_count.items()} def _tf_idf_vector( document: Document, idf: dict[str, float] ) -> dict[str, float]: """Calculate the TF-IDF vector for a document.""" return { word: tf * idf[word] for word, tf in document.term_frequency.items() if word in idf } def _cosine_similarity( vec1: dict[str, float], vec2: dict[str, float] ) -> float: """Calculate the cosine similarity between two vectors.""" if not vec1 or not vec2: return 0.0 dot_product = sum(vec1.get(word, 0) * vec2.get(word, 0) for word in vec1) magnitude1 = sum(value**2 for value in vec1.values()) ** 0.5 magnitude2 = sum(value**2 for value in vec2.values()) ** 0.5 return dot_product / (magnitude1 * magnitude2) def _search( query: str, language: str, vectors: list[dict[str, float]], idf: dict[str, float], documents: list[Document], stemmer: Stemmer, ) -> list[tuple[float, Document]]: dummy_page = Page(Path(), query) tf_idf_query = _tf_idf_vector( Document(page=dummy_page, language=language).process(stemmer), idf ) similarities = [ _cosine_similarity(tf_idf_query, vector) for vector in vectors ] return [ (similarity, document) for similarity, document in sorted( zip(similarities, documents), reverse=True, key=lambda pair: pair[0], )[:10] if similarity > 0 ] class Searcher: def __init__( self, stemmer: Stemmer, documents: list[Document], ): self._documents: dict[str, list[Document]] = {} for document in documents: self._documents.setdefault(document.language, []).append(document) self._idf = { language: _inverse_document_frequency(documents) for language, documents in self._documents.items() } self._vectors = { language: [ _tf_idf_vector(document, self._idf[language]) for document in documents ] for language, documents in self._documents.items() } self._stemmer = stemmer def search( self, query: str, language: str ) -> list[tuple[float, Document]]: return _search( query, language, self._vectors[language], self._idf[language], self._documents[language], self._stemmer, ) ================================================ FILE: guide/webapp/display/text.py ================================================ import re SLUGIFY_PATTERN = re.compile(r"[^a-zA-Z0-9-]") def slugify(text: str) -> str: return SLUGIFY_PATTERN.sub("", text.lower().replace(" ", "-")) ================================================ FILE: guide/webapp/endpoint/__init__.py ================================================ ================================================ FILE: guide/webapp/endpoint/search.py ================================================ # from urllib.parse import unquote from sanic import Blueprint, Request, Sanic, html from webapp.display.page import Page from webapp.display.search.renderer import SearchRenderer from webapp.display.search.search import Document, Searcher, Stemmer bp = Blueprint("search", url_prefix="//search") @bp.get("") async def _search(request: Request, language: str, searcher: Searcher): full = not bool(request.headers.get("HX-Request")) renderer = SearchRenderer("Sanic Documentation Search") builder = renderer.render(request, language, searcher, full) return html(str(builder)) @bp.before_server_start async def setup_search(app: Sanic): stemmer = Stemmer() pages: list[Page] = app.ctx.pages documents = [ Document(page=page, language=page.meta.language).process(stemmer) for page in pages ] app.ext.dependency(Searcher(stemmer, documents)) ================================================ FILE: guide/webapp/endpoint/sitemap.py ================================================ from sanic import Request, Sanic, raw def setup_sitemap(app: Sanic) -> None: app.get("/sitemap.xml")(_sitemap) app.before_server_start(_compile_sitemap, priority=0) async def _compile_sitemap(app: Sanic): pages: list[str] = [ app.url_for( "page", language="en", path=page.relative_path.with_suffix(".html"), _external=True, _server="sanic.dev", _scheme="https", ) for page in app.ctx.pages if page.relative_path ] sitemap_parts: list[str] = [ '', '', *[f"{page}" for page in pages], "", ] app.ctx.sitemap = "\n".join(sitemap_parts) async def _sitemap(request: Request): return raw(request.app.ctx.sitemap, content_type="application/xml") ================================================ FILE: guide/webapp/endpoint/view.py ================================================ from sanic import Blueprint from .search import bp as search_bp bp = Blueprint.group(search_bp) ================================================ FILE: guide/webapp/worker/__init__.py ================================================ ================================================ FILE: guide/webapp/worker/config.py ================================================ from pathlib import Path from msgspec import yaml from webapp.display.layouts.models import GeneralConfig, MenuItem def load_menu(path: Path) -> list[MenuItem]: loaded = yaml.decode(path.read_bytes(), type=dict[str, list[MenuItem]]) return loaded["root"] def load_config(path: Path) -> GeneralConfig: loaded = yaml.decode(path.read_bytes(), type=GeneralConfig) return loaded ================================================ FILE: guide/webapp/worker/factory.py ================================================ from pathlib import Path from sanic import Request, Sanic, html, redirect from webapp.display.layouts.models import MenuItem from webapp.display.page import Page, PageRenderer from webapp.endpoint.sitemap import setup_sitemap from webapp.endpoint.view import bp from webapp.worker.config import load_config, load_menu from webapp.worker.reload import setup_livereload from webapp.worker.style import setup_style KNOWN_REDIRECTS = { "guide/deployment/configuration.html": "guide/running/configuration.html", "guide/deployment/development.html": "guide/running/development.html", "guide/deployment/running.html": "guide/running/running.html", "guide/deployment/manager.html": "guide/running/manager.html", "guide/deployment/app-loader.html": "guide/running/app-loader.html", "guide/deployment/inspector.html": "guide/running/inspector.html", "org/policies.html": "organization/policies.html", "org/scope.html": "organization/scope.html", "org/feature_requests.html": "", } def _compile_sidebar_order(items: list[MenuItem]) -> list[str]: order = [] for item in items: if item.path: order.append(item.path.removesuffix(".html") + ".md") if item.items: order.extend(_compile_sidebar_order(item.items)) return order def create_app(root: Path) -> Sanic: app = Sanic("Documentation") app.config.PUBLIC_DIR = root / "public" app.config.CONTENT_DIR = root / "content" app.config.CONFIG_DIR = root / "config" app.config.STYLE_DIR = root / "style" app.config.NODE_MODULES_DIR = root / "node_modules" app.config.LANGUAGES = ["en"] app.config.SIDEBAR = load_menu( app.config.CONFIG_DIR / "en" / "sidebar.yaml" ) app.config.NAVBAR = load_menu(app.config.CONFIG_DIR / "en" / "navbar.yaml") app.config.GENERAL = load_config( app.config.CONFIG_DIR / "en" / "general.yaml" ) setup_livereload(app) setup_style(app) setup_sitemap(app) app.blueprint(bp) app.static("/assets/", app.config.PUBLIC_DIR / "assets", name="assets") for path in (app.config.PUBLIC_DIR / "web").glob("*"): app.static(f"/{path.name}", path, name=path.name) @app.before_server_start(priority=1) async def setup(app: Sanic): app.ext.dependency(PageRenderer(base_title="Sanic User Guide")) page_order = _compile_sidebar_order(app.config.SIDEBAR) app.ctx.pages = Page.load_pages(app.config.CONTENT_DIR, page_order) app.ctx.get_page = Page.get @app.get("/", name="root") @app.get("/index.html", name="index") async def index(request: Request): return redirect(request.app.url_for("page", language="en", path="")) @app.get("/", name="page-without-path") @app.get("//") async def page( request: Request, page_renderer: PageRenderer, language: str, path: str = "", ): # TODO: Add more language support if language != "api" and language not in app.config.LANGUAGES: return redirect( request.app.url_for("page", language="en", path=path) ) if path in KNOWN_REDIRECTS: return redirect( request.app.url_for( "page", language=language, path=KNOWN_REDIRECTS[path] ), status=301, ) builder = page_renderer.render(request, language, path) title_text = page_renderer.title() return html( str(builder), headers={ "vary": "hx-request", "x-title": title_text, }, ) @app.on_request async def set_language(request: Request): request.ctx.language = request.match_info.get( "language", Page.DEFAULT_LANGUAGE ) return app ================================================ FILE: guide/webapp/worker/livereload.js ================================================ (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i Array#indexOf // true -> Array#includes var toIObject = require('./_to-iobject'); var toLength = require('./_to-length'); var toAbsoluteIndex = require('./_to-absolute-index'); module.exports = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIObject($this); var length = toLength(O.length); var index = toAbsoluteIndex(fromIndex, length); var value; // Array#includes uses SameValueZero equality algorithm // eslint-disable-next-line no-self-compare if (IS_INCLUDES && el != el) while (length > index) { value = O[index++]; // eslint-disable-next-line no-self-compare if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not } else for (;length > index; index++) if (IS_INCLUDES || index in O) { if (O[index] === el) return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; }; }; },{"./_to-absolute-index":72,"./_to-iobject":74,"./_to-length":75}],6:[function(require,module,exports){ // 0 -> Array#forEach // 1 -> Array#map // 2 -> Array#filter // 3 -> Array#some // 4 -> Array#every // 5 -> Array#find // 6 -> Array#findIndex var ctx = require('./_ctx'); var IObject = require('./_iobject'); var toObject = require('./_to-object'); var toLength = require('./_to-length'); var asc = require('./_array-species-create'); module.exports = function (TYPE, $create) { var IS_MAP = TYPE == 1; var IS_FILTER = TYPE == 2; var IS_SOME = TYPE == 3; var IS_EVERY = TYPE == 4; var IS_FIND_INDEX = TYPE == 6; var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; var create = $create || asc; return function ($this, callbackfn, that) { var O = toObject($this); var self = IObject(O); var f = ctx(callbackfn, that, 3); var length = toLength(self.length); var index = 0; var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; var val, res; for (;length > index; index++) if (NO_HOLES || index in self) { val = self[index]; res = f(val, index, O); if (TYPE) { if (IS_MAP) result[index] = res; // map else if (res) switch (TYPE) { case 3: return true; // some case 5: return val; // find case 6: return index; // findIndex case 2: result.push(val); // filter } else if (IS_EVERY) return false; // every } } return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; }; }; },{"./_array-species-create":8,"./_ctx":13,"./_iobject":31,"./_to-length":75,"./_to-object":76}],7:[function(require,module,exports){ var isObject = require('./_is-object'); var isArray = require('./_is-array'); var SPECIES = require('./_wks')('species'); module.exports = function (original) { var C; if (isArray(original)) { C = original.constructor; // cross-realm fallback if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; if (isObject(C)) { C = C[SPECIES]; if (C === null) C = undefined; } } return C === undefined ? Array : C; }; },{"./_is-array":33,"./_is-object":34,"./_wks":81}],8:[function(require,module,exports){ // 9.4.2.3 ArraySpeciesCreate(originalArray, length) var speciesConstructor = require('./_array-species-constructor'); module.exports = function (original, length) { return new (speciesConstructor(original))(length); }; },{"./_array-species-constructor":7}],9:[function(require,module,exports){ // getting tag from 19.1.3.6 Object.prototype.toString() var cof = require('./_cof'); var TAG = require('./_wks')('toStringTag'); // ES3 wrong here var ARG = cof(function () { return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function (it, key) { try { return it[key]; } catch (e) { /* empty */ } }; module.exports = function (it) { var O, T, B; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T // builtinTag case : ARG ? cof(O) // ES3 arguments fallback : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; }; },{"./_cof":10,"./_wks":81}],10:[function(require,module,exports){ var toString = {}.toString; module.exports = function (it) { return toString.call(it).slice(8, -1); }; },{}],11:[function(require,module,exports){ var core = module.exports = { version: '2.6.12' }; if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef },{}],12:[function(require,module,exports){ 'use strict'; var $defineProperty = require('./_object-dp'); var createDesc = require('./_property-desc'); module.exports = function (object, index, value) { if (index in object) $defineProperty.f(object, index, createDesc(0, value)); else object[index] = value; }; },{"./_object-dp":45,"./_property-desc":57}],13:[function(require,module,exports){ // optional / simple context binding var aFunction = require('./_a-function'); module.exports = function (fn, that, length) { aFunction(fn); if (that === undefined) return fn; switch (length) { case 1: return function (a) { return fn.call(that, a); }; case 2: return function (a, b) { return fn.call(that, a, b); }; case 3: return function (a, b, c) { return fn.call(that, a, b, c); }; } return function (/* ...args */) { return fn.apply(that, arguments); }; }; },{"./_a-function":1}],14:[function(require,module,exports){ // 7.2.1 RequireObjectCoercible(argument) module.exports = function (it) { if (it == undefined) throw TypeError("Can't call method on " + it); return it; }; },{}],15:[function(require,module,exports){ // Thank's IE8 for his funny defineProperty module.exports = !require('./_fails')(function () { return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; }); },{"./_fails":21}],16:[function(require,module,exports){ var isObject = require('./_is-object'); var document = require('./_global').document; // typeof document.createElement is 'object' in old IE var is = isObject(document) && isObject(document.createElement); module.exports = function (it) { return is ? document.createElement(it) : {}; }; },{"./_global":25,"./_is-object":34}],17:[function(require,module,exports){ // IE 8- don't enum bug keys module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); },{}],18:[function(require,module,exports){ // all enumerable object keys, includes symbols var getKeys = require('./_object-keys'); var gOPS = require('./_object-gops'); var pIE = require('./_object-pie'); module.exports = function (it) { var result = getKeys(it); var getSymbols = gOPS.f; if (getSymbols) { var symbols = getSymbols(it); var isEnum = pIE.f; var i = 0; var key; while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); } return result; }; },{"./_object-gops":50,"./_object-keys":53,"./_object-pie":54}],19:[function(require,module,exports){ var global = require('./_global'); var core = require('./_core'); var hide = require('./_hide'); var redefine = require('./_redefine'); var ctx = require('./_ctx'); var PROTOTYPE = 'prototype'; var $export = function (type, name, source) { var IS_FORCED = type & $export.F; var IS_GLOBAL = type & $export.G; var IS_STATIC = type & $export.S; var IS_PROTO = type & $export.P; var IS_BIND = type & $export.B; var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); var key, own, out, exp; if (IS_GLOBAL) source = name; for (key in source) { // contains in native own = !IS_FORCED && target && target[key] !== undefined; // export native or passed out = (own ? target : source)[key]; // bind timers to global for call from export context exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // extend global if (target) redefine(target, key, out, type & $export.U); // export if (exports[key] != out) hide(exports, key, exp); if (IS_PROTO && expProto[key] != out) expProto[key] = out; } }; global.core = core; // type bitmap $export.F = 1; // forced $export.G = 2; // global $export.S = 4; // static $export.P = 8; // proto $export.B = 16; // bind $export.W = 32; // wrap $export.U = 64; // safe $export.R = 128; // real proto method for `library` module.exports = $export; },{"./_core":11,"./_ctx":13,"./_global":25,"./_hide":27,"./_redefine":58}],20:[function(require,module,exports){ var MATCH = require('./_wks')('match'); module.exports = function (KEY) { var re = /./; try { '/./'[KEY](re); } catch (e) { try { re[MATCH] = false; return !'/./'[KEY](re); } catch (f) { /* empty */ } } return true; }; },{"./_wks":81}],21:[function(require,module,exports){ module.exports = function (exec) { try { return !!exec(); } catch (e) { return true; } }; },{}],22:[function(require,module,exports){ 'use strict'; require('./es6.regexp.exec'); var redefine = require('./_redefine'); var hide = require('./_hide'); var fails = require('./_fails'); var defined = require('./_defined'); var wks = require('./_wks'); var regexpExec = require('./_regexp-exec'); var SPECIES = wks('species'); var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { // #replace needs built-in support for named groups. // #match works fine because it just return the exec results, even if it has // a "grops" property. var re = /./; re.exec = function () { var result = []; result.groups = { a: '7' }; return result; }; return ''.replace(re, '$') !== '7'; }); var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () { // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec var re = /(?:)/; var originalExec = re.exec; re.exec = function () { return originalExec.apply(this, arguments); }; var result = 'ab'.split(re); return result.length === 2 && result[0] === 'a' && result[1] === 'b'; })(); module.exports = function (KEY, length, exec) { var SYMBOL = wks(KEY); var DELEGATES_TO_SYMBOL = !fails(function () { // String methods call symbol-named RegEp methods var O = {}; O[SYMBOL] = function () { return 7; }; return ''[KEY](O) != 7; }); var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () { // Symbol-named RegExp methods call .exec var execCalled = false; var re = /a/; re.exec = function () { execCalled = true; return null; }; if (KEY === 'split') { // RegExp[@@split] doesn't call the regex's exec method, but first creates // a new one. We need to return the patched regex when creating the new one. re.constructor = {}; re.constructor[SPECIES] = function () { return re; }; } re[SYMBOL](''); return !execCalled; }) : undefined; if ( !DELEGATES_TO_SYMBOL || !DELEGATES_TO_EXEC || (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) || (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) ) { var nativeRegExpMethod = /./[SYMBOL]; var fns = exec( defined, SYMBOL, ''[KEY], function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) { if (regexp.exec === regexpExec) { if (DELEGATES_TO_SYMBOL && !forceStringMethod) { // The native String method already delegates to @@method (this // polyfilled function), leasing to infinite recursion. // We avoid it by directly calling the native @@method method. return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; } return { done: true, value: nativeMethod.call(str, regexp, arg2) }; } return { done: false }; } ); var strfn = fns[0]; var rxfn = fns[1]; redefine(String.prototype, KEY, strfn); hide(RegExp.prototype, SYMBOL, length == 2 // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) // 21.2.5.11 RegExp.prototype[@@split](string, limit) ? function (string, arg) { return rxfn.call(string, this, arg); } // 21.2.5.6 RegExp.prototype[@@match](string) // 21.2.5.9 RegExp.prototype[@@search](string) : function (string) { return rxfn.call(string, this); } ); } }; },{"./_defined":14,"./_fails":21,"./_hide":27,"./_redefine":58,"./_regexp-exec":60,"./_wks":81,"./es6.regexp.exec":93}],23:[function(require,module,exports){ 'use strict'; // 21.2.5.3 get RegExp.prototype.flags var anObject = require('./_an-object'); module.exports = function () { var that = anObject(this); var result = ''; if (that.global) result += 'g'; if (that.ignoreCase) result += 'i'; if (that.multiline) result += 'm'; if (that.unicode) result += 'u'; if (that.sticky) result += 'y'; return result; }; },{"./_an-object":4}],24:[function(require,module,exports){ module.exports = require('./_shared')('native-function-to-string', Function.toString); },{"./_shared":65}],25:[function(require,module,exports){ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self // eslint-disable-next-line no-new-func : Function('return this')(); if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef },{}],26:[function(require,module,exports){ var hasOwnProperty = {}.hasOwnProperty; module.exports = function (it, key) { return hasOwnProperty.call(it, key); }; },{}],27:[function(require,module,exports){ var dP = require('./_object-dp'); var createDesc = require('./_property-desc'); module.exports = require('./_descriptors') ? function (object, key, value) { return dP.f(object, key, createDesc(1, value)); } : function (object, key, value) { object[key] = value; return object; }; },{"./_descriptors":15,"./_object-dp":45,"./_property-desc":57}],28:[function(require,module,exports){ var document = require('./_global').document; module.exports = document && document.documentElement; },{"./_global":25}],29:[function(require,module,exports){ module.exports = !require('./_descriptors') && !require('./_fails')(function () { return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7; }); },{"./_descriptors":15,"./_dom-create":16,"./_fails":21}],30:[function(require,module,exports){ var isObject = require('./_is-object'); var setPrototypeOf = require('./_set-proto').set; module.exports = function (that, target, C) { var S = target.constructor; var P; if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) { setPrototypeOf(that, P); } return that; }; },{"./_is-object":34,"./_set-proto":61}],31:[function(require,module,exports){ // fallback for non-array-like ES3 and non-enumerable old V8 strings var cof = require('./_cof'); // eslint-disable-next-line no-prototype-builtins module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { return cof(it) == 'String' ? it.split('') : Object(it); }; },{"./_cof":10}],32:[function(require,module,exports){ // check on default Array iterator var Iterators = require('./_iterators'); var ITERATOR = require('./_wks')('iterator'); var ArrayProto = Array.prototype; module.exports = function (it) { return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); }; },{"./_iterators":41,"./_wks":81}],33:[function(require,module,exports){ // 7.2.2 IsArray(argument) var cof = require('./_cof'); module.exports = Array.isArray || function isArray(arg) { return cof(arg) == 'Array'; }; },{"./_cof":10}],34:[function(require,module,exports){ module.exports = function (it) { return typeof it === 'object' ? it !== null : typeof it === 'function'; }; },{}],35:[function(require,module,exports){ // 7.2.8 IsRegExp(argument) var isObject = require('./_is-object'); var cof = require('./_cof'); var MATCH = require('./_wks')('match'); module.exports = function (it) { var isRegExp; return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); }; },{"./_cof":10,"./_is-object":34,"./_wks":81}],36:[function(require,module,exports){ // call something on iterator step with safe closing on error var anObject = require('./_an-object'); module.exports = function (iterator, fn, value, entries) { try { return entries ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion) } catch (e) { var ret = iterator['return']; if (ret !== undefined) anObject(ret.call(iterator)); throw e; } }; },{"./_an-object":4}],37:[function(require,module,exports){ 'use strict'; var create = require('./_object-create'); var descriptor = require('./_property-desc'); var setToStringTag = require('./_set-to-string-tag'); var IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() require('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function () { return this; }); module.exports = function (Constructor, NAME, next) { Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); setToStringTag(Constructor, NAME + ' Iterator'); }; },{"./_hide":27,"./_object-create":44,"./_property-desc":57,"./_set-to-string-tag":63,"./_wks":81}],38:[function(require,module,exports){ 'use strict'; var LIBRARY = require('./_library'); var $export = require('./_export'); var redefine = require('./_redefine'); var hide = require('./_hide'); var Iterators = require('./_iterators'); var $iterCreate = require('./_iter-create'); var setToStringTag = require('./_set-to-string-tag'); var getPrototypeOf = require('./_object-gpo'); var ITERATOR = require('./_wks')('iterator'); var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` var FF_ITERATOR = '@@iterator'; var KEYS = 'keys'; var VALUES = 'values'; var returnThis = function () { return this; }; module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { $iterCreate(Constructor, NAME, next); var getMethod = function (kind) { if (!BUGGY && kind in proto) return proto[kind]; switch (kind) { case KEYS: return function keys() { return new Constructor(this, kind); }; case VALUES: return function values() { return new Constructor(this, kind); }; } return function entries() { return new Constructor(this, kind); }; }; var TAG = NAME + ' Iterator'; var DEF_VALUES = DEFAULT == VALUES; var VALUES_BUG = false; var proto = Base.prototype; var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; var $default = $native || getMethod(DEFAULT); var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; var methods, key, IteratorPrototype; // Fix native if ($anyNative) { IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { // Set @@toStringTag to native iterators setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); } } // fix Array#{values, @@iterator}.name in V8 / FF if (DEF_VALUES && $native && $native.name !== VALUES) { VALUES_BUG = true; $default = function values() { return $native.call(this); }; } // Define iterator if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { hide(proto, ITERATOR, $default); } // Plug for library Iterators[NAME] = $default; Iterators[TAG] = returnThis; if (DEFAULT) { methods = { values: DEF_VALUES ? $default : getMethod(VALUES), keys: IS_SET ? $default : getMethod(KEYS), entries: $entries }; if (FORCED) for (key in methods) { if (!(key in proto)) redefine(proto, key, methods[key]); } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); } return methods; }; },{"./_export":19,"./_hide":27,"./_iter-create":37,"./_iterators":41,"./_library":42,"./_object-gpo":51,"./_redefine":58,"./_set-to-string-tag":63,"./_wks":81}],39:[function(require,module,exports){ var ITERATOR = require('./_wks')('iterator'); var SAFE_CLOSING = false; try { var riter = [7][ITERATOR](); riter['return'] = function () { SAFE_CLOSING = true; }; // eslint-disable-next-line no-throw-literal Array.from(riter, function () { throw 2; }); } catch (e) { /* empty */ } module.exports = function (exec, skipClosing) { if (!skipClosing && !SAFE_CLOSING) return false; var safe = false; try { var arr = [7]; var iter = arr[ITERATOR](); iter.next = function () { return { done: safe = true }; }; arr[ITERATOR] = function () { return iter; }; exec(arr); } catch (e) { /* empty */ } return safe; }; },{"./_wks":81}],40:[function(require,module,exports){ module.exports = function (done, value) { return { value: value, done: !!done }; }; },{}],41:[function(require,module,exports){ module.exports = {}; },{}],42:[function(require,module,exports){ module.exports = false; },{}],43:[function(require,module,exports){ var META = require('./_uid')('meta'); var isObject = require('./_is-object'); var has = require('./_has'); var setDesc = require('./_object-dp').f; var id = 0; var isExtensible = Object.isExtensible || function () { return true; }; var FREEZE = !require('./_fails')(function () { return isExtensible(Object.preventExtensions({})); }); var setMeta = function (it) { setDesc(it, META, { value: { i: 'O' + ++id, // object ID w: {} // weak collections IDs } }); }; var fastKey = function (it, create) { // return primitive with prefix if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; if (!has(it, META)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return 'F'; // not necessary to add metadata if (!create) return 'E'; // add missing metadata setMeta(it); // return object ID } return it[META].i; }; var getWeak = function (it, create) { if (!has(it, META)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return true; // not necessary to add metadata if (!create) return false; // add missing metadata setMeta(it); // return hash weak collections IDs } return it[META].w; }; // add metadata on freeze-family methods calling var onFreeze = function (it) { if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); return it; }; var meta = module.exports = { KEY: META, NEED: false, fastKey: fastKey, getWeak: getWeak, onFreeze: onFreeze }; },{"./_fails":21,"./_has":26,"./_is-object":34,"./_object-dp":45,"./_uid":78}],44:[function(require,module,exports){ // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = require('./_an-object'); var dPs = require('./_object-dps'); var enumBugKeys = require('./_enum-bug-keys'); var IE_PROTO = require('./_shared-key')('IE_PROTO'); var Empty = function () { /* empty */ }; var PROTOTYPE = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype var createDict = function () { // Thrash, waste and sodomy: IE GC bug var iframe = require('./_dom-create')('iframe'); var i = enumBugKeys.length; var lt = '<'; var gt = '>'; var iframeDocument; iframe.style.display = 'none'; require('./_html').appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); iframeDocument = iframe.contentWindow.document; iframeDocument.open(); iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); iframeDocument.close(); createDict = iframeDocument.F; while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; return createDict(); }; module.exports = Object.create || function create(O, Properties) { var result; if (O !== null) { Empty[PROTOTYPE] = anObject(O); result = new Empty(); Empty[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; } else result = createDict(); return Properties === undefined ? result : dPs(result, Properties); }; },{"./_an-object":4,"./_dom-create":16,"./_enum-bug-keys":17,"./_html":28,"./_object-dps":46,"./_shared-key":64}],45:[function(require,module,exports){ var anObject = require('./_an-object'); var IE8_DOM_DEFINE = require('./_ie8-dom-define'); var toPrimitive = require('./_to-primitive'); var dP = Object.defineProperty; exports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPrimitive(P, true); anObject(Attributes); if (IE8_DOM_DEFINE) try { return dP(O, P, Attributes); } catch (e) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; },{"./_an-object":4,"./_descriptors":15,"./_ie8-dom-define":29,"./_to-primitive":77}],46:[function(require,module,exports){ var dP = require('./_object-dp'); var anObject = require('./_an-object'); var getKeys = require('./_object-keys'); module.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) { anObject(O); var keys = getKeys(Properties); var length = keys.length; var i = 0; var P; while (length > i) dP.f(O, P = keys[i++], Properties[P]); return O; }; },{"./_an-object":4,"./_descriptors":15,"./_object-dp":45,"./_object-keys":53}],47:[function(require,module,exports){ var pIE = require('./_object-pie'); var createDesc = require('./_property-desc'); var toIObject = require('./_to-iobject'); var toPrimitive = require('./_to-primitive'); var has = require('./_has'); var IE8_DOM_DEFINE = require('./_ie8-dom-define'); var gOPD = Object.getOwnPropertyDescriptor; exports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P) { O = toIObject(O); P = toPrimitive(P, true); if (IE8_DOM_DEFINE) try { return gOPD(O, P); } catch (e) { /* empty */ } if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); }; },{"./_descriptors":15,"./_has":26,"./_ie8-dom-define":29,"./_object-pie":54,"./_property-desc":57,"./_to-iobject":74,"./_to-primitive":77}],48:[function(require,module,exports){ // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window var toIObject = require('./_to-iobject'); var gOPN = require('./_object-gopn').f; var toString = {}.toString; var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; var getWindowNames = function (it) { try { return gOPN(it); } catch (e) { return windowNames.slice(); } }; module.exports.f = function getOwnPropertyNames(it) { return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); }; },{"./_object-gopn":49,"./_to-iobject":74}],49:[function(require,module,exports){ // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) var $keys = require('./_object-keys-internal'); var hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype'); exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { return $keys(O, hiddenKeys); }; },{"./_enum-bug-keys":17,"./_object-keys-internal":52}],50:[function(require,module,exports){ exports.f = Object.getOwnPropertySymbols; },{}],51:[function(require,module,exports){ // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) var has = require('./_has'); var toObject = require('./_to-object'); var IE_PROTO = require('./_shared-key')('IE_PROTO'); var ObjectProto = Object.prototype; module.exports = Object.getPrototypeOf || function (O) { O = toObject(O); if (has(O, IE_PROTO)) return O[IE_PROTO]; if (typeof O.constructor == 'function' && O instanceof O.constructor) { return O.constructor.prototype; } return O instanceof Object ? ObjectProto : null; }; },{"./_has":26,"./_shared-key":64,"./_to-object":76}],52:[function(require,module,exports){ var has = require('./_has'); var toIObject = require('./_to-iobject'); var arrayIndexOf = require('./_array-includes')(false); var IE_PROTO = require('./_shared-key')('IE_PROTO'); module.exports = function (object, names) { var O = toIObject(object); var i = 0; var result = []; var key; for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); // Don't enum bug & hidden keys while (names.length > i) if (has(O, key = names[i++])) { ~arrayIndexOf(result, key) || result.push(key); } return result; }; },{"./_array-includes":5,"./_has":26,"./_shared-key":64,"./_to-iobject":74}],53:[function(require,module,exports){ // 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys = require('./_object-keys-internal'); var enumBugKeys = require('./_enum-bug-keys'); module.exports = Object.keys || function keys(O) { return $keys(O, enumBugKeys); }; },{"./_enum-bug-keys":17,"./_object-keys-internal":52}],54:[function(require,module,exports){ exports.f = {}.propertyIsEnumerable; },{}],55:[function(require,module,exports){ // most Object methods by ES6 should accept primitives var $export = require('./_export'); var core = require('./_core'); var fails = require('./_fails'); module.exports = function (KEY, exec) { var fn = (core.Object || {})[KEY] || Object[KEY]; var exp = {}; exp[KEY] = exec(fn); $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); }; },{"./_core":11,"./_export":19,"./_fails":21}],56:[function(require,module,exports){ // all object keys, includes non-enumerable and symbols var gOPN = require('./_object-gopn'); var gOPS = require('./_object-gops'); var anObject = require('./_an-object'); var Reflect = require('./_global').Reflect; module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) { var keys = gOPN.f(anObject(it)); var getSymbols = gOPS.f; return getSymbols ? keys.concat(getSymbols(it)) : keys; }; },{"./_an-object":4,"./_global":25,"./_object-gopn":49,"./_object-gops":50}],57:[function(require,module,exports){ module.exports = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; },{}],58:[function(require,module,exports){ var global = require('./_global'); var hide = require('./_hide'); var has = require('./_has'); var SRC = require('./_uid')('src'); var $toString = require('./_function-to-string'); var TO_STRING = 'toString'; var TPL = ('' + $toString).split(TO_STRING); require('./_core').inspectSource = function (it) { return $toString.call(it); }; (module.exports = function (O, key, val, safe) { var isFunction = typeof val == 'function'; if (isFunction) has(val, 'name') || hide(val, 'name', key); if (O[key] === val) return; if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); if (O === global) { O[key] = val; } else if (!safe) { delete O[key]; hide(O, key, val); } else if (O[key]) { O[key] = val; } else { hide(O, key, val); } // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative })(Function.prototype, TO_STRING, function toString() { return typeof this == 'function' && this[SRC] || $toString.call(this); }); },{"./_core":11,"./_function-to-string":24,"./_global":25,"./_has":26,"./_hide":27,"./_uid":78}],59:[function(require,module,exports){ 'use strict'; var classof = require('./_classof'); var builtinExec = RegExp.prototype.exec; // `RegExpExec` abstract operation // https://tc39.github.io/ecma262/#sec-regexpexec module.exports = function (R, S) { var exec = R.exec; if (typeof exec === 'function') { var result = exec.call(R, S); if (typeof result !== 'object') { throw new TypeError('RegExp exec method returned something other than an Object or null'); } return result; } if (classof(R) !== 'RegExp') { throw new TypeError('RegExp#exec called on incompatible receiver'); } return builtinExec.call(R, S); }; },{"./_classof":9}],60:[function(require,module,exports){ 'use strict'; var regexpFlags = require('./_flags'); var nativeExec = RegExp.prototype.exec; // This always refers to the native implementation, because the // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, // which loads this file before patching the method. var nativeReplace = String.prototype.replace; var patchedExec = nativeExec; var LAST_INDEX = 'lastIndex'; var UPDATES_LAST_INDEX_WRONG = (function () { var re1 = /a/, re2 = /b*/g; nativeExec.call(re1, 'a'); nativeExec.call(re2, 'a'); return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0; })(); // nonparticipating capturing group, copied from es5-shim's String#split patch. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED; if (PATCH) { patchedExec = function exec(str) { var re = this; var lastIndex, reCopy, match, i; if (NPCG_INCLUDED) { reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re)); } if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX]; match = nativeExec.call(re, str); if (UPDATES_LAST_INDEX_WRONG && match) { re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex; } if (NPCG_INCLUDED && match && match.length > 1) { // Fix browsers whose `exec` methods don't consistently return `undefined` // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ // eslint-disable-next-line no-loop-func nativeReplace.call(match[0], reCopy, function () { for (i = 1; i < arguments.length - 2; i++) { if (arguments[i] === undefined) match[i] = undefined; } }); } return match; }; } module.exports = patchedExec; },{"./_flags":23}],61:[function(require,module,exports){ // Works with __proto__ only. Old v8 can't work with null proto objects. /* eslint-disable no-proto */ var isObject = require('./_is-object'); var anObject = require('./_an-object'); var check = function (O, proto) { anObject(O); if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); }; module.exports = { set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line function (test, buggy, set) { try { set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2); set(test, []); buggy = !(test instanceof Array); } catch (e) { buggy = true; } return function setPrototypeOf(O, proto) { check(O, proto); if (buggy) O.__proto__ = proto; else set(O, proto); return O; }; }({}, false) : undefined), check: check }; },{"./_an-object":4,"./_ctx":13,"./_is-object":34,"./_object-gopd":47}],62:[function(require,module,exports){ 'use strict'; var global = require('./_global'); var dP = require('./_object-dp'); var DESCRIPTORS = require('./_descriptors'); var SPECIES = require('./_wks')('species'); module.exports = function (KEY) { var C = global[KEY]; if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { configurable: true, get: function () { return this; } }); }; },{"./_descriptors":15,"./_global":25,"./_object-dp":45,"./_wks":81}],63:[function(require,module,exports){ var def = require('./_object-dp').f; var has = require('./_has'); var TAG = require('./_wks')('toStringTag'); module.exports = function (it, tag, stat) { if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); }; },{"./_has":26,"./_object-dp":45,"./_wks":81}],64:[function(require,module,exports){ var shared = require('./_shared')('keys'); var uid = require('./_uid'); module.exports = function (key) { return shared[key] || (shared[key] = uid(key)); }; },{"./_shared":65,"./_uid":78}],65:[function(require,module,exports){ var core = require('./_core'); var global = require('./_global'); var SHARED = '__core-js_shared__'; var store = global[SHARED] || (global[SHARED] = {}); (module.exports = function (key, value) { return store[key] || (store[key] = value !== undefined ? value : {}); })('versions', []).push({ version: core.version, mode: require('./_library') ? 'pure' : 'global', copyright: '© 2020 Denis Pushkarev (zloirock.ru)' }); },{"./_core":11,"./_global":25,"./_library":42}],66:[function(require,module,exports){ // 7.3.20 SpeciesConstructor(O, defaultConstructor) var anObject = require('./_an-object'); var aFunction = require('./_a-function'); var SPECIES = require('./_wks')('species'); module.exports = function (O, D) { var C = anObject(O).constructor; var S; return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); }; },{"./_a-function":1,"./_an-object":4,"./_wks":81}],67:[function(require,module,exports){ 'use strict'; var fails = require('./_fails'); module.exports = function (method, arg) { return !!method && fails(function () { // eslint-disable-next-line no-useless-call arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null); }); }; },{"./_fails":21}],68:[function(require,module,exports){ var toInteger = require('./_to-integer'); var defined = require('./_defined'); // true -> String#at // false -> String#codePointAt module.exports = function (TO_STRING) { return function (that, pos) { var s = String(defined(that)); var i = toInteger(pos); var l = s.length; var a, b; if (i < 0 || i >= l) return TO_STRING ? '' : undefined; a = s.charCodeAt(i); return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; }; }; },{"./_defined":14,"./_to-integer":73}],69:[function(require,module,exports){ // helper for String#{startsWith, endsWith, includes} var isRegExp = require('./_is-regexp'); var defined = require('./_defined'); module.exports = function (that, searchString, NAME) { if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); return String(defined(that)); }; },{"./_defined":14,"./_is-regexp":35}],70:[function(require,module,exports){ var $export = require('./_export'); var defined = require('./_defined'); var fails = require('./_fails'); var spaces = require('./_string-ws'); var space = '[' + spaces + ']'; var non = '\u200b\u0085'; var ltrim = RegExp('^' + space + space + '*'); var rtrim = RegExp(space + space + '*$'); var exporter = function (KEY, exec, ALIAS) { var exp = {}; var FORCE = fails(function () { return !!spaces[KEY]() || non[KEY]() != non; }); var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; if (ALIAS) exp[ALIAS] = fn; $export($export.P + $export.F * FORCE, 'String', exp); }; // 1 -> String#trimLeft // 2 -> String#trimRight // 3 -> String#trim var trim = exporter.trim = function (string, TYPE) { string = String(defined(string)); if (TYPE & 1) string = string.replace(ltrim, ''); if (TYPE & 2) string = string.replace(rtrim, ''); return string; }; module.exports = exporter; },{"./_defined":14,"./_export":19,"./_fails":21,"./_string-ws":71}],71:[function(require,module,exports){ module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; },{}],72:[function(require,module,exports){ var toInteger = require('./_to-integer'); var max = Math.max; var min = Math.min; module.exports = function (index, length) { index = toInteger(index); return index < 0 ? max(index + length, 0) : min(index, length); }; },{"./_to-integer":73}],73:[function(require,module,exports){ // 7.1.4 ToInteger var ceil = Math.ceil; var floor = Math.floor; module.exports = function (it) { return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; },{}],74:[function(require,module,exports){ // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = require('./_iobject'); var defined = require('./_defined'); module.exports = function (it) { return IObject(defined(it)); }; },{"./_defined":14,"./_iobject":31}],75:[function(require,module,exports){ // 7.1.15 ToLength var toInteger = require('./_to-integer'); var min = Math.min; module.exports = function (it) { return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; },{"./_to-integer":73}],76:[function(require,module,exports){ // 7.1.13 ToObject(argument) var defined = require('./_defined'); module.exports = function (it) { return Object(defined(it)); }; },{"./_defined":14}],77:[function(require,module,exports){ // 7.1.1 ToPrimitive(input [, PreferredType]) var isObject = require('./_is-object'); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function (it, S) { if (!isObject(it)) return it; var fn, val; if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; throw TypeError("Can't convert object to primitive value"); }; },{"./_is-object":34}],78:[function(require,module,exports){ var id = 0; var px = Math.random(); module.exports = function (key) { return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; },{}],79:[function(require,module,exports){ var global = require('./_global'); var core = require('./_core'); var LIBRARY = require('./_library'); var wksExt = require('./_wks-ext'); var defineProperty = require('./_object-dp').f; module.exports = function (name) { var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); }; },{"./_core":11,"./_global":25,"./_library":42,"./_object-dp":45,"./_wks-ext":80}],80:[function(require,module,exports){ exports.f = require('./_wks'); },{"./_wks":81}],81:[function(require,module,exports){ var store = require('./_shared')('wks'); var uid = require('./_uid'); var Symbol = require('./_global').Symbol; var USE_SYMBOL = typeof Symbol == 'function'; var $exports = module.exports = function (name) { return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); }; $exports.store = store; },{"./_global":25,"./_shared":65,"./_uid":78}],82:[function(require,module,exports){ var classof = require('./_classof'); var ITERATOR = require('./_wks')('iterator'); var Iterators = require('./_iterators'); module.exports = require('./_core').getIteratorMethod = function (it) { if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; }; },{"./_classof":9,"./_core":11,"./_iterators":41,"./_wks":81}],83:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var $filter = require('./_array-methods')(2); $export($export.P + $export.F * !require('./_strict-method')([].filter, true), 'Array', { // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) filter: function filter(callbackfn /* , thisArg */) { return $filter(this, callbackfn, arguments[1]); } }); },{"./_array-methods":6,"./_export":19,"./_strict-method":67}],84:[function(require,module,exports){ 'use strict'; var ctx = require('./_ctx'); var $export = require('./_export'); var toObject = require('./_to-object'); var call = require('./_iter-call'); var isArrayIter = require('./_is-array-iter'); var toLength = require('./_to-length'); var createProperty = require('./_create-property'); var getIterFn = require('./core.get-iterator-method'); $export($export.S + $export.F * !require('./_iter-detect')(function (iter) { Array.from(iter); }), 'Array', { // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { var O = toObject(arrayLike); var C = typeof this == 'function' ? this : Array; var aLen = arguments.length; var mapfn = aLen > 1 ? arguments[1] : undefined; var mapping = mapfn !== undefined; var index = 0; var iterFn = getIterFn(O); var length, result, step, iterator; if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); // if object isn't iterable or it's array with default iterator - use simple case if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); } } else { length = toLength(O.length); for (result = new C(length); length > index; index++) { createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); } } result.length = index; return result; } }); },{"./_create-property":12,"./_ctx":13,"./_export":19,"./_is-array-iter":32,"./_iter-call":36,"./_iter-detect":39,"./_to-length":75,"./_to-object":76,"./core.get-iterator-method":82}],85:[function(require,module,exports){ 'use strict'; var addToUnscopables = require('./_add-to-unscopables'); var step = require('./_iter-step'); var Iterators = require('./_iterators'); var toIObject = require('./_to-iobject'); // 22.1.3.4 Array.prototype.entries() // 22.1.3.13 Array.prototype.keys() // 22.1.3.29 Array.prototype.values() // 22.1.3.30 Array.prototype[@@iterator]() module.exports = require('./_iter-define')(Array, 'Array', function (iterated, kind) { this._t = toIObject(iterated); // target this._i = 0; // next index this._k = kind; // kind // 22.1.5.2.1 %ArrayIteratorPrototype%.next() }, function () { var O = this._t; var kind = this._k; var index = this._i++; if (!O || index >= O.length) { this._t = undefined; return step(1); } if (kind == 'keys') return step(0, index); if (kind == 'values') return step(0, O[index]); return step(0, [index, O[index]]); }, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) Iterators.Arguments = Iterators.Array; addToUnscopables('keys'); addToUnscopables('values'); addToUnscopables('entries'); },{"./_add-to-unscopables":2,"./_iter-define":38,"./_iter-step":40,"./_iterators":41,"./_to-iobject":74}],86:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var $map = require('./_array-methods')(1); $export($export.P + $export.F * !require('./_strict-method')([].map, true), 'Array', { // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) map: function map(callbackfn /* , thisArg */) { return $map(this, callbackfn, arguments[1]); } }); },{"./_array-methods":6,"./_export":19,"./_strict-method":67}],87:[function(require,module,exports){ 'use strict'; var $export = require('./_export'); var html = require('./_html'); var cof = require('./_cof'); var toAbsoluteIndex = require('./_to-absolute-index'); var toLength = require('./_to-length'); var arraySlice = [].slice; // fallback for not array-like ES3 strings and DOM objects $export($export.P + $export.F * require('./_fails')(function () { if (html) arraySlice.call(html); }), 'Array', { slice: function slice(begin, end) { var len = toLength(this.length); var klass = cof(this); end = end === undefined ? len : end; if (klass == 'Array') return arraySlice.call(this, begin, end); var start = toAbsoluteIndex(begin, len); var upTo = toAbsoluteIndex(end, len); var size = toLength(upTo - start); var cloned = new Array(size); var i = 0; for (; i < size; i++) cloned[i] = klass == 'String' ? this.charAt(start + i) : this[start + i]; return cloned; } }); },{"./_cof":10,"./_export":19,"./_fails":21,"./_html":28,"./_to-absolute-index":72,"./_to-length":75}],88:[function(require,module,exports){ 'use strict'; var global = require('./_global'); var has = require('./_has'); var cof = require('./_cof'); var inheritIfRequired = require('./_inherit-if-required'); var toPrimitive = require('./_to-primitive'); var fails = require('./_fails'); var gOPN = require('./_object-gopn').f; var gOPD = require('./_object-gopd').f; var dP = require('./_object-dp').f; var $trim = require('./_string-trim').trim; var NUMBER = 'Number'; var $Number = global[NUMBER]; var Base = $Number; var proto = $Number.prototype; // Opera ~12 has broken Object#toString var BROKEN_COF = cof(require('./_object-create')(proto)) == NUMBER; var TRIM = 'trim' in String.prototype; // 7.1.3 ToNumber(argument) var toNumber = function (argument) { var it = toPrimitive(argument, false); if (typeof it == 'string' && it.length > 2) { it = TRIM ? it.trim() : $trim(it, 3); var first = it.charCodeAt(0); var third, radix, maxCode; if (first === 43 || first === 45) { third = it.charCodeAt(2); if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix } else if (first === 48) { switch (it.charCodeAt(1)) { case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i default: return +it; } for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) { code = digits.charCodeAt(i); // parseInt parses a string to a first unavailable symbol // but ToNumber should return NaN if a string contains unavailable symbols if (code < 48 || code > maxCode) return NaN; } return parseInt(digits, radix); } } return +it; }; if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) { $Number = function Number(value) { var it = arguments.length < 1 ? 0 : value; var that = this; return that instanceof $Number // check on 1..constructor(foo) case && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER) ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it); }; for (var keys = require('./_descriptors') ? gOPN(Base) : ( // ES3: 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + // ES6 (in case, if modules with ES6 Number statics required before): 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' ).split(','), j = 0, key; keys.length > j; j++) { if (has(Base, key = keys[j]) && !has($Number, key)) { dP($Number, key, gOPD(Base, key)); } } $Number.prototype = proto; proto.constructor = $Number; require('./_redefine')(global, NUMBER, $Number); } },{"./_cof":10,"./_descriptors":15,"./_fails":21,"./_global":25,"./_has":26,"./_inherit-if-required":30,"./_object-create":44,"./_object-dp":45,"./_object-gopd":47,"./_object-gopn":49,"./_redefine":58,"./_string-trim":70,"./_to-primitive":77}],89:[function(require,module,exports){ // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) var toIObject = require('./_to-iobject'); var $getOwnPropertyDescriptor = require('./_object-gopd').f; require('./_object-sap')('getOwnPropertyDescriptor', function () { return function getOwnPropertyDescriptor(it, key) { return $getOwnPropertyDescriptor(toIObject(it), key); }; }); },{"./_object-gopd":47,"./_object-sap":55,"./_to-iobject":74}],90:[function(require,module,exports){ // 19.1.2.14 Object.keys(O) var toObject = require('./_to-object'); var $keys = require('./_object-keys'); require('./_object-sap')('keys', function () { return function keys(it) { return $keys(toObject(it)); }; }); },{"./_object-keys":53,"./_object-sap":55,"./_to-object":76}],91:[function(require,module,exports){ 'use strict'; // 19.1.3.6 Object.prototype.toString() var classof = require('./_classof'); var test = {}; test[require('./_wks')('toStringTag')] = 'z'; if (test + '' != '[object z]') { require('./_redefine')(Object.prototype, 'toString', function toString() { return '[object ' + classof(this) + ']'; }, true); } },{"./_classof":9,"./_redefine":58,"./_wks":81}],92:[function(require,module,exports){ var global = require('./_global'); var inheritIfRequired = require('./_inherit-if-required'); var dP = require('./_object-dp').f; var gOPN = require('./_object-gopn').f; var isRegExp = require('./_is-regexp'); var $flags = require('./_flags'); var $RegExp = global.RegExp; var Base = $RegExp; var proto = $RegExp.prototype; var re1 = /a/g; var re2 = /a/g; // "new" creates a new object, old webkit buggy here var CORRECT_NEW = new $RegExp(re1) !== re1; if (require('./_descriptors') && (!CORRECT_NEW || require('./_fails')(function () { re2[require('./_wks')('match')] = false; // RegExp constructor can alter flags and IsRegExp works correct with @@match return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i'; }))) { $RegExp = function RegExp(p, f) { var tiRE = this instanceof $RegExp; var piRE = isRegExp(p); var fiU = f === undefined; return !tiRE && piRE && p.constructor === $RegExp && fiU ? p : inheritIfRequired(CORRECT_NEW ? new Base(piRE && !fiU ? p.source : p, f) : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f) , tiRE ? this : proto, $RegExp); }; var proxy = function (key) { key in $RegExp || dP($RegExp, key, { configurable: true, get: function () { return Base[key]; }, set: function (it) { Base[key] = it; } }); }; for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]); proto.constructor = $RegExp; $RegExp.prototype = proto; require('./_redefine')(global, 'RegExp', $RegExp); } require('./_set-species')('RegExp'); },{"./_descriptors":15,"./_fails":21,"./_flags":23,"./_global":25,"./_inherit-if-required":30,"./_is-regexp":35,"./_object-dp":45,"./_object-gopn":49,"./_redefine":58,"./_set-species":62,"./_wks":81}],93:[function(require,module,exports){ 'use strict'; var regexpExec = require('./_regexp-exec'); require('./_export')({ target: 'RegExp', proto: true, forced: regexpExec !== /./.exec }, { exec: regexpExec }); },{"./_export":19,"./_regexp-exec":60}],94:[function(require,module,exports){ 'use strict'; var anObject = require('./_an-object'); var toLength = require('./_to-length'); var advanceStringIndex = require('./_advance-string-index'); var regExpExec = require('./_regexp-exec-abstract'); // @@match logic require('./_fix-re-wks')('match', 1, function (defined, MATCH, $match, maybeCallNative) { return [ // `String.prototype.match` method // https://tc39.github.io/ecma262/#sec-string.prototype.match function match(regexp) { var O = defined(this); var fn = regexp == undefined ? undefined : regexp[MATCH]; return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); }, // `RegExp.prototype[@@match]` method // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match function (regexp) { var res = maybeCallNative($match, regexp, this); if (res.done) return res.value; var rx = anObject(regexp); var S = String(this); if (!rx.global) return regExpExec(rx, S); var fullUnicode = rx.unicode; rx.lastIndex = 0; var A = []; var n = 0; var result; while ((result = regExpExec(rx, S)) !== null) { var matchStr = String(result[0]); A[n] = matchStr; if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); n++; } return n === 0 ? null : A; } ]; }); },{"./_advance-string-index":3,"./_an-object":4,"./_fix-re-wks":22,"./_regexp-exec-abstract":59,"./_to-length":75}],95:[function(require,module,exports){ 'use strict'; var anObject = require('./_an-object'); var toObject = require('./_to-object'); var toLength = require('./_to-length'); var toInteger = require('./_to-integer'); var advanceStringIndex = require('./_advance-string-index'); var regExpExec = require('./_regexp-exec-abstract'); var max = Math.max; var min = Math.min; var floor = Math.floor; var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g; var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g; var maybeToString = function (it) { return it === undefined ? it : String(it); }; // @@replace logic require('./_fix-re-wks')('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) { return [ // `String.prototype.replace` method // https://tc39.github.io/ecma262/#sec-string.prototype.replace function replace(searchValue, replaceValue) { var O = defined(this); var fn = searchValue == undefined ? undefined : searchValue[REPLACE]; return fn !== undefined ? fn.call(searchValue, O, replaceValue) : $replace.call(String(O), searchValue, replaceValue); }, // `RegExp.prototype[@@replace]` method // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace function (regexp, replaceValue) { var res = maybeCallNative($replace, regexp, this, replaceValue); if (res.done) return res.value; var rx = anObject(regexp); var S = String(this); var functionalReplace = typeof replaceValue === 'function'; if (!functionalReplace) replaceValue = String(replaceValue); var global = rx.global; if (global) { var fullUnicode = rx.unicode; rx.lastIndex = 0; } var results = []; while (true) { var result = regExpExec(rx, S); if (result === null) break; results.push(result); if (!global) break; var matchStr = String(result[0]); if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); } var accumulatedResult = ''; var nextSourcePosition = 0; for (var i = 0; i < results.length; i++) { result = results[i]; var matched = String(result[0]); var position = max(min(toInteger(result.index), S.length), 0); var captures = []; // NOTE: This is equivalent to // captures = result.slice(1).map(maybeToString) // but for some reason `nativeSlice.call(result, 1, result.length)` (called in // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); var namedCaptures = result.groups; if (functionalReplace) { var replacerArgs = [matched].concat(captures, position, S); if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); var replacement = String(replaceValue.apply(undefined, replacerArgs)); } else { replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); } if (position >= nextSourcePosition) { accumulatedResult += S.slice(nextSourcePosition, position) + replacement; nextSourcePosition = position + matched.length; } } return accumulatedResult + S.slice(nextSourcePosition); } ]; // https://tc39.github.io/ecma262/#sec-getsubstitution function getSubstitution(matched, str, position, captures, namedCaptures, replacement) { var tailPos = position + matched.length; var m = captures.length; var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; if (namedCaptures !== undefined) { namedCaptures = toObject(namedCaptures); symbols = SUBSTITUTION_SYMBOLS; } return $replace.call(replacement, symbols, function (match, ch) { var capture; switch (ch.charAt(0)) { case '$': return '$'; case '&': return matched; case '`': return str.slice(0, position); case "'": return str.slice(tailPos); case '<': capture = namedCaptures[ch.slice(1, -1)]; break; default: // \d\d? var n = +ch; if (n === 0) return match; if (n > m) { var f = floor(n / 10); if (f === 0) return match; if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); return match; } capture = captures[n - 1]; } return capture === undefined ? '' : capture; }); } }); },{"./_advance-string-index":3,"./_an-object":4,"./_fix-re-wks":22,"./_regexp-exec-abstract":59,"./_to-integer":73,"./_to-length":75,"./_to-object":76}],96:[function(require,module,exports){ 'use strict'; var isRegExp = require('./_is-regexp'); var anObject = require('./_an-object'); var speciesConstructor = require('./_species-constructor'); var advanceStringIndex = require('./_advance-string-index'); var toLength = require('./_to-length'); var callRegExpExec = require('./_regexp-exec-abstract'); var regexpExec = require('./_regexp-exec'); var fails = require('./_fails'); var $min = Math.min; var $push = [].push; var $SPLIT = 'split'; var LENGTH = 'length'; var LAST_INDEX = 'lastIndex'; var MAX_UINT32 = 0xffffffff; // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError var SUPPORTS_Y = !fails(function () { RegExp(MAX_UINT32, 'y'); }); // @@split logic require('./_fix-re-wks')('split', 2, function (defined, SPLIT, $split, maybeCallNative) { var internalSplit; if ( 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || '.'[$SPLIT](/()()/)[LENGTH] > 1 || ''[$SPLIT](/.?/)[LENGTH] ) { // based on es5-shim implementation, need to rework it internalSplit = function (separator, limit) { var string = String(this); if (separator === undefined && limit === 0) return []; // If `separator` is not a regex, use native split if (!isRegExp(separator)) return $split.call(string, separator, limit); var output = []; var flags = (separator.ignoreCase ? 'i' : '') + (separator.multiline ? 'm' : '') + (separator.unicode ? 'u' : '') + (separator.sticky ? 'y' : ''); var lastLastIndex = 0; var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0; // Make `global` and avoid `lastIndex` issues by working with a copy var separatorCopy = new RegExp(separator.source, flags + 'g'); var match, lastIndex, lastLength; while (match = regexpExec.call(separatorCopy, string)) { lastIndex = separatorCopy[LAST_INDEX]; if (lastIndex > lastLastIndex) { output.push(string.slice(lastLastIndex, match.index)); if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1)); lastLength = match[0][LENGTH]; lastLastIndex = lastIndex; if (output[LENGTH] >= splitLimit) break; } if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop } if (lastLastIndex === string[LENGTH]) { if (lastLength || !separatorCopy.test('')) output.push(''); } else output.push(string.slice(lastLastIndex)); return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; }; // Chakra, V8 } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) { internalSplit = function (separator, limit) { return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit); }; } else { internalSplit = $split; } return [ // `String.prototype.split` method // https://tc39.github.io/ecma262/#sec-string.prototype.split function split(separator, limit) { var O = defined(this); var splitter = separator == undefined ? undefined : separator[SPLIT]; return splitter !== undefined ? splitter.call(separator, O, limit) : internalSplit.call(String(O), separator, limit); }, // `RegExp.prototype[@@split]` method // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split // // NOTE: This cannot be properly polyfilled in engines that don't support // the 'y' flag. function (regexp, limit) { var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split); if (res.done) return res.value; var rx = anObject(regexp); var S = String(this); var C = speciesConstructor(rx, RegExp); var unicodeMatching = rx.unicode; var flags = (rx.ignoreCase ? 'i' : '') + (rx.multiline ? 'm' : '') + (rx.unicode ? 'u' : '') + (SUPPORTS_Y ? 'y' : 'g'); // ^(? + rx + ) is needed, in combination with some S slicing, to // simulate the 'y' flag. var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; if (lim === 0) return []; if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; var p = 0; var q = 0; var A = []; while (q < S.length) { splitter.lastIndex = SUPPORTS_Y ? q : 0; var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q)); var e; if ( z === null || (e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p ) { q = advanceStringIndex(S, q, unicodeMatching); } else { A.push(S.slice(p, q)); if (A.length === lim) return A; for (var i = 1; i <= z.length - 1; i++) { A.push(z[i]); if (A.length === lim) return A; } q = p = e; } } A.push(S.slice(p)); return A; } ]; }); },{"./_advance-string-index":3,"./_an-object":4,"./_fails":21,"./_fix-re-wks":22,"./_is-regexp":35,"./_regexp-exec":60,"./_regexp-exec-abstract":59,"./_species-constructor":66,"./_to-length":75}],97:[function(require,module,exports){ // 21.1.3.7 String.prototype.includes(searchString, position = 0) 'use strict'; var $export = require('./_export'); var context = require('./_string-context'); var INCLUDES = 'includes'; $export($export.P + $export.F * require('./_fails-is-regexp')(INCLUDES), 'String', { includes: function includes(searchString /* , position = 0 */) { return !!~context(this, searchString, INCLUDES) .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); } }); },{"./_export":19,"./_fails-is-regexp":20,"./_string-context":69}],98:[function(require,module,exports){ 'use strict'; var $at = require('./_string-at')(true); // 21.1.3.27 String.prototype[@@iterator]() require('./_iter-define')(String, 'String', function (iterated) { this._t = String(iterated); // target this._i = 0; // next index // 21.1.5.2.1 %StringIteratorPrototype%.next() }, function () { var O = this._t; var index = this._i; var point; if (index >= O.length) return { value: undefined, done: true }; point = $at(O, index); this._i += point.length; return { value: point, done: false }; }); },{"./_iter-define":38,"./_string-at":68}],99:[function(require,module,exports){ 'use strict'; // ECMAScript 6 symbols shim var global = require('./_global'); var has = require('./_has'); var DESCRIPTORS = require('./_descriptors'); var $export = require('./_export'); var redefine = require('./_redefine'); var META = require('./_meta').KEY; var $fails = require('./_fails'); var shared = require('./_shared'); var setToStringTag = require('./_set-to-string-tag'); var uid = require('./_uid'); var wks = require('./_wks'); var wksExt = require('./_wks-ext'); var wksDefine = require('./_wks-define'); var enumKeys = require('./_enum-keys'); var isArray = require('./_is-array'); var anObject = require('./_an-object'); var isObject = require('./_is-object'); var toObject = require('./_to-object'); var toIObject = require('./_to-iobject'); var toPrimitive = require('./_to-primitive'); var createDesc = require('./_property-desc'); var _create = require('./_object-create'); var gOPNExt = require('./_object-gopn-ext'); var $GOPD = require('./_object-gopd'); var $GOPS = require('./_object-gops'); var $DP = require('./_object-dp'); var $keys = require('./_object-keys'); var gOPD = $GOPD.f; var dP = $DP.f; var gOPN = gOPNExt.f; var $Symbol = global.Symbol; var $JSON = global.JSON; var _stringify = $JSON && $JSON.stringify; var PROTOTYPE = 'prototype'; var HIDDEN = wks('_hidden'); var TO_PRIMITIVE = wks('toPrimitive'); var isEnum = {}.propertyIsEnumerable; var SymbolRegistry = shared('symbol-registry'); var AllSymbols = shared('symbols'); var OPSymbols = shared('op-symbols'); var ObjectProto = Object[PROTOTYPE]; var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f; var QObject = global.QObject; // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 var setSymbolDesc = DESCRIPTORS && $fails(function () { return _create(dP({}, 'a', { get: function () { return dP(this, 'a', { value: 7 }).a; } })).a != 7; }) ? function (it, key, D) { var protoDesc = gOPD(ObjectProto, key); if (protoDesc) delete ObjectProto[key]; dP(it, key, D); if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); } : dP; var wrap = function (tag) { var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); sym._k = tag; return sym; }; var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { return typeof it == 'symbol'; } : function (it) { return it instanceof $Symbol; }; var $defineProperty = function defineProperty(it, key, D) { if (it === ObjectProto) $defineProperty(OPSymbols, key, D); anObject(it); key = toPrimitive(key, true); anObject(D); if (has(AllSymbols, key)) { if (!D.enumerable) { if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); it[HIDDEN][key] = true; } else { if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; D = _create(D, { enumerable: createDesc(0, false) }); } return setSymbolDesc(it, key, D); } return dP(it, key, D); }; var $defineProperties = function defineProperties(it, P) { anObject(it); var keys = enumKeys(P = toIObject(P)); var i = 0; var l = keys.length; var key; while (l > i) $defineProperty(it, key = keys[i++], P[key]); return it; }; var $create = function create(it, P) { return P === undefined ? _create(it) : $defineProperties(_create(it), P); }; var $propertyIsEnumerable = function propertyIsEnumerable(key) { var E = isEnum.call(this, key = toPrimitive(key, true)); if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; }; var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { it = toIObject(it); key = toPrimitive(key, true); if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; var D = gOPD(it, key); if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; return D; }; var $getOwnPropertyNames = function getOwnPropertyNames(it) { var names = gOPN(toIObject(it)); var result = []; var i = 0; var key; while (names.length > i) { if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); } return result; }; var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { var IS_OP = it === ObjectProto; var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); var result = []; var i = 0; var key; while (names.length > i) { if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); } return result; }; // 19.4.1.1 Symbol([description]) if (!USE_NATIVE) { $Symbol = function Symbol() { if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); var tag = uid(arguments.length > 0 ? arguments[0] : undefined); var $set = function (value) { if (this === ObjectProto) $set.call(OPSymbols, value); if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; setSymbolDesc(this, tag, createDesc(1, value)); }; if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); return wrap(tag); }; redefine($Symbol[PROTOTYPE], 'toString', function toString() { return this._k; }); $GOPD.f = $getOwnPropertyDescriptor; $DP.f = $defineProperty; require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames; require('./_object-pie').f = $propertyIsEnumerable; $GOPS.f = $getOwnPropertySymbols; if (DESCRIPTORS && !require('./_library')) { redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); } wksExt.f = function (name) { return wrap(wks(name)); }; } $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); for (var es6Symbols = ( // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' ).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { // 19.4.2.1 Symbol.for(key) 'for': function (key) { return has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = $Symbol(key); }, // 19.4.2.5 Symbol.keyFor(sym) keyFor: function keyFor(sym) { if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; }, useSetter: function () { setter = true; }, useSimple: function () { setter = false; } }); $export($export.S + $export.F * !USE_NATIVE, 'Object', { // 19.1.2.2 Object.create(O [, Properties]) create: $create, // 19.1.2.4 Object.defineProperty(O, P, Attributes) defineProperty: $defineProperty, // 19.1.2.3 Object.defineProperties(O, Properties) defineProperties: $defineProperties, // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) getOwnPropertyDescriptor: $getOwnPropertyDescriptor, // 19.1.2.7 Object.getOwnPropertyNames(O) getOwnPropertyNames: $getOwnPropertyNames, // 19.1.2.8 Object.getOwnPropertySymbols(O) getOwnPropertySymbols: $getOwnPropertySymbols }); // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives // https://bugs.chromium.org/p/v8/issues/detail?id=3443 var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); }); $export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', { getOwnPropertySymbols: function getOwnPropertySymbols(it) { return $GOPS.f(toObject(it)); } }); // 24.3.2 JSON.stringify(value [, replacer [, space]]) $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { var S = $Symbol(); // MS Edge converts symbol values to JSON as {} // WebKit converts symbol values to JSON as null // V8 throws on boxed symbols return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; })), 'JSON', { stringify: function stringify(it) { var args = [it]; var i = 1; var replacer, $replacer; while (arguments.length > i) args.push(arguments[i++]); $replacer = replacer = args[1]; if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined if (!isArray(replacer)) replacer = function (key, value) { if (typeof $replacer == 'function') value = $replacer.call(this, key, value); if (!isSymbol(value)) return value; }; args[1] = replacer; return _stringify.apply($JSON, args); } }); // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) $Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); // 19.4.3.5 Symbol.prototype[@@toStringTag] setToStringTag($Symbol, 'Symbol'); // 20.2.1.9 Math[@@toStringTag] setToStringTag(Math, 'Math', true); // 24.3.3 JSON[@@toStringTag] setToStringTag(global.JSON, 'JSON', true); },{"./_an-object":4,"./_descriptors":15,"./_enum-keys":18,"./_export":19,"./_fails":21,"./_global":25,"./_has":26,"./_hide":27,"./_is-array":33,"./_is-object":34,"./_library":42,"./_meta":43,"./_object-create":44,"./_object-dp":45,"./_object-gopd":47,"./_object-gopn":49,"./_object-gopn-ext":48,"./_object-gops":50,"./_object-keys":53,"./_object-pie":54,"./_property-desc":57,"./_redefine":58,"./_set-to-string-tag":63,"./_shared":65,"./_to-iobject":74,"./_to-object":76,"./_to-primitive":77,"./_uid":78,"./_wks":81,"./_wks-define":79,"./_wks-ext":80}],100:[function(require,module,exports){ 'use strict'; // https://github.com/tc39/Array.prototype.includes var $export = require('./_export'); var $includes = require('./_array-includes')(true); $export($export.P, 'Array', { includes: function includes(el /* , fromIndex = 0 */) { return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); } }); require('./_add-to-unscopables')('includes'); },{"./_add-to-unscopables":2,"./_array-includes":5,"./_export":19}],101:[function(require,module,exports){ // https://github.com/tc39/proposal-object-getownpropertydescriptors var $export = require('./_export'); var ownKeys = require('./_own-keys'); var toIObject = require('./_to-iobject'); var gOPD = require('./_object-gopd'); var createProperty = require('./_create-property'); $export($export.S, 'Object', { getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { var O = toIObject(object); var getDesc = gOPD.f; var keys = ownKeys(O); var result = {}; var i = 0; var key, desc; while (keys.length > i) { desc = getDesc(O, key = keys[i++]); if (desc !== undefined) createProperty(result, key, desc); } return result; } }); },{"./_create-property":12,"./_export":19,"./_object-gopd":47,"./_own-keys":56,"./_to-iobject":74}],102:[function(require,module,exports){ var $iterators = require('./es6.array.iterator'); var getKeys = require('./_object-keys'); var redefine = require('./_redefine'); var global = require('./_global'); var hide = require('./_hide'); var Iterators = require('./_iterators'); var wks = require('./_wks'); var ITERATOR = wks('iterator'); var TO_STRING_TAG = wks('toStringTag'); var ArrayValues = Iterators.Array; var DOMIterables = { CSSRuleList: true, // TODO: Not spec compliant, should be false. CSSStyleDeclaration: false, CSSValueList: false, ClientRectList: false, DOMRectList: false, DOMStringList: false, DOMTokenList: true, DataTransferItemList: false, FileList: false, HTMLAllCollection: false, HTMLCollection: false, HTMLFormElement: false, HTMLSelectElement: false, MediaList: true, // TODO: Not spec compliant, should be false. MimeTypeArray: false, NamedNodeMap: false, NodeList: true, PaintRequestList: false, Plugin: false, PluginArray: false, SVGLengthList: false, SVGNumberList: false, SVGPathSegList: false, SVGPointList: false, SVGStringList: false, SVGTransformList: false, SourceBufferList: false, StyleSheetList: true, // TODO: Not spec compliant, should be false. TextTrackCueList: false, TextTrackList: false, TouchList: false }; for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) { var NAME = collections[i]; var explicit = DOMIterables[NAME]; var Collection = global[NAME]; var proto = Collection && Collection.prototype; var key; if (proto) { if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); Iterators[NAME] = ArrayValues; if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true); } } },{"./_global":25,"./_hide":27,"./_iterators":41,"./_object-keys":53,"./_redefine":58,"./_wks":81,"./es6.array.iterator":85}],103:[function(require,module,exports){ "use strict"; require("core-js/modules/es6.symbol.js"); require("core-js/modules/es6.number.constructor.js"); require("core-js/modules/es6.string.iterator.js"); require("core-js/modules/es6.object.to-string.js"); require("core-js/modules/es6.array.iterator.js"); require("core-js/modules/web.dom.iterable.js"); function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } var _require = require('./protocol'), Parser = _require.Parser, PROTOCOL_6 = _require.PROTOCOL_6, PROTOCOL_7 = _require.PROTOCOL_7; var VERSION = "4.0.1"; var Connector = /*#__PURE__*/function () { function Connector(options, WebSocket, Timer, handlers) { var _this = this; _classCallCheck(this, Connector); this.options = options; this.WebSocket = WebSocket; this.Timer = Timer; this.handlers = handlers; var path = this.options.path ? "".concat(this.options.path) : 'livereload'; var port = this.options.port ? ":".concat(this.options.port) : ''; this._uri = "ws".concat(this.options.https ? 's' : '', "://").concat(this.options.host).concat(port, "/").concat(path); this._nextDelay = this.options.mindelay; this._connectionDesired = false; this.protocol = 0; this.protocolParser = new Parser({ connected: function connected(protocol) { _this.protocol = protocol; _this._handshakeTimeout.stop(); _this._nextDelay = _this.options.mindelay; _this._disconnectionReason = 'broken'; return _this.handlers.connected(_this.protocol); }, error: function error(e) { _this.handlers.error(e); return _this._closeOnError(); }, message: function message(_message) { return _this.handlers.message(_message); } }); this._handshakeTimeout = new this.Timer(function () { if (!_this._isSocketConnected()) { return; } _this._disconnectionReason = 'handshake-timeout'; return _this.socket.close(); }); this._reconnectTimer = new this.Timer(function () { if (!_this._connectionDesired) { // shouldn't hit this, but just in case return; } return _this.connect(); }); this.connect(); } _createClass(Connector, [{ key: "_isSocketConnected", value: function _isSocketConnected() { return this.socket && this.socket.readyState === this.WebSocket.OPEN; } }, { key: "connect", value: function connect() { var _this2 = this; this._connectionDesired = true; if (this._isSocketConnected()) { return; } // prepare for a new connection this._reconnectTimer.stop(); this._disconnectionReason = 'cannot-connect'; this.protocolParser.reset(); this.handlers.connecting(); this.socket = new this.WebSocket(this._uri); this.socket.onopen = function (e) { return _this2._onopen(e); }; this.socket.onclose = function (e) { return _this2._onclose(e); }; this.socket.onmessage = function (e) { return _this2._onmessage(e); }; this.socket.onerror = function (e) { return _this2._onerror(e); }; } }, { key: "disconnect", value: function disconnect() { this._connectionDesired = false; this._reconnectTimer.stop(); // in case it was running if (!this._isSocketConnected()) { return; } this._disconnectionReason = 'manual'; return this.socket.close(); } }, { key: "_scheduleReconnection", value: function _scheduleReconnection() { if (!this._connectionDesired) { // don't reconnect after manual disconnection return; } if (!this._reconnectTimer.running) { this._reconnectTimer.start(this._nextDelay); this._nextDelay = Math.min(this.options.maxdelay, this._nextDelay * 2); } } }, { key: "sendCommand", value: function sendCommand(command) { if (!this.protocol) { return; } return this._sendCommand(command); } }, { key: "_sendCommand", value: function _sendCommand(command) { return this.socket.send(JSON.stringify(command)); } }, { key: "_closeOnError", value: function _closeOnError() { this._handshakeTimeout.stop(); this._disconnectionReason = 'error'; return this.socket.close(); } }, { key: "_onopen", value: function _onopen(e) { this.handlers.socketConnected(); this._disconnectionReason = 'handshake-failed'; // start handshake var hello = { command: 'hello', protocols: [PROTOCOL_6, PROTOCOL_7] }; hello.ver = VERSION; if (this.options.ext) { hello.ext = this.options.ext; } if (this.options.extver) { hello.extver = this.options.extver; } if (this.options.snipver) { hello.snipver = this.options.snipver; } this._sendCommand(hello); return this._handshakeTimeout.start(this.options.handshake_timeout); } }, { key: "_onclose", value: function _onclose(e) { this.protocol = 0; this.handlers.disconnected(this._disconnectionReason, this._nextDelay); return this._scheduleReconnection(); } }, { key: "_onerror", value: function _onerror(e) {} }, { key: "_onmessage", value: function _onmessage(e) { return this.protocolParser.process(e.data); } }]); return Connector; }(); ; exports.Connector = Connector; },{"./protocol":108,"core-js/modules/es6.array.iterator.js":85,"core-js/modules/es6.number.constructor.js":88,"core-js/modules/es6.object.to-string.js":91,"core-js/modules/es6.string.iterator.js":98,"core-js/modules/es6.symbol.js":99,"core-js/modules/web.dom.iterable.js":102}],104:[function(require,module,exports){ "use strict"; var CustomEvents = { bind: function bind(element, eventName, handler) { if (element.addEventListener) { return element.addEventListener(eventName, handler, false); } if (element.attachEvent) { element[eventName] = 1; return element.attachEvent('onpropertychange', function (event) { if (event.propertyName === eventName) { return handler(); } }); } throw new Error("Attempt to attach custom event ".concat(eventName, " to something which isn't a DOMElement")); }, fire: function fire(element, eventName) { if (element.addEventListener) { var event = document.createEvent('HTMLEvents'); event.initEvent(eventName, true, true); return document.dispatchEvent(event); } else if (element.attachEvent) { if (element[eventName]) { return element[eventName]++; } } else { throw new Error("Attempt to fire custom event ".concat(eventName, " on something which isn't a DOMElement")); } } }; exports.bind = CustomEvents.bind; exports.fire = CustomEvents.fire; },{}],105:[function(require,module,exports){ "use strict"; require("core-js/modules/es6.regexp.match.js"); require("core-js/modules/es6.symbol.js"); require("core-js/modules/es6.array.from.js"); require("core-js/modules/es6.string.iterator.js"); require("core-js/modules/es6.object.to-string.js"); require("core-js/modules/es6.array.iterator.js"); require("core-js/modules/web.dom.iterable.js"); require("core-js/modules/es6.number.constructor.js"); function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } var LessPlugin = /*#__PURE__*/function () { function LessPlugin(window, host) { _classCallCheck(this, LessPlugin); this.window = window; this.host = host; } _createClass(LessPlugin, [{ key: "reload", value: function reload(path, options) { if (this.window.less && this.window.less.refresh) { if (path.match(/\.less$/i)) { return this.reloadLess(path); } if (options.originalPath.match(/\.less$/i)) { return this.reloadLess(options.originalPath); } } return false; } }, { key: "reloadLess", value: function reloadLess(path) { var link; var links = function () { var result = []; for (var _i = 0, _Array$from = Array.from(document.getElementsByTagName('link')); _i < _Array$from.length; _i++) { link = _Array$from[_i]; if (link.href && link.rel.match(/^stylesheet\/less$/i) || link.rel.match(/stylesheet/i) && link.type.match(/^text\/(x-)?less$/i)) { result.push(link); } } return result; }(); if (links.length === 0) { return false; } for (var _i2 = 0, _Array$from2 = Array.from(links); _i2 < _Array$from2.length; _i2++) { link = _Array$from2[_i2]; link.href = this.host.generateCacheBustUrl(link.href); } this.host.console.log('LiveReload is asking LESS to recompile all stylesheets'); this.window.less.refresh(true); return true; } }, { key: "analyze", value: function analyze() { return { disable: !!(this.window.less && this.window.less.refresh) }; } }]); return LessPlugin; }(); ; LessPlugin.identifier = 'less'; LessPlugin.version = '1.0'; module.exports = LessPlugin; },{"core-js/modules/es6.array.from.js":84,"core-js/modules/es6.array.iterator.js":85,"core-js/modules/es6.number.constructor.js":88,"core-js/modules/es6.object.to-string.js":91,"core-js/modules/es6.regexp.match.js":94,"core-js/modules/es6.string.iterator.js":98,"core-js/modules/es6.symbol.js":99,"core-js/modules/web.dom.iterable.js":102}],106:[function(require,module,exports){ "use strict"; require("core-js/modules/es6.symbol.js"); require("core-js/modules/es6.number.constructor.js"); require("core-js/modules/es6.array.slice.js"); require("core-js/modules/es6.object.to-string.js"); require("core-js/modules/es6.array.from.js"); require("core-js/modules/es6.string.iterator.js"); require("core-js/modules/es6.array.iterator.js"); require("core-js/modules/web.dom.iterable.js"); function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } require("core-js/modules/es6.regexp.match.js"); require("core-js/modules/es6.object.keys.js"); function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /* global alert */ var _require = require('./connector'), Connector = _require.Connector; var _require2 = require('./timer'), Timer = _require2.Timer; var _require3 = require('./options'), Options = _require3.Options; var _require4 = require('./reloader'), Reloader = _require4.Reloader; var _require5 = require('./protocol'), ProtocolError = _require5.ProtocolError; var LiveReload = /*#__PURE__*/function () { function LiveReload(window) { var _this = this; _classCallCheck(this, LiveReload); this.window = window; this.listeners = {}; this.plugins = []; this.pluginIdentifiers = {}; // i can haz console? this.console = this.window.console && this.window.console.log && this.window.console.error ? this.window.location.href.match(/LR-verbose/) ? this.window.console : { log: function log() {}, error: this.window.console.error.bind(this.window.console) } : { log: function log() {}, error: function error() {} }; // i can haz sockets? if (!(this.WebSocket = this.window.WebSocket || this.window.MozWebSocket)) { this.console.error('LiveReload disabled because the browser does not seem to support web sockets'); return; } // i can haz options? if ('LiveReloadOptions' in window) { this.options = new Options(); for (var _i = 0, _Object$keys = Object.keys(window.LiveReloadOptions || {}); _i < _Object$keys.length; _i++) { var k = _Object$keys[_i]; var v = window.LiveReloadOptions[k]; this.options.set(k, v); } } else { this.options = Options.extract(this.window.document); if (!this.options) { this.console.error('LiveReload disabled because it could not find its own