HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberCP/lib/python3.10/site-packages/fastapi/openapi/__pycache__/docs.cpython-310.pyc
o

�hl(�@s�UddlZddlmZmZmZddlmZddlmZddl	m
Z
mZdddddd	�Ze
ee
efed
�fed<dd
ddddd�de
e
ed�fde
e
ed�fde
e
ed�fde
e
ed�fde
e
ed�fde
ee
ed�fde
eee
efed�fde
eee
efed�fd efd!d"�Zd#ddd$�de
e
ed%�fde
e
ed�fd&e
e
ed'�fd(e
e
ed�fd)e
eed*�fd efd+d,�Zd efd-d.�ZdS)/�N)�Any�Dict�Optional)�jsonable_encoder��HTMLResponse)�	Annotated�Docz#swagger-ui�
BaseLayoutT)�dom_id�layout�deepLinking�showExtensions�showCommonExtensionsz�
        Default configurations for Swagger UI.

        You can use it as a template to add any other configurations needed.
        �swagger_ui_default_parameterszChttps://cdn.jsdelivr.net/npm/swagger-ui-dist@5/swagger-ui-bundle.jsz=https://cdn.jsdelivr.net/npm/swagger-ui-dist@5/swagger-ui.cssz,https://fastapi.tiangolo.com/img/favicon.png)�swagger_js_url�swagger_css_url�swagger_favicon_url�oauth2_redirect_url�
init_oauth�swagger_ui_parameters�openapi_urlz�
            The OpenAPI URL that Swagger UI should load and use.

            This is normally done automatically by FastAPI using the default URL
            `/openapi.json`.
            �titlezX
            The HTML `<title>` content, normally shown in the browser tab.
            rzy
            The URL to use to load the Swagger UI JavaScript.

            It is normally set to a CDN URL.
            rzr
            The URL to use to load the Swagger UI CSS.

            It is normally set to a CDN URL.
            rza
            The URL of the favicon to use. It is normally shown in the browser tab.
            rzc
            The OAuth2 redirect URL, it is normally automatically handled by FastAPI.
            rz\
            A dictionary with Swagger UI OAuth2 initialization configurations.
            rz�
            Configuration parameters for Swagger UI.

            It defaults to [swagger_ui_default_parameters][fastapi.openapi.docs.swagger_ui_default_parameters].
            �returncCs�t��}|r|�|�d|�d|�d|�d|�d|�d�}	|��D]\}
}|	t�|
��dt�t|���d�7}	q!|rB|	d	|�d
�7}	|	d7}	|rU|	dt�t|���d
�7}	|	d7}	t|	�S)a)
    Generate and return the HTML  that loads Swagger UI for the interactive
    API docs (normally served at `/docs`).

    You would only call this function yourself if you needed to override some parts,
    for example the URLs to use to load Swagger UI's JavaScript and CSS.

    Read more about it in the
    [FastAPI docs for Configure Swagger UI](https://fastapi.tiangolo.com/how-to/configure-swagger-ui/)
    and the [FastAPI docs for Custom Docs UI Static Assets (Self-Hosting)](https://fastapi.tiangolo.com/how-to/custom-docs-ui-assets/).
    z\
    <!DOCTYPE html>
    <html>
    <head>
    <link type="text/css" rel="stylesheet" href="z'">
    <link rel="shortcut icon" href="z">
    <title>zV</title>
    </head>
    <body>
    <div id="swagger-ui">
    </div>
    <script src="z�"></script>
    <!-- `SwaggerUIBundle` is now available on the page -->
    <script>
    const ui = SwaggerUIBundle({
        url: 'z',
    z: z,
z-oauth2RedirectUrl: window.location.origin + 'z',zy
    presets: [
        SwaggerUIBundle.presets.apis,
        SwaggerUIBundle.SwaggerUIStandalonePreset
        ],
    })z
        ui.initOAuth(z
)
        z+
    </script>
    </body>
    </html>
    )r�copy�update�items�json�dumpsrr)rrrrrrrr�current_swagger_ui_parameters�html�key�value�r#�G/usr/local/CyberCP/lib/python3.10/site-packages/fastapi/openapi/docs.py�get_swagger_ui_htmls2W
�����&
�r%zChttps://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js)�redoc_js_url�redoc_favicon_url�with_google_fontsz�
            The OpenAPI URL that ReDoc should load and use.

            This is normally done automatically by FastAPI using the default URL
            `/openapi.json`.
            r&zt
            The URL to use to load the ReDoc JavaScript.

            It is normally set to a CDN URL.
            r'r(z4
            Load and use Google Fonts.
            cCs<d|�d�}|r|d7}|d|�d|�d|�d�7}t|�S)a�
    Generate and return the HTML response that loads ReDoc for the alternative
    API docs (normally served at `/redoc`).

    You would only call this function yourself if you needed to override some parts,
    for example the URLs to use to load ReDoc's JavaScript and CSS.

    Read more about it in the
    [FastAPI docs for Custom Docs UI Static Assets (Self-Hosting)](https://fastapi.tiangolo.com/how-to/custom-docs-ui-assets/).
    z6
    <!DOCTYPE html>
    <html>
    <head>
    <title>z�</title>
    <!-- needed for adaptive design -->
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    zz
    <link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
    z%
    <link rel="shortcut icon" href="a<">
    <!--
    ReDoc doesn't change outer page styles
    -->
    <style>
      body {
        margin: 0;
        padding: 0;
      }
    </style>
    </head>
    <body>
    <noscript>
        ReDoc requires Javascript to function. Please enable it to browse the documentation.
    </noscript>
    <redoc spec-url="z"></redoc>
    <script src="z)"> </script>
    </body>
    </html>
    r)rrr&r'r(r r#r#r$�get_redoc_html�s:�	��
�r)cCsd}t|d�S)z�
    Generate the HTML response with the OAuth2 redirection for Swagger UI.

    You normally don't need to use or change this.
    a�
    <!doctype html>
    <html lang="en-US">
    <head>
        <title>Swagger UI: OAuth2 Redirect</title>
    </head>
    <body>
    <script>
        'use strict';
        function run () {
            var oauth2 = window.opener.swaggerUIRedirectOauth2;
            var sentState = oauth2.state;
            var redirectUrl = oauth2.redirectUrl;
            var isValid, qp, arr;

            if (/code|token|error/.test(window.location.hash)) {
                qp = window.location.hash.substring(1).replace('?', '&');
            } else {
                qp = location.search.substring(1);
            }

            arr = qp.split("&");
            arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';});
            qp = qp ? JSON.parse('{' + arr.join() + '}',
                    function (key, value) {
                        return key === "" ? value : decodeURIComponent(value);
                    }
            ) : {};

            isValid = qp.state === sentState;

            if ((
              oauth2.auth.schema.get("flow") === "accessCode" ||
              oauth2.auth.schema.get("flow") === "authorizationCode" ||
              oauth2.auth.schema.get("flow") === "authorization_code"
            ) && !oauth2.auth.code) {
                if (!isValid) {
                    oauth2.errCb({
                        authId: oauth2.auth.name,
                        source: "auth",
                        level: "warning",
                        message: "Authorization may be unsafe, passed state was changed in server. The passed state wasn't returned from auth server."
                    });
                }

                if (qp.code) {
                    delete oauth2.state;
                    oauth2.auth.code = qp.code;
                    oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
                } else {
                    let oauthErrorMsg;
                    if (qp.error) {
                        oauthErrorMsg = "["+qp.error+"]: " +
                            (qp.error_description ? qp.error_description+ ". " : "no accessCode received from the server. ") +
                            (qp.error_uri ? "More info: "+qp.error_uri : "");
                    }

                    oauth2.errCb({
                        authId: oauth2.auth.name,
                        source: "auth",
                        level: "error",
                        message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server."
                    });
                }
            } else {
                oauth2.callback({auth: oauth2.auth, token: qp, isValid: isValid, redirectUrl: redirectUrl});
            }
            window.close();
        }

        if (document.readyState !== 'loading') {
            run();
        } else {
            document.addEventListener('DOMContentLoaded', function () {
                run();
            });
        }
    </script>
    </body>
    </html>
        )�contentr)r r#r#r$�#get_swagger_ui_oauth2_redirect_htmls
Qr+)r�typingrrr�fastapi.encodersr�starlette.responsesr�typing_extensionsrr	r�str�__annotations__r%�boolr)r+r#r#r#r$�<module>s
��
���0

�����
������������)����1����9����A����K
�&�����
������������'����/
�_