CasperSecurity
o
_�KjN � @ s� d dl mZ d dlZd dlZd dlmZ ddlmZ ddl m
Z
ddlmZ ddl
mZ dd l
mZ dd
lmZ ejrAddlmZ G dd
� d
e�ZdS )� )�annotationsN)� timedelta� )�AppGroup)�current_app)�send_from_directory)� Blueprint)�BlueprintSetupState)� _sentinel)�Responsec sP e Zd Zdddddddefd!� fdd�
Zd"dd�Zd#dd�Zd$d%dd �Z� ZS )&r N�name�str�import_name�
static_folder�str | os.PathLike[str] | None�static_url_path�
str | None�template_folder�
url_prefix� subdomain�url_defaults�dict[str, t.Any] | None� root_path� cli_group�return�Nonec s4 t � �||||||||| |
�
t� | _| j| j_d S )N)�super�__init__r �clir )�selfr r r r r r r r r r �� __class__� �C/opt/hikvison/venv/lib/python3.10/site-packages/flask/blueprints.pyr s
�zBlueprint.__init__�filename�
int | Nonec C s0 t jd }|du rdS t|t�rt|�� �S |S )an Used by :func:`send_file` to determine the ``max_age`` cache
value for a given file path if it wasn't passed.
By default, this returns :data:`SEND_FILE_MAX_AGE_DEFAULT` from
the configuration of :data:`~flask.current_app`. This defaults
to ``None``, which tells the browser to use conditional requests
instead of a timed cache, which is usually preferable.
Note this is a duplicate of the same method in the Flask
class.
.. versionchanged:: 2.0
The default configuration is ``None`` instead of 12 hours.
.. versionadded:: 0.9
�SEND_FILE_MAX_AGE_DEFAULTN)r �config�
isinstancer �int�
total_seconds)r r$ �valuer"