commit caad53d7d1df86fa59a60665d5a72b5bf9e558f7 Author: casjay Date: Tue Aug 27 09:44:41 2024 -0400 🦈🏠🐜❗ Initial Commit ❗🐜🦈🏠 diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..71c00b7 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,17 @@ +# Files to ignore +# Tell docker to ignore .gitkeep +.gitkeep +# Tell docker to ignore .gitignore +.gitignore +# Tell docker to ignore node_modules/** +node_modules/** +# Tell docker to ignore .node_modules/** +.node_modules/** +# Tell docker to ignore **/.gitkeep +**/.gitkeep +# Tell docker to ignore **/.gitignore +**/.gitignore +# Tell docker to ignore **/node_modules/** +**/node_modules/** +# Tell docker to ignore **/.node_modules/** +**/.node_modules/** diff --git a/.env.scripts b/.env.scripts new file mode 100644 index 0000000..e351fba --- /dev/null +++ b/.env.scripts @@ -0,0 +1,58 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +##@Version : 202408270903-git +# @@Author : CasjaysDev +# @@Contact : CasjaysDev +# @@License : MIT +# @@Copyright : Copyright 2024 CasjaysDev +# @@Created : Tue Aug 27 09:03:20 AM EDT 2024 +# @@File : .env.scripts +# @@Description : Variables for gen-dockerfile and buildx scripts +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# entrypoint Settings +DOCKER_ENTYPOINT_PORTS_WEB="${DOCKER_ENTYPOINT_PORTS_WEB}" +DOCKER_ENTYPOINT_PORTS_SRV="${DOCKER_ENTYPOINT_PORTS_SRV}" +DOCKER_ENTYPOINT_HEALTH_APPS="$DOCKER_ENTYPOINT_HEALTH_APPS" +DOCKER_ENTYPOINT_HEALTH_ENDPOINTS="$DOCKER_ENTYPOINT_HEALTH_ENDPOINTS" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Dockerfile info +ENV_DOCKERFILE="Dockerfile" +ENV_IMAGE_NAME="bind" +ENV_USE_TEMPLATE="alpine" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Maintainer info +ENV_ORG_NAME="casjaysdevdocker" +ENV_VENDOR="CasjaysDev" +ENV_AUTHOR="CasjaysDev" +ENV_MAINTAINER="CasjaysDev " +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# REPO info +ENV_GIT_REPO_URL="https://github.com/casjaysdevdocker/bind" +ENV_REGISTRY_URL="https://hub.docker.com/r/casjaysdevdocker/bind" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Push image info +ENV_IMAGE_PUSH="casjaysdevdocker/bind" +ENV_IMAGE_TAG="latest" +ENV_ADD_TAGS="" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Pull image info +ENV_PULL_URL="casjaysdev/alpine" +ENV_DISTRO_TAG="${IMAGE_VERSION}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Env +SERVICE_PORT="80" +EXPOSE_PORTS="53/tcp 53/udp" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Versions +PHP_VERSION="php82" +NODE_VERSION="system" +NODE_MANAGER="system" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Default directories +WWW_ROOT_DIR="/usr/share/httpd/default" +DEFAULT_FILE_DIR="/usr/local/share/template-files" +DEFAULT_DATA_DIR="/usr/local/share/template-files/data" +DEFAULT_CONF_DIR="/usr/local/share/template-files/config" +DEFAULT_TEMPLATE_DIR="/usr/local/share/template-files/defaults" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +ENV_PACKAGES="bind bind-tools bind-dnssec-root bind-plugins nginx \${PHP_VERSION}-fpm" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..39bbb67 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,86 @@ +# Template generated on Fri May 10 12:52:12 PM EDT 2024 from https://github.com/alexkaratarakis/gitattributes" +# Common settings that generally should always be used with your language specific settings +# Auto detect text files and perform LF normalization +* text=auto +# The above will handle all files NOT found below +# Documents +*.bibtex text diff=bibtex +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain +*.md text diff=markdown +*.mdx text diff=markdown +*.tex text diff=tex +*.adoc text +*.textile text +*.mustache text +*.csv text eol=crlf +*.tab text +*.tsv text +*.txt text +*.sql text +*.epub diff=astextplain +# Graphics +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.tif binary +*.tiff binary +*.ico binary +# SVG treated as text by default. +*.svg text +# If you want to treat it as binary, +# use the following line instead. +# *.svg binary +*.eps binary +# Scripts +*.bash text eol=lf +*.fish text eol=lf +*.ksh text eol=lf +*.sh text eol=lf +*.zsh text eol=lf +# These are explicitly windows files and should use crlf +*.bat text eol=crlf +*.cmd text eol=crlf +*.ps1 text eol=crlf +# Serialisation +*.json text +*.toml text +*.xml text +*.yaml text +*.yml text +# Archives +*.7z binary +*.bz binary +*.bz2 binary +*.bzip2 binary +*.gz binary +*.lz binary +*.lzma binary +*.rar binary +*.tar binary +*.taz binary +*.tbz binary +*.tbz2 binary +*.tgz binary +*.tlz binary +*.txz binary +*.xz binary +*.Z binary +*.zip binary +*.zst binary +# Text files where line endings should be preserved +*.patch -text +# Exclude files from exporting +.gitattributes export-ignore +.gitignore export-ignore +.gitkeep export-ignore + diff --git a/.gitea/workflows/docker.yaml b/.gitea/workflows/docker.yaml new file mode 100644 index 0000000..50518eb --- /dev/null +++ b/.gitea/workflows/docker.yaml @@ -0,0 +1,49 @@ +name: release-tag + +on: push + +jobs: + release-image: + runs-on: ubuntu-latest + container: + image: catthehacker/ubuntu:act-latest + env: + RUNNER_TOOL_CACHE: /toolcache + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Get Meta + id: meta + run: | + echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT + echo DOCKER_ORG=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $1}') >> $GITHUB_OUTPUT + echo DOCKER_TAG=$([ -n "$DOCKER_TAG" ] && echo ${DOCKER_TAG} || echo "latest") >> $GITHUB_OUTPUT + echo DOCKER_HUB=$([ -n "$DOCKER_HUB" ] && echo ${DOCKER_HUB} || echo "docker.io") >> $GITHUB_OUTPUT + echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}' | sed 's|^docker-||g') >> $GITHUB_OUTPUT + echo "$DOCKER_HUB/$DOCKER_ORG/$REPO_NAME:$DOCKER_TAG" + + - name: Set up Docker BuildX + uses: docker/setup-buildx-action@v2 + + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + password: ${{ secrets.DOCKER_TOKEN }} + username: ${{ secrets.DOCKER_USERNAME }} + registry: ${{ steps.meta.outputs.DOCKER_HUB }} + + - name: Build and push + uses: docker/build-push-action@v4 + with: + context: . + file: ./Dockerfile + platforms: | + linux/amd64 + linux/arm64 + push: true + tags: | # replace it with your local IP and tags + ${{ steps.meta.outputs.DOCKER_HUB }}/${{ steps.meta.outputs.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.DOCKER_TAG }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..01c8afc --- /dev/null +++ b/.gitignore @@ -0,0 +1,98 @@ +# gitignore created on 08/27/24 at 09:03 +# Disable reminder in prompt +ignoredirmessage + +# OS generated files +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### macOS ### +# General +.DS_Store? +.AppleDouble +.LSOverride + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### macOS Patch ### +# iCloud generated files +*.icloud + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# misc +!*/README* +!inc/main.bash + +# Windows shortcuts +*.lnk + +# ignore commit message +**/.gitcommit + +# ignore .build_failed files +**/.build_failed* + + +# ignore .bak files +**/*.bak + +# ignore .no_push files +**/.no_push + +# ignore .no_git files +**/.no_git + +# ignore .installed files +**/.installed + diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..c76e83f --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,13 @@ + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2024 casjay + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 1. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/README.md b/README.md new file mode 100644 index 0000000..6d9bd34 --- /dev/null +++ b/README.md @@ -0,0 +1,78 @@ +## 👋 Welcome to bind 🚀 + +bind README + + +## Install my system scripts + +```shell + sudo bash -c "$(curl -q -LSsf "https://github.com/systemmgr/installer/raw/main/install.sh")" + sudo systemmgr --config && sudo systemmgr install scripts +``` + +## Automatic install/update + +```shell +dockermgr update bind +``` + +## Install and run container + +```shell +mkdir -p "$HOME/.local/share/srv/docker/bind/rootfs" +git clone "https://github.com/dockermgr/bind" "$HOME/.local/share/CasjaysDev/dockermgr/bind" +cp -Rfva "$HOME/.local/share/CasjaysDev/dockermgr/bind/rootfs/." "$HOME/.local/share/srv/docker/bind/rootfs/" +docker run -d \ +--restart always \ +--privileged \ +--name casjaysdevdocker-bind \ +--hostname bind \ +-e TZ=${TIMEZONE:-America/New_York} \ +-v "$HOME/.local/share/srv/docker/casjaysdevdocker-bind/rootfs/data:/data:z" \ +-v "$HOME/.local/share/srv/docker/casjaysdevdocker-bind/rootfs/config:/config:z" \ +-p 80:80 \ +casjaysdevdocker/bind:latest +``` + +## via docker-compose + +```yaml +version: "2" +services: + ProjectName: + image: casjaysdevdocker/bind + container_name: casjaysdevdocker-bind + environment: + - TZ=America/New_York + - HOSTNAME=bind + volumes: + - "$HOME/.local/share/srv/docker/casjaysdevdocker-bind/rootfs/data:/data:z" + - "$HOME/.local/share/srv/docker/casjaysdevdocker-bind/rootfs/config:/config:z" + ports: + - 80:80 + restart: always +``` + +## Get source files + +```shell +dockermgr download src casjaysdevdocker/bind +``` + +OR + +```shell +git clone "https://github.com/casjaysdevdocker/bind" "$HOME/Projects/github/casjaysdevdocker/bind" +``` + +## Build container + +```shell +cd "$HOME/Projects/github/casjaysdevdocker/bind" +buildx +``` + +## Authors + +🤖 casjay: [Github](https://github.com/casjay) 🤖 +⛵ casjaysdevdocker: [Github](https://github.com/casjaysdevdocker) [Docker](https://hub.docker.com/u/casjaysdevdocker) ⛵ diff --git a/rootfs/root/docker/setup/00-init.sh b/rootfs/root/docker/setup/00-init.sh new file mode 100755 index 0000000..57ac568 --- /dev/null +++ b/rootfs/root/docker/setup/00-init.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +##@Version : 202408270903-git +# @@Author : CasjaysDev +# @@Contact : CasjaysDev +# @@License : MIT +# @@ReadME : +# @@Copyright : Copyright 2023 CasjaysDev +# @@Created : Mon Aug 28 06:48:42 PM EDT 2023 +# @@File : 00-init.sh +# @@Description : script to run init +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# shellcheck shell=bash +# shellcheck disable=SC2016 +# shellcheck disable=SC2031 +# shellcheck disable=SC2120 +# shellcheck disable=SC2155 +# shellcheck disable=SC2199 +# shellcheck disable=SC2317 +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set bash options +set -o pipefail +[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -x$DEBUGGER_OPTIONS +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set env variables +exitCode=0 + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Predifined actions +[ -d "/usr/local/share/template-files/data" ] && rm -Rf "/usr/local/share/template-files/data"/* +[ -d "/usr/local/share/template-files/config" ] && rm -Rf "/usr/local/share/template-files/config"/* +[ -d "/usr/local/share/template-files/defaults" ] && rm -Rf "/usr/local/share/template-files/defaults"/* +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Main script + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set the exit code +exitCode=$? +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +exit $exitCode diff --git a/rootfs/root/docker/setup/01-system.sh b/rootfs/root/docker/setup/01-system.sh new file mode 100755 index 0000000..8079fc4 --- /dev/null +++ b/rootfs/root/docker/setup/01-system.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +##@Version : 202408270903-git +# @@Author : CasjaysDev +# @@Contact : CasjaysDev +# @@License : MIT +# @@ReadME : +# @@Copyright : Copyright 2023 CasjaysDev +# @@Created : Mon Aug 28 06:48:42 PM EDT 2023 +# @@File : 01-system.sh +# @@Description : script to run system +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# shellcheck shell=bash +# shellcheck disable=SC2016 +# shellcheck disable=SC2031 +# shellcheck disable=SC2120 +# shellcheck disable=SC2155 +# shellcheck disable=SC2199 +# shellcheck disable=SC2317 +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set bash options +set -o pipefail +[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -x$DEBUGGER_OPTIONS +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set env variables +exitCode=0 + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Predifined actions + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Main script + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set the exit code +exitCode=$? +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +exit $exitCode diff --git a/rootfs/root/docker/setup/02-packages.sh b/rootfs/root/docker/setup/02-packages.sh new file mode 100755 index 0000000..8300666 --- /dev/null +++ b/rootfs/root/docker/setup/02-packages.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +##@Version : 202408270903-git +# @@Author : CasjaysDev +# @@Contact : CasjaysDev +# @@License : MIT +# @@ReadME : +# @@Copyright : Copyright 2023 CasjaysDev +# @@Created : Mon Aug 28 06:48:42 PM EDT 2023 +# @@File : 02-packages.sh +# @@Description : script to run packages +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# shellcheck shell=bash +# shellcheck disable=SC2016 +# shellcheck disable=SC2031 +# shellcheck disable=SC2120 +# shellcheck disable=SC2155 +# shellcheck disable=SC2199 +# shellcheck disable=SC2317 +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set bash options +set -o pipefail +[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -x$DEBUGGER_OPTIONS +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set env variables +exitCode=0 + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Predifined actions + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Main script + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set the exit code +exitCode=$? +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +exit $exitCode diff --git a/rootfs/root/docker/setup/03-files.sh b/rootfs/root/docker/setup/03-files.sh new file mode 100755 index 0000000..a51cc62 --- /dev/null +++ b/rootfs/root/docker/setup/03-files.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +##@Version : 202408270903-git +# @@Author : CasjaysDev +# @@Contact : CasjaysDev +# @@License : MIT +# @@ReadME : +# @@Copyright : Copyright 2023 CasjaysDev +# @@Created : Mon Aug 28 06:48:42 PM EDT 2023 +# @@File : 03-files.sh +# @@Description : script to run files +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# shellcheck shell=bash +# shellcheck disable=SC2016 +# shellcheck disable=SC2031 +# shellcheck disable=SC2120 +# shellcheck disable=SC2155 +# shellcheck disable=SC2199 +# shellcheck disable=SC2317 +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set bash options +set -o pipefail +[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -x$DEBUGGER_OPTIONS +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set env variables +exitCode=0 + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Predifined actions +if [ -d "/tmp/bin" ]; then + mkdir -p "/usr/local/bin" + for bin in "/tmp/bin"/*; do + name="$(basename "$bin")" + echo "Installing $name to /usr/local/bin/$name" + copy "$bin* "/usr/local/bin/$name" + chmod -f +x "/usr/local/bin/$name" + done +fi +unset bin +if [ -d "/tmp/data" ]; then + for data in "/tmp/data"/*; do + name="$(basename "$data")" + echo "Installing $name to "/usr/local/share/template-files/data/$name" + mkdir -p "/usr/local/share/template-files/data/$name" + copy "$data"/* "/usr/local/share/template-files/data/$name" + done +fi +unset data +if [ -d "/tmp/etc" ]; then + for config in "/tmp/etc"/* + name="${config//\/tmp\/etc/\/}" + echo "Installing $config to /etc/$name" + if [ -d "$config" ]; then + mkdir -p "/etc/$name" + copy "$config"/* "/etc/$name/" + mkdir -p "/usr/local/share/template-files/config/$name" + copy "$config"/* "/usr/local/share/template-files/config/$name/" + else + copy "$config" "/etc/$name" + copy "$config" "/usr/local/share/template-files/config/$name" + fi + done +fi +unset config +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Main script + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set the exit code +exitCode=$? +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +exit $exitCode diff --git a/rootfs/root/docker/setup/04-users.sh b/rootfs/root/docker/setup/04-users.sh new file mode 100755 index 0000000..a643298 --- /dev/null +++ b/rootfs/root/docker/setup/04-users.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +##@Version : 202408270903-git +# @@Author : CasjaysDev +# @@Contact : CasjaysDev +# @@License : MIT +# @@ReadME : +# @@Copyright : Copyright 2023 CasjaysDev +# @@Created : Mon Aug 28 06:48:42 PM EDT 2023 +# @@File : 04-users.sh +# @@Description : script to run users +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# shellcheck shell=bash +# shellcheck disable=SC2016 +# shellcheck disable=SC2031 +# shellcheck disable=SC2120 +# shellcheck disable=SC2155 +# shellcheck disable=SC2199 +# shellcheck disable=SC2317 +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set bash options +set -o pipefail +[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -x$DEBUGGER_OPTIONS +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set env variables +exitCode=0 + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Predifined actions + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Main script + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set the exit code +exitCode=$? +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +exit $exitCode diff --git a/rootfs/root/docker/setup/05-custom.sh b/rootfs/root/docker/setup/05-custom.sh new file mode 100755 index 0000000..05bf91a --- /dev/null +++ b/rootfs/root/docker/setup/05-custom.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +##@Version : 202408270903-git +# @@Author : CasjaysDev +# @@Contact : CasjaysDev +# @@License : MIT +# @@ReadME : +# @@Copyright : Copyright 2023 CasjaysDev +# @@Created : Mon Aug 28 06:48:42 PM EDT 2023 +# @@File : 05-custom.sh +# @@Description : script to run custom +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# shellcheck shell=bash +# shellcheck disable=SC2016 +# shellcheck disable=SC2031 +# shellcheck disable=SC2120 +# shellcheck disable=SC2155 +# shellcheck disable=SC2199 +# shellcheck disable=SC2317 +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set bash options +set -o pipefail +[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -x$DEBUGGER_OPTIONS +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set env variables +exitCode=0 + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Predifined actions + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Main script + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set the exit code +exitCode=$? +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +exit $exitCode diff --git a/rootfs/root/docker/setup/06-post.sh b/rootfs/root/docker/setup/06-post.sh new file mode 100755 index 0000000..ae2fea0 --- /dev/null +++ b/rootfs/root/docker/setup/06-post.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +##@Version : 202408270903-git +# @@Author : CasjaysDev +# @@Contact : CasjaysDev +# @@License : MIT +# @@ReadME : +# @@Copyright : Copyright 2023 CasjaysDev +# @@Created : Mon Aug 28 06:48:42 PM EDT 2023 +# @@File : 06-post.sh +# @@Description : script to run post +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# shellcheck shell=bash +# shellcheck disable=SC2016 +# shellcheck disable=SC2031 +# shellcheck disable=SC2120 +# shellcheck disable=SC2155 +# shellcheck disable=SC2199 +# shellcheck disable=SC2317 +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set bash options +set -o pipefail +[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -x$DEBUGGER_OPTIONS +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set env variables +exitCode=0 + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Predifined actions + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Main script + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set the exit code +exitCode=$? +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +exit $exitCode diff --git a/rootfs/root/docker/setup/07-cleanup.sh b/rootfs/root/docker/setup/07-cleanup.sh new file mode 100755 index 0000000..b410b44 --- /dev/null +++ b/rootfs/root/docker/setup/07-cleanup.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +##@Version : 202408270903-git +# @@Author : CasjaysDev +# @@Contact : CasjaysDev +# @@License : MIT +# @@ReadME : +# @@Copyright : Copyright 2023 CasjaysDev +# @@Created : Mon Aug 28 06:48:42 PM EDT 2023 +# @@File : 07-cleanup.sh +# @@Description : script to run cleanup +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# shellcheck shell=bash +# shellcheck disable=SC2016 +# shellcheck disable=SC2031 +# shellcheck disable=SC2120 +# shellcheck disable=SC2155 +# shellcheck disable=SC2199 +# shellcheck disable=SC2317 +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set bash options +set -o pipefail +[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -x$DEBUGGER_OPTIONS +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set env variables +exitCode=0 + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Predifined actions +[ -d "/tmp" ] && rm -Rf "/tmp"/* +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Main script + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set the exit code +exitCode=$? +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +exit $exitCode diff --git a/rootfs/usr/local/bin/entrypoint.sh b/rootfs/usr/local/bin/entrypoint.sh new file mode 100755 index 0000000..22763cc --- /dev/null +++ b/rootfs/usr/local/bin/entrypoint.sh @@ -0,0 +1,554 @@ +#!/usr/bin/env bash +# shellcheck shell=bash +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +##@Version : 202408270903-git +# @@Author : Jason Hempstead +# @@Contact : jason@casjaysdev.pro +# @@License : WTFPL +# @@ReadME : entrypoint.sh --help +# @@Copyright : Copyright: (c) 2024 Jason Hempstead, Casjays Developments +# @@Created : Tuesday, Aug 27, 2024 09:03 EDT +# @@File : entrypoint.sh +# @@Description : Entrypoint file for bind +# @@Changelog : New script +# @@TODO : Better documentation +# @@Other : +# @@Resource : +# @@Terminal App : no +# @@sudo/root : no +# @@Template : other/docker-entrypoint +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# shellcheck disable=SC2016 +# shellcheck disable=SC2031 +# shellcheck disable=SC2120 +# shellcheck disable=SC2155 +# shellcheck disable=SC2199 +# shellcheck disable=SC2317 +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# setup debugging - https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html +[ -f "/config/.debug" ] && [ -z "$DEBUGGER_OPTIONS" ] && export DEBUGGER_OPTIONS="$(<"/config/.debug")" || DEBUGGER_OPTIONS="${DEBUGGER_OPTIONS:-}" +{ [ "$DEBUGGER" = "on" ] || [ -f "/config/.debug" ]; } && echo "Enabling debugging" && set -o pipefail -x$DEBUGGER_OPTIONS && export DEBUGGER="on" || set -o pipefail +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +PATH="/usr/local/etc/docker/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set bash options +SCRIPT_FILE="$0" +CONTAINER_NAME="bind" +SCRIPT_NAME="$(basename "$SCRIPT_FILE" 2>/dev/null)" +CONTAINER_NAME="${ENV_CONTAINER_NAME:-$CONTAINER_NAME}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# remove whitespaces from beginning argument +while :; do [ "$1" = " " ] && shift 1 || break; done +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +[ "$1" = "$SCRIPT_FILE" ] && shift 1 +[ "$1" = "$SCRIPT_NAME" ] && shift 1 +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# import the functions file +if [ -f "/usr/local/etc/docker/functions/entrypoint.sh" ]; then + . "/usr/local/etc/docker/functions/entrypoint.sh" +else + echo "Can not load functions from /usr/local/etc/docker/functions/entrypoint.sh" + exit 1 +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +case "$1" in +# Help message +-h | --help) + shift 1 + echo 'Docker container for '$CONTAINER_NAME'' + echo "Usage: $CONTAINER_NAME [cron exec start init shell certbot ssl procs ports healthcheck backup command]" + echo "" + exit 0 + ;; +-*) + shift + ;; +esac +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Create the default env files +__create_env_file "/config/env/default.sh" "/root/env.sh" &>/dev/null +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# import variables from files +for set_env in "/root/env.sh" "/usr/local/etc/docker/env"/*.sh "/config/env"/*.sh; do + [ -f "$set_env" ] && . "$set_env" +done +unset set_env +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# User to use to launch service - IE: postgres +RUNAS_USER="root" # normally root +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# User and group in which the service switches to - IE: nginx,apache,mysql,postgres +SERVICE_USER="bind" # execute command as another user +SERVICE_GROUP="bind" # Set the service group +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set user and group ID +SERVICE_UID="0" # set the user id +SERVICE_GID="0" # set the group id +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Primary server port- will be added to server ports +WEB_SERVER_PORT="" # port : 80,443 +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Secondary ports +SERVER_PORTS="" # specifiy other ports +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Healthcheck variables +HEALTH_ENABLED="yes" # enable healthcheck [yes/no] +SERVICES_LIST="tini" # comma seperated list of processes for the healthcheck +HEALTH_ENDPOINTS="" # url endpoints: [http://localhost/health,http://localhost/test] +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Update path var +export PATH RUNAS_USER SERVICE_USER SERVICE_GROUP SERVICE_UID SERVICE_GID WWW_ROOT_DIR DATABASE_DIR +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Custom variables + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# show message +__run_message() { + + return +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +################## END OF CONFIGURATION ##################### +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Startup variables +export INIT_DATE="${INIT_DATE:-$(date)}" +export CONTAINER_INIT="${CONTAINER_INIT:-no}" +export START_SERVICES="${START_SERVICES:-yes}" +export ENTRYPOINT_MESSAGE="${ENTRYPOINT_MESSAGE:-yes}" +export ENTRYPOINT_FIRST_RUN="${ENTRYPOINT_FIRST_RUN:-yes}" +export DATA_DIR_INITIALIZED="${DATA_DIR_INITIALIZED:-no}" +export CONFIG_DIR_INITIALIZED="${CONFIG_DIR_INITIALIZED:-no}" +export CONTAINER_NAME="${ENV_CONTAINER_NAME:-$CONTAINER_NAME}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# System +export LANG="${LANG:-C.UTF-8}" +export LC_ALL="${LANG:-C.UTF-8}" +export TZ="${TZ:-${TIMEZONE:-America/New_York}}" +export HOSTNAME="${FULL_DOMAIN_NAME:-${SERVER_HOSTNAME:-$HOSTNAME}}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Default directories +export SSL_DIR="${SSL_DIR:-/config/ssl}" +export SSL_CA="${SSL_CERT:-/config/ssl/ca.crt}" +export SSL_KEY="${SSL_KEY:-/config/ssl/localhost.pem}" +export SSL_CERT="${SSL_CERT:-/config/ssl/localhost.crt}" +export BACKUP_DIR="${BACKUP_DIR:-/data/backups}" +export LOCAL_BIN_DIR="${LOCAL_BIN_DIR:-/usr/local/bin}" +export DEFAULT_DATA_DIR="${DEFAULT_DATA_DIR:-/usr/local/share/template-files/data}" +export DEFAULT_CONF_DIR="${DEFAULT_CONF_DIR:-/usr/local/share/template-files/config}" +export DEFAULT_TEMPLATE_DIR="${DEFAULT_TEMPLATE_DIR:-/usr/local/share/template-files/defaults}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Additional +export PHP_INI_DIR="${PHP_INI_DIR:-$(__find_php_ini)}" +export PHP_BIN_DIR="${PHP_BIN_DIR:-$(__find_php_bin)}" +export HTTPD_CONFIG_FILE="${HTTPD_CONFIG_FILE:-$(__find_httpd_conf)}" +export NGINX_CONFIG_FILE="${NGINX_CONFIG_FILE:-$(__find_nginx_conf)}" +export MYSQL_CONFIG_FILE="${MYSQL_CONFIG_FILE:-$(__find_mysql_conf)}" +export PGSQL_CONFIG_FILE="${PGSQL_CONFIG_FILE:-$(__find_pgsql_conf)}" +export MONGODB_CONFIG_FILE="${MONGODB_CONFIG_FILE:-$(__find_mongodb_conf)}" +export ENTRYPOINT_PID_FILE="${ENTRYPOINT_PID_FILE:-$ENTRYPOINT_PID_FILE}" +export ENTRYPOINT_INIT_FILE="${ENTRYPOINT_INIT_FILE:-/config/.entrypoint.done}" +export ENTRYPOINT_DATA_INIT_FILE="${ENTRYPOINT_DATA_INIT_FILE:-/data/.docker_has_run}" +export ENTRYPOINT_CONFIG_INIT_FILE="${ENTRYPOINT_CONFIG_INIT_FILE:-/config/.docker_has_run}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# variables based on env/files +[ -f "/config/enable/ssl" ] && SSL_ENABLED="yes" +[ -f "/config/enable/ssh" ] && SSH_ENABLED="yes" +[ "$WEB_SERVER_PORT" = "443" ] && SSL_ENABLED="yes" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# export variables + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# is already Initialized +[ -f "$ENTRYPOINT_DATA_INIT_FILE" ] && DATA_DIR_INITIALIZED="yes" || DATA_DIR_INITIALIZED="no" +[ -f "$ENTRYPOINT_CONFIG_INIT_FILE" ] && CONFIG_DIR_INITIALIZED="yes" || CONFIG_DIR_INITIALIZED="no" +{ [ -f "$ENTRYPOINT_PID_FILE" ] || [ -f "$ENTRYPOINT_INIT_FILE" ]; } && ENTRYPOINT_FIRST_RUN="no" || ENTRYPOINT_FIRST_RUN="yes" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# clean ENV_PORTS variables +ENV_PORTS="${ENV_PORTS//,/ }" # +ENV_PORTS="${ENV_PORTS//\/*/}" # +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# clean SERVER_PORTS variables +SERVER_PORTS="${SERVER_PORTS//,/ }" # +SERVER_PORTS="${SERVER_PORTS//\/*/}" # +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# clean WEB_SERVER_PORTS variables +WEB_SERVER_PORTS="${WEB_SERVER_PORT//\/*/}" # +WEB_SERVER_PORTS="${WEB_SERVER_PORTS//\/*/}" # +WEB_SERVER_PORTS="${WEB_SERVER_PORT//,/ } ${ENV_WEB_SERVER_PORTS//,/ }" # +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# rewrite and merge variables +ENV_PORTS="$(__format_variables "$ENV_PORTS" || false)" +WEB_SERVER_PORTS="$(__format_variables "$WEB_SERVER_PORTS" || false)" +ENV_PORTS="$(__format_variables "$SERVER_PORTS" "$WEB_SERVER_PORTS" "$ENV_PORTS" "$SERVER_PORTS" || false)" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +HEALTH_ENDPOINTS="${HEALTH_ENDPOINTS//,/ }" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# create required directories +mkdir -p "/run" +mkdir -p "/tmp" +mkdir -p "/root" +mkdir -p "/var/run" +mkdir -p "/var/tmp" +mkdir -p "/run/cron" +mkdir -p "/data/logs" +mkdir -p "/run/init.d" +mkdir -p "/config/enable" +mkdir -p "/config/secure" +mkdir -p "/usr/local/etc/docker/exec" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# create required files +touch "/data/logs/start.log" +touch "/data/logs/entrypoint.log" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# fix permissions +chmod -f 777 "/run" +chmod -f 777 "/tmp" +chmod -f 700 "/root" +chmod -f 777 "/var/run" +chmod -f 777 "/var/tmp" +chmod -f 777 "/run/cron" +chmod -f 777 "/data/logs" +chmod -f 777 "/run/init.d" +chmod -f 777 "/config/enable" +chmod -f 777 "/config/secure" +chmod -f 777 "/data/logs/entrypoint.log" +chmod -f 777 "/usr/local/etc/docker/exec" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# lets ensure everyone can write to std* +[ -f "/dev/stdin" ] && chmod -f 777 "/dev/stdin" +[ -f "/dev/stderr" ] && chmod -f 777 "/dev/stderr" +[ -f "/dev/stdout" ] && chmod -f 777 "/dev/stdout" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +cat </dev/null +export LANG="\${LANG:-C.UTF-8}" +export LC_ALL="\${LANG:-C.UTF-8}" +export TZ="\${TZ:-\${TIMEZONE:-America/New_York}}" +EOF +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Create the backup dir +[ -n "$BACKUP_DIR" ] && { [ -d "$BACKUP_DIR" ] || mkdir -p "$BACKUP_DIR"; } +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +if [ -f "$ENTRYPOINT_PID_FILE" ]; then + START_SERVICES="no" + touch "$ENTRYPOINT_PID_FILE" +else + echo "$$" >"$ENTRYPOINT_PID_FILE" +fi +if [ -f "$ENTRYPOINT_INIT_FILE" ]; then + ENTRYPOINT_MESSAGE="no" ENTRYPOINT_FIRST_RUN="no" +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +if [ "$ENTRYPOINT_FIRST_RUN" != "no" ]; then + # Show start message + if [ "$CONFIG_DIR_INITIALIZED" = "no" ] || [ "$DATA_DIR_INITIALIZED" = "no" ]; then + [ "$ENTRYPOINT_MESSAGE" = "yes" ] && echo "Executing entrypoint script for bind" + fi + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # Set reusable variables + { { [ -w "/etc" ] && [ ! -e "/etc/hosts" ]; } || [ -w "/etc/hosts" ]; } && UPDATE_FILE_HOSTS="yes" + { { [ -w "/etc" ] && [ ! -e "/etc/timezone" ]; } || [ -w "/etc/timezone" ]; } && UPDATE_FILE_TZ="yes" + { { [ -w "/etc" ] && [ ! -e "/etc/resolv.conf" ]; } || [ -w "/etc/resolv.conf" ]; } && UPDATE_FILE_RESOLV="yes" + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # Set timezone + [ -n "$TZ" ] && [ "$UPDATE_FILE_TZ" = "yes" ] && echo "$TZ" >"/etc/timezone" + [ -f "/usr/share/zoneinfo/$TZ" ] && [ "$UPDATE_FILE_TZ" = "yes" ] && ln -sf "/usr/share/zoneinfo/$TZ" "/etc/localtime" + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # if ipv6 add it to /etc/hosts + if [ "$UPDATE_FILE_HOSTS" = "yes" ]; then + echo "# known hostname mappings" >"/etc/hosts" + if [ -n "$(ip a 2>/dev/null | grep 'inet6.*::' || ifconfig 2>/dev/null | grep 'inet6.*::')" ]; then + __printf_space "40" "::1" "localhost" >>"/etc/hosts" + __printf_space "40" "127.0.0.1" "localhost" >>"/etc/hosts" + else + __printf_space "40" "127.0.0.1" "localhost" >>"/etc/hosts" + fi + fi + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # add .home domain + if [ "$UPDATE_FILE_HOSTS" = "yes" ] && [ -n "$HOSTNAME" ]; then + __grep_test " $HOSTNAME" "/etc/hosts" || __printf_space "40" "${CONTAINER_IP4_ADDRESS:-127.0.0.1}" "$HOSTNAME" >>"/etc/hosts" + __grep_test " ${HOSTNAME%%.*}.home" "/etc/hosts" || __printf_space "40" "${CONTAINER_IP4_ADDRESS:-127.0.0.1}" "${HOSTNAME%%.*}.home" >>"/etc/hosts" + fi + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # add domainname + if [ "$UPDATE_FILE_HOSTS" = "yes" ] && [ "$DOMAINNAME" != "home" ] && [ -n "$DOMAINNAME" ] && [ "$HOSTNAME.$DOMAINNAME" != "$DOMAINNAME" ]; then + __grep_test " ${HOSTNAME%%.*}.$DOMAINNAME" "/etc/hosts" || __printf_space "40" "${CONTAINER_IP4_ADDRESS:-127.0.0.1}" "${HOSTNAME%%.*}.$DOMAINNAME" >>"/etc/hosts" + fi + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # Set containers hostname + [ -n "$HOSTNAME" ] && [ "$UPDATE_FILE_HOSTS" = "yes" ] && echo "$HOSTNAME" >"/etc/hostname" + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # Set containers hostname with domain + # [ -n "$DOMAINNAME" ] && [ "$UPDATE_FILE_HOSTS" = "yes" ] && echo "$HOSTNAME.$DOMAINNAME" >"/etc/hostname" + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + if [ -f "/etc/hostname" ]; then + [ -n "$(type -P hostname)" ] && hostname -F "/etc/hostname" &>/dev/null || HOSTNAME="$(<"/etc/hostname")" + export HOSTNAME + fi + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # import hosts file into container + [ -f "/usr/local/etc/hosts" ] && [ "$UPDATE_FILE_HOSTS" = "yes" ] && cat "/usr/local/etc/hosts" | grep -vF "$HOSTNAME" >>"/etc/hosts" + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # import resolv.conf file into container + [ "$CUSTOM_DNS" != "yes" ] && [ -f "/usr/local/etc/resolv.conf" ] && [ "$UPDATE_FILE_RESOLV" = "yes" ] && cat "/usr/local/etc/resolv.conf" >"/etc/resolv.conf" + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + if [ -d "/usr/local/etc/skel" ]; then + cp -Rf "/usr/local/etc/skel/." "$HOME/" + fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Delete any .gitkeep files +[ -d "/data" ] && rm -Rf "/data/.gitkeep" "/data"/*/*.gitkeep +[ -d "/config" ] && rm -Rf "/config/.gitkeep" "/config"/*/*.gitkeep +[ -f "/usr/local/bin/.gitkeep" ] && rm -Rf "/usr/local/bin/.gitkeep" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Setup bin directory - /config/bin > /usr/local/bin +__initialize_custom_bin_dir +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Copy default system configs - /usr/local/share/template-files/defaults > /config/ +__initialize_default_templates +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Copy custom config files - /usr/local/share/template-files/config > /config/ +__initialize_config_dir +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Copy custom data files - /usr/local/share/template-files/data > /data/ +__initialize_data_dir +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__initialize_ssl_certs +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +if [ -f "$ENTRYPOINT_INIT_FILE" ]; then + ENTRYPOINT_FIRST_RUN="no" +elif [ -d "/config" ]; then + echo "Initialized on: $INIT_DATE" >"$ENTRYPOINT_INIT_FILE" +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Check if this is a new container +if [ -f "$ENTRYPOINT_DATA_INIT_FILE" ]; then + DATA_DIR_INITIALIZED="yes" +elif [ -d "/data" ]; then + echo "Initialized on: $INIT_DATE" >"$ENTRYPOINT_DATA_INIT_FILE" +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +if [ -f "$ENTRYPOINT_CONFIG_INIT_FILE" ]; then + CONFIG_DIR_INITIALIZED="yes" +elif [ -d "/config" ]; then + echo "Initialized on: $INIT_DATE" >"$ENTRYPOINT_CONFIG_INIT_FILE" +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +if [ "$ENTRYPOINT_FIRST_RUN" != "no" ]; then + # setup the smtp server + __setup_mta +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# if no pid assume container restart +[ -f "$ENTRYPOINT_PID_FILE" ] && [ -f "/run/__start_init_scripts.pid" ] || START_SERVICES="yes" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +[ "$ENTRYPOINT_MESSAGE" = "yes" ] && __printf_space "40" "Container ip address is:" "$CONTAINER_IP4_ADDRESS" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Show configured listing processes +if [ "$ENTRYPOINT_MESSAGE" = "yes" ] && [ -n "$ENV_PORTS" ]; then + show_port="" + for port in $ENV_PORTS; do [ -n "$port" ] && show_port+="$(printf '%s ' "${port// /}") "; done + __printf_space "40" "The following ports are open:" "$show_port" + unset port show_port +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# execute init script +if [ -f "/tmp/init" ]; then sh "/tmp/init"; fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# create user if needed +__create_service_user "$SERVICE_USER" "$SERVICE_GROUP" "${WORK_DIR:-/home/$SERVICE_USER}" "${SERVICE_UID:-}" "${SERVICE_GID:-}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Modify user if needed +__set_user_group_id $SERVICE_USER ${SERVICE_UID:-} ${SERVICE_GID:-} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Show message +__run_message +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Just start services +START_SERVICES="${START_SERVICES:-SYSTEM_INIT}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Start all services if no pidfile +if [ "$START_SERVICES" = "yes" ] && [ "$1" != "backup" ] && [ "$1" != "healthcheck" ]; then + [ "$1" = "start" ] && shift 1 + [ "$1" = "all" ] && shift 1 + [ "$1" = "init" ] && export CONTAINER_INIT="yes" + echo "$$" >"$ENTRYPOINT_PID_FILE" + __start_init_scripts "/usr/local/etc/docker/init.d" + START_SERVICES="no" + CONTAINER_INIT="${CONTAINER_INIT:-no}" +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Begin options +case "$1" in +init) + shift 1 + echo "Container has been Initialized" + exit 0 + ;; +logs) + shift 1 + case "$1" in + follow) + tail -Fq /data/logs/*/* + ;; + clean) + log_files="$(find "/data/logs" -type f)" + for log in "${log_files[@]}"; do + echo "clearing $log" + printf '' >$log + done + ;; + *) + echo "Usage: logs [follow,clean]" + exit 0 + ;; + esac + ;; +cron) + shift 1 + __cron "$@" & + echo "cron script is running with pid: $!" + exit + ;; +# backup data and config dirs +backup) + shift 1 + save="${1:-$BACKUP_DIR}" + backupExit=0 + date="$(date '+%Y%m%d-%H%M')" + file="$save/$date.tar.gz" + echo "Backing up /data /config to $file" + sleep 1 + tar cfvz "$file" --exclude="$save" "/data" "/config" || false + backupExit=$? + [ $backupExit -eq 0 ] && echo "Backed up /data /config has finished" || echo "Backup of /data /config has failed" + exit $backupExit + ;; +# Docker healthcheck +healthcheck) + healthStatus=0 + services="${SERVICES_LIST:-$@}" + healthEnabled="${HEALTH_ENABLED:-}" + healthPorts="${WEB_SERVER_PORTS:-}" + healthEndPoints="${HEALTH_ENDPOINTS:-}" + healthMessage="Everything seems to be running" + services="${services//,/ }" + [ "$healthEnabled" = "yes" ] || exit 0 + for proc in $services; do + if [ -n "$proc" ]; then + if ! __pgrep "$proc"; then + echo "$proc is not running" >&2 + healthStatus=$((healthStatus + 1)) + fi + fi + done + for port in $ports; do + if [ -n "$(type -P netstat)" ] && [ -n "$port" ]; then + if ! netstat -taupln | grep -q ":$port "; then + echo "$port isn't open" >&2 + healthStatus=$((healthStatus + 1)) + fi + fi + done + for endpoint in $healthEndPoints; do + if [ -n "$endpoint" ]; then + if ! __curl "$endpoint"; then + echo "Can not connect to $endpoint" >&2 + healthStatus=$((healthStatus + 1)) + fi + fi + done + [ "$healthStatus" -eq 0 ] || healthMessage="Errors reported see: docker logs --follow $CONTAINER_NAME" + [ -n "$healthMessage" ] && echo "$healthMessage" + exit $healthStatus + ;; + # show open ports +ports) + shift 1 + ports="$(__netstat -taupln | awk -F ' ' '{print $4}' | awk -F ':' '{print $2}' | sort --unique --version-sort | grep -v '^$' | grep '^' || echo '')" + [ -n "$ports" ] && printf '%s\n%s\n' "The following are servers:" "$ports" | tr '\n' ' ' + exit $? + ;; + # show running processes +procs) + shift 1 + ps="$(__ps axco command | grep -vE 'COMMAND|grep|ps' | sort -u || grep '^' || echo '')" + [ -n "$ps" ] && printf '%s\n%s\n' "Found the following processes" "$ps" | tr '\n' ' ' + exit $? + ;; + # setup ssl +ssl) + shift 1 + __create_ssl_cert + exit $? + ;; +# manage ssl certificate +certbot) + shift 1 + CERT_BOT_ENABLED="yes" + if [ "$1" = "create" ]; then + shift 1 + __certbot "create" + elif [ "$1" = "renew" ]; then + shift 1 + __certbot "renew certonly --force-renew" + else + __exec_command "certbot" "$@" + fi + exit $? + ;; +# Launch shell +*/bin/sh | */bin/bash | bash | sh | shell) + shift 1 + __exec_command "${@:-/bin/bash -l}" + exit $? + ;; +# execute commands +exec) + shift 1 + __exec_command "${@:-echo "No commands given"}" + exit $? + ;; +# show/start init scripts +start) + shift 1 + export PATH="/usr/local/etc/docker/init.d:$PATH" + if [ $# -eq 0 ]; then + scripts="$(ls -A "/usr/local/etc/docker/init.d")" + [ -n "$scripts" ] && echo "$scripts" || echo "No scripts found in: /usr/local/etc/docker/init.d" + exit + elif [ "$1" = "all" ]; then + shift $# + if [ "$START_SERVICES" = "yes" ]; then + echo "$$" >"$ENTRYPOINT_PID_FILE" + __start_init_scripts "/usr/local/etc/docker/init.d" + __no_exit + elif [ -f "/usr/local/etc/docker/init.d/$1" ]; then + eval "/usr/local/etc/docker/init.d/$1" & + __no_exit + + fi + fi + ;; +# Execute primary command +*) + if [ $# -eq 0 ]; then + if [ ! -f "$ENTRYPOINT_PID_FILE" ]; then + echo "$$" >"$ENTRYPOINT_PID_FILE" + [ "$START_SERVICES" = "no" ] && [ "$CONTAINER_INIT" = "yes" ] || __start_init_scripts "/usr/local/etc/docker/init.d" + fi + __no_exit + else + __exec_command "$@" + fi + exit $? + ;; +esac +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# end of entrypoint +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# ex: ts=2 sw=2 et filetype=sh diff --git a/rootfs/usr/local/bin/pkmgr b/rootfs/usr/local/bin/pkmgr new file mode 100755 index 0000000..137af81 --- /dev/null +++ b/rootfs/usr/local/bin/pkmgr @@ -0,0 +1,140 @@ +#!/usr/bin/env bash +# shellcheck shell=bash +# shellcheck disable=SC2016 +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +[ -n "$_DEBUG" ] && _DEBUG_OPTIONS="-x" +[ "$1" = "--debug" ] && _DEBUG_OPTIONS="-x" && shift 1 +[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -x$DEBUGGER_OPTIONS +set -e $_DEBUG_OPTIONS +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +USER_UID="$(id -u)" +USER_GID="$(id -g)" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +[ -f "/etc/pkmgr/options.conf" ] && . "/etc/pkmgr/options.conf" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +if [ -x "$(command -v apt 2>/dev/null)" ]; then + export DEBIAN_FRONTEND=noninteractive + pkmgr_cmd="apt" + pkmgr_clean_cmd="$pkmgr_cmd clean" + pkmgr_mkcache_cmd="$pkmgr_cmd update" + pkmgr_update_cmd="$pkmgr_cmd upgrade -yy" + pkmgr_install_cmd="$pkmgr_cmd install -yy $PKMGR_OPTS" +elif [ -x "$(command -v apt-get 2>/dev/null)" ]; then + export DEBIAN_FRONTEND=noninteractive + pkmgr_cmd="apt-get" + pkmgr_clean_cmd="$pkmgr_cmd clean" + pkmgr_mkcache_cmd="$pkmgr_cmd update" + pkmgr_update_cmd="$pkmgr_cmd upgrade -yy" + pkmgr_install_cmd="$pkmgr_cmd install -yy $PKMGR_OPTS" +elif [ -x "$(command -v dnf 2>/dev/null)" ]; then + pkmgr_cmd="dnf" + pkmgr_clean_cmd="$pkmgr_cmd clean all" + pkmgr_mkcache_cmd="$pkmgr_cmd makecache" + pkmgr_update_cmd="$pkmgr_cmd update -y --skip-broken $PKMGR_OPTS" + pkmgr_install_cmd="$pkmgr_cmd install -y --skip-broken $PKMGR_OPTS" +elif [ -x "$(command -v yum 2>/dev/null)" ]; then + pkmgr_cmd="yum" + pkmgr_clean_cmd="$pkmgr_cmd clean all" + pkmgr_mkcache_cmd="$pkmgr_cmd makecache" + pkmgr_update_cmd="$pkmgr_cmd update -y --skip-broken $PKMGR_OPTS" + pkmgr_install_cmd="$pkmgr_cmd install -y --skip-broken $PKMGR_OPTS" +elif [ -n "$(command -v pacman 2>/dev/null)" ]; then + pkmgr_cmd="pacman" + pkmgr_mkcache_cmd="true" + pkmgr_clean_cmd="$pkmgr_cmd -Scc --noconfirm" + pkmgr_update_cmd="$pkmgr_cmd -Syyu --noconfirm $PKMGR_OPTS" + pkmgr_install_cmd="$pkmgr_cmd -Syy --noconfirm $PKMGR_OPTS" +elif [ -x "$(command -v apk 2>/dev/null)" ]; then + pkmgr_cmd="apk" + pkmgr_mkcache_cmd="true" + pkmgr_clean_cmd="$pkmgr_cmd cache clean" + pkmgr_update_cmd="$pkmgr_cmd -U upgrade --no-cache $PKMGR_OPTS" + pkmgr_install_cmd="$pkmgr_cmd add --no-cache $PKMGR_OPTS" +elif [ -x "$(command -v zypper 2>/dev/null)" ]; then + pkmgr_cmd="zypper" + pkmgr_mkcache_cmd="true" + pkmgr_clean_cmd="$pkmgr_cmd clean --all" + pkmgr_update_cmd="$pkmgr_cmd update -y $PKMGR_OPTS" + pkmgr_install_cmd="$pkmgr_cmd install -y $PKMGR_OPTS" +else + pkmgr_cmd="true" + pkmgr_mkcache_cmd="$pkmgr_cmd" + pkmgr_clean_cmd="$pkmgr_cmd" + pkmgr_update_cmd="$pkmgr_cmd" + pkmgr_install_cmd="$pkmgr_cmd" +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +if [ -f "/config/pkmgr/settings.conf" ]; then + . "/config/pkmgr/settings.conf" +elif [ -f "/etc/pkmgr/settings.conf" ]; then + . "/etc/pkmgr/settings.conf" +else + mkdir -p "/config/pkmgr" + cat <"/config/pkmgr/settings.conf" +pkmgr_cmd="$pkmgr_cmd" +pkmgr_clean_cmd="$pkmgr_clean_cmd" +pkmgr_update_cmd="$pkmgr_update_cmd" +pkmgr_install_cmd="$pkmgr_install_cmd" +pkmgr_mkcache_cmd="$pkmgr_mkcache_cmd" +EEOF +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +[ -n "$pkmgr_cmd" ] || { echo "Can not determine the package manager" && exit 1; } +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +case "$1" in +pip) + shift 1 + pip_bin="$(command -v python3 2>/dev/null || command -v python2 2>/dev/null || command -v python 2>/dev/null || echo "")" + py_version="$($pip_bin --version | sed 's|[pP]ython ||g' | awk -F '.' '{print $1$2}' | grep '[0-9]' || echo "0")" + [ "$py_version" -gt "310" ] && pip_opts="--break-system-packages " || pip_opts="" + case "$1" in + install) + shift 1 + $pip_bin -m $pip_opts "$@" + ;; + *) + $pip_bin "$@" + ;; + esac + exit $? + ;; +update | upgrade) + shift $# + [ "$USER_UID" -eq 0 ] || [ "$USER" = "root" ] || pkmgr_update_cmd="sudo $pkmgr_install_cmd" + echo "Updating packages command: $pkmgr_update_cmd" + $pkmgr_mkcache_cmd + $pkmgr_update_cmd + exit $? + ;; +clean) + shift $# + [ -n "$1" ] || exit 0 + [ "$USER_UID" -eq 0 ] || [ "$USER" = "root" ] || pkmgr_clean_cmd="sudo $pkmgr_clean_cmd" + echo "Cleaning package cache: $pkmgr_clean_cmd" + $pkmgr_clean_cmd + exit $? + ;; +install) + shift 1 + [ -n "$1" ] || exit 0 + [ "$USER_UID" -eq 0 ] || [ "$USER" = "root" ] || pkmgr_install_cmd="sudo $pkmgr_install_cmd" + if [ -f "$1" ]; then + install_list="$(cat "$1")" + echo 'installing packages from file with command: '$pkmgr_install_cmd' "$(<"$1")"' + else + install_list="$*" + echo "installing packages command: $pkmgr_install_cmd $install_list" + fi + $pkmgr_install_cmd $install_list + exit $? + ;; +*) + [ -n "$1" ] || exit 0 + [ "$USER_UID" -eq 0 ] || [ "$USER" = "root" ] || pkmgr_cmd="sudo $pkmgr_cmd" + echo "executing packages command: $pkmgr_cmd $*" + $pkmgr_cmd "$@" + exit $? + ;; +esac +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# end diff --git a/rootfs/usr/local/etc/docker/functions/entrypoint.sh b/rootfs/usr/local/etc/docker/functions/entrypoint.sh new file mode 100644 index 0000000..002d505 --- /dev/null +++ b/rootfs/usr/local/etc/docker/functions/entrypoint.sh @@ -0,0 +1,1113 @@ +#!/usr/bin/env bash +# shellcheck shell=bash +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +##@Version : 202407241259-git +# @@Author : Jason Hempstead +# @@Contact : git-admin@casjaysdev.pro +# @@License : LICENSE.md +# @@ReadME : docker-entrypoint --help +# @@Copyright : Copyright: (c) 2023 Jason Hempstead, Casjays Developments +# @@Created : Sunday, Sep 03, 2023 01:40 EDT +# @@File : docker-entrypoint +# @@Description : functions for my docker containers +# @@Changelog : newScript +# @@TODO : Refactor code +# @@Other : +# @@Resource : +# @@Terminal App : no +# @@sudo/root : no +# @@Template : functions/docker-entrypoint +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# shellcheck disable=SC2016 +# shellcheck disable=SC2031 +# shellcheck disable=SC2120 +# shellcheck disable=SC2155 +# shellcheck disable=SC2199 +# shellcheck disable=SC2317 +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# setup debugging - https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html +[ -f "/config/.debug" ] && [ -z "$DEBUGGER_OPTIONS" ] && export DEBUGGER_OPTIONS="$(<"/config/.debug")" || DEBUGGER_OPTIONS="${DEBUGGER_OPTIONS:-}" +{ [ "$DEBUGGER" = "on" ] || [ -f "/config/.debug" ]; } && echo "Enabling debugging" && set -xo pipefail -x$DEBUGGER_OPTIONS && export DEBUGGER="on" || set -o pipefail +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__remove_extra_spaces() { sed 's/\( \)*/\1/g;s|^ ||g'; } +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__printf_space() { + pad=$(printf '%0.1s' " "{1..60}) + padlength=$1 + string1="$2" + string2="$3" + printf '%s' "$string1" + printf '%*.*s' 0 $((padlength - ${#string1} - ${#string2})) "$pad" + printf '%s\n' "$string2" + string2=${string2:1} +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__rm() { [ -n "$1" ] && [ -e "$1" ] && rm -Rf "${1:?}"; } +__grep_test() { grep -s "$1" "$2" | grep -qwF "${3:-$1}" || return 1; } +__netstat() { [ -f "$(type -P netstat)" ] && netstat "$@" || return 10; } +__cd() { { [ -d "$1" ] || mkdir -p "$1"; } && builtin cd "$1" || return 1; } +__is_in_file() { [ -e "$2" ] && grep -Rsq "$1" "$2" && return 0 || return 1; } +__curl() { curl -q -sfI --max-time 3 -k -o /dev/null "$@" &>/dev/null || return 10; } +__find() { find "$1" -mindepth 1 -type ${2:-f,d} 2>/dev/null | grep '^' || return 10; } +__pcheck() { [ -n "$(which pgrep 2>/dev/null)" ] && pgrep -o "$1$" &>/dev/null || return 10; } +__file_exists_with_content() { [ -n "$1" ] && [ -f "$1" ] && [ -s "$1" ] && return 0 || return 2; } +__sed() { sed -i 's|'$1'|'$2'|g' "$3" &>/dev/null || sed -i "s|$1|$2|g" "$3" &>/dev/null || return 1; } +__pgrep() { __pcheck "${1:-SERVICE_NAME}" || __ps "${1:-$SERVICE_NAME}" | grep -qv ' grep' || return 10; } +__ps() { [ -f "$(type -P ps)" ] && ps "$@" 2>/dev/null | sed 's|:||g' | grep -Fw " ${1:-$SERVICE_NAME}$" || return 10; } +__is_dir_empty() { if [ -n "$1" ]; then [ "$(ls -A "$1" 2>/dev/null | wc -l)" -eq 0 ] && return 0 || return 1; else return 1; fi; } +__get_ip6() { ip a 2>/dev/null | grep -w 'inet6' | awk '{print $2}' | grep -vE '^::1|^fe' | sed 's|/.*||g' | head -n1 | grep '^' || echo ''; } +__get_ip4() { ip a 2>/dev/null | grep -w 'inet' | awk '{print $2}' | grep -vE '^127.0.0' | sed 's|/.*||g' | head -n1 | grep '^' || echo '127.0.0.1'; } +__find_file_relative() { find "$1"/* -not -path '*env/*' -not -path '.git*' -type f 2>/dev/null | sed 's|'$1'/||g' | sort -u | grep -v '^$' | grep '^' || false; } +__find_directory_relative() { find "$1"/* -not -path '*env/*' -not -path '.git*' -type d 2>/dev/null | sed 's|'$1'/||g' | sort -u | grep -v '^$' | grep '^' || false; } +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__pid_exists() { ps -ax --no-header | sed 's/^[[:space:]]*//g' | awk -F' ' '{print $1}' | sed 's|:||g' | grep '[0-9]' | sort -uV | grep "^$1$" && return 0 || return 1; } +__is_running() { ps -eo args --no-header | awk '{print $1,$2,$3}' | sed 's|:||g' | sort -u | grep -vE 'grep|COMMAND|awk|tee|ps|sed|sort|tail' | grep "$1" | grep -q "${2:-^}" && return 0 || return 1; } +__get_pid() { ps -ax --no-header | sed 's/^[[:space:]]*//g;s|;||g;s|:||g' | awk '{print $1,$5}' | sed 's|:||g' | grep "$1$" | grep -v 'grep' | awk -F' ' '{print $1}' | grep '[0-9]' | sort -uV | head -n1 | grep '^' && return 0 || return 1; } +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__format_variables() { printf '%s\n' "${@//,/ }" | tr ' ' '\n' | sort -RVu | grep -v '^$' | tr '\n' ' ' | __clean_variables | grep '^' || return 3; } +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__clean_variables() { + local var="$*" + var="${var#"${var%%[![:space:]]*}"}" # remove leading whitespace characters + var="${var%"${var##*[![:space:]]}"}" # remove trailing whitespace characters + var="$(printf '%s\n' "$var" | sed 's/\( \)*/\1/g;s|^ ||g')" + printf '%s' "$var" | grep -v '^$' +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__no_exit() { [ -f "/run/no_exit.pid" ] || exec bash -c "trap 'sleep 1;rm -Rf /run/no_exit.pid;exit 0' TERM INT;(while true; do echo $$ >/run/no_exit.pid;tail -qf /data/logs/start.log 2>/dev/null||sleep 20; done) & wait"; } +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__trim() { + local var="${*//;/ }" + var="${var#"${var%%[![:space:]]*}"}" # remove leading whitespace characters + var="${var%"${var##*[![:space:]]}"}" # remove trailing whitespace characters + var="$(echo "$var" | __remove_extra_spaces | sed "s| |; |g;s|;$| |g" | __remove_extra_spaces)" + printf '%s' "$var" | sed 's|;||g' | grep -v '^$' +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__banner() { printf '# - - - %-60s - - - #\n' "$*"; } +__find_php_bin() { find -L '/usr'/*bin -maxdepth 4 -name 'php-fpm*' 2>/dev/null | head -n1 | grep '^' || echo ''; } +__find_php_ini() { find -L '/etc' -maxdepth 4 -name 'php.ini' 2>/dev/null | head -n1 | sed 's|/php.ini||g' | grep '^' || echo ''; } +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__find_nginx_conf() { find -L '/etc' -maxdepth 4 -name 'nginx.conf' 2>/dev/null | head -n1 | grep '^' || echo ''; } +__find_caddy_conf() { find -L '/etc' -maxdepth 4 -type f -iname 'caddy.conf' 2>/dev/null | head -n1 | grep '^' || echo ''; } +__find_lighttpd_conf() { find -L '/etc' -maxdepth 4 -type f -iname 'lighttpd.conf' 2>/dev/null | head -n1 | grep '^' || echo ''; } +__find_cherokee_conf() { find -L '/etc' -maxdepth 4 -type f -iname 'cherokee.conf' 2>/dev/null | head -n1 | grep '^' || echo ''; } +__find_httpd_conf() { find -L '/etc' -maxdepth 4 -type f -iname 'httpd.conf' -o -iname 'apache2.conf' 2>/dev/null | head -n1 | grep '^' || echo ''; } +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__find_mysql_conf() { find -L '/etc' -maxdepth 4 -type f -name 'my.cnf' 2>/dev/null | head -n1 | grep '^' || echo ''; } +__find_pgsql_conf() { find -L '/var/lib' '/etc' -maxdepth 8 -type f -name 'postgresql.conf' 2>/dev/null | head -n1 | grep '^' || echo ''; } +__find_couchdb_conf() { return; } +__find_mongodb_conf() { return; } +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__random_password() { cat "/dev/urandom" | tr -dc '0-9a-zA-Z' | head -c${1:-16} && echo ""; } +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__init_working_dir() { + local service_name="$SERVICE_NAME" # get service name + local workdir="$(eval echo "${WORK_DIR:-}")" # expand variables + local home="$(eval echo "${workdir//\/root/\/tmp\/docker}")" # expand variables + # set working directories + [ "$home" = "$workdir" ] && workdir="" + [ "$home" = "/root" ] && home="/tmp/$service_name" + [ -z "$home" ] && home="${workdir:-/tmp/$service_name}" + # Change to working directory + [ -n "$WORK_DIR" ] && [ -n "$EXEC_CMD_BIN" ] && workdir="$WORK_DIR" + [ -z "$WORK_DIR" ] && [ "$HOME" = "/root" ] && [ "$RUNAS_USER" != "root" ] && [ "$PWD" != "/tmp" ] && home="${workdir:-$home}" + [ -z "$WORK_DIR" ] && [ "$HOME" = "/root" ] && [ "$SERVICE_USER" != "root" ] && [ "$PWD" != "/tmp" ] && home="${workdir:-$home}" + # create needed directories + [ -n "$home" ] && { [ -d "$home" ] || mkdir -p "$home"; } + [ -n "$workdir" ] && { [ -d "$workdir" ] || mkdir -p "$workdir"; } + [ "$SERVICE_USER" = "root " ] || [ -d "$home" ] && chmod -f 777 "$home" + [ "$SERVICE_USER" = "root " ] || [ -d "$workdir" ] && chmod -f 777 "$workdir" + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # cd to dir + __cd "${workdir:-$home}" + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + echo "Setting the working directory to: $PWD" + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + export WORK_DIR="$workdir" HOME="$home" +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__exec_service() { + echo "Starting $1" + eval "$@" 2>>/dev/stderr & + [ $? -eq 0 ] && touch "/run/init.d/$1.pid" || return 1 +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__update_ssl_certs() { + [ -f "/config/env/ssl.sh" ] && . "/config/env/ssl.sh" + if [ -f "$SSL_CERT" ] && [ -f "$SSL_KEY" ]; then + mkdir -p /etc/ssl + [ -f "$SSL_CA" ] && cp -Rf "$SSL_CA" "/etc/ssl/$SSL_CA" + [ -f "$SSL_KEY" ] && cp -Rf "$SSL_KEY" "/etc/ssl/$SSL_KEY" + [ -f "$SSL_CERT" ] && cp -Rf "$SSL_CERT" "/etc/ssl/$SSL_CERT" + fi +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__certbot() { + local statusCode=0 + CERTBOT_DOMAINS="${CERTBOT_DOMAINS:-$HOSTNAME}" + [ -n "$(type -P 'certbot')" ] || return 1 + [ -f "/config/certbot/env.sh" ] && . "/config/certbot/env.sh" + if [ -f "/config/certbot/setup.sh" ]; then + eval "/config/certbot/setup.sh" + statusCode=$? + elif [ -f "/etc/named/certbot.sh" ]; then + eval "/etc/named/certbot.sh" + statusCode=$? + elif [ -f "/config/certbot/certbot.conf" ]; then + if certbot renew -n --dry-run --agree-tos --expand --dns-rfc2136 --dns-rfc2136-credentials /config/certbot/certbot.conf; then + certbot renew -n --agree-tos --expand --dns-rfc2136 --dns-rfc2136-credentials /config/certbot/certbot.conf + fi + statusCode=$? + elif [ -f "/config/named/certbot-update.conf" ]; then + if certbot renew -n --dry-run --agree-tos --expand --dns-rfc2136 --dns-rfc2136-credentials /config/named/certbot-update.conf; then + certbot renew -n --agree-tos --expand --dns-rfc2136 --dns-rfc2136-credentials /config/named/certbot-update.conf + fi + statusCode=$? + else + [ -n "$SSL_KEY" ] && mkdir -p "$(dirname "$SSL_KEY")" || { echo "The variable $SSL_KEY is not set" >&2 && return 1; } + [ -n "$SSL_CERT" ] && mkdir -p "$(dirname "$SSL_CERT")" || { echo "The variable $SSL_CERT is not set" >&2 && return 1; } + local options="${1:-create}" && shift 1 + domain_list="$DOMAINNAME www.$DOMAINNAME mail.$DOMAINNAME $CERTBOT_DOMAINS" + [ -f "/config/env/ssl.sh" ] && . "/config/env/ssl.sh" + [ "$CERT_BOT_ENABLED" = "true" ] || { export CERT_BOT_ENABLED="" && return 10; } + [ -n "$DOMAINNAME" ] || { echo "The variable DOMAINNAME is not set" >&2 && return 1; } + [ -n "$CERT_BOT_MAIL" ] || { echo "The variable CERT_BOT_MAIL is not set" >&2 && return 1; } + for domain in $$CERTBOT_DOMAINS; do + [ -n "$domain" ] && ADD_CERTBOT_DOMAINS="-d $domain $ADD_CERTBOT_DOMAINS" + done + if [ -n "$ADD_CERTBOT_DOMAINS" ]; then + certbot $options --agree-tos -m $CERT_BOT_MAIL certonly \ + --webroot "${WWW_ROOT_DIR:-/usr/share/httpd/default}" \ + --key-path "$SSL_KEY" --fullchain-path "$SSL_CERT" \ + $ADD_CERTBOT_DOMAINS + statusCode=$? + else + statusCode=1 + fi + fi + [ $statusCode -eq 0 ] && __update_ssl_certs + return $statusCode +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__display_user_info() { + if [ -n "$user_name" ] || [ -n "$user_pass" ] || [ -n "$root_user_name" ] || [ -n "$root_user_pass" ]; then + __banner "User info" + [ -n "$user_name" ] && __printf_space "40" "username:" "$user_name" && echo "$user_name" + [ -n "$user_pass" ] && __printf_space "40" "password:" "saved to ${USER_FILE_PREFIX}/${SERVICE_NAME}_pass" && echo "$user_pass" + [ -n "$root_user_name" ] && __printf_space "40" "root username:" "$root_user_name" && echo "$root_user_name" + [ -n "$root_user_pass" ] && __printf_space "40" "root password:" "saved to ${ROOT_FILE_PREFIX}/${SERVICE_NAME}_pass" && echo "$root_user_pass" + __banner "" + fi +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__init_config_etc() { + local COPY="no" + __is_dir_empty "$CONF_DIR" && COPY=yes + if [ ! -d "$CONF_DIR" ] || [ "$COPY" = "yes" ]; then + if [ -d "$ETC_DIR" ]; then + mkdir -p "$CONF_DIR" + __copy_templates "$ETC_DIR/." "$CONF_DIR/" + else + __copy_templates "$ETC_DIR" "$CONF_DIR" + fi + fi + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +} +__create_ssl_cert() { + local SSL_DIR="${SSL_DIR:-/etc/ssl}" + if ! __certbot create; then + [ -f "/config/env/ssl.sh" ] && . "/config/env/ssl.sh" + [ -n "$SSL_DIR" ] || { echo "SSL_DIR is unset" && return 1; } + [ -d "$SSL_DIR" ] || mkdir -p "$SSL_DIR" + if [ -n "$FORCE_SSL" ] || [ ! -f "$SSL_CERT" ] || [ ! -f "$SSL_KEY" ]; then + echo "Setting Country to $COUNTRY and Setting State/Province to $STATE and Setting City to $CITY" + echo "Setting OU to $UNIT and Setting ORG to $ORG and Setting server to $CN" + echo "All variables can be overwritten by creating a /config/.ssl.env and setting the variables there" + echo "Creating ssl key and certificate in $SSL_DIR and will be valid for $((VALID_FOR / 365)) year[s]" + # + openssl req \ + -new \ + -newkey rsa:$RSA \ + -days $VALID_FOR \ + -nodes \ + -x509 \ + -subj "/C=${COUNTRY// /\\ }/ST=${STATE// /\\ }/L=${CITY// /\\ }/O=${ORG// /\\ }/OU=${UNIT// /\\ }/CN=${CN// /\\ }" \ + -keyout "$SSL_KEY" \ + -out "$SSL_CERT" + fi + fi + if [ -f "$SSL_CERT" ] && [ -f "$SSL_KEY" ]; then + __update_ssl_certs + return 0 + else + return 2 + fi +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__init_apache() { + local etc_dir="" conf_dir="" conf_dir="" www_dir="" apache_bin="" + etc_dir="/etc/${1:-apache2}" + conf_dir="/config/${1:-apache2}" + www_dir="${WWW_ROOT_DIR:-/data/htdocs}" + apache_bin="$(type -P 'httpd' || type -P 'apache2')" + # + return 0 +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__init_nginx() { + local etc_dir="/etc/${1:-nginx}" + local conf_dir="/config/${1:-nginx}" + local www_dir="${WWW_ROOT_DIR:-/data/htdocs}" + local nginx_bin="$(type -P 'nginx')" + return 0 +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__init_php() { + local etc_dir="/etc/${1:-php}" + local conf_dir="/config/${1:-php}" + local php_bin="${PHP_BIN_DIR:-$(__find_php_bin)}" + return 0 +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__init_mysql() { + local db_dir="/data/db/mysql" + local etc_dir="${home:-/etc/${1:-mysql}}" + local db_user="${SERVICE_USER:-mysql}" + local conf_dir="/config/${1:-mysql}" + local user_pass="${MARIADB_PASSWORD:-$MARIADB_ROOT_PASSWORD}" + local user_db="${MARIADB_DATABASE}" user_name="${MARIADB_USER:-root}" + local root_pass="$MARIADB_ROOT_PASSWORD" + local mysqld_bin="$(type -P 'mysqld')" + return 0 +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__init_mongodb() { + local home="${MONGODB_CONFIG_FILE:-$(__find_mongodb_conf)}" + local user_pass="${MONGO_INITDB_ROOT_PASSWORD:-$_ROOT_PASSWORD}" + local user_name="${INITDB_ROOT_USERNAME:-root}" + return +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__init_postgres() { + local home="${PGSQL_CONFIG_FILE:-$(__find_pgsql_conf)}" + local user_pass="${POSTGRES_PASSWORD:-$POSTGRES_ROOT_PASSWORD}" + local user_name="${POSTGRES_USER:-root}" + return +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__init_couchdb() { + local home="${COUCHDB_CONFIG_FILE:-$(__find_couchdb_conf)}" + local user_pass="${COUCHDB_PASSWORD:-$SET_RANDOM_PASS}" + local user_name="${COUCHDB_USER:-root}" + return +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Show available init functions +__init_help() { + echo ' +__certbot +__update_ssl_certs +__create_ssl_cert +' + return +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__run_once() { + if [ "$CONFIG_DIR_INITIALIZED" = "false" ] || [ "$DATA_DIR_INITIALIZED" = "false" ] || [ ! -f "/config/.docker_has_run" ]; then + return 0 + else + return 1 + fi +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# run program ever n minutes +__cron() { + trap 'retVal=$?;[ -f "/run/cron/$bin.run" ] && rm -Rf "/run/cron/$bin.run";[ -f "/run/cron/$bin.pid" ] && rm -Rf "/run/cron/$bin.pid";exit ${retVal:-0}' SIGINT ERR EXIT + [ "$1" = "--pid" ] && pid="$2" && shift 2 || pid="$$" + test -n "$1" && test -z "${1//[0-9]/}" && interval=$(($1 * 60)) && shift 1 || interval="300" + [ $# -eq 0 ] && echo "Usage: cron [interval] [command]" && exit 1 + local command="$*" + local bin="$(basename "${CRON_NAME:-$1}")" + [ -d "/run/cron" ] || mkdir -p "/run/cron" + echo "$pid" >"/run/cron/$bin.pid" + echo "$command" >"/run/cron/$bin.run" + echo "Log is saved to /data/logs/cron.log" + while :; do + eval "$command" + sleep $interval + [ -f "/run/cron/$bin.run" ] || break + done 2>/dev/stderr >>"/data/logs/cron.log" +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__replace() { + local search="$1" replace="$2" file="${3:-$2}" + [ -e "$file" ] || return 1 + __sed "$search" "$replace" "$file" || return 0 +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__find_replace() { + local search="$1" replace="$2" file="${3:-$2}" + [ -e "$file" ] || return 1 + find "$file" -type f -not -path '.git*' -exec sed -i "s|$search|$replace|g" {} \; 2>/dev/null +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# /config > /etc +__copy_templates() { + local from="$1" to="$2" + if [ -e "$from" ] && __is_dir_empty "$to"; then + __file_copy "$from" "$to" + fi +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# /config/file > /etc/file +__symlink() { + local from="$1" to="$2" + if [ -e "$to" ]; then + [ -e "$from" ] && rm -rf "$from" + ln -sf "$to" "$from" && echo "Created symlink to $from > $to" + fi +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__file_copy() { + local from="$1" + local dest="$2" + if [ -n "$from" ] && [ -e "$from" ] && [ -n "$dest" ]; then + if [ -d "$from" ]; then + if cp -Rf "$from/." "$dest/" &>/dev/null; then + printf '%s\n' "Copied: $from > $dest" + return 0 + else + printf '%s\n' "Copy failed: $from < $dest" >&2 + return 1 + fi + else + if cp -Rf "$from" "$dest" &>/dev/null; then + printf '%s\n' "Copied: $from > $dest" + return 0 + else + printf '%s\n' "Copy failed: $from < $dest" >&2 + return 1 + fi + fi + else + printf '%s\n' "$from does not exist" >&2 + return 2 + fi +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__generate_random_uids() { + local set_random_uid="$(seq 3000 5000 | sort -R | head -n 1)" + while :; do + if grep -qs "x:.*:$set_random_uid:" "/etc/group" && ! grep -sq "x:$set_random_uid:.*:" "/etc/passwd"; then + set_random_uid=$((set_random_uid + 1)) + else + echo "$set_random_uid" + break + fi + done +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__setup_directories() { + APPLICATION_DIRS="${APPLICATION_DIRS//,/ }" + APPLICATION_FILES="${APPLICATION_FILES//,/ }" + ADD_APPLICATION_DIRS="${ADD_APPLICATION_DIRS//,/ }" + ADD_APPLICATION_FILES="${ADD_APPLICATION_FILES//,/ }" + # Setup WWW_ROOT_DIR + if [ "$IS_WEB_SERVER" = "yes" ]; then + APPLICATION_DIRS="$APPLICATION_DIRS $WWW_ROOT_DIR" + __initialize_www_root + (echo "Creating directory $WWW_ROOT_DIR with permissions 777" && mkdir -p "$WWW_ROOT_DIR" && find "$WWW_ROOT_DIR" -type d -exec chmod -f 777 {} \;) 2>/dev/stderr | tee -p -a "/data/logs/init.txt" + fi + # Setup DATABASE_DIR + if [ "$IS_DATABASE_SERVICE" = "yes" ] || [ "$USES_DATABASE_SERVICE" = "yes" ]; then + APPLICATION_DIRS="$APPLICATION_DIRS $DATABASE_DIR" + if __is_dir_empty "$DATABASE_DIR" || [ ! -d "$DATABASE_DIR" ]; then + (echo "Creating directory $DATABASE_DIR with permissions 777" && mkdir -p "$DATABASE_DIR" && chmod -f 777 "$DATABASE_DIR") 2>/dev/stderr | tee -p -a "/data/logs/init.txt" + fi + fi + # create default directories + for filedirs in $ADD_APPLICATION_DIRS $APPLICATION_DIRS; do + if [ -n "$filedirs" ] && [ ! -d "$filedirs" ]; then + (echo "Creating directory $filedirs with permissions 777" && mkdir -p "$filedirs" && chmod -f 777 "$filedirs") 2>/dev/stderr | tee -p -a "/data/logs/init.txt" + fi + done + # create default files + for application_files in $ADD_APPLICATION_FILES $APPLICATION_FILES; do + if [ -n "$application_files" ] && [ ! -e "$application_files" ]; then + (echo "Creating file $application_files with permissions 777" && touch "$application_files" && chmod -Rf 777 "$application_files") 2>/dev/stderr | tee -p -a "/data/logs/init.txt" + fi + done +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# set user on files/folders +__fix_permissions() { + change_user="${1:-${SERVICE_USER:-root}}" + change_group="${2:-${SERVICE_GROUP:-$change_user}}" + [ -n "$RUNAS_USER" ] && [ "$RUNAS_USER" != "root" ] && change_user="$RUNAS_USER" && change_group="$change_user" + if [ -n "$change_user" ]; then + if grep -sq "^$change_user:" "/etc/passwd"; then + for permissions in $ADD_APPLICATION_DIRS $APPLICATION_DIRS; do + if [ -n "$permissions" ] && [ -e "$permissions" ]; then + (chown -Rf $change_user "$permissions" && echo "changed ownership on $permissions to user:$change_user") 2>/dev/stderr | tee -p -a "/data/logs/init.txt" + fi + done + fi + fi + if [ -n "$change_group" ]; then + if grep -sq "^$change_group:" "/etc/group"; then + for permissions in $ADD_APPLICATION_DIRS $APPLICATION_DIRS; do + if [ -n "$permissions" ] && [ -e "$permissions" ]; then + (chgrp -Rf $change_group "$permissions" && echo "changed group ownership on $permissions to group $change_group") 2>/dev/stderr | tee -p -a "/data/logs/init.txt" + fi + done + fi + fi +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__get_gid() { grep "^$1:" /etc/group | awk -F ':' '{print $3}' || false; } +__get_uid() { grep "^$1:" /etc/passwd | awk -F ':' '{print $3}' || false; } +__check_for_uid() { cat "/etc/passwd" 2>/dev/null | awk -F ':' '{print $3}' | sort -u | grep -q "^$1$" || false; } +__check_for_guid() { cat "/etc/group" 2>/dev/null | awk -F ':' '{print $3}' | sort -u | grep -q "^$1$" || false; } +__check_for_user() { cat "/etc/passwd" 2>/dev/null | awk -F ':' '{print $1}' | sort -u | grep -q "^$1$" || false; } +__check_for_group() { cat "/etc/group" 2>/dev/null | awk -F ':' '{print $1}' | sort -u | grep -q "^$1$" || false; } +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# check if process is already running +__proc_check() { + cmd_bin="$(type -P "${1:-$EXEC_CMD_BIN}")" + cmd_name="$(basename "${cmd_bin:-$EXEC_CMD_NAME}")" + if __pgrep "$cmd_bin" || __pgrep "$cmd_name"; then + SERVICE_IS_RUNNING="yes" + touch "$SERVICE_PID_FILE" + echo "$cmd_name is already running" + return 0 + else + return 1 + fi +} + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__set_user_group_id() { + local exitStatus=0 + local set_user="${1:-$SERVICE_USER}" + local set_uid="${2:-${SERVICE_UID:-1000}}" + local set_gid="${3:-${SERVICE_GID:-1000}}" + local random_id="$(__generate_random_uids)" + set_uid="$(__get_uid "$set_user" || echo "$set_uid")" + set_gid="$(__get_gid "$set_user" || echo "$set_gid")" + grep -sq "^$create_user:" "/etc/passwd" "/etc/group" || return 0 + [ -n "$set_user" ] && [ "$set_user" != "root" ] || return + if grep -sq "^$set_user:" "/etc/passwd" "/etc/group"; then + if __check_for_guid "$set_gid"; then + groupmod -g "${set_gid}" $set_user 2>/dev/stderr | tee -p -a "/data/logs/init.txt" >/dev/null && chown -Rf ":$set_gid" + fi + if __check_for_uid "$set_uid"; then + usermod -u "${set_uid}" -g "${set_gid}" $set_user 2>/dev/stderr | tee -p -a "/data/logs/init.txt" >/dev/null && chown -Rf $set_uid:$set_gid + fi + fi + export SERVICE_UID="$set_uid" + export SERVICE_GID="$set_gid" +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__create_service_user() { + local exitStatus=0 + local create_user="${1:-$SERVICE_USER}" + local create_group="${2:-${SERVICE_GROUP:-$create_user}}" + local create_home_dir="${3:-$WORK_DIR}" + local create_uid="${4:-${SERVICE_UID:-$USER_UID}}" + local create_gid="${5:-${SERVICE_GID:-$USER_GID}}" + local random_id="$(__generate_random_uids)" + local create_home_dir="${create_home_dir:-/home/$create_user}" + grep -sq "^$create_user:" "/etc/passwd" && grep -sq "^$create_group:" "/etc/group" && return + [ "$create_user" = "root" ] && [ "$create_group" = "root" ] && return 0 + if [ "$RUNAS_USER" != "root" ] && [ "$RUNAS_USER" != "" ]; then + create_user="$RUNAS_USER" + create_group="$RUNAS_USER" + create_uid="${create_uid:-1000}" + create_gid="${create_gid:-1000}" + fi + create_uid="$(__get_uid "$set_user" || echo "$create_uid")" + create_gid="$(__get_gid "$set_user" || echo "$create_gid")" + [ -n "$create_uid" ] && [ "$create_uid" != "0" ] || create_uid="$random_id" + [ -n "$create_gid" ] && [ "$create_gid" != "0" ] || create_gid="$random_id" + while :; do + if __check_for_uid "$create_uid" && __check_for_guid "$create_gid"; then + create_uid=$(($random_id + 1)) + create_gid="$create_uid" + else + break + fi + done + if ! __check_for_group "$create_group"; then + echo "creating system group $create_group" + groupadd --force --system -g $create_gid $create_group 2>/dev/stderr | tee -p -a "/data/logs/init.txt" >/dev/null + fi + if ! __check_for_user "$create_user"; then + echo "creating system user $create_user" + useradd --system -u $create_uid -g $create_group -c "Account for $create_user" -d "$create_home_dir" -s /bin/false $create_user 2>/dev/stderr | tee -p -a "/data/logs/init.txt" >/dev/null + fi + grep -qs "$create_group" "/etc/group" || exitStatus=$((exitCode + 1)) + grep -qs "$create_user" "/etc/passwd" || exitStatus=$((exitCode + 1)) + [ $exitStatus -eq 0 ] && export WORK_DIR="${create_home_dir:-}" + if [ -n "$WORK_DIR" ]; then + [ -d "$WORK_DIR" ] || mkdir -p "$WORK_DIR" + [ -d "/etc/.skel" ] && cp -Rf /etc/.skel/. "$WORK_DIR/" + fi + export SERVICE_UID="$create_uid" SERVICE_GID="$create_gid" + export SERVICE_USER="$create_user" SERVICE_GROUP="$create_group" + return $exitStatus +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__create_env_file() { + local dir="" + local envStatus=0 + local envFile=("${@:-}") + local sample_file="/usr/local/etc/docker/env/default.sample" + [ -f "$sample_file" ] || return 0 + for create_env in "/usr/local/etc/docker/env/default.sh" "${envFile[@]}"; do + dir="$(dirname "$create_env")" + [ -d "$dir" ] || mkdir -p "$dir" + if [ -n "$create_env" ] && [ ! -f "$create_env" ]; then + cat </dev/null +$(<"$sample_file") +EOF + fi + [ -f "$create_env" ] || envStatus=$((1 + envStatus)) + done + rm -f "$sample_file" + return $envStatus +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__exec_command() { + local arg=("$@") + local bin="" + local exitCode="0" + local cmdExec="${arg:-}" + local pre_exec="--login -c" + local shell="$(type -P bash 2>/dev/null || type -P sh 2>/dev/null)" + bin="$(echo "${arg[@]}" | tr ' ' '\n' | grep -v '^$' | head -n1 || echo 'bash')" + prog="$(type -P "$bin" 2>/dev/null || echo "$bin")" + if [ -f "$prog" ] && [ -x "$prog" ]; then + echo "${exec_message:-Executing command: $cmdExec}" + eval $shell $pre_exec "$cmdExec" || exitCode=1 + exitCode=$? + elif [ -f "$prog" ] && [ ! -x "$prog" ]; then + echo "$prog is not executable" + exitCode=98 + else + echo "$prog does not exist" + exitCode=99 + fi + return $exitCode +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Setup the server init scripts +__start_init_scripts() { + [ "$1" = " " ] && shift 1 + [ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -o pipefail -x$DEBUGGER_OPTIONS || set -o pipefail + local retPID="" + local basename="" + local init_pids="" + local retstatus="0" + local initStatus="0" + local init_dir="${1:-/usr/local/etc/docker/init.d}" + local init_count="$(ls -A "$init_dir"/* 2>/dev/null | grep -v '\.sample' | wc -l)" + touch /run/__start_init_scripts.pid + mkdir -p "/tmp" "/run" "/run/init.d" "/usr/local/etc/docker/exec" + chmod -R 777 "/tmp" "/run" "/run/init.d" "/usr/local/etc/docker/exec" + if [ "$init_count" -eq 0 ] || [ ! -d "$init_dir" ]; then + mkdir -p "/data/logs/init" + while :; do echo "Running: $(date)" >"/data/logs/init/keep_alive" && sleep 3600; done & + else + if [ -d "$init_dir" ]; then + chmod -Rf 755 "$init_dir/" + [ -f "$init_dir/service.sample" ] && rm -Rf "$init_dir"/*.sample + for init in "$init_dir"/*.sh; do + if [ -f "$init" ]; then + name="$(basename "$init")" + service="$(printf '%s' "$name" | sed 's/^[^-]*-//;s|.sh$||g')" + printf '# - - - executing file: %s\n' "$init" + "$init" + retPID=$(__get_pid "$service") + if [ -n "$retPID" ]; then + initStatus="0" + sleep 20 + printf '# - - - %s has been started - pid: %s\n' "$service" "${retPID:-error}" + else + initStatus="1" + sleep 10 + printf '# - - - %s has falied to start - check log %s\n' "$service" "docker log $CONTAINER_NAME" + fi + echo "" + fi + retstatus=$(($initStatus + $initStatus)) + done + fi + fi + printf '%s\n' "$SERVICE_NAME started on $(date)" >"/data/logs/start.log" + return $retstatus +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__setup_mta() { + [ -d "/etc/ssmtp" ] || [ -d "/etc/postfix" ] || return + if [ ! -d "/config/ssmtp" ] || [ ! -d "/config/postfix" ]; then + echo "Configuring smtp server" + fi + local exitCode=0 + local relay_port="${EMAIL_RELAY//*:/}" + local relay_server="${EMAIL_RELAY//:*/}" + local local_hostname="${FULL_DOMAIN_NAME:-}" + local account_user="${SERVER_ADMIN//@*/}" + local account_domain="${EMAIL_DOMAIN//*@/}" + echo "$EMAIL_RELAY" | grep '[0-9][0-9]' || relay_port="465" + ################# sSMTP relay setup + if [ -n "$(type -P 'ssmtp')" ]; then + [ -d "/config/ssmtp" ] || mkdir -p "/config/ssmtp" + [ -f "/etc/ssmtp/ssmtp.conf" ] && rm -Rf "/etc/ssmtp/ssmtp.conf" + symlink_files="$(__find_file_relative "/config/ssmtp")" + if [ ! -f "/config/ssmtp/ssmtp.conf" ]; then + cat </dev/null +# ssmtp configuration. +root=${account_user:-root}@${account_domain:-$HOSTNAME} +mailhub=${relay_server:-172.17.0.1}:$relay_port +rewriteDomain=$local_hostname +hostname=$local_hostname +TLS_CA_FILE=/etc/ssl/certs/ca-certificates.crt +UseTLS=Yes +UseSTARTTLS=No +AuthMethod=LOGIN +FromLineOverride=yes +#AuthUser=username +#AuthPass=password + +EOF + fi + if [ -f "/config/ssmtp/ssmtp.conf" ]; then + for file in $symlink_files; do + __symlink "/config/ssmtp/$file" "/etc/ssmtp/$file" + __initialize_replace_variables "/etc/ssmtp/$file" + done + if [ -f "/etc/ssmtp/revaliases" ] && [ ! -f "/config/ssmtp/revaliases" ]; then + mv -f "/etc/ssmtp/revaliases" "/config/ssmtp/revaliases" + __symlink "/config/ssmtp/revaliases" "/etc/ssmtp/revaliases" + __initialize_replace_variables "/etc/ssmtp/revaliases" + else + touch "/config/ssmtp/revaliases" + __symlink "/config/ssmtp/revaliases" "/etc/ssmtp/revaliases" + __initialize_replace_variables "/etc/ssmtp/revaliases" + fi + echo "Done setting up ssmtp" + fi + + ################# postfix relay setup + elif [ -n "$(type -P 'postfix')" ]; then + [ -d "/etc/postfix" ] || mkdir -p "/etc/postfix" + [ -d "/config/postfix" ] || mkdir -p "/config/postfix" + [ -f "/etc/postfix/main.cf" ] && rm -Rf "/etc/postfix/main.cf" + symlink_files="$(__find_file_relative "/config/postfix")" + if [ ! -f "/config/postfix/main.cf" ]; then + cat </dev/null +# postfix configuration. +smtpd_banner = \$myhostname ESMTP email server +compatibility_level = 2 +inet_protocols = ipv4 +inet_interfaces = all +mydestination = +local_transport=error: local delivery disabled +mynetworks = /etc/postfix/mynetworks +alias_maps = hash:/etc/postfix/aliases +alias_database = hash:/etc/postfix/aliases +transport_maps = hash:/etc/postfix/transport +virtual_alias_maps = hash:/etc/postfix/virtual +relay_domains = hash:/etc/postfix/mydomains, regexp:/etc/postfix/mydomains.pcre +tls_random_source = dev:/dev/urandom +smtp_use_tls = yes +smtpd_use_tls = yes +smtpd_tls_session_cache_database = btree:/etc/postfix/smtpd_scache +smtpd_tls_exclude_ciphers = aNULL, eNULL, EXPORT, DES, RC4, MD5, PSK, aECDH, EDH-DSS-DES-CBC3-SHA, EDH-RSA-DES-CBC3-SHA, KRB5-DES, CBC3-SHA +smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination +append_dot_mydomain = yes +myorigin = $local_hostname +myhostname = $local_hostname +relayhost = [$relay_server]:$relay_port + +EOF + fi + if [ -d "/config/postfix" ]; then + touch "/config/postfix/aliases" "/config/postfix/mynetworks" "/config/postfix/transport" + touch "/config/postfix/mydomains.pcre" "/config/postfix/mydomains" "/config/postfix/virtual" + postmap "/config/aliases" "/config/mynetworks" "/config/transport" &>/dev/null + postmap "/config/mydomains.pcre" "/config/mydomains" "/config/virtual" &>/dev/null + for f in $symlink_files; do + __symlink "/config/postfix/$f" "/etc/postfix/$f" + __initialize_replace_variables "/etc/postfix/$f" + done + fi + if [ -f "/etc/postfix/main.cf" ] && [ ! -f "/run/init.d/postfix.pid" ]; then + SERVICES_LIST+="postfix " + if [ ! -f "/run/init.d/postfix.pid" ]; then + __exec_service postfix start + fi + echo "Done setting up postfix" + fi + fi + [ -f "/root/dead.letter" ] && rm -Rf "/root/dead.letter" + return $exitCode +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__initialize_web_health() { + local www_dir="${1:-${WWW_ROOT_DIR:-/usr/share/httpd/default}}" + [ $# -eq 1 ] && [ -d "$www_dir" ] || return 1 + if ! echo "$www_dir" | grep -q '/usr/share/httpd'; then + [ -d "$www_dir/health" ] || mkdir -p "$www_dir/health" + [ -f "$www_dir/health/index.txt" ] || echo 'OK' >"$www_dir/health/index.txt" + [ -f "$www_dir/health/index.json" ] || echo '{ "status": "OK" }' >"$www_dir/health/index.json" + __find_replace "REPLACE_CONTAINER_IP4" "${REPLACE_CONTAINER_IP4:-127.0.0.1}" "$www_dir" + __find_replace "REPLACE_COPYRIGHT_FOOTER" "${COPYRIGHT_FOOTER:-Copyright 1999 - $(date +'%Y')}" "$www_dir" + __find_replace "REPLACE_LAST_UPDATED_ON_MESSAGE" "${LAST_UPDATED_ON_MESSAGE:-$(date +'Last updated on: %Y-%m-%d at %H:%M:%S')}" "$www_dir" + fi + if [ -d "/usr/share/httpd" ]; then + __find_replace "REPLACE_CONTAINER_IP4" "${REPLACE_CONTAINER_IP4:-127.0.0.1}" "/usr/share/httpd" + __find_replace "REPLACE_COPYRIGHT_FOOTER" "${COPYRIGHT_FOOTER:-Copyright 1999 - $(date +'%Y')}" "/usr/share/httpd" + __find_replace "REPLACE_LAST_UPDATED_ON_MESSAGE" "${LAST_UPDATED_ON_MESSAGE:-$(date +'Last updated on: %Y-%m-%d at %H:%M:%S')}" "/usr/share/httpd" + fi +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# file_dir +__initialize_replace_variables() { + local set_dir="" get_dir="$*" + [ $# -ne 0 ] || return 1 + for set_dir in $get_dir; do + __find_replace "REPLACE_SSL_DIR" "${SSL_DIR:-/etc/ssl}" "$set_dir" + __find_replace "REPLACE_RANDOM_ID" "$(__random_password 8)" "$set_dir" + __find_replace "REPLACE_TZ" "${TZ:-${TIMEZONE:-America/New_York}}" "$set_dir" + __find_replace "REPLACE_SERVER_PROTO" "${SERVICE_PROTOCOL:-http}" "$set_dir" + __find_replace "REPLACE_SERVER_SITE_TITLE" "${SERVER_SITE_TITLE:-CasjaysDev - Docker Container}" "$set_dir" + __find_replace "REPLACE_TMP_DIR" "${TMP_DIR:-/tmp/$SERVICE_NAME}" "$set_dir" + __find_replace "REPLACE_RUN_DIR" "${RUN_DIR:-/run/$SERVICE_NAME}" "$set_dir" + __find_replace "REPLACE_LOG_DIR" "${LOG_DIR:-/data/logs/$SERVICE_NAME}" "$set_dir" + __find_replace "REPLACE_ETC_DIR" "${ETC_DIR:-/etc/$SERVICE_NAME}" "$set_dir" + __find_replace "REPLACE_DATA_DIR" "${DATA_DIR:-/data/$SERVICE_NAME}" "$set_dir" + __find_replace "REPLACE_CONFIG_DIR" "${CONF_DIR:-/config/$SERVICE_NAME}" "$set_dir" + __find_replace "REPLACE_EMAIL_RELAY" "${EMAIL_RELAY:-172.17.0.1}" "$set_dir" + __find_replace "REPLACE_SERVER_ADMIN" "${SERVER_ADMIN:-root@${EMAIL_DOMAIN:-${FULL_DOMAIN_NAME:-$HOSTNAME}}}" "$set_dir" + __find_replace "REPLACE_APP_USER" "${SERVICE_USER:-${RUNAS_USER:-root}}" "$set_dir" + __find_replace "REPLACE_WWW_USER" "${SERVICE_USER:-${RUNAS_USER:-root}}" "$set_dir" + __find_replace "REPLACE_APP_GROUP" "${SERVICE_GROUP:-${SERVICE_USER:-${RUNAS_USER:-root}}}" "$set_dir" + __find_replace "REPLACE_WWW_GROUP" "${SERVICE_GROUP:-${SERVICE_USER:-${RUNAS_USER:-root}}}" "$set_dir" + __find_replace "REPLACE_SERVICE_USER" "${SERVICE_USER:-${RUNAS_USER:-root}}" "$set_dir" + __find_replace "REPLACE_SERVICE_GROUP" "${SERVICE_GROUP:-${RUNAS_USER:-root}}" "$set_dir" + if [ -n "$VAR_DIR" ]; then + mkdir -p "$VAR_DIR" + __find_replace "REPLACE_VAR_DIR" "$VAR_DIR" "$set_dir" + fi + [ -n "$SERVICE_PORT" ] && __find_replace "REPLACE_SERVER_PORT" "${SERVICE_PORT:-80}" "$set_dir" + [ -n "$HOSTNAME" ] && __find_replace "REPLACE_SERVER_NAME" "${FULL_DOMAIN_NAME:-$HOSTNAME}" "$set_dir" + [ -n "$CONTAINER_NAME" ] && __find_replace "REPLACE_SERVER_SOFTWARE" "${CONTAINER_NAME:-docker}" "$set_dir" + [ -n "$WWW_ROOT_DIR" ] && __find_replace "REPLACE_SERVER_WWW_DIR" "${WWW_ROOT_DIR:-/usr/share/httpd/default}" "$set_dir" + done + mkdir -p "${TMP_DIR:-/tmp/$SERVICE_NAME}" "${RUN_DIR:-/run/$SERVICE_NAME}" "${LOG_DIR:-/data/logs/$SERVICE_NAME}" + chmod -f 777 "${TMP_DIR:-/tmp/$SERVICE_NAME}" "${RUN_DIR:-/run/$SERVICE_NAME}" "${LOG_DIR:-/data/logs/$SERVICE_NAME}" +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__initialize_database() { + [ "$IS_DATABASE_SERVICE" = "yes" ] || [ "$USES_DATABASE_SERVICE" = "yes" ] || return 0 + local dir="${1:-$ETC_DIR}" + local db_normal_user="${DATABASE_USER_NORMAL:-$user_name}" + local db_normal_pass="${DATABASE_PASS_NORMAL:-$user_pass}" + local db_admin_user="${DATABASE_USER_ROOT:-$root_user_name}" + local db_admin_pass="${DATABASE_PASS_ROOT:-$root_user_pass}" + __find_replace "REPLACE_USER_NAME" "$db_normal_user" "$dir" + __find_replace "REPLACE_USER_PASS" "$db_normal_pass" "$dir" + __find_replace "REPLACE_DATABASE_USER" "$db_normal_user" "$dir" + __find_replace "REPLACE_DATABASE_PASS" "$db_normal_pass" "$dir" + __find_replace "REPLACE_ROOT_ADMIN" "$db_admin_user" "$dir" + __find_replace "REPLACE_ROOT_PASS" "$db_admin_pass" "$dir" + __find_replace "REPLACE_DATABASE_ROOT_USER" "$db_admin_user" "$dir" + __find_replace "REPLACE_DATABASE_ROOT_PASS" "$db_admin_pass" "$dir" + __find_replace "REPLACE_DATABASE_NAME" "$DATABASE_NAME" "$dir" + __find_replace "REPLACE_DATABASE_DIR" "$DATABASE_DIR" "$dir" + if echo "$dir" | grep -q '^/etc'; then + __find_replace "REPLACE_USER_NAME" "$db_normal_user" "/etc" + __find_replace "REPLACE_USER_PASS" "$db_normal_pass" "/etc" + __find_replace "REPLACE_DATABASE_USER" "$db_normal_user" "/etc" + __find_replace "REPLACE_DATABASE_PASS" "$db_normal_pass" "/etc" + __find_replace "REPLACE_ROOT_ADMIN" "$db_admin_user" "/etc" + __find_replace "REPLACE_ROOT_PASS" "$db_admin_pass" "/etc" + __find_replace "REPLACE_DATABASE_ROOT_USER" "$db_admin_user" "/etc" + __find_replace "REPLACE_DATABASE_ROOT_PASS" "$db_admin_pass" "/etc" + __find_replace "REPLACE_DATABASE_NAME" "$DATABASE_NAME" "/etc" + __find_replace "REPLACE_DATABASE_DIR" "$DATABASE_DIR" "/etc" + fi +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__initialize_db_users() { + [ "$IS_DATABASE_SERVICE" = "yes" ] || [ "$USES_DATABASE_SERVICE" = "yes" ] || return 0 + db_normal_user="${DATABASE_USER_NORMAL:-$user_name}" + db_normal_pass="${DATABASE_PASS_NORMAL:-$user_pass}" + db_admin_user="${DATABASE_USER_ROOT:-$root_user_name}" + db_admin_pass="${DATABASE_PASS_ROOT:-$root_user_pass}" + export DATABASE_USER="$db_normal_user" DATABASE_PASSWORD="$db_normal_pass" + export DATABASE_ROOT_USER="$db_admin_user" DATABASE_ROOT_PASSWORD="$db_admin_pass" + export db_normal_user db_normal_pass db_admin_user db_admin_pass +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__initialize_system_etc() { + local conf_dir="$1" + local dir="" + local file=() + local directories="" + if [ -n "$conf_dir" ] && [ -e "$conf_dir" ]; then + files="$(find "$conf_dir"/* -not -path '*/env/*' -type f 2>/dev/null | sed 's|'/config/'||g' | sort -u | grep -v '^$' | grep '^' || false)" + directories="$(find "$conf_dir"/* -not -path '*/env/*' -type d 2>/dev/null | sed 's|'/config/'||g' | sort -u | grep -v '^$' | grep '^' || false)" + echo "Copying config files to system: $conf_dir > /etc/${conf_dir//\/config\//}" + if [ -n "$directories" ]; then + for d in $directories; do + dir="/etc/$d" + echo "Creating directory: $dir" + mkdir -p "$dir" + done + fi + for f in $files; do + etc_file="/etc/$f" + conf_file="/config/$f" + [ -f "$etc_file" ] && rm -Rf "$etc_file" + __symlink "$etc_file" "$conf_file" + __initialize_replace_variables "$etc_file" + done + fi +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__initialize_custom_bin_dir() { + local SET_USR_BIN="" + [ -d "/data/bin" ] && SET_USR_BIN+="$(__find /data/bin f) " + [ -d "/config/bin" ] && SET_USR_BIN+="$(__find /config/bin f) " + if [ -n "$SET_USR_BIN" ]; then + echo "Setting up bin $SET_USR_BIN > $LOCAL_BIN_DIR" + for create_bin_template in $SET_USR_BIN; do + if [ -n "$create_bin_template" ]; then + create_bin_name="$(basename "$create_bin_template")" + if [ -e "$create_bin_template" ]; then + ln -sf "$create_bin_template" "$LOCAL_BIN_DIR/$create_bin_name" + fi + fi + done + unset create_bin_template create_bin_name SET_USR_BIN + fi +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__initialize_default_templates() { + if [ -n "$DEFAULT_TEMPLATE_DIR" ]; then + if [ "$CONFIG_DIR_INITIALIZED" = "false" ] && [ -d "/config" ]; then + echo "Copying default config files $DEFAULT_TEMPLATE_DIR > /config" + for create_config_template in "$DEFAULT_TEMPLATE_DIR"/*; do + if [ -n "$create_config_template" ]; then + create_template_name="$(basename "$create_config_template")" + if [ -d "$create_config_template" ]; then + mkdir -p "/config/$create_template_name/" + __is_dir_empty "/config/$create_template_name" && cp -Rf "$create_config_template/." "/config/$create_template_name/" 2>/dev/null + elif [ -e "$create_config_template" ]; then + [ -e "/config/$create_template_name" ] || cp -Rf "$create_config_template" "/config/$create_template_name" 2>/dev/null + fi + fi + done + unset create_config_template create_template_name + fi + fi +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__initialize_config_dir() { + if [ -n "$DEFAULT_CONF_DIR" ]; then + if [ "$CONFIG_DIR_INITIALIZED" = "false" ] && [ -d "/config" ]; then + echo "Copying custom config files: $DEFAULT_CONF_DIR > /config" + for create_config_template in "$DEFAULT_CONF_DIR"/*; do + create_config_name="$(basename "$create_config_template")" + if [ -n "$create_config_template" ]; then + if [ -d "$create_config_template" ]; then + mkdir -p "/config/$create_config_name" + __is_dir_empty "/config/$create_config_name" && cp -Rf "$create_config_template/." "/config/$create_config_name/" 2>/dev/null + elif [ -e "$create_config_template" ]; then + [ -e "/config/$create_config_name" ] || cp -Rf "$create_config_template" "/config/$create_config_name" 2>/dev/null + fi + fi + done + unset create_config_template create_config_name + fi + fi +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__initialize_data_dir() { + if [ -d "/data" ]; then + if [ "$DATA_DIR_INITIALIZED" = "false" ] && [ -n "$DEFAULT_DATA_DIR" ]; then + echo "Copying data files $DEFAULT_DATA_DIR > /data" + for create_data_template in "$DEFAULT_DATA_DIR"/*; do + create_data_name="$(basename "$create_data_template")" + if [ -n "$create_data_template" ]; then + if [ -d "$create_data_template" ]; then + mkdir -p "/data/$create_data_name" + __is_dir_empty "/data/$create_data_name" && cp -Rf "$create_data_template/." "/data/$create_data_name/" 2>/dev/null + elif [ -e "$create_data_template" ]; then + [ -e "/data/$create_data_name" ] || cp -Rf "$create_data_template" "/data/$create_data_name" 2>/dev/null + fi + fi + done + unset create_template + fi + fi +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__initialize_www_root() { + local WWW_INIT="" + local WWW_TEMPLATE="" + [ -d "/usr/share/httpd/default" ] && WWW_TEMPLATE="/usr/share/httpd/default" + [ "$WWW_ROOT_DIR" = "/app" ] && WWW_INIT="${WWW_INIT:-true}" + [ "$WWW_ROOT_DIR" = "/data/htdocs" ] && WWW_INIT="${WWW_INIT:-true}" + __is_dir_empty "$WWW_ROOT_DIR/" && WWW_INIT="true" || WWW_INIT="false" + if [ "$WWW_INIT" = "true" ] && [ -d "$WWW_TEMPLATE" ]; then + cp -Rf "$DEFAULT_DATA_DIR/data/htdocs/." "$WWW_ROOT_DIR/" 2>/dev/null + fi + __initialize_web_health "$WWW_ROOT_DIR" + find "$WWW_ROOT_DIR" -type d -exec chmod -f 777 {} \; 2>/dev/null +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__is_htdocs_mounted() { + echo "$IMPORT_FROM_GIT" | grep -qE 'https://|http://|git://|ssh://' || unset IMPORT_FROM_GIT + if [ -n "$IMPORT_FROM_GIT" ] && [ "$(command -v "git")" ]; then + export WWW_ROOT_DIR="/data/htdocs" + __is_dir_empty "$WWW_ROOT_DIR" || WWW_ROOT_DIR="/data/wwwroot" + echo "Importing project from $IMPORT_FROM_GIT to $WWW_ROOT_DIR" + git clone -q "$IMPORT_FROM_GIT" "$WWW_ROOT_DIR" + elif [ -d "/app" ]; then + export WWW_ROOT_DIR="/app" + elif [ -d "/data/htdocs" ]; then + export WWW_ROOT_DIR="/data/htdocs" + elif [ -d "/data/wwwroot" ]; then + export WWW_ROOT_DIR="/data/wwwroot" + else + WWW_ROOT_DIR="${ENV_WWW_ROOT_DIR:-$WWW_ROOT_DIR}" + export WWW_ROOT_DIR="${WWW_ROOT_DIR:-/usr/share/httpd/default}" + fi +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__initialize_ssl_certs() { + [ -d "$SSL_DIR" ] || mkdir -p "$SSL_DIR" + if [ "$SSL_ENABLED" = "true" ] || [ "$SSL_ENABLED" = "yes" ]; then + if [ -f "$SSL_CERT" ] && [ -f "$SSL_KEY" ]; then + SSL_ENABLED="true" + if [ -n "$SSL_CA" ] && [ -f "$SSL_CA" ]; then + mkdir -p "$SSL_DIR/certs" + cat "$SSL_CA" >>"/etc/ssl/certs/ca-certificates.crt" + cp -Rf "/." "$SSL_DIR/" + fi + else + [ -d "$SSL_DIR" ] || mkdir -p "$SSL_DIR" + __create_ssl_cert + fi + type update-ca-certificates &>/dev/null && update-ca-certificates &>/dev/null + fi +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__start_php_dev_server() { + if [ "$2" = "yes" ]; then + if [ -d "/usr/share/httpd" ]; then + find "/usr/share/httpd" -type f -not -path '.git*' -iname '*.php' -exec sed -i 's|[<].*SERVER_ADDR.*[>]|'${CONTAINER_IP4_ADDRESS:-127.0.0.1}'|g' {} \; 2>/dev/null + php -S 0.0.0.0:$PHP_DEV_SERVER_PORT -t "/usr/share/httpd" + fi + if ! echo "$1" | grep -q "^/usr/share/httpd"; then + find "$1" -type f -not -path '.git*' -iname '*.php' -exec sed -i 's|[<].*SERVER_ADDR.*[>]|'${CONTAINER_IP4_ADDRESS:-127.0.0.1}'|g' {} \; 2>/dev/null + php -S 0.0.0.0:$PHP_DEV_SERVER_PORT -t "$1" + fi + fi +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__check_service() { + if [ "$1" = "check" ]; then + shift $# + __proc_check "$EXEC_CMD_NAME" || __proc_check "$EXEC_CMD_BIN" + exit $? + fi +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__switch_to_user() { + if [ "$RUNAS_USER" = "roo t" ]; then + su_cmd() { + su_exec="" + eval "$@" || return 1 + } + elif [ "$(builtin type -P gosu)" ]; then + su_exec="gosu $RUNAS_USER" + su_cmd() { gosu $RUNAS_USER "$@" || return 1; } + elif [ "$(builtin type -P runuser)" ]; then + su_exec="runuser -u $RUNAS_USER" + su_cmd() { runuser -u $RUNAS_USER "$@" || return 1; } + elif [ "$(builtin type -P sudo)" ]; then + su_exec="sudo -u $RUNAS_USER" + su_cmd() { sudo -u $RUNAS_USER "$@" || return 1; } + elif [ "$(builtin type -P su)" ]; then + su_exec="su -s /bin/sh - $RUNAS_USER" + su_cmd() { su -s /bin/sh - $RUNAS_USER -c "$@" || return 1; } + else + su_cmd() { + su_exec="" + echo "Can not switch to $RUNAS_USER: attempting to run as root" && eval "$@" || return 1 + } + fi + export su_exec +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# set variables from function calls +export INIT_DATE="${INIT_DATE:-$(date)}" +export START_SERVICES="${START_SERVICES:-yes}" +export ENTRYPOINT_MESSAGE="${ENTRYPOINT_MESSAGE:-yes}" +export ENTRYPOINT_FIRST_RUN="${ENTRYPOINT_FIRST_RUN:-yes}" +export DATA_DIR_INITIALIZED="${DATA_DIR_INITIALIZED:-false}" +export CONFIG_DIR_INITIALIZED="${CONFIG_DIR_INITIALIZED:-false}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# System +export LANG="${LANG:-C.UTF-8}" +export LC_ALL="${LANG:-C.UTF-8}" +export TZ="${TZ:-${TIMEZONE:-America/New_York}}" +export HOSTNAME="${FULL_DOMAIN_NAME:-${SERVER_HOSTNAME:-$HOSTNAME}}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Default directories +export SSL_DIR="${SSL_DIR:-/config/ssl}" +export SSL_CA="${SSL_CERT:-/config/ssl/ca.crt}" +export SSL_KEY="${SSL_KEY:-/config/ssl/localhost.pem}" +export SSL_CERT="${SSL_CERT:-/config/ssl/localhost.crt}" +export BACKUP_DIR="${BACKUP_DIR:-/data/backups}" +export LOCAL_BIN_DIR="${LOCAL_BIN_DIR:-/usr/local/bin}" +export DEFAULT_DATA_DIR="${DEFAULT_DATA_DIR:-/usr/local/share/template-files/data}" +export DEFAULT_CONF_DIR="${DEFAULT_CONF_DIR:-/usr/local/share/template-files/config}" +export DEFAULT_TEMPLATE_DIR="${DEFAULT_TEMPLATE_DIR:-/usr/local/share/template-files/defaults}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +CONTAINER_IP4_ADDRESS="${CONTAINER_IP4_ADDRESS:-$(__get_ip4)}" +CONTAINER_IP6_ADDRESS="${CONTAINER_IP6_ADDRESS:-$(__get_ip6)}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Additional +export SET_RANDOM_PASS="${SET_RANDOM_PASS:-$(__random_password 16)}" +export PHP_INI_DIR="${PHP_INI_DIR:-$(__find_php_ini)}" +export PHP_BIN_DIR="${PHP_BIN_DIR:-$(__find_php_bin)}" +export HTTPD_CONFIG_FILE="${HTTPD_CONFIG_FILE:-$(__find_httpd_conf)}" +export NGINX_CONFIG_FILE="${NGINX_CONFIG_FILE:-$(__find_nginx_conf)}" +export MYSQL_CONFIG_FILE="${MYSQL_CONFIG_FILE:-$(__find_mysql_conf)}" +export PGSQL_CONFIG_FILE="${PGSQL_CONFIG_FILE:-$(__find_pgsql_conf)}" +export LIGHTTPD_CONFIG_FILE="${LIGHTTPD_CONFIG_FILE:-$(__find_lighttpd_conf)}" +export MARIADB_CONFIG_FILE="${MARIADB_CONFIG_FILE:-$(__find_mysql_conf)}" +export POSTGRES_CONFIG_FILE="${POSTGRES_CONFIG_FILE:-$(__find_pgsql_conf)}" +export MONGODB_CONFIG_FILE="${MONGODB_CONFIG_FILE:-$(__find_mongodb_conf)}" +export ENTRYPOINT_PID_FILE="${ENTRYPOINT_PID_FILE:-/run/init.d/entrypoint.pid}" +export ENTRYPOINT_INIT_FILE="${ENTRYPOINT_INIT_FILE:-/config/.entrypoint.done}" +export ENTRYPOINT_DATA_INIT_FILE="${ENTRYPOINT_DATA_INIT_FILE:-/data/.docker_has_run}" +export ENTRYPOINT_CONFIG_INIT_FILE="${ENTRYPOINT_CONFIG_INIT_FILE:-/config/.docker_has_run}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# is already Initialized +[ -z "$DATA_DIR_INITIALIZED" ] && { [ -f "$ENTRYPOINT_DATA_INIT_FILE" ] && DATA_DIR_INITIALIZED="true" || DATA_DIR_INITIALIZED="false"; } +[ -z "$CONFIG_DIR_INITIALIZED" ] && { [ -f "$ENTRYPOINT_CONFIG_INIT_FILE" ] && CONFIG_DIR_INITIALIZED="true" || CONFIG_DIR_INITIALIZED="false"; } +[ -z "$ENTRYPOINT_FIRST_RUN" ] && { { [ -f "$ENTRYPOINT_PID_FILE" ] || [ -f "$ENTRYPOINT_INIT_FILE" ]; } && ENTRYPOINT_FIRST_RUN="no" || ENTRYPOINT_FIRST_RUN="true"; } +export ENTRYPOINT_DATA_INIT_FILE DATA_DIR_INITIALIZED ENTRYPOINT_CONFIG_INIT_FILE CONFIG_DIR_INITIALIZED +export ENTRYPOINT_PID_FILE ENTRYPOINT_INIT_FILE ENTRYPOINT_FIRST_RUN +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# export the functions +export -f __get_pid __start_init_scripts __is_running __certbot __update_ssl_certs __create_ssl_cert +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# end of functions diff --git a/rootfs/usr/local/etc/docker/init.d/00-named.sh b/rootfs/usr/local/etc/docker/init.d/00-named.sh new file mode 100755 index 0000000..ad473dd --- /dev/null +++ b/rootfs/usr/local/etc/docker/init.d/00-named.sh @@ -0,0 +1,664 @@ +#!/usr/bin/env bash +# shellcheck shell=bash +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +##@Version : 202408270904-git +# @@Author : Jason Hempstead +# @@Contact : jason@casjaysdev.pro +# @@License : WTFPL +# @@ReadME : 00-named.sh --help +# @@Copyright : Copyright: (c) 2024 Jason Hempstead, Casjays Developments +# @@Created : Tuesday, Aug 27, 2024 09:04 EDT +# @@File : 00-named.sh +# @@Description : +# @@Changelog : New script +# @@TODO : Better documentation +# @@Other : +# @@Resource : +# @@Terminal App : no +# @@sudo/root : no +# @@Template : other/start-service +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# shellcheck disable=SC2016 +# shellcheck disable=SC2031 +# shellcheck disable=SC2120 +# shellcheck disable=SC2155 +# shellcheck disable=SC2199 +# shellcheck disable=SC2317 +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# run trap command on exit +trap 'retVal=$?;[ "$SERVICE_IS_RUNNING" != "yes" ] && [ -f "$SERVICE_PID_FILE" ] && rm -Rf "$SERVICE_PID_FILE";exit $retVal' SIGINT SIGTERM EXIT +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# setup debugging - https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html +[ -f "/config/.debug" ] && [ -z "$DEBUGGER_OPTIONS" ] && export DEBUGGER_OPTIONS="$(<"/config/.debug")" || DEBUGGER_OPTIONS="${DEBUGGER_OPTIONS:-}" +{ [ "$DEBUGGER" = "on" ] || [ -f "/config/.debug" ]; } && echo "Enabling debugging" && set -xo pipefail -x$DEBUGGER_OPTIONS && export DEBUGGER="on" || set -o pipefail +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +export PATH="/usr/local/etc/docker/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +SCRIPT_FILE="$0" +SERVICE_NAME="named" +SCRIPT_NAME="$(basename "$SCRIPT_FILE" 2>/dev/null)" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# exit if __start_init_scripts function hasn't been Initialized +if [ ! -f "/run/__start_init_scripts.pid" ]; then + echo "__start_init_scripts function hasn't been Initialized" >&2 + SERVICE_IS_RUNNING="no" + exit 1 +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# import the functions file +if [ -f "/usr/local/etc/docker/functions/entrypoint.sh" ]; then + . "/usr/local/etc/docker/functions/entrypoint.sh" +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# import variables +for set_env in "/root/env.sh" "/usr/local/etc/docker/env"/*.sh "/config/env"/*.sh; do + [ -f "$set_env" ] && . "$set_env" +done +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +printf '%s\n' "# - - - Initializing $SERVICE_NAME - - - #" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Custom functions +__rndc_key() { grep -s 'key "rndc-key" ' /etc/named.conf | grep -v 'KEY_RNDC' | sed 's|.*secret ||g;s|"||g;s|;.*||g' | grep '^' || return 1; } +__tsig_key() { tsig-keygen -a hmac-sha256 | grep 'secret' | sed 's|.*secret "||g;s|"||g;s|;||g' | grep '^' || echo 'wp/HApbthaVPjwqgp6ziLlmnkyLSNbRTehkdARBDcpI='; } + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Script to execute +START_SCRIPT="/usr/local/etc/docker/exec/$SERVICE_NAME" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Reset environment before executing service +RESET_ENV="no" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set the database root dir - [DATABASE_DIR_SQLITE,DATABASE_DIR_REDIS,DATABASE_DIR_POSTGRES,DATABASE_DIR_MARIADB,DATABASE_DIR_COUCHDB,DATABASE_DIR_MONGODB,DATABASE_DIR_SUPABASE] +DATABASE_BASE_DIR="${DATABASE_BASE_DIR:-/data/db}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set the database sub directory [sqlite,postgres,mysql,mariadb,redis,couchdb,mongodb,$APPNAME] +DATABASE_SUBDIR="named" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# set the database directory - set by the above variables +DATABASE_DIR="$DATABASE_BASE_DIR/$DATABASE_SUBDIR" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set webroot +WWW_ROOT_DIR="/usr/share/httpd/default" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Default predefined variables +DATA_DIR="/data/named" # set data directory +CONF_DIR="/config/named" # set config directory +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# set the containers etc directory +ETC_DIR="/etc/bind" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# set the var dir +VAR_DIR="/var/bind" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +TMP_DIR="/tmp/named" # set the temp dir +RUN_DIR="/run/named" # set scripts pid dir +LOG_DIR="/data/logs/named" # set log directory +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set the working dir +WORK_DIR="" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# port which service is listening on +SERVICE_PORT="53" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# User to use to launch service - IE: postgres +RUNAS_USER="root" # normally root +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# User and group in which the service switches to - IE: nginx,apache,mysql,postgres +#SERVICE_USER="named" # execute command as another user +#SERVICE_GROUP="named" # Set the service group +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set password length +RANDOM_PASS_USER="" +RANDOM_PASS_ROOT="" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set user and group ID +SERVICE_UID="0" # set the user id +SERVICE_GID="0" # set the group id +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# execute command variables - keep single quotes variables will be expanded later +EXEC_CMD_BIN='named' # command to execute +EXEC_CMD_ARGS='-f -c $ETC_DIR/named.conf' # command arguments +EXEC_PRE_SCRIPT='' # execute script before +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Is this service a web server +IS_WEB_SERVER="no" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Is this service a database server +IS_DATABASE_SERVICE="no" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Does this service use a database server +USES_DATABASE_SERVICE="no" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Show message before execute +PRE_EXEC_MESSAGE="" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set the wait time to execute __post_execute function - minutes +POST_EXECUTE_WAIT_TIME="1" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Update path var +PATH="$PATH:." +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Where to save passwords to +ROOT_FILE_PREFIX="/config/secure/auth/root" # directory to save username/password for root user +USER_FILE_PREFIX="/config/secure/auth/user" # directory to save username/password for normal user +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# root/admin user info password/random] +root_user_name="${NAMED_ROOT_USER_NAME:-}" # root user name +root_user_pass="${NAMED_ROOT_PASS_WORD:-}" # root user password +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Normal user info [password/random] +user_name="${NAMED_USER_NAME:-}" # normal user name +user_pass="${NAMED_USER_PASS_WORD:-}" # normal user password +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Load variables from config +[ -f "/config/env/named.script.sh" ] && . "/config/env/named.script.sh" # Generated by my dockermgr script +[ -f "/config/env/named.sh" ] && . "/config/env/named.sh" # Overwrite the variabes +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Additional predefined variables +KEY_RNDC="${KEY_RNDC:-$(__tsig_key)}" +KEY_DHCP="${KEY_DHCP:-$(__tsig_key)}" +KEY_BACKUP="${KEY_BACKUP:-$(__tsig_key)}" +KEY_CERTBOT="${KEY_CERTBOT:-$(__tsig_key)}" +DNS_SERIAL="$(date +'%Y%m%d%S')" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Additional variables +DNS_SERVER_PRIMARY="${DNS_SERVER_PRIMARY:-}" +DNS_SERVER_SECONDARY="${DNS_SERVER_SECONDARY:-}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Specifiy custom directories to be created +ADD_APPLICATION_FILES="" +ADD_APPLICATION_DIRS="" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +APPLICATION_FILES="$LOG_DIR/$SERVICE_NAME.log" +APPLICATION_DIRS="$RUN_DIR $ETC_DIR $CONF_DIR $LOG_DIR $TMP_DIR" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Additional config dirs - will be Copied to /etc/$name +ADDITIONAL_CONFIG_DIRS="" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# define variables that need to be loaded into the service - escape quotes - var=\"value\",other=\"test\" +CMD_ENV="" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Overwrite based on file/directory + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Per Application Variables or imports + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Custom commands to run before copying to /config +__run_precopy() { + # Define environment + local hostname=${HOSTNAME} + # Define actions/commands + +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Custom prerun functions - IE setup WWW_ROOT_DIR +__execute_prerun() { + # Define environment + local hostname=${HOSTNAME} + # Define actions/commands + +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Run any pre-execution checks +__run_pre_execute_checks() { + # Set variables + local exitStatus=0 + local pre_execute_checks_MessageST="Running preexecute check for $SERVICE_NAME" # message to show at start + local pre_execute_checks_MessageEnd="Finished preexecute check for $SERVICE_NAME" # message to show at completion + __banner "$pre_execute_checks_MessageST" + # Put command to execute in parentheses + { + true + } + exitStatus=$? + __banner "$pre_execute_checks_MessageEnd: Status $exitStatus" + + # show exit message + if [ $exitStatus -ne 0 ]; then + echo "The pre-execution check has failed" >&2 + [ -f "$SERVICE_PID_FILE" ] && rm -Rf "$SERVICE_PID_FILE" + exit 1 + fi + return $exitStatus +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# use this function to update config files - IE: change port +__update_conf_files() { + local exitCode=0 # default exit code + local sysname="${SERVER_NAME:-${FULL_DOMAIN_NAME:-$HOSTNAME}}" # set hostname + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # delete files + #__rm "" + + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # custom commands + mkdir -p "$ETC_DIR/keys" "$CONF_DIR/keys" "$VAR_DIR/zones" "$DATA_DIR/zones" + for logfile in xfer update notify querylog default debug security; do + touch "$LOG_DIR/$logfile.log" + chmod -Rf 777 "$logfile" + done + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # replace variables + __replace "REPLACE_KEY_RNDC" "$KEY_RNDC" "$CONF_DIR/rndc.key" + __replace "REPLACE_KEY_RNDC" "$KEY_RNDC" "$CONF_DIR/named.conf" + __replace "REPLACE_KEY_DHCP" "$KEY_DHCP" "$CONF_DIR/named.conf" + __replace "REPLACE_KEY_BACKUP" "$KEY_BACKUP" "$CONF_DIR/named.conf" + __replace "REPLACE_KEY_CERTBOT" "$KEY_CERTBOT" "$CONF_DIR/named.conf" + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # define actions + if [ -f "$CONF_DIR/custom.conf" ]; then + mv -f "$CONF_DIR/custom.conf" "$ETC_DIR/named.conf" + elif [ -f "$ETC_DIR/custom.conf" ]; then + mv -f "$ETC_DIR/custom.conf" "$ETC_DIR/named.conf" + fi + # exit function + return $exitCode +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# function to run before executing +__pre_execute() { + local exitCode=0 # default exit code + local sysname="${SERVER_NAME:-${FULL_DOMAIN_NAME:-$HOSTNAME}}" # set hostname + # execute if directories is empty + # __is_dir_empty "$CONF_DIR" && true + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # define actions to run after copying to /config + zone_files="$(find "$data_dir/zones/" -type f | wc -l)" + if [ $zone_files = 0 ] && [ ! -f "$DATA_DIR/zones/$HOSTNAME.zone" ]; then + cat </dev/null +; config for $HOSTNAME +@ IN SOA $HOSTNAME. root.$HOSTNAME. ( $serial 10800 3600 1209600 38400) + IN NS $HOSTNAME. +$HOSTNAME. IN A $CONTAINER_IP4_ADDRESS + +EOF + fi + # + for dns_file in "$DATA_DIR/zones"/*; do + file_name="$(basename "$dns_file")" + domain_name="$(grep -Rs '\$ORIGIN' "$dns_file" | awk '{print $NF}' | sed 's|.$||g')" + if [ -f "$dns_file" ]; then + cp -Rf "$dns_file" "$VAR_DIR/zones/$file_name" + if [ -n "$domain_name" ] && ! grep -qs "$domain_name" "$ETC_DIR/named.conf"; then + if [ "$DNS_TYPE" = "secondary" ]; then + cat <>"$ETC_DIR/named.conf" +# ********** begin $domain_name ********** +zone "$domain_name" { + type slave; + masters { $DNS_SERVER_PRIMARY; }; + file "$VAR_DIR/zones/$file_name"; +}; +# ********** end $domain_name ********** + +EOF + else + cat <>"$ETC_DIR/named.conf" +# ********** begin $domain_name ********** +zone "$domain_name" { + type master; + notify yes; + allow-update {key "certbot."; key "dhcp-key"; trusted; }; + allow-transfer { any; key "backup-key"; trusted; }; + file "$VAR_DIR/zones/$file_name"; +}; +# ********** end $domain_name ********** + +EOF + fi + grep -qs "$domain_name" "$ETC_DIR/named.conf" && echo "Added $domain_name to $ETC_DIR/named.conf" + fi + fi + done + if named-checkconf -z $ETC_DIR/named.conf &>/dev/null; then + echo "named-checkconf has succeeded" + else + echo "named-checkconf has failed:" + named-checkconf -z $ETC_DIR/named.conf + fi + + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # unset unneeded variables + # unset + # Lets wait a few seconds before continuing + sleep 5 + return $exitCode +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# function to run after executing +__post_execute() { + local pid="" # init pid var + local retVal=0 # set default exit code + local ctime=${POST_EXECUTE_WAIT_TIME:-1} # how long to wait before executing + local waitTime=$((ctime * 60)) # convert minutes to seconds + local postMessageST="Running post commands for $SERVICE_NAME" # message to show at start + local postMessageEnd="Finished post commands for $SERVICE_NAME" # message to show at completion + # wait + sleep $waitTime + # execute commands after waiting + ( + # show message + __banner "$postMessageST" + # commands to execute + true + # show exit message + __banner "$postMessageEnd: Status $retVal" + ) 2>"/dev/stderr" | tee -p -a "/data/logs/init.txt" & + pid=$! + # set exitCode + ps ax | awk '{print $1}' | grep -v grep | grep -q "$execPid$" && retVal=0 || retVal=10 + return $retVal +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# use this function to update config files - IE: change port +__pre_message() { + local exitCode=0 + [ -n "$PRE_EXEC_MESSAGE" ] && eval echo "$PRE_EXEC_MESSAGE" + # execute commands + + # set exitCode + return $exitCode +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# use this function to setup ssl support +__update_ssl_conf() { + local exitCode=0 + local sysname="${SERVER_NAME:-${FULL_DOMAIN_NAME:-$HOSTNAME}}" # set hostname + # execute commands + + # set exitCode + return $exitCode +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__create_service_env() { + cat </dev/null +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# root/admin user info [password/random] +#ENV_ROOT_USER_NAME="${ENV_ROOT_USER_NAME:-$NAMED_ROOT_USER_NAME}" # root user name +#ENV_ROOT_USER_PASS="${ENV_ROOT_USER_NAME:-$NAMED_ROOT_PASS_WORD}" # root user password +#root_user_name="${ENV_ROOT_USER_NAME:-$root_user_name}" # +#root_user_pass="${ENV_ROOT_USER_PASS:-$root_user_pass}" # +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +#Normal user info [password/random] +#ENV_USER_NAME="${ENV_USER_NAME:-$NAMED_USER_NAME}" # +#ENV_USER_PASS="${ENV_USER_PASS:-$NAMED_USER_PASS_WORD}" # +#user_name="${ENV_USER_NAME:-$user_name}" # normal user name +#user_pass="${ENV_USER_PASS:-$user_pass}" # normal user password + +EOF + __file_exists_with_content "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh" || return 1 +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# script to start server +__run_start_script() { + local runExitCode=0 + local workdir="$(eval echo "${WORK_DIR:-}")" # expand variables + local cmd="$(eval echo "${EXEC_CMD_BIN:-}")" # expand variables + local args="$(eval echo "${EXEC_CMD_ARGS:-}")" # expand variables + local name="$(eval echo "${EXEC_CMD_NAME:-}")" # expand variables + local pre="$(eval echo "${EXEC_PRE_SCRIPT:-}")" # expand variables + local extra_env="$(eval echo "${CMD_ENV//,/ }")" # expand variables + local lc_type="$(eval echo "${LANG:-${LC_ALL:-$LC_CTYPE}}")" # expand variables + local home="$(eval echo "${workdir//\/root/\/tmp\/docker}")" # expand variables + local path="$(eval echo "$PATH")" # expand variables + local message="$(eval echo "")" # expand variables + local sysname="${SERVER_NAME:-${FULL_DOMAIN_NAME:-$HOSTNAME}}" # set hostname + [ -f "$CONF_DIR/$SERVICE_NAME.exec_cmd.sh" ] && . "$CONF_DIR/$SERVICE_NAME.exec_cmd.sh" + # + if [ -z "$cmd" ]; then + __post_execute 2>"/dev/stderr" | tee -p -a "/data/logs/init.txt" + retVal=$? + echo "Initializing $SCRIPT_NAME has completed" + exit $retVal + else + # ensure the command exists + if [ ! -x "$cmd" ]; then + echo "$name is not a valid executable" + return 2 + fi + # check and exit if already running + if __proc_check "$name" || __proc_check "$cmd"; then + echo "$name is already running" >&2 + return 0 + else + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # show message if env exists + if [ -n "$cmd" ]; then + [ -n "$SERVICE_USER" ] && echo "Setting up $cmd to run as $SERVICE_USER" || SERVICE_USER="root" + [ -n "$SERVICE_PORT" ] && echo "$name will be running on port $SERVICE_PORT" || SERVICE_PORT="" + fi + if [ -n "$pre" ] && [ -n "$(command -v "$pre" 2>/dev/null)" ]; then + export cmd_exec="$pre $cmd $args" + message="Starting service: $name $args through $pre" + else + export cmd_exec="$cmd $args" + message="Starting service: $name $args" + fi + [ -n "$su_exec" ] && echo "using $su_exec" | tee -a -p "/data/logs/init.txt" + echo "$message" | tee -a -p "/data/logs/init.txt" + su_cmd touch "$SERVICE_PID_FILE" + if [ "$RESET_ENV" = "yes" ]; then + env_command="$(echo "env -i HOME=\"$home\" LC_CTYPE=\"$lc_type\" PATH=\"$path\" HOSTNAME=\"$sysname\" USER=\"${SERVICE_USER:-$RUNAS_USER}\" $extra_env")" + execute_command="$(__trim "$su_exec $env_command $cmd_exec")" + if [ ! -f "$START_SCRIPT" ]; then + cat <"$START_SCRIPT" +#!/usr/bin/env bash +trap 'exitCode=\$?;[ \$exitCode -ne 0 ] && [ -f "\$SERVICE_PID_FILE" ] && rm -Rf "\$SERVICE_PID_FILE";exit \$exitCode' EXIT +# +set -Eeo pipefail +# Setting up $cmd to run as ${SERVICE_USER:-root} with env +retVal=10 +cmd="$cmd" +SERVICE_PID_FILE="$SERVICE_PID_FILE" +$execute_command 2>"/dev/stderr" >>"$LOG_DIR/$SERVICE_NAME.log" & +execPid=\$! +sleep 10 +checkPID="\$(ps ax | awk '{print \$1}' | grep -v grep | grep "\$execPid$" || false)" +[ -n "\$execPid" ] && [ -n "\$checkPID" ] && echo "\$execPid" >"\$SERVICE_PID_FILE" && retVal=0 || retVal=10 +[ "\$retVal" = 0 ] && echo "\$cmd has been started" || echo "Failed to start $execute_command" >&2 +exit \$retVal + +EOF + fi + else + if [ ! -f "$START_SCRIPT" ]; then + execute_command="$(__trim "$su_exec $cmd_exec")" + cat <"$START_SCRIPT" +#!/usr/bin/env bash +trap 'exitCode=\$?;[ \$exitCode -ne 0 ] && [ -f "\$SERVICE_PID_FILE" ] && rm -Rf "\$SERVICE_PID_FILE";exit \$exitCode' EXIT +# +set -Eeo pipefail +# Setting up $cmd to run as ${SERVICE_USER:-root} +retVal=10 +cmd="$cmd" +SERVICE_PID_FILE="$SERVICE_PID_FILE" +$execute_command 2>>"/dev/stderr" >>"$LOG_DIR/$SERVICE_NAME.log" & +execPid=\$! +sleep 10 +checkPID="\$(ps ax | awk '{print \$1}' | grep -v grep | grep "\$execPid$" || false)" +[ -n "\$execPid" ] && [ -n "\$checkPID" ] && echo "\$execPid" >"\$SERVICE_PID_FILE" && retVal=0 || retVal=10 +[ "\$retVal" = 0 ] && echo "\$cmd has been started" || echo "Failed to start $execute_command" >&2 >&2 +exit \$retVal + +EOF + fi + fi + fi + [ -x "$START_SCRIPT" ] || chmod 755 -Rf "$START_SCRIPT" + [ "$CONTAINER_INIT" = "yes" ] || eval sh -c "$START_SCRIPT" + runExitCode=$? + return $runExitCode + fi +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# username and password actions +__run_secure_function() { + local filesperms + if [ -n "$user_name" ] || [ -n "$user_pass" ]; then + for filesperms in "${USER_FILE_PREFIX}"/*; do + if [ -e "$filesperms" ]; then + chmod -Rf 600 "$filesperms" + chown -Rf $SERVICE_USER:$SERVICE_USER "$filesperms" 2>/dev/null + fi + done 2>/dev/null | tee -p -a "/data/logs/init.txt" + fi + if [ -n "$root_user_name" ] || [ -n "$root_user_pass" ]; then + for filesperms in "${ROOT_FILE_PREFIX}"/*; do + if [ -e "$filesperms" ]; then + chmod -Rf 600 "$filesperms" + chown -Rf $SERVICE_USER:$SERVICE_USER "$filesperms" 2>/dev/null + fi + done 2>/dev/null | tee -p -a "/data/logs/init.txt" + fi + unset filesperms +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Allow ENV_ variable - Import env file +__file_exists_with_content "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh" && . "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +SERVICE_EXIT_CODE=0 # default exit code +# application specific +EXEC_CMD_NAME="$(basename "$EXEC_CMD_BIN")" # set the binary name +SERVICE_PID_FILE="/run/init.d/$EXEC_CMD_NAME.pid" # set the pid file location +SERVICE_PID_NUMBER="$(__pgrep)" # check if running +EXEC_CMD_BIN="$(type -P "$EXEC_CMD_BIN" || echo "$EXEC_CMD_BIN")" # set full path +EXEC_PRE_SCRIPT="$(type -P "$EXEC_PRE_SCRIPT" || echo "$EXEC_PRE_SCRIPT")" # set full path +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Only run check +__check_service "$1" && SERVICE_IS_RUNNING=yes +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# ensure needed directories exists +[ -d "$LOG_DIR" ] || mkdir -p "$LOG_DIR" +[ -d "$RUN_DIR" ] || mkdir -p "$RUN_DIR" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# create auth directories +[ -n "$USER_FILE_PREFIX" ] && { [ -d "$USER_FILE_PREFIX" ] || mkdir -p "$USER_FILE_PREFIX"; } +[ -n "$ROOT_FILE_PREFIX" ] && { [ -d "$ROOT_FILE_PREFIX" ] || mkdir -p "$ROOT_FILE_PREFIX"; } +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +[ "$IS_WEB_SERVER" = "yes" ] && RESET_ENV="yes" +[ -n "$RUNAS_USER" ] || RUNAS_USER="root" +[ -n "$SERVICE_USER" ] || SERVICE_USER="$RUNAS_USER" +[ -n "$SERVICE_GROUP" ] || SERVICE_GROUP="${SERVICE_USER:-$RUNAS_USER}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Database env +if [ "$IS_DATABASE_SERVICE" = "yes" ] || [ "$USES_DATABASE_SERVICE" = "yes" ]; then + RESET_ENV="no" + DATABASE_CREATE="${ENV_DATABASE_CREATE:-$DATABASE_CREATE}" + DATABASE_USER="${ENV_DATABASE_USER:-${DATABASE_USER:-$user_name}}" + DATABASE_PASSWORD="${ENV_DATABASE_PASSWORD:-${DATABASE_PASSWORD:-$user_pass}}" + DATABASE_ROOT_USER="${ENV_DATABASE_ROOT_USER:-${DATABASE_ROOT_USER:-$root_user_name}}" + DATABASE_ROOT_PASSWORD="${ENV_DATABASE_ROOT_PASSWORD:-${DATABASE_ROOT_PASSWORD:-$root_user_pass}}" + if [ -n "$DATABASE_PASSWORD" ] && [ ! -f "${USER_FILE_PREFIX}/db_pass_user" ]; then + echo "$DATABASE_PASSWORD" >"${USER_FILE_PREFIX}/db_pass_user" + fi + if [ -n "$DATABASE_ROOT_PASSWORD" ] && [ ! -f "${ROOT_FILE_PREFIX}/db_pass_root" ]; then + echo "$DATABASE_ROOT_PASSWORD" >"${ROOT_FILE_PREFIX}/db_pass_root" + fi +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Allow variables via imports - Overwrite existing +[ -f "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh" ] && . "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# set password to random if variable is random +[ "$user_pass" = "random" ] && user_pass="$(__random_password ${RANDOM_PASS_USER:-16})" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +[ "$root_user_pass" = "random" ] && root_user_pass="$(__random_password ${RANDOM_PASS_ROOT:-16})" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Allow setting initial users and passwords via environment and save to file +[ -n "$user_name" ] && echo "$user_name" >"${USER_FILE_PREFIX}/${SERVICE_NAME}_name" +[ -n "$user_pass" ] && echo "$user_pass" >"${USER_FILE_PREFIX}/${SERVICE_NAME}_pass" +[ -n "$root_user_name" ] && echo "$root_user_name" >"${ROOT_FILE_PREFIX}/${SERVICE_NAME}_name" +[ -n "$root_user_pass" ] && echo "$root_user_pass" >"${ROOT_FILE_PREFIX}/${SERVICE_NAME}_pass" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Allow per init script usernames and passwords +__file_exists_with_content "${USER_FILE_PREFIX}/${SERVICE_NAME}_name" && user_name="$(<"${USER_FILE_PREFIX}/${SERVICE_NAME}_name")" +__file_exists_with_content "${USER_FILE_PREFIX}/${SERVICE_NAME}_pass" && user_pass="$(<"${USER_FILE_PREFIX}/${SERVICE_NAME}_pass")" +__file_exists_with_content "${ROOT_FILE_PREFIX}/${SERVICE_NAME}_name" && root_user_name="$(<"${ROOT_FILE_PREFIX}/${SERVICE_NAME}_name")" +__file_exists_with_content "${ROOT_FILE_PREFIX}/${SERVICE_NAME}_pass" && root_user_pass="$(<"${ROOT_FILE_PREFIX}/${SERVICE_NAME}_pass")" +__file_exists_with_content "${USER_FILE_PREFIX}/db_pass_user" && DATABASE_PASSWORD="$(<"${USER_FILE_PREFIX}/db_pass_user")" +__file_exists_with_content "${ROOT_FILE_PREFIX}/db_pass_root" && DATABASE_ROOT_PASSWORD="$(<"${ROOT_FILE_PREFIX}/db_pass_root")" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# set hostname for script +sysname="${SERVER_NAME:-${FULL_DOMAIN_NAME:-$HOSTNAME}}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__create_service_env +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Setup /config directories +__init_config_etc +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# pre-run function +__execute_prerun +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# create user if needed +__create_service_user "$SERVICE_USER" "$SERVICE_GROUP" "${WORK_DIR:-/home/$SERVICE_USER}" "${SERVICE_UID:-}" "${SERVICE_GID:-}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Modify user if needed +__set_user_group_id $SERVICE_USER ${SERVICE_UID:-} ${SERVICE_GID:-} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Create base directories +__setup_directories +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# set switch user command +__switch_to_user +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Initialize the home/working dir +__init_working_dir +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# show init message +__pre_message +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +__initialize_db_users +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Initialize ssl +__update_ssl_conf +__update_ssl_certs +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set permissions in ${USER_FILE_PREFIX} and ${ROOT_FILE_PREFIX} +__run_secure_function +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__run_precopy +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Copy /config to /etc +for config_2_etc in $CONF_DIR $ADDITIONAL_CONFIG_DIRS; do + __initialize_system_etc "$config_2_etc" 2>/dev/stderr | tee -p -a "/data/logs/init.txt" +done +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Replace variables +__initialize_replace_variables "$ETC_DIR" "$CONF_DIR" "$ADDITIONAL_CONFIG_DIRS" "$WWW_ROOT_DIR" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +__initialize_database +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Updating config files +__update_conf_files +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# run the pre execute commands +__pre_execute +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set permissions +__fix_permissions "$SERVICE_USER" "$SERVICE_GROUP" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +__run_pre_execute_checks 2>/dev/stderr | tee -a -p "/data/logs/entrypoint.log" "/data/logs/init.txt" || return 20 +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__run_start_script 2>>/dev/stderr | tee -p -a "/data/logs/entrypoint.log" && errorCode=0 || errorCode=10 +if [ -n "$EXEC_CMD_BIN" ]; then + if [ "$errorCode" -eq 0 ]; then + SERVICE_EXIT_CODE=0 + SERVICE_IS_RUNNING="yes" + else + echo "Failed to execute: ${cmd_exec:-$(eval echo "$EXEC_CMD_BIN $EXEC_CMD_ARGS")}" | tee -p -a "/data/logs/entrypoint.log" "/data/logs/init.txt" + SERVICE_EXIT_CODE=$errorCode + rm -Rf "$SERVICE_PID_FILE" + SERVICE_IS_RUNNING="no" + fi + SERVICE_EXIT_CODE=0 +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# start the post execute function in background +__post_execute 2>"/dev/stderr" | tee -p -a "/data/logs/init.txt" & +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__banner "Initializing of $SERVICE_NAME has completed with statusCode: $SERVICE_EXIT_CODE" | tee -p -a "/data/logs/entrypoint.log" "/data/logs/init.txt" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +exit $SERVICE_EXIT_CODE diff --git a/rootfs/usr/local/etc/docker/init.d/03-php-fpm.sh b/rootfs/usr/local/etc/docker/init.d/03-php-fpm.sh new file mode 100755 index 0000000..873f767 --- /dev/null +++ b/rootfs/usr/local/etc/docker/init.d/03-php-fpm.sh @@ -0,0 +1,596 @@ +#!/usr/bin/env bash +# shellcheck shell=bash +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +##@Version : 202408270904-git +# @@Author : Jason Hempstead +# @@Contact : jason@casjaysdev.pro +# @@License : WTFPL +# @@ReadME : 03-php-fpm.sh --help +# @@Copyright : Copyright: (c) 2024 Jason Hempstead, Casjays Developments +# @@Created : Tuesday, Aug 27, 2024 09:04 EDT +# @@File : 03-php-fpm.sh +# @@Description : +# @@Changelog : New script +# @@TODO : Better documentation +# @@Other : +# @@Resource : +# @@Terminal App : no +# @@sudo/root : no +# @@Template : other/start-service +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# shellcheck disable=SC2016 +# shellcheck disable=SC2031 +# shellcheck disable=SC2120 +# shellcheck disable=SC2155 +# shellcheck disable=SC2199 +# shellcheck disable=SC2317 +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# run trap command on exit +trap 'retVal=$?;[ "$SERVICE_IS_RUNNING" != "yes" ] && [ -f "$SERVICE_PID_FILE" ] && rm -Rf "$SERVICE_PID_FILE";exit $retVal' SIGINT SIGTERM EXIT +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# setup debugging - https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html +[ -f "/config/.debug" ] && [ -z "$DEBUGGER_OPTIONS" ] && export DEBUGGER_OPTIONS="$(<"/config/.debug")" || DEBUGGER_OPTIONS="${DEBUGGER_OPTIONS:-}" +{ [ "$DEBUGGER" = "on" ] || [ -f "/config/.debug" ]; } && echo "Enabling debugging" && set -xo pipefail -x$DEBUGGER_OPTIONS && export DEBUGGER="on" || set -o pipefail +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +export PATH="/usr/local/etc/docker/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +SCRIPT_FILE="$0" +SERVICE_NAME="php-fpm" +SCRIPT_NAME="$(basename "$SCRIPT_FILE" 2>/dev/null)" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# exit if __start_init_scripts function hasn't been Initialized +if [ ! -f "/run/__start_init_scripts.pid" ]; then + echo "__start_init_scripts function hasn't been Initialized" >&2 + SERVICE_IS_RUNNING="no" + exit 1 +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# import the functions file +if [ -f "/usr/local/etc/docker/functions/entrypoint.sh" ]; then + . "/usr/local/etc/docker/functions/entrypoint.sh" +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# import variables +for set_env in "/root/env.sh" "/usr/local/etc/docker/env"/*.sh "/config/env"/*.sh; do + [ -f "$set_env" ] && . "$set_env" +done +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +printf '%s\n' "# - - - Initializing $SERVICE_NAME - - - #" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Custom functions + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Script to execute +START_SCRIPT="/usr/local/etc/docker/exec/$SERVICE_NAME" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Reset environment before executing service +RESET_ENV="no" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set the database root dir - [DATABASE_DIR_SQLITE,DATABASE_DIR_REDIS,DATABASE_DIR_POSTGRES,DATABASE_DIR_MARIADB,DATABASE_DIR_COUCHDB,DATABASE_DIR_MONGODB,DATABASE_DIR_SUPABASE] +DATABASE_BASE_DIR="${DATABASE_BASE_DIR:-/data/db}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set the database sub directory [sqlite,postgres,mysql,mariadb,redis,couchdb,mongodb,$APPNAME] +DATABASE_SUBDIR="php-fpm" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# set the database directory - set by the above variables +DATABASE_DIR="$DATABASE_BASE_DIR/$DATABASE_SUBDIR" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set webroot +WWW_ROOT_DIR="/usr/share/httpd/default" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Default predefined variables +DATA_DIR="/data/php-fpm" # set data directory +CONF_DIR="/config/php-fpm" # set config directory +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# set the containers etc directory +ETC_DIR="/etc/php-fpm" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# set the var dir +VAR_DIR="" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +TMP_DIR="/tmp/php-fpm" # set the temp dir +RUN_DIR="/run/php-fpm" # set scripts pid dir +LOG_DIR="/data/logs/php-fpm" # set log directory +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set the working dir +WORK_DIR="" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# port which service is listening on +SERVICE_PORT="9000" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# User to use to launch service - IE: postgres +RUNAS_USER="root" # normally root +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# User and group in which the service switches to - IE: nginx,apache,mysql,postgres +SERVICE_USER="nginx" # execute command as another user +SERVICE_GROUP="nginx" # Set the service group +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set password length +RANDOM_PASS_USER="" +RANDOM_PASS_ROOT="" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set user and group ID +SERVICE_UID="0" # set the user id +SERVICE_GID="0" # set the group id +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# execute command variables - keep single quotes variables will be expanded later +EXEC_CMD_BIN='php-fpm' # command to execute +EXEC_CMD_ARGS='--allow-to-run-as-root --fpm-config $ETC_DIR/php-fpm.co' # command arguments +EXEC_PRE_SCRIPT='' # execute script before +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Is this service a web server +IS_WEB_SERVER="no" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Is this service a database server +IS_DATABASE_SERVICE="no" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Does this service use a database server +USES_DATABASE_SERVICE="no" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Show message before execute +PRE_EXEC_MESSAGE="" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set the wait time to execute __post_execute function - minutes +POST_EXECUTE_WAIT_TIME="1" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Update path var +PATH="$PATH:." +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Where to save passwords to +ROOT_FILE_PREFIX="/config/secure/auth/root" # directory to save username/password for root user +USER_FILE_PREFIX="/config/secure/auth/user" # directory to save username/password for normal user +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# root/admin user info password/random] +root_user_name="${PHP_FPM_ROOT_USER_NAME:-}" # root user name +root_user_pass="${PHP_FPM_ROOT_PASS_WORD:-}" # root user password +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Normal user info [password/random] +user_name="${PHP_FPM_USER_NAME:-}" # normal user name +user_pass="${PHP_FPM_USER_PASS_WORD:-}" # normal user password +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Load variables from config +[ -f "/config/env/php-fpm.script.sh" ] && . "/config/env/php-fpm.script.sh" # Generated by my dockermgr script +[ -f "/config/env/php-fpm.sh" ] && . "/config/env/php-fpm.sh" # Overwrite the variabes +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Additional predefined variables + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Additional variables + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Specifiy custom directories to be created +ADD_APPLICATION_FILES="" +ADD_APPLICATION_DIRS="" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +APPLICATION_FILES="$LOG_DIR/$SERVICE_NAME.log" +APPLICATION_DIRS="$RUN_DIR $ETC_DIR $CONF_DIR $LOG_DIR $TMP_DIR" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Additional config dirs - will be Copied to /etc/$name +ADDITIONAL_CONFIG_DIRS="" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# define variables that need to be loaded into the service - escape quotes - var=\"value\",other=\"test\" +CMD_ENV="" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Overwrite based on file/directory + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Per Application Variables or imports + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Custom commands to run before copying to /config +__run_precopy() { + # Define environment + local hostname=${HOSTNAME} + # Define actions/commands + +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Custom prerun functions - IE setup WWW_ROOT_DIR +__execute_prerun() { + # Define environment + local hostname=${HOSTNAME} + # Define actions/commands + +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Run any pre-execution checks +__run_pre_execute_checks() { + # Set variables + local exitStatus=0 + local pre_execute_checks_MessageST="Running preexecute check for $SERVICE_NAME" # message to show at start + local pre_execute_checks_MessageEnd="Finished preexecute check for $SERVICE_NAME" # message to show at completion + __banner "$pre_execute_checks_MessageST" + # Put command to execute in parentheses + { + true + } + exitStatus=$? + __banner "$pre_execute_checks_MessageEnd: Status $exitStatus" + + # show exit message + if [ $exitStatus -ne 0 ]; then + echo "The pre-execution check has failed" >&2 + [ -f "$SERVICE_PID_FILE" ] && rm -Rf "$SERVICE_PID_FILE" + exit 1 + fi + return $exitStatus +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# use this function to update config files - IE: change port +__update_conf_files() { + local exitCode=0 # default exit code + local sysname="${SERVER_NAME:-${FULL_DOMAIN_NAME:-$HOSTNAME}}" # set hostname + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # delete files + #__rm "" + + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # custom commands + + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # replace variables + # __replace "" "" "$CONF_DIR/php-fpm.conf" + # replace variables recursively + # __find_replace "" "" "$CONF_DIR" + + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # define actions + + # exit function + return $exitCode +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# function to run before executing +__pre_execute() { + local exitCode=0 # default exit code + local sysname="${SERVER_NAME:-${FULL_DOMAIN_NAME:-$HOSTNAME}}" # set hostname + # execute if directories is empty + # __is_dir_empty "$CONF_DIR" && true + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # define actions to run after copying to /config + + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # unset unneeded variables + # unset + # Lets wait a few seconds before continuing + sleep 5 + return $exitCode +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# function to run after executing +__post_execute() { + local pid="" # init pid var + local retVal=0 # set default exit code + local ctime=${POST_EXECUTE_WAIT_TIME:-1} # how long to wait before executing + local waitTime=$((ctime * 60)) # convert minutes to seconds + local postMessageST="Running post commands for $SERVICE_NAME" # message to show at start + local postMessageEnd="Finished post commands for $SERVICE_NAME" # message to show at completion + # wait + sleep $waitTime + # execute commands after waiting + ( + # show message + __banner "$postMessageST" + # commands to execute + true + # show exit message + __banner "$postMessageEnd: Status $retVal" + ) 2>"/dev/stderr" | tee -p -a "/data/logs/init.txt" & + pid=$! + # set exitCode + ps ax | awk '{print $1}' | grep -v grep | grep -q "$execPid$" && retVal=0 || retVal=10 + return $retVal +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# use this function to update config files - IE: change port +__pre_message() { + local exitCode=0 + [ -n "$PRE_EXEC_MESSAGE" ] && eval echo "$PRE_EXEC_MESSAGE" + # execute commands + + # set exitCode + return $exitCode +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# use this function to setup ssl support +__update_ssl_conf() { + local exitCode=0 + local sysname="${SERVER_NAME:-${FULL_DOMAIN_NAME:-$HOSTNAME}}" # set hostname + # execute commands + + # set exitCode + return $exitCode +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__create_service_env() { + cat </dev/null +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# root/admin user info [password/random] +#ENV_ROOT_USER_NAME="${ENV_ROOT_USER_NAME:-$PHP_FPM_ROOT_USER_NAME}" # root user name +#ENV_ROOT_USER_PASS="${ENV_ROOT_USER_NAME:-$PHP_FPM_ROOT_PASS_WORD}" # root user password +#root_user_name="${ENV_ROOT_USER_NAME:-$root_user_name}" # +#root_user_pass="${ENV_ROOT_USER_PASS:-$root_user_pass}" # +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +#Normal user info [password/random] +#ENV_USER_NAME="${ENV_USER_NAME:-$PHP_FPM_USER_NAME}" # +#ENV_USER_PASS="${ENV_USER_PASS:-$PHP_FPM_USER_PASS_WORD}" # +#user_name="${ENV_USER_NAME:-$user_name}" # normal user name +#user_pass="${ENV_USER_PASS:-$user_pass}" # normal user password + +EOF + __file_exists_with_content "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh" || return 1 +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# script to start server +__run_start_script() { + local runExitCode=0 + local workdir="$(eval echo "${WORK_DIR:-}")" # expand variables + local cmd="$(eval echo "${EXEC_CMD_BIN:-}")" # expand variables + local args="$(eval echo "${EXEC_CMD_ARGS:-}")" # expand variables + local name="$(eval echo "${EXEC_CMD_NAME:-}")" # expand variables + local pre="$(eval echo "${EXEC_PRE_SCRIPT:-}")" # expand variables + local extra_env="$(eval echo "${CMD_ENV//,/ }")" # expand variables + local lc_type="$(eval echo "${LANG:-${LC_ALL:-$LC_CTYPE}}")" # expand variables + local home="$(eval echo "${workdir//\/root/\/tmp\/docker}")" # expand variables + local path="$(eval echo "$PATH")" # expand variables + local message="$(eval echo "")" # expand variables + local sysname="${SERVER_NAME:-${FULL_DOMAIN_NAME:-$HOSTNAME}}" # set hostname + [ -f "$CONF_DIR/$SERVICE_NAME.exec_cmd.sh" ] && . "$CONF_DIR/$SERVICE_NAME.exec_cmd.sh" + # + if [ -z "$cmd" ]; then + __post_execute 2>"/dev/stderr" | tee -p -a "/data/logs/init.txt" + retVal=$? + echo "Initializing $SCRIPT_NAME has completed" + exit $retVal + else + # ensure the command exists + if [ ! -x "$cmd" ]; then + echo "$name is not a valid executable" + return 2 + fi + # check and exit if already running + if __proc_check "$name" || __proc_check "$cmd"; then + echo "$name is already running" >&2 + return 0 + else + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # show message if env exists + if [ -n "$cmd" ]; then + [ -n "$SERVICE_USER" ] && echo "Setting up $cmd to run as $SERVICE_USER" || SERVICE_USER="root" + [ -n "$SERVICE_PORT" ] && echo "$name will be running on port $SERVICE_PORT" || SERVICE_PORT="" + fi + if [ -n "$pre" ] && [ -n "$(command -v "$pre" 2>/dev/null)" ]; then + export cmd_exec="$pre $cmd $args" + message="Starting service: $name $args through $pre" + else + export cmd_exec="$cmd $args" + message="Starting service: $name $args" + fi + [ -n "$su_exec" ] && echo "using $su_exec" | tee -a -p "/data/logs/init.txt" + echo "$message" | tee -a -p "/data/logs/init.txt" + su_cmd touch "$SERVICE_PID_FILE" + if [ "$RESET_ENV" = "yes" ]; then + env_command="$(echo "env -i HOME=\"$home\" LC_CTYPE=\"$lc_type\" PATH=\"$path\" HOSTNAME=\"$sysname\" USER=\"${SERVICE_USER:-$RUNAS_USER}\" $extra_env")" + execute_command="$(__trim "$su_exec $env_command $cmd_exec")" + if [ ! -f "$START_SCRIPT" ]; then + cat <"$START_SCRIPT" +#!/usr/bin/env bash +trap 'exitCode=\$?;[ \$exitCode -ne 0 ] && [ -f "\$SERVICE_PID_FILE" ] && rm -Rf "\$SERVICE_PID_FILE";exit \$exitCode' EXIT +# +set -Eeo pipefail +# Setting up $cmd to run as ${SERVICE_USER:-root} with env +retVal=10 +cmd="$cmd" +SERVICE_PID_FILE="$SERVICE_PID_FILE" +$execute_command 2>"/dev/stderr" >>"$LOG_DIR/$SERVICE_NAME.log" & +execPid=\$! +sleep 10 +checkPID="\$(ps ax | awk '{print \$1}' | grep -v grep | grep "\$execPid$" || false)" +[ -n "\$execPid" ] && [ -n "\$checkPID" ] && echo "\$execPid" >"\$SERVICE_PID_FILE" && retVal=0 || retVal=10 +[ "\$retVal" = 0 ] && echo "\$cmd has been started" || echo "Failed to start $execute_command" >&2 +exit \$retVal + +EOF + fi + else + if [ ! -f "$START_SCRIPT" ]; then + execute_command="$(__trim "$su_exec $cmd_exec")" + cat <"$START_SCRIPT" +#!/usr/bin/env bash +trap 'exitCode=\$?;[ \$exitCode -ne 0 ] && [ -f "\$SERVICE_PID_FILE" ] && rm -Rf "\$SERVICE_PID_FILE";exit \$exitCode' EXIT +# +set -Eeo pipefail +# Setting up $cmd to run as ${SERVICE_USER:-root} +retVal=10 +cmd="$cmd" +SERVICE_PID_FILE="$SERVICE_PID_FILE" +$execute_command 2>>"/dev/stderr" >>"$LOG_DIR/$SERVICE_NAME.log" & +execPid=\$! +sleep 10 +checkPID="\$(ps ax | awk '{print \$1}' | grep -v grep | grep "\$execPid$" || false)" +[ -n "\$execPid" ] && [ -n "\$checkPID" ] && echo "\$execPid" >"\$SERVICE_PID_FILE" && retVal=0 || retVal=10 +[ "\$retVal" = 0 ] && echo "\$cmd has been started" || echo "Failed to start $execute_command" >&2 >&2 +exit \$retVal + +EOF + fi + fi + fi + [ -x "$START_SCRIPT" ] || chmod 755 -Rf "$START_SCRIPT" + [ "$CONTAINER_INIT" = "yes" ] || eval sh -c "$START_SCRIPT" + runExitCode=$? + return $runExitCode + fi +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# username and password actions +__run_secure_function() { + local filesperms + if [ -n "$user_name" ] || [ -n "$user_pass" ]; then + for filesperms in "${USER_FILE_PREFIX}"/*; do + if [ -e "$filesperms" ]; then + chmod -Rf 600 "$filesperms" + chown -Rf $SERVICE_USER:$SERVICE_USER "$filesperms" 2>/dev/null + fi + done 2>/dev/null | tee -p -a "/data/logs/init.txt" + fi + if [ -n "$root_user_name" ] || [ -n "$root_user_pass" ]; then + for filesperms in "${ROOT_FILE_PREFIX}"/*; do + if [ -e "$filesperms" ]; then + chmod -Rf 600 "$filesperms" + chown -Rf $SERVICE_USER:$SERVICE_USER "$filesperms" 2>/dev/null + fi + done 2>/dev/null | tee -p -a "/data/logs/init.txt" + fi + unset filesperms +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Allow ENV_ variable - Import env file +__file_exists_with_content "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh" && . "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +SERVICE_EXIT_CODE=0 # default exit code +# application specific +EXEC_CMD_NAME="$(basename "$EXEC_CMD_BIN")" # set the binary name +SERVICE_PID_FILE="/run/init.d/$EXEC_CMD_NAME.pid" # set the pid file location +SERVICE_PID_NUMBER="$(__pgrep)" # check if running +EXEC_CMD_BIN="$(type -P "$EXEC_CMD_BIN" || echo "$EXEC_CMD_BIN")" # set full path +EXEC_PRE_SCRIPT="$(type -P "$EXEC_PRE_SCRIPT" || echo "$EXEC_PRE_SCRIPT")" # set full path +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Only run check +__check_service "$1" && SERVICE_IS_RUNNING=yes +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# ensure needed directories exists +[ -d "$LOG_DIR" ] || mkdir -p "$LOG_DIR" +[ -d "$RUN_DIR" ] || mkdir -p "$RUN_DIR" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# create auth directories +[ -n "$USER_FILE_PREFIX" ] && { [ -d "$USER_FILE_PREFIX" ] || mkdir -p "$USER_FILE_PREFIX"; } +[ -n "$ROOT_FILE_PREFIX" ] && { [ -d "$ROOT_FILE_PREFIX" ] || mkdir -p "$ROOT_FILE_PREFIX"; } +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +[ "$IS_WEB_SERVER" = "yes" ] && RESET_ENV="yes" +[ -n "$RUNAS_USER" ] || RUNAS_USER="root" +[ -n "$SERVICE_USER" ] || SERVICE_USER="$RUNAS_USER" +[ -n "$SERVICE_GROUP" ] || SERVICE_GROUP="${SERVICE_USER:-$RUNAS_USER}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Database env +if [ "$IS_DATABASE_SERVICE" = "yes" ] || [ "$USES_DATABASE_SERVICE" = "yes" ]; then + RESET_ENV="no" + DATABASE_CREATE="${ENV_DATABASE_CREATE:-$DATABASE_CREATE}" + DATABASE_USER="${ENV_DATABASE_USER:-${DATABASE_USER:-$user_name}}" + DATABASE_PASSWORD="${ENV_DATABASE_PASSWORD:-${DATABASE_PASSWORD:-$user_pass}}" + DATABASE_ROOT_USER="${ENV_DATABASE_ROOT_USER:-${DATABASE_ROOT_USER:-$root_user_name}}" + DATABASE_ROOT_PASSWORD="${ENV_DATABASE_ROOT_PASSWORD:-${DATABASE_ROOT_PASSWORD:-$root_user_pass}}" + if [ -n "$DATABASE_PASSWORD" ] && [ ! -f "${USER_FILE_PREFIX}/db_pass_user" ]; then + echo "$DATABASE_PASSWORD" >"${USER_FILE_PREFIX}/db_pass_user" + fi + if [ -n "$DATABASE_ROOT_PASSWORD" ] && [ ! -f "${ROOT_FILE_PREFIX}/db_pass_root" ]; then + echo "$DATABASE_ROOT_PASSWORD" >"${ROOT_FILE_PREFIX}/db_pass_root" + fi +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Allow variables via imports - Overwrite existing +[ -f "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh" ] && . "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# set password to random if variable is random +[ "$user_pass" = "random" ] && user_pass="$(__random_password ${RANDOM_PASS_USER:-16})" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +[ "$root_user_pass" = "random" ] && root_user_pass="$(__random_password ${RANDOM_PASS_ROOT:-16})" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Allow setting initial users and passwords via environment and save to file +[ -n "$user_name" ] && echo "$user_name" >"${USER_FILE_PREFIX}/${SERVICE_NAME}_name" +[ -n "$user_pass" ] && echo "$user_pass" >"${USER_FILE_PREFIX}/${SERVICE_NAME}_pass" +[ -n "$root_user_name" ] && echo "$root_user_name" >"${ROOT_FILE_PREFIX}/${SERVICE_NAME}_name" +[ -n "$root_user_pass" ] && echo "$root_user_pass" >"${ROOT_FILE_PREFIX}/${SERVICE_NAME}_pass" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Allow per init script usernames and passwords +__file_exists_with_content "${USER_FILE_PREFIX}/${SERVICE_NAME}_name" && user_name="$(<"${USER_FILE_PREFIX}/${SERVICE_NAME}_name")" +__file_exists_with_content "${USER_FILE_PREFIX}/${SERVICE_NAME}_pass" && user_pass="$(<"${USER_FILE_PREFIX}/${SERVICE_NAME}_pass")" +__file_exists_with_content "${ROOT_FILE_PREFIX}/${SERVICE_NAME}_name" && root_user_name="$(<"${ROOT_FILE_PREFIX}/${SERVICE_NAME}_name")" +__file_exists_with_content "${ROOT_FILE_PREFIX}/${SERVICE_NAME}_pass" && root_user_pass="$(<"${ROOT_FILE_PREFIX}/${SERVICE_NAME}_pass")" +__file_exists_with_content "${USER_FILE_PREFIX}/db_pass_user" && DATABASE_PASSWORD="$(<"${USER_FILE_PREFIX}/db_pass_user")" +__file_exists_with_content "${ROOT_FILE_PREFIX}/db_pass_root" && DATABASE_ROOT_PASSWORD="$(<"${ROOT_FILE_PREFIX}/db_pass_root")" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# set hostname for script +sysname="${SERVER_NAME:-${FULL_DOMAIN_NAME:-$HOSTNAME}}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__create_service_env +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Setup /config directories +__init_config_etc +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# pre-run function +__execute_prerun +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# create user if needed +__create_service_user "$SERVICE_USER" "$SERVICE_GROUP" "${WORK_DIR:-/home/$SERVICE_USER}" "${SERVICE_UID:-}" "${SERVICE_GID:-}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Modify user if needed +__set_user_group_id $SERVICE_USER ${SERVICE_UID:-} ${SERVICE_GID:-} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Create base directories +__setup_directories +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# set switch user command +__switch_to_user +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Initialize the home/working dir +__init_working_dir +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# show init message +__pre_message +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +__initialize_db_users +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Initialize ssl +__update_ssl_conf +__update_ssl_certs +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set permissions in ${USER_FILE_PREFIX} and ${ROOT_FILE_PREFIX} +__run_secure_function +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__run_precopy +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Copy /config to /etc +for config_2_etc in $CONF_DIR $ADDITIONAL_CONFIG_DIRS; do + __initialize_system_etc "$config_2_etc" 2>/dev/stderr | tee -p -a "/data/logs/init.txt" +done +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Replace variables +__initialize_replace_variables "$ETC_DIR" "$CONF_DIR" "$ADDITIONAL_CONFIG_DIRS" "$WWW_ROOT_DIR" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +__initialize_database +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Updating config files +__update_conf_files +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# run the pre execute commands +__pre_execute +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set permissions +__fix_permissions "$SERVICE_USER" "$SERVICE_GROUP" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +__run_pre_execute_checks 2>/dev/stderr | tee -a -p "/data/logs/entrypoint.log" "/data/logs/init.txt" || return 20 +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__run_start_script 2>>/dev/stderr | tee -p -a "/data/logs/entrypoint.log" && errorCode=0 || errorCode=10 +if [ -n "$EXEC_CMD_BIN" ]; then + if [ "$errorCode" -eq 0 ]; then + SERVICE_EXIT_CODE=0 + SERVICE_IS_RUNNING="yes" + else + echo "Failed to execute: ${cmd_exec:-$(eval echo "$EXEC_CMD_BIN $EXEC_CMD_ARGS")}" | tee -p -a "/data/logs/entrypoint.log" "/data/logs/init.txt" + SERVICE_EXIT_CODE=$errorCode + rm -Rf "$SERVICE_PID_FILE" + SERVICE_IS_RUNNING="no" + fi + SERVICE_EXIT_CODE=0 +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# start the post execute function in background +__post_execute 2>"/dev/stderr" | tee -p -a "/data/logs/init.txt" & +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__banner "Initializing of $SERVICE_NAME has completed with statusCode: $SERVICE_EXIT_CODE" | tee -p -a "/data/logs/entrypoint.log" "/data/logs/init.txt" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +exit $SERVICE_EXIT_CODE diff --git a/rootfs/usr/local/etc/docker/init.d/99-nginx.sh b/rootfs/usr/local/etc/docker/init.d/99-nginx.sh new file mode 100755 index 0000000..8dec12a --- /dev/null +++ b/rootfs/usr/local/etc/docker/init.d/99-nginx.sh @@ -0,0 +1,596 @@ +#!/usr/bin/env bash +# shellcheck shell=bash +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +##@Version : 202408270905-git +# @@Author : Jason Hempstead +# @@Contact : jason@casjaysdev.pro +# @@License : WTFPL +# @@ReadME : 99-nginx.sh --help +# @@Copyright : Copyright: (c) 2024 Jason Hempstead, Casjays Developments +# @@Created : Tuesday, Aug 27, 2024 09:05 EDT +# @@File : 99-nginx.sh +# @@Description : +# @@Changelog : New script +# @@TODO : Better documentation +# @@Other : +# @@Resource : +# @@Terminal App : no +# @@sudo/root : no +# @@Template : other/start-service +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# shellcheck disable=SC2016 +# shellcheck disable=SC2031 +# shellcheck disable=SC2120 +# shellcheck disable=SC2155 +# shellcheck disable=SC2199 +# shellcheck disable=SC2317 +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# run trap command on exit +trap 'retVal=$?;[ "$SERVICE_IS_RUNNING" != "yes" ] && [ -f "$SERVICE_PID_FILE" ] && rm -Rf "$SERVICE_PID_FILE";exit $retVal' SIGINT SIGTERM EXIT +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# setup debugging - https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html +[ -f "/config/.debug" ] && [ -z "$DEBUGGER_OPTIONS" ] && export DEBUGGER_OPTIONS="$(<"/config/.debug")" || DEBUGGER_OPTIONS="${DEBUGGER_OPTIONS:-}" +{ [ "$DEBUGGER" = "on" ] || [ -f "/config/.debug" ]; } && echo "Enabling debugging" && set -xo pipefail -x$DEBUGGER_OPTIONS && export DEBUGGER="on" || set -o pipefail +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +export PATH="/usr/local/etc/docker/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +SCRIPT_FILE="$0" +SERVICE_NAME="nginx" +SCRIPT_NAME="$(basename "$SCRIPT_FILE" 2>/dev/null)" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# exit if __start_init_scripts function hasn't been Initialized +if [ ! -f "/run/__start_init_scripts.pid" ]; then + echo "__start_init_scripts function hasn't been Initialized" >&2 + SERVICE_IS_RUNNING="no" + exit 1 +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# import the functions file +if [ -f "/usr/local/etc/docker/functions/entrypoint.sh" ]; then + . "/usr/local/etc/docker/functions/entrypoint.sh" +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# import variables +for set_env in "/root/env.sh" "/usr/local/etc/docker/env"/*.sh "/config/env"/*.sh; do + [ -f "$set_env" ] && . "$set_env" +done +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +printf '%s\n' "# - - - Initializing $SERVICE_NAME - - - #" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Custom functions + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Script to execute +START_SCRIPT="/usr/local/etc/docker/exec/$SERVICE_NAME" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Reset environment before executing service +RESET_ENV="no" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set the database root dir - [DATABASE_DIR_SQLITE,DATABASE_DIR_REDIS,DATABASE_DIR_POSTGRES,DATABASE_DIR_MARIADB,DATABASE_DIR_COUCHDB,DATABASE_DIR_MONGODB,DATABASE_DIR_SUPABASE] +DATABASE_BASE_DIR="${DATABASE_BASE_DIR:-/data/db}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set the database sub directory [sqlite,postgres,mysql,mariadb,redis,couchdb,mongodb,$APPNAME] +DATABASE_SUBDIR="nginx" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# set the database directory - set by the above variables +DATABASE_DIR="$DATABASE_BASE_DIR/$DATABASE_SUBDIR" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set webroot +WWW_ROOT_DIR="/usr/share/httpd/default" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Default predefined variables +DATA_DIR="/data/nginx" # set data directory +CONF_DIR="/config/nginx" # set config directory +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# set the containers etc directory +ETC_DIR="/etc/nginx" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# set the var dir +VAR_DIR="" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +TMP_DIR="/tmp/nginx" # set the temp dir +RUN_DIR="/run/nginx" # set scripts pid dir +LOG_DIR="/data/logs/nginx" # set log directory +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set the working dir +WORK_DIR="" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# port which service is listening on +SERVICE_PORT="80" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# User to use to launch service - IE: postgres +RUNAS_USER="root" # normally root +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# User and group in which the service switches to - IE: nginx,apache,mysql,postgres +SERVICE_USER="nginx" # execute command as another user +SERVICE_GROUP="nginx" # Set the service group +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set password length +RANDOM_PASS_USER="" +RANDOM_PASS_ROOT="" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set user and group ID +SERVICE_UID="0" # set the user id +SERVICE_GID="0" # set the group id +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# execute command variables - keep single quotes variables will be expanded later +EXEC_CMD_BIN='nginx' # command to execute +EXEC_CMD_ARGS='-c $ETC_DIR/nginx.conf' # command arguments +EXEC_PRE_SCRIPT='' # execute script before +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Is this service a web server +IS_WEB_SERVER="yes" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Is this service a database server +IS_DATABASE_SERVICE="no" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Does this service use a database server +USES_DATABASE_SERVICE="no" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Show message before execute +PRE_EXEC_MESSAGE="" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set the wait time to execute __post_execute function - minutes +POST_EXECUTE_WAIT_TIME="1" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Update path var +PATH="$PATH:." +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Where to save passwords to +ROOT_FILE_PREFIX="/config/secure/auth/root" # directory to save username/password for root user +USER_FILE_PREFIX="/config/secure/auth/user" # directory to save username/password for normal user +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# root/admin user info password/random] +root_user_name="${NGINX_ROOT_USER_NAME:-}" # root user name +root_user_pass="${NGINX_ROOT_PASS_WORD:-}" # root user password +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Normal user info [password/random] +user_name="${NGINX_USER_NAME:-}" # normal user name +user_pass="${NGINX_USER_PASS_WORD:-}" # normal user password +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Load variables from config +[ -f "/config/env/nginx.script.sh" ] && . "/config/env/nginx.script.sh" # Generated by my dockermgr script +[ -f "/config/env/nginx.sh" ] && . "/config/env/nginx.sh" # Overwrite the variabes +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Additional predefined variables + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Additional variables + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Specifiy custom directories to be created +ADD_APPLICATION_FILES="" +ADD_APPLICATION_DIRS="" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +APPLICATION_FILES="$LOG_DIR/$SERVICE_NAME.log" +APPLICATION_DIRS="$RUN_DIR $ETC_DIR $CONF_DIR $LOG_DIR $TMP_DIR" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Additional config dirs - will be Copied to /etc/$name +ADDITIONAL_CONFIG_DIRS="" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# define variables that need to be loaded into the service - escape quotes - var=\"value\",other=\"test\" +CMD_ENV="" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Overwrite based on file/directory + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Per Application Variables or imports + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Custom commands to run before copying to /config +__run_precopy() { + # Define environment + local hostname=${HOSTNAME} + # Define actions/commands + +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Custom prerun functions - IE setup WWW_ROOT_DIR +__execute_prerun() { + # Define environment + local hostname=${HOSTNAME} + # Define actions/commands + +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Run any pre-execution checks +__run_pre_execute_checks() { + # Set variables + local exitStatus=0 + local pre_execute_checks_MessageST="Running preexecute check for $SERVICE_NAME" # message to show at start + local pre_execute_checks_MessageEnd="Finished preexecute check for $SERVICE_NAME" # message to show at completion + __banner "$pre_execute_checks_MessageST" + # Put command to execute in parentheses + { + true + } + exitStatus=$? + __banner "$pre_execute_checks_MessageEnd: Status $exitStatus" + + # show exit message + if [ $exitStatus -ne 0 ]; then + echo "The pre-execution check has failed" >&2 + [ -f "$SERVICE_PID_FILE" ] && rm -Rf "$SERVICE_PID_FILE" + exit 1 + fi + return $exitStatus +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# use this function to update config files - IE: change port +__update_conf_files() { + local exitCode=0 # default exit code + local sysname="${SERVER_NAME:-${FULL_DOMAIN_NAME:-$HOSTNAME}}" # set hostname + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # delete files + #__rm "" + + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # custom commands + + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # replace variables + # __replace "" "" "$CONF_DIR/nginx.conf" + # replace variables recursively + # __find_replace "" "" "$CONF_DIR" + + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # define actions + + # exit function + return $exitCode +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# function to run before executing +__pre_execute() { + local exitCode=0 # default exit code + local sysname="${SERVER_NAME:-${FULL_DOMAIN_NAME:-$HOSTNAME}}" # set hostname + # execute if directories is empty + # __is_dir_empty "$CONF_DIR" && true + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # define actions to run after copying to /config + + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # unset unneeded variables + # unset + # Lets wait a few seconds before continuing + sleep 5 + return $exitCode +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# function to run after executing +__post_execute() { + local pid="" # init pid var + local retVal=0 # set default exit code + local ctime=${POST_EXECUTE_WAIT_TIME:-1} # how long to wait before executing + local waitTime=$((ctime * 60)) # convert minutes to seconds + local postMessageST="Running post commands for $SERVICE_NAME" # message to show at start + local postMessageEnd="Finished post commands for $SERVICE_NAME" # message to show at completion + # wait + sleep $waitTime + # execute commands after waiting + ( + # show message + __banner "$postMessageST" + # commands to execute + true + # show exit message + __banner "$postMessageEnd: Status $retVal" + ) 2>"/dev/stderr" | tee -p -a "/data/logs/init.txt" & + pid=$! + # set exitCode + ps ax | awk '{print $1}' | grep -v grep | grep -q "$execPid$" && retVal=0 || retVal=10 + return $retVal +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# use this function to update config files - IE: change port +__pre_message() { + local exitCode=0 + [ -n "$PRE_EXEC_MESSAGE" ] && eval echo "$PRE_EXEC_MESSAGE" + # execute commands + + # set exitCode + return $exitCode +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# use this function to setup ssl support +__update_ssl_conf() { + local exitCode=0 + local sysname="${SERVER_NAME:-${FULL_DOMAIN_NAME:-$HOSTNAME}}" # set hostname + # execute commands + + # set exitCode + return $exitCode +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__create_service_env() { + cat </dev/null +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# root/admin user info [password/random] +#ENV_ROOT_USER_NAME="${ENV_ROOT_USER_NAME:-$NGINX_ROOT_USER_NAME}" # root user name +#ENV_ROOT_USER_PASS="${ENV_ROOT_USER_NAME:-$NGINX_ROOT_PASS_WORD}" # root user password +#root_user_name="${ENV_ROOT_USER_NAME:-$root_user_name}" # +#root_user_pass="${ENV_ROOT_USER_PASS:-$root_user_pass}" # +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +#Normal user info [password/random] +#ENV_USER_NAME="${ENV_USER_NAME:-$NGINX_USER_NAME}" # +#ENV_USER_PASS="${ENV_USER_PASS:-$NGINX_USER_PASS_WORD}" # +#user_name="${ENV_USER_NAME:-$user_name}" # normal user name +#user_pass="${ENV_USER_PASS:-$user_pass}" # normal user password + +EOF + __file_exists_with_content "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh" || return 1 +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# script to start server +__run_start_script() { + local runExitCode=0 + local workdir="$(eval echo "${WORK_DIR:-}")" # expand variables + local cmd="$(eval echo "${EXEC_CMD_BIN:-}")" # expand variables + local args="$(eval echo "${EXEC_CMD_ARGS:-}")" # expand variables + local name="$(eval echo "${EXEC_CMD_NAME:-}")" # expand variables + local pre="$(eval echo "${EXEC_PRE_SCRIPT:-}")" # expand variables + local extra_env="$(eval echo "${CMD_ENV//,/ }")" # expand variables + local lc_type="$(eval echo "${LANG:-${LC_ALL:-$LC_CTYPE}}")" # expand variables + local home="$(eval echo "${workdir//\/root/\/tmp\/docker}")" # expand variables + local path="$(eval echo "$PATH")" # expand variables + local message="$(eval echo "")" # expand variables + local sysname="${SERVER_NAME:-${FULL_DOMAIN_NAME:-$HOSTNAME}}" # set hostname + [ -f "$CONF_DIR/$SERVICE_NAME.exec_cmd.sh" ] && . "$CONF_DIR/$SERVICE_NAME.exec_cmd.sh" + # + if [ -z "$cmd" ]; then + __post_execute 2>"/dev/stderr" | tee -p -a "/data/logs/init.txt" + retVal=$? + echo "Initializing $SCRIPT_NAME has completed" + exit $retVal + else + # ensure the command exists + if [ ! -x "$cmd" ]; then + echo "$name is not a valid executable" + return 2 + fi + # check and exit if already running + if __proc_check "$name" || __proc_check "$cmd"; then + echo "$name is already running" >&2 + return 0 + else + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # show message if env exists + if [ -n "$cmd" ]; then + [ -n "$SERVICE_USER" ] && echo "Setting up $cmd to run as $SERVICE_USER" || SERVICE_USER="root" + [ -n "$SERVICE_PORT" ] && echo "$name will be running on port $SERVICE_PORT" || SERVICE_PORT="" + fi + if [ -n "$pre" ] && [ -n "$(command -v "$pre" 2>/dev/null)" ]; then + export cmd_exec="$pre $cmd $args" + message="Starting service: $name $args through $pre" + else + export cmd_exec="$cmd $args" + message="Starting service: $name $args" + fi + [ -n "$su_exec" ] && echo "using $su_exec" | tee -a -p "/data/logs/init.txt" + echo "$message" | tee -a -p "/data/logs/init.txt" + su_cmd touch "$SERVICE_PID_FILE" + if [ "$RESET_ENV" = "yes" ]; then + env_command="$(echo "env -i HOME=\"$home\" LC_CTYPE=\"$lc_type\" PATH=\"$path\" HOSTNAME=\"$sysname\" USER=\"${SERVICE_USER:-$RUNAS_USER}\" $extra_env")" + execute_command="$(__trim "$su_exec $env_command $cmd_exec")" + if [ ! -f "$START_SCRIPT" ]; then + cat <"$START_SCRIPT" +#!/usr/bin/env bash +trap 'exitCode=\$?;[ \$exitCode -ne 0 ] && [ -f "\$SERVICE_PID_FILE" ] && rm -Rf "\$SERVICE_PID_FILE";exit \$exitCode' EXIT +# +set -Eeo pipefail +# Setting up $cmd to run as ${SERVICE_USER:-root} with env +retVal=10 +cmd="$cmd" +SERVICE_PID_FILE="$SERVICE_PID_FILE" +$execute_command 2>"/dev/stderr" >>"$LOG_DIR/$SERVICE_NAME.log" & +execPid=\$! +sleep 10 +checkPID="\$(ps ax | awk '{print \$1}' | grep -v grep | grep "\$execPid$" || false)" +[ -n "\$execPid" ] && [ -n "\$checkPID" ] && echo "\$execPid" >"\$SERVICE_PID_FILE" && retVal=0 || retVal=10 +[ "\$retVal" = 0 ] && echo "\$cmd has been started" || echo "Failed to start $execute_command" >&2 +exit \$retVal + +EOF + fi + else + if [ ! -f "$START_SCRIPT" ]; then + execute_command="$(__trim "$su_exec $cmd_exec")" + cat <"$START_SCRIPT" +#!/usr/bin/env bash +trap 'exitCode=\$?;[ \$exitCode -ne 0 ] && [ -f "\$SERVICE_PID_FILE" ] && rm -Rf "\$SERVICE_PID_FILE";exit \$exitCode' EXIT +# +set -Eeo pipefail +# Setting up $cmd to run as ${SERVICE_USER:-root} +retVal=10 +cmd="$cmd" +SERVICE_PID_FILE="$SERVICE_PID_FILE" +$execute_command 2>>"/dev/stderr" >>"$LOG_DIR/$SERVICE_NAME.log" & +execPid=\$! +sleep 10 +checkPID="\$(ps ax | awk '{print \$1}' | grep -v grep | grep "\$execPid$" || false)" +[ -n "\$execPid" ] && [ -n "\$checkPID" ] && echo "\$execPid" >"\$SERVICE_PID_FILE" && retVal=0 || retVal=10 +[ "\$retVal" = 0 ] && echo "\$cmd has been started" || echo "Failed to start $execute_command" >&2 >&2 +exit \$retVal + +EOF + fi + fi + fi + [ -x "$START_SCRIPT" ] || chmod 755 -Rf "$START_SCRIPT" + [ "$CONTAINER_INIT" = "yes" ] || eval sh -c "$START_SCRIPT" + runExitCode=$? + return $runExitCode + fi +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# username and password actions +__run_secure_function() { + local filesperms + if [ -n "$user_name" ] || [ -n "$user_pass" ]; then + for filesperms in "${USER_FILE_PREFIX}"/*; do + if [ -e "$filesperms" ]; then + chmod -Rf 600 "$filesperms" + chown -Rf $SERVICE_USER:$SERVICE_USER "$filesperms" 2>/dev/null + fi + done 2>/dev/null | tee -p -a "/data/logs/init.txt" + fi + if [ -n "$root_user_name" ] || [ -n "$root_user_pass" ]; then + for filesperms in "${ROOT_FILE_PREFIX}"/*; do + if [ -e "$filesperms" ]; then + chmod -Rf 600 "$filesperms" + chown -Rf $SERVICE_USER:$SERVICE_USER "$filesperms" 2>/dev/null + fi + done 2>/dev/null | tee -p -a "/data/logs/init.txt" + fi + unset filesperms +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Allow ENV_ variable - Import env file +__file_exists_with_content "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh" && . "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +SERVICE_EXIT_CODE=0 # default exit code +# application specific +EXEC_CMD_NAME="$(basename "$EXEC_CMD_BIN")" # set the binary name +SERVICE_PID_FILE="/run/init.d/$EXEC_CMD_NAME.pid" # set the pid file location +SERVICE_PID_NUMBER="$(__pgrep)" # check if running +EXEC_CMD_BIN="$(type -P "$EXEC_CMD_BIN" || echo "$EXEC_CMD_BIN")" # set full path +EXEC_PRE_SCRIPT="$(type -P "$EXEC_PRE_SCRIPT" || echo "$EXEC_PRE_SCRIPT")" # set full path +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Only run check +__check_service "$1" && SERVICE_IS_RUNNING=yes +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# ensure needed directories exists +[ -d "$LOG_DIR" ] || mkdir -p "$LOG_DIR" +[ -d "$RUN_DIR" ] || mkdir -p "$RUN_DIR" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# create auth directories +[ -n "$USER_FILE_PREFIX" ] && { [ -d "$USER_FILE_PREFIX" ] || mkdir -p "$USER_FILE_PREFIX"; } +[ -n "$ROOT_FILE_PREFIX" ] && { [ -d "$ROOT_FILE_PREFIX" ] || mkdir -p "$ROOT_FILE_PREFIX"; } +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +[ "$IS_WEB_SERVER" = "yes" ] && RESET_ENV="yes" +[ -n "$RUNAS_USER" ] || RUNAS_USER="root" +[ -n "$SERVICE_USER" ] || SERVICE_USER="$RUNAS_USER" +[ -n "$SERVICE_GROUP" ] || SERVICE_GROUP="${SERVICE_USER:-$RUNAS_USER}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Database env +if [ "$IS_DATABASE_SERVICE" = "yes" ] || [ "$USES_DATABASE_SERVICE" = "yes" ]; then + RESET_ENV="no" + DATABASE_CREATE="${ENV_DATABASE_CREATE:-$DATABASE_CREATE}" + DATABASE_USER="${ENV_DATABASE_USER:-${DATABASE_USER:-$user_name}}" + DATABASE_PASSWORD="${ENV_DATABASE_PASSWORD:-${DATABASE_PASSWORD:-$user_pass}}" + DATABASE_ROOT_USER="${ENV_DATABASE_ROOT_USER:-${DATABASE_ROOT_USER:-$root_user_name}}" + DATABASE_ROOT_PASSWORD="${ENV_DATABASE_ROOT_PASSWORD:-${DATABASE_ROOT_PASSWORD:-$root_user_pass}}" + if [ -n "$DATABASE_PASSWORD" ] && [ ! -f "${USER_FILE_PREFIX}/db_pass_user" ]; then + echo "$DATABASE_PASSWORD" >"${USER_FILE_PREFIX}/db_pass_user" + fi + if [ -n "$DATABASE_ROOT_PASSWORD" ] && [ ! -f "${ROOT_FILE_PREFIX}/db_pass_root" ]; then + echo "$DATABASE_ROOT_PASSWORD" >"${ROOT_FILE_PREFIX}/db_pass_root" + fi +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Allow variables via imports - Overwrite existing +[ -f "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh" ] && . "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# set password to random if variable is random +[ "$user_pass" = "random" ] && user_pass="$(__random_password ${RANDOM_PASS_USER:-16})" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +[ "$root_user_pass" = "random" ] && root_user_pass="$(__random_password ${RANDOM_PASS_ROOT:-16})" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Allow setting initial users and passwords via environment and save to file +[ -n "$user_name" ] && echo "$user_name" >"${USER_FILE_PREFIX}/${SERVICE_NAME}_name" +[ -n "$user_pass" ] && echo "$user_pass" >"${USER_FILE_PREFIX}/${SERVICE_NAME}_pass" +[ -n "$root_user_name" ] && echo "$root_user_name" >"${ROOT_FILE_PREFIX}/${SERVICE_NAME}_name" +[ -n "$root_user_pass" ] && echo "$root_user_pass" >"${ROOT_FILE_PREFIX}/${SERVICE_NAME}_pass" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Allow per init script usernames and passwords +__file_exists_with_content "${USER_FILE_PREFIX}/${SERVICE_NAME}_name" && user_name="$(<"${USER_FILE_PREFIX}/${SERVICE_NAME}_name")" +__file_exists_with_content "${USER_FILE_PREFIX}/${SERVICE_NAME}_pass" && user_pass="$(<"${USER_FILE_PREFIX}/${SERVICE_NAME}_pass")" +__file_exists_with_content "${ROOT_FILE_PREFIX}/${SERVICE_NAME}_name" && root_user_name="$(<"${ROOT_FILE_PREFIX}/${SERVICE_NAME}_name")" +__file_exists_with_content "${ROOT_FILE_PREFIX}/${SERVICE_NAME}_pass" && root_user_pass="$(<"${ROOT_FILE_PREFIX}/${SERVICE_NAME}_pass")" +__file_exists_with_content "${USER_FILE_PREFIX}/db_pass_user" && DATABASE_PASSWORD="$(<"${USER_FILE_PREFIX}/db_pass_user")" +__file_exists_with_content "${ROOT_FILE_PREFIX}/db_pass_root" && DATABASE_ROOT_PASSWORD="$(<"${ROOT_FILE_PREFIX}/db_pass_root")" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# set hostname for script +sysname="${SERVER_NAME:-${FULL_DOMAIN_NAME:-$HOSTNAME}}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__create_service_env +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Setup /config directories +__init_config_etc +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# pre-run function +__execute_prerun +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# create user if needed +__create_service_user "$SERVICE_USER" "$SERVICE_GROUP" "${WORK_DIR:-/home/$SERVICE_USER}" "${SERVICE_UID:-}" "${SERVICE_GID:-}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Modify user if needed +__set_user_group_id $SERVICE_USER ${SERVICE_UID:-} ${SERVICE_GID:-} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Create base directories +__setup_directories +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# set switch user command +__switch_to_user +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Initialize the home/working dir +__init_working_dir +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# show init message +__pre_message +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +__initialize_db_users +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Initialize ssl +__update_ssl_conf +__update_ssl_certs +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set permissions in ${USER_FILE_PREFIX} and ${ROOT_FILE_PREFIX} +__run_secure_function +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__run_precopy +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Copy /config to /etc +for config_2_etc in $CONF_DIR $ADDITIONAL_CONFIG_DIRS; do + __initialize_system_etc "$config_2_etc" 2>/dev/stderr | tee -p -a "/data/logs/init.txt" +done +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Replace variables +__initialize_replace_variables "$ETC_DIR" "$CONF_DIR" "$ADDITIONAL_CONFIG_DIRS" "$WWW_ROOT_DIR" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +__initialize_database +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Updating config files +__update_conf_files +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# run the pre execute commands +__pre_execute +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set permissions +__fix_permissions "$SERVICE_USER" "$SERVICE_GROUP" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +__run_pre_execute_checks 2>/dev/stderr | tee -a -p "/data/logs/entrypoint.log" "/data/logs/init.txt" || return 20 +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__run_start_script 2>>/dev/stderr | tee -p -a "/data/logs/entrypoint.log" && errorCode=0 || errorCode=10 +if [ -n "$EXEC_CMD_BIN" ]; then + if [ "$errorCode" -eq 0 ]; then + SERVICE_EXIT_CODE=0 + SERVICE_IS_RUNNING="yes" + else + echo "Failed to execute: ${cmd_exec:-$(eval echo "$EXEC_CMD_BIN $EXEC_CMD_ARGS")}" | tee -p -a "/data/logs/entrypoint.log" "/data/logs/init.txt" + SERVICE_EXIT_CODE=$errorCode + rm -Rf "$SERVICE_PID_FILE" + SERVICE_IS_RUNNING="no" + fi + SERVICE_EXIT_CODE=0 +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# start the post execute function in background +__post_execute 2>"/dev/stderr" | tee -p -a "/data/logs/init.txt" & +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__banner "Initializing of $SERVICE_NAME has completed with statusCode: $SERVICE_EXIT_CODE" | tee -p -a "/data/logs/entrypoint.log" "/data/logs/init.txt" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +exit $SERVICE_EXIT_CODE diff --git a/rootfs/usr/local/share/template-files/config/.gitkeep b/rootfs/usr/local/share/template-files/config/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/usr/local/share/template-files/config/env/default.sample b/rootfs/usr/local/share/template-files/config/env/default.sample new file mode 100644 index 0000000..04b6936 --- /dev/null +++ b/rootfs/usr/local/share/template-files/config/env/default.sample @@ -0,0 +1,135 @@ +#!/usr/bin/env bash +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set bash options +[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -o pipefail -x$DEBUGGER_OPTIONS || set -o pipefail +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# import the functions file +[ -f "/usr/local/etc/docker/functions/entrypoint.sh" ] && . "/usr/local/etc/docker/functions/entrypoint.sh" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# GLOBAL enviroment variables +#USER="${USER:-root}" +#LANG="${LANG:-C.UTF-8}" +#TZ="${TZ:-America/New_York}" +#SERVICE_USER="${SERVICE_USER:-root}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# directory settings +#BACKUP_DIR="${BACKUP_DIR:-/data/backups}" +#WWW_ROOT_DIR="${WWW_ROOT_DIR:-/usr/share/httpd/default}" +#LOCAL_BIN_DIR="${LOCAL_BIN_DIR:-/usr/local/bin}" +#DATABASE_BASE_DIR="${DATABASE_BASE_DIR:-/data/db}" +#DEFAULT_DATA_DIR="${DEFAULT_DATA_DIR:-/usr/local/share/template-files/data}" +#DEFAULT_CONF_DIR="${DEFAULT_CONF_DIR:-/usr/local/share/template-files/config}" +#DEFAULT_TEMPLATE_DIR="${DEFAULT_TEMPLATE_DIR:-/usr/local/share/template-files/defaults}" +#DBTYPE="sqlite" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# healthcheck +#HEALTH_ENABLED="${HEALTH_ENABLED:-$ENV_HEALTH_ENABLED}" +#HEALTH_URL="${HEALTH_URL:-}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# php settings +#PHP_VERSION="${PHP_VERSION//php/}" +#PHP_INI_DIR="${PHP_INI_DIR:-$(__find_php_ini)}" +#PHP_BIN_DIR="${PHP_BIN_DIR:-$(__find_php_bin)}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# services/ports +#ENV_PORTS="${ENV_PORTS:-}" +#SERVICE_PORT="${SERVICE_PORT:-$PORT}" +#WEB_SERVER_PORTS="${WEB_SERVER_PORTS:-$ENV_WEB_SERVER_PORTS}" +#SERVICES_LIST="${PROCS_LIST:-$SERVICES_LIST} " +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# networing info +DOMAINNAME="${DOMAINNAME:-}" +HOSTNAME="${HOSTNAME:-casjaysdev-GEN_SCRIPT_REPLACE_APPNAME}" +FULL_DOMAIN_NAME="${FULL_DOMAIN_NAME:-${DOMAINNAME:-$HOSTNAME}}" +SERVER_ADMIN="${SERVER_ADMIN:-root@${EMAIL_DOMAIN:-${DOMAINNAME:-$FULL_DOMAIN_NAME}}}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +EMAIL_RELAY="${EMAIL_RELAY:-}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# get ip addresses +CONTAINER_IP4_ADDRESS="${CONTAINER_IP4_ADDRESS:-$(__get_ip4)}" +CONTAINER_IP6_ADDRESS="${CONTAINER_IP6_ADDRESS:-$(__get_ip6)}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# cerbot +#CERT_BOT_MAIL="${CERT_BOT_MAIL:-}" +#CERTBOT_DOMAINS="${CERTBOT_DOMAINS:-}" +#CERT_BOT_ENABLED="${CERT_BOT_ENABLED:-false}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# ssl server settings +#SSL_ENABLED="${SSL_ENABLED:-false}" +#SSL_DIR="${SSL_DIR:-/config/ssl}" +#SSL_CA="${SSL_CA:-$SSL_DIR/ca.crt}" +#SSL_KEY="${SSL_KEY:-$SSL_DIR/server.key}" +#SSL_CERT="${SSL_CERT:-$SSL_DIR/server.crt}" +#SSL_CONTAINER_DIR="${SSL_CONTAINER_DIR:-/etc/ssl/CA}" +#COUNTRY="${COUNTRY:-US}" +#STATE="${STATE:-NY}" +#CITY="${CITY:-Albany}" +#UNIT="${UNIT:-CasjaysDev}" +#ORG="${ORG:-"Casjays Developments"}" +#DAYS_VALID="${DAYS_VALID:-3650}" +#RSA="${RSA:-4096}" +#CN="${CN:-$FULL_DOMAIN_NAME}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# web server configs +HTTPD_CONFIG_FILE="${HTTPD_CONFIG_FILE:-$(__find_httpd_conf)}" +NGINX_CONFIG_FILE="${NGINX_CONFIG_FILE:-$(__find_nginx_conf)}" +LIGHTTPD_CONFIG_FILE="${LIGHTTPD_CONFIG_FILE:-$(__find_lighttpd_conf)}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# redis env +DATABASE_DIR_REDIS="${DATABASE_DIR_REDIS:-$DATABASE_BASE_DIR/redis}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# postgresql env +DATABASE_DIR_PGSQL="${DATABASE_DIR_PGSQL:-$PGDATA}" +PGDATA="${DATABASE_DIR_PGSQL:-$DATABASE_BASE_DIR/postgres}" +POSTGRES_USER="${DATABASE_USER_ROOT:-$POSTGRES_USER}" +POSTGRES_PASSWORD="${DATABASE_PASS_ROOT:-$POSTGRES_PASSWORD}" +POSTGRES_CONFIG_FILE="${POSTGRES_CONFIG_FILE:-$(__find_pgsql_conf)}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# mariadb env +MARIADB_ROOT_HOST="${MARIADB_ROOT_HOST:-%}" +MARIADB_AUTO_UPGRADE="${MARIADB_AUTO_UPGRADE:-yes}" +MARIADB_DATABASE="${DATABASE_CREATE:-$MARIADB_DATABASE}" +MARIADB_USER="${DATABASE_USER_NORMAL:-$MARIADB_USER}" +MARIADB_PASSWORD="${DATABASE_PASS_NORMAL:-$MARIADB_PASSWORD}" +DATABASE_DIR_MARIADB="${DATABASE_DIR_MARIADB:-$DATABASE_BASE_DIR/mysql}" +MARIADB_ROOT_PASSWORD="${DATABASE_PASS_ROOT:-$MARIADB_ROOT_PASSWORD}" +MARIADB_ALLOW_EMPTY_ROOT_PASSWORD="${MARIADB_ALLOW_EMPTY_ROOT_PASSWORD:-}" +MARIADB_INITDB_SKIP_TZINFO="${MARIADB_INITDB_SKIP_TZINFO}:-" +MARIADB_RANDOM_ROOT_PASSWORD="${MARIADB_RANDOM_ROOT_PASSWORD:-}" +MARIADB_CONFIG_FILE="${MARIADB_CONFIG_FILE:-$(__find_mysql_conf)}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# mongodb env +INITDB_ROOT_USERNAME="${DATABASE_USER_ROOT:-$INITDB_ROOT_USERNAME}" +DATABASE_DIR_MONGODB="${DATABASE_DIR_MONGODB:-$DATABASE_BASE_DIR/mongodb}" +MONGO_INITDB_ROOT_PASSWORD="${DATABASE_PASS_ROOT:-$MONGO_INITDB_ROOT_PASSWORD}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# couchdb env +NODENAME="${NODENAME:-}" +COUCHDB_USER="${DATABASE_USER_ROOT:-$COUCHDB_USER}" +COUCHDB_PASSWORD="${DATABASE_PASS_ROOT:-$COUCHDB_PASSWORD}" +DATABASE_DIR_COUCHDB="${DATABASE_DIR_COUCHDB:-$DATABASE_BASE_DIR/couchdb}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Supabase +DATABASE_DIR_SUPABASE="${DATABASE_DIR_SUPABASE:-$DATABASE_BASE_DIR/supabase}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# docker env +DOCKER_HOST="unix://var/run/docker.sock" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# File locations +ENTRYPOINT_PID_FILE="${ENTRYPOINT_PID_FILE:-/run/init.d/entrypoint.pid}" +ENTRYPOINT_INIT_FILE="${ENTRYPOINT_INIT_FILE:-/config/.entrypoint.done}" +ENTRYPOINT_DATA_INIT_FILE="${ENTRYPOINT_DATA_INIT_FILE:-/data/.docker_has_run}" +ENTRYPOINT_CONFIG_INIT_FILE="${ENTRYPOINT_CONFIG_INIT_FILE:-/config/.docker_has_run}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Startup variables +INIT_DATE="${INIT_DATE:-$(date)}" +START_SERVICES="${START_SERVICES:-yes}" +ENTRYPOINT_MESSAGE="${ENTRYPOINT_MESSAGE:-yes}" +ENTRYPOINT_FIRST_RUN="${ENTRYPOINT_FIRST_RUN:-yes}" +DATA_DIR_INITIALIZED="${DATA_DIR_INITIALIZED:-false}" +CONFIG_DIR_INITIALIZED="${CONFIG_DIR_INITIALIZED:-false}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +if [ -f "$ENTRYPOINT_PID_FILE" ] || [ -f "$ENTRYPOINT_INIT_FILE" ]; then + START_SERVICES="no" ENTRYPOINT_MESSAGE="no" ENTRYPOINT_FIRST_RUN="no" +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/share/template-files/config/env/examples/00-directory.sh b/rootfs/usr/local/share/template-files/config/env/examples/00-directory.sh new file mode 100644 index 0000000..b41c7b7 --- /dev/null +++ b/rootfs/usr/local/share/template-files/config/env/examples/00-directory.sh @@ -0,0 +1,10 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# directory settings +WWW_ROOT_DIR="${ENV_WWW_ROOT_DIR:-${WWW_ROOT_DIR}}" +BACKUP_DIR="${ENV_BACKUP_DIR:-${BACKUP_DIR:-/data/backups}}" +LOCAL_BIN_DIR="${ENV_LOCAL_BIN_DIR:-${LOCAL_BIN_DIR:-/usr/local/bin}}" +DATABASE_BASE_DIR="${ENV_DATABASE_BASE_DIR:-${DATABASE_BASE_DIR:-/data/db}}" +DEFAULT_DATA_DIR="${ENV_DEFAULT_DATA_DIR:-${DEFAULT_DATA_DIR:-/usr/local/share/template-files/data}}" +DEFAULT_CONF_DIR="${ENV_DEFAULT_CONF_DIR:-${DEFAULT_CONF_DIR:-/usr/local/share/template-files/config}}" +DEFAULT_TEMPLATE_DIR="${ENV_DEFAULT_TEMPLATE_DIR:-${EDEFAULT_TEMPLATE_DIR:-/usr/local/share/template-files/defaults}}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/share/template-files/config/env/examples/addresses.sh b/rootfs/usr/local/share/template-files/config/env/examples/addresses.sh new file mode 100644 index 0000000..695428c --- /dev/null +++ b/rootfs/usr/local/share/template-files/config/env/examples/addresses.sh @@ -0,0 +1,5 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# get ip addresses +CONTAINER_IP4_ADDRESS="${CONTAINER_IP4_ADDRESS:-$(__get_ip4)}" +CONTAINER_IP6_ADDRESS="${CONTAINER_IP6_ADDRESS:-$(__get_ip6)}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/share/template-files/config/env/examples/certbot.sh b/rootfs/usr/local/share/template-files/config/env/examples/certbot.sh new file mode 100644 index 0000000..9f52b28 --- /dev/null +++ b/rootfs/usr/local/share/template-files/config/env/examples/certbot.sh @@ -0,0 +1,6 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# cerbot +CERT_BOT_MAIL="${ENV_CERT_BOT_MAIL:-$CERT_BOT_MAIL}" +CERTBOT_DOMAINS="${ENV_CERTBOT_DOMAINS:-$CERTBOT_DOMAINS}" +CERT_BOT_ENABLED="${ENV_CERT_BOT_ENABLED:-${CERT_BOT_ENABLED:-false}}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/share/template-files/config/env/examples/couchdb.sh b/rootfs/usr/local/share/template-files/config/env/examples/couchdb.sh new file mode 100644 index 0000000..4a7fb91 --- /dev/null +++ b/rootfs/usr/local/share/template-files/config/env/examples/couchdb.sh @@ -0,0 +1,7 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# couchdb env +COUCHDB_NODENAME="${ENV_COUCHDB_NODENAME:-${COUCHDB_NODENAME:-$NODENAME}}" +COUCHDB_USER="${ENV_COUCHDB_USER:-${COUCHDB_USER:-$DATABASE_USER_ROOT}}" +COUCHDB_PASSWORD="${ENV_COUCHDB_PASSWORD:-${COUCHDB_PASSWORD:-$DATABASE_PASS_ROOT}}" +DATABASE_DIR_COUCHDB="${ENV_DATABASE_DIR_COUCHDB:-${DATABASE_DIR_COUCHDB:-/data/db/couchdb}}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/share/template-files/config/env/examples/dockerd.sh b/rootfs/usr/local/share/template-files/config/env/examples/dockerd.sh new file mode 100644 index 0000000..a93d690 --- /dev/null +++ b/rootfs/usr/local/share/template-files/config/env/examples/dockerd.sh @@ -0,0 +1,4 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# docker env +DOCKER_HOST="${DOCKER_HOST:-unix://var/run/docker.sock}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/share/template-files/config/env/examples/global.sh b/rootfs/usr/local/share/template-files/config/env/examples/global.sh new file mode 100644 index 0000000..fece9c8 --- /dev/null +++ b/rootfs/usr/local/share/template-files/config/env/examples/global.sh @@ -0,0 +1,13 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# GLOBAL enviroment variables +USER="${USER:-root}" +LANG="${LANG:-C.UTF-8}" +TZ="${TZ:-America/New_York}" +ENV_PORTS="${ENV_PORTS//\/*/}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# How to set permissions +SERVICE_USER="${SERVICE_USER:-}" +SERVICE_GROUP="${SERVICE_GROUP:-}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +SERVICE_UID="${SERVICE_UID:-}" # set the user id +SERVICE_GID="${SERVICE_GID:-}" # set the group id diff --git a/rootfs/usr/local/share/template-files/config/env/examples/healthcheck.sh b/rootfs/usr/local/share/template-files/config/env/examples/healthcheck.sh new file mode 100644 index 0000000..0dd7d39 --- /dev/null +++ b/rootfs/usr/local/share/template-files/config/env/examples/healthcheck.sh @@ -0,0 +1,5 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# healthcheck +HEALTH_ENABLED="${HEALTH_ENABLED:-}" +HEALTH_URL="${HEALTH_URL:-}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/share/template-files/config/env/examples/mariadb.sh b/rootfs/usr/local/share/template-files/config/env/examples/mariadb.sh new file mode 100644 index 0000000..223fce3 --- /dev/null +++ b/rootfs/usr/local/share/template-files/config/env/examples/mariadb.sh @@ -0,0 +1,14 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# mariadb env +MARIADB_ROOT_HOST="${MARIADB_ROOT_HOST:-%}" +MARIADB_AUTO_UPGRADE="${MARIADB_AUTO_UPGRADE:-yes}" +MARIADB_DATABASE="${MARIADB_DATABASE:-$DATABASE_CREATE}" +MARIADB_USER="${MARIADB_USER:-$DATABASE_USER_NORMAL}" +MARIADB_PASSWORD="${MARIADB_PASSWORD:-$DATABASE_PASS_NORMAL}" +DATABASE_DIR_MARIADB="${DATABASE_DIR_MARIADB:-/data/db/mariadb}" +MARIADB_ROOT_PASSWORD="${MARIADB_ROOT_PASSWORD:-$DATABASE_PASS_ROOT}" +MARIADB_ALLOW_EMPTY_ROOT_PASSWORD="${MARIADB_ALLOW_EMPTY_ROOT_PASSWORD:-}" +MARIADB_INITDB_SKIP_TZINFO="${MARIADB_INITDB_SKIP_TZINFO}:-" +MARIADB_RANDOM_ROOT_PASSWORD="${MARIADB_RANDOM_ROOT_PASSWORD:-}" +MARIADB_CONFIG_FILE="${MARIADB_CONFIG_FILE:-$(__find_mysql_conf)}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/share/template-files/config/env/examples/mongodb.sh b/rootfs/usr/local/share/template-files/config/env/examples/mongodb.sh new file mode 100644 index 0000000..8e014de --- /dev/null +++ b/rootfs/usr/local/share/template-files/config/env/examples/mongodb.sh @@ -0,0 +1,20 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# mongodb env +DATABASE_DIR_MONGODB="${DATABASE_DIR_MONGODB:-/data/db/mongodb}" +INITDB_ROOT_USERNAME="${DATABASE_USER_ROOT:-$INITDB_ROOT_USERNAME}" +MONGO_INITDB_ROOT_PASSWORD="${DATABASE_PASS_ROOT:-$MONGO_INITDB_ROOT_PASSWORD}" +ME_CONFIG_EDITORTHEME="${ME_CONFIG_EDITORTHEME:-dracula}" +ME_CONFIG_MONGODB_URL="${ME_CONFIG_MONGODB_URL:-mongodb://127.0.0.1:27017}" +ME_CONFIG_MONGODB_ENABLE_ADMIN="${ME_CONFIG_MONGODB_ENABLE_ADMIN:-true}" +ME_CONFIG_BASICAUTH_USERNAME="${ME_CONFIG_BASICAUTH_USERNAME:-}" +ME_CONFIG_BASICAUTH_PASSWORD="${ME_CONFIG_BASICAUTH_PASSWORD:-}" +ME_CONFIG_BASICAUTH_USERNAME_FILE="${ME_CONFIG_BASICAUTH_USERNAME_FILE:-}" +ME_CONFIG_BASICAUTH_PASSWORD_FILE="${ME_CONFIG_BASICAUTH_PASSWORD_FILE:-}" +ME_CONFIG_MONGODB_ADMINUSERNAME_FILE="${ME_CONFIG_MONGODB_ADMINUSERNAME_FILE:-}" +ME_CONFIG_MONGODB_ADMINPASSWORD_FILE="${ME_CONFIG_MONGODB_ADMINPASSWORD_FILE:-}" +ME_CONFIG_MONGODB_AUTH_USERNAME_FILE="${ME_CONFIG_MONGODB_AUTH_USERNAME_FILE:-}" +ME_CONFIG_MONGODB_AUTH_PASSWORD_FILE="${ME_CONFIG_MONGODB_AUTH_PASSWORD_FILE:-}" +ME_CONFIG_MONGODB_CA_FILE="${ME_CONFIG_MONGODB_CA_FILE:-}" +VCAP_APP_HOST="${VCAP_APP_HOST:-0.0.0.0}" +VCAP_APP_PORT="${VCAP_APP_PORT:-19054}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/share/template-files/config/env/examples/networking.sh b/rootfs/usr/local/share/template-files/config/env/examples/networking.sh new file mode 100644 index 0000000..3af24bb --- /dev/null +++ b/rootfs/usr/local/share/template-files/config/env/examples/networking.sh @@ -0,0 +1,9 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# networing info +DOMAINNAME="${DOMAINNAME:-}" +EMAIL_RELAY="${EMAIL_RELAY:-}" +HOSTNAME="${HOSTNAME:-casjaysdev-GEN_SCRIPT_REPLACE_APPNAME}" +EMAIL_DOMAIN="${EMAIL_DOMAIN:-${DOMAINNAME:-$HOSTNAME}}" +FULL_DOMAIN_NAME="${FULL_DOMAIN_NAME:-${DOMAINNAME:-$HOSTNAME}}" +SERVER_ADMIN="${SERVER_ADMIN:-root@${EMAIL_DOMAIN:-$FULL_DOMAIN_NAME}}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/share/template-files/config/env/examples/other.sh b/rootfs/usr/local/share/template-files/config/env/examples/other.sh new file mode 100644 index 0000000..1a59689 --- /dev/null +++ b/rootfs/usr/local/share/template-files/config/env/examples/other.sh @@ -0,0 +1,4 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# other + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/share/template-files/config/env/examples/php.sh b/rootfs/usr/local/share/template-files/config/env/examples/php.sh new file mode 100644 index 0000000..a005543 --- /dev/null +++ b/rootfs/usr/local/share/template-files/config/env/examples/php.sh @@ -0,0 +1,6 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# php settings +PHP_VERSION="${PHP_VERSION//php/}" +PHP_INI_DIR="${PHP_INI_DIR:-$(__find_php_ini)}" +PHP_BIN_DIR="${PHP_BIN_DIR:-$(__find_php_bin)}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/share/template-files/config/env/examples/postgres.sh b/rootfs/usr/local/share/template-files/config/env/examples/postgres.sh new file mode 100644 index 0000000..348b4bf --- /dev/null +++ b/rootfs/usr/local/share/template-files/config/env/examples/postgres.sh @@ -0,0 +1,8 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# postgresql env +PGDATA="${DATABASE_DIR_PGSQL:-$PGDATA}" +DATABASE_DIR_PGSQL="${DATABASE_DIR_PGSQL:-/data/db/postgres}" +POSTGRES_USER="${DATABASE_USER_ROOT:-$POSTGRES_USER}" +POSTGRES_PASSWORD="${DATABASE_PASS_ROOT:-$POSTGRES_PASSWORD}" +POSTGRES_CONFIG_FILE="${POSTGRES_CONFIG_FILE:-$(__find_pgsql_conf)}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/share/template-files/config/env/examples/redis.sh b/rootfs/usr/local/share/template-files/config/env/examples/redis.sh new file mode 100644 index 0000000..805a14d --- /dev/null +++ b/rootfs/usr/local/share/template-files/config/env/examples/redis.sh @@ -0,0 +1,4 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# redis env +DATABASE_DIR_REDIS="${DATABASE_DIR_REDIS:-/data/db/redis}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/share/template-files/config/env/examples/services.sh b/rootfs/usr/local/share/template-files/config/env/examples/services.sh new file mode 100644 index 0000000..e330031 --- /dev/null +++ b/rootfs/usr/local/share/template-files/config/env/examples/services.sh @@ -0,0 +1,7 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# services/ports +ENV_PORTS="${ENV_PORTS:-}" +SERVICE_PORT="${SERVICE_PORT:-$PORT}" +WEB_SERVER_PORTS="${WEB_SERVER_PORTS:-}" +SERVICES_LIST="${PROCS_LIST:-$SERVICES_LIST} " +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/share/template-files/config/env/examples/ssl.sh b/rootfs/usr/local/share/template-files/config/env/examples/ssl.sh new file mode 100644 index 0000000..78b1686 --- /dev/null +++ b/rootfs/usr/local/share/template-files/config/env/examples/ssl.sh @@ -0,0 +1,19 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# ssl server settings +SSL_ENABLED="${SSL_ENABLED:-false}" +SSL_DIR="${SSL_CONTAINER_DIR:-/config/ssl}" +SSL_DIR="${SSL_DIR:-$SSL_DIR}" +SSL_CA="${SSL_CA:-$SSL_DIR/ca.crt}" +SSL_KEY="${SSL_KEY:-$SSL_DIR/server.key}" +SSL_CERT="${SSL_CERT:-$SSL_DIR/server.crt}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# certificate settings +RSA="${RSA:-4096}" +STATE="${STATE:-NY}" +CITY="${CITY:-Albany}" +COUNTRY="${COUNTRY:-US}" +UNIT="${UNIT:-CasjaysDev}" +ORG="${ORG:-"Casjays Developments"}" +DAYS_VALID="${DAYS_VALID:-3650}" +CN="${CN:-${FULL_DOMAIN_NAME:-$HOSTNAME}}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/share/template-files/config/env/examples/supabase.sh b/rootfs/usr/local/share/template-files/config/env/examples/supabase.sh new file mode 100644 index 0000000..f25a9ca --- /dev/null +++ b/rootfs/usr/local/share/template-files/config/env/examples/supabase.sh @@ -0,0 +1,4 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Supabase +DATABASE_DIR_SUPABASE="${DATABASE_DIR_SUPABASE:-/data/db/supabase}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/share/template-files/config/env/examples/webservers.sh b/rootfs/usr/local/share/template-files/config/env/examples/webservers.sh new file mode 100644 index 0000000..15ba1af --- /dev/null +++ b/rootfs/usr/local/share/template-files/config/env/examples/webservers.sh @@ -0,0 +1,8 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# web server configs +HTTPD_CONFIG_FILE="${HTTPD_CONFIG_FILE:-$(__find_httpd_conf)}" +NGINX_CONFIG_FILE="${NGINX_CONFIG_FILE:-$(__find_nginx_conf)}" +CADDY_CONFIG_FILE="${CHEROKEE_CONFIG_FILE:-$(__find_caddy_conf)}" +LIGHTTPD_CONFIG_FILE="${LIGHTTPD_CONFIG_FILE:-$(__find_lighttpd_conf)}" +CHEROKEE_CONFIG_FILE="${CHEROKEE_CONFIG_FILE:-$(__find_cherokee_conf)}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/share/template-files/config/env/examples/zz-entrypoint.sh b/rootfs/usr/local/share/template-files/config/env/examples/zz-entrypoint.sh new file mode 100644 index 0000000..cc9505b --- /dev/null +++ b/rootfs/usr/local/share/template-files/config/env/examples/zz-entrypoint.sh @@ -0,0 +1,21 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# File locations +ENTRYPOINT_PID_FILE="${ENTRYPOINT_PID_FILE:-/run/init.d/entrypoint.pid}" +ENTRYPOINT_INIT_FILE="${ENTRYPOINT_INIT_FILE:-/config/.entrypoint.done}" +ENTRYPOINT_DATA_INIT_FILE="${ENTRYPOINT_DATA_INIT_FILE:-/data/.docker_has_run}" +ENTRYPOINT_CONFIG_INIT_FILE="${ENTRYPOINT_CONFIG_INIT_FILE:-/config/.docker_has_run}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Startup variables +INIT_DATE="${INIT_DATE:-$(date)}" +START_SERVICES="${START_SERVICES:-yes}" +ENTRYPOINT_MESSAGE="${ENTRYPOINT_MESSAGE:-yes}" +ENTRYPOINT_FIRST_RUN="${ENTRYPOINT_FIRST_RUN:-yes}" +DATA_DIR_INITIALIZED="${DATA_DIR_INITIALIZED:-false}" +CONFIG_DIR_INITIALIZED="${CONFIG_DIR_INITIALIZED:-false}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Check if this is a new container +[ -f "$ENTRYPOINT_PID_FILE" ] && START_SERVICES="no" +[ -f "$ENTRYPOINT_CONFIG_INIT_FILE" ] && ENTRYPOINT_FIRST_RUN="no" +[ -f "$ENTRYPOINT_DATA_INIT_FILE" ] && DATA_DIR_INITIALIZED="true" +[ -f "$ENTRYPOINT_CONFIG_INIT_FILE" ] && CONFIG_DIR_INITIALIZED="true" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/share/template-files/config/nginx/fastcgi_params b/rootfs/usr/local/share/template-files/config/nginx/fastcgi_params new file mode 100644 index 0000000..64f8d6c --- /dev/null +++ b/rootfs/usr/local/share/template-files/config/nginx/fastcgi_params @@ -0,0 +1,26 @@ +# nginx fastcgi_params +fastcgi_param QUERY_STRING $query_string; +fastcgi_param REQUEST_METHOD $request_method; +fastcgi_param CONTENT_TYPE $content_type; +fastcgi_param CONTENT_LENGTH $content_length; + +fastcgi_param SCRIPT_FILENAME $request_filename; +fastcgi_param SCRIPT_NAME $fastcgi_script_name; +fastcgi_param REQUEST_URI $request_uri; +fastcgi_param DOCUMENT_URI $document_uri; +fastcgi_param DOCUMENT_ROOT $document_root; +fastcgi_param SERVER_PROTOCOL $server_protocol; + +fastcgi_param GATEWAY_INTERFACE CGI/1.1; +fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; + +fastcgi_param REMOTE_ADDR $remote_addr; +fastcgi_param REMOTE_PORT $remote_port; +fastcgi_param SERVER_ADDR $server_addr; +fastcgi_param SERVER_PORT $server_port; +fastcgi_param SERVER_NAME $server_name; + +fastcgi_param HTTPS $https if_not_empty; + +# PHP only, required if PHP was built with --enable-force-cgi-redirect +fastcgi_param REDIRECT_STATUS 200; diff --git a/rootfs/usr/local/share/template-files/config/nginx/mime.types b/rootfs/usr/local/share/template-files/config/nginx/mime.types new file mode 100644 index 0000000..1c00d70 --- /dev/null +++ b/rootfs/usr/local/share/template-files/config/nginx/mime.types @@ -0,0 +1,99 @@ + +types { + text/html html htm shtml; + text/css css; + text/xml xml; + image/gif gif; + image/jpeg jpeg jpg; + application/javascript js; + application/atom+xml atom; + application/rss+xml rss; + + text/mathml mml; + text/plain txt; + text/vnd.sun.j2me.app-descriptor jad; + text/vnd.wap.wml wml; + text/x-component htc; + + image/avif avif; + image/png png; + image/svg+xml svg svgz; + image/tiff tif tiff; + image/vnd.wap.wbmp wbmp; + image/webp webp; + image/x-icon ico; + image/x-jng jng; + image/x-ms-bmp bmp; + + font/woff woff; + font/woff2 woff2; + + application/java-archive jar war ear; + application/json json; + application/mac-binhex40 hqx; + application/msword doc; + application/pdf pdf; + application/postscript ps eps ai; + application/rtf rtf; + application/vnd.apple.mpegurl m3u8; + application/vnd.google-earth.kml+xml kml; + application/vnd.google-earth.kmz kmz; + application/vnd.ms-excel xls; + application/vnd.ms-fontobject eot; + application/vnd.ms-powerpoint ppt; + application/vnd.oasis.opendocument.graphics odg; + application/vnd.oasis.opendocument.presentation odp; + application/vnd.oasis.opendocument.spreadsheet ods; + application/vnd.oasis.opendocument.text odt; + application/vnd.openxmlformats-officedocument.presentationml.presentation + pptx; + application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + xlsx; + application/vnd.openxmlformats-officedocument.wordprocessingml.document + docx; + application/vnd.wap.wmlc wmlc; + application/wasm wasm; + application/x-7z-compressed 7z; + application/x-cocoa cco; + application/x-java-archive-diff jardiff; + application/x-java-jnlp-file jnlp; + application/x-makeself run; + application/x-perl pl pm; + application/x-pilot prc pdb; + application/x-rar-compressed rar; + application/x-redhat-package-manager rpm; + application/x-sea sea; + application/x-shockwave-flash swf; + application/x-stuffit sit; + application/x-tcl tcl tk; + application/x-x509-ca-cert der pem crt; + application/x-xpinstall xpi; + application/xhtml+xml xhtml; + application/xspf+xml xspf; + application/zip zip; + + application/octet-stream bin exe dll; + application/octet-stream deb; + application/octet-stream dmg; + application/octet-stream iso img; + application/octet-stream msi msp msm; + + audio/midi mid midi kar; + audio/mpeg mp3; + audio/ogg ogg; + audio/x-m4a m4a; + audio/x-realaudio ra; + + video/3gpp 3gpp 3gp; + video/mp2t ts; + video/mp4 mp4; + video/mpeg mpeg mpg; + video/quicktime mov; + video/webm webm; + video/x-flv flv; + video/x-m4v m4v; + video/x-mng mng; + video/x-ms-asf asx asf; + video/x-ms-wmv wmv; + video/x-msvideo avi; +} diff --git a/rootfs/usr/local/share/template-files/config/nginx/nginx.conf b/rootfs/usr/local/share/template-files/config/nginx/nginx.conf new file mode 100644 index 0000000..8cda356 --- /dev/null +++ b/rootfs/usr/local/share/template-files/config/nginx/nginx.conf @@ -0,0 +1,99 @@ +# Default nginx configuration +user REPLACE_SERVICE_USER; +worker_processes 2; +daemon on; +error_log /data/logs/nginx/nginx.log warn; +pid /run/nginx.pid; + +events { + worker_connections 1024; +} + +http { + sendfile on; + keepalive_timeout 65; + gzip on; + default_type "text/html"; + include /etc/nginx/mime.types; + access_log /data/logs/nginx/nginx.access.log; + map $http_upgrade $connection_upgrade { default upgrade; '' close; } + + server { + listen REPLACE_SERVER_PORT; + root REPLACE_SERVER_WWW_DIR; + index index.html index.php index.cgi index.pl index.aspx awstats.pl index.unknown.php index.default.php index.txt index.json; + proxy_intercept_errors off; + add_header X-Frame-Options "SAMEORIGIN" always; + add_header X-XSS-Protection "1; mode=block" always; + add_header X-Content-Type-Options "nosniff" always; + add_header Referrer-Policy "no-referrer-when-downgrade" always; + add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; + add_header Content-Security-Policy "script-src 'self' 'unsafe-inline' 'unsafe-eval' *; frame-src 'self' *; object-src 'self'" always; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location /health { + default_type text/html; + allow all; + access_log off; + return 200 'OK'; + } + + location /health/text { + default_type application/text; + allow all; + access_log off; + return 200 'OK'; + } + + location /health/json { + default_type application/json; + allow all; + access_log off; + return 200 '{"status":"OK"}'; + } + + location ~ [^/]\.php(/|$) { + fastcgi_split_path_info ^(.+?\.php)(/.*)$; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + fastcgi_index index.php; + fastcgi_param HTTP_PROXY ""; + fastcgi_param REDIRECT_STATUS 200; + fastcgi_param GATEWAY_INTERFACE CGI/1.1; + fastcgi_param SERVER_SOFTWARE nginx; + fastcgi_param REQUEST_METHOD $request_method; + fastcgi_param CONTENT_TYPE $content_type; + fastcgi_param CONTENT_LENGTH $content_length; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_param SCRIPT_NAME $fastcgi_script_name; + fastcgi_param REQUEST_URI $request_uri; + fastcgi_param DOCUMENT_URI $document_uri; + fastcgi_param DOCUMENT_ROOT $document_root; + fastcgi_param SERVER_PROTOCOL $server_protocol; + fastcgi_param REMOTE_ADDR $remote_addr; + fastcgi_param REMOTE_PORT $remote_port; + fastcgi_param SERVER_ADDR $server_addr; + fastcgi_param SERVER_PORT $server_port; + fastcgi_param SERVER_NAME $server_name; + fastcgi_param HTTPS $https if_not_empty; + fastcgi_param QUERY_STRING $query_string; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_pass 127.0.0.1:9000; + } + + location /nginx_status { + stub_status; + } + } +} diff --git a/rootfs/usr/local/share/template-files/config/php/php-fpm.conf b/rootfs/usr/local/share/template-files/config/php/php-fpm.conf new file mode 100644 index 0000000..4eee53b --- /dev/null +++ b/rootfs/usr/local/share/template-files/config/php/php-fpm.conf @@ -0,0 +1,7 @@ +;;;;;;;;;;;;;;;;;;;;; + +pid = /run/php-fpm.pid +error_log = /data/logs/php/php-fpm.log +daemonize = yes + +include=/etc/php/php-fpm.d/*.conf diff --git a/rootfs/usr/local/share/template-files/config/php/php-fpm.d/www.conf b/rootfs/usr/local/share/template-files/config/php/php-fpm.d/www.conf new file mode 100644 index 0000000..07f5291 --- /dev/null +++ b/rootfs/usr/local/share/template-files/config/php/php-fpm.d/www.conf @@ -0,0 +1,27 @@ +[www] +user = root +group = root +listen = 9000 +listen.backlog = 65535 +listen.allowed_clients = 127.0.0.1 +pm = ondemand +pm.max_children = 50 +pm.start_servers = 5 +pm.min_spare_servers = 5 +pm.max_spare_servers = 35 +pm.status_path = /status +ping.path = /ping +ping.response = pong +access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" +clear_env = no +env[HOSTNAME] = $HOSTNAME +env[PATH] = /usr/local/bin:/usr/bin:/bin +env[TMP] = /var/tmp +env[TMPDIR] = /var/tmp +env[TEMP] = /var/tmp +slowlog = /data/logs/php/php.slow.log +access.log = /data/logs/php/php.access.log +php_admin_value[error_log] = /data/logs/php/php.log +php_flag[display_errors] = on +php_admin_flag[log_errors] = on +php_admin_value[memory_limit] = 512M diff --git a/rootfs/usr/local/share/template-files/config/php/php.ini b/rootfs/usr/local/share/template-files/config/php/php.ini new file mode 100644 index 0000000..ec3f1be --- /dev/null +++ b/rootfs/usr/local/share/template-files/config/php/php.ini @@ -0,0 +1,347 @@ +[PHP] +user_ini.filename = "php.ini" +user_ini.filename = ".user.ini" +user_ini.cache_ttl = 300 +engine = On +short_open_tag = Off +asp_tags = Off +precision = 14 +output_buffering = 4096 +;output_handler = +zlib.output_compression = Off +;zlib.output_compression_level = -1 +;zlib.output_handler = +implicit_flush = Off +unserialize_callback_func = +serialize_precision = 17 +;open_basedir = +disable_functions = +disable_classes = +ignore_user_abort = On +realpath_cache_size = 16k +realpath_cache_ttl = 120 +zend.enable_gc = On +zend.multibyte = Off +zend.script_encoding = +expose_php = Off +max_execution_time = 3600 +max_input_time = 3600 +;max_input_nesting_level = 64 +; max_input_vars = 1000 +memory_limit = 512M +error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT +display_errors = On +display_startup_errors = Off +log_errors = On +log_errors_max_len = 1024 +ignore_repeated_errors = Off +ignore_repeated_source = Off +report_memleaks = On +;report_zend_debug = 0 +track_errors = Off +;xmlrpc_errors = 0 +;xmlrpc_error_number = 0 +html_errors = On +;docref_root = "/phpmanual/" +;docref_ext = .html +error_prepend_string = "" +error_append_string = "" +error_log = /data/logs/php/php.log +;arg_separator.input = ";&" +variables_order = "GPCS" +request_order = "GP" +register_argc_argv = Off +auto_globals_jit = On +;enable_post_data_reading = Off +post_max_size = 10G +auto_prepend_file = +auto_append_file = +default_mimetype = "text/html" +default_charset = "UTF-8" +;internal_encoding = +;input_encoding = +;output_encoding = +always_populate_raw_post_data = -1 +doc_root = +user_dir = +enable_dl = Off +cgi.force_redirect = 1 +;cgi.nph = 1 +cgi.redirect_status_env = +cgi.fix_pathinfo = 1 +fastcgi.impersonate = 1 +;fastcgi.logging = 0 +;cgi.rfc2616_headers = 0 +file_uploads = On +upload_tmp_dir = /var/tmp +upload_max_filesize =10G +max_file_uploads = 20 +allow_url_fopen = On +allow_url_include = On +;from="john@doe.com" +;user_agent="PHP" +default_socket_timeout = 60 +;auto_detect_line_endings = Off + +[CLI Server] +cli_server.color = On + +[Date] +date.timezone = America/New_York +;date.default_latitude = 31.7667 +;date.default_longitude = 35.2333 + +[filter] +;filter.default = unsafe_raw +;filter.default_flags = + +[iconv] +;iconv.input_encoding = +;iconv.internal_encoding = +;iconv.output_encoding = + +[intl] +;intl.default_locale = +;intl.error_level = E_WARNING + +[sqlite] +;sqlite.assoc_case = 0 + +[sqlite3] +;sqlite3.extension_dir = + +[Pcre] +;pcre.backtrack_limit=100000 +;pcre.recursion_limit=100000 + +[Pdo] +;pdo_odbc.connection_pooling=strict +;pdo_odbc.db2_instance_name + +[Pdo_mysql] +pdo_mysql.cache_size = 2000 +pdo_mysql.default_socket= + +[Phar] +;phar.readonly = On +;phar.require_hash = On +;phar.cache_list = + +[mail function] +sendmail_path = -S localhost -t -i +;sendmail_path = /usr/sbin/sendmail -t -i +;mail.force_extra_parameters = +mail.add_x_header = On +;mail.log = syslog + +[SQL] +sql.safe_mode = Off + +[ODBC] +;odbc.default_db = Not yet implemented +;odbc.default_user = Not yet implemented +;odbc.default_pw = Not yet implemented +;odbc.default_cursortype +odbc.allow_persistent = On +odbc.check_persistent = On +odbc.max_persistent = -1 +odbc.max_links = -1 +odbc.defaultlrl = 4096 +odbc.defaultbinmode = 1 +;birdstep.max_links = -1 + +[Interbase] +ibase.allow_persistent = 1 +ibase.max_persistent = -1 +ibase.max_links = -1 +;ibase.default_db = +;ibase.default_user = +;ibase.default_password = +;ibase.default_charset = +ibase.timestampformat = "%Y-%m-%d %H:%M:%S" +ibase.dateformat = "%Y-%m-%d" +ibase.timeformat = "%H:%M:%S" + +[MySQL] +mysql.allow_local_infile = On +mysql.allow_persistent = On +mysql.cache_size = 2000 +mysql.max_persistent = -1 +mysql.max_links = -1 +mysql.default_port = +mysql.default_socket = +mysql.default_host = +mysql.default_user = +mysql.default_password = +mysql.connect_timeout = 60 +mysql.trace_mode = Off + +[MySQLi] +mysqli.max_persistent = -1 +mysqli.allow_local_infile = On +mysqli.allow_persistent = On +mysqli.max_links = -1 +mysqli.cache_size = 2000 +mysqli.default_port = 3306 +mysqli.default_socket = +mysqli.default_host = +mysqli.default_user = +mysqli.default_pw = +mysqli.reconnect = Off + +[mysqlnd] +mysqlnd.collect_statistics = On +mysqlnd.collect_memory_statistics = Off +;mysqlnd.net_cmd_buffer_size = 2048 +;mysqlnd.net_read_buffer_size = 32768 + +[OCI8] +;oci8.privileged_connect = Off +;oci8.max_persistent = -1 +;oci8.persistent_timeout = -1 +;oci8.ping_interval = 60 +;oci8.connection_class = +;oci8.events = Off +;oci8.statement_cache_size = 20 +;oci8.default_prefetch = 100 +;oci8.old_oci_close_semantics = Off + +[PostgreSQL] +pgsql.allow_persistent = On +pgsql.auto_reset_persistent = Off +pgsql.max_persistent = -1 +pgsql.max_links = -1 +pgsql.ignore_notice = 0 +pgsql.log_notice = 0 + +[Sybase-CT] +sybct.allow_persistent = On +sybct.max_persistent = -1 +sybct.max_links = -1 +sybct.min_server_severity = 10 +sybct.min_client_severity = 10 +;sybct.timeout= +;sybct.packet_size +;sybct.login_timeout= +;sybct.hostname= +;sybct.deadlock_retry_count= + +[bcmath] +bcmath.scale = 0 + +[browscap] +;browscap = extra/browscap.ini + +[Session] +session.save_handler = files +session.save_path = "/tmp" +session.use_strict_mode = 0 +session.use_cookies = 1 +;session.cookie_secure = +session.use_only_cookies = 1 +session.name = PHPSESSID +session.auto_start = 0 +session.cookie_lifetime = 525600 +session.cookie_path = / +session.cookie_domain = +session.cookie_httponly = +session.serialize_handler = php +session.gc_probability = 1 +session.gc_divisor = 1000 +session.gc_maxlifetime = 525600 +session.referer_check = +;session.entropy_length = 32 +;session.entropy_file = /dev/urandom +session.cache_limiter = nocache +session.cache_expire = 180 +session.use_trans_sid = 0 +session.hash_function = 0 +session.hash_bits_per_character = 5 +url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry" +session.upload_progress.enabled = On +session.upload_progress.cleanup = On +session.upload_progress.prefix = "upload_progress_" +session.upload_progress.name = "PHP_SESSION_UPLOAD_PROGRESS" +session.upload_progress.freq = "1%" +session.upload_progress.min_freq = "1" + +[MSSQL] +mssql.allow_persistent = On +mssql.max_persistent = -1 +mssql.max_links = -1 +mssql.min_error_severity = 10 +mssql.min_message_severity = 10 +mssql.compatibility_mode = Off +;mssql.connect_timeout = 5 +;mssql.timeout = 60 +;mssql.textlimit = 4096 +;mssql.textsize = 4096 +;mssql.batchsize = 0 +;mssql.datetimeconvert = On +mssql.secure_connection = Off +;mssql.max_procs = -1 +;mssql.charset = "ISO-8859-1" + +[Assertion] +;assert.active = On +;assert.warning = On +;assert.bail = Off +;assert.callback = 0 +;assert.quiet_eval = 0 + +[mbstring] +;mbstring.language = Japanese +;mbstring.internal_encoding = +;mbstring.http_input = +;mbstring.http_output = +;mbstring.encoding_translation = Off +;mbstring.detect_order = auto +;mbstring.substitute_character = none +;mbstring.func_overload = 0 +;mbstring.strict_detection = On +;mbstring.http_output_conv_mimetype= + +[gd] +;gd.jpeg_ignore_warning = 0 + +[exif] +;exif.encode_unicode = ISO-8859-15 +;exif.decode_unicode_motorola = UCS-2BE +;exif.decode_unicode_intel = UCS-2LE +;exif.encode_jis = +;exif.decode_jis_motorola = JIS +;exif.decode_jis_intel = JIS + +[Tidy] +;tidy.default_config = /usr/local/lib/php/default.tcfg +tidy.clean_output = Off + +[soap] +soap.wsdl_cache_enabled=1 +soap.wsdl_cache_dir="/tmp" +soap.wsdl_cache_ttl=86400 +soap.wsdl_cache_limit = 5 + +[sysvshm] +;sysvshm.init_mem = 10000 + +[ldap] +ldap.max_links = -1 + +[mcrypt] +;mcrypt.algorithms_dir= +;mcrypt.modes_dir= + +[dba] +;dba.default_handler= + +[curl] +;curl.cainfo = + +[openssl] +;openssl.cafile= +;openssl.capath= + +; Local Variables: +; tab-width: 4 +; End: diff --git a/rootfs/usr/local/share/template-files/data/.gitkeep b/rootfs/usr/local/share/template-files/data/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/usr/local/share/template-files/defaults/.gitkeep b/rootfs/usr/local/share/template-files/defaults/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/usr/share/httpd/default/404.html b/rootfs/usr/share/httpd/default/404.html new file mode 100644 index 0000000..3f7b186 --- /dev/null +++ b/rootfs/usr/share/httpd/default/404.html @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 404 Not Found + + + + +
+
+ + 404 Not Found +

+ We apologize but we can't seem to be able to find what you're looking + for! +

+ + error
+
+ + +
+ + diff --git a/rootfs/usr/share/httpd/default/css/bootstrap.css b/rootfs/usr/share/httpd/default/css/bootstrap.css new file mode 100644 index 0000000..727c7db --- /dev/null +++ b/rootfs/usr/share/httpd/default/css/bootstrap.css @@ -0,0 +1,10522 @@ +@charset "UTF-8"; /*! + * Bootswatch v5.2.3 (https://bootswatch.com) + * Theme: darkly + * Copyright 2012-2022 Thomas Park + * Licensed under MIT + * Based on Bootstrap +*/ /*! + * Bootstrap v5.2.3 (https://getbootstrap.com/) + * Copyright 2011-2022 The Bootstrap Authors + * Copyright 2011-2022 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */ +@import url(https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;1,400&display=swap); +:root { + --bs-blue: #375a7f; + --bs-indigo: #6610f2; + --bs-purple: #6f42c1; + --bs-pink: #e83e8c; + --bs-red: #e74c3c; + --bs-orange: #fd7e14; + --bs-yellow: #f39c12; + --bs-green: #00bc8c; + --bs-teal: #20c997; + --bs-cyan: #3498db; + --bs-black: #000; + --bs-white: #fff; + --bs-gray: #888; + --bs-gray-dark: #303030; + --bs-gray-100: #f8f9fa; + --bs-gray-200: #ebebeb; + --bs-gray-300: #dee2e6; + --bs-gray-400: #ced4da; + --bs-gray-500: #adb5bd; + --bs-gray-600: #888; + --bs-gray-700: #444; + --bs-gray-800: #303030; + --bs-gray-900: #222; + --bs-primary: #375a7f; + --bs-secondary: #444; + --bs-success: #00bc8c; + --bs-info: #3498db; + --bs-warning: #f39c12; + --bs-danger: #e74c3c; + --bs-light: #adb5bd; + --bs-dark: #303030; + --bs-primary-rgb: 55, 90, 127; + --bs-secondary-rgb: 68, 68, 68; + --bs-success-rgb: 0, 188, 140; + --bs-info-rgb: 52, 152, 219; + --bs-warning-rgb: 243, 156, 18; + --bs-danger-rgb: 231, 76, 60; + --bs-light-rgb: 173, 181, 189; + --bs-dark-rgb: 48, 48, 48; + --bs-white-rgb: 255, 255, 255; + --bs-black-rgb: 0, 0, 0; + --bs-body-color-rgb: 255, 255, 255; + --bs-body-bg-rgb: 34, 34, 34; + --bs-font-sans-serif: Lato, -apple-system, BlinkMacSystemFont, 'Segoe UI', + Roboto, 'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji', + 'Segoe UI Emoji', 'Segoe UI Symbol'; + --bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, + 'Liberation Mono', 'Courier New', monospace; + --bs-gradient: linear-gradient( + 180deg, + rgba(255, 255, 255, 0.15), + rgba(255, 255, 255, 0) + ); + --bs-body-font-family: var(--bs-font-sans-serif); + --bs-body-font-size: 1rem; + --bs-body-font-weight: 400; + --bs-body-line-height: 1.5; + --bs-body-color: #fff; + --bs-body-bg: #222; + --bs-border-width: 1px; + --bs-border-style: solid; + --bs-border-color: #dee2e6; + --bs-border-color-translucent: rgba(0, 0, 0, 0.175); + --bs-border-radius: 0.375rem; + --bs-border-radius-sm: 0.25rem; + --bs-border-radius-lg: 0.5rem; + --bs-border-radius-xl: 1rem; + --bs-border-radius-2xl: 2rem; + --bs-border-radius-pill: 50rem; + --bs-link-color: #00bc8c; + --bs-link-hover-color: #009670; + --bs-code-color: #e83e8c; + --bs-highlight-bg: #fdebd0; +} +*, +::after, +::before { + box-sizing: border-box; +} +@media (prefers-reduced-motion: no-preference) { + :root { + scroll-behavior: smooth; + } +} +body { + margin: 0; + font-family: var(--bs-body-font-family); + font-size: var(--bs-body-font-size); + font-weight: var(--bs-body-font-weight); + line-height: var(--bs-body-line-height); + color: var(--bs-body-color); + text-align: var(--bs-body-text-align); + background-color: var(--bs-body-bg); + -webkit-text-size-adjust: 100%; + -webkit-tap-highlight-color: transparent; +} +hr { + margin: 1rem 0; + color: inherit; + border: 0; + border-top: 1px solid; + opacity: 0.25; +} +.h1, +.h2, +.h3, +.h4, +.h5, +.h6, +h1, +h2, +h3, +h4, +h5, +h6 { + margin-top: 0; + margin-bottom: 0.5rem; + font-weight: 500; + line-height: 1.2; +} +.h1, +h1 { + font-size: calc(1.425rem + 2.1vw); +} +@media (min-width: 1200px) { + .h1, + h1 { + font-size: 3rem; + } +} +.h2, +h2 { + font-size: calc(1.375rem + 1.5vw); +} +@media (min-width: 1200px) { + .h2, + h2 { + font-size: 2.5rem; + } +} +.h3, +h3 { + font-size: calc(1.325rem + 0.9vw); +} +@media (min-width: 1200px) { + .h3, + h3 { + font-size: 2rem; + } +} +.h4, +h4 { + font-size: calc(1.275rem + 0.3vw); +} +@media (min-width: 1200px) { + .h4, + h4 { + font-size: 1.5rem; + } +} +.h5, +h5 { + font-size: 1.25rem; +} +.h6, +h6 { + font-size: 1rem; +} +p { + margin-top: 0; + margin-bottom: 1rem; +} +abbr[title] { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + cursor: help; + -webkit-text-decoration-skip-ink: none; + text-decoration-skip-ink: none; +} +address { + margin-bottom: 1rem; + font-style: normal; + line-height: inherit; +} +ol, +ul { + padding-left: 2rem; +} +dl, +ol, +ul { + margin-top: 0; + margin-bottom: 1rem; +} +ol ol, +ol ul, +ul ol, +ul ul { + margin-bottom: 0; +} +dt { + font-weight: 700; +} +dd { + margin-bottom: 0.5rem; + margin-left: 0; +} +blockquote { + margin: 0 0 1rem; +} +b, +strong { + font-weight: bolder; +} +.small, +small { + font-size: 0.875em; +} +.mark, +mark { + padding: 0.1875em; + background-color: var(--bs-highlight-bg); +} +sub, +sup { + position: relative; + font-size: 0.75em; + line-height: 0; + vertical-align: baseline; +} +sub { + bottom: -0.25em; +} +sup { + top: -0.5em; +} +a { + color: var(--bs-link-color); + text-decoration: underline; +} +a:hover { + color: var(--bs-link-hover-color); +} +a:not([href]):not([class]), +a:not([href]):not([class]):hover { + color: inherit; + text-decoration: none; +} +code, +kbd, +pre, +samp { + font-family: var(--bs-font-monospace); + font-size: 1em; +} +pre { + display: block; + margin-top: 0; + margin-bottom: 1rem; + overflow: auto; + font-size: 0.875em; + color: inherit; +} +pre code { + font-size: inherit; + color: inherit; + word-break: normal; +} +code { + font-size: 0.875em; + color: var(--bs-code-color); + word-wrap: break-word; +} +a > code { + color: inherit; +} +kbd { + padding: 0.1875rem 0.375rem; + font-size: 0.875em; + color: var(--bs-body-bg); + background-color: var(--bs-body-color); + border-radius: 0.25rem; +} +kbd kbd { + padding: 0; + font-size: 1em; +} +figure { + margin: 0 0 1rem; +} +img, +svg { + vertical-align: middle; +} +table { + caption-side: bottom; + border-collapse: collapse; +} +caption { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + color: #888; + text-align: left; +} +th { + text-align: inherit; + text-align: -webkit-match-parent; +} +tbody, +td, +tfoot, +th, +thead, +tr { + border-color: inherit; + border-style: solid; + border-width: 0; +} +label { + display: inline-block; +} +button { + border-radius: 0; +} +button:focus:not(:focus-visible) { + outline: 0; +} +button, +input, +optgroup, +select, +textarea { + margin: 0; + font-family: inherit; + font-size: inherit; + line-height: inherit; +} +button, +select { + text-transform: none; +} +[role='button'] { + cursor: pointer; +} +select { + word-wrap: normal; +} +select:disabled { + opacity: 1; +} +[list]:not([type='date']):not([type='datetime-local']):not([type='month']):not( + [type='week'] + ):not([type='time'])::-webkit-calendar-picker-indicator { + display: none !important; +} +[type='button'], +[type='reset'], +[type='submit'], +button { + -webkit-appearance: button; +} +[type='button']:not(:disabled), +[type='reset']:not(:disabled), +[type='submit']:not(:disabled), +button:not(:disabled) { + cursor: pointer; +} +::-moz-focus-inner { + padding: 0; + border-style: none; +} +textarea { + resize: vertical; +} +fieldset { + min-width: 0; + padding: 0; + margin: 0; + border: 0; +} +legend { + float: left; + width: 100%; + padding: 0; + margin-bottom: 0.5rem; + font-size: calc(1.275rem + 0.3vw); + line-height: inherit; +} +@media (min-width: 1200px) { + legend { + font-size: 1.5rem; + } +} +legend + * { + clear: left; +} +::-webkit-datetime-edit-day-field, +::-webkit-datetime-edit-fields-wrapper, +::-webkit-datetime-edit-hour-field, +::-webkit-datetime-edit-minute, +::-webkit-datetime-edit-month-field, +::-webkit-datetime-edit-text, +::-webkit-datetime-edit-year-field { + padding: 0; +} +::-webkit-inner-spin-button { + height: auto; +} +[type='search'] { + outline-offset: -2px; + -webkit-appearance: textfield; +} +::-webkit-search-decoration { + -webkit-appearance: none; +} +::-webkit-color-swatch-wrapper { + padding: 0; +} +::-webkit-file-upload-button { + font: inherit; + -webkit-appearance: button; +} +::file-selector-button { + font: inherit; + -webkit-appearance: button; +} +output { + display: inline-block; +} +iframe { + border: 0; +} +summary { + display: list-item; + cursor: pointer; +} +progress { + vertical-align: baseline; +} +[hidden] { + display: none !important; +} +.lead { + font-size: 1.25rem; + font-weight: 300; +} +.display-1 { + font-size: calc(1.625rem + 4.5vw); + font-weight: 300; + line-height: 1.2; +} +@media (min-width: 1200px) { + .display-1 { + font-size: 5rem; + } +} +.display-2 { + font-size: calc(1.575rem + 3.9vw); + font-weight: 300; + line-height: 1.2; +} +@media (min-width: 1200px) { + .display-2 { + font-size: 4.5rem; + } +} +.display-3 { + font-size: calc(1.525rem + 3.3vw); + font-weight: 300; + line-height: 1.2; +} +@media (min-width: 1200px) { + .display-3 { + font-size: 4rem; + } +} +.display-4 { + font-size: calc(1.475rem + 2.7vw); + font-weight: 300; + line-height: 1.2; +} +@media (min-width: 1200px) { + .display-4 { + font-size: 3.5rem; + } +} +.display-5 { + font-size: calc(1.425rem + 2.1vw); + font-weight: 300; + line-height: 1.2; +} +@media (min-width: 1200px) { + .display-5 { + font-size: 3rem; + } +} +.display-6 { + font-size: calc(1.375rem + 1.5vw); + font-weight: 300; + line-height: 1.2; +} +@media (min-width: 1200px) { + .display-6 { + font-size: 2.5rem; + } +} +.list-unstyled { + padding-left: 0; + list-style: none; +} +.list-inline { + padding-left: 0; + list-style: none; +} +.list-inline-item { + display: inline-block; +} +.list-inline-item:not(:last-child) { + margin-right: 0.5rem; +} +.initialism { + font-size: 0.875em; + text-transform: uppercase; +} +.blockquote { + margin-bottom: 1rem; + font-size: 1.25rem; +} +.blockquote > :last-child { + margin-bottom: 0; +} +.blockquote-footer { + margin-top: -1rem; + margin-bottom: 1rem; + font-size: 0.875em; + color: #888; +} +.blockquote-footer::before { + content: '— '; +} +.img-fluid { + max-width: 100%; + height: auto; +} +.img-thumbnail { + padding: 0.25rem; + background-color: #222; + border: 1px solid var(--bs-border-color); + border-radius: 0.375rem; + max-width: 100%; + height: auto; +} +.figure { + display: inline-block; +} +.figure-img { + margin-bottom: 0.5rem; + line-height: 1; +} +.figure-caption { + font-size: 0.875em; + color: #888; +} +.container, +.container-fluid, +.container-lg, +.container-md, +.container-sm, +.container-xl, +.container-xxl { + --bs-gutter-x: 1.5rem; + --bs-gutter-y: 0; + width: 100%; + padding-right: calc(var(--bs-gutter-x) * 0.5); + padding-left: calc(var(--bs-gutter-x) * 0.5); + margin-right: auto; + margin-left: auto; +} +@media (min-width: 576px) { + .container, + .container-sm { + max-width: 540px; + } +} +@media (min-width: 768px) { + .container, + .container-md, + .container-sm { + max-width: 720px; + } +} +@media (min-width: 992px) { + .container, + .container-lg, + .container-md, + .container-sm { + max-width: 960px; + } +} +@media (min-width: 1200px) { + .container, + .container-lg, + .container-md, + .container-sm, + .container-xl { + max-width: 1140px; + } +} +@media (min-width: 1400px) { + .container, + .container-lg, + .container-md, + .container-sm, + .container-xl, + .container-xxl { + max-width: 1320px; + } +} +.row { + --bs-gutter-x: 1.5rem; + --bs-gutter-y: 0; + display: flex; + flex-wrap: wrap; + margin-top: calc(-1 * var(--bs-gutter-y)); + margin-right: calc(-0.5 * var(--bs-gutter-x)); + margin-left: calc(-0.5 * var(--bs-gutter-x)); +} +.row > * { + flex-shrink: 0; + width: 100%; + max-width: 100%; + padding-right: calc(var(--bs-gutter-x) * 0.5); + padding-left: calc(var(--bs-gutter-x) * 0.5); + margin-top: var(--bs-gutter-y); +} +.col { + flex: 1 0 0%; +} +.row-cols-auto > * { + flex: 0 0 auto; + width: auto; +} +.row-cols-1 > * { + flex: 0 0 auto; + width: 100%; +} +.row-cols-2 > * { + flex: 0 0 auto; + width: 50%; +} +.row-cols-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; +} +.row-cols-4 > * { + flex: 0 0 auto; + width: 25%; +} +.row-cols-5 > * { + flex: 0 0 auto; + width: 20%; +} +.row-cols-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; +} +.col-auto { + flex: 0 0 auto; + width: auto; +} +.col-1 { + flex: 0 0 auto; + width: 8.33333333%; +} +.col-2 { + flex: 0 0 auto; + width: 16.66666667%; +} +.col-3 { + flex: 0 0 auto; + width: 25%; +} +.col-4 { + flex: 0 0 auto; + width: 33.33333333%; +} +.col-5 { + flex: 0 0 auto; + width: 41.66666667%; +} +.col-6 { + flex: 0 0 auto; + width: 50%; +} +.col-7 { + flex: 0 0 auto; + width: 58.33333333%; +} +.col-8 { + flex: 0 0 auto; + width: 66.66666667%; +} +.col-9 { + flex: 0 0 auto; + width: 75%; +} +.col-10 { + flex: 0 0 auto; + width: 83.33333333%; +} +.col-11 { + flex: 0 0 auto; + width: 91.66666667%; +} +.col-12 { + flex: 0 0 auto; + width: 100%; +} +.offset-1 { + margin-left: 8.33333333%; +} +.offset-2 { + margin-left: 16.66666667%; +} +.offset-3 { + margin-left: 25%; +} +.offset-4 { + margin-left: 33.33333333%; +} +.offset-5 { + margin-left: 41.66666667%; +} +.offset-6 { + margin-left: 50%; +} +.offset-7 { + margin-left: 58.33333333%; +} +.offset-8 { + margin-left: 66.66666667%; +} +.offset-9 { + margin-left: 75%; +} +.offset-10 { + margin-left: 83.33333333%; +} +.offset-11 { + margin-left: 91.66666667%; +} +.g-0, +.gx-0 { + --bs-gutter-x: 0; +} +.g-0, +.gy-0 { + --bs-gutter-y: 0; +} +.g-1, +.gx-1 { + --bs-gutter-x: 0.25rem; +} +.g-1, +.gy-1 { + --bs-gutter-y: 0.25rem; +} +.g-2, +.gx-2 { + --bs-gutter-x: 0.5rem; +} +.g-2, +.gy-2 { + --bs-gutter-y: 0.5rem; +} +.g-3, +.gx-3 { + --bs-gutter-x: 1rem; +} +.g-3, +.gy-3 { + --bs-gutter-y: 1rem; +} +.g-4, +.gx-4 { + --bs-gutter-x: 1.5rem; +} +.g-4, +.gy-4 { + --bs-gutter-y: 1.5rem; +} +.g-5, +.gx-5 { + --bs-gutter-x: 3rem; +} +.g-5, +.gy-5 { + --bs-gutter-y: 3rem; +} +@media (min-width: 576px) { + .col-sm { + flex: 1 0 0%; + } + .row-cols-sm-auto > * { + flex: 0 0 auto; + width: auto; + } + .row-cols-sm-1 > * { + flex: 0 0 auto; + width: 100%; + } + .row-cols-sm-2 > * { + flex: 0 0 auto; + width: 50%; + } + .row-cols-sm-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + .row-cols-sm-4 > * { + flex: 0 0 auto; + width: 25%; + } + .row-cols-sm-5 > * { + flex: 0 0 auto; + width: 20%; + } + .row-cols-sm-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + .col-sm-auto { + flex: 0 0 auto; + width: auto; + } + .col-sm-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + .col-sm-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + .col-sm-3 { + flex: 0 0 auto; + width: 25%; + } + .col-sm-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + .col-sm-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + .col-sm-6 { + flex: 0 0 auto; + width: 50%; + } + .col-sm-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + .col-sm-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + .col-sm-9 { + flex: 0 0 auto; + width: 75%; + } + .col-sm-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + .col-sm-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + .col-sm-12 { + flex: 0 0 auto; + width: 100%; + } + .offset-sm-0 { + margin-left: 0; + } + .offset-sm-1 { + margin-left: 8.33333333%; + } + .offset-sm-2 { + margin-left: 16.66666667%; + } + .offset-sm-3 { + margin-left: 25%; + } + .offset-sm-4 { + margin-left: 33.33333333%; + } + .offset-sm-5 { + margin-left: 41.66666667%; + } + .offset-sm-6 { + margin-left: 50%; + } + .offset-sm-7 { + margin-left: 58.33333333%; + } + .offset-sm-8 { + margin-left: 66.66666667%; + } + .offset-sm-9 { + margin-left: 75%; + } + .offset-sm-10 { + margin-left: 83.33333333%; + } + .offset-sm-11 { + margin-left: 91.66666667%; + } + .g-sm-0, + .gx-sm-0 { + --bs-gutter-x: 0; + } + .g-sm-0, + .gy-sm-0 { + --bs-gutter-y: 0; + } + .g-sm-1, + .gx-sm-1 { + --bs-gutter-x: 0.25rem; + } + .g-sm-1, + .gy-sm-1 { + --bs-gutter-y: 0.25rem; + } + .g-sm-2, + .gx-sm-2 { + --bs-gutter-x: 0.5rem; + } + .g-sm-2, + .gy-sm-2 { + --bs-gutter-y: 0.5rem; + } + .g-sm-3, + .gx-sm-3 { + --bs-gutter-x: 1rem; + } + .g-sm-3, + .gy-sm-3 { + --bs-gutter-y: 1rem; + } + .g-sm-4, + .gx-sm-4 { + --bs-gutter-x: 1.5rem; + } + .g-sm-4, + .gy-sm-4 { + --bs-gutter-y: 1.5rem; + } + .g-sm-5, + .gx-sm-5 { + --bs-gutter-x: 3rem; + } + .g-sm-5, + .gy-sm-5 { + --bs-gutter-y: 3rem; + } +} +@media (min-width: 768px) { + .col-md { + flex: 1 0 0%; + } + .row-cols-md-auto > * { + flex: 0 0 auto; + width: auto; + } + .row-cols-md-1 > * { + flex: 0 0 auto; + width: 100%; + } + .row-cols-md-2 > * { + flex: 0 0 auto; + width: 50%; + } + .row-cols-md-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + .row-cols-md-4 > * { + flex: 0 0 auto; + width: 25%; + } + .row-cols-md-5 > * { + flex: 0 0 auto; + width: 20%; + } + .row-cols-md-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + .col-md-auto { + flex: 0 0 auto; + width: auto; + } + .col-md-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + .col-md-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + .col-md-3 { + flex: 0 0 auto; + width: 25%; + } + .col-md-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + .col-md-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + .col-md-6 { + flex: 0 0 auto; + width: 50%; + } + .col-md-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + .col-md-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + .col-md-9 { + flex: 0 0 auto; + width: 75%; + } + .col-md-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + .col-md-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + .col-md-12 { + flex: 0 0 auto; + width: 100%; + } + .offset-md-0 { + margin-left: 0; + } + .offset-md-1 { + margin-left: 8.33333333%; + } + .offset-md-2 { + margin-left: 16.66666667%; + } + .offset-md-3 { + margin-left: 25%; + } + .offset-md-4 { + margin-left: 33.33333333%; + } + .offset-md-5 { + margin-left: 41.66666667%; + } + .offset-md-6 { + margin-left: 50%; + } + .offset-md-7 { + margin-left: 58.33333333%; + } + .offset-md-8 { + margin-left: 66.66666667%; + } + .offset-md-9 { + margin-left: 75%; + } + .offset-md-10 { + margin-left: 83.33333333%; + } + .offset-md-11 { + margin-left: 91.66666667%; + } + .g-md-0, + .gx-md-0 { + --bs-gutter-x: 0; + } + .g-md-0, + .gy-md-0 { + --bs-gutter-y: 0; + } + .g-md-1, + .gx-md-1 { + --bs-gutter-x: 0.25rem; + } + .g-md-1, + .gy-md-1 { + --bs-gutter-y: 0.25rem; + } + .g-md-2, + .gx-md-2 { + --bs-gutter-x: 0.5rem; + } + .g-md-2, + .gy-md-2 { + --bs-gutter-y: 0.5rem; + } + .g-md-3, + .gx-md-3 { + --bs-gutter-x: 1rem; + } + .g-md-3, + .gy-md-3 { + --bs-gutter-y: 1rem; + } + .g-md-4, + .gx-md-4 { + --bs-gutter-x: 1.5rem; + } + .g-md-4, + .gy-md-4 { + --bs-gutter-y: 1.5rem; + } + .g-md-5, + .gx-md-5 { + --bs-gutter-x: 3rem; + } + .g-md-5, + .gy-md-5 { + --bs-gutter-y: 3rem; + } +} +@media (min-width: 992px) { + .col-lg { + flex: 1 0 0%; + } + .row-cols-lg-auto > * { + flex: 0 0 auto; + width: auto; + } + .row-cols-lg-1 > * { + flex: 0 0 auto; + width: 100%; + } + .row-cols-lg-2 > * { + flex: 0 0 auto; + width: 50%; + } + .row-cols-lg-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + .row-cols-lg-4 > * { + flex: 0 0 auto; + width: 25%; + } + .row-cols-lg-5 > * { + flex: 0 0 auto; + width: 20%; + } + .row-cols-lg-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + .col-lg-auto { + flex: 0 0 auto; + width: auto; + } + .col-lg-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + .col-lg-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + .col-lg-3 { + flex: 0 0 auto; + width: 25%; + } + .col-lg-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + .col-lg-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + .col-lg-6 { + flex: 0 0 auto; + width: 50%; + } + .col-lg-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + .col-lg-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + .col-lg-9 { + flex: 0 0 auto; + width: 75%; + } + .col-lg-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + .col-lg-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + .col-lg-12 { + flex: 0 0 auto; + width: 100%; + } + .offset-lg-0 { + margin-left: 0; + } + .offset-lg-1 { + margin-left: 8.33333333%; + } + .offset-lg-2 { + margin-left: 16.66666667%; + } + .offset-lg-3 { + margin-left: 25%; + } + .offset-lg-4 { + margin-left: 33.33333333%; + } + .offset-lg-5 { + margin-left: 41.66666667%; + } + .offset-lg-6 { + margin-left: 50%; + } + .offset-lg-7 { + margin-left: 58.33333333%; + } + .offset-lg-8 { + margin-left: 66.66666667%; + } + .offset-lg-9 { + margin-left: 75%; + } + .offset-lg-10 { + margin-left: 83.33333333%; + } + .offset-lg-11 { + margin-left: 91.66666667%; + } + .g-lg-0, + .gx-lg-0 { + --bs-gutter-x: 0; + } + .g-lg-0, + .gy-lg-0 { + --bs-gutter-y: 0; + } + .g-lg-1, + .gx-lg-1 { + --bs-gutter-x: 0.25rem; + } + .g-lg-1, + .gy-lg-1 { + --bs-gutter-y: 0.25rem; + } + .g-lg-2, + .gx-lg-2 { + --bs-gutter-x: 0.5rem; + } + .g-lg-2, + .gy-lg-2 { + --bs-gutter-y: 0.5rem; + } + .g-lg-3, + .gx-lg-3 { + --bs-gutter-x: 1rem; + } + .g-lg-3, + .gy-lg-3 { + --bs-gutter-y: 1rem; + } + .g-lg-4, + .gx-lg-4 { + --bs-gutter-x: 1.5rem; + } + .g-lg-4, + .gy-lg-4 { + --bs-gutter-y: 1.5rem; + } + .g-lg-5, + .gx-lg-5 { + --bs-gutter-x: 3rem; + } + .g-lg-5, + .gy-lg-5 { + --bs-gutter-y: 3rem; + } +} +@media (min-width: 1200px) { + .col-xl { + flex: 1 0 0%; + } + .row-cols-xl-auto > * { + flex: 0 0 auto; + width: auto; + } + .row-cols-xl-1 > * { + flex: 0 0 auto; + width: 100%; + } + .row-cols-xl-2 > * { + flex: 0 0 auto; + width: 50%; + } + .row-cols-xl-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + .row-cols-xl-4 > * { + flex: 0 0 auto; + width: 25%; + } + .row-cols-xl-5 > * { + flex: 0 0 auto; + width: 20%; + } + .row-cols-xl-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + .col-xl-auto { + flex: 0 0 auto; + width: auto; + } + .col-xl-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + .col-xl-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + .col-xl-3 { + flex: 0 0 auto; + width: 25%; + } + .col-xl-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + .col-xl-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + .col-xl-6 { + flex: 0 0 auto; + width: 50%; + } + .col-xl-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + .col-xl-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + .col-xl-9 { + flex: 0 0 auto; + width: 75%; + } + .col-xl-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + .col-xl-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + .col-xl-12 { + flex: 0 0 auto; + width: 100%; + } + .offset-xl-0 { + margin-left: 0; + } + .offset-xl-1 { + margin-left: 8.33333333%; + } + .offset-xl-2 { + margin-left: 16.66666667%; + } + .offset-xl-3 { + margin-left: 25%; + } + .offset-xl-4 { + margin-left: 33.33333333%; + } + .offset-xl-5 { + margin-left: 41.66666667%; + } + .offset-xl-6 { + margin-left: 50%; + } + .offset-xl-7 { + margin-left: 58.33333333%; + } + .offset-xl-8 { + margin-left: 66.66666667%; + } + .offset-xl-9 { + margin-left: 75%; + } + .offset-xl-10 { + margin-left: 83.33333333%; + } + .offset-xl-11 { + margin-left: 91.66666667%; + } + .g-xl-0, + .gx-xl-0 { + --bs-gutter-x: 0; + } + .g-xl-0, + .gy-xl-0 { + --bs-gutter-y: 0; + } + .g-xl-1, + .gx-xl-1 { + --bs-gutter-x: 0.25rem; + } + .g-xl-1, + .gy-xl-1 { + --bs-gutter-y: 0.25rem; + } + .g-xl-2, + .gx-xl-2 { + --bs-gutter-x: 0.5rem; + } + .g-xl-2, + .gy-xl-2 { + --bs-gutter-y: 0.5rem; + } + .g-xl-3, + .gx-xl-3 { + --bs-gutter-x: 1rem; + } + .g-xl-3, + .gy-xl-3 { + --bs-gutter-y: 1rem; + } + .g-xl-4, + .gx-xl-4 { + --bs-gutter-x: 1.5rem; + } + .g-xl-4, + .gy-xl-4 { + --bs-gutter-y: 1.5rem; + } + .g-xl-5, + .gx-xl-5 { + --bs-gutter-x: 3rem; + } + .g-xl-5, + .gy-xl-5 { + --bs-gutter-y: 3rem; + } +} +@media (min-width: 1400px) { + .col-xxl { + flex: 1 0 0%; + } + .row-cols-xxl-auto > * { + flex: 0 0 auto; + width: auto; + } + .row-cols-xxl-1 > * { + flex: 0 0 auto; + width: 100%; + } + .row-cols-xxl-2 > * { + flex: 0 0 auto; + width: 50%; + } + .row-cols-xxl-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + .row-cols-xxl-4 > * { + flex: 0 0 auto; + width: 25%; + } + .row-cols-xxl-5 > * { + flex: 0 0 auto; + width: 20%; + } + .row-cols-xxl-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + .col-xxl-auto { + flex: 0 0 auto; + width: auto; + } + .col-xxl-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + .col-xxl-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + .col-xxl-3 { + flex: 0 0 auto; + width: 25%; + } + .col-xxl-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + .col-xxl-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + .col-xxl-6 { + flex: 0 0 auto; + width: 50%; + } + .col-xxl-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + .col-xxl-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + .col-xxl-9 { + flex: 0 0 auto; + width: 75%; + } + .col-xxl-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + .col-xxl-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + .col-xxl-12 { + flex: 0 0 auto; + width: 100%; + } + .offset-xxl-0 { + margin-left: 0; + } + .offset-xxl-1 { + margin-left: 8.33333333%; + } + .offset-xxl-2 { + margin-left: 16.66666667%; + } + .offset-xxl-3 { + margin-left: 25%; + } + .offset-xxl-4 { + margin-left: 33.33333333%; + } + .offset-xxl-5 { + margin-left: 41.66666667%; + } + .offset-xxl-6 { + margin-left: 50%; + } + .offset-xxl-7 { + margin-left: 58.33333333%; + } + .offset-xxl-8 { + margin-left: 66.66666667%; + } + .offset-xxl-9 { + margin-left: 75%; + } + .offset-xxl-10 { + margin-left: 83.33333333%; + } + .offset-xxl-11 { + margin-left: 91.66666667%; + } + .g-xxl-0, + .gx-xxl-0 { + --bs-gutter-x: 0; + } + .g-xxl-0, + .gy-xxl-0 { + --bs-gutter-y: 0; + } + .g-xxl-1, + .gx-xxl-1 { + --bs-gutter-x: 0.25rem; + } + .g-xxl-1, + .gy-xxl-1 { + --bs-gutter-y: 0.25rem; + } + .g-xxl-2, + .gx-xxl-2 { + --bs-gutter-x: 0.5rem; + } + .g-xxl-2, + .gy-xxl-2 { + --bs-gutter-y: 0.5rem; + } + .g-xxl-3, + .gx-xxl-3 { + --bs-gutter-x: 1rem; + } + .g-xxl-3, + .gy-xxl-3 { + --bs-gutter-y: 1rem; + } + .g-xxl-4, + .gx-xxl-4 { + --bs-gutter-x: 1.5rem; + } + .g-xxl-4, + .gy-xxl-4 { + --bs-gutter-y: 1.5rem; + } + .g-xxl-5, + .gx-xxl-5 { + --bs-gutter-x: 3rem; + } + .g-xxl-5, + .gy-xxl-5 { + --bs-gutter-y: 3rem; + } +} +.table { + --bs-table-color: var(--bs-body-color); + --bs-table-bg: transparent; + --bs-table-border-color: #444; + --bs-table-accent-bg: transparent; + --bs-table-striped-color: var(--bs-body-color); + --bs-table-striped-bg: rgba(0, 0, 0, 0.05); + --bs-table-active-color: var(--bs-body-color); + --bs-table-active-bg: rgba(0, 0, 0, 0.1); + --bs-table-hover-color: var(--bs-body-color); + --bs-table-hover-bg: rgba(0, 0, 0, 0.075); + width: 100%; + margin-bottom: 1rem; + color: var(--bs-table-color); + vertical-align: top; + border-color: var(--bs-table-border-color); +} +.table > :not(caption) > * > * { + padding: 0.5rem 0.5rem; + background-color: var(--bs-table-bg); + border-bottom-width: 1px; + box-shadow: inset 0 0 0 9999px var(--bs-table-accent-bg); +} +.table > tbody { + vertical-align: inherit; +} +.table > thead { + vertical-align: bottom; +} +.table-group-divider { + border-top: 2px solid currentcolor; +} +.caption-top { + caption-side: top; +} +.table-sm > :not(caption) > * > * { + padding: 0.25rem 0.25rem; +} +.table-bordered > :not(caption) > * { + border-width: 1px 0; +} +.table-bordered > :not(caption) > * > * { + border-width: 0 1px; +} +.table-borderless > :not(caption) > * > * { + border-bottom-width: 0; +} +.table-borderless > :not(:first-child) { + border-top-width: 0; +} +.table-striped > tbody > tr:nth-of-type(odd) > * { + --bs-table-accent-bg: var(--bs-table-striped-bg); + color: var(--bs-table-striped-color); +} +.table-striped-columns > :not(caption) > tr > :nth-child(even) { + --bs-table-accent-bg: var(--bs-table-striped-bg); + color: var(--bs-table-striped-color); +} +.table-active { + --bs-table-accent-bg: var(--bs-table-active-bg); + color: var(--bs-table-active-color); +} +.table-hover > tbody > tr:hover > * { + --bs-table-accent-bg: var(--bs-table-hover-bg); + color: var(--bs-table-hover-color); +} +.table-primary { + --bs-table-color: #fff; + --bs-table-bg: #375a7f; + --bs-table-border-color: #4b6b8c; + --bs-table-striped-bg: #416285; + --bs-table-striped-color: #fff; + --bs-table-active-bg: #4b6b8c; + --bs-table-active-color: #fff; + --bs-table-hover-bg: #466689; + --bs-table-hover-color: #fff; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} +.table-secondary { + --bs-table-color: #fff; + --bs-table-bg: #444444; + --bs-table-border-color: #575757; + --bs-table-striped-bg: #4d4d4d; + --bs-table-striped-color: #fff; + --bs-table-active-bg: #575757; + --bs-table-active-color: #fff; + --bs-table-hover-bg: #525252; + --bs-table-hover-color: #fff; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} +.table-success { + --bs-table-color: #fff; + --bs-table-bg: #00bc8c; + --bs-table-border-color: #1ac398; + --bs-table-striped-bg: #0dbf92; + --bs-table-striped-color: #fff; + --bs-table-active-bg: #1ac398; + --bs-table-active-color: #fff; + --bs-table-hover-bg: #13c195; + --bs-table-hover-color: #fff; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} +.table-info { + --bs-table-color: #fff; + --bs-table-bg: #3498db; + --bs-table-border-color: #48a2df; + --bs-table-striped-bg: #3e9ddd; + --bs-table-striped-color: #fff; + --bs-table-active-bg: #48a2df; + --bs-table-active-color: #fff; + --bs-table-hover-bg: #43a0de; + --bs-table-hover-color: #fff; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} +.table-warning { + --bs-table-color: #fff; + --bs-table-bg: #f39c12; + --bs-table-border-color: #f4a62a; + --bs-table-striped-bg: #f4a11e; + --bs-table-striped-color: #fff; + --bs-table-active-bg: #f4a62a; + --bs-table-active-color: #fff; + --bs-table-hover-bg: #f4a324; + --bs-table-hover-color: #fff; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} +.table-danger { + --bs-table-color: #fff; + --bs-table-bg: #e74c3c; + --bs-table-border-color: #e95e50; + --bs-table-striped-bg: #e85546; + --bs-table-striped-color: #fff; + --bs-table-active-bg: #e95e50; + --bs-table-active-color: #fff; + --bs-table-hover-bg: #e9594b; + --bs-table-hover-color: #fff; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} +.table-light { + --bs-table-color: #fff; + --bs-table-bg: #adb5bd; + --bs-table-border-color: #b5bcc4; + --bs-table-striped-bg: #b1b9c0; + --bs-table-striped-color: #fff; + --bs-table-active-bg: #b5bcc4; + --bs-table-active-color: #fff; + --bs-table-hover-bg: #b3bbc2; + --bs-table-hover-color: #fff; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} +.table-dark { + --bs-table-color: #fff; + --bs-table-bg: #303030; + --bs-table-border-color: #454545; + --bs-table-striped-bg: #3a3a3a; + --bs-table-striped-color: #fff; + --bs-table-active-bg: #454545; + --bs-table-active-color: #fff; + --bs-table-hover-bg: #404040; + --bs-table-hover-color: #fff; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} +.table-responsive { + overflow-x: auto; + -webkit-overflow-scrolling: touch; +} +@media (max-width: 575.98px) { + .table-responsive-sm { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} +@media (max-width: 767.98px) { + .table-responsive-md { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} +@media (max-width: 991.98px) { + .table-responsive-lg { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} +@media (max-width: 1199.98px) { + .table-responsive-xl { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} +@media (max-width: 1399.98px) { + .table-responsive-xxl { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} +.form-label { + margin-bottom: 0.5rem; +} +.col-form-label { + padding-top: calc(0.375rem + 1px); + padding-bottom: calc(0.375rem + 1px); + margin-bottom: 0; + font-size: inherit; + line-height: 1.5; +} +.col-form-label-lg { + padding-top: calc(0.5rem + 1px); + padding-bottom: calc(0.5rem + 1px); + font-size: 1.25rem; +} +.col-form-label-sm { + padding-top: calc(0.25rem + 1px); + padding-bottom: calc(0.25rem + 1px); + font-size: 0.875rem; +} +.form-text { + margin-top: 0.25rem; + font-size: 0.875em; + color: #888; +} +.form-control { + display: block; + width: 100%; + padding: 0.375rem 0.75rem; + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #303030; + background-color: #fff; + background-clip: padding-box; + border: 1px solid #222; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + border-radius: 0.375rem; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .form-control { + transition: none; + } +} +.form-control[type='file'] { + overflow: hidden; +} +.form-control[type='file']:not(:disabled):not([readonly]) { + cursor: pointer; +} +.form-control:focus { + color: #303030; + background-color: #fff; + border-color: #9badbf; + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(55, 90, 127, 0.25); +} +.form-control::-webkit-date-and-time-value { + height: 1.5em; +} +.form-control::-moz-placeholder { + color: #888; + opacity: 1; +} +.form-control::placeholder { + color: #888; + opacity: 1; +} +.form-control:disabled { + background-color: #ebebeb; + opacity: 1; +} +.form-control::-webkit-file-upload-button { + padding: 0.375rem 0.75rem; + margin: -0.375rem -0.75rem; + -webkit-margin-end: 0.75rem; + margin-inline-end: 0.75rem; + color: #fff; + background-color: #444; + pointer-events: none; + border-color: inherit; + border-style: solid; + border-width: 0; + border-inline-end-width: 1px; + border-radius: 0; + -webkit-transition: color 0.15s ease-in-out, + background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, + box-shadow 0.15s ease-in-out; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, + border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} +.form-control::file-selector-button { + padding: 0.375rem 0.75rem; + margin: -0.375rem -0.75rem; + -webkit-margin-end: 0.75rem; + margin-inline-end: 0.75rem; + color: #fff; + background-color: #444; + pointer-events: none; + border-color: inherit; + border-style: solid; + border-width: 0; + border-inline-end-width: 1px; + border-radius: 0; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, + border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .form-control::-webkit-file-upload-button { + -webkit-transition: none; + transition: none; + } + .form-control::file-selector-button { + transition: none; + } +} +.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button { + background-color: #414141; +} +.form-control:hover:not(:disabled):not([readonly])::file-selector-button { + background-color: #414141; +} +.form-control-plaintext { + display: block; + width: 100%; + padding: 0.375rem 0; + margin-bottom: 0; + line-height: 1.5; + color: #fff; + background-color: transparent; + border: solid transparent; + border-width: 1px 0; +} +.form-control-plaintext:focus { + outline: 0; +} +.form-control-plaintext.form-control-lg, +.form-control-plaintext.form-control-sm { + padding-right: 0; + padding-left: 0; +} +.form-control-sm { + min-height: calc(1.5em + 0.5rem + 2px); + padding: 0.25rem 0.5rem; + font-size: 0.875rem; + border-radius: 0.25rem; +} +.form-control-sm::-webkit-file-upload-button { + padding: 0.25rem 0.5rem; + margin: -0.25rem -0.5rem; + -webkit-margin-end: 0.5rem; + margin-inline-end: 0.5rem; +} +.form-control-sm::file-selector-button { + padding: 0.25rem 0.5rem; + margin: -0.25rem -0.5rem; + -webkit-margin-end: 0.5rem; + margin-inline-end: 0.5rem; +} +.form-control-lg { + min-height: calc(1.5em + 1rem + 2px); + padding: 0.5rem 1rem; + font-size: 1.25rem; + border-radius: 0.5rem; +} +.form-control-lg::-webkit-file-upload-button { + padding: 0.5rem 1rem; + margin: -0.5rem -1rem; + -webkit-margin-end: 1rem; + margin-inline-end: 1rem; +} +.form-control-lg::file-selector-button { + padding: 0.5rem 1rem; + margin: -0.5rem -1rem; + -webkit-margin-end: 1rem; + margin-inline-end: 1rem; +} +textarea.form-control { + min-height: calc(1.5em + 0.75rem + 2px); +} +textarea.form-control-sm { + min-height: calc(1.5em + 0.5rem + 2px); +} +textarea.form-control-lg { + min-height: calc(1.5em + 1rem + 2px); +} +.form-control-color { + width: 3rem; + height: calc(1.5em + 0.75rem + 2px); + padding: 0.375rem; +} +.form-control-color:not(:disabled):not([readonly]) { + cursor: pointer; +} +.form-control-color::-moz-color-swatch { + border: 0 !important; + border-radius: 0.375rem; +} +.form-control-color::-webkit-color-swatch { + border-radius: 0.375rem; +} +.form-control-color.form-control-sm { + height: calc(1.5em + 0.5rem + 2px); +} +.form-control-color.form-control-lg { + height: calc(1.5em + 1rem + 2px); +} +.form-select { + display: block; + width: 100%; + padding: 0.375rem 2.25rem 0.375rem 0.75rem; + -moz-padding-start: calc(0.75rem - 3px); + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #303030; + background-color: #fff; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23303030' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right 0.75rem center; + background-size: 16px 12px; + border: 1px solid #222; + border-radius: 0.375rem; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} +@media (prefers-reduced-motion: reduce) { + .form-select { + transition: none; + } +} +.form-select:focus { + border-color: #9badbf; + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(55, 90, 127, 0.25); +} +.form-select[multiple], +.form-select[size]:not([size='1']) { + padding-right: 0.75rem; + background-image: none; +} +.form-select:disabled { + background-color: #ebebeb; +} +.form-select:-moz-focusring { + color: transparent; + text-shadow: 0 0 0 #303030; +} +.form-select-sm { + padding-top: 0.25rem; + padding-bottom: 0.25rem; + padding-left: 0.5rem; + font-size: 0.875rem; + border-radius: 0.25rem; +} +.form-select-lg { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + padding-left: 1rem; + font-size: 1.25rem; + border-radius: 0.5rem; +} +.form-check { + display: block; + min-height: 1.5rem; + padding-left: 1.5em; + margin-bottom: 0.125rem; +} +.form-check .form-check-input { + float: left; + margin-left: -1.5em; +} +.form-check-reverse { + padding-right: 1.5em; + padding-left: 0; + text-align: right; +} +.form-check-reverse .form-check-input { + float: right; + margin-right: -1.5em; + margin-left: 0; +} +.form-check-input { + width: 1em; + height: 1em; + margin-top: 0.25em; + vertical-align: top; + background-color: #fff; + background-repeat: no-repeat; + background-position: center; + background-size: contain; + border: none; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + -webkit-print-color-adjust: exact; + color-adjust: exact; + print-color-adjust: exact; +} +.form-check-input[type='checkbox'] { + border-radius: 0.25em; +} +.form-check-input[type='radio'] { + border-radius: 50%; +} +.form-check-input:active { + filter: brightness(90%); +} +.form-check-input:focus { + border-color: #9badbf; + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(55, 90, 127, 0.25); +} +.form-check-input:checked { + background-color: #375a7f; + border-color: #375a7f; +} +.form-check-input:checked[type='checkbox'] { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e"); +} +.form-check-input:checked[type='radio'] { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e"); +} +.form-check-input[type='checkbox']:indeterminate { + background-color: #375a7f; + border-color: #375a7f; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e"); +} +.form-check-input:disabled { + pointer-events: none; + filter: none; + opacity: 0.5; +} +.form-check-input:disabled ~ .form-check-label, +.form-check-input[disabled] ~ .form-check-label { + cursor: default; + opacity: 0.5; +} +.form-switch { + padding-left: 2.5em; +} +.form-switch .form-check-input { + width: 2em; + margin-left: -2.5em; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e"); + background-position: left center; + border-radius: 2em; + transition: background-position 0.15s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .form-switch .form-check-input { + transition: none; + } +} +.form-switch .form-check-input:focus { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%239badbf'/%3e%3c/svg%3e"); +} +.form-switch .form-check-input:checked { + background-position: right center; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e"); +} +.form-switch.form-check-reverse { + padding-right: 2.5em; + padding-left: 0; +} +.form-switch.form-check-reverse .form-check-input { + margin-right: -2.5em; + margin-left: 0; +} +.form-check-inline { + display: inline-block; + margin-right: 1rem; +} +.btn-check { + position: absolute; + clip: rect(0, 0, 0, 0); + pointer-events: none; +} +.btn-check:disabled + .btn, +.btn-check[disabled] + .btn { + pointer-events: none; + filter: none; + opacity: 0.65; +} +.form-range { + width: 100%; + height: 1.5rem; + padding: 0; + background-color: transparent; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} +.form-range:focus { + outline: 0; +} +.form-range:focus::-webkit-slider-thumb { + box-shadow: 0 0 0 1px #222, 0 0 0 0.25rem rgba(55, 90, 127, 0.25); +} +.form-range:focus::-moz-range-thumb { + box-shadow: 0 0 0 1px #222, 0 0 0 0.25rem rgba(55, 90, 127, 0.25); +} +.form-range::-moz-focus-outer { + border: 0; +} +.form-range::-webkit-slider-thumb { + width: 1rem; + height: 1rem; + margin-top: -0.25rem; + background-color: #375a7f; + border: 0; + border-radius: 1rem; + -webkit-transition: background-color 0.15s ease-in-out, + border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, + box-shadow 0.15s ease-in-out; + -webkit-appearance: none; + appearance: none; +} +@media (prefers-reduced-motion: reduce) { + .form-range::-webkit-slider-thumb { + -webkit-transition: none; + transition: none; + } +} +.form-range::-webkit-slider-thumb:active { + background-color: #c3ced9; +} +.form-range::-webkit-slider-runnable-track { + width: 100%; + height: 0.5rem; + color: transparent; + cursor: pointer; + background-color: #dee2e6; + border-color: transparent; + border-radius: 1rem; +} +.form-range::-moz-range-thumb { + width: 1rem; + height: 1rem; + background-color: #375a7f; + border: 0; + border-radius: 1rem; + -moz-transition: background-color 0.15s ease-in-out, + border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, + box-shadow 0.15s ease-in-out; + -moz-appearance: none; + appearance: none; +} +@media (prefers-reduced-motion: reduce) { + .form-range::-moz-range-thumb { + -moz-transition: none; + transition: none; + } +} +.form-range::-moz-range-thumb:active { + background-color: #c3ced9; +} +.form-range::-moz-range-track { + width: 100%; + height: 0.5rem; + color: transparent; + cursor: pointer; + background-color: #dee2e6; + border-color: transparent; + border-radius: 1rem; +} +.form-range:disabled { + pointer-events: none; +} +.form-range:disabled::-webkit-slider-thumb { + background-color: #adb5bd; +} +.form-range:disabled::-moz-range-thumb { + background-color: #adb5bd; +} +.form-floating { + position: relative; +} +.form-floating > .form-control, +.form-floating > .form-control-plaintext, +.form-floating > .form-select { + height: calc(3.5rem + 2px); + line-height: 1.25; +} +.form-floating > label { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + padding: 1rem 0.75rem; + overflow: hidden; + text-align: start; + text-overflow: ellipsis; + white-space: nowrap; + pointer-events: none; + border: 1px solid transparent; + transform-origin: 0 0; + transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .form-floating > label { + transition: none; + } +} +.form-floating > .form-control, +.form-floating > .form-control-plaintext { + padding: 1rem 0.75rem; +} +.form-floating > .form-control-plaintext::-moz-placeholder, +.form-floating > .form-control::-moz-placeholder { + color: transparent; +} +.form-floating > .form-control-plaintext::placeholder, +.form-floating > .form-control::placeholder { + color: transparent; +} +.form-floating > .form-control-plaintext:not(:-moz-placeholder-shown), +.form-floating > .form-control:not(:-moz-placeholder-shown) { + padding-top: 1.625rem; + padding-bottom: 0.625rem; +} +.form-floating > .form-control-plaintext:focus, +.form-floating > .form-control-plaintext:not(:placeholder-shown), +.form-floating > .form-control:focus, +.form-floating > .form-control:not(:placeholder-shown) { + padding-top: 1.625rem; + padding-bottom: 0.625rem; +} +.form-floating > .form-control-plaintext:-webkit-autofill, +.form-floating > .form-control:-webkit-autofill { + padding-top: 1.625rem; + padding-bottom: 0.625rem; +} +.form-floating > .form-select { + padding-top: 1.625rem; + padding-bottom: 0.625rem; +} +.form-floating > .form-control:not(:-moz-placeholder-shown) ~ label { + opacity: 0.65; + transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); +} +.form-floating > .form-control-plaintext ~ label, +.form-floating > .form-control:focus ~ label, +.form-floating > .form-control:not(:placeholder-shown) ~ label, +.form-floating > .form-select ~ label { + opacity: 0.65; + transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); +} +.form-floating > .form-control:-webkit-autofill ~ label { + opacity: 0.65; + transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); +} +.form-floating > .form-control-plaintext ~ label { + border-width: 1px 0; +} +.input-group { + position: relative; + display: flex; + flex-wrap: wrap; + align-items: stretch; + width: 100%; +} +.input-group > .form-control, +.input-group > .form-floating, +.input-group > .form-select { + position: relative; + flex: 1 1 auto; + width: 1%; + min-width: 0; +} +.input-group > .form-control:focus, +.input-group > .form-floating:focus-within, +.input-group > .form-select:focus { + z-index: 5; +} +.input-group .btn { + position: relative; + z-index: 2; +} +.input-group .btn:focus { + z-index: 5; +} +.input-group-text { + display: flex; + align-items: center; + padding: 0.375rem 0.75rem; + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #adb5bd; + text-align: center; + white-space: nowrap; + background-color: #444; + border: 1px solid #222; + border-radius: 0.375rem; +} +.input-group-lg > .btn, +.input-group-lg > .form-control, +.input-group-lg > .form-select, +.input-group-lg > .input-group-text { + padding: 0.5rem 1rem; + font-size: 1.25rem; + border-radius: 0.5rem; +} +.input-group-sm > .btn, +.input-group-sm > .form-control, +.input-group-sm > .form-select, +.input-group-sm > .input-group-text { + padding: 0.25rem 0.5rem; + font-size: 0.875rem; + border-radius: 0.25rem; +} +.input-group-lg > .form-select, +.input-group-sm > .form-select { + padding-right: 3rem; +} +.input-group:not(.has-validation) > .dropdown-toggle:nth-last-child(n + 3), +.input-group:not(.has-validation) + > .form-floating:not(:last-child) + > .form-control, +.input-group:not(.has-validation) + > .form-floating:not(:last-child) + > .form-select, +.input-group:not(.has-validation) + > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not( + .form-floating + ) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.input-group.has-validation > .dropdown-toggle:nth-last-child(n + 4), +.input-group.has-validation + > .form-floating:nth-last-child(n + 3) + > .form-control, +.input-group.has-validation + > .form-floating:nth-last-child(n + 3) + > .form-select, +.input-group.has-validation + > :nth-last-child(n + 3):not(.dropdown-toggle):not(.dropdown-menu):not( + .form-floating + ) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.input-group + > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not( + .valid-feedback + ):not(.invalid-tooltip):not(.invalid-feedback) { + margin-left: -1px; + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.input-group > .form-floating:not(:first-child) > .form-control, +.input-group > .form-floating:not(:first-child) > .form-select { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.valid-feedback { + display: none; + width: 100%; + margin-top: 0.25rem; + font-size: 0.875em; + color: #00bc8c; +} +.valid-tooltip { + position: absolute; + top: 100%; + z-index: 5; + display: none; + max-width: 100%; + padding: 0.25rem 0.5rem; + margin-top: 0.1rem; + font-size: 0.875rem; + color: #fff; + background-color: rgba(0, 188, 140, 0.9); + border-radius: 0.375rem; +} +.is-valid ~ .valid-feedback, +.is-valid ~ .valid-tooltip, +.was-validated :valid ~ .valid-feedback, +.was-validated :valid ~ .valid-tooltip { + display: block; +} +.form-control.is-valid, +.was-validated .form-control:valid { + border-color: #00bc8c; + padding-right: calc(1.5em + 0.75rem); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2300bc8c' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right calc(0.375em + 0.1875rem) center; + background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); +} +.form-control.is-valid:focus, +.was-validated .form-control:valid:focus { + border-color: #00bc8c; + box-shadow: 0 0 0 0.25rem rgba(0, 188, 140, 0.25); +} +.was-validated textarea.form-control:valid, +textarea.form-control.is-valid { + padding-right: calc(1.5em + 0.75rem); + background-position: top calc(0.375em + 0.1875rem) right + calc(0.375em + 0.1875rem); +} +.form-select.is-valid, +.was-validated .form-select:valid { + border-color: #00bc8c; +} +.form-select.is-valid:not([multiple]):not([size]), +.form-select.is-valid:not([multiple])[size='1'], +.was-validated .form-select:valid:not([multiple]):not([size]), +.was-validated .form-select:valid:not([multiple])[size='1'] { + padding-right: 4.125rem; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23303030' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"), + url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2300bc8c' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); + background-position: right 0.75rem center, center right 2.25rem; + background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); +} +.form-select.is-valid:focus, +.was-validated .form-select:valid:focus { + border-color: #00bc8c; + box-shadow: 0 0 0 0.25rem rgba(0, 188, 140, 0.25); +} +.form-control-color.is-valid, +.was-validated .form-control-color:valid { + width: calc(3rem + calc(1.5em + 0.75rem)); +} +.form-check-input.is-valid, +.was-validated .form-check-input:valid { + border-color: #00bc8c; +} +.form-check-input.is-valid:checked, +.was-validated .form-check-input:valid:checked { + background-color: #00bc8c; +} +.form-check-input.is-valid:focus, +.was-validated .form-check-input:valid:focus { + box-shadow: 0 0 0 0.25rem rgba(0, 188, 140, 0.25); +} +.form-check-input.is-valid ~ .form-check-label, +.was-validated .form-check-input:valid ~ .form-check-label { + color: #00bc8c; +} +.form-check-inline .form-check-input ~ .valid-feedback { + margin-left: 0.5em; +} +.input-group > .form-control:not(:focus).is-valid, +.input-group > .form-floating:not(:focus-within).is-valid, +.input-group > .form-select:not(:focus).is-valid, +.was-validated .input-group > .form-control:not(:focus):valid, +.was-validated .input-group > .form-floating:not(:focus-within):valid, +.was-validated .input-group > .form-select:not(:focus):valid { + z-index: 3; +} +.invalid-feedback { + display: none; + width: 100%; + margin-top: 0.25rem; + font-size: 0.875em; + color: #e74c3c; +} +.invalid-tooltip { + position: absolute; + top: 100%; + z-index: 5; + display: none; + max-width: 100%; + padding: 0.25rem 0.5rem; + margin-top: 0.1rem; + font-size: 0.875rem; + color: #fff; + background-color: rgba(231, 76, 60, 0.9); + border-radius: 0.375rem; +} +.is-invalid ~ .invalid-feedback, +.is-invalid ~ .invalid-tooltip, +.was-validated :invalid ~ .invalid-feedback, +.was-validated :invalid ~ .invalid-tooltip { + display: block; +} +.form-control.is-invalid, +.was-validated .form-control:invalid { + border-color: #e74c3c; + padding-right: calc(1.5em + 0.75rem); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23e74c3c'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23e74c3c' stroke='none'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right calc(0.375em + 0.1875rem) center; + background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); +} +.form-control.is-invalid:focus, +.was-validated .form-control:invalid:focus { + border-color: #e74c3c; + box-shadow: 0 0 0 0.25rem rgba(231, 76, 60, 0.25); +} +.was-validated textarea.form-control:invalid, +textarea.form-control.is-invalid { + padding-right: calc(1.5em + 0.75rem); + background-position: top calc(0.375em + 0.1875rem) right + calc(0.375em + 0.1875rem); +} +.form-select.is-invalid, +.was-validated .form-select:invalid { + border-color: #e74c3c; +} +.form-select.is-invalid:not([multiple]):not([size]), +.form-select.is-invalid:not([multiple])[size='1'], +.was-validated .form-select:invalid:not([multiple]):not([size]), +.was-validated .form-select:invalid:not([multiple])[size='1'] { + padding-right: 4.125rem; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23303030' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"), + url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23e74c3c'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23e74c3c' stroke='none'/%3e%3c/svg%3e"); + background-position: right 0.75rem center, center right 2.25rem; + background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); +} +.form-select.is-invalid:focus, +.was-validated .form-select:invalid:focus { + border-color: #e74c3c; + box-shadow: 0 0 0 0.25rem rgba(231, 76, 60, 0.25); +} +.form-control-color.is-invalid, +.was-validated .form-control-color:invalid { + width: calc(3rem + calc(1.5em + 0.75rem)); +} +.form-check-input.is-invalid, +.was-validated .form-check-input:invalid { + border-color: #e74c3c; +} +.form-check-input.is-invalid:checked, +.was-validated .form-check-input:invalid:checked { + background-color: #e74c3c; +} +.form-check-input.is-invalid:focus, +.was-validated .form-check-input:invalid:focus { + box-shadow: 0 0 0 0.25rem rgba(231, 76, 60, 0.25); +} +.form-check-input.is-invalid ~ .form-check-label, +.was-validated .form-check-input:invalid ~ .form-check-label { + color: #e74c3c; +} +.form-check-inline .form-check-input ~ .invalid-feedback { + margin-left: 0.5em; +} +.input-group > .form-control:not(:focus).is-invalid, +.input-group > .form-floating:not(:focus-within).is-invalid, +.input-group > .form-select:not(:focus).is-invalid, +.was-validated .input-group > .form-control:not(:focus):invalid, +.was-validated .input-group > .form-floating:not(:focus-within):invalid, +.was-validated .input-group > .form-select:not(:focus):invalid { + z-index: 4; +} +.btn { + --bs-btn-padding-x: 0.75rem; + --bs-btn-padding-y: 0.375rem; + --bs-btn-font-family: ; + --bs-btn-font-size: 1rem; + --bs-btn-font-weight: 400; + --bs-btn-line-height: 1.5; + --bs-btn-color: #fff; + --bs-btn-bg: transparent; + --bs-btn-border-width: 1px; + --bs-btn-border-color: transparent; + --bs-btn-border-radius: 0.375rem; + --bs-btn-hover-border-color: transparent; + --bs-btn-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), + 0 1px 1px rgba(0, 0, 0, 0.075); + --bs-btn-disabled-opacity: 0.65; + --bs-btn-focus-box-shadow: 0 0 0 0.25rem + rgba(var(--bs-btn-focus-shadow-rgb), 0.5); + display: inline-block; + padding: var(--bs-btn-padding-y) var(--bs-btn-padding-x); + font-family: var(--bs-btn-font-family); + font-size: var(--bs-btn-font-size); + font-weight: var(--bs-btn-font-weight); + line-height: var(--bs-btn-line-height); + color: var(--bs-btn-color); + text-align: center; + text-decoration: none; + vertical-align: middle; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + border: var(--bs-btn-border-width) solid var(--bs-btn-border-color); + border-radius: var(--bs-btn-border-radius); + background-color: var(--bs-btn-bg); + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, + border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .btn { + transition: none; + } +} +.btn:hover { + color: var(--bs-btn-hover-color); + background-color: var(--bs-btn-hover-bg); + border-color: var(--bs-btn-hover-border-color); +} +.btn-check + .btn:hover { + color: var(--bs-btn-color); + background-color: var(--bs-btn-bg); + border-color: var(--bs-btn-border-color); +} +.btn:focus-visible { + color: var(--bs-btn-hover-color); + background-color: var(--bs-btn-hover-bg); + border-color: var(--bs-btn-hover-border-color); + outline: 0; + box-shadow: var(--bs-btn-focus-box-shadow); +} +.btn-check:focus-visible + .btn { + border-color: var(--bs-btn-hover-border-color); + outline: 0; + box-shadow: var(--bs-btn-focus-box-shadow); +} +.btn-check:checked + .btn, +.btn.active, +.btn.show, +.btn:first-child:active, +:not(.btn-check) + .btn:active { + color: var(--bs-btn-active-color); + background-color: var(--bs-btn-active-bg); + border-color: var(--bs-btn-active-border-color); +} +.btn-check:checked + .btn:focus-visible, +.btn.active:focus-visible, +.btn.show:focus-visible, +.btn:first-child:active:focus-visible, +:not(.btn-check) + .btn:active:focus-visible { + box-shadow: var(--bs-btn-focus-box-shadow); +} +.btn.disabled, +.btn:disabled, +fieldset:disabled .btn { + color: var(--bs-btn-disabled-color); + pointer-events: none; + background-color: var(--bs-btn-disabled-bg); + border-color: var(--bs-btn-disabled-border-color); + opacity: var(--bs-btn-disabled-opacity); +} +.btn-primary { + --bs-btn-color: #fff; + --bs-btn-bg: #375a7f; + --bs-btn-border-color: #375a7f; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #2f4d6c; + --bs-btn-hover-border-color: #2c4866; + --bs-btn-focus-shadow-rgb: 85, 115, 146; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #2c4866; + --bs-btn-active-border-color: #29445f; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #375a7f; + --bs-btn-disabled-border-color: #375a7f; +} +.btn-secondary { + --bs-btn-color: #fff; + --bs-btn-bg: #444; + --bs-btn-border-color: #444; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #3a3a3a; + --bs-btn-hover-border-color: #363636; + --bs-btn-focus-shadow-rgb: 96, 96, 96; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #363636; + --bs-btn-active-border-color: #333333; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #444; + --bs-btn-disabled-border-color: #444; +} +.btn-success { + --bs-btn-color: #fff; + --bs-btn-bg: #00bc8c; + --bs-btn-border-color: #00bc8c; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #00a077; + --bs-btn-hover-border-color: #009670; + --bs-btn-focus-shadow-rgb: 38, 198, 157; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #009670; + --bs-btn-active-border-color: #008d69; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #00bc8c; + --bs-btn-disabled-border-color: #00bc8c; +} +.btn-info { + --bs-btn-color: #fff; + --bs-btn-bg: #3498db; + --bs-btn-border-color: #3498db; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #2c81ba; + --bs-btn-hover-border-color: #2a7aaf; + --bs-btn-focus-shadow-rgb: 82, 167, 224; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #2a7aaf; + --bs-btn-active-border-color: #2772a4; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #3498db; + --bs-btn-disabled-border-color: #3498db; +} +.btn-warning { + --bs-btn-color: #fff; + --bs-btn-bg: #f39c12; + --bs-btn-border-color: #f39c12; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #cf850f; + --bs-btn-hover-border-color: #c27d0e; + --bs-btn-focus-shadow-rgb: 245, 171, 54; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #c27d0e; + --bs-btn-active-border-color: #b6750e; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #f39c12; + --bs-btn-disabled-border-color: #f39c12; +} +.btn-danger { + --bs-btn-color: #fff; + --bs-btn-bg: #e74c3c; + --bs-btn-border-color: #e74c3c; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #c44133; + --bs-btn-hover-border-color: #b93d30; + --bs-btn-focus-shadow-rgb: 235, 103, 89; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #b93d30; + --bs-btn-active-border-color: #ad392d; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #e74c3c; + --bs-btn-disabled-border-color: #e74c3c; +} +.btn-light { + --bs-btn-color: #fff; + --bs-btn-bg: #adb5bd; + --bs-btn-border-color: #adb5bd; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #939aa1; + --bs-btn-hover-border-color: #8a9197; + --bs-btn-focus-shadow-rgb: 185, 192, 199; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #8a9197; + --bs-btn-active-border-color: #82888e; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #adb5bd; + --bs-btn-disabled-border-color: #adb5bd; +} +.btn-dark { + --bs-btn-color: #fff; + --bs-btn-bg: #303030; + --bs-btn-border-color: #303030; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #4f4f4f; + --bs-btn-hover-border-color: #454545; + --bs-btn-focus-shadow-rgb: 79, 79, 79; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #595959; + --bs-btn-active-border-color: #454545; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #303030; + --bs-btn-disabled-border-color: #303030; +} +.btn-outline-primary { + --bs-btn-color: #375a7f; + --bs-btn-border-color: #375a7f; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #375a7f; + --bs-btn-hover-border-color: #375a7f; + --bs-btn-focus-shadow-rgb: 55, 90, 127; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #375a7f; + --bs-btn-active-border-color: #375a7f; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #375a7f; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #375a7f; + --bs-gradient: none; +} +.btn-outline-secondary { + --bs-btn-color: #444; + --bs-btn-border-color: #444; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #444; + --bs-btn-hover-border-color: #444; + --bs-btn-focus-shadow-rgb: 68, 68, 68; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #444; + --bs-btn-active-border-color: #444; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #444; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #444; + --bs-gradient: none; +} +.btn-outline-success { + --bs-btn-color: #00bc8c; + --bs-btn-border-color: #00bc8c; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #00bc8c; + --bs-btn-hover-border-color: #00bc8c; + --bs-btn-focus-shadow-rgb: 0, 188, 140; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #00bc8c; + --bs-btn-active-border-color: #00bc8c; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #00bc8c; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #00bc8c; + --bs-gradient: none; +} +.btn-outline-info { + --bs-btn-color: #3498db; + --bs-btn-border-color: #3498db; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #3498db; + --bs-btn-hover-border-color: #3498db; + --bs-btn-focus-shadow-rgb: 52, 152, 219; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #3498db; + --bs-btn-active-border-color: #3498db; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #3498db; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #3498db; + --bs-gradient: none; +} +.btn-outline-warning { + --bs-btn-color: #f39c12; + --bs-btn-border-color: #f39c12; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #f39c12; + --bs-btn-hover-border-color: #f39c12; + --bs-btn-focus-shadow-rgb: 243, 156, 18; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #f39c12; + --bs-btn-active-border-color: #f39c12; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #f39c12; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #f39c12; + --bs-gradient: none; +} +.btn-outline-danger { + --bs-btn-color: #e74c3c; + --bs-btn-border-color: #e74c3c; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #e74c3c; + --bs-btn-hover-border-color: #e74c3c; + --bs-btn-focus-shadow-rgb: 231, 76, 60; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #e74c3c; + --bs-btn-active-border-color: #e74c3c; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #e74c3c; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #e74c3c; + --bs-gradient: none; +} +.btn-outline-light { + --bs-btn-color: #adb5bd; + --bs-btn-border-color: #adb5bd; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #adb5bd; + --bs-btn-hover-border-color: #adb5bd; + --bs-btn-focus-shadow-rgb: 173, 181, 189; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #adb5bd; + --bs-btn-active-border-color: #adb5bd; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #adb5bd; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #adb5bd; + --bs-gradient: none; +} +.btn-outline-dark { + --bs-btn-color: #303030; + --bs-btn-border-color: #303030; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #303030; + --bs-btn-hover-border-color: #303030; + --bs-btn-focus-shadow-rgb: 48, 48, 48; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #303030; + --bs-btn-active-border-color: #303030; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #303030; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #303030; + --bs-gradient: none; +} +.btn-link { + --bs-btn-font-weight: 400; + --bs-btn-color: var(--bs-link-color); + --bs-btn-bg: transparent; + --bs-btn-border-color: transparent; + --bs-btn-hover-color: var(--bs-link-hover-color); + --bs-btn-hover-border-color: transparent; + --bs-btn-active-color: var(--bs-link-hover-color); + --bs-btn-active-border-color: transparent; + --bs-btn-disabled-color: #888; + --bs-btn-disabled-border-color: transparent; + --bs-btn-box-shadow: none; + --bs-btn-focus-shadow-rgb: 85, 115, 146; + text-decoration: underline; +} +.btn-link:focus-visible { + color: var(--bs-btn-color); +} +.btn-link:hover { + color: var(--bs-btn-hover-color); +} +.btn-group-lg > .btn, +.btn-lg { + --bs-btn-padding-y: 0.5rem; + --bs-btn-padding-x: 1rem; + --bs-btn-font-size: 1.25rem; + --bs-btn-border-radius: 0.5rem; +} +.btn-group-sm > .btn, +.btn-sm { + --bs-btn-padding-y: 0.25rem; + --bs-btn-padding-x: 0.5rem; + --bs-btn-font-size: 0.875rem; + --bs-btn-border-radius: 0.25rem; +} +.fade { + transition: opacity 0.15s linear; +} +@media (prefers-reduced-motion: reduce) { + .fade { + transition: none; + } +} +.fade:not(.show) { + opacity: 0; +} +.collapse:not(.show) { + display: none; +} +.collapsing { + height: 0; + overflow: hidden; + transition: height 0.35s ease; +} +@media (prefers-reduced-motion: reduce) { + .collapsing { + transition: none; + } +} +.collapsing.collapse-horizontal { + width: 0; + height: auto; + transition: width 0.35s ease; +} +@media (prefers-reduced-motion: reduce) { + .collapsing.collapse-horizontal { + transition: none; + } +} +.dropdown, +.dropdown-center, +.dropend, +.dropstart, +.dropup, +.dropup-center { + position: relative; +} +.dropdown-toggle { + white-space: nowrap; +} +.dropdown-toggle::after { + display: inline-block; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ''; + border-top: 0.3em solid; + border-right: 0.3em solid transparent; + border-bottom: 0; + border-left: 0.3em solid transparent; +} +.dropdown-toggle:empty::after { + margin-left: 0; +} +.dropdown-menu { + --bs-dropdown-zindex: 1000; + --bs-dropdown-min-width: 10rem; + --bs-dropdown-padding-x: 0; + --bs-dropdown-padding-y: 0.5rem; + --bs-dropdown-spacer: 0.125rem; + --bs-dropdown-font-size: 1rem; + --bs-dropdown-color: #fff; + --bs-dropdown-bg: #222; + --bs-dropdown-border-color: #444; + --bs-dropdown-border-radius: 0.375rem; + --bs-dropdown-border-width: 1px; + --bs-dropdown-inner-border-radius: calc(0.375rem - 1px); + --bs-dropdown-divider-bg: #444; + --bs-dropdown-divider-margin-y: 0.5rem; + --bs-dropdown-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + --bs-dropdown-link-color: #fff; + --bs-dropdown-link-hover-color: #fff; + --bs-dropdown-link-hover-bg: #375a7f; + --bs-dropdown-link-active-color: #fff; + --bs-dropdown-link-active-bg: #375a7f; + --bs-dropdown-link-disabled-color: #adb5bd; + --bs-dropdown-item-padding-x: 1rem; + --bs-dropdown-item-padding-y: 0.25rem; + --bs-dropdown-header-color: #888; + --bs-dropdown-header-padding-x: 1rem; + --bs-dropdown-header-padding-y: 0.5rem; + position: absolute; + z-index: var(--bs-dropdown-zindex); + display: none; + min-width: var(--bs-dropdown-min-width); + padding: var(--bs-dropdown-padding-y) var(--bs-dropdown-padding-x); + margin: 0; + font-size: var(--bs-dropdown-font-size); + color: var(--bs-dropdown-color); + text-align: left; + list-style: none; + background-color: var(--bs-dropdown-bg); + background-clip: padding-box; + border: var(--bs-dropdown-border-width) solid var(--bs-dropdown-border-color); + border-radius: var(--bs-dropdown-border-radius); +} +.dropdown-menu[data-bs-popper] { + top: 100%; + left: 0; + margin-top: var(--bs-dropdown-spacer); +} +.dropdown-menu-start { + --bs-position: start; +} +.dropdown-menu-start[data-bs-popper] { + right: auto; + left: 0; +} +.dropdown-menu-end { + --bs-position: end; +} +.dropdown-menu-end[data-bs-popper] { + right: 0; + left: auto; +} +@media (min-width: 576px) { + .dropdown-menu-sm-start { + --bs-position: start; + } + .dropdown-menu-sm-start[data-bs-popper] { + right: auto; + left: 0; + } + .dropdown-menu-sm-end { + --bs-position: end; + } + .dropdown-menu-sm-end[data-bs-popper] { + right: 0; + left: auto; + } +} +@media (min-width: 768px) { + .dropdown-menu-md-start { + --bs-position: start; + } + .dropdown-menu-md-start[data-bs-popper] { + right: auto; + left: 0; + } + .dropdown-menu-md-end { + --bs-position: end; + } + .dropdown-menu-md-end[data-bs-popper] { + right: 0; + left: auto; + } +} +@media (min-width: 992px) { + .dropdown-menu-lg-start { + --bs-position: start; + } + .dropdown-menu-lg-start[data-bs-popper] { + right: auto; + left: 0; + } + .dropdown-menu-lg-end { + --bs-position: end; + } + .dropdown-menu-lg-end[data-bs-popper] { + right: 0; + left: auto; + } +} +@media (min-width: 1200px) { + .dropdown-menu-xl-start { + --bs-position: start; + } + .dropdown-menu-xl-start[data-bs-popper] { + right: auto; + left: 0; + } + .dropdown-menu-xl-end { + --bs-position: end; + } + .dropdown-menu-xl-end[data-bs-popper] { + right: 0; + left: auto; + } +} +@media (min-width: 1400px) { + .dropdown-menu-xxl-start { + --bs-position: start; + } + .dropdown-menu-xxl-start[data-bs-popper] { + right: auto; + left: 0; + } + .dropdown-menu-xxl-end { + --bs-position: end; + } + .dropdown-menu-xxl-end[data-bs-popper] { + right: 0; + left: auto; + } +} +.dropup .dropdown-menu[data-bs-popper] { + top: auto; + bottom: 100%; + margin-top: 0; + margin-bottom: var(--bs-dropdown-spacer); +} +.dropup .dropdown-toggle::after { + display: inline-block; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ''; + border-top: 0; + border-right: 0.3em solid transparent; + border-bottom: 0.3em solid; + border-left: 0.3em solid transparent; +} +.dropup .dropdown-toggle:empty::after { + margin-left: 0; +} +.dropend .dropdown-menu[data-bs-popper] { + top: 0; + right: auto; + left: 100%; + margin-top: 0; + margin-left: var(--bs-dropdown-spacer); +} +.dropend .dropdown-toggle::after { + display: inline-block; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ''; + border-top: 0.3em solid transparent; + border-right: 0; + border-bottom: 0.3em solid transparent; + border-left: 0.3em solid; +} +.dropend .dropdown-toggle:empty::after { + margin-left: 0; +} +.dropend .dropdown-toggle::after { + vertical-align: 0; +} +.dropstart .dropdown-menu[data-bs-popper] { + top: 0; + right: 100%; + left: auto; + margin-top: 0; + margin-right: var(--bs-dropdown-spacer); +} +.dropstart .dropdown-toggle::after { + display: inline-block; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ''; +} +.dropstart .dropdown-toggle::after { + display: none; +} +.dropstart .dropdown-toggle::before { + display: inline-block; + margin-right: 0.255em; + vertical-align: 0.255em; + content: ''; + border-top: 0.3em solid transparent; + border-right: 0.3em solid; + border-bottom: 0.3em solid transparent; +} +.dropstart .dropdown-toggle:empty::after { + margin-left: 0; +} +.dropstart .dropdown-toggle::before { + vertical-align: 0; +} +.dropdown-divider { + height: 0; + margin: var(--bs-dropdown-divider-margin-y) 0; + overflow: hidden; + border-top: 1px solid var(--bs-dropdown-divider-bg); + opacity: 1; +} +.dropdown-item { + display: block; + width: 100%; + padding: var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x); + clear: both; + font-weight: 400; + color: var(--bs-dropdown-link-color); + text-align: inherit; + text-decoration: none; + white-space: nowrap; + background-color: transparent; + border: 0; +} +.dropdown-item:focus, +.dropdown-item:hover { + color: var(--bs-dropdown-link-hover-color); + background-color: var(--bs-dropdown-link-hover-bg); +} +.dropdown-item.active, +.dropdown-item:active { + color: var(--bs-dropdown-link-active-color); + text-decoration: none; + background-color: var(--bs-dropdown-link-active-bg); +} +.dropdown-item.disabled, +.dropdown-item:disabled { + color: var(--bs-dropdown-link-disabled-color); + pointer-events: none; + background-color: transparent; +} +.dropdown-menu.show { + display: block; +} +.dropdown-header { + display: block; + padding: var(--bs-dropdown-header-padding-y) + var(--bs-dropdown-header-padding-x); + margin-bottom: 0; + font-size: 0.875rem; + color: var(--bs-dropdown-header-color); + white-space: nowrap; +} +.dropdown-item-text { + display: block; + padding: var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x); + color: var(--bs-dropdown-link-color); +} +.dropdown-menu-dark { + --bs-dropdown-color: #dee2e6; + --bs-dropdown-bg: #303030; + --bs-dropdown-border-color: #444; + --bs-dropdown-box-shadow: ; + --bs-dropdown-link-color: #dee2e6; + --bs-dropdown-link-hover-color: #fff; + --bs-dropdown-divider-bg: #444; + --bs-dropdown-link-hover-bg: rgba(255, 255, 255, 0.15); + --bs-dropdown-link-active-color: #fff; + --bs-dropdown-link-active-bg: #375a7f; + --bs-dropdown-link-disabled-color: #adb5bd; + --bs-dropdown-header-color: #adb5bd; +} +.btn-group, +.btn-group-vertical { + position: relative; + display: inline-flex; + vertical-align: middle; +} +.btn-group-vertical > .btn, +.btn-group > .btn { + position: relative; + flex: 1 1 auto; +} +.btn-group-vertical > .btn-check:checked + .btn, +.btn-group-vertical > .btn-check:focus + .btn, +.btn-group-vertical > .btn.active, +.btn-group-vertical > .btn:active, +.btn-group-vertical > .btn:focus, +.btn-group-vertical > .btn:hover, +.btn-group > .btn-check:checked + .btn, +.btn-group > .btn-check:focus + .btn, +.btn-group > .btn.active, +.btn-group > .btn:active, +.btn-group > .btn:focus, +.btn-group > .btn:hover { + z-index: 1; +} +.btn-toolbar { + display: flex; + flex-wrap: wrap; + justify-content: flex-start; +} +.btn-toolbar .input-group { + width: auto; +} +.btn-group { + border-radius: 0.375rem; +} +.btn-group > .btn-group:not(:first-child), +.btn-group > :not(.btn-check:first-child) + .btn { + margin-left: -1px; +} +.btn-group > .btn-group:not(:last-child) > .btn, +.btn-group > .btn.dropdown-toggle-split:first-child, +.btn-group > .btn:not(:last-child):not(.dropdown-toggle) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.btn-group > .btn-group:not(:first-child) > .btn, +.btn-group > .btn:nth-child(n + 3), +.btn-group > :not(.btn-check) + .btn { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.dropdown-toggle-split { + padding-right: 0.5625rem; + padding-left: 0.5625rem; +} +.dropdown-toggle-split::after, +.dropend .dropdown-toggle-split::after, +.dropup .dropdown-toggle-split::after { + margin-left: 0; +} +.dropstart .dropdown-toggle-split::before { + margin-right: 0; +} +.btn-group-sm > .btn + .dropdown-toggle-split, +.btn-sm + .dropdown-toggle-split { + padding-right: 0.375rem; + padding-left: 0.375rem; +} +.btn-group-lg > .btn + .dropdown-toggle-split, +.btn-lg + .dropdown-toggle-split { + padding-right: 0.75rem; + padding-left: 0.75rem; +} +.btn-group-vertical { + flex-direction: column; + align-items: flex-start; + justify-content: center; +} +.btn-group-vertical > .btn, +.btn-group-vertical > .btn-group { + width: 100%; +} +.btn-group-vertical > .btn-group:not(:first-child), +.btn-group-vertical > .btn:not(:first-child) { + margin-top: -1px; +} +.btn-group-vertical > .btn-group:not(:last-child) > .btn, +.btn-group-vertical > .btn:not(:last-child):not(.dropdown-toggle) { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group-vertical > .btn-group:not(:first-child) > .btn, +.btn-group-vertical > .btn ~ .btn { + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.nav { + --bs-nav-link-padding-x: 2rem; + --bs-nav-link-padding-y: 0.5rem; + --bs-nav-link-font-weight: ; + --bs-nav-link-color: var(--bs-link-color); + --bs-nav-link-hover-color: var(--bs-link-hover-color); + --bs-nav-link-disabled-color: #adb5bd; + display: flex; + flex-wrap: wrap; + padding-left: 0; + margin-bottom: 0; + list-style: none; +} +.nav-link { + display: block; + padding: var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x); + font-size: var(--bs-nav-link-font-size); + font-weight: var(--bs-nav-link-font-weight); + color: var(--bs-nav-link-color); + text-decoration: none; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, + border-color 0.15s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .nav-link { + transition: none; + } +} +.nav-link:focus, +.nav-link:hover { + color: var(--bs-nav-link-hover-color); +} +.nav-link.disabled { + color: var(--bs-nav-link-disabled-color); + pointer-events: none; + cursor: default; +} +.nav-tabs { + --bs-nav-tabs-border-width: 1px; + --bs-nav-tabs-border-color: #444; + --bs-nav-tabs-border-radius: 0.375rem; + --bs-nav-tabs-link-hover-border-color: #444 #444 transparent; + --bs-nav-tabs-link-active-color: #fff; + --bs-nav-tabs-link-active-bg: #222; + --bs-nav-tabs-link-active-border-color: #444 #444 transparent; + border-bottom: var(--bs-nav-tabs-border-width) solid + var(--bs-nav-tabs-border-color); +} +.nav-tabs .nav-link { + margin-bottom: calc(-1 * var(--bs-nav-tabs-border-width)); + background: 0 0; + border: var(--bs-nav-tabs-border-width) solid transparent; + border-top-left-radius: var(--bs-nav-tabs-border-radius); + border-top-right-radius: var(--bs-nav-tabs-border-radius); +} +.nav-tabs .nav-link:focus, +.nav-tabs .nav-link:hover { + isolation: isolate; + border-color: var(--bs-nav-tabs-link-hover-border-color); +} +.nav-tabs .nav-link.disabled, +.nav-tabs .nav-link:disabled { + color: var(--bs-nav-link-disabled-color); + background-color: transparent; + border-color: transparent; +} +.nav-tabs .nav-item.show .nav-link, +.nav-tabs .nav-link.active { + color: var(--bs-nav-tabs-link-active-color); + background-color: var(--bs-nav-tabs-link-active-bg); + border-color: var(--bs-nav-tabs-link-active-border-color); +} +.nav-tabs .dropdown-menu { + margin-top: calc(-1 * var(--bs-nav-tabs-border-width)); + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.nav-pills { + --bs-nav-pills-border-radius: 0.375rem; + --bs-nav-pills-link-active-color: #fff; + --bs-nav-pills-link-active-bg: #375a7f; +} +.nav-pills .nav-link { + background: 0 0; + border: 0; + border-radius: var(--bs-nav-pills-border-radius); +} +.nav-pills .nav-link:disabled { + color: var(--bs-nav-link-disabled-color); + background-color: transparent; + border-color: transparent; +} +.nav-pills .nav-link.active, +.nav-pills .show > .nav-link { + color: var(--bs-nav-pills-link-active-color); + background-color: var(--bs-nav-pills-link-active-bg); +} +.nav-fill .nav-item, +.nav-fill > .nav-link { + flex: 1 1 auto; + text-align: center; +} +.nav-justified .nav-item, +.nav-justified > .nav-link { + flex-basis: 0; + flex-grow: 1; + text-align: center; +} +.nav-fill .nav-item .nav-link, +.nav-justified .nav-item .nav-link { + width: 100%; +} +.tab-content > .tab-pane { + display: none; +} +.tab-content > .active { + display: block; +} +.navbar { + --bs-navbar-padding-x: 0; + --bs-navbar-padding-y: 1rem; + --bs-navbar-color: rgba(34, 34, 34, 0.7); + --bs-navbar-hover-color: #222; + --bs-navbar-disabled-color: rgba(0, 0, 0, 0.3); + --bs-navbar-active-color: #222; + --bs-navbar-brand-padding-y: 0.3125rem; + --bs-navbar-brand-margin-end: 1rem; + --bs-navbar-brand-font-size: 1.25rem; + --bs-navbar-brand-color: #222; + --bs-navbar-brand-hover-color: #222; + --bs-navbar-nav-link-padding-x: 0.5rem; + --bs-navbar-toggler-padding-y: 0.25rem; + --bs-navbar-toggler-padding-x: 0.75rem; + --bs-navbar-toggler-font-size: 1.25rem; + --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2834, 34, 34, 0.7%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); + --bs-navbar-toggler-border-color: rgba(34, 34, 34, 0.1); + --bs-navbar-toggler-border-radius: 0.375rem; + --bs-navbar-toggler-focus-width: 0.25rem; + --bs-navbar-toggler-transition: box-shadow 0.15s ease-in-out; + position: relative; + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + padding: var(--bs-navbar-padding-y) var(--bs-navbar-padding-x); +} +.navbar > .container, +.navbar > .container-fluid, +.navbar > .container-lg, +.navbar > .container-md, +.navbar > .container-sm, +.navbar > .container-xl, +.navbar > .container-xxl { + display: flex; + flex-wrap: inherit; + align-items: center; + justify-content: space-between; +} +.navbar-brand { + padding-top: var(--bs-navbar-brand-padding-y); + padding-bottom: var(--bs-navbar-brand-padding-y); + margin-right: var(--bs-navbar-brand-margin-end); + font-size: var(--bs-navbar-brand-font-size); + color: var(--bs-navbar-brand-color); + text-decoration: none; + white-space: nowrap; +} +.navbar-brand:focus, +.navbar-brand:hover { + color: var(--bs-navbar-brand-hover-color); +} +.navbar-nav { + --bs-nav-link-padding-x: 0; + --bs-nav-link-padding-y: 0.5rem; + --bs-nav-link-font-weight: ; + --bs-nav-link-color: var(--bs-navbar-color); + --bs-nav-link-hover-color: var(--bs-navbar-hover-color); + --bs-nav-link-disabled-color: var(--bs-navbar-disabled-color); + display: flex; + flex-direction: column; + padding-left: 0; + margin-bottom: 0; + list-style: none; +} +.navbar-nav .nav-link.active, +.navbar-nav .show > .nav-link { + color: var(--bs-navbar-active-color); +} +.navbar-nav .dropdown-menu { + position: static; +} +.navbar-text { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + color: var(--bs-navbar-color); +} +.navbar-text a, +.navbar-text a:focus, +.navbar-text a:hover { + color: var(--bs-navbar-active-color); +} +.navbar-collapse { + flex-basis: 100%; + flex-grow: 1; + align-items: center; +} +.navbar-toggler { + padding: var(--bs-navbar-toggler-padding-y) var(--bs-navbar-toggler-padding-x); + font-size: var(--bs-navbar-toggler-font-size); + line-height: 1; + color: var(--bs-navbar-color); + background-color: transparent; + border: var(--bs-border-width) solid var(--bs-navbar-toggler-border-color); + border-radius: var(--bs-navbar-toggler-border-radius); + transition: var(--bs-navbar-toggler-transition); +} +@media (prefers-reduced-motion: reduce) { + .navbar-toggler { + transition: none; + } +} +.navbar-toggler:hover { + text-decoration: none; +} +.navbar-toggler:focus { + text-decoration: none; + outline: 0; + box-shadow: 0 0 0 var(--bs-navbar-toggler-focus-width); +} +.navbar-toggler-icon { + display: inline-block; + width: 1.5em; + height: 1.5em; + vertical-align: middle; + background-image: var(--bs-navbar-toggler-icon-bg); + background-repeat: no-repeat; + background-position: center; + background-size: 100%; +} +.navbar-nav-scroll { + max-height: var(--bs-scroll-height, 75vh); + overflow-y: auto; +} +@media (min-width: 576px) { + .navbar-expand-sm { + flex-wrap: nowrap; + justify-content: flex-start; + } + .navbar-expand-sm .navbar-nav { + flex-direction: row; + } + .navbar-expand-sm .navbar-nav .dropdown-menu { + position: absolute; + } + .navbar-expand-sm .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + .navbar-expand-sm .navbar-nav-scroll { + overflow: visible; + } + .navbar-expand-sm .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + .navbar-expand-sm .navbar-toggler { + display: none; + } + .navbar-expand-sm .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + .navbar-expand-sm .offcanvas .offcanvas-header { + display: none; + } + .navbar-expand-sm .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} +@media (min-width: 768px) { + .navbar-expand-md { + flex-wrap: nowrap; + justify-content: flex-start; + } + .navbar-expand-md .navbar-nav { + flex-direction: row; + } + .navbar-expand-md .navbar-nav .dropdown-menu { + position: absolute; + } + .navbar-expand-md .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + .navbar-expand-md .navbar-nav-scroll { + overflow: visible; + } + .navbar-expand-md .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + .navbar-expand-md .navbar-toggler { + display: none; + } + .navbar-expand-md .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + .navbar-expand-md .offcanvas .offcanvas-header { + display: none; + } + .navbar-expand-md .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} +@media (min-width: 992px) { + .navbar-expand-lg { + flex-wrap: nowrap; + justify-content: flex-start; + } + .navbar-expand-lg .navbar-nav { + flex-direction: row; + } + .navbar-expand-lg .navbar-nav .dropdown-menu { + position: absolute; + } + .navbar-expand-lg .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + .navbar-expand-lg .navbar-nav-scroll { + overflow: visible; + } + .navbar-expand-lg .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + .navbar-expand-lg .navbar-toggler { + display: none; + } + .navbar-expand-lg .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + .navbar-expand-lg .offcanvas .offcanvas-header { + display: none; + } + .navbar-expand-lg .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} +@media (min-width: 1200px) { + .navbar-expand-xl { + flex-wrap: nowrap; + justify-content: flex-start; + } + .navbar-expand-xl .navbar-nav { + flex-direction: row; + } + .navbar-expand-xl .navbar-nav .dropdown-menu { + position: absolute; + } + .navbar-expand-xl .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + .navbar-expand-xl .navbar-nav-scroll { + overflow: visible; + } + .navbar-expand-xl .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + .navbar-expand-xl .navbar-toggler { + display: none; + } + .navbar-expand-xl .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + .navbar-expand-xl .offcanvas .offcanvas-header { + display: none; + } + .navbar-expand-xl .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} +@media (min-width: 1400px) { + .navbar-expand-xxl { + flex-wrap: nowrap; + justify-content: flex-start; + } + .navbar-expand-xxl .navbar-nav { + flex-direction: row; + } + .navbar-expand-xxl .navbar-nav .dropdown-menu { + position: absolute; + } + .navbar-expand-xxl .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + .navbar-expand-xxl .navbar-nav-scroll { + overflow: visible; + } + .navbar-expand-xxl .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + .navbar-expand-xxl .navbar-toggler { + display: none; + } + .navbar-expand-xxl .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + .navbar-expand-xxl .offcanvas .offcanvas-header { + display: none; + } + .navbar-expand-xxl .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} +.navbar-expand { + flex-wrap: nowrap; + justify-content: flex-start; +} +.navbar-expand .navbar-nav { + flex-direction: row; +} +.navbar-expand .navbar-nav .dropdown-menu { + position: absolute; +} +.navbar-expand .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); +} +.navbar-expand .navbar-nav-scroll { + overflow: visible; +} +.navbar-expand .navbar-collapse { + display: flex !important; + flex-basis: auto; +} +.navbar-expand .navbar-toggler { + display: none; +} +.navbar-expand .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; +} +.navbar-expand .offcanvas .offcanvas-header { + display: none; +} +.navbar-expand .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; +} +.navbar-dark { + --bs-navbar-color: rgba(255, 255, 255, 0.6); + --bs-navbar-hover-color: #fff; + --bs-navbar-disabled-color: rgba(255, 255, 255, 0.25); + --bs-navbar-active-color: #fff; + --bs-navbar-brand-color: #fff; + --bs-navbar-brand-hover-color: #fff; + --bs-navbar-toggler-border-color: rgba(255, 255, 255, 0.1); + --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.6%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); +} +.card { + --bs-card-spacer-y: 1rem; + --bs-card-spacer-x: 1rem; + --bs-card-title-spacer-y: 0.5rem; + --bs-card-border-width: 1px; + --bs-card-border-color: var(--bs-border-color-translucent); + --bs-card-border-radius: 0.375rem; + --bs-card-box-shadow: ; + --bs-card-inner-border-radius: calc(0.375rem - 1px); + --bs-card-cap-padding-y: 0.5rem; + --bs-card-cap-padding-x: 1rem; + --bs-card-cap-bg: #444; + --bs-card-cap-color: ; + --bs-card-height: ; + --bs-card-color: ; + --bs-card-bg: #303030; + --bs-card-img-overlay-padding: 1rem; + --bs-card-group-margin: 0.75rem; + position: relative; + display: flex; + flex-direction: column; + min-width: 0; + height: var(--bs-card-height); + word-wrap: break-word; + background-color: var(--bs-card-bg); + background-clip: border-box; + border: var(--bs-card-border-width) solid var(--bs-card-border-color); + border-radius: var(--bs-card-border-radius); +} +.card > hr { + margin-right: 0; + margin-left: 0; +} +.card > .list-group { + border-top: inherit; + border-bottom: inherit; +} +.card > .list-group:first-child { + border-top-width: 0; + border-top-left-radius: var(--bs-card-inner-border-radius); + border-top-right-radius: var(--bs-card-inner-border-radius); +} +.card > .list-group:last-child { + border-bottom-width: 0; + border-bottom-right-radius: var(--bs-card-inner-border-radius); + border-bottom-left-radius: var(--bs-card-inner-border-radius); +} +.card > .card-header + .list-group, +.card > .list-group + .card-footer { + border-top: 0; +} +.card-body { + flex: 1 1 auto; + padding: var(--bs-card-spacer-y) var(--bs-card-spacer-x); + color: var(--bs-card-color); +} +.card-title { + margin-bottom: var(--bs-card-title-spacer-y); +} +.card-subtitle { + margin-top: calc(-0.5 * var(--bs-card-title-spacer-y)); + margin-bottom: 0; +} +.card-text:last-child { + margin-bottom: 0; +} +.card-link + .card-link { + margin-left: var(--bs-card-spacer-x); +} +.card-header { + padding: var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x); + margin-bottom: 0; + color: var(--bs-card-cap-color); + background-color: var(--bs-card-cap-bg); + border-bottom: var(--bs-card-border-width) solid var(--bs-card-border-color); +} +.card-header:first-child { + border-radius: var(--bs-card-inner-border-radius) + var(--bs-card-inner-border-radius) 0 0; +} +.card-footer { + padding: var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x); + color: var(--bs-card-cap-color); + background-color: var(--bs-card-cap-bg); + border-top: var(--bs-card-border-width) solid var(--bs-card-border-color); +} +.card-footer:last-child { + border-radius: 0 0 var(--bs-card-inner-border-radius) + var(--bs-card-inner-border-radius); +} +.card-header-tabs { + margin-right: calc(-0.5 * var(--bs-card-cap-padding-x)); + margin-bottom: calc(-1 * var(--bs-card-cap-padding-y)); + margin-left: calc(-0.5 * var(--bs-card-cap-padding-x)); + border-bottom: 0; +} +.card-header-tabs .nav-link.active { + background-color: var(--bs-card-bg); + border-bottom-color: var(--bs-card-bg); +} +.card-header-pills { + margin-right: calc(-0.5 * var(--bs-card-cap-padding-x)); + margin-left: calc(-0.5 * var(--bs-card-cap-padding-x)); +} +.card-img-overlay { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + padding: var(--bs-card-img-overlay-padding); + border-radius: var(--bs-card-inner-border-radius); +} +.card-img, +.card-img-bottom, +.card-img-top { + width: 100%; +} +.card-img, +.card-img-top { + border-top-left-radius: var(--bs-card-inner-border-radius); + border-top-right-radius: var(--bs-card-inner-border-radius); +} +.card-img, +.card-img-bottom { + border-bottom-right-radius: var(--bs-card-inner-border-radius); + border-bottom-left-radius: var(--bs-card-inner-border-radius); +} +.card-group > .card { + margin-bottom: var(--bs-card-group-margin); +} +@media (min-width: 576px) { + .card-group { + display: flex; + flex-flow: row wrap; + } + .card-group > .card { + flex: 1 0 0%; + margin-bottom: 0; + } + .card-group > .card + .card { + margin-left: 0; + border-left: 0; + } + .card-group > .card:not(:last-child) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + .card-group > .card:not(:last-child) .card-header, + .card-group > .card:not(:last-child) .card-img-top { + border-top-right-radius: 0; + } + .card-group > .card:not(:last-child) .card-footer, + .card-group > .card:not(:last-child) .card-img-bottom { + border-bottom-right-radius: 0; + } + .card-group > .card:not(:first-child) { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + .card-group > .card:not(:first-child) .card-header, + .card-group > .card:not(:first-child) .card-img-top { + border-top-left-radius: 0; + } + .card-group > .card:not(:first-child) .card-footer, + .card-group > .card:not(:first-child) .card-img-bottom { + border-bottom-left-radius: 0; + } +} +.accordion { + --bs-accordion-color: #fff; + --bs-accordion-bg: #222; + --bs-accordion-transition: color 0.15s ease-in-out, + background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, + box-shadow 0.15s ease-in-out, border-radius 0.15s ease; + --bs-accordion-border-color: var(--bs-border-color); + --bs-accordion-border-width: 1px; + --bs-accordion-border-radius: 0.375rem; + --bs-accordion-inner-border-radius: calc(0.375rem - 1px); + --bs-accordion-btn-padding-x: 1.25rem; + --bs-accordion-btn-padding-y: 1rem; + --bs-accordion-btn-color: #fff; + --bs-accordion-btn-bg: var(--bs-accordion-bg); + --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); + --bs-accordion-btn-icon-width: 1.25rem; + --bs-accordion-btn-icon-transform: rotate(-180deg); + --bs-accordion-btn-icon-transition: transform 0.2s ease-in-out; + --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23325172'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); + --bs-accordion-btn-focus-border-color: #9badbf; + --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem rgba(55, 90, 127, 0.25); + --bs-accordion-body-padding-x: 1.25rem; + --bs-accordion-body-padding-y: 1rem; + --bs-accordion-active-color: #325172; + --bs-accordion-active-bg: #ebeff2; +} +.accordion-button { + position: relative; + display: flex; + align-items: center; + width: 100%; + padding: var(--bs-accordion-btn-padding-y) var(--bs-accordion-btn-padding-x); + font-size: 1rem; + color: var(--bs-accordion-btn-color); + text-align: left; + background-color: var(--bs-accordion-btn-bg); + border: 0; + border-radius: 0; + overflow-anchor: none; + transition: var(--bs-accordion-transition); +} +@media (prefers-reduced-motion: reduce) { + .accordion-button { + transition: none; + } +} +.accordion-button:not(.collapsed) { + color: var(--bs-accordion-active-color); + background-color: var(--bs-accordion-active-bg); + box-shadow: inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 + var(--bs-accordion-border-color); +} +.accordion-button:not(.collapsed)::after { + background-image: var(--bs-accordion-btn-active-icon); + transform: var(--bs-accordion-btn-icon-transform); +} +.accordion-button::after { + flex-shrink: 0; + width: var(--bs-accordion-btn-icon-width); + height: var(--bs-accordion-btn-icon-width); + margin-left: auto; + content: ''; + background-image: var(--bs-accordion-btn-icon); + background-repeat: no-repeat; + background-size: var(--bs-accordion-btn-icon-width); + transition: var(--bs-accordion-btn-icon-transition); +} +@media (prefers-reduced-motion: reduce) { + .accordion-button::after { + transition: none; + } +} +.accordion-button:hover { + z-index: 2; +} +.accordion-button:focus { + z-index: 3; + border-color: var(--bs-accordion-btn-focus-border-color); + outline: 0; + box-shadow: var(--bs-accordion-btn-focus-box-shadow); +} +.accordion-header { + margin-bottom: 0; +} +.accordion-item { + color: var(--bs-accordion-color); + background-color: var(--bs-accordion-bg); + border: var(--bs-accordion-border-width) solid + var(--bs-accordion-border-color); +} +.accordion-item:first-of-type { + border-top-left-radius: var(--bs-accordion-border-radius); + border-top-right-radius: var(--bs-accordion-border-radius); +} +.accordion-item:first-of-type .accordion-button { + border-top-left-radius: var(--bs-accordion-inner-border-radius); + border-top-right-radius: var(--bs-accordion-inner-border-radius); +} +.accordion-item:not(:first-of-type) { + border-top: 0; +} +.accordion-item:last-of-type { + border-bottom-right-radius: var(--bs-accordion-border-radius); + border-bottom-left-radius: var(--bs-accordion-border-radius); +} +.accordion-item:last-of-type .accordion-button.collapsed { + border-bottom-right-radius: var(--bs-accordion-inner-border-radius); + border-bottom-left-radius: var(--bs-accordion-inner-border-radius); +} +.accordion-item:last-of-type .accordion-collapse { + border-bottom-right-radius: var(--bs-accordion-border-radius); + border-bottom-left-radius: var(--bs-accordion-border-radius); +} +.accordion-body { + padding: var(--bs-accordion-body-padding-y) var(--bs-accordion-body-padding-x); +} +.accordion-flush .accordion-collapse { + border-width: 0; +} +.accordion-flush .accordion-item { + border-right: 0; + border-left: 0; + border-radius: 0; +} +.accordion-flush .accordion-item:first-child { + border-top: 0; +} +.accordion-flush .accordion-item:last-child { + border-bottom: 0; +} +.accordion-flush .accordion-item .accordion-button, +.accordion-flush .accordion-item .accordion-button.collapsed { + border-radius: 0; +} +.breadcrumb { + --bs-breadcrumb-padding-x: 0.75rem; + --bs-breadcrumb-padding-y: 0.375rem; + --bs-breadcrumb-margin-bottom: 1rem; + --bs-breadcrumb-bg: #444; + --bs-breadcrumb-border-radius: 0.25rem; + --bs-breadcrumb-divider-color: #888; + --bs-breadcrumb-item-padding-x: 0.5rem; + --bs-breadcrumb-item-active-color: #888; + display: flex; + flex-wrap: wrap; + padding: var(--bs-breadcrumb-padding-y) var(--bs-breadcrumb-padding-x); + margin-bottom: var(--bs-breadcrumb-margin-bottom); + font-size: var(--bs-breadcrumb-font-size); + list-style: none; + background-color: var(--bs-breadcrumb-bg); + border-radius: var(--bs-breadcrumb-border-radius); +} +.breadcrumb-item + .breadcrumb-item { + padding-left: var(--bs-breadcrumb-item-padding-x); +} +.breadcrumb-item + .breadcrumb-item::before { + float: left; + padding-right: var(--bs-breadcrumb-item-padding-x); + color: var(--bs-breadcrumb-divider-color); + content: var(--bs-breadcrumb-divider, '/'); +} +.breadcrumb-item.active { + color: var(--bs-breadcrumb-item-active-color); +} +.pagination { + --bs-pagination-padding-x: 0.75rem; + --bs-pagination-padding-y: 0.375rem; + --bs-pagination-font-size: 1rem; + --bs-pagination-color: #fff; + --bs-pagination-bg: #00bc8c; + --bs-pagination-border-width: 0; + --bs-pagination-border-color: transparent; + --bs-pagination-border-radius: 0.375rem; + --bs-pagination-hover-color: #fff; + --bs-pagination-hover-bg: #00efb2; + --bs-pagination-hover-border-color: transparent; + --bs-pagination-focus-color: var(--bs-link-hover-color); + --bs-pagination-focus-bg: #ebebeb; + --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(55, 90, 127, 0.25); + --bs-pagination-active-color: #fff; + --bs-pagination-active-bg: #00efb2; + --bs-pagination-active-border-color: transparent; + --bs-pagination-disabled-color: #fff; + --bs-pagination-disabled-bg: #007053; + --bs-pagination-disabled-border-color: transparent; + display: flex; + padding-left: 0; + list-style: none; +} +.page-link { + position: relative; + display: block; + padding: var(--bs-pagination-padding-y) var(--bs-pagination-padding-x); + font-size: var(--bs-pagination-font-size); + color: var(--bs-pagination-color); + text-decoration: none; + background-color: var(--bs-pagination-bg); + border: var(--bs-pagination-border-width) solid + var(--bs-pagination-border-color); + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, + border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .page-link { + transition: none; + } +} +.page-link:hover { + z-index: 2; + color: var(--bs-pagination-hover-color); + background-color: var(--bs-pagination-hover-bg); + border-color: var(--bs-pagination-hover-border-color); +} +.page-link:focus { + z-index: 3; + color: var(--bs-pagination-focus-color); + background-color: var(--bs-pagination-focus-bg); + outline: 0; + box-shadow: var(--bs-pagination-focus-box-shadow); +} +.active > .page-link, +.page-link.active { + z-index: 3; + color: var(--bs-pagination-active-color); + background-color: var(--bs-pagination-active-bg); + border-color: var(--bs-pagination-active-border-color); +} +.disabled > .page-link, +.page-link.disabled { + color: var(--bs-pagination-disabled-color); + pointer-events: none; + background-color: var(--bs-pagination-disabled-bg); + border-color: var(--bs-pagination-disabled-border-color); +} +.page-item:not(:first-child) .page-link { + margin-left: 0; +} +.page-item:first-child .page-link { + border-top-left-radius: var(--bs-pagination-border-radius); + border-bottom-left-radius: var(--bs-pagination-border-radius); +} +.page-item:last-child .page-link { + border-top-right-radius: var(--bs-pagination-border-radius); + border-bottom-right-radius: var(--bs-pagination-border-radius); +} +.pagination-lg { + --bs-pagination-padding-x: 1.5rem; + --bs-pagination-padding-y: 0.75rem; + --bs-pagination-font-size: 1.25rem; + --bs-pagination-border-radius: 0.5rem; +} +.pagination-sm { + --bs-pagination-padding-x: 0.5rem; + --bs-pagination-padding-y: 0.25rem; + --bs-pagination-font-size: 0.875rem; + --bs-pagination-border-radius: 0.25rem; +} +.badge { + --bs-badge-padding-x: 0.65em; + --bs-badge-padding-y: 0.35em; + --bs-badge-font-size: 0.75em; + --bs-badge-font-weight: 700; + --bs-badge-color: #fff; + --bs-badge-border-radius: 0.375rem; + display: inline-block; + padding: var(--bs-badge-padding-y) var(--bs-badge-padding-x); + font-size: var(--bs-badge-font-size); + font-weight: var(--bs-badge-font-weight); + line-height: 1; + color: var(--bs-badge-color); + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: var(--bs-badge-border-radius); +} +.badge:empty { + display: none; +} +.btn .badge { + position: relative; + top: -1px; +} +.alert { + --bs-alert-bg: transparent; + --bs-alert-padding-x: 1rem; + --bs-alert-padding-y: 1rem; + --bs-alert-margin-bottom: 1rem; + --bs-alert-color: inherit; + --bs-alert-border-color: transparent; + --bs-alert-border: 1px solid var(--bs-alert-border-color); + --bs-alert-border-radius: 0.375rem; + position: relative; + padding: var(--bs-alert-padding-y) var(--bs-alert-padding-x); + margin-bottom: var(--bs-alert-margin-bottom); + color: var(--bs-alert-color); + background-color: var(--bs-alert-bg); + border: var(--bs-alert-border); + border-radius: var(--bs-alert-border-radius); +} +.alert-heading { + color: inherit; +} +.alert-link { + font-weight: 700; +} +.alert-dismissible { + padding-right: 3rem; +} +.alert-dismissible .btn-close { + position: absolute; + top: 0; + right: 0; + z-index: 2; + padding: 1.25rem 1rem; +} +.alert-primary { + --bs-alert-color: #21364c; + --bs-alert-bg: #d7dee5; + --bs-alert-border-color: #c3ced9; +} +.alert-primary .alert-link { + color: #1a2b3d; +} +.alert-secondary { + --bs-alert-color: #292929; + --bs-alert-bg: #dadada; + --bs-alert-border-color: #c7c7c7; +} +.alert-secondary .alert-link { + color: #212121; +} +.alert-success { + --bs-alert-color: #007154; + --bs-alert-bg: #ccf2e8; + --bs-alert-border-color: #b3ebdd; +} +.alert-success .alert-link { + color: #005a43; +} +.alert-info { + --bs-alert-color: #1f5b83; + --bs-alert-bg: #d6eaf8; + --bs-alert-border-color: #c2e0f4; +} +.alert-info .alert-link { + color: #194969; +} +.alert-warning { + --bs-alert-color: #925e0b; + --bs-alert-bg: #fdebd0; + --bs-alert-border-color: #fbe1b8; +} +.alert-warning .alert-link { + color: #754b09; +} +.alert-danger { + --bs-alert-color: #8b2e24; + --bs-alert-bg: #fadbd8; + --bs-alert-border-color: #f8c9c5; +} +.alert-danger .alert-link { + color: #6f251d; +} +.alert-light { + --bs-alert-color: #686d71; + --bs-alert-bg: #eff0f2; + --bs-alert-border-color: #e6e9eb; +} +.alert-light .alert-link { + color: #53575a; +} +.alert-dark { + --bs-alert-color: #1d1d1d; + --bs-alert-bg: #d6d6d6; + --bs-alert-border-color: #c1c1c1; +} +.alert-dark .alert-link { + color: #171717; +} +@keyframes progress-bar-stripes { + 0% { + background-position-x: 1rem; + } +} +.progress { + --bs-progress-height: 1rem; + --bs-progress-font-size: 0.75rem; + --bs-progress-bg: #444; + --bs-progress-border-radius: 0.375rem; + --bs-progress-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075); + --bs-progress-bar-color: #fff; + --bs-progress-bar-bg: #375a7f; + --bs-progress-bar-transition: width 0.6s ease; + display: flex; + height: var(--bs-progress-height); + overflow: hidden; + font-size: var(--bs-progress-font-size); + background-color: var(--bs-progress-bg); + border-radius: var(--bs-progress-border-radius); +} +.progress-bar { + display: flex; + flex-direction: column; + justify-content: center; + overflow: hidden; + color: var(--bs-progress-bar-color); + text-align: center; + white-space: nowrap; + background-color: var(--bs-progress-bar-bg); + transition: var(--bs-progress-bar-transition); +} +@media (prefers-reduced-motion: reduce) { + .progress-bar { + transition: none; + } +} +.progress-bar-striped { + background-image: linear-gradient( + 45deg, + rgba(255, 255, 255, 0.15) 25%, + transparent 25%, + transparent 50%, + rgba(255, 255, 255, 0.15) 50%, + rgba(255, 255, 255, 0.15) 75%, + transparent 75%, + transparent + ); + background-size: var(--bs-progress-height) var(--bs-progress-height); +} +.progress-bar-animated { + animation: 1s linear infinite progress-bar-stripes; +} +@media (prefers-reduced-motion: reduce) { + .progress-bar-animated { + animation: none; + } +} +.list-group { + --bs-list-group-color: #fff; + --bs-list-group-bg: #303030; + --bs-list-group-border-color: #444; + --bs-list-group-border-width: 1px; + --bs-list-group-border-radius: 0.375rem; + --bs-list-group-item-padding-x: 1rem; + --bs-list-group-item-padding-y: 0.5rem; + --bs-list-group-action-color: #444; + --bs-list-group-action-hover-color: #fff; + --bs-list-group-action-hover-bg: #444; + --bs-list-group-action-active-color: #fff; + --bs-list-group-action-active-bg: #222; + --bs-list-group-disabled-color: #888; + --bs-list-group-disabled-bg: #303030; + --bs-list-group-active-color: #fff; + --bs-list-group-active-bg: #375a7f; + --bs-list-group-active-border-color: #375a7f; + display: flex; + flex-direction: column; + padding-left: 0; + margin-bottom: 0; + border-radius: var(--bs-list-group-border-radius); +} +.list-group-numbered { + list-style-type: none; + counter-reset: section; +} +.list-group-numbered > .list-group-item::before { + content: counters(section, '.') '. '; + counter-increment: section; +} +.list-group-item-action { + width: 100%; + color: var(--bs-list-group-action-color); + text-align: inherit; +} +.list-group-item-action:focus, +.list-group-item-action:hover { + z-index: 1; + color: var(--bs-list-group-action-hover-color); + text-decoration: none; + background-color: var(--bs-list-group-action-hover-bg); +} +.list-group-item-action:active { + color: var(--bs-list-group-action-active-color); + background-color: var(--bs-list-group-action-active-bg); +} +.list-group-item { + position: relative; + display: block; + padding: var(--bs-list-group-item-padding-y) + var(--bs-list-group-item-padding-x); + color: var(--bs-list-group-color); + text-decoration: none; + background-color: var(--bs-list-group-bg); + border: var(--bs-list-group-border-width) solid + var(--bs-list-group-border-color); +} +.list-group-item:first-child { + border-top-left-radius: inherit; + border-top-right-radius: inherit; +} +.list-group-item:last-child { + border-bottom-right-radius: inherit; + border-bottom-left-radius: inherit; +} +.list-group-item.disabled, +.list-group-item:disabled { + color: var(--bs-list-group-disabled-color); + pointer-events: none; + background-color: var(--bs-list-group-disabled-bg); +} +.list-group-item.active { + z-index: 2; + color: var(--bs-list-group-active-color); + background-color: var(--bs-list-group-active-bg); + border-color: var(--bs-list-group-active-border-color); +} +.list-group-item + .list-group-item { + border-top-width: 0; +} +.list-group-item + .list-group-item.active { + margin-top: calc(-1 * var(--bs-list-group-border-width)); + border-top-width: var(--bs-list-group-border-width); +} +.list-group-horizontal { + flex-direction: row; +} +.list-group-horizontal > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; +} +.list-group-horizontal > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; +} +.list-group-horizontal > .list-group-item.active { + margin-top: 0; +} +.list-group-horizontal > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; +} +.list-group-horizontal > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); +} +@media (min-width: 576px) { + .list-group-horizontal-sm { + flex-direction: row; + } + .list-group-horizontal-sm > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + .list-group-horizontal-sm > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + .list-group-horizontal-sm > .list-group-item.active { + margin-top: 0; + } + .list-group-horizontal-sm > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + .list-group-horizontal-sm > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} +@media (min-width: 768px) { + .list-group-horizontal-md { + flex-direction: row; + } + .list-group-horizontal-md > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + .list-group-horizontal-md > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + .list-group-horizontal-md > .list-group-item.active { + margin-top: 0; + } + .list-group-horizontal-md > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + .list-group-horizontal-md > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} +@media (min-width: 992px) { + .list-group-horizontal-lg { + flex-direction: row; + } + .list-group-horizontal-lg > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + .list-group-horizontal-lg > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + .list-group-horizontal-lg > .list-group-item.active { + margin-top: 0; + } + .list-group-horizontal-lg > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + .list-group-horizontal-lg > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} +@media (min-width: 1200px) { + .list-group-horizontal-xl { + flex-direction: row; + } + .list-group-horizontal-xl > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + .list-group-horizontal-xl > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + .list-group-horizontal-xl > .list-group-item.active { + margin-top: 0; + } + .list-group-horizontal-xl > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + .list-group-horizontal-xl > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} +@media (min-width: 1400px) { + .list-group-horizontal-xxl { + flex-direction: row; + } + .list-group-horizontal-xxl > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + .list-group-horizontal-xxl > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + .list-group-horizontal-xxl > .list-group-item.active { + margin-top: 0; + } + .list-group-horizontal-xxl > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + .list-group-horizontal-xxl > .list-group-item + .list-group-item.active { + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); + } +} +.list-group-flush { + border-radius: 0; +} +.list-group-flush > .list-group-item { + border-width: 0 0 var(--bs-list-group-border-width); +} +.list-group-flush > .list-group-item:last-child { + border-bottom-width: 0; +} +.list-group-item-primary { + color: #21364c; + background-color: #d7dee5; +} +.list-group-item-primary.list-group-item-action:focus, +.list-group-item-primary.list-group-item-action:hover { + color: #21364c; + background-color: #c2c8ce; +} +.list-group-item-primary.list-group-item-action.active { + color: #fff; + background-color: #21364c; + border-color: #21364c; +} +.list-group-item-secondary { + color: #292929; + background-color: #dadada; +} +.list-group-item-secondary.list-group-item-action:focus, +.list-group-item-secondary.list-group-item-action:hover { + color: #292929; + background-color: #c4c4c4; +} +.list-group-item-secondary.list-group-item-action.active { + color: #fff; + background-color: #292929; + border-color: #292929; +} +.list-group-item-success { + color: #007154; + background-color: #ccf2e8; +} +.list-group-item-success.list-group-item-action:focus, +.list-group-item-success.list-group-item-action:hover { + color: #007154; + background-color: #b8dad1; +} +.list-group-item-success.list-group-item-action.active { + color: #fff; + background-color: #007154; + border-color: #007154; +} +.list-group-item-info { + color: #1f5b83; + background-color: #d6eaf8; +} +.list-group-item-info.list-group-item-action:focus, +.list-group-item-info.list-group-item-action:hover { + color: #1f5b83; + background-color: #c1d3df; +} +.list-group-item-info.list-group-item-action.active { + color: #fff; + background-color: #1f5b83; + border-color: #1f5b83; +} +.list-group-item-warning { + color: #925e0b; + background-color: #fdebd0; +} +.list-group-item-warning.list-group-item-action:focus, +.list-group-item-warning.list-group-item-action:hover { + color: #925e0b; + background-color: #e4d4bb; +} +.list-group-item-warning.list-group-item-action.active { + color: #fff; + background-color: #925e0b; + border-color: #925e0b; +} +.list-group-item-danger { + color: #8b2e24; + background-color: #fadbd8; +} +.list-group-item-danger.list-group-item-action:focus, +.list-group-item-danger.list-group-item-action:hover { + color: #8b2e24; + background-color: #e1c5c2; +} +.list-group-item-danger.list-group-item-action.active { + color: #fff; + background-color: #8b2e24; + border-color: #8b2e24; +} +.list-group-item-light { + color: #686d71; + background-color: #eff0f2; +} +.list-group-item-light.list-group-item-action:focus, +.list-group-item-light.list-group-item-action:hover { + color: #686d71; + background-color: #d7d8da; +} +.list-group-item-light.list-group-item-action.active { + color: #fff; + background-color: #686d71; + border-color: #686d71; +} +.list-group-item-dark { + color: #1d1d1d; + background-color: #d6d6d6; +} +.list-group-item-dark.list-group-item-action:focus, +.list-group-item-dark.list-group-item-action:hover { + color: #1d1d1d; + background-color: #c1c1c1; +} +.list-group-item-dark.list-group-item-action.active { + color: #fff; + background-color: #1d1d1d; + border-color: #1d1d1d; +} +.btn-close { + box-sizing: content-box; + width: 1em; + height: 1em; + padding: 0.25em 0.25em; + color: #fff; + background: transparent + url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") + center/1em auto no-repeat; + border: 0; + border-radius: 0.375rem; + opacity: 0.4; +} +.btn-close:hover { + color: #fff; + text-decoration: none; + opacity: 1; +} +.btn-close:focus { + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(55, 90, 127, 0.25); + opacity: 1; +} +.btn-close.disabled, +.btn-close:disabled { + pointer-events: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + opacity: 0.25; +} +.btn-close-white { + filter: invert(1) grayscale(100%) brightness(200%); +} +.toast { + --bs-toast-zindex: 1090; + --bs-toast-padding-x: 0.75rem; + --bs-toast-padding-y: 0.5rem; + --bs-toast-spacing: 1.5rem; + --bs-toast-max-width: 350px; + --bs-toast-font-size: 0.875rem; + --bs-toast-color: ; + --bs-toast-bg: #444; + --bs-toast-border-width: 1px; + --bs-toast-border-color: var(--bs-border-color-translucent); + --bs-toast-border-radius: 0.375rem; + --bs-toast-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + --bs-toast-header-color: #888; + --bs-toast-header-bg: #303030; + --bs-toast-header-border-color: rgba(0, 0, 0, 0.05); + width: var(--bs-toast-max-width); + max-width: 100%; + font-size: var(--bs-toast-font-size); + color: var(--bs-toast-color); + pointer-events: auto; + background-color: var(--bs-toast-bg); + background-clip: padding-box; + border: var(--bs-toast-border-width) solid var(--bs-toast-border-color); + box-shadow: var(--bs-toast-box-shadow); + border-radius: var(--bs-toast-border-radius); +} +.toast.showing { + opacity: 0; +} +.toast:not(.show) { + display: none; +} +.toast-container { + --bs-toast-zindex: 1090; + position: absolute; + z-index: var(--bs-toast-zindex); + width: -webkit-max-content; + width: -moz-max-content; + width: max-content; + max-width: 100%; + pointer-events: none; +} +.toast-container > :not(:last-child) { + margin-bottom: var(--bs-toast-spacing); +} +.toast-header { + display: flex; + align-items: center; + padding: var(--bs-toast-padding-y) var(--bs-toast-padding-x); + color: var(--bs-toast-header-color); + background-color: var(--bs-toast-header-bg); + background-clip: padding-box; + border-bottom: var(--bs-toast-border-width) solid + var(--bs-toast-header-border-color); + border-top-left-radius: calc( + var(--bs-toast-border-radius) - var(--bs-toast-border-width) + ); + border-top-right-radius: calc( + var(--bs-toast-border-radius) - var(--bs-toast-border-width) + ); +} +.toast-header .btn-close { + margin-right: calc(-0.5 * var(--bs-toast-padding-x)); + margin-left: var(--bs-toast-padding-x); +} +.toast-body { + padding: var(--bs-toast-padding-x); + word-wrap: break-word; +} +.modal { + --bs-modal-zindex: 1055; + --bs-modal-width: 500px; + --bs-modal-padding: 1rem; + --bs-modal-margin: 0.5rem; + --bs-modal-color: ; + --bs-modal-bg: #303030; + --bs-modal-border-color: #444; + --bs-modal-border-width: 1px; + --bs-modal-border-radius: 0.5rem; + --bs-modal-box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); + --bs-modal-inner-border-radius: calc(0.5rem - 1px); + --bs-modal-header-padding-x: 1rem; + --bs-modal-header-padding-y: 1rem; + --bs-modal-header-padding: 1rem 1rem; + --bs-modal-header-border-color: #444; + --bs-modal-header-border-width: 1px; + --bs-modal-title-line-height: 1.5; + --bs-modal-footer-gap: 0.5rem; + --bs-modal-footer-bg: ; + --bs-modal-footer-border-color: #444; + --bs-modal-footer-border-width: 1px; + position: fixed; + top: 0; + left: 0; + z-index: var(--bs-modal-zindex); + display: none; + width: 100%; + height: 100%; + overflow-x: hidden; + overflow-y: auto; + outline: 0; +} +.modal-dialog { + position: relative; + width: auto; + margin: var(--bs-modal-margin); + pointer-events: none; +} +.modal.fade .modal-dialog { + transition: transform 0.3s ease-out; + transform: translate(0, -50px); +} +@media (prefers-reduced-motion: reduce) { + .modal.fade .modal-dialog { + transition: none; + } +} +.modal.show .modal-dialog { + transform: none; +} +.modal.modal-static .modal-dialog { + transform: scale(1.02); +} +.modal-dialog-scrollable { + height: calc(100% - var(--bs-modal-margin) * 2); +} +.modal-dialog-scrollable .modal-content { + max-height: 100%; + overflow: hidden; +} +.modal-dialog-scrollable .modal-body { + overflow-y: auto; +} +.modal-dialog-centered { + display: flex; + align-items: center; + min-height: calc(100% - var(--bs-modal-margin) * 2); +} +.modal-content { + position: relative; + display: flex; + flex-direction: column; + width: 100%; + color: var(--bs-modal-color); + pointer-events: auto; + background-color: var(--bs-modal-bg); + background-clip: padding-box; + border: var(--bs-modal-border-width) solid var(--bs-modal-border-color); + border-radius: var(--bs-modal-border-radius); + outline: 0; +} +.modal-backdrop { + --bs-backdrop-zindex: 1050; + --bs-backdrop-bg: #000; + --bs-backdrop-opacity: 0.5; + position: fixed; + top: 0; + left: 0; + z-index: var(--bs-backdrop-zindex); + width: 100vw; + height: 100vh; + background-color: var(--bs-backdrop-bg); +} +.modal-backdrop.fade { + opacity: 0; +} +.modal-backdrop.show { + opacity: var(--bs-backdrop-opacity); +} +.modal-header { + display: flex; + flex-shrink: 0; + align-items: center; + justify-content: space-between; + padding: var(--bs-modal-header-padding); + border-bottom: var(--bs-modal-header-border-width) solid + var(--bs-modal-header-border-color); + border-top-left-radius: var(--bs-modal-inner-border-radius); + border-top-right-radius: var(--bs-modal-inner-border-radius); +} +.modal-header .btn-close { + padding: calc(var(--bs-modal-header-padding-y) * 0.5) + calc(var(--bs-modal-header-padding-x) * 0.5); + margin: calc(-0.5 * var(--bs-modal-header-padding-y)) + calc(-0.5 * var(--bs-modal-header-padding-x)) + calc(-0.5 * var(--bs-modal-header-padding-y)) auto; +} +.modal-title { + margin-bottom: 0; + line-height: var(--bs-modal-title-line-height); +} +.modal-body { + position: relative; + flex: 1 1 auto; + padding: var(--bs-modal-padding); +} +.modal-footer { + display: flex; + flex-shrink: 0; + flex-wrap: wrap; + align-items: center; + justify-content: flex-end; + padding: calc(var(--bs-modal-padding) - var(--bs-modal-footer-gap) * 0.5); + background-color: var(--bs-modal-footer-bg); + border-top: var(--bs-modal-footer-border-width) solid + var(--bs-modal-footer-border-color); + border-bottom-right-radius: var(--bs-modal-inner-border-radius); + border-bottom-left-radius: var(--bs-modal-inner-border-radius); +} +.modal-footer > * { + margin: calc(var(--bs-modal-footer-gap) * 0.5); +} +@media (min-width: 576px) { + .modal { + --bs-modal-margin: 1.75rem; + --bs-modal-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + } + .modal-dialog { + max-width: var(--bs-modal-width); + margin-right: auto; + margin-left: auto; + } + .modal-sm { + --bs-modal-width: 300px; + } +} +@media (min-width: 992px) { + .modal-lg, + .modal-xl { + --bs-modal-width: 800px; + } +} +@media (min-width: 1200px) { + .modal-xl { + --bs-modal-width: 1140px; + } +} +.modal-fullscreen { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; +} +.modal-fullscreen .modal-content { + height: 100%; + border: 0; + border-radius: 0; +} +.modal-fullscreen .modal-footer, +.modal-fullscreen .modal-header { + border-radius: 0; +} +.modal-fullscreen .modal-body { + overflow-y: auto; +} +@media (max-width: 575.98px) { + .modal-fullscreen-sm-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + .modal-fullscreen-sm-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + .modal-fullscreen-sm-down .modal-footer, + .modal-fullscreen-sm-down .modal-header { + border-radius: 0; + } + .modal-fullscreen-sm-down .modal-body { + overflow-y: auto; + } +} +@media (max-width: 767.98px) { + .modal-fullscreen-md-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + .modal-fullscreen-md-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + .modal-fullscreen-md-down .modal-footer, + .modal-fullscreen-md-down .modal-header { + border-radius: 0; + } + .modal-fullscreen-md-down .modal-body { + overflow-y: auto; + } +} +@media (max-width: 991.98px) { + .modal-fullscreen-lg-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + .modal-fullscreen-lg-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + .modal-fullscreen-lg-down .modal-footer, + .modal-fullscreen-lg-down .modal-header { + border-radius: 0; + } + .modal-fullscreen-lg-down .modal-body { + overflow-y: auto; + } +} +@media (max-width: 1199.98px) { + .modal-fullscreen-xl-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + .modal-fullscreen-xl-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + .modal-fullscreen-xl-down .modal-footer, + .modal-fullscreen-xl-down .modal-header { + border-radius: 0; + } + .modal-fullscreen-xl-down .modal-body { + overflow-y: auto; + } +} +@media (max-width: 1399.98px) { + .modal-fullscreen-xxl-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + .modal-fullscreen-xxl-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + .modal-fullscreen-xxl-down .modal-footer, + .modal-fullscreen-xxl-down .modal-header { + border-radius: 0; + } + .modal-fullscreen-xxl-down .modal-body { + overflow-y: auto; + } +} +.tooltip { + --bs-tooltip-zindex: 1080; + --bs-tooltip-max-width: 200px; + --bs-tooltip-padding-x: 0.5rem; + --bs-tooltip-padding-y: 0.25rem; + --bs-tooltip-margin: ; + --bs-tooltip-font-size: 0.875rem; + --bs-tooltip-color: #fff; + --bs-tooltip-bg: #000; + --bs-tooltip-border-radius: 0.375rem; + --bs-tooltip-opacity: 0.9; + --bs-tooltip-arrow-width: 0.8rem; + --bs-tooltip-arrow-height: 0.4rem; + z-index: var(--bs-tooltip-zindex); + display: block; + padding: var(--bs-tooltip-arrow-height); + margin: var(--bs-tooltip-margin); + font-family: var(--bs-font-sans-serif); + font-style: normal; + font-weight: 400; + line-height: 1.5; + text-align: left; + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + word-break: normal; + white-space: normal; + word-spacing: normal; + line-break: auto; + font-size: var(--bs-tooltip-font-size); + word-wrap: break-word; + opacity: 0; +} +.tooltip.show { + opacity: var(--bs-tooltip-opacity); +} +.tooltip .tooltip-arrow { + display: block; + width: var(--bs-tooltip-arrow-width); + height: var(--bs-tooltip-arrow-height); +} +.tooltip .tooltip-arrow::before { + position: absolute; + content: ''; + border-color: transparent; + border-style: solid; +} +.bs-tooltip-auto[data-popper-placement^='top'] .tooltip-arrow, +.bs-tooltip-top .tooltip-arrow { + bottom: 0; +} +.bs-tooltip-auto[data-popper-placement^='top'] .tooltip-arrow::before, +.bs-tooltip-top .tooltip-arrow::before { + top: -1px; + border-width: var(--bs-tooltip-arrow-height) + calc(var(--bs-tooltip-arrow-width) * 0.5) 0; + border-top-color: var(--bs-tooltip-bg); +} +.bs-tooltip-auto[data-popper-placement^='right'] .tooltip-arrow, +.bs-tooltip-end .tooltip-arrow { + left: 0; + width: var(--bs-tooltip-arrow-height); + height: var(--bs-tooltip-arrow-width); +} +.bs-tooltip-auto[data-popper-placement^='right'] .tooltip-arrow::before, +.bs-tooltip-end .tooltip-arrow::before { + right: -1px; + border-width: calc(var(--bs-tooltip-arrow-width) * 0.5) + var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * 0.5) 0; + border-right-color: var(--bs-tooltip-bg); +} +.bs-tooltip-auto[data-popper-placement^='bottom'] .tooltip-arrow, +.bs-tooltip-bottom .tooltip-arrow { + top: 0; +} +.bs-tooltip-auto[data-popper-placement^='bottom'] .tooltip-arrow::before, +.bs-tooltip-bottom .tooltip-arrow::before { + bottom: -1px; + border-width: 0 calc(var(--bs-tooltip-arrow-width) * 0.5) + var(--bs-tooltip-arrow-height); + border-bottom-color: var(--bs-tooltip-bg); +} +.bs-tooltip-auto[data-popper-placement^='left'] .tooltip-arrow, +.bs-tooltip-start .tooltip-arrow { + right: 0; + width: var(--bs-tooltip-arrow-height); + height: var(--bs-tooltip-arrow-width); +} +.bs-tooltip-auto[data-popper-placement^='left'] .tooltip-arrow::before, +.bs-tooltip-start .tooltip-arrow::before { + left: -1px; + border-width: calc(var(--bs-tooltip-arrow-width) * 0.5) 0 + calc(var(--bs-tooltip-arrow-width) * 0.5) var(--bs-tooltip-arrow-height); + border-left-color: var(--bs-tooltip-bg); +} +.tooltip-inner { + max-width: var(--bs-tooltip-max-width); + padding: var(--bs-tooltip-padding-y) var(--bs-tooltip-padding-x); + color: var(--bs-tooltip-color); + text-align: center; + background-color: var(--bs-tooltip-bg); + border-radius: var(--bs-tooltip-border-radius); +} +.popover { + --bs-popover-zindex: 1070; + --bs-popover-max-width: 276px; + --bs-popover-font-size: 0.875rem; + --bs-popover-bg: #303030; + --bs-popover-border-width: 1px; + --bs-popover-border-color: var(--bs-border-color-translucent); + --bs-popover-border-radius: 0.5rem; + --bs-popover-inner-border-radius: calc(0.5rem - 1px); + --bs-popover-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + --bs-popover-header-padding-x: 1rem; + --bs-popover-header-padding-y: 0.5rem; + --bs-popover-header-font-size: 1rem; + --bs-popover-header-color: ; + --bs-popover-header-bg: #444; + --bs-popover-body-padding-x: 1rem; + --bs-popover-body-padding-y: 1rem; + --bs-popover-body-color: #fff; + --bs-popover-arrow-width: 1rem; + --bs-popover-arrow-height: 0.5rem; + --bs-popover-arrow-border: var(--bs-popover-border-color); + z-index: var(--bs-popover-zindex); + display: block; + max-width: var(--bs-popover-max-width); + font-family: var(--bs-font-sans-serif); + font-style: normal; + font-weight: 400; + line-height: 1.5; + text-align: left; + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + word-break: normal; + white-space: normal; + word-spacing: normal; + line-break: auto; + font-size: var(--bs-popover-font-size); + word-wrap: break-word; + background-color: var(--bs-popover-bg); + background-clip: padding-box; + border: var(--bs-popover-border-width) solid var(--bs-popover-border-color); + border-radius: var(--bs-popover-border-radius); +} +.popover .popover-arrow { + display: block; + width: var(--bs-popover-arrow-width); + height: var(--bs-popover-arrow-height); +} +.popover .popover-arrow::after, +.popover .popover-arrow::before { + position: absolute; + display: block; + content: ''; + border-color: transparent; + border-style: solid; + border-width: 0; +} +.bs-popover-auto[data-popper-placement^='top'] > .popover-arrow, +.bs-popover-top > .popover-arrow { + bottom: calc( + -1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width) + ); +} +.bs-popover-auto[data-popper-placement^='top'] > .popover-arrow::after, +.bs-popover-auto[data-popper-placement^='top'] > .popover-arrow::before, +.bs-popover-top > .popover-arrow::after, +.bs-popover-top > .popover-arrow::before { + border-width: var(--bs-popover-arrow-height) + calc(var(--bs-popover-arrow-width) * 0.5) 0; +} +.bs-popover-auto[data-popper-placement^='top'] > .popover-arrow::before, +.bs-popover-top > .popover-arrow::before { + bottom: 0; + border-top-color: var(--bs-popover-arrow-border); +} +.bs-popover-auto[data-popper-placement^='top'] > .popover-arrow::after, +.bs-popover-top > .popover-arrow::after { + bottom: var(--bs-popover-border-width); + border-top-color: var(--bs-popover-bg); +} +.bs-popover-auto[data-popper-placement^='right'] > .popover-arrow, +.bs-popover-end > .popover-arrow { + left: calc( + -1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width) + ); + width: var(--bs-popover-arrow-height); + height: var(--bs-popover-arrow-width); +} +.bs-popover-auto[data-popper-placement^='right'] > .popover-arrow::after, +.bs-popover-auto[data-popper-placement^='right'] > .popover-arrow::before, +.bs-popover-end > .popover-arrow::after, +.bs-popover-end > .popover-arrow::before { + border-width: calc(var(--bs-popover-arrow-width) * 0.5) + var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * 0.5) 0; +} +.bs-popover-auto[data-popper-placement^='right'] > .popover-arrow::before, +.bs-popover-end > .popover-arrow::before { + left: 0; + border-right-color: var(--bs-popover-arrow-border); +} +.bs-popover-auto[data-popper-placement^='right'] > .popover-arrow::after, +.bs-popover-end > .popover-arrow::after { + left: var(--bs-popover-border-width); + border-right-color: var(--bs-popover-bg); +} +.bs-popover-auto[data-popper-placement^='bottom'] > .popover-arrow, +.bs-popover-bottom > .popover-arrow { + top: calc( + -1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width) + ); +} +.bs-popover-auto[data-popper-placement^='bottom'] > .popover-arrow::after, +.bs-popover-auto[data-popper-placement^='bottom'] > .popover-arrow::before, +.bs-popover-bottom > .popover-arrow::after, +.bs-popover-bottom > .popover-arrow::before { + border-width: 0 calc(var(--bs-popover-arrow-width) * 0.5) + var(--bs-popover-arrow-height); +} +.bs-popover-auto[data-popper-placement^='bottom'] > .popover-arrow::before, +.bs-popover-bottom > .popover-arrow::before { + top: 0; + border-bottom-color: var(--bs-popover-arrow-border); +} +.bs-popover-auto[data-popper-placement^='bottom'] > .popover-arrow::after, +.bs-popover-bottom > .popover-arrow::after { + top: var(--bs-popover-border-width); + border-bottom-color: var(--bs-popover-bg); +} +.bs-popover-auto[data-popper-placement^='bottom'] .popover-header::before, +.bs-popover-bottom .popover-header::before { + position: absolute; + top: 0; + left: 50%; + display: block; + width: var(--bs-popover-arrow-width); + margin-left: calc(-0.5 * var(--bs-popover-arrow-width)); + content: ''; + border-bottom: var(--bs-popover-border-width) solid + var(--bs-popover-header-bg); +} +.bs-popover-auto[data-popper-placement^='left'] > .popover-arrow, +.bs-popover-start > .popover-arrow { + right: calc( + -1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width) + ); + width: var(--bs-popover-arrow-height); + height: var(--bs-popover-arrow-width); +} +.bs-popover-auto[data-popper-placement^='left'] > .popover-arrow::after, +.bs-popover-auto[data-popper-placement^='left'] > .popover-arrow::before, +.bs-popover-start > .popover-arrow::after, +.bs-popover-start > .popover-arrow::before { + border-width: calc(var(--bs-popover-arrow-width) * 0.5) 0 + calc(var(--bs-popover-arrow-width) * 0.5) var(--bs-popover-arrow-height); +} +.bs-popover-auto[data-popper-placement^='left'] > .popover-arrow::before, +.bs-popover-start > .popover-arrow::before { + right: 0; + border-left-color: var(--bs-popover-arrow-border); +} +.bs-popover-auto[data-popper-placement^='left'] > .popover-arrow::after, +.bs-popover-start > .popover-arrow::after { + right: var(--bs-popover-border-width); + border-left-color: var(--bs-popover-bg); +} +.popover-header { + padding: var(--bs-popover-header-padding-y) var(--bs-popover-header-padding-x); + margin-bottom: 0; + font-size: var(--bs-popover-header-font-size); + color: var(--bs-popover-header-color); + background-color: var(--bs-popover-header-bg); + border-bottom: var(--bs-popover-border-width) solid + var(--bs-popover-border-color); + border-top-left-radius: var(--bs-popover-inner-border-radius); + border-top-right-radius: var(--bs-popover-inner-border-radius); +} +.popover-header:empty { + display: none; +} +.popover-body { + padding: var(--bs-popover-body-padding-y) var(--bs-popover-body-padding-x); + color: var(--bs-popover-body-color); +} +.carousel { + position: relative; +} +.carousel.pointer-event { + touch-action: pan-y; +} +.carousel-inner { + position: relative; + width: 100%; + overflow: hidden; +} +.carousel-inner::after { + display: block; + clear: both; + content: ''; +} +.carousel-item { + position: relative; + display: none; + float: left; + width: 100%; + margin-right: -100%; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + transition: transform 0.6s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .carousel-item { + transition: none; + } +} +.carousel-item-next, +.carousel-item-prev, +.carousel-item.active { + display: block; +} +.active.carousel-item-end, +.carousel-item-next:not(.carousel-item-start) { + transform: translateX(100%); +} +.active.carousel-item-start, +.carousel-item-prev:not(.carousel-item-end) { + transform: translateX(-100%); +} +.carousel-fade .carousel-item { + opacity: 0; + transition-property: opacity; + transform: none; +} +.carousel-fade .carousel-item-next.carousel-item-start, +.carousel-fade .carousel-item-prev.carousel-item-end, +.carousel-fade .carousel-item.active { + z-index: 1; + opacity: 1; +} +.carousel-fade .active.carousel-item-end, +.carousel-fade .active.carousel-item-start { + z-index: 0; + opacity: 0; + transition: opacity 0s 0.6s; +} +@media (prefers-reduced-motion: reduce) { + .carousel-fade .active.carousel-item-end, + .carousel-fade .active.carousel-item-start { + transition: none; + } +} +.carousel-control-next, +.carousel-control-prev { + position: absolute; + top: 0; + bottom: 0; + z-index: 1; + display: flex; + align-items: center; + justify-content: center; + width: 15%; + padding: 0; + color: #fff; + text-align: center; + background: 0 0; + border: 0; + opacity: 0.5; + transition: opacity 0.15s ease; +} +@media (prefers-reduced-motion: reduce) { + .carousel-control-next, + .carousel-control-prev { + transition: none; + } +} +.carousel-control-next:focus, +.carousel-control-next:hover, +.carousel-control-prev:focus, +.carousel-control-prev:hover { + color: #fff; + text-decoration: none; + outline: 0; + opacity: 0.9; +} +.carousel-control-prev { + left: 0; +} +.carousel-control-next { + right: 0; +} +.carousel-control-next-icon, +.carousel-control-prev-icon { + display: inline-block; + width: 2rem; + height: 2rem; + background-repeat: no-repeat; + background-position: 50%; + background-size: 100% 100%; +} +.carousel-control-prev-icon { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e"); +} +.carousel-control-next-icon { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); +} +.carousel-indicators { + position: absolute; + right: 0; + bottom: 0; + left: 0; + z-index: 2; + display: flex; + justify-content: center; + padding: 0; + margin-right: 15%; + margin-bottom: 1rem; + margin-left: 15%; + list-style: none; +} +.carousel-indicators [data-bs-target] { + box-sizing: content-box; + flex: 0 1 auto; + width: 30px; + height: 3px; + padding: 0; + margin-right: 3px; + margin-left: 3px; + text-indent: -999px; + cursor: pointer; + background-color: #fff; + background-clip: padding-box; + border: 0; + border-top: 10px solid transparent; + border-bottom: 10px solid transparent; + opacity: 0.5; + transition: opacity 0.6s ease; +} +@media (prefers-reduced-motion: reduce) { + .carousel-indicators [data-bs-target] { + transition: none; + } +} +.carousel-indicators .active { + opacity: 1; +} +.carousel-caption { + position: absolute; + right: 15%; + bottom: 1.25rem; + left: 15%; + padding-top: 1.25rem; + padding-bottom: 1.25rem; + color: #fff; + text-align: center; +} +.carousel-dark .carousel-control-next-icon, +.carousel-dark .carousel-control-prev-icon { + filter: invert(1) grayscale(100); +} +.carousel-dark .carousel-indicators [data-bs-target] { + background-color: #000; +} +.carousel-dark .carousel-caption { + color: #000; +} +.spinner-border, +.spinner-grow { + display: inline-block; + width: var(--bs-spinner-width); + height: var(--bs-spinner-height); + vertical-align: var(--bs-spinner-vertical-align); + border-radius: 50%; + animation: var(--bs-spinner-animation-speed) linear infinite + var(--bs-spinner-animation-name); +} +@keyframes spinner-border { + to { + transform: rotate(360deg); + } +} +.spinner-border { + --bs-spinner-width: 2rem; + --bs-spinner-height: 2rem; + --bs-spinner-vertical-align: -0.125em; + --bs-spinner-border-width: 0.25em; + --bs-spinner-animation-speed: 0.75s; + --bs-spinner-animation-name: spinner-border; + border: var(--bs-spinner-border-width) solid currentcolor; + border-right-color: transparent; +} +.spinner-border-sm { + --bs-spinner-width: 1rem; + --bs-spinner-height: 1rem; + --bs-spinner-border-width: 0.2em; +} +@keyframes spinner-grow { + 0% { + transform: scale(0); + } + 50% { + opacity: 1; + transform: none; + } +} +.spinner-grow { + --bs-spinner-width: 2rem; + --bs-spinner-height: 2rem; + --bs-spinner-vertical-align: -0.125em; + --bs-spinner-animation-speed: 0.75s; + --bs-spinner-animation-name: spinner-grow; + background-color: currentcolor; + opacity: 0; +} +.spinner-grow-sm { + --bs-spinner-width: 1rem; + --bs-spinner-height: 1rem; +} +@media (prefers-reduced-motion: reduce) { + .spinner-border, + .spinner-grow { + --bs-spinner-animation-speed: 1.5s; + } +} +.offcanvas, +.offcanvas-lg, +.offcanvas-md, +.offcanvas-sm, +.offcanvas-xl, +.offcanvas-xxl { + --bs-offcanvas-zindex: 1045; + --bs-offcanvas-width: 400px; + --bs-offcanvas-height: 30vh; + --bs-offcanvas-padding-x: 1rem; + --bs-offcanvas-padding-y: 1rem; + --bs-offcanvas-color: ; + --bs-offcanvas-bg: #303030; + --bs-offcanvas-border-width: 1px; + --bs-offcanvas-border-color: #444; + --bs-offcanvas-box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); +} +@media (max-width: 575.98px) { + .offcanvas-sm { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} +@media (max-width: 575.98px) and (prefers-reduced-motion: reduce) { + .offcanvas-sm { + transition: none; + } +} +@media (max-width: 575.98px) { + .offcanvas-sm.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} +@media (max-width: 575.98px) { + .offcanvas-sm.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} +@media (max-width: 575.98px) { + .offcanvas-sm.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} +@media (max-width: 575.98px) { + .offcanvas-sm.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} +@media (max-width: 575.98px) { + .offcanvas-sm.show:not(.hiding), + .offcanvas-sm.showing { + transform: none; + } +} +@media (max-width: 575.98px) { + .offcanvas-sm.hiding, + .offcanvas-sm.show, + .offcanvas-sm.showing { + visibility: visible; + } +} +@media (min-width: 576px) { + .offcanvas-sm { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + .offcanvas-sm .offcanvas-header { + display: none; + } + .offcanvas-sm .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} +@media (max-width: 767.98px) { + .offcanvas-md { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} +@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) { + .offcanvas-md { + transition: none; + } +} +@media (max-width: 767.98px) { + .offcanvas-md.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} +@media (max-width: 767.98px) { + .offcanvas-md.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} +@media (max-width: 767.98px) { + .offcanvas-md.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} +@media (max-width: 767.98px) { + .offcanvas-md.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} +@media (max-width: 767.98px) { + .offcanvas-md.show:not(.hiding), + .offcanvas-md.showing { + transform: none; + } +} +@media (max-width: 767.98px) { + .offcanvas-md.hiding, + .offcanvas-md.show, + .offcanvas-md.showing { + visibility: visible; + } +} +@media (min-width: 768px) { + .offcanvas-md { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + .offcanvas-md .offcanvas-header { + display: none; + } + .offcanvas-md .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} +@media (max-width: 991.98px) { + .offcanvas-lg { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} +@media (max-width: 991.98px) and (prefers-reduced-motion: reduce) { + .offcanvas-lg { + transition: none; + } +} +@media (max-width: 991.98px) { + .offcanvas-lg.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} +@media (max-width: 991.98px) { + .offcanvas-lg.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} +@media (max-width: 991.98px) { + .offcanvas-lg.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} +@media (max-width: 991.98px) { + .offcanvas-lg.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} +@media (max-width: 991.98px) { + .offcanvas-lg.show:not(.hiding), + .offcanvas-lg.showing { + transform: none; + } +} +@media (max-width: 991.98px) { + .offcanvas-lg.hiding, + .offcanvas-lg.show, + .offcanvas-lg.showing { + visibility: visible; + } +} +@media (min-width: 992px) { + .offcanvas-lg { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + .offcanvas-lg .offcanvas-header { + display: none; + } + .offcanvas-lg .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} +@media (max-width: 1199.98px) { + .offcanvas-xl { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} +@media (max-width: 1199.98px) and (prefers-reduced-motion: reduce) { + .offcanvas-xl { + transition: none; + } +} +@media (max-width: 1199.98px) { + .offcanvas-xl.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} +@media (max-width: 1199.98px) { + .offcanvas-xl.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} +@media (max-width: 1199.98px) { + .offcanvas-xl.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} +@media (max-width: 1199.98px) { + .offcanvas-xl.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} +@media (max-width: 1199.98px) { + .offcanvas-xl.show:not(.hiding), + .offcanvas-xl.showing { + transform: none; + } +} +@media (max-width: 1199.98px) { + .offcanvas-xl.hiding, + .offcanvas-xl.show, + .offcanvas-xl.showing { + visibility: visible; + } +} +@media (min-width: 1200px) { + .offcanvas-xl { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + .offcanvas-xl .offcanvas-header { + display: none; + } + .offcanvas-xl .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} +@media (max-width: 1399.98px) { + .offcanvas-xxl { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} +@media (max-width: 1399.98px) and (prefers-reduced-motion: reduce) { + .offcanvas-xxl { + transition: none; + } +} +@media (max-width: 1399.98px) { + .offcanvas-xxl.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} +@media (max-width: 1399.98px) { + .offcanvas-xxl.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} +@media (max-width: 1399.98px) { + .offcanvas-xxl.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} +@media (max-width: 1399.98px) { + .offcanvas-xxl.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} +@media (max-width: 1399.98px) { + .offcanvas-xxl.show:not(.hiding), + .offcanvas-xxl.showing { + transform: none; + } +} +@media (max-width: 1399.98px) { + .offcanvas-xxl.hiding, + .offcanvas-xxl.show, + .offcanvas-xxl.showing { + visibility: visible; + } +} +@media (min-width: 1400px) { + .offcanvas-xxl { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + .offcanvas-xxl .offcanvas-header { + display: none; + } + .offcanvas-xxl .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} +.offcanvas { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .offcanvas { + transition: none; + } +} +.offcanvas.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateX(-100%); +} +.offcanvas.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateX(100%); +} +.offcanvas.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateY(-100%); +} +.offcanvas.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateY(100%); +} +.offcanvas.show:not(.hiding), +.offcanvas.showing { + transform: none; +} +.offcanvas.hiding, +.offcanvas.show, +.offcanvas.showing { + visibility: visible; +} +.offcanvas-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 1040; + width: 100vw; + height: 100vh; + background-color: #000; +} +.offcanvas-backdrop.fade { + opacity: 0; +} +.offcanvas-backdrop.show { + opacity: 0.5; +} +.offcanvas-header { + display: flex; + align-items: center; + justify-content: space-between; + padding: var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x); +} +.offcanvas-header .btn-close { + padding: calc(var(--bs-offcanvas-padding-y) * 0.5) + calc(var(--bs-offcanvas-padding-x) * 0.5); + margin-top: calc(-0.5 * var(--bs-offcanvas-padding-y)); + margin-right: calc(-0.5 * var(--bs-offcanvas-padding-x)); + margin-bottom: calc(-0.5 * var(--bs-offcanvas-padding-y)); +} +.offcanvas-title { + margin-bottom: 0; + line-height: 1.5; +} +.offcanvas-body { + flex-grow: 1; + padding: var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x); + overflow-y: auto; +} +.placeholder { + display: inline-block; + min-height: 1em; + vertical-align: middle; + cursor: wait; + background-color: currentcolor; + opacity: 0.5; +} +.placeholder.btn::before { + display: inline-block; + content: ''; +} +.placeholder-xs { + min-height: 0.6em; +} +.placeholder-sm { + min-height: 0.8em; +} +.placeholder-lg { + min-height: 1.2em; +} +.placeholder-glow .placeholder { + animation: placeholder-glow 2s ease-in-out infinite; +} +@keyframes placeholder-glow { + 50% { + opacity: 0.2; + } +} +.placeholder-wave { + -webkit-mask-image: linear-gradient( + 130deg, + #000 55%, + rgba(0, 0, 0, 0.8) 75%, + #000 95% + ); + mask-image: linear-gradient( + 130deg, + #000 55%, + rgba(0, 0, 0, 0.8) 75%, + #000 95% + ); + -webkit-mask-size: 200% 100%; + mask-size: 200% 100%; + animation: placeholder-wave 2s linear infinite; +} +@keyframes placeholder-wave { + 100% { + -webkit-mask-position: -200% 0%; + mask-position: -200% 0%; + } +} +.clearfix::after { + display: block; + clear: both; + content: ''; +} +.text-bg-primary { + color: #fff !important; + background-color: RGBA(55, 90, 127, var(--bs-bg-opacity, 1)) !important; +} +.text-bg-secondary { + color: #fff !important; + background-color: RGBA(68, 68, 68, var(--bs-bg-opacity, 1)) !important; +} +.text-bg-success { + color: #fff !important; + background-color: RGBA(0, 188, 140, var(--bs-bg-opacity, 1)) !important; +} +.text-bg-info { + color: #fff !important; + background-color: RGBA(52, 152, 219, var(--bs-bg-opacity, 1)) !important; +} +.text-bg-warning { + color: #fff !important; + background-color: RGBA(243, 156, 18, var(--bs-bg-opacity, 1)) !important; +} +.text-bg-danger { + color: #fff !important; + background-color: RGBA(231, 76, 60, var(--bs-bg-opacity, 1)) !important; +} +.text-bg-light { + color: #fff !important; + background-color: RGBA(173, 181, 189, var(--bs-bg-opacity, 1)) !important; +} +.text-bg-dark { + color: #fff !important; + background-color: RGBA(48, 48, 48, var(--bs-bg-opacity, 1)) !important; +} +.link-primary { + color: #375a7f !important; +} +.link-primary:focus, +.link-primary:hover { + color: #2c4866 !important; +} +.link-secondary { + color: #444 !important; +} +.link-secondary:focus, +.link-secondary:hover { + color: #363636 !important; +} +.link-success { + color: #00bc8c !important; +} +.link-success:focus, +.link-success:hover { + color: #009670 !important; +} +.link-info { + color: #3498db !important; +} +.link-info:focus, +.link-info:hover { + color: #2a7aaf !important; +} +.link-warning { + color: #f39c12 !important; +} +.link-warning:focus, +.link-warning:hover { + color: #c27d0e !important; +} +.link-danger { + color: #e74c3c !important; +} +.link-danger:focus, +.link-danger:hover { + color: #b93d30 !important; +} +.link-light { + color: #adb5bd !important; +} +.link-light:focus, +.link-light:hover { + color: #8a9197 !important; +} +.link-dark { + color: #303030 !important; +} +.link-dark:focus, +.link-dark:hover { + color: #262626 !important; +} +.ratio { + position: relative; + width: 100%; +} +.ratio::before { + display: block; + padding-top: var(--bs-aspect-ratio); + content: ''; +} +.ratio > * { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ratio-1x1 { + --bs-aspect-ratio: 100%; +} +.ratio-4x3 { + --bs-aspect-ratio: 75%; +} +.ratio-16x9 { + --bs-aspect-ratio: 56.25%; +} +.ratio-21x9 { + --bs-aspect-ratio: 42.8571428571%; +} +.fixed-top { + position: fixed; + top: 0; + right: 0; + left: 0; + z-index: 1030; +} +.fixed-bottom { + position: fixed; + right: 0; + bottom: 0; + left: 0; + z-index: 1030; +} +.sticky-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; +} +.sticky-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; +} +@media (min-width: 576px) { + .sticky-sm-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; + } + .sticky-sm-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } +} +@media (min-width: 768px) { + .sticky-md-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; + } + .sticky-md-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } +} +@media (min-width: 992px) { + .sticky-lg-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; + } + .sticky-lg-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } +} +@media (min-width: 1200px) { + .sticky-xl-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; + } + .sticky-xl-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } +} +@media (min-width: 1400px) { + .sticky-xxl-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; + } + .sticky-xxl-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } +} +.hstack { + display: flex; + flex-direction: row; + align-items: center; + align-self: stretch; +} +.vstack { + display: flex; + flex: 1 1 auto; + flex-direction: column; + align-self: stretch; +} +.visually-hidden, +.visually-hidden-focusable:not(:focus):not(:focus-within) { + position: absolute !important; + width: 1px !important; + height: 1px !important; + padding: 0 !important; + margin: -1px !important; + overflow: hidden !important; + clip: rect(0, 0, 0, 0) !important; + white-space: nowrap !important; + border: 0 !important; +} +.stretched-link::after { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1; + content: ''; +} +.text-truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.vr { + display: inline-block; + align-self: stretch; + width: 1px; + min-height: 1em; + background-color: currentcolor; + opacity: 0.25; +} +.align-baseline { + vertical-align: baseline !important; +} +.align-top { + vertical-align: top !important; +} +.align-middle { + vertical-align: middle !important; +} +.align-bottom { + vertical-align: bottom !important; +} +.align-text-bottom { + vertical-align: text-bottom !important; +} +.align-text-top { + vertical-align: text-top !important; +} +.float-start { + float: left !important; +} +.float-end { + float: right !important; +} +.float-none { + float: none !important; +} +.opacity-0 { + opacity: 0 !important; +} +.opacity-25 { + opacity: 0.25 !important; +} +.opacity-50 { + opacity: 0.5 !important; +} +.opacity-75 { + opacity: 0.75 !important; +} +.opacity-100 { + opacity: 1 !important; +} +.overflow-auto { + overflow: auto !important; +} +.overflow-hidden { + overflow: hidden !important; +} +.overflow-visible { + overflow: visible !important; +} +.overflow-scroll { + overflow: scroll !important; +} +.d-inline { + display: inline !important; +} +.d-inline-block { + display: inline-block !important; +} +.d-block { + display: block !important; +} +.d-grid { + display: grid !important; +} +.d-table { + display: table !important; +} +.d-table-row { + display: table-row !important; +} +.d-table-cell { + display: table-cell !important; +} +.d-flex { + display: flex !important; +} +.d-inline-flex { + display: inline-flex !important; +} +.d-none { + display: none !important; +} +.shadow { + box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; +} +.shadow-sm { + box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; +} +.shadow-lg { + box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important; +} +.shadow-none { + box-shadow: none !important; +} +.position-static { + position: static !important; +} +.position-relative { + position: relative !important; +} +.position-absolute { + position: absolute !important; +} +.position-fixed { + position: fixed !important; +} +.position-sticky { + position: -webkit-sticky !important; + position: sticky !important; +} +.top-0 { + top: 0 !important; +} +.top-50 { + top: 50% !important; +} +.top-100 { + top: 100% !important; +} +.bottom-0 { + bottom: 0 !important; +} +.bottom-50 { + bottom: 50% !important; +} +.bottom-100 { + bottom: 100% !important; +} +.start-0 { + left: 0 !important; +} +.start-50 { + left: 50% !important; +} +.start-100 { + left: 100% !important; +} +.end-0 { + right: 0 !important; +} +.end-50 { + right: 50% !important; +} +.end-100 { + right: 100% !important; +} +.translate-middle { + transform: translate(-50%, -50%) !important; +} +.translate-middle-x { + transform: translateX(-50%) !important; +} +.translate-middle-y { + transform: translateY(-50%) !important; +} +.border { + border: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} +.border-0 { + border: 0 !important; +} +.border-top { + border-top: var(--bs-border-width) var(--bs-border-style) + var(--bs-border-color) !important; +} +.border-top-0 { + border-top: 0 !important; +} +.border-end { + border-right: var(--bs-border-width) var(--bs-border-style) + var(--bs-border-color) !important; +} +.border-end-0 { + border-right: 0 !important; +} +.border-bottom { + border-bottom: var(--bs-border-width) var(--bs-border-style) + var(--bs-border-color) !important; +} +.border-bottom-0 { + border-bottom: 0 !important; +} +.border-start { + border-left: var(--bs-border-width) var(--bs-border-style) + var(--bs-border-color) !important; +} +.border-start-0 { + border-left: 0 !important; +} +.border-primary { + --bs-border-opacity: 1; + border-color: rgba( + var(--bs-primary-rgb), + var(--bs-border-opacity) + ) !important; +} +.border-secondary { + --bs-border-opacity: 1; + border-color: rgba( + var(--bs-secondary-rgb), + var(--bs-border-opacity) + ) !important; +} +.border-success { + --bs-border-opacity: 1; + border-color: rgba( + var(--bs-success-rgb), + var(--bs-border-opacity) + ) !important; +} +.border-info { + --bs-border-opacity: 1; + border-color: rgba(var(--bs-info-rgb), var(--bs-border-opacity)) !important; +} +.border-warning { + --bs-border-opacity: 1; + border-color: rgba( + var(--bs-warning-rgb), + var(--bs-border-opacity) + ) !important; +} +.border-danger { + --bs-border-opacity: 1; + border-color: rgba(var(--bs-danger-rgb), var(--bs-border-opacity)) !important; +} +.border-light { + --bs-border-opacity: 1; + border-color: rgba(var(--bs-light-rgb), var(--bs-border-opacity)) !important; +} +.border-dark { + --bs-border-opacity: 1; + border-color: rgba(var(--bs-dark-rgb), var(--bs-border-opacity)) !important; +} +.border-white { + --bs-border-opacity: 1; + border-color: rgba(var(--bs-white-rgb), var(--bs-border-opacity)) !important; +} +.border-1 { + --bs-border-width: 1px; +} +.border-2 { + --bs-border-width: 2px; +} +.border-3 { + --bs-border-width: 3px; +} +.border-4 { + --bs-border-width: 4px; +} +.border-5 { + --bs-border-width: 5px; +} +.border-opacity-10 { + --bs-border-opacity: 0.1; +} +.border-opacity-25 { + --bs-border-opacity: 0.25; +} +.border-opacity-50 { + --bs-border-opacity: 0.5; +} +.border-opacity-75 { + --bs-border-opacity: 0.75; +} +.border-opacity-100 { + --bs-border-opacity: 1; +} +.w-25 { + width: 25% !important; +} +.w-50 { + width: 50% !important; +} +.w-75 { + width: 75% !important; +} +.w-100 { + width: 100% !important; +} +.w-auto { + width: auto !important; +} +.mw-100 { + max-width: 100% !important; +} +.vw-100 { + width: 100vw !important; +} +.min-vw-100 { + min-width: 100vw !important; +} +.h-25 { + height: 25% !important; +} +.h-50 { + height: 50% !important; +} +.h-75 { + height: 75% !important; +} +.h-100 { + height: 100% !important; +} +.h-auto { + height: auto !important; +} +.mh-100 { + max-height: 100% !important; +} +.vh-100 { + height: 100vh !important; +} +.min-vh-100 { + min-height: 100vh !important; +} +.flex-fill { + flex: 1 1 auto !important; +} +.flex-row { + flex-direction: row !important; +} +.flex-column { + flex-direction: column !important; +} +.flex-row-reverse { + flex-direction: row-reverse !important; +} +.flex-column-reverse { + flex-direction: column-reverse !important; +} +.flex-grow-0 { + flex-grow: 0 !important; +} +.flex-grow-1 { + flex-grow: 1 !important; +} +.flex-shrink-0 { + flex-shrink: 0 !important; +} +.flex-shrink-1 { + flex-shrink: 1 !important; +} +.flex-wrap { + flex-wrap: wrap !important; +} +.flex-nowrap { + flex-wrap: nowrap !important; +} +.flex-wrap-reverse { + flex-wrap: wrap-reverse !important; +} +.justify-content-start { + justify-content: flex-start !important; +} +.justify-content-end { + justify-content: flex-end !important; +} +.justify-content-center { + justify-content: center !important; +} +.justify-content-between { + justify-content: space-between !important; +} +.justify-content-around { + justify-content: space-around !important; +} +.justify-content-evenly { + justify-content: space-evenly !important; +} +.align-items-start { + align-items: flex-start !important; +} +.align-items-end { + align-items: flex-end !important; +} +.align-items-center { + align-items: center !important; +} +.align-items-baseline { + align-items: baseline !important; +} +.align-items-stretch { + align-items: stretch !important; +} +.align-content-start { + align-content: flex-start !important; +} +.align-content-end { + align-content: flex-end !important; +} +.align-content-center { + align-content: center !important; +} +.align-content-between { + align-content: space-between !important; +} +.align-content-around { + align-content: space-around !important; +} +.align-content-stretch { + align-content: stretch !important; +} +.align-self-auto { + align-self: auto !important; +} +.align-self-start { + align-self: flex-start !important; +} +.align-self-end { + align-self: flex-end !important; +} +.align-self-center { + align-self: center !important; +} +.align-self-baseline { + align-self: baseline !important; +} +.align-self-stretch { + align-self: stretch !important; +} +.order-first { + order: -1 !important; +} +.order-0 { + order: 0 !important; +} +.order-1 { + order: 1 !important; +} +.order-2 { + order: 2 !important; +} +.order-3 { + order: 3 !important; +} +.order-4 { + order: 4 !important; +} +.order-5 { + order: 5 !important; +} +.order-last { + order: 6 !important; +} +.m-0 { + margin: 0 !important; +} +.m-1 { + margin: 0.25rem !important; +} +.m-2 { + margin: 0.5rem !important; +} +.m-3 { + margin: 1rem !important; +} +.m-4 { + margin: 1.5rem !important; +} +.m-5 { + margin: 3rem !important; +} +.m-auto { + margin: auto !important; +} +.mx-0 { + margin-right: 0 !important; + margin-left: 0 !important; +} +.mx-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; +} +.mx-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; +} +.mx-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; +} +.mx-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; +} +.mx-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; +} +.mx-auto { + margin-right: auto !important; + margin-left: auto !important; +} +.my-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; +} +.my-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; +} +.my-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; +} +.my-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; +} +.my-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; +} +.my-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; +} +.my-auto { + margin-top: auto !important; + margin-bottom: auto !important; +} +.mt-0 { + margin-top: 0 !important; +} +.mt-1 { + margin-top: 0.25rem !important; +} +.mt-2 { + margin-top: 0.5rem !important; +} +.mt-3 { + margin-top: 1rem !important; +} +.mt-4 { + margin-top: 1.5rem !important; +} +.mt-5 { + margin-top: 3rem !important; +} +.mt-auto { + margin-top: auto !important; +} +.me-0 { + margin-right: 0 !important; +} +.me-1 { + margin-right: 0.25rem !important; +} +.me-2 { + margin-right: 0.5rem !important; +} +.me-3 { + margin-right: 1rem !important; +} +.me-4 { + margin-right: 1.5rem !important; +} +.me-5 { + margin-right: 3rem !important; +} +.me-auto { + margin-right: auto !important; +} +.mb-0 { + margin-bottom: 0 !important; +} +.mb-1 { + margin-bottom: 0.25rem !important; +} +.mb-2 { + margin-bottom: 0.5rem !important; +} +.mb-3 { + margin-bottom: 1rem !important; +} +.mb-4 { + margin-bottom: 1.5rem !important; +} +.mb-5 { + margin-bottom: 3rem !important; +} +.mb-auto { + margin-bottom: auto !important; +} +.ms-0 { + margin-left: 0 !important; +} +.ms-1 { + margin-left: 0.25rem !important; +} +.ms-2 { + margin-left: 0.5rem !important; +} +.ms-3 { + margin-left: 1rem !important; +} +.ms-4 { + margin-left: 1.5rem !important; +} +.ms-5 { + margin-left: 3rem !important; +} +.ms-auto { + margin-left: auto !important; +} +.p-0 { + padding: 0 !important; +} +.p-1 { + padding: 0.25rem !important; +} +.p-2 { + padding: 0.5rem !important; +} +.p-3 { + padding: 1rem !important; +} +.p-4 { + padding: 1.5rem !important; +} +.p-5 { + padding: 3rem !important; +} +.px-0 { + padding-right: 0 !important; + padding-left: 0 !important; +} +.px-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; +} +.px-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; +} +.px-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; +} +.px-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; +} +.px-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; +} +.py-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; +} +.py-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; +} +.py-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; +} +.py-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; +} +.py-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; +} +.py-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; +} +.pt-0 { + padding-top: 0 !important; +} +.pt-1 { + padding-top: 0.25rem !important; +} +.pt-2 { + padding-top: 0.5rem !important; +} +.pt-3 { + padding-top: 1rem !important; +} +.pt-4 { + padding-top: 1.5rem !important; +} +.pt-5 { + padding-top: 3rem !important; +} +.pe-0 { + padding-right: 0 !important; +} +.pe-1 { + padding-right: 0.25rem !important; +} +.pe-2 { + padding-right: 0.5rem !important; +} +.pe-3 { + padding-right: 1rem !important; +} +.pe-4 { + padding-right: 1.5rem !important; +} +.pe-5 { + padding-right: 3rem !important; +} +.pb-0 { + padding-bottom: 0 !important; +} +.pb-1 { + padding-bottom: 0.25rem !important; +} +.pb-2 { + padding-bottom: 0.5rem !important; +} +.pb-3 { + padding-bottom: 1rem !important; +} +.pb-4 { + padding-bottom: 1.5rem !important; +} +.pb-5 { + padding-bottom: 3rem !important; +} +.ps-0 { + padding-left: 0 !important; +} +.ps-1 { + padding-left: 0.25rem !important; +} +.ps-2 { + padding-left: 0.5rem !important; +} +.ps-3 { + padding-left: 1rem !important; +} +.ps-4 { + padding-left: 1.5rem !important; +} +.ps-5 { + padding-left: 3rem !important; +} +.gap-0 { + gap: 0 !important; +} +.gap-1 { + gap: 0.25rem !important; +} +.gap-2 { + gap: 0.5rem !important; +} +.gap-3 { + gap: 1rem !important; +} +.gap-4 { + gap: 1.5rem !important; +} +.gap-5 { + gap: 3rem !important; +} +.font-monospace { + font-family: var(--bs-font-monospace) !important; +} +.fs-1 { + font-size: calc(1.425rem + 2.1vw) !important; +} +.fs-2 { + font-size: calc(1.375rem + 1.5vw) !important; +} +.fs-3 { + font-size: calc(1.325rem + 0.9vw) !important; +} +.fs-4 { + font-size: calc(1.275rem + 0.3vw) !important; +} +.fs-5 { + font-size: 1.25rem !important; +} +.fs-6 { + font-size: 1rem !important; +} +.fst-italic { + font-style: italic !important; +} +.fst-normal { + font-style: normal !important; +} +.fw-light { + font-weight: 300 !important; +} +.fw-lighter { + font-weight: lighter !important; +} +.fw-normal { + font-weight: 400 !important; +} +.fw-bold { + font-weight: 700 !important; +} +.fw-semibold { + font-weight: 600 !important; +} +.fw-bolder { + font-weight: bolder !important; +} +.lh-1 { + line-height: 1 !important; +} +.lh-sm { + line-height: 1.25 !important; +} +.lh-base { + line-height: 1.5 !important; +} +.lh-lg { + line-height: 2 !important; +} +.text-start { + text-align: left !important; +} +.text-end { + text-align: right !important; +} +.text-center { + text-align: center !important; +} +.text-decoration-none { + text-decoration: none !important; +} +.text-decoration-underline { + text-decoration: underline !important; +} +.text-decoration-line-through { + text-decoration: line-through !important; +} +.text-lowercase { + text-transform: lowercase !important; +} +.text-uppercase { + text-transform: uppercase !important; +} +.text-capitalize { + text-transform: capitalize !important; +} +.text-wrap { + white-space: normal !important; +} +.text-nowrap { + white-space: nowrap !important; +} +.text-break { + word-wrap: break-word !important; + word-break: break-word !important; +} +.text-primary { + --bs-text-opacity: 1; + color: rgba(var(--bs-primary-rgb), var(--bs-text-opacity)) !important; +} +.text-secondary { + --bs-text-opacity: 1; + color: rgba(var(--bs-secondary-rgb), var(--bs-text-opacity)) !important; +} +.text-success { + --bs-text-opacity: 1; + color: rgba(var(--bs-success-rgb), var(--bs-text-opacity)) !important; +} +.text-info { + --bs-text-opacity: 1; + color: rgba(var(--bs-info-rgb), var(--bs-text-opacity)) !important; +} +.text-warning { + --bs-text-opacity: 1; + color: rgba(var(--bs-warning-rgb), var(--bs-text-opacity)) !important; +} +.text-danger { + --bs-text-opacity: 1; + color: rgba(var(--bs-danger-rgb), var(--bs-text-opacity)) !important; +} +.text-light { + --bs-text-opacity: 1; + color: rgba(var(--bs-light-rgb), var(--bs-text-opacity)) !important; +} +.text-dark { + --bs-text-opacity: 1; + color: rgba(var(--bs-dark-rgb), var(--bs-text-opacity)) !important; +} +.text-black { + --bs-text-opacity: 1; + color: rgba(var(--bs-black-rgb), var(--bs-text-opacity)) !important; +} +.text-white { + --bs-text-opacity: 1; + color: rgba(var(--bs-white-rgb), var(--bs-text-opacity)) !important; +} +.text-body { + --bs-text-opacity: 1; + color: rgba(var(--bs-body-color-rgb), var(--bs-text-opacity)) !important; +} +.text-muted { + --bs-text-opacity: 1; + color: #888 !important; +} +.text-black-50 { + --bs-text-opacity: 1; + color: rgba(0, 0, 0, 0.5) !important; +} +.text-white-50 { + --bs-text-opacity: 1; + color: rgba(255, 255, 255, 0.5) !important; +} +.text-reset { + --bs-text-opacity: 1; + color: inherit !important; +} +.text-opacity-25 { + --bs-text-opacity: 0.25; +} +.text-opacity-50 { + --bs-text-opacity: 0.5; +} +.text-opacity-75 { + --bs-text-opacity: 0.75; +} +.text-opacity-100 { + --bs-text-opacity: 1; +} +.bg-primary { + --bs-bg-opacity: 1; + background-color: rgba( + var(--bs-primary-rgb), + var(--bs-bg-opacity) + ) !important; +} +.bg-secondary { + --bs-bg-opacity: 1; + background-color: rgba( + var(--bs-secondary-rgb), + var(--bs-bg-opacity) + ) !important; +} +.bg-success { + --bs-bg-opacity: 1; + background-color: rgba( + var(--bs-success-rgb), + var(--bs-bg-opacity) + ) !important; +} +.bg-info { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-info-rgb), var(--bs-bg-opacity)) !important; +} +.bg-warning { + --bs-bg-opacity: 1; + background-color: rgba( + var(--bs-warning-rgb), + var(--bs-bg-opacity) + ) !important; +} +.bg-danger { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-danger-rgb), var(--bs-bg-opacity)) !important; +} +.bg-light { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-light-rgb), var(--bs-bg-opacity)) !important; +} +.bg-dark { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-dark-rgb), var(--bs-bg-opacity)) !important; +} +.bg-black { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-black-rgb), var(--bs-bg-opacity)) !important; +} +.bg-white { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-white-rgb), var(--bs-bg-opacity)) !important; +} +.bg-body { + --bs-bg-opacity: 1; + background-color: rgba( + var(--bs-body-bg-rgb), + var(--bs-bg-opacity) + ) !important; +} +.bg-transparent { + --bs-bg-opacity: 1; + background-color: transparent !important; +} +.bg-opacity-10 { + --bs-bg-opacity: 0.1; +} +.bg-opacity-25 { + --bs-bg-opacity: 0.25; +} +.bg-opacity-50 { + --bs-bg-opacity: 0.5; +} +.bg-opacity-75 { + --bs-bg-opacity: 0.75; +} +.bg-opacity-100 { + --bs-bg-opacity: 1; +} +.bg-gradient { + background-image: var(--bs-gradient) !important; +} +.user-select-all { + -webkit-user-select: all !important; + -moz-user-select: all !important; + user-select: all !important; +} +.user-select-auto { + -webkit-user-select: auto !important; + -moz-user-select: auto !important; + user-select: auto !important; +} +.user-select-none { + -webkit-user-select: none !important; + -moz-user-select: none !important; + user-select: none !important; +} +.pe-none { + pointer-events: none !important; +} +.pe-auto { + pointer-events: auto !important; +} +.rounded { + border-radius: var(--bs-border-radius) !important; +} +.rounded-0 { + border-radius: 0 !important; +} +.rounded-1 { + border-radius: var(--bs-border-radius-sm) !important; +} +.rounded-2 { + border-radius: var(--bs-border-radius) !important; +} +.rounded-3 { + border-radius: var(--bs-border-radius-lg) !important; +} +.rounded-4 { + border-radius: var(--bs-border-radius-xl) !important; +} +.rounded-5 { + border-radius: var(--bs-border-radius-2xl) !important; +} +.rounded-circle { + border-radius: 50% !important; +} +.rounded-pill { + border-radius: var(--bs-border-radius-pill) !important; +} +.rounded-top { + border-top-left-radius: var(--bs-border-radius) !important; + border-top-right-radius: var(--bs-border-radius) !important; +} +.rounded-end { + border-top-right-radius: var(--bs-border-radius) !important; + border-bottom-right-radius: var(--bs-border-radius) !important; +} +.rounded-bottom { + border-bottom-right-radius: var(--bs-border-radius) !important; + border-bottom-left-radius: var(--bs-border-radius) !important; +} +.rounded-start { + border-bottom-left-radius: var(--bs-border-radius) !important; + border-top-left-radius: var(--bs-border-radius) !important; +} +.visible { + visibility: visible !important; +} +.invisible { + visibility: hidden !important; +} +@media (min-width: 576px) { + .float-sm-start { + float: left !important; + } + .float-sm-end { + float: right !important; + } + .float-sm-none { + float: none !important; + } + .d-sm-inline { + display: inline !important; + } + .d-sm-inline-block { + display: inline-block !important; + } + .d-sm-block { + display: block !important; + } + .d-sm-grid { + display: grid !important; + } + .d-sm-table { + display: table !important; + } + .d-sm-table-row { + display: table-row !important; + } + .d-sm-table-cell { + display: table-cell !important; + } + .d-sm-flex { + display: flex !important; + } + .d-sm-inline-flex { + display: inline-flex !important; + } + .d-sm-none { + display: none !important; + } + .flex-sm-fill { + flex: 1 1 auto !important; + } + .flex-sm-row { + flex-direction: row !important; + } + .flex-sm-column { + flex-direction: column !important; + } + .flex-sm-row-reverse { + flex-direction: row-reverse !important; + } + .flex-sm-column-reverse { + flex-direction: column-reverse !important; + } + .flex-sm-grow-0 { + flex-grow: 0 !important; + } + .flex-sm-grow-1 { + flex-grow: 1 !important; + } + .flex-sm-shrink-0 { + flex-shrink: 0 !important; + } + .flex-sm-shrink-1 { + flex-shrink: 1 !important; + } + .flex-sm-wrap { + flex-wrap: wrap !important; + } + .flex-sm-nowrap { + flex-wrap: nowrap !important; + } + .flex-sm-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + .justify-content-sm-start { + justify-content: flex-start !important; + } + .justify-content-sm-end { + justify-content: flex-end !important; + } + .justify-content-sm-center { + justify-content: center !important; + } + .justify-content-sm-between { + justify-content: space-between !important; + } + .justify-content-sm-around { + justify-content: space-around !important; + } + .justify-content-sm-evenly { + justify-content: space-evenly !important; + } + .align-items-sm-start { + align-items: flex-start !important; + } + .align-items-sm-end { + align-items: flex-end !important; + } + .align-items-sm-center { + align-items: center !important; + } + .align-items-sm-baseline { + align-items: baseline !important; + } + .align-items-sm-stretch { + align-items: stretch !important; + } + .align-content-sm-start { + align-content: flex-start !important; + } + .align-content-sm-end { + align-content: flex-end !important; + } + .align-content-sm-center { + align-content: center !important; + } + .align-content-sm-between { + align-content: space-between !important; + } + .align-content-sm-around { + align-content: space-around !important; + } + .align-content-sm-stretch { + align-content: stretch !important; + } + .align-self-sm-auto { + align-self: auto !important; + } + .align-self-sm-start { + align-self: flex-start !important; + } + .align-self-sm-end { + align-self: flex-end !important; + } + .align-self-sm-center { + align-self: center !important; + } + .align-self-sm-baseline { + align-self: baseline !important; + } + .align-self-sm-stretch { + align-self: stretch !important; + } + .order-sm-first { + order: -1 !important; + } + .order-sm-0 { + order: 0 !important; + } + .order-sm-1 { + order: 1 !important; + } + .order-sm-2 { + order: 2 !important; + } + .order-sm-3 { + order: 3 !important; + } + .order-sm-4 { + order: 4 !important; + } + .order-sm-5 { + order: 5 !important; + } + .order-sm-last { + order: 6 !important; + } + .m-sm-0 { + margin: 0 !important; + } + .m-sm-1 { + margin: 0.25rem !important; + } + .m-sm-2 { + margin: 0.5rem !important; + } + .m-sm-3 { + margin: 1rem !important; + } + .m-sm-4 { + margin: 1.5rem !important; + } + .m-sm-5 { + margin: 3rem !important; + } + .m-sm-auto { + margin: auto !important; + } + .mx-sm-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + .mx-sm-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + .mx-sm-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + .mx-sm-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + .mx-sm-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + .mx-sm-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + .mx-sm-auto { + margin-right: auto !important; + margin-left: auto !important; + } + .my-sm-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + .my-sm-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + .my-sm-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + .my-sm-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + .my-sm-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + .my-sm-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + .my-sm-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + .mt-sm-0 { + margin-top: 0 !important; + } + .mt-sm-1 { + margin-top: 0.25rem !important; + } + .mt-sm-2 { + margin-top: 0.5rem !important; + } + .mt-sm-3 { + margin-top: 1rem !important; + } + .mt-sm-4 { + margin-top: 1.5rem !important; + } + .mt-sm-5 { + margin-top: 3rem !important; + } + .mt-sm-auto { + margin-top: auto !important; + } + .me-sm-0 { + margin-right: 0 !important; + } + .me-sm-1 { + margin-right: 0.25rem !important; + } + .me-sm-2 { + margin-right: 0.5rem !important; + } + .me-sm-3 { + margin-right: 1rem !important; + } + .me-sm-4 { + margin-right: 1.5rem !important; + } + .me-sm-5 { + margin-right: 3rem !important; + } + .me-sm-auto { + margin-right: auto !important; + } + .mb-sm-0 { + margin-bottom: 0 !important; + } + .mb-sm-1 { + margin-bottom: 0.25rem !important; + } + .mb-sm-2 { + margin-bottom: 0.5rem !important; + } + .mb-sm-3 { + margin-bottom: 1rem !important; + } + .mb-sm-4 { + margin-bottom: 1.5rem !important; + } + .mb-sm-5 { + margin-bottom: 3rem !important; + } + .mb-sm-auto { + margin-bottom: auto !important; + } + .ms-sm-0 { + margin-left: 0 !important; + } + .ms-sm-1 { + margin-left: 0.25rem !important; + } + .ms-sm-2 { + margin-left: 0.5rem !important; + } + .ms-sm-3 { + margin-left: 1rem !important; + } + .ms-sm-4 { + margin-left: 1.5rem !important; + } + .ms-sm-5 { + margin-left: 3rem !important; + } + .ms-sm-auto { + margin-left: auto !important; + } + .p-sm-0 { + padding: 0 !important; + } + .p-sm-1 { + padding: 0.25rem !important; + } + .p-sm-2 { + padding: 0.5rem !important; + } + .p-sm-3 { + padding: 1rem !important; + } + .p-sm-4 { + padding: 1.5rem !important; + } + .p-sm-5 { + padding: 3rem !important; + } + .px-sm-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + .px-sm-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + .px-sm-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + .px-sm-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + .px-sm-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + .px-sm-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + .py-sm-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + .py-sm-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + .py-sm-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + .py-sm-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + .py-sm-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + .py-sm-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + .pt-sm-0 { + padding-top: 0 !important; + } + .pt-sm-1 { + padding-top: 0.25rem !important; + } + .pt-sm-2 { + padding-top: 0.5rem !important; + } + .pt-sm-3 { + padding-top: 1rem !important; + } + .pt-sm-4 { + padding-top: 1.5rem !important; + } + .pt-sm-5 { + padding-top: 3rem !important; + } + .pe-sm-0 { + padding-right: 0 !important; + } + .pe-sm-1 { + padding-right: 0.25rem !important; + } + .pe-sm-2 { + padding-right: 0.5rem !important; + } + .pe-sm-3 { + padding-right: 1rem !important; + } + .pe-sm-4 { + padding-right: 1.5rem !important; + } + .pe-sm-5 { + padding-right: 3rem !important; + } + .pb-sm-0 { + padding-bottom: 0 !important; + } + .pb-sm-1 { + padding-bottom: 0.25rem !important; + } + .pb-sm-2 { + padding-bottom: 0.5rem !important; + } + .pb-sm-3 { + padding-bottom: 1rem !important; + } + .pb-sm-4 { + padding-bottom: 1.5rem !important; + } + .pb-sm-5 { + padding-bottom: 3rem !important; + } + .ps-sm-0 { + padding-left: 0 !important; + } + .ps-sm-1 { + padding-left: 0.25rem !important; + } + .ps-sm-2 { + padding-left: 0.5rem !important; + } + .ps-sm-3 { + padding-left: 1rem !important; + } + .ps-sm-4 { + padding-left: 1.5rem !important; + } + .ps-sm-5 { + padding-left: 3rem !important; + } + .gap-sm-0 { + gap: 0 !important; + } + .gap-sm-1 { + gap: 0.25rem !important; + } + .gap-sm-2 { + gap: 0.5rem !important; + } + .gap-sm-3 { + gap: 1rem !important; + } + .gap-sm-4 { + gap: 1.5rem !important; + } + .gap-sm-5 { + gap: 3rem !important; + } + .text-sm-start { + text-align: left !important; + } + .text-sm-end { + text-align: right !important; + } + .text-sm-center { + text-align: center !important; + } +} +@media (min-width: 768px) { + .float-md-start { + float: left !important; + } + .float-md-end { + float: right !important; + } + .float-md-none { + float: none !important; + } + .d-md-inline { + display: inline !important; + } + .d-md-inline-block { + display: inline-block !important; + } + .d-md-block { + display: block !important; + } + .d-md-grid { + display: grid !important; + } + .d-md-table { + display: table !important; + } + .d-md-table-row { + display: table-row !important; + } + .d-md-table-cell { + display: table-cell !important; + } + .d-md-flex { + display: flex !important; + } + .d-md-inline-flex { + display: inline-flex !important; + } + .d-md-none { + display: none !important; + } + .flex-md-fill { + flex: 1 1 auto !important; + } + .flex-md-row { + flex-direction: row !important; + } + .flex-md-column { + flex-direction: column !important; + } + .flex-md-row-reverse { + flex-direction: row-reverse !important; + } + .flex-md-column-reverse { + flex-direction: column-reverse !important; + } + .flex-md-grow-0 { + flex-grow: 0 !important; + } + .flex-md-grow-1 { + flex-grow: 1 !important; + } + .flex-md-shrink-0 { + flex-shrink: 0 !important; + } + .flex-md-shrink-1 { + flex-shrink: 1 !important; + } + .flex-md-wrap { + flex-wrap: wrap !important; + } + .flex-md-nowrap { + flex-wrap: nowrap !important; + } + .flex-md-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + .justify-content-md-start { + justify-content: flex-start !important; + } + .justify-content-md-end { + justify-content: flex-end !important; + } + .justify-content-md-center { + justify-content: center !important; + } + .justify-content-md-between { + justify-content: space-between !important; + } + .justify-content-md-around { + justify-content: space-around !important; + } + .justify-content-md-evenly { + justify-content: space-evenly !important; + } + .align-items-md-start { + align-items: flex-start !important; + } + .align-items-md-end { + align-items: flex-end !important; + } + .align-items-md-center { + align-items: center !important; + } + .align-items-md-baseline { + align-items: baseline !important; + } + .align-items-md-stretch { + align-items: stretch !important; + } + .align-content-md-start { + align-content: flex-start !important; + } + .align-content-md-end { + align-content: flex-end !important; + } + .align-content-md-center { + align-content: center !important; + } + .align-content-md-between { + align-content: space-between !important; + } + .align-content-md-around { + align-content: space-around !important; + } + .align-content-md-stretch { + align-content: stretch !important; + } + .align-self-md-auto { + align-self: auto !important; + } + .align-self-md-start { + align-self: flex-start !important; + } + .align-self-md-end { + align-self: flex-end !important; + } + .align-self-md-center { + align-self: center !important; + } + .align-self-md-baseline { + align-self: baseline !important; + } + .align-self-md-stretch { + align-self: stretch !important; + } + .order-md-first { + order: -1 !important; + } + .order-md-0 { + order: 0 !important; + } + .order-md-1 { + order: 1 !important; + } + .order-md-2 { + order: 2 !important; + } + .order-md-3 { + order: 3 !important; + } + .order-md-4 { + order: 4 !important; + } + .order-md-5 { + order: 5 !important; + } + .order-md-last { + order: 6 !important; + } + .m-md-0 { + margin: 0 !important; + } + .m-md-1 { + margin: 0.25rem !important; + } + .m-md-2 { + margin: 0.5rem !important; + } + .m-md-3 { + margin: 1rem !important; + } + .m-md-4 { + margin: 1.5rem !important; + } + .m-md-5 { + margin: 3rem !important; + } + .m-md-auto { + margin: auto !important; + } + .mx-md-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + .mx-md-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + .mx-md-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + .mx-md-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + .mx-md-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + .mx-md-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + .mx-md-auto { + margin-right: auto !important; + margin-left: auto !important; + } + .my-md-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + .my-md-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + .my-md-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + .my-md-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + .my-md-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + .my-md-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + .my-md-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + .mt-md-0 { + margin-top: 0 !important; + } + .mt-md-1 { + margin-top: 0.25rem !important; + } + .mt-md-2 { + margin-top: 0.5rem !important; + } + .mt-md-3 { + margin-top: 1rem !important; + } + .mt-md-4 { + margin-top: 1.5rem !important; + } + .mt-md-5 { + margin-top: 3rem !important; + } + .mt-md-auto { + margin-top: auto !important; + } + .me-md-0 { + margin-right: 0 !important; + } + .me-md-1 { + margin-right: 0.25rem !important; + } + .me-md-2 { + margin-right: 0.5rem !important; + } + .me-md-3 { + margin-right: 1rem !important; + } + .me-md-4 { + margin-right: 1.5rem !important; + } + .me-md-5 { + margin-right: 3rem !important; + } + .me-md-auto { + margin-right: auto !important; + } + .mb-md-0 { + margin-bottom: 0 !important; + } + .mb-md-1 { + margin-bottom: 0.25rem !important; + } + .mb-md-2 { + margin-bottom: 0.5rem !important; + } + .mb-md-3 { + margin-bottom: 1rem !important; + } + .mb-md-4 { + margin-bottom: 1.5rem !important; + } + .mb-md-5 { + margin-bottom: 3rem !important; + } + .mb-md-auto { + margin-bottom: auto !important; + } + .ms-md-0 { + margin-left: 0 !important; + } + .ms-md-1 { + margin-left: 0.25rem !important; + } + .ms-md-2 { + margin-left: 0.5rem !important; + } + .ms-md-3 { + margin-left: 1rem !important; + } + .ms-md-4 { + margin-left: 1.5rem !important; + } + .ms-md-5 { + margin-left: 3rem !important; + } + .ms-md-auto { + margin-left: auto !important; + } + .p-md-0 { + padding: 0 !important; + } + .p-md-1 { + padding: 0.25rem !important; + } + .p-md-2 { + padding: 0.5rem !important; + } + .p-md-3 { + padding: 1rem !important; + } + .p-md-4 { + padding: 1.5rem !important; + } + .p-md-5 { + padding: 3rem !important; + } + .px-md-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + .px-md-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + .px-md-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + .px-md-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + .px-md-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + .px-md-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + .py-md-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + .py-md-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + .py-md-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + .py-md-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + .py-md-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + .py-md-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + .pt-md-0 { + padding-top: 0 !important; + } + .pt-md-1 { + padding-top: 0.25rem !important; + } + .pt-md-2 { + padding-top: 0.5rem !important; + } + .pt-md-3 { + padding-top: 1rem !important; + } + .pt-md-4 { + padding-top: 1.5rem !important; + } + .pt-md-5 { + padding-top: 3rem !important; + } + .pe-md-0 { + padding-right: 0 !important; + } + .pe-md-1 { + padding-right: 0.25rem !important; + } + .pe-md-2 { + padding-right: 0.5rem !important; + } + .pe-md-3 { + padding-right: 1rem !important; + } + .pe-md-4 { + padding-right: 1.5rem !important; + } + .pe-md-5 { + padding-right: 3rem !important; + } + .pb-md-0 { + padding-bottom: 0 !important; + } + .pb-md-1 { + padding-bottom: 0.25rem !important; + } + .pb-md-2 { + padding-bottom: 0.5rem !important; + } + .pb-md-3 { + padding-bottom: 1rem !important; + } + .pb-md-4 { + padding-bottom: 1.5rem !important; + } + .pb-md-5 { + padding-bottom: 3rem !important; + } + .ps-md-0 { + padding-left: 0 !important; + } + .ps-md-1 { + padding-left: 0.25rem !important; + } + .ps-md-2 { + padding-left: 0.5rem !important; + } + .ps-md-3 { + padding-left: 1rem !important; + } + .ps-md-4 { + padding-left: 1.5rem !important; + } + .ps-md-5 { + padding-left: 3rem !important; + } + .gap-md-0 { + gap: 0 !important; + } + .gap-md-1 { + gap: 0.25rem !important; + } + .gap-md-2 { + gap: 0.5rem !important; + } + .gap-md-3 { + gap: 1rem !important; + } + .gap-md-4 { + gap: 1.5rem !important; + } + .gap-md-5 { + gap: 3rem !important; + } + .text-md-start { + text-align: left !important; + } + .text-md-end { + text-align: right !important; + } + .text-md-center { + text-align: center !important; + } +} +@media (min-width: 992px) { + .float-lg-start { + float: left !important; + } + .float-lg-end { + float: right !important; + } + .float-lg-none { + float: none !important; + } + .d-lg-inline { + display: inline !important; + } + .d-lg-inline-block { + display: inline-block !important; + } + .d-lg-block { + display: block !important; + } + .d-lg-grid { + display: grid !important; + } + .d-lg-table { + display: table !important; + } + .d-lg-table-row { + display: table-row !important; + } + .d-lg-table-cell { + display: table-cell !important; + } + .d-lg-flex { + display: flex !important; + } + .d-lg-inline-flex { + display: inline-flex !important; + } + .d-lg-none { + display: none !important; + } + .flex-lg-fill { + flex: 1 1 auto !important; + } + .flex-lg-row { + flex-direction: row !important; + } + .flex-lg-column { + flex-direction: column !important; + } + .flex-lg-row-reverse { + flex-direction: row-reverse !important; + } + .flex-lg-column-reverse { + flex-direction: column-reverse !important; + } + .flex-lg-grow-0 { + flex-grow: 0 !important; + } + .flex-lg-grow-1 { + flex-grow: 1 !important; + } + .flex-lg-shrink-0 { + flex-shrink: 0 !important; + } + .flex-lg-shrink-1 { + flex-shrink: 1 !important; + } + .flex-lg-wrap { + flex-wrap: wrap !important; + } + .flex-lg-nowrap { + flex-wrap: nowrap !important; + } + .flex-lg-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + .justify-content-lg-start { + justify-content: flex-start !important; + } + .justify-content-lg-end { + justify-content: flex-end !important; + } + .justify-content-lg-center { + justify-content: center !important; + } + .justify-content-lg-between { + justify-content: space-between !important; + } + .justify-content-lg-around { + justify-content: space-around !important; + } + .justify-content-lg-evenly { + justify-content: space-evenly !important; + } + .align-items-lg-start { + align-items: flex-start !important; + } + .align-items-lg-end { + align-items: flex-end !important; + } + .align-items-lg-center { + align-items: center !important; + } + .align-items-lg-baseline { + align-items: baseline !important; + } + .align-items-lg-stretch { + align-items: stretch !important; + } + .align-content-lg-start { + align-content: flex-start !important; + } + .align-content-lg-end { + align-content: flex-end !important; + } + .align-content-lg-center { + align-content: center !important; + } + .align-content-lg-between { + align-content: space-between !important; + } + .align-content-lg-around { + align-content: space-around !important; + } + .align-content-lg-stretch { + align-content: stretch !important; + } + .align-self-lg-auto { + align-self: auto !important; + } + .align-self-lg-start { + align-self: flex-start !important; + } + .align-self-lg-end { + align-self: flex-end !important; + } + .align-self-lg-center { + align-self: center !important; + } + .align-self-lg-baseline { + align-self: baseline !important; + } + .align-self-lg-stretch { + align-self: stretch !important; + } + .order-lg-first { + order: -1 !important; + } + .order-lg-0 { + order: 0 !important; + } + .order-lg-1 { + order: 1 !important; + } + .order-lg-2 { + order: 2 !important; + } + .order-lg-3 { + order: 3 !important; + } + .order-lg-4 { + order: 4 !important; + } + .order-lg-5 { + order: 5 !important; + } + .order-lg-last { + order: 6 !important; + } + .m-lg-0 { + margin: 0 !important; + } + .m-lg-1 { + margin: 0.25rem !important; + } + .m-lg-2 { + margin: 0.5rem !important; + } + .m-lg-3 { + margin: 1rem !important; + } + .m-lg-4 { + margin: 1.5rem !important; + } + .m-lg-5 { + margin: 3rem !important; + } + .m-lg-auto { + margin: auto !important; + } + .mx-lg-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + .mx-lg-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + .mx-lg-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + .mx-lg-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + .mx-lg-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + .mx-lg-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + .mx-lg-auto { + margin-right: auto !important; + margin-left: auto !important; + } + .my-lg-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + .my-lg-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + .my-lg-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + .my-lg-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + .my-lg-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + .my-lg-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + .my-lg-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + .mt-lg-0 { + margin-top: 0 !important; + } + .mt-lg-1 { + margin-top: 0.25rem !important; + } + .mt-lg-2 { + margin-top: 0.5rem !important; + } + .mt-lg-3 { + margin-top: 1rem !important; + } + .mt-lg-4 { + margin-top: 1.5rem !important; + } + .mt-lg-5 { + margin-top: 3rem !important; + } + .mt-lg-auto { + margin-top: auto !important; + } + .me-lg-0 { + margin-right: 0 !important; + } + .me-lg-1 { + margin-right: 0.25rem !important; + } + .me-lg-2 { + margin-right: 0.5rem !important; + } + .me-lg-3 { + margin-right: 1rem !important; + } + .me-lg-4 { + margin-right: 1.5rem !important; + } + .me-lg-5 { + margin-right: 3rem !important; + } + .me-lg-auto { + margin-right: auto !important; + } + .mb-lg-0 { + margin-bottom: 0 !important; + } + .mb-lg-1 { + margin-bottom: 0.25rem !important; + } + .mb-lg-2 { + margin-bottom: 0.5rem !important; + } + .mb-lg-3 { + margin-bottom: 1rem !important; + } + .mb-lg-4 { + margin-bottom: 1.5rem !important; + } + .mb-lg-5 { + margin-bottom: 3rem !important; + } + .mb-lg-auto { + margin-bottom: auto !important; + } + .ms-lg-0 { + margin-left: 0 !important; + } + .ms-lg-1 { + margin-left: 0.25rem !important; + } + .ms-lg-2 { + margin-left: 0.5rem !important; + } + .ms-lg-3 { + margin-left: 1rem !important; + } + .ms-lg-4 { + margin-left: 1.5rem !important; + } + .ms-lg-5 { + margin-left: 3rem !important; + } + .ms-lg-auto { + margin-left: auto !important; + } + .p-lg-0 { + padding: 0 !important; + } + .p-lg-1 { + padding: 0.25rem !important; + } + .p-lg-2 { + padding: 0.5rem !important; + } + .p-lg-3 { + padding: 1rem !important; + } + .p-lg-4 { + padding: 1.5rem !important; + } + .p-lg-5 { + padding: 3rem !important; + } + .px-lg-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + .px-lg-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + .px-lg-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + .px-lg-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + .px-lg-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + .px-lg-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + .py-lg-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + .py-lg-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + .py-lg-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + .py-lg-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + .py-lg-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + .py-lg-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + .pt-lg-0 { + padding-top: 0 !important; + } + .pt-lg-1 { + padding-top: 0.25rem !important; + } + .pt-lg-2 { + padding-top: 0.5rem !important; + } + .pt-lg-3 { + padding-top: 1rem !important; + } + .pt-lg-4 { + padding-top: 1.5rem !important; + } + .pt-lg-5 { + padding-top: 3rem !important; + } + .pe-lg-0 { + padding-right: 0 !important; + } + .pe-lg-1 { + padding-right: 0.25rem !important; + } + .pe-lg-2 { + padding-right: 0.5rem !important; + } + .pe-lg-3 { + padding-right: 1rem !important; + } + .pe-lg-4 { + padding-right: 1.5rem !important; + } + .pe-lg-5 { + padding-right: 3rem !important; + } + .pb-lg-0 { + padding-bottom: 0 !important; + } + .pb-lg-1 { + padding-bottom: 0.25rem !important; + } + .pb-lg-2 { + padding-bottom: 0.5rem !important; + } + .pb-lg-3 { + padding-bottom: 1rem !important; + } + .pb-lg-4 { + padding-bottom: 1.5rem !important; + } + .pb-lg-5 { + padding-bottom: 3rem !important; + } + .ps-lg-0 { + padding-left: 0 !important; + } + .ps-lg-1 { + padding-left: 0.25rem !important; + } + .ps-lg-2 { + padding-left: 0.5rem !important; + } + .ps-lg-3 { + padding-left: 1rem !important; + } + .ps-lg-4 { + padding-left: 1.5rem !important; + } + .ps-lg-5 { + padding-left: 3rem !important; + } + .gap-lg-0 { + gap: 0 !important; + } + .gap-lg-1 { + gap: 0.25rem !important; + } + .gap-lg-2 { + gap: 0.5rem !important; + } + .gap-lg-3 { + gap: 1rem !important; + } + .gap-lg-4 { + gap: 1.5rem !important; + } + .gap-lg-5 { + gap: 3rem !important; + } + .text-lg-start { + text-align: left !important; + } + .text-lg-end { + text-align: right !important; + } + .text-lg-center { + text-align: center !important; + } +} +@media (min-width: 1200px) { + .float-xl-start { + float: left !important; + } + .float-xl-end { + float: right !important; + } + .float-xl-none { + float: none !important; + } + .d-xl-inline { + display: inline !important; + } + .d-xl-inline-block { + display: inline-block !important; + } + .d-xl-block { + display: block !important; + } + .d-xl-grid { + display: grid !important; + } + .d-xl-table { + display: table !important; + } + .d-xl-table-row { + display: table-row !important; + } + .d-xl-table-cell { + display: table-cell !important; + } + .d-xl-flex { + display: flex !important; + } + .d-xl-inline-flex { + display: inline-flex !important; + } + .d-xl-none { + display: none !important; + } + .flex-xl-fill { + flex: 1 1 auto !important; + } + .flex-xl-row { + flex-direction: row !important; + } + .flex-xl-column { + flex-direction: column !important; + } + .flex-xl-row-reverse { + flex-direction: row-reverse !important; + } + .flex-xl-column-reverse { + flex-direction: column-reverse !important; + } + .flex-xl-grow-0 { + flex-grow: 0 !important; + } + .flex-xl-grow-1 { + flex-grow: 1 !important; + } + .flex-xl-shrink-0 { + flex-shrink: 0 !important; + } + .flex-xl-shrink-1 { + flex-shrink: 1 !important; + } + .flex-xl-wrap { + flex-wrap: wrap !important; + } + .flex-xl-nowrap { + flex-wrap: nowrap !important; + } + .flex-xl-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + .justify-content-xl-start { + justify-content: flex-start !important; + } + .justify-content-xl-end { + justify-content: flex-end !important; + } + .justify-content-xl-center { + justify-content: center !important; + } + .justify-content-xl-between { + justify-content: space-between !important; + } + .justify-content-xl-around { + justify-content: space-around !important; + } + .justify-content-xl-evenly { + justify-content: space-evenly !important; + } + .align-items-xl-start { + align-items: flex-start !important; + } + .align-items-xl-end { + align-items: flex-end !important; + } + .align-items-xl-center { + align-items: center !important; + } + .align-items-xl-baseline { + align-items: baseline !important; + } + .align-items-xl-stretch { + align-items: stretch !important; + } + .align-content-xl-start { + align-content: flex-start !important; + } + .align-content-xl-end { + align-content: flex-end !important; + } + .align-content-xl-center { + align-content: center !important; + } + .align-content-xl-between { + align-content: space-between !important; + } + .align-content-xl-around { + align-content: space-around !important; + } + .align-content-xl-stretch { + align-content: stretch !important; + } + .align-self-xl-auto { + align-self: auto !important; + } + .align-self-xl-start { + align-self: flex-start !important; + } + .align-self-xl-end { + align-self: flex-end !important; + } + .align-self-xl-center { + align-self: center !important; + } + .align-self-xl-baseline { + align-self: baseline !important; + } + .align-self-xl-stretch { + align-self: stretch !important; + } + .order-xl-first { + order: -1 !important; + } + .order-xl-0 { + order: 0 !important; + } + .order-xl-1 { + order: 1 !important; + } + .order-xl-2 { + order: 2 !important; + } + .order-xl-3 { + order: 3 !important; + } + .order-xl-4 { + order: 4 !important; + } + .order-xl-5 { + order: 5 !important; + } + .order-xl-last { + order: 6 !important; + } + .m-xl-0 { + margin: 0 !important; + } + .m-xl-1 { + margin: 0.25rem !important; + } + .m-xl-2 { + margin: 0.5rem !important; + } + .m-xl-3 { + margin: 1rem !important; + } + .m-xl-4 { + margin: 1.5rem !important; + } + .m-xl-5 { + margin: 3rem !important; + } + .m-xl-auto { + margin: auto !important; + } + .mx-xl-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + .mx-xl-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + .mx-xl-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + .mx-xl-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + .mx-xl-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + .mx-xl-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + .mx-xl-auto { + margin-right: auto !important; + margin-left: auto !important; + } + .my-xl-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + .my-xl-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + .my-xl-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + .my-xl-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + .my-xl-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + .my-xl-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + .my-xl-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + .mt-xl-0 { + margin-top: 0 !important; + } + .mt-xl-1 { + margin-top: 0.25rem !important; + } + .mt-xl-2 { + margin-top: 0.5rem !important; + } + .mt-xl-3 { + margin-top: 1rem !important; + } + .mt-xl-4 { + margin-top: 1.5rem !important; + } + .mt-xl-5 { + margin-top: 3rem !important; + } + .mt-xl-auto { + margin-top: auto !important; + } + .me-xl-0 { + margin-right: 0 !important; + } + .me-xl-1 { + margin-right: 0.25rem !important; + } + .me-xl-2 { + margin-right: 0.5rem !important; + } + .me-xl-3 { + margin-right: 1rem !important; + } + .me-xl-4 { + margin-right: 1.5rem !important; + } + .me-xl-5 { + margin-right: 3rem !important; + } + .me-xl-auto { + margin-right: auto !important; + } + .mb-xl-0 { + margin-bottom: 0 !important; + } + .mb-xl-1 { + margin-bottom: 0.25rem !important; + } + .mb-xl-2 { + margin-bottom: 0.5rem !important; + } + .mb-xl-3 { + margin-bottom: 1rem !important; + } + .mb-xl-4 { + margin-bottom: 1.5rem !important; + } + .mb-xl-5 { + margin-bottom: 3rem !important; + } + .mb-xl-auto { + margin-bottom: auto !important; + } + .ms-xl-0 { + margin-left: 0 !important; + } + .ms-xl-1 { + margin-left: 0.25rem !important; + } + .ms-xl-2 { + margin-left: 0.5rem !important; + } + .ms-xl-3 { + margin-left: 1rem !important; + } + .ms-xl-4 { + margin-left: 1.5rem !important; + } + .ms-xl-5 { + margin-left: 3rem !important; + } + .ms-xl-auto { + margin-left: auto !important; + } + .p-xl-0 { + padding: 0 !important; + } + .p-xl-1 { + padding: 0.25rem !important; + } + .p-xl-2 { + padding: 0.5rem !important; + } + .p-xl-3 { + padding: 1rem !important; + } + .p-xl-4 { + padding: 1.5rem !important; + } + .p-xl-5 { + padding: 3rem !important; + } + .px-xl-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + .px-xl-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + .px-xl-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + .px-xl-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + .px-xl-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + .px-xl-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + .py-xl-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + .py-xl-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + .py-xl-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + .py-xl-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + .py-xl-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + .py-xl-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + .pt-xl-0 { + padding-top: 0 !important; + } + .pt-xl-1 { + padding-top: 0.25rem !important; + } + .pt-xl-2 { + padding-top: 0.5rem !important; + } + .pt-xl-3 { + padding-top: 1rem !important; + } + .pt-xl-4 { + padding-top: 1.5rem !important; + } + .pt-xl-5 { + padding-top: 3rem !important; + } + .pe-xl-0 { + padding-right: 0 !important; + } + .pe-xl-1 { + padding-right: 0.25rem !important; + } + .pe-xl-2 { + padding-right: 0.5rem !important; + } + .pe-xl-3 { + padding-right: 1rem !important; + } + .pe-xl-4 { + padding-right: 1.5rem !important; + } + .pe-xl-5 { + padding-right: 3rem !important; + } + .pb-xl-0 { + padding-bottom: 0 !important; + } + .pb-xl-1 { + padding-bottom: 0.25rem !important; + } + .pb-xl-2 { + padding-bottom: 0.5rem !important; + } + .pb-xl-3 { + padding-bottom: 1rem !important; + } + .pb-xl-4 { + padding-bottom: 1.5rem !important; + } + .pb-xl-5 { + padding-bottom: 3rem !important; + } + .ps-xl-0 { + padding-left: 0 !important; + } + .ps-xl-1 { + padding-left: 0.25rem !important; + } + .ps-xl-2 { + padding-left: 0.5rem !important; + } + .ps-xl-3 { + padding-left: 1rem !important; + } + .ps-xl-4 { + padding-left: 1.5rem !important; + } + .ps-xl-5 { + padding-left: 3rem !important; + } + .gap-xl-0 { + gap: 0 !important; + } + .gap-xl-1 { + gap: 0.25rem !important; + } + .gap-xl-2 { + gap: 0.5rem !important; + } + .gap-xl-3 { + gap: 1rem !important; + } + .gap-xl-4 { + gap: 1.5rem !important; + } + .gap-xl-5 { + gap: 3rem !important; + } + .text-xl-start { + text-align: left !important; + } + .text-xl-end { + text-align: right !important; + } + .text-xl-center { + text-align: center !important; + } +} +@media (min-width: 1400px) { + .float-xxl-start { + float: left !important; + } + .float-xxl-end { + float: right !important; + } + .float-xxl-none { + float: none !important; + } + .d-xxl-inline { + display: inline !important; + } + .d-xxl-inline-block { + display: inline-block !important; + } + .d-xxl-block { + display: block !important; + } + .d-xxl-grid { + display: grid !important; + } + .d-xxl-table { + display: table !important; + } + .d-xxl-table-row { + display: table-row !important; + } + .d-xxl-table-cell { + display: table-cell !important; + } + .d-xxl-flex { + display: flex !important; + } + .d-xxl-inline-flex { + display: inline-flex !important; + } + .d-xxl-none { + display: none !important; + } + .flex-xxl-fill { + flex: 1 1 auto !important; + } + .flex-xxl-row { + flex-direction: row !important; + } + .flex-xxl-column { + flex-direction: column !important; + } + .flex-xxl-row-reverse { + flex-direction: row-reverse !important; + } + .flex-xxl-column-reverse { + flex-direction: column-reverse !important; + } + .flex-xxl-grow-0 { + flex-grow: 0 !important; + } + .flex-xxl-grow-1 { + flex-grow: 1 !important; + } + .flex-xxl-shrink-0 { + flex-shrink: 0 !important; + } + .flex-xxl-shrink-1 { + flex-shrink: 1 !important; + } + .flex-xxl-wrap { + flex-wrap: wrap !important; + } + .flex-xxl-nowrap { + flex-wrap: nowrap !important; + } + .flex-xxl-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + .justify-content-xxl-start { + justify-content: flex-start !important; + } + .justify-content-xxl-end { + justify-content: flex-end !important; + } + .justify-content-xxl-center { + justify-content: center !important; + } + .justify-content-xxl-between { + justify-content: space-between !important; + } + .justify-content-xxl-around { + justify-content: space-around !important; + } + .justify-content-xxl-evenly { + justify-content: space-evenly !important; + } + .align-items-xxl-start { + align-items: flex-start !important; + } + .align-items-xxl-end { + align-items: flex-end !important; + } + .align-items-xxl-center { + align-items: center !important; + } + .align-items-xxl-baseline { + align-items: baseline !important; + } + .align-items-xxl-stretch { + align-items: stretch !important; + } + .align-content-xxl-start { + align-content: flex-start !important; + } + .align-content-xxl-end { + align-content: flex-end !important; + } + .align-content-xxl-center { + align-content: center !important; + } + .align-content-xxl-between { + align-content: space-between !important; + } + .align-content-xxl-around { + align-content: space-around !important; + } + .align-content-xxl-stretch { + align-content: stretch !important; + } + .align-self-xxl-auto { + align-self: auto !important; + } + .align-self-xxl-start { + align-self: flex-start !important; + } + .align-self-xxl-end { + align-self: flex-end !important; + } + .align-self-xxl-center { + align-self: center !important; + } + .align-self-xxl-baseline { + align-self: baseline !important; + } + .align-self-xxl-stretch { + align-self: stretch !important; + } + .order-xxl-first { + order: -1 !important; + } + .order-xxl-0 { + order: 0 !important; + } + .order-xxl-1 { + order: 1 !important; + } + .order-xxl-2 { + order: 2 !important; + } + .order-xxl-3 { + order: 3 !important; + } + .order-xxl-4 { + order: 4 !important; + } + .order-xxl-5 { + order: 5 !important; + } + .order-xxl-last { + order: 6 !important; + } + .m-xxl-0 { + margin: 0 !important; + } + .m-xxl-1 { + margin: 0.25rem !important; + } + .m-xxl-2 { + margin: 0.5rem !important; + } + .m-xxl-3 { + margin: 1rem !important; + } + .m-xxl-4 { + margin: 1.5rem !important; + } + .m-xxl-5 { + margin: 3rem !important; + } + .m-xxl-auto { + margin: auto !important; + } + .mx-xxl-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + .mx-xxl-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + .mx-xxl-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + .mx-xxl-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + .mx-xxl-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + .mx-xxl-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + .mx-xxl-auto { + margin-right: auto !important; + margin-left: auto !important; + } + .my-xxl-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + .my-xxl-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + .my-xxl-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + .my-xxl-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + .my-xxl-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + .my-xxl-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + .my-xxl-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + .mt-xxl-0 { + margin-top: 0 !important; + } + .mt-xxl-1 { + margin-top: 0.25rem !important; + } + .mt-xxl-2 { + margin-top: 0.5rem !important; + } + .mt-xxl-3 { + margin-top: 1rem !important; + } + .mt-xxl-4 { + margin-top: 1.5rem !important; + } + .mt-xxl-5 { + margin-top: 3rem !important; + } + .mt-xxl-auto { + margin-top: auto !important; + } + .me-xxl-0 { + margin-right: 0 !important; + } + .me-xxl-1 { + margin-right: 0.25rem !important; + } + .me-xxl-2 { + margin-right: 0.5rem !important; + } + .me-xxl-3 { + margin-right: 1rem !important; + } + .me-xxl-4 { + margin-right: 1.5rem !important; + } + .me-xxl-5 { + margin-right: 3rem !important; + } + .me-xxl-auto { + margin-right: auto !important; + } + .mb-xxl-0 { + margin-bottom: 0 !important; + } + .mb-xxl-1 { + margin-bottom: 0.25rem !important; + } + .mb-xxl-2 { + margin-bottom: 0.5rem !important; + } + .mb-xxl-3 { + margin-bottom: 1rem !important; + } + .mb-xxl-4 { + margin-bottom: 1.5rem !important; + } + .mb-xxl-5 { + margin-bottom: 3rem !important; + } + .mb-xxl-auto { + margin-bottom: auto !important; + } + .ms-xxl-0 { + margin-left: 0 !important; + } + .ms-xxl-1 { + margin-left: 0.25rem !important; + } + .ms-xxl-2 { + margin-left: 0.5rem !important; + } + .ms-xxl-3 { + margin-left: 1rem !important; + } + .ms-xxl-4 { + margin-left: 1.5rem !important; + } + .ms-xxl-5 { + margin-left: 3rem !important; + } + .ms-xxl-auto { + margin-left: auto !important; + } + .p-xxl-0 { + padding: 0 !important; + } + .p-xxl-1 { + padding: 0.25rem !important; + } + .p-xxl-2 { + padding: 0.5rem !important; + } + .p-xxl-3 { + padding: 1rem !important; + } + .p-xxl-4 { + padding: 1.5rem !important; + } + .p-xxl-5 { + padding: 3rem !important; + } + .px-xxl-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + .px-xxl-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + .px-xxl-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + .px-xxl-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + .px-xxl-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + .px-xxl-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + .py-xxl-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + .py-xxl-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + .py-xxl-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + .py-xxl-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + .py-xxl-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + .py-xxl-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + .pt-xxl-0 { + padding-top: 0 !important; + } + .pt-xxl-1 { + padding-top: 0.25rem !important; + } + .pt-xxl-2 { + padding-top: 0.5rem !important; + } + .pt-xxl-3 { + padding-top: 1rem !important; + } + .pt-xxl-4 { + padding-top: 1.5rem !important; + } + .pt-xxl-5 { + padding-top: 3rem !important; + } + .pe-xxl-0 { + padding-right: 0 !important; + } + .pe-xxl-1 { + padding-right: 0.25rem !important; + } + .pe-xxl-2 { + padding-right: 0.5rem !important; + } + .pe-xxl-3 { + padding-right: 1rem !important; + } + .pe-xxl-4 { + padding-right: 1.5rem !important; + } + .pe-xxl-5 { + padding-right: 3rem !important; + } + .pb-xxl-0 { + padding-bottom: 0 !important; + } + .pb-xxl-1 { + padding-bottom: 0.25rem !important; + } + .pb-xxl-2 { + padding-bottom: 0.5rem !important; + } + .pb-xxl-3 { + padding-bottom: 1rem !important; + } + .pb-xxl-4 { + padding-bottom: 1.5rem !important; + } + .pb-xxl-5 { + padding-bottom: 3rem !important; + } + .ps-xxl-0 { + padding-left: 0 !important; + } + .ps-xxl-1 { + padding-left: 0.25rem !important; + } + .ps-xxl-2 { + padding-left: 0.5rem !important; + } + .ps-xxl-3 { + padding-left: 1rem !important; + } + .ps-xxl-4 { + padding-left: 1.5rem !important; + } + .ps-xxl-5 { + padding-left: 3rem !important; + } + .gap-xxl-0 { + gap: 0 !important; + } + .gap-xxl-1 { + gap: 0.25rem !important; + } + .gap-xxl-2 { + gap: 0.5rem !important; + } + .gap-xxl-3 { + gap: 1rem !important; + } + .gap-xxl-4 { + gap: 1.5rem !important; + } + .gap-xxl-5 { + gap: 3rem !important; + } + .text-xxl-start { + text-align: left !important; + } + .text-xxl-end { + text-align: right !important; + } + .text-xxl-center { + text-align: center !important; + } +} +@media (min-width: 1200px) { + .fs-1 { + font-size: 3rem !important; + } + .fs-2 { + font-size: 2.5rem !important; + } + .fs-3 { + font-size: 2rem !important; + } + .fs-4 { + font-size: 1.5rem !important; + } +} +@media print { + .d-print-inline { + display: inline !important; + } + .d-print-inline-block { + display: inline-block !important; + } + .d-print-block { + display: block !important; + } + .d-print-grid { + display: grid !important; + } + .d-print-table { + display: table !important; + } + .d-print-table-row { + display: table-row !important; + } + .d-print-table-cell { + display: table-cell !important; + } + .d-print-flex { + display: flex !important; + } + .d-print-inline-flex { + display: inline-flex !important; + } + .d-print-none { + display: none !important; + } +} +:root { + color-scheme: dark; +} +.blockquote-footer { + color: #888; +} +.form-control { + color-scheme: light; +} +.input-group-addon { + color: #fff; +} +.form-floating > label { + color: #444; +} +.nav-pills .nav-item.open .nav-link, +.nav-pills .nav-item.open .nav-link:focus, +.nav-pills .nav-item.open .nav-link:hover, +.nav-pills .nav-link, +.nav-pills .nav-link.active, +.nav-pills .nav-link.active:focus, +.nav-pills .nav-link.active:hover, +.nav-tabs .nav-item.open .nav-link, +.nav-tabs .nav-item.open .nav-link:focus, +.nav-tabs .nav-item.open .nav-link:hover, +.nav-tabs .nav-link, +.nav-tabs .nav-link.active, +.nav-tabs .nav-link.active:focus, +.nav-tabs .nav-link.active:hover { + color: #fff; +} +.breadcrumb a { + color: #fff; +} +.pagination a:hover { + text-decoration: none; +} +.alert { + color: #fff; + border: none; +} +.alert .alert-link, +.alert a { + color: #fff; + text-decoration: underline; +} +.alert-primary { + background-color: #375a7f; +} +.alert-secondary { + background-color: #444; +} +.alert-success { + background-color: #00bc8c; +} +.alert-info { + background-color: #3498db; +} +.alert-warning { + background-color: #f39c12; +} +.alert-danger { + background-color: #e74c3c; +} +.alert-light { + background-color: #adb5bd; +} +.alert-dark { + background-color: #303030; +} diff --git a/rootfs/usr/share/httpd/default/css/cookieconsent.css b/rootfs/usr/share/httpd/default/css/cookieconsent.css new file mode 100644 index 0000000..51666cf --- /dev/null +++ b/rootfs/usr/share/httpd/default/css/cookieconsent.css @@ -0,0 +1,275 @@ +.cc-window { + opacity: 1; + transition: opacity 1s ease; +} +.cc-window.cc-invisible { + opacity: 0; +} +.cc-animate.cc-revoke { + transition: transform 1s ease; +} +.cc-animate.cc-revoke.cc-top { + transform: translateY(-2em); +} +.cc-animate.cc-revoke.cc-bottom { + transform: translateY(2em); +} +.cc-animate.cc-revoke.cc-active.cc-bottom, +.cc-animate.cc-revoke.cc-active.cc-top, +.cc-revoke:hover { + transform: translateY(0); +} +.cc-grower { + max-height: 0; + overflow: hidden; + transition: max-height 1s; +} +.cc-link, +.cc-revoke:hover { + text-decoration: underline; +} +.cc-revoke, +.cc-window { + position: fixed; + overflow: hidden; + box-sizing: border-box; + font-family: Helvetica, Calibri, Arial, sans-serif; + font-size: 16px; + line-height: 1.5em; + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + z-index: 9999; +} +.cc-window.cc-static { + position: static; +} +.cc-window.cc-floating { + padding: 2em; + max-width: 24em; + -ms-flex-direction: column; + flex-direction: column; +} +.cc-window.cc-banner { + padding: 1em 1.8em; + width: 100%; + -ms-flex-direction: row; + flex-direction: row; +} +.cc-revoke { + padding: 0.5em; +} +.cc-header { + font-size: 18px; + font-weight: 700; +} +.cc-btn, +.cc-close, +.cc-link, +.cc-revoke { + cursor: pointer; +} +.cc-link { + opacity: 0.8; + display: inline-block; + padding: 0.2em; +} +.cc-link:hover { + opacity: 1; +} +.cc-link:active, +.cc-link:visited { + color: initial; +} +.cc-btn { + display: block; + padding: 0.4em 0.8em; + font-size: 0.9em; + font-weight: 700; + border-width: 2px; + border-style: solid; + text-align: center; + white-space: nowrap; +} +.cc-banner .cc-btn:last-child { + min-width: 140px; +} +.cc-highlight .cc-btn:first-child { + background-color: transparent; + border-color: transparent; +} +.cc-highlight .cc-btn:first-child:focus, +.cc-highlight .cc-btn:first-child:hover { + background-color: transparent; + text-decoration: underline; +} +.cc-close { + display: block; + position: absolute; + top: 0.5em; + right: 0.5em; + font-size: 1.6em; + opacity: 0.9; + line-height: 0.75; +} +.cc-close:focus, +.cc-close:hover { + opacity: 1; +} +.cc-revoke.cc-top { + top: 0; + left: 3em; + border-bottom-left-radius: 0.5em; + border-bottom-right-radius: 0.5em; +} +.cc-revoke.cc-bottom { + bottom: 0; + left: 3em; + border-top-left-radius: 0.5em; + border-top-right-radius: 0.5em; +} +.cc-revoke.cc-left { + left: 3em; + right: unset; +} +.cc-revoke.cc-right { + right: 3em; + left: unset; +} +.cc-top { + top: 1em; +} +.cc-left { + left: 1em; +} +.cc-right { + right: 1em; +} +.cc-bottom { + bottom: 1em; +} +.cc-floating > .cc-link { + margin-bottom: 1em; +} +.cc-floating .cc-message { + display: block; + margin-bottom: 1em; +} +.cc-window.cc-floating .cc-compliance { + -ms-flex: 1; + flex: 1; +} +.cc-window.cc-banner { + -ms-flex-align: center; + align-items: center; +} +.cc-banner.cc-top { + left: 0; + right: 0; + top: 0; +} +.cc-banner.cc-bottom { + left: 0; + right: 0; + bottom: 0; +} +.cc-banner .cc-message { + -ms-flex: 1; + flex: 1; +} +.cc-compliance { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-line-pack: justify; + align-content: space-between; +} +.cc-compliance > .cc-btn { + -ms-flex: 1; + flex: 1; +} +.cc-btn + .cc-btn { + margin-left: 0.5em; +} +@media print { + .cc-revoke, + .cc-window { + display: none; + } +} +@media screen and (max-width: 900px) { + .cc-btn { + white-space: normal; + } +} +@media screen and (max-width: 414px) and (orientation: portrait), + screen and (max-width: 736px) and (orientation: landscape) { + .cc-window.cc-top { + top: 0; + } + .cc-window.cc-bottom { + bottom: 0; + } + .cc-window.cc-banner, + .cc-window.cc-left, + .cc-window.cc-right { + left: 0; + right: 0; + } + .cc-window.cc-banner { + -ms-flex-direction: column; + flex-direction: column; + } + .cc-window.cc-banner .cc-compliance { + -ms-flex: 1; + flex: 1; + } + .cc-window.cc-floating { + max-width: none; + } + .cc-window .cc-message { + margin-bottom: 1em; + } + .cc-window.cc-banner { + -ms-flex-align: unset; + align-items: unset; + } +} +.cc-floating.cc-theme-classic { + padding: 1.2em; + border-radius: 5px; +} +.cc-floating.cc-type-info.cc-theme-classic .cc-compliance { + text-align: center; + display: inline; + -ms-flex: none; + flex: none; +} +.cc-theme-classic .cc-btn { + border-radius: 5px; +} +.cc-theme-classic .cc-btn:last-child { + min-width: 140px; +} +.cc-floating.cc-type-info.cc-theme-classic .cc-btn { + display: inline-block; +} +.cc-theme-edgeless.cc-window { + padding: 0; +} +.cc-floating.cc-theme-edgeless .cc-message { + margin: 2em 2em 1.5em; +} +.cc-banner.cc-theme-edgeless .cc-btn { + margin: 0; + padding: 0.8em 1.8em; + height: 100%; +} +.cc-banner.cc-theme-edgeless .cc-message { + margin-left: 1em; +} +.cc-floating.cc-theme-edgeless .cc-btn + .cc-btn { + margin-left: 0; +} diff --git a/rootfs/usr/share/httpd/default/css/errorpages.css b/rootfs/usr/share/httpd/default/css/errorpages.css new file mode 100644 index 0000000..9a6e59c --- /dev/null +++ b/rootfs/usr/share/httpd/default/css/errorpages.css @@ -0,0 +1,337 @@ +@import url('https://fonts.googleapis.com/css?family=Fira+Sans&display=swap'); + +body { + padding: 50px; + font: 14px/1.5 Lato, 'Helvetica Neue', Helvetica, Arial, sans-serif; + color: #777; + font-weight: 300; + padding: 1.5em 0; +} + +/* Layout */ +.jumbotron { + line-height: 2.1428571435; + color: inherit; + padding: 10px 0px; +} + +/* Main marketing message and sign up button */ +.jumbotron { + text-align: center; + background-color: transparent; +} + +.jumbotron .btn { + font-size: 21px; + padding: 1.5em 2em; +} + +/* Everything but the jumbotron gets side spacing for mobile-first views */ +.masthead, +.body-content { + padding: 0 15px; +} + +/* Colors */ +.green { + color: green; +} + +.orange { + color: orange; +} + +.red { + color: red; +} + +.blue { + color: blue; +} + +.yellow { + color: yellow; +} + +h2, +h3, +h4, +h5, +h6 { + color: #222; + margin: 0 0 40px; +} + +p, +ul, +ol, +table, +pre, +dl { + margin: 0 0 20px; +} + +h2, +h3 { + line-height: 1.1; +} + +h1 { + line-height: 1.1; + text-align: center; + font: Lato; + font-size: 80px; + color: #222; + margin: 0 0 40px; +} + +h2 { + color: #393939; +} + +h3, +h4, +h5, +h6 { + color: #494949; +} + +a { + color: #39c; + font-weight: 400; + text-decoration: none; +} + +a small { + font-size: 11px; + color: #777; + margin-top: -0.6em; + display: block; +} + +.wrapper { + width: 860px; + margin: 0 auto; +} + +blockquote { + border-left: 1px solid #e5e5e5; + margin: 0; + padding: 0 0 0 20px; + font-style: italic; +} + +.btn-block { + width: 40%; + text-align: center; + display: block; + margin: 0 auto; +} + +code, +pre { + font-family: Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal; + color: #333; + font-size: 12px; +} + +pre { + padding: 8px 15px; + background: #f8f8f8; + border-radius: 5px; + border: 1px solid #e5e5e5; + overflow-x: auto; +} + +table { + width: 100%; + border-collapse: collapse; +} + +th, +td { + text-align: left; + padding: 5px 10px; + border-bottom: 1px solid #e5e5e5; +} + +dt { + color: #444; + font-weight: 700; +} + +th { + color: #444; +} + +img { + max-width: 100%; +} + +header { + width: 270px; + float: left; + position: fixed; +} + +header ul { + list-style: none; + height: 40px; + + padding: 0; + + background: #eee; + background: -moz-linear-gradient(top, #f8f8f8 0%, #dddddd 100%); + background: -webkit-gradient( + linear, + left top, + left bottom, + color-stop(0%, #f8f8f8), + color-stop(100%, #dddddd) + ); + background: -webkit-linear-gradient(top, #f8f8f8 0%, #dddddd 100%); + background: -o-linear-gradient(top, #f8f8f8 0%, #dddddd 100%); + background: -ms-linear-gradient(top, #f8f8f8 0%, #dddddd 100%); + background: linear-gradient(top, #f8f8f8 0%, #dddddd 100%); + + border-radius: 5px; + border: 1px solid #d2d2d2; + box-shadow: inset #fff 0 1px 0, inset rgba(0, 0, 0, 0.03) 0 -1px 0; + width: 270px; +} + +header li { + width: 89px; + float: left; + border-right: 1px solid #d2d2d2; + height: 40px; +} + +header ul a { + line-height: 1; + font-size: 11px; + color: #999; + display: block; + text-align: center; + padding-top: 6px; + height: 40px; +} + +strong { + color: #222; + font-weight: 700; +} + +header ul li + li { + width: 88px; + border-left: 1px solid #fff; +} + +header ul li + li + li { + border-right: none; + width: 89px; +} + +header ul a strong { + font-size: 14px; + display: block; + color: #222; +} + +section { + width: 500px; + float: right; + padding-bottom: 50px; +} + +small { + font-size: 11px; +} + +hr { + border: 0; + background: #e5e5e5; + height: 1px; + margin: 0 0 20px; +} + +footer { + width: 270px; + float: left; + position: fixed; + bottom: 50px; +} + +@media print, screen and (max-width: 960px) { + div.wrapper { + width: auto; + margin: 0; + } + + header, + section, + footer { + float: none; + position: static; + width: auto; + } + + header { + padding-right: 320px; + } + + section { + border: 1px solid #e5e5e5; + border-width: 1px 0; + padding: 20px 0; + margin: 0 0 20px; + } + + header a small { + display: inline; + } + + header ul { + position: absolute; + right: 50px; + top: 52px; + } +} + +@media print, screen and (max-width: 720px) { + body { + word-wrap: break-word; + } + + header { + padding: 0; + } + + header ul, + header p.view { + position: static; + } + + pre, + code { + word-wrap: normal; + } +} + +@media print, screen and (max-width: 480px) { + body { + padding: 15px; + } + + header ul { + display: none; + } +} + +@media print { + body { + padding: 0.4in; + font-size: 12pt; + color: #444; + } +} diff --git a/rootfs/usr/share/httpd/default/css/index.css b/rootfs/usr/share/httpd/default/css/index.css new file mode 100644 index 0000000..64f33c2 --- /dev/null +++ b/rootfs/usr/share/httpd/default/css/index.css @@ -0,0 +1,123 @@ +@import url('https://fonts.googleapis.com/css?family=Fira+Sans&display=swap'); + +td, +th, +body { + font-family: 'Fira Sans', Verdana, Helvetica, sans-serif; + font-size: 14px; + font-weight: normal; + font-variant: normal; + text-transform: none; + text-decoration: none; + text-align: center; + align-items: center; + background-color: #333; + color: #fff; + background-image: url('/images/bg.png'); +} + +th { + background-color: #333; + color: #ffffff; + border-top: 1px solid #678ca0; + vertical-align: middle; + height: 50px; +} + +td { + background-color: 333; + border-top: 1px solid #678ca0; +} + +.box { + border: 1px solid #678ca0; + padding: 0px; + width: 100%; + background-color: #333; + margin-bottom: 10px; + width: 600px; +} + +h5, +h3 { + padding: 3px; + margin-top: 0px; + margin-bottom: 0px; + background-color: #333; + color: white; + font-family: Verdana, Helvetica, sans-serif; +} + +p { + text-align: center; +} + +div { + text-align: center; +} + +h3 { + font-size: 13px; +} + +h5 { + font-size: 10px; + text-align: right; + background-color: #333; + color: #678ca0; +} + +.spacer { + margin: 0px; + width: 100%; + background-color: #333; +} + +.leftspacer { + margin: 0px; + padding: 5px; + width: 100%; + text-align: left; + background-color: #333; +} + +.serviceup { + color: green; +} + +.servicedown { + color: red; +} + +p.main { + margin-top: 5px; + margin-bottom: 5px; + text-align: center; + font-size: 10px; +} + +a { + text-decoration: none; + color: #5d83a9; +} + +a:visited { + color: rgb(238, 130, 202); +} + +a:hover { + font-style: italic; + color: #a296db !important; +} + +a:active { + color: #c0f; +} + +tr:hover { + background-color: #f5f5f5; +} + +table { + width: 100%; +} diff --git a/rootfs/usr/share/httpd/default/favicon.ico b/rootfs/usr/share/httpd/default/favicon.ico new file mode 120000 index 0000000..7cec0bd --- /dev/null +++ b/rootfs/usr/share/httpd/default/favicon.ico @@ -0,0 +1 @@ +./images/favicon.ico \ No newline at end of file diff --git a/rootfs/usr/share/httpd/default/images/403.png b/rootfs/usr/share/httpd/default/images/403.png new file mode 100644 index 0000000..2935697 Binary files /dev/null and b/rootfs/usr/share/httpd/default/images/403.png differ diff --git a/rootfs/usr/share/httpd/default/images/404.gif b/rootfs/usr/share/httpd/default/images/404.gif new file mode 100644 index 0000000..ad19c4e Binary files /dev/null and b/rootfs/usr/share/httpd/default/images/404.gif differ diff --git a/rootfs/usr/share/httpd/default/images/bg.png b/rootfs/usr/share/httpd/default/images/bg.png new file mode 100644 index 0000000..d10e5ca Binary files /dev/null and b/rootfs/usr/share/httpd/default/images/bg.png differ diff --git a/rootfs/usr/share/httpd/default/images/favicon.ico b/rootfs/usr/share/httpd/default/images/favicon.ico new file mode 100644 index 0000000..be74abd Binary files /dev/null and b/rootfs/usr/share/httpd/default/images/favicon.ico differ diff --git a/rootfs/usr/share/httpd/default/images/icon.png b/rootfs/usr/share/httpd/default/images/icon.png new file mode 100644 index 0000000..8a42581 Binary files /dev/null and b/rootfs/usr/share/httpd/default/images/icon.png differ diff --git a/rootfs/usr/share/httpd/default/images/icon.svg b/rootfs/usr/share/httpd/default/images/icon.svg new file mode 100644 index 0000000..f232922 --- /dev/null +++ b/rootfs/usr/share/httpd/default/images/icon.svg @@ -0,0 +1 @@ + diff --git a/rootfs/usr/share/httpd/default/index.php b/rootfs/usr/share/httpd/default/index.php new file mode 100644 index 0000000..bea273b --- /dev/null +++ b/rootfs/usr/share/httpd/default/index.php @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Congratulations

+

+ Your REPLACE_SERVER_SOFTWARE container has been setup.
+ This file is located in: +
+
+ SERVER: +
+ SERVER Address: +
+

+

+

+

+ + +
+ + + + diff --git a/rootfs/usr/share/httpd/default/info.php b/rootfs/usr/share/httpd/default/info.php new file mode 100644 index 0000000..77706da --- /dev/null +++ b/rootfs/usr/share/httpd/default/info.php @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+

Congratulations PHP has been successfully configured

+

+ +

+
+ + + diff --git a/rootfs/usr/share/httpd/default/js/app.js b/rootfs/usr/share/httpd/default/js/app.js new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/usr/share/httpd/default/js/bootstrap.min.js b/rootfs/usr/share/httpd/default/js/bootstrap.min.js new file mode 100644 index 0000000..641156c --- /dev/null +++ b/rootfs/usr/share/httpd/default/js/bootstrap.min.js @@ -0,0 +1,4075 @@ +/*! + * Bootstrap v5.1.3 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */ +!(function (t, e) { + 'object' == typeof exports && 'undefined' != typeof module + ? (module.exports = e()) + : 'function' == typeof define && define.amd + ? define(e) + : ((t = + 'undefined' != typeof globalThis ? globalThis : t || self).bootstrap = + e()); +})(this, function () { + 'use strict'; + const t = 'transitionend', + e = (t) => { + let e = t.getAttribute('data-bs-target'); + if (!e || '#' === e) { + let i = t.getAttribute('href'); + if (!i || (!i.includes('#') && !i.startsWith('.'))) return null; + i.includes('#') && !i.startsWith('#') && (i = `#${i.split('#')[1]}`), + (e = i && '#' !== i ? i.trim() : null); + } + return e; + }, + i = (t) => { + const i = e(t); + return i && document.querySelector(i) ? i : null; + }, + n = (t) => { + const i = e(t); + return i ? document.querySelector(i) : null; + }, + s = (e) => { + e.dispatchEvent(new Event(t)); + }, + o = (t) => + !(!t || 'object' != typeof t) && + (void 0 !== t.jquery && (t = t[0]), void 0 !== t.nodeType), + r = (t) => + o(t) + ? t.jquery + ? t[0] + : t + : 'string' == typeof t && t.length > 0 + ? document.querySelector(t) + : null, + a = (t, e, i) => { + Object.keys(i).forEach((n) => { + const s = i[n], + r = e[n], + a = + r && o(r) + ? 'element' + : null == (l = r) + ? `${l}` + : {}.toString + .call(l) + .match(/\s([a-z]+)/i)[1] + .toLowerCase(); + var l; + if (!new RegExp(s).test(a)) + throw new TypeError( + `${t.toUpperCase()}: Option "${n}" provided type "${a}" but expected type "${s}".` + ); + }); + }, + l = (t) => + !(!o(t) || 0 === t.getClientRects().length) && + 'visible' === getComputedStyle(t).getPropertyValue('visibility'), + c = (t) => + !t || + t.nodeType !== Node.ELEMENT_NODE || + !!t.classList.contains('disabled') || + (void 0 !== t.disabled + ? t.disabled + : t.hasAttribute('disabled') && 'false' !== t.getAttribute('disabled')), + h = (t) => { + if (!document.documentElement.attachShadow) return null; + if ('function' == typeof t.getRootNode) { + const e = t.getRootNode(); + return e instanceof ShadowRoot ? e : null; + } + return t instanceof ShadowRoot + ? t + : t.parentNode + ? h(t.parentNode) + : null; + }, + d = () => {}, + u = (t) => { + t.offsetHeight; + }, + f = () => { + const { jQuery: t } = window; + return t && !document.body.hasAttribute('data-bs-no-jquery') ? t : null; + }, + p = [], + m = () => 'rtl' === document.documentElement.dir, + g = (t) => { + var e; + (e = () => { + const e = f(); + if (e) { + const i = t.NAME, + n = e.fn[i]; + (e.fn[i] = t.jQueryInterface), + (e.fn[i].Constructor = t), + (e.fn[i].noConflict = () => ((e.fn[i] = n), t.jQueryInterface)); + } + }), + 'loading' === document.readyState + ? (p.length || + document.addEventListener('DOMContentLoaded', () => { + p.forEach((t) => t()); + }), + p.push(e)) + : e(); + }, + _ = (t) => { + 'function' == typeof t && t(); + }, + b = (e, i, n = !0) => { + if (!n) return void _(e); + const o = + ((t) => { + if (!t) return 0; + let { transitionDuration: e, transitionDelay: i } = + window.getComputedStyle(t); + const n = Number.parseFloat(e), + s = Number.parseFloat(i); + return n || s + ? ((e = e.split(',')[0]), + (i = i.split(',')[0]), + 1e3 * (Number.parseFloat(e) + Number.parseFloat(i))) + : 0; + })(i) + 5; + let r = !1; + const a = ({ target: n }) => { + n === i && ((r = !0), i.removeEventListener(t, a), _(e)); + }; + i.addEventListener(t, a), + setTimeout(() => { + r || s(i); + }, o); + }, + v = (t, e, i, n) => { + let s = t.indexOf(e); + if (-1 === s) return t[!i && n ? t.length - 1 : 0]; + const o = t.length; + return ( + (s += i ? 1 : -1), + n && (s = (s + o) % o), + t[Math.max(0, Math.min(s, o - 1))] + ); + }, + y = /[^.]*(?=\..*)\.|.*/, + w = /\..*/, + E = /::\d+$/, + A = {}; + let T = 1; + const O = { mouseenter: 'mouseover', mouseleave: 'mouseout' }, + C = /^(mouseenter|mouseleave)/i, + k = new Set([ + 'click', + 'dblclick', + 'mouseup', + 'mousedown', + 'contextmenu', + 'mousewheel', + 'DOMMouseScroll', + 'mouseover', + 'mouseout', + 'mousemove', + 'selectstart', + 'selectend', + 'keydown', + 'keypress', + 'keyup', + 'orientationchange', + 'touchstart', + 'touchmove', + 'touchend', + 'touchcancel', + 'pointerdown', + 'pointermove', + 'pointerup', + 'pointerleave', + 'pointercancel', + 'gesturestart', + 'gesturechange', + 'gestureend', + 'focus', + 'blur', + 'change', + 'reset', + 'select', + 'submit', + 'focusin', + 'focusout', + 'load', + 'unload', + 'beforeunload', + 'resize', + 'move', + 'DOMContentLoaded', + 'readystatechange', + 'error', + 'abort', + 'scroll', + ]); + function L(t, e) { + return (e && `${e}::${T++}`) || t.uidEvent || T++; + } + function x(t) { + const e = L(t); + return (t.uidEvent = e), (A[e] = A[e] || {}), A[e]; + } + function D(t, e, i = null) { + const n = Object.keys(t); + for (let s = 0, o = n.length; s < o; s++) { + const o = t[n[s]]; + if (o.originalHandler === e && o.delegationSelector === i) return o; + } + return null; + } + function S(t, e, i) { + const n = 'string' == typeof e, + s = n ? i : e; + let o = P(t); + return k.has(o) || (o = t), [n, s, o]; + } + function N(t, e, i, n, s) { + if ('string' != typeof e || !t) return; + if ((i || ((i = n), (n = null)), C.test(e))) { + const t = (t) => + function (e) { + if ( + !e.relatedTarget || + (e.relatedTarget !== e.delegateTarget && + !e.delegateTarget.contains(e.relatedTarget)) + ) + return t.call(this, e); + }; + n ? (n = t(n)) : (i = t(i)); + } + const [o, r, a] = S(e, i, n), + l = x(t), + c = l[a] || (l[a] = {}), + h = D(c, r, o ? i : null); + if (h) return void (h.oneOff = h.oneOff && s); + const d = L(r, e.replace(y, '')), + u = o + ? (function (t, e, i) { + return function n(s) { + const o = t.querySelectorAll(e); + for (let { target: r } = s; r && r !== this; r = r.parentNode) + for (let a = o.length; a--; ) + if (o[a] === r) + return ( + (s.delegateTarget = r), + n.oneOff && j.off(t, s.type, e, i), + i.apply(r, [s]) + ); + return null; + }; + })(t, i, n) + : (function (t, e) { + return function i(n) { + return ( + (n.delegateTarget = t), + i.oneOff && j.off(t, n.type, e), + e.apply(t, [n]) + ); + }; + })(t, i); + (u.delegationSelector = o ? i : null), + (u.originalHandler = r), + (u.oneOff = s), + (u.uidEvent = d), + (c[d] = u), + t.addEventListener(a, u, o); + } + function I(t, e, i, n, s) { + const o = D(e[i], n, s); + o && (t.removeEventListener(i, o, Boolean(s)), delete e[i][o.uidEvent]); + } + function P(t) { + return (t = t.replace(w, '')), O[t] || t; + } + const j = { + on(t, e, i, n) { + N(t, e, i, n, !1); + }, + one(t, e, i, n) { + N(t, e, i, n, !0); + }, + off(t, e, i, n) { + if ('string' != typeof e || !t) return; + const [s, o, r] = S(e, i, n), + a = r !== e, + l = x(t), + c = e.startsWith('.'); + if (void 0 !== o) { + if (!l || !l[r]) return; + return void I(t, l, r, o, s ? i : null); + } + c && + Object.keys(l).forEach((i) => { + !(function (t, e, i, n) { + const s = e[i] || {}; + Object.keys(s).forEach((o) => { + if (o.includes(n)) { + const n = s[o]; + I(t, e, i, n.originalHandler, n.delegationSelector); + } + }); + })(t, l, i, e.slice(1)); + }); + const h = l[r] || {}; + Object.keys(h).forEach((i) => { + const n = i.replace(E, ''); + if (!a || e.includes(n)) { + const e = h[i]; + I(t, l, r, e.originalHandler, e.delegationSelector); + } + }); + }, + trigger(t, e, i) { + if ('string' != typeof e || !t) return null; + const n = f(), + s = P(e), + o = e !== s, + r = k.has(s); + let a, + l = !0, + c = !0, + h = !1, + d = null; + return ( + o && + n && + ((a = n.Event(e, i)), + n(t).trigger(a), + (l = !a.isPropagationStopped()), + (c = !a.isImmediatePropagationStopped()), + (h = a.isDefaultPrevented())), + r + ? ((d = document.createEvent('HTMLEvents')), d.initEvent(s, l, !0)) + : (d = new CustomEvent(e, { bubbles: l, cancelable: !0 })), + void 0 !== i && + Object.keys(i).forEach((t) => { + Object.defineProperty(d, t, { get: () => i[t] }); + }), + h && d.preventDefault(), + c && t.dispatchEvent(d), + d.defaultPrevented && void 0 !== a && a.preventDefault(), + d + ); + }, + }, + M = new Map(), + H = { + set(t, e, i) { + M.has(t) || M.set(t, new Map()); + const n = M.get(t); + n.has(e) || 0 === n.size + ? n.set(e, i) + : console.error( + `Bootstrap doesn't allow more than one instance per element. Bound instance: ${ + Array.from(n.keys())[0] + }.` + ); + }, + get: (t, e) => (M.has(t) && M.get(t).get(e)) || null, + remove(t, e) { + if (!M.has(t)) return; + const i = M.get(t); + i.delete(e), 0 === i.size && M.delete(t); + }, + }; + class B { + constructor(t) { + (t = r(t)) && + ((this._element = t), + H.set(this._element, this.constructor.DATA_KEY, this)); + } + dispose() { + H.remove(this._element, this.constructor.DATA_KEY), + j.off(this._element, this.constructor.EVENT_KEY), + Object.getOwnPropertyNames(this).forEach((t) => { + this[t] = null; + }); + } + _queueCallback(t, e, i = !0) { + b(t, e, i); + } + static getInstance(t) { + return H.get(r(t), this.DATA_KEY); + } + static getOrCreateInstance(t, e = {}) { + return ( + this.getInstance(t) || new this(t, 'object' == typeof e ? e : null) + ); + } + static get VERSION() { + return '5.1.3'; + } + static get NAME() { + throw new Error( + 'You have to implement the static method "NAME", for each component!' + ); + } + static get DATA_KEY() { + return `bs.${this.NAME}`; + } + static get EVENT_KEY() { + return `.${this.DATA_KEY}`; + } + } + const R = (t, e = 'hide') => { + const i = `click.dismiss${t.EVENT_KEY}`, + s = t.NAME; + j.on(document, i, `[data-bs-dismiss="${s}"]`, function (i) { + if ((['A', 'AREA'].includes(this.tagName) && i.preventDefault(), c(this))) + return; + const o = n(this) || this.closest(`.${s}`); + t.getOrCreateInstance(o)[e](); + }); + }; + class W extends B { + static get NAME() { + return 'alert'; + } + close() { + if (j.trigger(this._element, 'close.bs.alert').defaultPrevented) return; + this._element.classList.remove('show'); + const t = this._element.classList.contains('fade'); + this._queueCallback(() => this._destroyElement(), this._element, t); + } + _destroyElement() { + this._element.remove(), + j.trigger(this._element, 'closed.bs.alert'), + this.dispose(); + } + static jQueryInterface(t) { + return this.each(function () { + const e = W.getOrCreateInstance(this); + if ('string' == typeof t) { + if (void 0 === e[t] || t.startsWith('_') || 'constructor' === t) + throw new TypeError(`No method named "${t}"`); + e[t](this); + } + }); + } + } + R(W, 'close'), g(W); + const $ = '[data-bs-toggle="button"]'; + class z extends B { + static get NAME() { + return 'button'; + } + toggle() { + this._element.setAttribute( + 'aria-pressed', + this._element.classList.toggle('active') + ); + } + static jQueryInterface(t) { + return this.each(function () { + const e = z.getOrCreateInstance(this); + 'toggle' === t && e[t](); + }); + } + } + function q(t) { + return ( + 'true' === t || + ('false' !== t && + (t === Number(t).toString() + ? Number(t) + : '' === t || 'null' === t + ? null + : t)) + ); + } + function F(t) { + return t.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`); + } + j.on(document, 'click.bs.button.data-api', $, (t) => { + t.preventDefault(); + const e = t.target.closest($); + z.getOrCreateInstance(e).toggle(); + }), + g(z); + const U = { + setDataAttribute(t, e, i) { + t.setAttribute(`data-bs-${F(e)}`, i); + }, + removeDataAttribute(t, e) { + t.removeAttribute(`data-bs-${F(e)}`); + }, + getDataAttributes(t) { + if (!t) return {}; + const e = {}; + return ( + Object.keys(t.dataset) + .filter((t) => t.startsWith('bs')) + .forEach((i) => { + let n = i.replace(/^bs/, ''); + (n = n.charAt(0).toLowerCase() + n.slice(1, n.length)), + (e[n] = q(t.dataset[i])); + }), + e + ); + }, + getDataAttribute: (t, e) => q(t.getAttribute(`data-bs-${F(e)}`)), + offset(t) { + const e = t.getBoundingClientRect(); + return { + top: e.top + window.pageYOffset, + left: e.left + window.pageXOffset, + }; + }, + position: (t) => ({ top: t.offsetTop, left: t.offsetLeft }), + }, + V = { + find: (t, e = document.documentElement) => + [].concat(...Element.prototype.querySelectorAll.call(e, t)), + findOne: (t, e = document.documentElement) => + Element.prototype.querySelector.call(e, t), + children: (t, e) => [].concat(...t.children).filter((t) => t.matches(e)), + parents(t, e) { + const i = []; + let n = t.parentNode; + for (; n && n.nodeType === Node.ELEMENT_NODE && 3 !== n.nodeType; ) + n.matches(e) && i.push(n), (n = n.parentNode); + return i; + }, + prev(t, e) { + let i = t.previousElementSibling; + for (; i; ) { + if (i.matches(e)) return [i]; + i = i.previousElementSibling; + } + return []; + }, + next(t, e) { + let i = t.nextElementSibling; + for (; i; ) { + if (i.matches(e)) return [i]; + i = i.nextElementSibling; + } + return []; + }, + focusableChildren(t) { + const e = [ + 'a', + 'button', + 'input', + 'textarea', + 'select', + 'details', + '[tabindex]', + '[contenteditable="true"]', + ] + .map((t) => `${t}:not([tabindex^="-"])`) + .join(', '); + return this.find(e, t).filter((t) => !c(t) && l(t)); + }, + }, + K = 'carousel', + X = { + interval: 5e3, + keyboard: !0, + slide: !1, + pause: 'hover', + wrap: !0, + touch: !0, + }, + Y = { + interval: '(number|boolean)', + keyboard: 'boolean', + slide: '(boolean|string)', + pause: '(string|boolean)', + wrap: 'boolean', + touch: 'boolean', + }, + Q = 'next', + G = 'prev', + Z = 'left', + J = 'right', + tt = { ArrowLeft: J, ArrowRight: Z }, + et = 'slid.bs.carousel', + it = 'active', + nt = '.active.carousel-item'; + class st extends B { + constructor(t, e) { + super(t), + (this._items = null), + (this._interval = null), + (this._activeElement = null), + (this._isPaused = !1), + (this._isSliding = !1), + (this.touchTimeout = null), + (this.touchStartX = 0), + (this.touchDeltaX = 0), + (this._config = this._getConfig(e)), + (this._indicatorsElement = V.findOne( + '.carousel-indicators', + this._element + )), + (this._touchSupported = + 'ontouchstart' in document.documentElement || + navigator.maxTouchPoints > 0), + (this._pointerEvent = Boolean(window.PointerEvent)), + this._addEventListeners(); + } + static get Default() { + return X; + } + static get NAME() { + return K; + } + next() { + this._slide(Q); + } + nextWhenVisible() { + !document.hidden && l(this._element) && this.next(); + } + prev() { + this._slide(G); + } + pause(t) { + t || (this._isPaused = !0), + V.findOne('.carousel-item-next, .carousel-item-prev', this._element) && + (s(this._element), this.cycle(!0)), + clearInterval(this._interval), + (this._interval = null); + } + cycle(t) { + t || (this._isPaused = !1), + this._interval && + (clearInterval(this._interval), (this._interval = null)), + this._config && + this._config.interval && + !this._isPaused && + (this._updateInterval(), + (this._interval = setInterval( + (document.visibilityState ? this.nextWhenVisible : this.next).bind( + this + ), + this._config.interval + ))); + } + to(t) { + this._activeElement = V.findOne(nt, this._element); + const e = this._getItemIndex(this._activeElement); + if (t > this._items.length - 1 || t < 0) return; + if (this._isSliding) + return void j.one(this._element, et, () => this.to(t)); + if (e === t) return this.pause(), void this.cycle(); + const i = t > e ? Q : G; + this._slide(i, this._items[t]); + } + _getConfig(t) { + return ( + (t = { + ...X, + ...U.getDataAttributes(this._element), + ...('object' == typeof t ? t : {}), + }), + a(K, t, Y), + t + ); + } + _handleSwipe() { + const t = Math.abs(this.touchDeltaX); + if (t <= 40) return; + const e = t / this.touchDeltaX; + (this.touchDeltaX = 0), e && this._slide(e > 0 ? J : Z); + } + _addEventListeners() { + this._config.keyboard && + j.on(this._element, 'keydown.bs.carousel', (t) => this._keydown(t)), + 'hover' === this._config.pause && + (j.on(this._element, 'mouseenter.bs.carousel', (t) => this.pause(t)), + j.on(this._element, 'mouseleave.bs.carousel', (t) => this.cycle(t))), + this._config.touch && + this._touchSupported && + this._addTouchEventListeners(); + } + _addTouchEventListeners() { + const t = (t) => + this._pointerEvent && + ('pen' === t.pointerType || 'touch' === t.pointerType), + e = (e) => { + t(e) + ? (this.touchStartX = e.clientX) + : this._pointerEvent || (this.touchStartX = e.touches[0].clientX); + }, + i = (t) => { + this.touchDeltaX = + t.touches && t.touches.length > 1 + ? 0 + : t.touches[0].clientX - this.touchStartX; + }, + n = (e) => { + t(e) && (this.touchDeltaX = e.clientX - this.touchStartX), + this._handleSwipe(), + 'hover' === this._config.pause && + (this.pause(), + this.touchTimeout && clearTimeout(this.touchTimeout), + (this.touchTimeout = setTimeout( + (t) => this.cycle(t), + 500 + this._config.interval + ))); + }; + V.find('.carousel-item img', this._element).forEach((t) => { + j.on(t, 'dragstart.bs.carousel', (t) => t.preventDefault()); + }), + this._pointerEvent + ? (j.on(this._element, 'pointerdown.bs.carousel', (t) => e(t)), + j.on(this._element, 'pointerup.bs.carousel', (t) => n(t)), + this._element.classList.add('pointer-event')) + : (j.on(this._element, 'touchstart.bs.carousel', (t) => e(t)), + j.on(this._element, 'touchmove.bs.carousel', (t) => i(t)), + j.on(this._element, 'touchend.bs.carousel', (t) => n(t))); + } + _keydown(t) { + if (/input|textarea/i.test(t.target.tagName)) return; + const e = tt[t.key]; + e && (t.preventDefault(), this._slide(e)); + } + _getItemIndex(t) { + return ( + (this._items = + t && t.parentNode ? V.find('.carousel-item', t.parentNode) : []), + this._items.indexOf(t) + ); + } + _getItemByOrder(t, e) { + const i = t === Q; + return v(this._items, e, i, this._config.wrap); + } + _triggerSlideEvent(t, e) { + const i = this._getItemIndex(t), + n = this._getItemIndex(V.findOne(nt, this._element)); + return j.trigger(this._element, 'slide.bs.carousel', { + relatedTarget: t, + direction: e, + from: n, + to: i, + }); + } + _setActiveIndicatorElement(t) { + if (this._indicatorsElement) { + const e = V.findOne('.active', this._indicatorsElement); + e.classList.remove(it), e.removeAttribute('aria-current'); + const i = V.find('[data-bs-target]', this._indicatorsElement); + for (let e = 0; e < i.length; e++) + if ( + Number.parseInt(i[e].getAttribute('data-bs-slide-to'), 10) === + this._getItemIndex(t) + ) { + i[e].classList.add(it), i[e].setAttribute('aria-current', 'true'); + break; + } + } + } + _updateInterval() { + const t = this._activeElement || V.findOne(nt, this._element); + if (!t) return; + const e = Number.parseInt(t.getAttribute('data-bs-interval'), 10); + e + ? ((this._config.defaultInterval = + this._config.defaultInterval || this._config.interval), + (this._config.interval = e)) + : (this._config.interval = + this._config.defaultInterval || this._config.interval); + } + _slide(t, e) { + const i = this._directionToOrder(t), + n = V.findOne(nt, this._element), + s = this._getItemIndex(n), + o = e || this._getItemByOrder(i, n), + r = this._getItemIndex(o), + a = Boolean(this._interval), + l = i === Q, + c = l ? 'carousel-item-start' : 'carousel-item-end', + h = l ? 'carousel-item-next' : 'carousel-item-prev', + d = this._orderToDirection(i); + if (o && o.classList.contains(it)) return void (this._isSliding = !1); + if (this._isSliding) return; + if (this._triggerSlideEvent(o, d).defaultPrevented) return; + if (!n || !o) return; + (this._isSliding = !0), + a && this.pause(), + this._setActiveIndicatorElement(o), + (this._activeElement = o); + const f = () => { + j.trigger(this._element, et, { + relatedTarget: o, + direction: d, + from: s, + to: r, + }); + }; + if (this._element.classList.contains('slide')) { + o.classList.add(h), u(o), n.classList.add(c), o.classList.add(c); + const t = () => { + o.classList.remove(c, h), + o.classList.add(it), + n.classList.remove(it, h, c), + (this._isSliding = !1), + setTimeout(f, 0); + }; + this._queueCallback(t, n, !0); + } else n.classList.remove(it), o.classList.add(it), (this._isSliding = !1), f(); + a && this.cycle(); + } + _directionToOrder(t) { + return [J, Z].includes(t) + ? m() + ? t === Z + ? G + : Q + : t === Z + ? Q + : G + : t; + } + _orderToDirection(t) { + return [Q, G].includes(t) + ? m() + ? t === G + ? Z + : J + : t === G + ? J + : Z + : t; + } + static carouselInterface(t, e) { + const i = st.getOrCreateInstance(t, e); + let { _config: n } = i; + 'object' == typeof e && (n = { ...n, ...e }); + const s = 'string' == typeof e ? e : n.slide; + if ('number' == typeof e) i.to(e); + else if ('string' == typeof s) { + if (void 0 === i[s]) throw new TypeError(`No method named "${s}"`); + i[s](); + } else n.interval && n.ride && (i.pause(), i.cycle()); + } + static jQueryInterface(t) { + return this.each(function () { + st.carouselInterface(this, t); + }); + } + static dataApiClickHandler(t) { + const e = n(this); + if (!e || !e.classList.contains('carousel')) return; + const i = { ...U.getDataAttributes(e), ...U.getDataAttributes(this) }, + s = this.getAttribute('data-bs-slide-to'); + s && (i.interval = !1), + st.carouselInterface(e, i), + s && st.getInstance(e).to(s), + t.preventDefault(); + } + } + j.on( + document, + 'click.bs.carousel.data-api', + '[data-bs-slide], [data-bs-slide-to]', + st.dataApiClickHandler + ), + j.on(window, 'load.bs.carousel.data-api', () => { + const t = V.find('[data-bs-ride="carousel"]'); + for (let e = 0, i = t.length; e < i; e++) + st.carouselInterface(t[e], st.getInstance(t[e])); + }), + g(st); + const ot = 'collapse', + rt = { toggle: !0, parent: null }, + at = { toggle: 'boolean', parent: '(null|element)' }, + lt = 'show', + ct = 'collapse', + ht = 'collapsing', + dt = 'collapsed', + ut = ':scope .collapse .collapse', + ft = '[data-bs-toggle="collapse"]'; + class pt extends B { + constructor(t, e) { + super(t), + (this._isTransitioning = !1), + (this._config = this._getConfig(e)), + (this._triggerArray = []); + const n = V.find(ft); + for (let t = 0, e = n.length; t < e; t++) { + const e = n[t], + s = i(e), + o = V.find(s).filter((t) => t === this._element); + null !== s && + o.length && + ((this._selector = s), this._triggerArray.push(e)); + } + this._initializeChildren(), + this._config.parent || + this._addAriaAndCollapsedClass(this._triggerArray, this._isShown()), + this._config.toggle && this.toggle(); + } + static get Default() { + return rt; + } + static get NAME() { + return ot; + } + toggle() { + this._isShown() ? this.hide() : this.show(); + } + show() { + if (this._isTransitioning || this._isShown()) return; + let t, + e = []; + if (this._config.parent) { + const t = V.find(ut, this._config.parent); + e = V.find( + '.collapse.show, .collapse.collapsing', + this._config.parent + ).filter((e) => !t.includes(e)); + } + const i = V.findOne(this._selector); + if (e.length) { + const n = e.find((t) => i !== t); + if (((t = n ? pt.getInstance(n) : null), t && t._isTransitioning)) + return; + } + if (j.trigger(this._element, 'show.bs.collapse').defaultPrevented) return; + e.forEach((e) => { + i !== e && pt.getOrCreateInstance(e, { toggle: !1 }).hide(), + t || H.set(e, 'bs.collapse', null); + }); + const n = this._getDimension(); + this._element.classList.remove(ct), + this._element.classList.add(ht), + (this._element.style[n] = 0), + this._addAriaAndCollapsedClass(this._triggerArray, !0), + (this._isTransitioning = !0); + const s = `scroll${n[0].toUpperCase() + n.slice(1)}`; + this._queueCallback( + () => { + (this._isTransitioning = !1), + this._element.classList.remove(ht), + this._element.classList.add(ct, lt), + (this._element.style[n] = ''), + j.trigger(this._element, 'shown.bs.collapse'); + }, + this._element, + !0 + ), + (this._element.style[n] = `${this._element[s]}px`); + } + hide() { + if (this._isTransitioning || !this._isShown()) return; + if (j.trigger(this._element, 'hide.bs.collapse').defaultPrevented) return; + const t = this._getDimension(); + (this._element.style[t] = `${ + this._element.getBoundingClientRect()[t] + }px`), + u(this._element), + this._element.classList.add(ht), + this._element.classList.remove(ct, lt); + const e = this._triggerArray.length; + for (let t = 0; t < e; t++) { + const e = this._triggerArray[t], + i = n(e); + i && !this._isShown(i) && this._addAriaAndCollapsedClass([e], !1); + } + (this._isTransitioning = !0), + (this._element.style[t] = ''), + this._queueCallback( + () => { + (this._isTransitioning = !1), + this._element.classList.remove(ht), + this._element.classList.add(ct), + j.trigger(this._element, 'hidden.bs.collapse'); + }, + this._element, + !0 + ); + } + _isShown(t = this._element) { + return t.classList.contains(lt); + } + _getConfig(t) { + return ( + ((t = { ...rt, ...U.getDataAttributes(this._element), ...t }).toggle = + Boolean(t.toggle)), + (t.parent = r(t.parent)), + a(ot, t, at), + t + ); + } + _getDimension() { + return this._element.classList.contains('collapse-horizontal') + ? 'width' + : 'height'; + } + _initializeChildren() { + if (!this._config.parent) return; + const t = V.find(ut, this._config.parent); + V.find(ft, this._config.parent) + .filter((e) => !t.includes(e)) + .forEach((t) => { + const e = n(t); + e && this._addAriaAndCollapsedClass([t], this._isShown(e)); + }); + } + _addAriaAndCollapsedClass(t, e) { + t.length && + t.forEach((t) => { + e ? t.classList.remove(dt) : t.classList.add(dt), + t.setAttribute('aria-expanded', e); + }); + } + static jQueryInterface(t) { + return this.each(function () { + const e = {}; + 'string' == typeof t && /show|hide/.test(t) && (e.toggle = !1); + const i = pt.getOrCreateInstance(this, e); + if ('string' == typeof t) { + if (void 0 === i[t]) throw new TypeError(`No method named "${t}"`); + i[t](); + } + }); + } + } + j.on(document, 'click.bs.collapse.data-api', ft, function (t) { + ('A' === t.target.tagName || + (t.delegateTarget && 'A' === t.delegateTarget.tagName)) && + t.preventDefault(); + const e = i(this); + V.find(e).forEach((t) => { + pt.getOrCreateInstance(t, { toggle: !1 }).toggle(); + }); + }), + g(pt); + var mt = 'top', + gt = 'bottom', + _t = 'right', + bt = 'left', + vt = 'auto', + yt = [mt, gt, _t, bt], + wt = 'start', + Et = 'end', + At = 'clippingParents', + Tt = 'viewport', + Ot = 'popper', + Ct = 'reference', + kt = yt.reduce(function (t, e) { + return t.concat([e + '-' + wt, e + '-' + Et]); + }, []), + Lt = [].concat(yt, [vt]).reduce(function (t, e) { + return t.concat([e, e + '-' + wt, e + '-' + Et]); + }, []), + xt = 'beforeRead', + Dt = 'read', + St = 'afterRead', + Nt = 'beforeMain', + It = 'main', + Pt = 'afterMain', + jt = 'beforeWrite', + Mt = 'write', + Ht = 'afterWrite', + Bt = [xt, Dt, St, Nt, It, Pt, jt, Mt, Ht]; + function Rt(t) { + return t ? (t.nodeName || '').toLowerCase() : null; + } + function Wt(t) { + if (null == t) return window; + if ('[object Window]' !== t.toString()) { + var e = t.ownerDocument; + return (e && e.defaultView) || window; + } + return t; + } + function $t(t) { + return t instanceof Wt(t).Element || t instanceof Element; + } + function zt(t) { + return t instanceof Wt(t).HTMLElement || t instanceof HTMLElement; + } + function qt(t) { + return ( + 'undefined' != typeof ShadowRoot && + (t instanceof Wt(t).ShadowRoot || t instanceof ShadowRoot) + ); + } + const Ft = { + name: 'applyStyles', + enabled: !0, + phase: 'write', + fn: function (t) { + var e = t.state; + Object.keys(e.elements).forEach(function (t) { + var i = e.styles[t] || {}, + n = e.attributes[t] || {}, + s = e.elements[t]; + zt(s) && + Rt(s) && + (Object.assign(s.style, i), + Object.keys(n).forEach(function (t) { + var e = n[t]; + !1 === e + ? s.removeAttribute(t) + : s.setAttribute(t, !0 === e ? '' : e); + })); + }); + }, + effect: function (t) { + var e = t.state, + i = { + popper: { + position: e.options.strategy, + left: '0', + top: '0', + margin: '0', + }, + arrow: { position: 'absolute' }, + reference: {}, + }; + return ( + Object.assign(e.elements.popper.style, i.popper), + (e.styles = i), + e.elements.arrow && Object.assign(e.elements.arrow.style, i.arrow), + function () { + Object.keys(e.elements).forEach(function (t) { + var n = e.elements[t], + s = e.attributes[t] || {}, + o = Object.keys( + e.styles.hasOwnProperty(t) ? e.styles[t] : i[t] + ).reduce(function (t, e) { + return (t[e] = ''), t; + }, {}); + zt(n) && + Rt(n) && + (Object.assign(n.style, o), + Object.keys(s).forEach(function (t) { + n.removeAttribute(t); + })); + }); + } + ); + }, + requires: ['computeStyles'], + }; + function Ut(t) { + return t.split('-')[0]; + } + function Vt(t, e) { + var i = t.getBoundingClientRect(); + return { + width: i.width / 1, + height: i.height / 1, + top: i.top / 1, + right: i.right / 1, + bottom: i.bottom / 1, + left: i.left / 1, + x: i.left / 1, + y: i.top / 1, + }; + } + function Kt(t) { + var e = Vt(t), + i = t.offsetWidth, + n = t.offsetHeight; + return ( + Math.abs(e.width - i) <= 1 && (i = e.width), + Math.abs(e.height - n) <= 1 && (n = e.height), + { x: t.offsetLeft, y: t.offsetTop, width: i, height: n } + ); + } + function Xt(t, e) { + var i = e.getRootNode && e.getRootNode(); + if (t.contains(e)) return !0; + if (i && qt(i)) { + var n = e; + do { + if (n && t.isSameNode(n)) return !0; + n = n.parentNode || n.host; + } while (n); + } + return !1; + } + function Yt(t) { + return Wt(t).getComputedStyle(t); + } + function Qt(t) { + return ['table', 'td', 'th'].indexOf(Rt(t)) >= 0; + } + function Gt(t) { + return ( + ($t(t) ? t.ownerDocument : t.document) || window.document + ).documentElement; + } + function Zt(t) { + return 'html' === Rt(t) + ? t + : t.assignedSlot || t.parentNode || (qt(t) ? t.host : null) || Gt(t); + } + function Jt(t) { + return zt(t) && 'fixed' !== Yt(t).position ? t.offsetParent : null; + } + function te(t) { + for (var e = Wt(t), i = Jt(t); i && Qt(i) && 'static' === Yt(i).position; ) + i = Jt(i); + return i && + ('html' === Rt(i) || ('body' === Rt(i) && 'static' === Yt(i).position)) + ? e + : i || + (function (t) { + var e = -1 !== navigator.userAgent.toLowerCase().indexOf('firefox'); + if ( + -1 !== navigator.userAgent.indexOf('Trident') && + zt(t) && + 'fixed' === Yt(t).position + ) + return null; + for ( + var i = Zt(t); + zt(i) && ['html', 'body'].indexOf(Rt(i)) < 0; + + ) { + var n = Yt(i); + if ( + 'none' !== n.transform || + 'none' !== n.perspective || + 'paint' === n.contain || + -1 !== ['transform', 'perspective'].indexOf(n.willChange) || + (e && 'filter' === n.willChange) || + (e && n.filter && 'none' !== n.filter) + ) + return i; + i = i.parentNode; + } + return null; + })(t) || + e; + } + function ee(t) { + return ['top', 'bottom'].indexOf(t) >= 0 ? 'x' : 'y'; + } + var ie = Math.max, + ne = Math.min, + se = Math.round; + function oe(t, e, i) { + return ie(t, ne(e, i)); + } + function re(t) { + return Object.assign({}, { top: 0, right: 0, bottom: 0, left: 0 }, t); + } + function ae(t, e) { + return e.reduce(function (e, i) { + return (e[i] = t), e; + }, {}); + } + const le = { + name: 'arrow', + enabled: !0, + phase: 'main', + fn: function (t) { + var e, + i = t.state, + n = t.name, + s = t.options, + o = i.elements.arrow, + r = i.modifiersData.popperOffsets, + a = Ut(i.placement), + l = ee(a), + c = [bt, _t].indexOf(a) >= 0 ? 'height' : 'width'; + if (o && r) { + var h = (function (t, e) { + return re( + 'number' != + typeof (t = + 'function' == typeof t + ? t(Object.assign({}, e.rects, { placement: e.placement })) + : t) + ? t + : ae(t, yt) + ); + })(s.padding, i), + d = Kt(o), + u = 'y' === l ? mt : bt, + f = 'y' === l ? gt : _t, + p = + i.rects.reference[c] + + i.rects.reference[l] - + r[l] - + i.rects.popper[c], + m = r[l] - i.rects.reference[l], + g = te(o), + _ = g ? ('y' === l ? g.clientHeight || 0 : g.clientWidth || 0) : 0, + b = p / 2 - m / 2, + v = h[u], + y = _ - d[c] - h[f], + w = _ / 2 - d[c] / 2 + b, + E = oe(v, w, y), + A = l; + i.modifiersData[n] = (((e = {})[A] = E), (e.centerOffset = E - w), e); + } + }, + effect: function (t) { + var e = t.state, + i = t.options.element, + n = void 0 === i ? '[data-popper-arrow]' : i; + null != n && + ('string' != typeof n || (n = e.elements.popper.querySelector(n))) && + Xt(e.elements.popper, n) && + (e.elements.arrow = n); + }, + requires: ['popperOffsets'], + requiresIfExists: ['preventOverflow'], + }; + function ce(t) { + return t.split('-')[1]; + } + var he = { top: 'auto', right: 'auto', bottom: 'auto', left: 'auto' }; + function de(t) { + var e, + i = t.popper, + n = t.popperRect, + s = t.placement, + o = t.variation, + r = t.offsets, + a = t.position, + l = t.gpuAcceleration, + c = t.adaptive, + h = t.roundOffsets, + d = + !0 === h + ? (function (t) { + var e = t.x, + i = t.y, + n = window.devicePixelRatio || 1; + return { x: se(se(e * n) / n) || 0, y: se(se(i * n) / n) || 0 }; + })(r) + : 'function' == typeof h + ? h(r) + : r, + u = d.x, + f = void 0 === u ? 0 : u, + p = d.y, + m = void 0 === p ? 0 : p, + g = r.hasOwnProperty('x'), + _ = r.hasOwnProperty('y'), + b = bt, + v = mt, + y = window; + if (c) { + var w = te(i), + E = 'clientHeight', + A = 'clientWidth'; + w === Wt(i) && + 'static' !== Yt((w = Gt(i))).position && + 'absolute' === a && + ((E = 'scrollHeight'), (A = 'scrollWidth')), + (w = w), + (s !== mt && ((s !== bt && s !== _t) || o !== Et)) || + ((v = gt), (m -= w[E] - n.height), (m *= l ? 1 : -1)), + (s !== bt && ((s !== mt && s !== gt) || o !== Et)) || + ((b = _t), (f -= w[A] - n.width), (f *= l ? 1 : -1)); + } + var T, + O = Object.assign({ position: a }, c && he); + return l + ? Object.assign( + {}, + O, + (((T = {})[v] = _ ? '0' : ''), + (T[b] = g ? '0' : ''), + (T.transform = + (y.devicePixelRatio || 1) <= 1 + ? 'translate(' + f + 'px, ' + m + 'px)' + : 'translate3d(' + f + 'px, ' + m + 'px, 0)'), + T) + ) + : Object.assign( + {}, + O, + (((e = {})[v] = _ ? m + 'px' : ''), + (e[b] = g ? f + 'px' : ''), + (e.transform = ''), + e) + ); + } + const ue = { + name: 'computeStyles', + enabled: !0, + phase: 'beforeWrite', + fn: function (t) { + var e = t.state, + i = t.options, + n = i.gpuAcceleration, + s = void 0 === n || n, + o = i.adaptive, + r = void 0 === o || o, + a = i.roundOffsets, + l = void 0 === a || a, + c = { + placement: Ut(e.placement), + variation: ce(e.placement), + popper: e.elements.popper, + popperRect: e.rects.popper, + gpuAcceleration: s, + }; + null != e.modifiersData.popperOffsets && + (e.styles.popper = Object.assign( + {}, + e.styles.popper, + de( + Object.assign({}, c, { + offsets: e.modifiersData.popperOffsets, + position: e.options.strategy, + adaptive: r, + roundOffsets: l, + }) + ) + )), + null != e.modifiersData.arrow && + (e.styles.arrow = Object.assign( + {}, + e.styles.arrow, + de( + Object.assign({}, c, { + offsets: e.modifiersData.arrow, + position: 'absolute', + adaptive: !1, + roundOffsets: l, + }) + ) + )), + (e.attributes.popper = Object.assign({}, e.attributes.popper, { + 'data-popper-placement': e.placement, + })); + }, + data: {}, + }; + var fe = { passive: !0 }; + const pe = { + name: 'eventListeners', + enabled: !0, + phase: 'write', + fn: function () {}, + effect: function (t) { + var e = t.state, + i = t.instance, + n = t.options, + s = n.scroll, + o = void 0 === s || s, + r = n.resize, + a = void 0 === r || r, + l = Wt(e.elements.popper), + c = [].concat(e.scrollParents.reference, e.scrollParents.popper); + return ( + o && + c.forEach(function (t) { + t.addEventListener('scroll', i.update, fe); + }), + a && l.addEventListener('resize', i.update, fe), + function () { + o && + c.forEach(function (t) { + t.removeEventListener('scroll', i.update, fe); + }), + a && l.removeEventListener('resize', i.update, fe); + } + ); + }, + data: {}, + }; + var me = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' }; + function ge(t) { + return t.replace(/left|right|bottom|top/g, function (t) { + return me[t]; + }); + } + var _e = { start: 'end', end: 'start' }; + function be(t) { + return t.replace(/start|end/g, function (t) { + return _e[t]; + }); + } + function ve(t) { + var e = Wt(t); + return { scrollLeft: e.pageXOffset, scrollTop: e.pageYOffset }; + } + function ye(t) { + return Vt(Gt(t)).left + ve(t).scrollLeft; + } + function we(t) { + var e = Yt(t), + i = e.overflow, + n = e.overflowX, + s = e.overflowY; + return /auto|scroll|overlay|hidden/.test(i + s + n); + } + function Ee(t) { + return ['html', 'body', '#document'].indexOf(Rt(t)) >= 0 + ? t.ownerDocument.body + : zt(t) && we(t) + ? t + : Ee(Zt(t)); + } + function Ae(t, e) { + var i; + void 0 === e && (e = []); + var n = Ee(t), + s = n === (null == (i = t.ownerDocument) ? void 0 : i.body), + o = Wt(n), + r = s ? [o].concat(o.visualViewport || [], we(n) ? n : []) : n, + a = e.concat(r); + return s ? a : a.concat(Ae(Zt(r))); + } + function Te(t) { + return Object.assign({}, t, { + left: t.x, + top: t.y, + right: t.x + t.width, + bottom: t.y + t.height, + }); + } + function Oe(t, e) { + return e === Tt + ? Te( + (function (t) { + var e = Wt(t), + i = Gt(t), + n = e.visualViewport, + s = i.clientWidth, + o = i.clientHeight, + r = 0, + a = 0; + return ( + n && + ((s = n.width), + (o = n.height), + /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || + ((r = n.offsetLeft), (a = n.offsetTop))), + { width: s, height: o, x: r + ye(t), y: a } + ); + })(t) + ) + : zt(e) + ? (function (t) { + var e = Vt(t); + return ( + (e.top = e.top + t.clientTop), + (e.left = e.left + t.clientLeft), + (e.bottom = e.top + t.clientHeight), + (e.right = e.left + t.clientWidth), + (e.width = t.clientWidth), + (e.height = t.clientHeight), + (e.x = e.left), + (e.y = e.top), + e + ); + })(e) + : Te( + (function (t) { + var e, + i = Gt(t), + n = ve(t), + s = null == (e = t.ownerDocument) ? void 0 : e.body, + o = ie( + i.scrollWidth, + i.clientWidth, + s ? s.scrollWidth : 0, + s ? s.clientWidth : 0 + ), + r = ie( + i.scrollHeight, + i.clientHeight, + s ? s.scrollHeight : 0, + s ? s.clientHeight : 0 + ), + a = -n.scrollLeft + ye(t), + l = -n.scrollTop; + return ( + 'rtl' === Yt(s || i).direction && + (a += ie(i.clientWidth, s ? s.clientWidth : 0) - o), + { width: o, height: r, x: a, y: l } + ); + })(Gt(t)) + ); + } + function Ce(t) { + var e, + i = t.reference, + n = t.element, + s = t.placement, + o = s ? Ut(s) : null, + r = s ? ce(s) : null, + a = i.x + i.width / 2 - n.width / 2, + l = i.y + i.height / 2 - n.height / 2; + switch (o) { + case mt: + e = { x: a, y: i.y - n.height }; + break; + case gt: + e = { x: a, y: i.y + i.height }; + break; + case _t: + e = { x: i.x + i.width, y: l }; + break; + case bt: + e = { x: i.x - n.width, y: l }; + break; + default: + e = { x: i.x, y: i.y }; + } + var c = o ? ee(o) : null; + if (null != c) { + var h = 'y' === c ? 'height' : 'width'; + switch (r) { + case wt: + e[c] = e[c] - (i[h] / 2 - n[h] / 2); + break; + case Et: + e[c] = e[c] + (i[h] / 2 - n[h] / 2); + } + } + return e; + } + function ke(t, e) { + void 0 === e && (e = {}); + var i = e, + n = i.placement, + s = void 0 === n ? t.placement : n, + o = i.boundary, + r = void 0 === o ? At : o, + a = i.rootBoundary, + l = void 0 === a ? Tt : a, + c = i.elementContext, + h = void 0 === c ? Ot : c, + d = i.altBoundary, + u = void 0 !== d && d, + f = i.padding, + p = void 0 === f ? 0 : f, + m = re('number' != typeof p ? p : ae(p, yt)), + g = h === Ot ? Ct : Ot, + _ = t.rects.popper, + b = t.elements[u ? g : h], + v = (function (t, e, i) { + var n = + 'clippingParents' === e + ? (function (t) { + var e = Ae(Zt(t)), + i = + ['absolute', 'fixed'].indexOf(Yt(t).position) >= 0 && + zt(t) + ? te(t) + : t; + return $t(i) + ? e.filter(function (t) { + return $t(t) && Xt(t, i) && 'body' !== Rt(t); + }) + : []; + })(t) + : [].concat(e), + s = [].concat(n, [i]), + o = s[0], + r = s.reduce(function (e, i) { + var n = Oe(t, i); + return ( + (e.top = ie(n.top, e.top)), + (e.right = ne(n.right, e.right)), + (e.bottom = ne(n.bottom, e.bottom)), + (e.left = ie(n.left, e.left)), + e + ); + }, Oe(t, o)); + return ( + (r.width = r.right - r.left), + (r.height = r.bottom - r.top), + (r.x = r.left), + (r.y = r.top), + r + ); + })($t(b) ? b : b.contextElement || Gt(t.elements.popper), r, l), + y = Vt(t.elements.reference), + w = Ce({ reference: y, element: _, strategy: 'absolute', placement: s }), + E = Te(Object.assign({}, _, w)), + A = h === Ot ? E : y, + T = { + top: v.top - A.top + m.top, + bottom: A.bottom - v.bottom + m.bottom, + left: v.left - A.left + m.left, + right: A.right - v.right + m.right, + }, + O = t.modifiersData.offset; + if (h === Ot && O) { + var C = O[s]; + Object.keys(T).forEach(function (t) { + var e = [_t, gt].indexOf(t) >= 0 ? 1 : -1, + i = [mt, gt].indexOf(t) >= 0 ? 'y' : 'x'; + T[t] += C[i] * e; + }); + } + return T; + } + function Le(t, e) { + void 0 === e && (e = {}); + var i = e, + n = i.placement, + s = i.boundary, + o = i.rootBoundary, + r = i.padding, + a = i.flipVariations, + l = i.allowedAutoPlacements, + c = void 0 === l ? Lt : l, + h = ce(n), + d = h + ? a + ? kt + : kt.filter(function (t) { + return ce(t) === h; + }) + : yt, + u = d.filter(function (t) { + return c.indexOf(t) >= 0; + }); + 0 === u.length && (u = d); + var f = u.reduce(function (e, i) { + return ( + (e[i] = ke(t, { + placement: i, + boundary: s, + rootBoundary: o, + padding: r, + })[Ut(i)]), + e + ); + }, {}); + return Object.keys(f).sort(function (t, e) { + return f[t] - f[e]; + }); + } + const xe = { + name: 'flip', + enabled: !0, + phase: 'main', + fn: function (t) { + var e = t.state, + i = t.options, + n = t.name; + if (!e.modifiersData[n]._skip) { + for ( + var s = i.mainAxis, + o = void 0 === s || s, + r = i.altAxis, + a = void 0 === r || r, + l = i.fallbackPlacements, + c = i.padding, + h = i.boundary, + d = i.rootBoundary, + u = i.altBoundary, + f = i.flipVariations, + p = void 0 === f || f, + m = i.allowedAutoPlacements, + g = e.options.placement, + _ = Ut(g), + b = + l || + (_ !== g && p + ? (function (t) { + if (Ut(t) === vt) return []; + var e = ge(t); + return [be(t), e, be(e)]; + })(g) + : [ge(g)]), + v = [g].concat(b).reduce(function (t, i) { + return t.concat( + Ut(i) === vt + ? Le(e, { + placement: i, + boundary: h, + rootBoundary: d, + padding: c, + flipVariations: p, + allowedAutoPlacements: m, + }) + : i + ); + }, []), + y = e.rects.reference, + w = e.rects.popper, + E = new Map(), + A = !0, + T = v[0], + O = 0; + O < v.length; + O++ + ) { + var C = v[O], + k = Ut(C), + L = ce(C) === wt, + x = [mt, gt].indexOf(k) >= 0, + D = x ? 'width' : 'height', + S = ke(e, { + placement: C, + boundary: h, + rootBoundary: d, + altBoundary: u, + padding: c, + }), + N = x ? (L ? _t : bt) : L ? gt : mt; + y[D] > w[D] && (N = ge(N)); + var I = ge(N), + P = []; + if ( + (o && P.push(S[k] <= 0), + a && P.push(S[N] <= 0, S[I] <= 0), + P.every(function (t) { + return t; + })) + ) { + (T = C), (A = !1); + break; + } + E.set(C, P); + } + if (A) + for ( + var j = function (t) { + var e = v.find(function (e) { + var i = E.get(e); + if (i) + return i.slice(0, t).every(function (t) { + return t; + }); + }); + if (e) return (T = e), 'break'; + }, + M = p ? 3 : 1; + M > 0 && 'break' !== j(M); + M-- + ); + e.placement !== T && + ((e.modifiersData[n]._skip = !0), (e.placement = T), (e.reset = !0)); + } + }, + requiresIfExists: ['offset'], + data: { _skip: !1 }, + }; + function De(t, e, i) { + return ( + void 0 === i && (i = { x: 0, y: 0 }), + { + top: t.top - e.height - i.y, + right: t.right - e.width + i.x, + bottom: t.bottom - e.height + i.y, + left: t.left - e.width - i.x, + } + ); + } + function Se(t) { + return [mt, _t, gt, bt].some(function (e) { + return t[e] >= 0; + }); + } + const Ne = { + name: 'hide', + enabled: !0, + phase: 'main', + requiresIfExists: ['preventOverflow'], + fn: function (t) { + var e = t.state, + i = t.name, + n = e.rects.reference, + s = e.rects.popper, + o = e.modifiersData.preventOverflow, + r = ke(e, { elementContext: 'reference' }), + a = ke(e, { altBoundary: !0 }), + l = De(r, n), + c = De(a, s, o), + h = Se(l), + d = Se(c); + (e.modifiersData[i] = { + referenceClippingOffsets: l, + popperEscapeOffsets: c, + isReferenceHidden: h, + hasPopperEscaped: d, + }), + (e.attributes.popper = Object.assign({}, e.attributes.popper, { + 'data-popper-reference-hidden': h, + 'data-popper-escaped': d, + })); + }, + }, + Ie = { + name: 'offset', + enabled: !0, + phase: 'main', + requires: ['popperOffsets'], + fn: function (t) { + var e = t.state, + i = t.options, + n = t.name, + s = i.offset, + o = void 0 === s ? [0, 0] : s, + r = Lt.reduce(function (t, i) { + return ( + (t[i] = (function (t, e, i) { + var n = Ut(t), + s = [bt, mt].indexOf(n) >= 0 ? -1 : 1, + o = + 'function' == typeof i + ? i(Object.assign({}, e, { placement: t })) + : i, + r = o[0], + a = o[1]; + return ( + (r = r || 0), + (a = (a || 0) * s), + [bt, _t].indexOf(n) >= 0 ? { x: a, y: r } : { x: r, y: a } + ); + })(i, e.rects, o)), + t + ); + }, {}), + a = r[e.placement], + l = a.x, + c = a.y; + null != e.modifiersData.popperOffsets && + ((e.modifiersData.popperOffsets.x += l), + (e.modifiersData.popperOffsets.y += c)), + (e.modifiersData[n] = r); + }, + }, + Pe = { + name: 'popperOffsets', + enabled: !0, + phase: 'read', + fn: function (t) { + var e = t.state, + i = t.name; + e.modifiersData[i] = Ce({ + reference: e.rects.reference, + element: e.rects.popper, + strategy: 'absolute', + placement: e.placement, + }); + }, + data: {}, + }, + je = { + name: 'preventOverflow', + enabled: !0, + phase: 'main', + fn: function (t) { + var e = t.state, + i = t.options, + n = t.name, + s = i.mainAxis, + o = void 0 === s || s, + r = i.altAxis, + a = void 0 !== r && r, + l = i.boundary, + c = i.rootBoundary, + h = i.altBoundary, + d = i.padding, + u = i.tether, + f = void 0 === u || u, + p = i.tetherOffset, + m = void 0 === p ? 0 : p, + g = ke(e, { + boundary: l, + rootBoundary: c, + padding: d, + altBoundary: h, + }), + _ = Ut(e.placement), + b = ce(e.placement), + v = !b, + y = ee(_), + w = 'x' === y ? 'y' : 'x', + E = e.modifiersData.popperOffsets, + A = e.rects.reference, + T = e.rects.popper, + O = + 'function' == typeof m + ? m(Object.assign({}, e.rects, { placement: e.placement })) + : m, + C = { x: 0, y: 0 }; + if (E) { + if (o || a) { + var k = 'y' === y ? mt : bt, + L = 'y' === y ? gt : _t, + x = 'y' === y ? 'height' : 'width', + D = E[y], + S = E[y] + g[k], + N = E[y] - g[L], + I = f ? -T[x] / 2 : 0, + P = b === wt ? A[x] : T[x], + j = b === wt ? -T[x] : -A[x], + M = e.elements.arrow, + H = f && M ? Kt(M) : { width: 0, height: 0 }, + B = e.modifiersData['arrow#persistent'] + ? e.modifiersData['arrow#persistent'].padding + : { top: 0, right: 0, bottom: 0, left: 0 }, + R = B[k], + W = B[L], + $ = oe(0, A[x], H[x]), + z = v ? A[x] / 2 - I - $ - R - O : P - $ - R - O, + q = v ? -A[x] / 2 + I + $ + W + O : j + $ + W + O, + F = e.elements.arrow && te(e.elements.arrow), + U = F ? ('y' === y ? F.clientTop || 0 : F.clientLeft || 0) : 0, + V = e.modifiersData.offset + ? e.modifiersData.offset[e.placement][y] + : 0, + K = E[y] + z - V - U, + X = E[y] + q - V; + if (o) { + var Y = oe(f ? ne(S, K) : S, D, f ? ie(N, X) : N); + (E[y] = Y), (C[y] = Y - D); + } + if (a) { + var Q = 'x' === y ? mt : bt, + G = 'x' === y ? gt : _t, + Z = E[w], + J = Z + g[Q], + tt = Z - g[G], + et = oe(f ? ne(J, K) : J, Z, f ? ie(tt, X) : tt); + (E[w] = et), (C[w] = et - Z); + } + } + e.modifiersData[n] = C; + } + }, + requiresIfExists: ['offset'], + }; + function Me(t, e, i) { + void 0 === i && (i = !1); + var n = zt(e); + zt(e) && + (function (t) { + var e = t.getBoundingClientRect(); + e.width, t.offsetWidth, e.height, t.offsetHeight; + })(e); + var s, + o, + r = Gt(e), + a = Vt(t), + l = { scrollLeft: 0, scrollTop: 0 }, + c = { x: 0, y: 0 }; + return ( + (n || (!n && !i)) && + (('body' !== Rt(e) || we(r)) && + (l = + (s = e) !== Wt(s) && zt(s) + ? { scrollLeft: (o = s).scrollLeft, scrollTop: o.scrollTop } + : ve(s)), + zt(e) + ? (((c = Vt(e)).x += e.clientLeft), (c.y += e.clientTop)) + : r && (c.x = ye(r))), + { + x: a.left + l.scrollLeft - c.x, + y: a.top + l.scrollTop - c.y, + width: a.width, + height: a.height, + } + ); + } + function He(t) { + var e = new Map(), + i = new Set(), + n = []; + function s(t) { + i.add(t.name), + [] + .concat(t.requires || [], t.requiresIfExists || []) + .forEach(function (t) { + if (!i.has(t)) { + var n = e.get(t); + n && s(n); + } + }), + n.push(t); + } + return ( + t.forEach(function (t) { + e.set(t.name, t); + }), + t.forEach(function (t) { + i.has(t.name) || s(t); + }), + n + ); + } + var Be = { placement: 'bottom', modifiers: [], strategy: 'absolute' }; + function Re() { + for (var t = arguments.length, e = new Array(t), i = 0; i < t; i++) + e[i] = arguments[i]; + return !e.some(function (t) { + return !(t && 'function' == typeof t.getBoundingClientRect); + }); + } + function We(t) { + void 0 === t && (t = {}); + var e = t, + i = e.defaultModifiers, + n = void 0 === i ? [] : i, + s = e.defaultOptions, + o = void 0 === s ? Be : s; + return function (t, e, i) { + void 0 === i && (i = o); + var s, + r, + a = { + placement: 'bottom', + orderedModifiers: [], + options: Object.assign({}, Be, o), + modifiersData: {}, + elements: { reference: t, popper: e }, + attributes: {}, + styles: {}, + }, + l = [], + c = !1, + h = { + state: a, + setOptions: function (i) { + var s = 'function' == typeof i ? i(a.options) : i; + d(), + (a.options = Object.assign({}, o, a.options, s)), + (a.scrollParents = { + reference: $t(t) + ? Ae(t) + : t.contextElement + ? Ae(t.contextElement) + : [], + popper: Ae(e), + }); + var r, + c, + u = (function (t) { + var e = He(t); + return Bt.reduce(function (t, i) { + return t.concat( + e.filter(function (t) { + return t.phase === i; + }) + ); + }, []); + })( + ((r = [].concat(n, a.options.modifiers)), + (c = r.reduce(function (t, e) { + var i = t[e.name]; + return ( + (t[e.name] = i + ? Object.assign({}, i, e, { + options: Object.assign({}, i.options, e.options), + data: Object.assign({}, i.data, e.data), + }) + : e), + t + ); + }, {})), + Object.keys(c).map(function (t) { + return c[t]; + })) + ); + return ( + (a.orderedModifiers = u.filter(function (t) { + return t.enabled; + })), + a.orderedModifiers.forEach(function (t) { + var e = t.name, + i = t.options, + n = void 0 === i ? {} : i, + s = t.effect; + if ('function' == typeof s) { + var o = s({ state: a, name: e, instance: h, options: n }); + l.push(o || function () {}); + } + }), + h.update() + ); + }, + forceUpdate: function () { + if (!c) { + var t = a.elements, + e = t.reference, + i = t.popper; + if (Re(e, i)) { + (a.rects = { + reference: Me(e, te(i), 'fixed' === a.options.strategy), + popper: Kt(i), + }), + (a.reset = !1), + (a.placement = a.options.placement), + a.orderedModifiers.forEach(function (t) { + return (a.modifiersData[t.name] = Object.assign( + {}, + t.data + )); + }); + for (var n = 0; n < a.orderedModifiers.length; n++) + if (!0 !== a.reset) { + var s = a.orderedModifiers[n], + o = s.fn, + r = s.options, + l = void 0 === r ? {} : r, + d = s.name; + 'function' == typeof o && + (a = + o({ state: a, options: l, name: d, instance: h }) || a); + } else (a.reset = !1), (n = -1); + } + } + }, + update: + ((s = function () { + return new Promise(function (t) { + h.forceUpdate(), t(a); + }); + }), + function () { + return ( + r || + (r = new Promise(function (t) { + Promise.resolve().then(function () { + (r = void 0), t(s()); + }); + })), + r + ); + }), + destroy: function () { + d(), (c = !0); + }, + }; + if (!Re(t, e)) return h; + function d() { + l.forEach(function (t) { + return t(); + }), + (l = []); + } + return ( + h.setOptions(i).then(function (t) { + !c && i.onFirstUpdate && i.onFirstUpdate(t); + }), + h + ); + }; + } + var $e = We(), + ze = We({ defaultModifiers: [pe, Pe, ue, Ft] }), + qe = We({ defaultModifiers: [pe, Pe, ue, Ft, Ie, xe, je, le, Ne] }); + const Fe = Object.freeze({ + __proto__: null, + popperGenerator: We, + detectOverflow: ke, + createPopperBase: $e, + createPopper: qe, + createPopperLite: ze, + top: mt, + bottom: gt, + right: _t, + left: bt, + auto: vt, + basePlacements: yt, + start: wt, + end: Et, + clippingParents: At, + viewport: Tt, + popper: Ot, + reference: Ct, + variationPlacements: kt, + placements: Lt, + beforeRead: xt, + read: Dt, + afterRead: St, + beforeMain: Nt, + main: It, + afterMain: Pt, + beforeWrite: jt, + write: Mt, + afterWrite: Ht, + modifierPhases: Bt, + applyStyles: Ft, + arrow: le, + computeStyles: ue, + eventListeners: pe, + flip: xe, + hide: Ne, + offset: Ie, + popperOffsets: Pe, + preventOverflow: je, + }), + Ue = 'dropdown', + Ve = 'Escape', + Ke = 'Space', + Xe = 'ArrowUp', + Ye = 'ArrowDown', + Qe = new RegExp('ArrowUp|ArrowDown|Escape'), + Ge = 'click.bs.dropdown.data-api', + Ze = 'keydown.bs.dropdown.data-api', + Je = 'show', + ti = '[data-bs-toggle="dropdown"]', + ei = '.dropdown-menu', + ii = m() ? 'top-end' : 'top-start', + ni = m() ? 'top-start' : 'top-end', + si = m() ? 'bottom-end' : 'bottom-start', + oi = m() ? 'bottom-start' : 'bottom-end', + ri = m() ? 'left-start' : 'right-start', + ai = m() ? 'right-start' : 'left-start', + li = { + offset: [0, 2], + boundary: 'clippingParents', + reference: 'toggle', + display: 'dynamic', + popperConfig: null, + autoClose: !0, + }, + ci = { + offset: '(array|string|function)', + boundary: '(string|element)', + reference: '(string|element|object)', + display: 'string', + popperConfig: '(null|object|function)', + autoClose: '(boolean|string)', + }; + class hi extends B { + constructor(t, e) { + super(t), + (this._popper = null), + (this._config = this._getConfig(e)), + (this._menu = this._getMenuElement()), + (this._inNavbar = this._detectNavbar()); + } + static get Default() { + return li; + } + static get DefaultType() { + return ci; + } + static get NAME() { + return Ue; + } + toggle() { + return this._isShown() ? this.hide() : this.show(); + } + show() { + if (c(this._element) || this._isShown(this._menu)) return; + const t = { relatedTarget: this._element }; + if (j.trigger(this._element, 'show.bs.dropdown', t).defaultPrevented) + return; + const e = hi.getParentFromElement(this._element); + this._inNavbar + ? U.setDataAttribute(this._menu, 'popper', 'none') + : this._createPopper(e), + 'ontouchstart' in document.documentElement && + !e.closest('.navbar-nav') && + [] + .concat(...document.body.children) + .forEach((t) => j.on(t, 'mouseover', d)), + this._element.focus(), + this._element.setAttribute('aria-expanded', !0), + this._menu.classList.add(Je), + this._element.classList.add(Je), + j.trigger(this._element, 'shown.bs.dropdown', t); + } + hide() { + if (c(this._element) || !this._isShown(this._menu)) return; + const t = { relatedTarget: this._element }; + this._completeHide(t); + } + dispose() { + this._popper && this._popper.destroy(), super.dispose(); + } + update() { + (this._inNavbar = this._detectNavbar()), + this._popper && this._popper.update(); + } + _completeHide(t) { + j.trigger(this._element, 'hide.bs.dropdown', t).defaultPrevented || + ('ontouchstart' in document.documentElement && + [] + .concat(...document.body.children) + .forEach((t) => j.off(t, 'mouseover', d)), + this._popper && this._popper.destroy(), + this._menu.classList.remove(Je), + this._element.classList.remove(Je), + this._element.setAttribute('aria-expanded', 'false'), + U.removeDataAttribute(this._menu, 'popper'), + j.trigger(this._element, 'hidden.bs.dropdown', t)); + } + _getConfig(t) { + if ( + ((t = { + ...this.constructor.Default, + ...U.getDataAttributes(this._element), + ...t, + }), + a(Ue, t, this.constructor.DefaultType), + 'object' == typeof t.reference && + !o(t.reference) && + 'function' != typeof t.reference.getBoundingClientRect) + ) + throw new TypeError( + `${Ue.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.` + ); + return t; + } + _createPopper(t) { + if (void 0 === Fe) + throw new TypeError( + "Bootstrap's dropdowns require Popper (https://popper.js.org)" + ); + let e = this._element; + 'parent' === this._config.reference + ? (e = t) + : o(this._config.reference) + ? (e = r(this._config.reference)) + : 'object' == typeof this._config.reference && + (e = this._config.reference); + const i = this._getPopperConfig(), + n = i.modifiers.find( + (t) => 'applyStyles' === t.name && !1 === t.enabled + ); + (this._popper = qe(e, this._menu, i)), + n && U.setDataAttribute(this._menu, 'popper', 'static'); + } + _isShown(t = this._element) { + return t.classList.contains(Je); + } + _getMenuElement() { + return V.next(this._element, ei)[0]; + } + _getPlacement() { + const t = this._element.parentNode; + if (t.classList.contains('dropend')) return ri; + if (t.classList.contains('dropstart')) return ai; + const e = + 'end' === + getComputedStyle(this._menu).getPropertyValue('--bs-position').trim(); + return t.classList.contains('dropup') ? (e ? ni : ii) : e ? oi : si; + } + _detectNavbar() { + return null !== this._element.closest('.navbar'); + } + _getOffset() { + const { offset: t } = this._config; + return 'string' == typeof t + ? t.split(',').map((t) => Number.parseInt(t, 10)) + : 'function' == typeof t + ? (e) => t(e, this._element) + : t; + } + _getPopperConfig() { + const t = { + placement: this._getPlacement(), + modifiers: [ + { + name: 'preventOverflow', + options: { boundary: this._config.boundary }, + }, + { name: 'offset', options: { offset: this._getOffset() } }, + ], + }; + return ( + 'static' === this._config.display && + (t.modifiers = [{ name: 'applyStyles', enabled: !1 }]), + { + ...t, + ...('function' == typeof this._config.popperConfig + ? this._config.popperConfig(t) + : this._config.popperConfig), + } + ); + } + _selectMenuItem({ key: t, target: e }) { + const i = V.find( + '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)', + this._menu + ).filter(l); + i.length && v(i, e, t === Ye, !i.includes(e)).focus(); + } + static jQueryInterface(t) { + return this.each(function () { + const e = hi.getOrCreateInstance(this, t); + if ('string' == typeof t) { + if (void 0 === e[t]) throw new TypeError(`No method named "${t}"`); + e[t](); + } + }); + } + static clearMenus(t) { + if (t && (2 === t.button || ('keyup' === t.type && 'Tab' !== t.key))) + return; + const e = V.find(ti); + for (let i = 0, n = e.length; i < n; i++) { + const n = hi.getInstance(e[i]); + if (!n || !1 === n._config.autoClose) continue; + if (!n._isShown()) continue; + const s = { relatedTarget: n._element }; + if (t) { + const e = t.composedPath(), + i = e.includes(n._menu); + if ( + e.includes(n._element) || + ('inside' === n._config.autoClose && !i) || + ('outside' === n._config.autoClose && i) + ) + continue; + if ( + n._menu.contains(t.target) && + (('keyup' === t.type && 'Tab' === t.key) || + /input|select|option|textarea|form/i.test(t.target.tagName)) + ) + continue; + 'click' === t.type && (s.clickEvent = t); + } + n._completeHide(s); + } + } + static getParentFromElement(t) { + return n(t) || t.parentNode; + } + static dataApiKeydownHandler(t) { + if ( + /input|textarea/i.test(t.target.tagName) + ? t.key === Ke || + (t.key !== Ve && + ((t.key !== Ye && t.key !== Xe) || t.target.closest(ei))) + : !Qe.test(t.key) + ) + return; + const e = this.classList.contains(Je); + if (!e && t.key === Ve) return; + if ((t.preventDefault(), t.stopPropagation(), c(this))) return; + const i = this.matches(ti) ? this : V.prev(this, ti)[0], + n = hi.getOrCreateInstance(i); + if (t.key !== Ve) + return t.key === Xe || t.key === Ye + ? (e || n.show(), void n._selectMenuItem(t)) + : void ((e && t.key !== Ke) || hi.clearMenus()); + n.hide(); + } + } + j.on(document, Ze, ti, hi.dataApiKeydownHandler), + j.on(document, Ze, ei, hi.dataApiKeydownHandler), + j.on(document, Ge, hi.clearMenus), + j.on(document, 'keyup.bs.dropdown.data-api', hi.clearMenus), + j.on(document, Ge, ti, function (t) { + t.preventDefault(), hi.getOrCreateInstance(this).toggle(); + }), + g(hi); + const di = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top', + ui = '.sticky-top'; + class fi { + constructor() { + this._element = document.body; + } + getWidth() { + const t = document.documentElement.clientWidth; + return Math.abs(window.innerWidth - t); + } + hide() { + const t = this.getWidth(); + this._disableOverFlow(), + this._setElementAttributes(this._element, 'paddingRight', (e) => e + t), + this._setElementAttributes(di, 'paddingRight', (e) => e + t), + this._setElementAttributes(ui, 'marginRight', (e) => e - t); + } + _disableOverFlow() { + this._saveInitialAttribute(this._element, 'overflow'), + (this._element.style.overflow = 'hidden'); + } + _setElementAttributes(t, e, i) { + const n = this.getWidth(); + this._applyManipulationCallback(t, (t) => { + if (t !== this._element && window.innerWidth > t.clientWidth + n) + return; + this._saveInitialAttribute(t, e); + const s = window.getComputedStyle(t)[e]; + t.style[e] = `${i(Number.parseFloat(s))}px`; + }); + } + reset() { + this._resetElementAttributes(this._element, 'overflow'), + this._resetElementAttributes(this._element, 'paddingRight'), + this._resetElementAttributes(di, 'paddingRight'), + this._resetElementAttributes(ui, 'marginRight'); + } + _saveInitialAttribute(t, e) { + const i = t.style[e]; + i && U.setDataAttribute(t, e, i); + } + _resetElementAttributes(t, e) { + this._applyManipulationCallback(t, (t) => { + const i = U.getDataAttribute(t, e); + void 0 === i + ? t.style.removeProperty(e) + : (U.removeDataAttribute(t, e), (t.style[e] = i)); + }); + } + _applyManipulationCallback(t, e) { + o(t) ? e(t) : V.find(t, this._element).forEach(e); + } + isOverflowing() { + return this.getWidth() > 0; + } + } + const pi = { + className: 'modal-backdrop', + isVisible: !0, + isAnimated: !1, + rootElement: 'body', + clickCallback: null, + }, + mi = { + className: 'string', + isVisible: 'boolean', + isAnimated: 'boolean', + rootElement: '(element|string)', + clickCallback: '(function|null)', + }, + gi = 'show', + _i = 'mousedown.bs.backdrop'; + class bi { + constructor(t) { + (this._config = this._getConfig(t)), + (this._isAppended = !1), + (this._element = null); + } + show(t) { + this._config.isVisible + ? (this._append(), + this._config.isAnimated && u(this._getElement()), + this._getElement().classList.add(gi), + this._emulateAnimation(() => { + _(t); + })) + : _(t); + } + hide(t) { + this._config.isVisible + ? (this._getElement().classList.remove(gi), + this._emulateAnimation(() => { + this.dispose(), _(t); + })) + : _(t); + } + _getElement() { + if (!this._element) { + const t = document.createElement('div'); + (t.className = this._config.className), + this._config.isAnimated && t.classList.add('fade'), + (this._element = t); + } + return this._element; + } + _getConfig(t) { + return ( + ((t = { ...pi, ...('object' == typeof t ? t : {}) }).rootElement = r( + t.rootElement + )), + a('backdrop', t, mi), + t + ); + } + _append() { + this._isAppended || + (this._config.rootElement.append(this._getElement()), + j.on(this._getElement(), _i, () => { + _(this._config.clickCallback); + }), + (this._isAppended = !0)); + } + dispose() { + this._isAppended && + (j.off(this._element, _i), + this._element.remove(), + (this._isAppended = !1)); + } + _emulateAnimation(t) { + b(t, this._getElement(), this._config.isAnimated); + } + } + const vi = { trapElement: null, autofocus: !0 }, + yi = { trapElement: 'element', autofocus: 'boolean' }, + wi = '.bs.focustrap', + Ei = 'backward'; + class Ai { + constructor(t) { + (this._config = this._getConfig(t)), + (this._isActive = !1), + (this._lastTabNavDirection = null); + } + activate() { + const { trapElement: t, autofocus: e } = this._config; + this._isActive || + (e && t.focus(), + j.off(document, wi), + j.on(document, 'focusin.bs.focustrap', (t) => this._handleFocusin(t)), + j.on(document, 'keydown.tab.bs.focustrap', (t) => + this._handleKeydown(t) + ), + (this._isActive = !0)); + } + deactivate() { + this._isActive && ((this._isActive = !1), j.off(document, wi)); + } + _handleFocusin(t) { + const { target: e } = t, + { trapElement: i } = this._config; + if (e === document || e === i || i.contains(e)) return; + const n = V.focusableChildren(i); + 0 === n.length + ? i.focus() + : this._lastTabNavDirection === Ei + ? n[n.length - 1].focus() + : n[0].focus(); + } + _handleKeydown(t) { + 'Tab' === t.key && + (this._lastTabNavDirection = t.shiftKey ? Ei : 'forward'); + } + _getConfig(t) { + return ( + (t = { ...vi, ...('object' == typeof t ? t : {}) }), + a('focustrap', t, yi), + t + ); + } + } + const Ti = 'modal', + Oi = 'Escape', + Ci = { backdrop: !0, keyboard: !0, focus: !0 }, + ki = { + backdrop: '(boolean|string)', + keyboard: 'boolean', + focus: 'boolean', + }, + Li = 'hidden.bs.modal', + xi = 'show.bs.modal', + Di = 'resize.bs.modal', + Si = 'click.dismiss.bs.modal', + Ni = 'keydown.dismiss.bs.modal', + Ii = 'mousedown.dismiss.bs.modal', + Pi = 'modal-open', + ji = 'show', + Mi = 'modal-static'; + class Hi extends B { + constructor(t, e) { + super(t), + (this._config = this._getConfig(e)), + (this._dialog = V.findOne('.modal-dialog', this._element)), + (this._backdrop = this._initializeBackDrop()), + (this._focustrap = this._initializeFocusTrap()), + (this._isShown = !1), + (this._ignoreBackdropClick = !1), + (this._isTransitioning = !1), + (this._scrollBar = new fi()); + } + static get Default() { + return Ci; + } + static get NAME() { + return Ti; + } + toggle(t) { + return this._isShown ? this.hide() : this.show(t); + } + show(t) { + this._isShown || + this._isTransitioning || + j.trigger(this._element, xi, { relatedTarget: t }).defaultPrevented || + ((this._isShown = !0), + this._isAnimated() && (this._isTransitioning = !0), + this._scrollBar.hide(), + document.body.classList.add(Pi), + this._adjustDialog(), + this._setEscapeEvent(), + this._setResizeEvent(), + j.on(this._dialog, Ii, () => { + j.one(this._element, 'mouseup.dismiss.bs.modal', (t) => { + t.target === this._element && (this._ignoreBackdropClick = !0); + }); + }), + this._showBackdrop(() => this._showElement(t))); + } + hide() { + if (!this._isShown || this._isTransitioning) return; + if (j.trigger(this._element, 'hide.bs.modal').defaultPrevented) return; + this._isShown = !1; + const t = this._isAnimated(); + t && (this._isTransitioning = !0), + this._setEscapeEvent(), + this._setResizeEvent(), + this._focustrap.deactivate(), + this._element.classList.remove(ji), + j.off(this._element, Si), + j.off(this._dialog, Ii), + this._queueCallback(() => this._hideModal(), this._element, t); + } + dispose() { + [window, this._dialog].forEach((t) => j.off(t, '.bs.modal')), + this._backdrop.dispose(), + this._focustrap.deactivate(), + super.dispose(); + } + handleUpdate() { + this._adjustDialog(); + } + _initializeBackDrop() { + return new bi({ + isVisible: Boolean(this._config.backdrop), + isAnimated: this._isAnimated(), + }); + } + _initializeFocusTrap() { + return new Ai({ trapElement: this._element }); + } + _getConfig(t) { + return ( + (t = { + ...Ci, + ...U.getDataAttributes(this._element), + ...('object' == typeof t ? t : {}), + }), + a(Ti, t, ki), + t + ); + } + _showElement(t) { + const e = this._isAnimated(), + i = V.findOne('.modal-body', this._dialog); + (this._element.parentNode && + this._element.parentNode.nodeType === Node.ELEMENT_NODE) || + document.body.append(this._element), + (this._element.style.display = 'block'), + this._element.removeAttribute('aria-hidden'), + this._element.setAttribute('aria-modal', !0), + this._element.setAttribute('role', 'dialog'), + (this._element.scrollTop = 0), + i && (i.scrollTop = 0), + e && u(this._element), + this._element.classList.add(ji), + this._queueCallback( + () => { + this._config.focus && this._focustrap.activate(), + (this._isTransitioning = !1), + j.trigger(this._element, 'shown.bs.modal', { relatedTarget: t }); + }, + this._dialog, + e + ); + } + _setEscapeEvent() { + this._isShown + ? j.on(this._element, Ni, (t) => { + this._config.keyboard && t.key === Oi + ? (t.preventDefault(), this.hide()) + : this._config.keyboard || + t.key !== Oi || + this._triggerBackdropTransition(); + }) + : j.off(this._element, Ni); + } + _setResizeEvent() { + this._isShown + ? j.on(window, Di, () => this._adjustDialog()) + : j.off(window, Di); + } + _hideModal() { + (this._element.style.display = 'none'), + this._element.setAttribute('aria-hidden', !0), + this._element.removeAttribute('aria-modal'), + this._element.removeAttribute('role'), + (this._isTransitioning = !1), + this._backdrop.hide(() => { + document.body.classList.remove(Pi), + this._resetAdjustments(), + this._scrollBar.reset(), + j.trigger(this._element, Li); + }); + } + _showBackdrop(t) { + j.on(this._element, Si, (t) => { + this._ignoreBackdropClick + ? (this._ignoreBackdropClick = !1) + : t.target === t.currentTarget && + (!0 === this._config.backdrop + ? this.hide() + : 'static' === this._config.backdrop && + this._triggerBackdropTransition()); + }), + this._backdrop.show(t); + } + _isAnimated() { + return this._element.classList.contains('fade'); + } + _triggerBackdropTransition() { + if (j.trigger(this._element, 'hidePrevented.bs.modal').defaultPrevented) + return; + const { classList: t, scrollHeight: e, style: i } = this._element, + n = e > document.documentElement.clientHeight; + (!n && 'hidden' === i.overflowY) || + t.contains(Mi) || + (n || (i.overflowY = 'hidden'), + t.add(Mi), + this._queueCallback(() => { + t.remove(Mi), + n || + this._queueCallback(() => { + i.overflowY = ''; + }, this._dialog); + }, this._dialog), + this._element.focus()); + } + _adjustDialog() { + const t = + this._element.scrollHeight > document.documentElement.clientHeight, + e = this._scrollBar.getWidth(), + i = e > 0; + ((!i && t && !m()) || (i && !t && m())) && + (this._element.style.paddingLeft = `${e}px`), + ((i && !t && !m()) || (!i && t && m())) && + (this._element.style.paddingRight = `${e}px`); + } + _resetAdjustments() { + (this._element.style.paddingLeft = ''), + (this._element.style.paddingRight = ''); + } + static jQueryInterface(t, e) { + return this.each(function () { + const i = Hi.getOrCreateInstance(this, t); + if ('string' == typeof t) { + if (void 0 === i[t]) throw new TypeError(`No method named "${t}"`); + i[t](e); + } + }); + } + } + j.on( + document, + 'click.bs.modal.data-api', + '[data-bs-toggle="modal"]', + function (t) { + const e = n(this); + ['A', 'AREA'].includes(this.tagName) && t.preventDefault(), + j.one(e, xi, (t) => { + t.defaultPrevented || + j.one(e, Li, () => { + l(this) && this.focus(); + }); + }); + const i = V.findOne('.modal.show'); + i && Hi.getInstance(i).hide(), Hi.getOrCreateInstance(e).toggle(this); + } + ), + R(Hi), + g(Hi); + const Bi = 'offcanvas', + Ri = { backdrop: !0, keyboard: !0, scroll: !1 }, + Wi = { backdrop: 'boolean', keyboard: 'boolean', scroll: 'boolean' }, + $i = 'show', + zi = '.offcanvas.show', + qi = 'hidden.bs.offcanvas'; + class Fi extends B { + constructor(t, e) { + super(t), + (this._config = this._getConfig(e)), + (this._isShown = !1), + (this._backdrop = this._initializeBackDrop()), + (this._focustrap = this._initializeFocusTrap()), + this._addEventListeners(); + } + static get NAME() { + return Bi; + } + static get Default() { + return Ri; + } + toggle(t) { + return this._isShown ? this.hide() : this.show(t); + } + show(t) { + this._isShown || + j.trigger(this._element, 'show.bs.offcanvas', { relatedTarget: t }) + .defaultPrevented || + ((this._isShown = !0), + (this._element.style.visibility = 'visible'), + this._backdrop.show(), + this._config.scroll || new fi().hide(), + this._element.removeAttribute('aria-hidden'), + this._element.setAttribute('aria-modal', !0), + this._element.setAttribute('role', 'dialog'), + this._element.classList.add($i), + this._queueCallback( + () => { + this._config.scroll || this._focustrap.activate(), + j.trigger(this._element, 'shown.bs.offcanvas', { + relatedTarget: t, + }); + }, + this._element, + !0 + )); + } + hide() { + this._isShown && + (j.trigger(this._element, 'hide.bs.offcanvas').defaultPrevented || + (this._focustrap.deactivate(), + this._element.blur(), + (this._isShown = !1), + this._element.classList.remove($i), + this._backdrop.hide(), + this._queueCallback( + () => { + this._element.setAttribute('aria-hidden', !0), + this._element.removeAttribute('aria-modal'), + this._element.removeAttribute('role'), + (this._element.style.visibility = 'hidden'), + this._config.scroll || new fi().reset(), + j.trigger(this._element, qi); + }, + this._element, + !0 + ))); + } + dispose() { + this._backdrop.dispose(), this._focustrap.deactivate(), super.dispose(); + } + _getConfig(t) { + return ( + (t = { + ...Ri, + ...U.getDataAttributes(this._element), + ...('object' == typeof t ? t : {}), + }), + a(Bi, t, Wi), + t + ); + } + _initializeBackDrop() { + return new bi({ + className: 'offcanvas-backdrop', + isVisible: this._config.backdrop, + isAnimated: !0, + rootElement: this._element.parentNode, + clickCallback: () => this.hide(), + }); + } + _initializeFocusTrap() { + return new Ai({ trapElement: this._element }); + } + _addEventListeners() { + j.on(this._element, 'keydown.dismiss.bs.offcanvas', (t) => { + this._config.keyboard && 'Escape' === t.key && this.hide(); + }); + } + static jQueryInterface(t) { + return this.each(function () { + const e = Fi.getOrCreateInstance(this, t); + if ('string' == typeof t) { + if (void 0 === e[t] || t.startsWith('_') || 'constructor' === t) + throw new TypeError(`No method named "${t}"`); + e[t](this); + } + }); + } + } + j.on( + document, + 'click.bs.offcanvas.data-api', + '[data-bs-toggle="offcanvas"]', + function (t) { + const e = n(this); + if ((['A', 'AREA'].includes(this.tagName) && t.preventDefault(), c(this))) + return; + j.one(e, qi, () => { + l(this) && this.focus(); + }); + const i = V.findOne(zi); + i && i !== e && Fi.getInstance(i).hide(), + Fi.getOrCreateInstance(e).toggle(this); + } + ), + j.on(window, 'load.bs.offcanvas.data-api', () => + V.find(zi).forEach((t) => Fi.getOrCreateInstance(t).show()) + ), + R(Fi), + g(Fi); + const Ui = new Set([ + 'background', + 'cite', + 'href', + 'itemtype', + 'longdesc', + 'poster', + 'src', + 'xlink:href', + ]), + Vi = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i, + Ki = + /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i, + Xi = (t, e) => { + const i = t.nodeName.toLowerCase(); + if (e.includes(i)) + return ( + !Ui.has(i) || Boolean(Vi.test(t.nodeValue) || Ki.test(t.nodeValue)) + ); + const n = e.filter((t) => t instanceof RegExp); + for (let t = 0, e = n.length; t < e; t++) if (n[t].test(i)) return !0; + return !1; + }; + function Yi(t, e, i) { + if (!t.length) return t; + if (i && 'function' == typeof i) return i(t); + const n = new window.DOMParser().parseFromString(t, 'text/html'), + s = [].concat(...n.body.querySelectorAll('*')); + for (let t = 0, i = s.length; t < i; t++) { + const i = s[t], + n = i.nodeName.toLowerCase(); + if (!Object.keys(e).includes(n)) { + i.remove(); + continue; + } + const o = [].concat(...i.attributes), + r = [].concat(e['*'] || [], e[n] || []); + o.forEach((t) => { + Xi(t, r) || i.removeAttribute(t.nodeName); + }); + } + return n.body.innerHTML; + } + const Qi = 'tooltip', + Gi = new Set(['sanitize', 'allowList', 'sanitizeFn']), + Zi = { + animation: 'boolean', + template: 'string', + title: '(string|element|function)', + trigger: 'string', + delay: '(number|object)', + html: 'boolean', + selector: '(string|boolean)', + placement: '(string|function)', + offset: '(array|string|function)', + container: '(string|element|boolean)', + fallbackPlacements: 'array', + boundary: '(string|element)', + customClass: '(string|function)', + sanitize: 'boolean', + sanitizeFn: '(null|function)', + allowList: 'object', + popperConfig: '(null|object|function)', + }, + Ji = { + AUTO: 'auto', + TOP: 'top', + RIGHT: m() ? 'left' : 'right', + BOTTOM: 'bottom', + LEFT: m() ? 'right' : 'left', + }, + tn = { + animation: !0, + template: + '', + trigger: 'hover focus', + title: '', + delay: 0, + html: !1, + selector: !1, + placement: 'top', + offset: [0, 0], + container: !1, + fallbackPlacements: ['top', 'right', 'bottom', 'left'], + boundary: 'clippingParents', + customClass: '', + sanitize: !0, + sanitizeFn: null, + allowList: { + '*': ['class', 'dir', 'id', 'lang', 'role', /^aria-[\w-]*$/i], + a: ['target', 'href', 'title', 'rel'], + area: [], + b: [], + br: [], + col: [], + code: [], + div: [], + em: [], + hr: [], + h1: [], + h2: [], + h3: [], + h4: [], + h5: [], + h6: [], + i: [], + img: ['src', 'srcset', 'alt', 'title', 'width', 'height'], + li: [], + ol: [], + p: [], + pre: [], + s: [], + small: [], + span: [], + sub: [], + sup: [], + strong: [], + u: [], + ul: [], + }, + popperConfig: null, + }, + en = { + HIDE: 'hide.bs.tooltip', + HIDDEN: 'hidden.bs.tooltip', + SHOW: 'show.bs.tooltip', + SHOWN: 'shown.bs.tooltip', + INSERTED: 'inserted.bs.tooltip', + CLICK: 'click.bs.tooltip', + FOCUSIN: 'focusin.bs.tooltip', + FOCUSOUT: 'focusout.bs.tooltip', + MOUSEENTER: 'mouseenter.bs.tooltip', + MOUSELEAVE: 'mouseleave.bs.tooltip', + }, + nn = 'fade', + sn = 'show', + on = 'show', + rn = 'out', + an = '.tooltip-inner', + ln = '.modal', + cn = 'hide.bs.modal', + hn = 'hover', + dn = 'focus'; + class un extends B { + constructor(t, e) { + if (void 0 === Fe) + throw new TypeError( + "Bootstrap's tooltips require Popper (https://popper.js.org)" + ); + super(t), + (this._isEnabled = !0), + (this._timeout = 0), + (this._hoverState = ''), + (this._activeTrigger = {}), + (this._popper = null), + (this._config = this._getConfig(e)), + (this.tip = null), + this._setListeners(); + } + static get Default() { + return tn; + } + static get NAME() { + return Qi; + } + static get Event() { + return en; + } + static get DefaultType() { + return Zi; + } + enable() { + this._isEnabled = !0; + } + disable() { + this._isEnabled = !1; + } + toggleEnabled() { + this._isEnabled = !this._isEnabled; + } + toggle(t) { + if (this._isEnabled) + if (t) { + const e = this._initializeOnDelegatedTarget(t); + (e._activeTrigger.click = !e._activeTrigger.click), + e._isWithActiveTrigger() ? e._enter(null, e) : e._leave(null, e); + } else { + if (this.getTipElement().classList.contains(sn)) + return void this._leave(null, this); + this._enter(null, this); + } + } + dispose() { + clearTimeout(this._timeout), + j.off(this._element.closest(ln), cn, this._hideModalHandler), + this.tip && this.tip.remove(), + this._disposePopper(), + super.dispose(); + } + show() { + if ('none' === this._element.style.display) + throw new Error('Please use show on visible elements'); + if (!this.isWithContent() || !this._isEnabled) return; + const t = j.trigger(this._element, this.constructor.Event.SHOW), + e = h(this._element), + i = + null === e + ? this._element.ownerDocument.documentElement.contains( + this._element + ) + : e.contains(this._element); + if (t.defaultPrevented || !i) return; + 'tooltip' === this.constructor.NAME && + this.tip && + this.getTitle() !== this.tip.querySelector(an).innerHTML && + (this._disposePopper(), this.tip.remove(), (this.tip = null)); + const n = this.getTipElement(), + s = ((t) => { + do { + t += Math.floor(1e6 * Math.random()); + } while (document.getElementById(t)); + return t; + })(this.constructor.NAME); + n.setAttribute('id', s), + this._element.setAttribute('aria-describedby', s), + this._config.animation && n.classList.add(nn); + const o = + 'function' == typeof this._config.placement + ? this._config.placement.call(this, n, this._element) + : this._config.placement, + r = this._getAttachment(o); + this._addAttachmentClass(r); + const { container: a } = this._config; + H.set(n, this.constructor.DATA_KEY, this), + this._element.ownerDocument.documentElement.contains(this.tip) || + (a.append(n), + j.trigger(this._element, this.constructor.Event.INSERTED)), + this._popper + ? this._popper.update() + : (this._popper = qe(this._element, n, this._getPopperConfig(r))), + n.classList.add(sn); + const l = this._resolvePossibleFunction(this._config.customClass); + l && n.classList.add(...l.split(' ')), + 'ontouchstart' in document.documentElement && + [].concat(...document.body.children).forEach((t) => { + j.on(t, 'mouseover', d); + }); + const c = this.tip.classList.contains(nn); + this._queueCallback( + () => { + const t = this._hoverState; + (this._hoverState = null), + j.trigger(this._element, this.constructor.Event.SHOWN), + t === rn && this._leave(null, this); + }, + this.tip, + c + ); + } + hide() { + if (!this._popper) return; + const t = this.getTipElement(); + if ( + j.trigger(this._element, this.constructor.Event.HIDE).defaultPrevented + ) + return; + t.classList.remove(sn), + 'ontouchstart' in document.documentElement && + [] + .concat(...document.body.children) + .forEach((t) => j.off(t, 'mouseover', d)), + (this._activeTrigger.click = !1), + (this._activeTrigger.focus = !1), + (this._activeTrigger.hover = !1); + const e = this.tip.classList.contains(nn); + this._queueCallback( + () => { + this._isWithActiveTrigger() || + (this._hoverState !== on && t.remove(), + this._cleanTipClass(), + this._element.removeAttribute('aria-describedby'), + j.trigger(this._element, this.constructor.Event.HIDDEN), + this._disposePopper()); + }, + this.tip, + e + ), + (this._hoverState = ''); + } + update() { + null !== this._popper && this._popper.update(); + } + isWithContent() { + return Boolean(this.getTitle()); + } + getTipElement() { + if (this.tip) return this.tip; + const t = document.createElement('div'); + t.innerHTML = this._config.template; + const e = t.children[0]; + return ( + this.setContent(e), e.classList.remove(nn, sn), (this.tip = e), this.tip + ); + } + setContent(t) { + this._sanitizeAndSetContent(t, this.getTitle(), an); + } + _sanitizeAndSetContent(t, e, i) { + const n = V.findOne(i, t); + e || !n ? this.setElementContent(n, e) : n.remove(); + } + setElementContent(t, e) { + if (null !== t) + return o(e) + ? ((e = r(e)), + void (this._config.html + ? e.parentNode !== t && ((t.innerHTML = ''), t.append(e)) + : (t.textContent = e.textContent))) + : void (this._config.html + ? (this._config.sanitize && + (e = Yi(e, this._config.allowList, this._config.sanitizeFn)), + (t.innerHTML = e)) + : (t.textContent = e)); + } + getTitle() { + const t = + this._element.getAttribute('data-bs-original-title') || + this._config.title; + return this._resolvePossibleFunction(t); + } + updateAttachment(t) { + return 'right' === t ? 'end' : 'left' === t ? 'start' : t; + } + _initializeOnDelegatedTarget(t, e) { + return ( + e || + this.constructor.getOrCreateInstance( + t.delegateTarget, + this._getDelegateConfig() + ) + ); + } + _getOffset() { + const { offset: t } = this._config; + return 'string' == typeof t + ? t.split(',').map((t) => Number.parseInt(t, 10)) + : 'function' == typeof t + ? (e) => t(e, this._element) + : t; + } + _resolvePossibleFunction(t) { + return 'function' == typeof t ? t.call(this._element) : t; + } + _getPopperConfig(t) { + const e = { + placement: t, + modifiers: [ + { + name: 'flip', + options: { fallbackPlacements: this._config.fallbackPlacements }, + }, + { name: 'offset', options: { offset: this._getOffset() } }, + { + name: 'preventOverflow', + options: { boundary: this._config.boundary }, + }, + { + name: 'arrow', + options: { element: `.${this.constructor.NAME}-arrow` }, + }, + { + name: 'onChange', + enabled: !0, + phase: 'afterWrite', + fn: (t) => this._handlePopperPlacementChange(t), + }, + ], + onFirstUpdate: (t) => { + t.options.placement !== t.placement && + this._handlePopperPlacementChange(t); + }, + }; + return { + ...e, + ...('function' == typeof this._config.popperConfig + ? this._config.popperConfig(e) + : this._config.popperConfig), + }; + } + _addAttachmentClass(t) { + this.getTipElement().classList.add( + `${this._getBasicClassPrefix()}-${this.updateAttachment(t)}` + ); + } + _getAttachment(t) { + return Ji[t.toUpperCase()]; + } + _setListeners() { + this._config.trigger.split(' ').forEach((t) => { + if ('click' === t) + j.on( + this._element, + this.constructor.Event.CLICK, + this._config.selector, + (t) => this.toggle(t) + ); + else if ('manual' !== t) { + const e = + t === hn + ? this.constructor.Event.MOUSEENTER + : this.constructor.Event.FOCUSIN, + i = + t === hn + ? this.constructor.Event.MOUSELEAVE + : this.constructor.Event.FOCUSOUT; + j.on(this._element, e, this._config.selector, (t) => this._enter(t)), + j.on(this._element, i, this._config.selector, (t) => + this._leave(t) + ); + } + }), + (this._hideModalHandler = () => { + this._element && this.hide(); + }), + j.on(this._element.closest(ln), cn, this._hideModalHandler), + this._config.selector + ? (this._config = { + ...this._config, + trigger: 'manual', + selector: '', + }) + : this._fixTitle(); + } + _fixTitle() { + const t = this._element.getAttribute('title'), + e = typeof this._element.getAttribute('data-bs-original-title'); + (t || 'string' !== e) && + (this._element.setAttribute('data-bs-original-title', t || ''), + !t || + this._element.getAttribute('aria-label') || + this._element.textContent || + this._element.setAttribute('aria-label', t), + this._element.setAttribute('title', '')); + } + _enter(t, e) { + (e = this._initializeOnDelegatedTarget(t, e)), + t && (e._activeTrigger['focusin' === t.type ? dn : hn] = !0), + e.getTipElement().classList.contains(sn) || e._hoverState === on + ? (e._hoverState = on) + : (clearTimeout(e._timeout), + (e._hoverState = on), + e._config.delay && e._config.delay.show + ? (e._timeout = setTimeout(() => { + e._hoverState === on && e.show(); + }, e._config.delay.show)) + : e.show()); + } + _leave(t, e) { + (e = this._initializeOnDelegatedTarget(t, e)), + t && + (e._activeTrigger['focusout' === t.type ? dn : hn] = + e._element.contains(t.relatedTarget)), + e._isWithActiveTrigger() || + (clearTimeout(e._timeout), + (e._hoverState = rn), + e._config.delay && e._config.delay.hide + ? (e._timeout = setTimeout(() => { + e._hoverState === rn && e.hide(); + }, e._config.delay.hide)) + : e.hide()); + } + _isWithActiveTrigger() { + for (const t in this._activeTrigger) + if (this._activeTrigger[t]) return !0; + return !1; + } + _getConfig(t) { + const e = U.getDataAttributes(this._element); + return ( + Object.keys(e).forEach((t) => { + Gi.has(t) && delete e[t]; + }), + ((t = { + ...this.constructor.Default, + ...e, + ...('object' == typeof t && t ? t : {}), + }).container = !1 === t.container ? document.body : r(t.container)), + 'number' == typeof t.delay && + (t.delay = { show: t.delay, hide: t.delay }), + 'number' == typeof t.title && (t.title = t.title.toString()), + 'number' == typeof t.content && (t.content = t.content.toString()), + a(Qi, t, this.constructor.DefaultType), + t.sanitize && (t.template = Yi(t.template, t.allowList, t.sanitizeFn)), + t + ); + } + _getDelegateConfig() { + const t = {}; + for (const e in this._config) + this.constructor.Default[e] !== this._config[e] && + (t[e] = this._config[e]); + return t; + } + _cleanTipClass() { + const t = this.getTipElement(), + e = new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`, 'g'), + i = t.getAttribute('class').match(e); + null !== i && + i.length > 0 && + i.map((t) => t.trim()).forEach((e) => t.classList.remove(e)); + } + _getBasicClassPrefix() { + return 'bs-tooltip'; + } + _handlePopperPlacementChange(t) { + const { state: e } = t; + e && + ((this.tip = e.elements.popper), + this._cleanTipClass(), + this._addAttachmentClass(this._getAttachment(e.placement))); + } + _disposePopper() { + this._popper && (this._popper.destroy(), (this._popper = null)); + } + static jQueryInterface(t) { + return this.each(function () { + const e = un.getOrCreateInstance(this, t); + if ('string' == typeof t) { + if (void 0 === e[t]) throw new TypeError(`No method named "${t}"`); + e[t](); + } + }); + } + } + g(un); + const fn = { + ...un.Default, + placement: 'right', + offset: [0, 8], + trigger: 'click', + content: '', + template: + '', + }, + pn = { ...un.DefaultType, content: '(string|element|function)' }, + mn = { + HIDE: 'hide.bs.popover', + HIDDEN: 'hidden.bs.popover', + SHOW: 'show.bs.popover', + SHOWN: 'shown.bs.popover', + INSERTED: 'inserted.bs.popover', + CLICK: 'click.bs.popover', + FOCUSIN: 'focusin.bs.popover', + FOCUSOUT: 'focusout.bs.popover', + MOUSEENTER: 'mouseenter.bs.popover', + MOUSELEAVE: 'mouseleave.bs.popover', + }; + class gn extends un { + static get Default() { + return fn; + } + static get NAME() { + return 'popover'; + } + static get Event() { + return mn; + } + static get DefaultType() { + return pn; + } + isWithContent() { + return this.getTitle() || this._getContent(); + } + setContent(t) { + this._sanitizeAndSetContent(t, this.getTitle(), '.popover-header'), + this._sanitizeAndSetContent(t, this._getContent(), '.popover-body'); + } + _getContent() { + return this._resolvePossibleFunction(this._config.content); + } + _getBasicClassPrefix() { + return 'bs-popover'; + } + static jQueryInterface(t) { + return this.each(function () { + const e = gn.getOrCreateInstance(this, t); + if ('string' == typeof t) { + if (void 0 === e[t]) throw new TypeError(`No method named "${t}"`); + e[t](); + } + }); + } + } + g(gn); + const _n = 'scrollspy', + bn = { offset: 10, method: 'auto', target: '' }, + vn = { offset: 'number', method: 'string', target: '(string|element)' }, + yn = 'active', + wn = '.nav-link, .list-group-item, .dropdown-item', + En = 'position'; + class An extends B { + constructor(t, e) { + super(t), + (this._scrollElement = + 'BODY' === this._element.tagName ? window : this._element), + (this._config = this._getConfig(e)), + (this._offsets = []), + (this._targets = []), + (this._activeTarget = null), + (this._scrollHeight = 0), + j.on(this._scrollElement, 'scroll.bs.scrollspy', () => this._process()), + this.refresh(), + this._process(); + } + static get Default() { + return bn; + } + static get NAME() { + return _n; + } + refresh() { + const t = + this._scrollElement === this._scrollElement.window ? 'offset' : En, + e = 'auto' === this._config.method ? t : this._config.method, + n = e === En ? this._getScrollTop() : 0; + (this._offsets = []), + (this._targets = []), + (this._scrollHeight = this._getScrollHeight()), + V.find(wn, this._config.target) + .map((t) => { + const s = i(t), + o = s ? V.findOne(s) : null; + if (o) { + const t = o.getBoundingClientRect(); + if (t.width || t.height) return [U[e](o).top + n, s]; + } + return null; + }) + .filter((t) => t) + .sort((t, e) => t[0] - e[0]) + .forEach((t) => { + this._offsets.push(t[0]), this._targets.push(t[1]); + }); + } + dispose() { + j.off(this._scrollElement, '.bs.scrollspy'), super.dispose(); + } + _getConfig(t) { + return ( + ((t = { + ...bn, + ...U.getDataAttributes(this._element), + ...('object' == typeof t && t ? t : {}), + }).target = r(t.target) || document.documentElement), + a(_n, t, vn), + t + ); + } + _getScrollTop() { + return this._scrollElement === window + ? this._scrollElement.pageYOffset + : this._scrollElement.scrollTop; + } + _getScrollHeight() { + return ( + this._scrollElement.scrollHeight || + Math.max( + document.body.scrollHeight, + document.documentElement.scrollHeight + ) + ); + } + _getOffsetHeight() { + return this._scrollElement === window + ? window.innerHeight + : this._scrollElement.getBoundingClientRect().height; + } + _process() { + const t = this._getScrollTop() + this._config.offset, + e = this._getScrollHeight(), + i = this._config.offset + e - this._getOffsetHeight(); + if ((this._scrollHeight !== e && this.refresh(), t >= i)) { + const t = this._targets[this._targets.length - 1]; + this._activeTarget !== t && this._activate(t); + } else { + if (this._activeTarget && t < this._offsets[0] && this._offsets[0] > 0) + return (this._activeTarget = null), void this._clear(); + for (let e = this._offsets.length; e--; ) + this._activeTarget !== this._targets[e] && + t >= this._offsets[e] && + (void 0 === this._offsets[e + 1] || t < this._offsets[e + 1]) && + this._activate(this._targets[e]); + } + } + _activate(t) { + (this._activeTarget = t), this._clear(); + const e = wn + .split(',') + .map((e) => `${e}[data-bs-target="${t}"],${e}[href="${t}"]`), + i = V.findOne(e.join(','), this._config.target); + i.classList.add(yn), + i.classList.contains('dropdown-item') + ? V.findOne('.dropdown-toggle', i.closest('.dropdown')).classList.add( + yn + ) + : V.parents(i, '.nav, .list-group').forEach((t) => { + V.prev(t, '.nav-link, .list-group-item').forEach((t) => + t.classList.add(yn) + ), + V.prev(t, '.nav-item').forEach((t) => { + V.children(t, '.nav-link').forEach((t) => + t.classList.add(yn) + ); + }); + }), + j.trigger(this._scrollElement, 'activate.bs.scrollspy', { + relatedTarget: t, + }); + } + _clear() { + V.find(wn, this._config.target) + .filter((t) => t.classList.contains(yn)) + .forEach((t) => t.classList.remove(yn)); + } + static jQueryInterface(t) { + return this.each(function () { + const e = An.getOrCreateInstance(this, t); + if ('string' == typeof t) { + if (void 0 === e[t]) throw new TypeError(`No method named "${t}"`); + e[t](); + } + }); + } + } + j.on(window, 'load.bs.scrollspy.data-api', () => { + V.find('[data-bs-spy="scroll"]').forEach((t) => new An(t)); + }), + g(An); + const Tn = 'active', + On = 'fade', + Cn = 'show', + kn = '.active', + Ln = ':scope > li > .active'; + class xn extends B { + static get NAME() { + return 'tab'; + } + show() { + if ( + this._element.parentNode && + this._element.parentNode.nodeType === Node.ELEMENT_NODE && + this._element.classList.contains(Tn) + ) + return; + let t; + const e = n(this._element), + i = this._element.closest('.nav, .list-group'); + if (i) { + const e = 'UL' === i.nodeName || 'OL' === i.nodeName ? Ln : kn; + (t = V.find(e, i)), (t = t[t.length - 1]); + } + const s = t + ? j.trigger(t, 'hide.bs.tab', { relatedTarget: this._element }) + : null; + if ( + j.trigger(this._element, 'show.bs.tab', { relatedTarget: t }) + .defaultPrevented || + (null !== s && s.defaultPrevented) + ) + return; + this._activate(this._element, i); + const o = () => { + j.trigger(t, 'hidden.bs.tab', { relatedTarget: this._element }), + j.trigger(this._element, 'shown.bs.tab', { relatedTarget: t }); + }; + e ? this._activate(e, e.parentNode, o) : o(); + } + _activate(t, e, i) { + const n = ( + !e || ('UL' !== e.nodeName && 'OL' !== e.nodeName) + ? V.children(e, kn) + : V.find(Ln, e) + )[0], + s = i && n && n.classList.contains(On), + o = () => this._transitionComplete(t, n, i); + n && s ? (n.classList.remove(Cn), this._queueCallback(o, t, !0)) : o(); + } + _transitionComplete(t, e, i) { + if (e) { + e.classList.remove(Tn); + const t = V.findOne(':scope > .dropdown-menu .active', e.parentNode); + t && t.classList.remove(Tn), + 'tab' === e.getAttribute('role') && + e.setAttribute('aria-selected', !1); + } + t.classList.add(Tn), + 'tab' === t.getAttribute('role') && t.setAttribute('aria-selected', !0), + u(t), + t.classList.contains(On) && t.classList.add(Cn); + let n = t.parentNode; + if ( + (n && 'LI' === n.nodeName && (n = n.parentNode), + n && n.classList.contains('dropdown-menu')) + ) { + const e = t.closest('.dropdown'); + e && V.find('.dropdown-toggle', e).forEach((t) => t.classList.add(Tn)), + t.setAttribute('aria-expanded', !0); + } + i && i(); + } + static jQueryInterface(t) { + return this.each(function () { + const e = xn.getOrCreateInstance(this); + if ('string' == typeof t) { + if (void 0 === e[t]) throw new TypeError(`No method named "${t}"`); + e[t](); + } + }); + } + } + j.on( + document, + 'click.bs.tab.data-api', + '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]', + function (t) { + ['A', 'AREA'].includes(this.tagName) && t.preventDefault(), + c(this) || xn.getOrCreateInstance(this).show(); + } + ), + g(xn); + const Dn = 'toast', + Sn = 'hide', + Nn = 'show', + In = 'showing', + Pn = { animation: 'boolean', autohide: 'boolean', delay: 'number' }, + jn = { animation: !0, autohide: !0, delay: 5e3 }; + class Mn extends B { + constructor(t, e) { + super(t), + (this._config = this._getConfig(e)), + (this._timeout = null), + (this._hasMouseInteraction = !1), + (this._hasKeyboardInteraction = !1), + this._setListeners(); + } + static get DefaultType() { + return Pn; + } + static get Default() { + return jn; + } + static get NAME() { + return Dn; + } + show() { + j.trigger(this._element, 'show.bs.toast').defaultPrevented || + (this._clearTimeout(), + this._config.animation && this._element.classList.add('fade'), + this._element.classList.remove(Sn), + u(this._element), + this._element.classList.add(Nn), + this._element.classList.add(In), + this._queueCallback( + () => { + this._element.classList.remove(In), + j.trigger(this._element, 'shown.bs.toast'), + this._maybeScheduleHide(); + }, + this._element, + this._config.animation + )); + } + hide() { + this._element.classList.contains(Nn) && + (j.trigger(this._element, 'hide.bs.toast').defaultPrevented || + (this._element.classList.add(In), + this._queueCallback( + () => { + this._element.classList.add(Sn), + this._element.classList.remove(In), + this._element.classList.remove(Nn), + j.trigger(this._element, 'hidden.bs.toast'); + }, + this._element, + this._config.animation + ))); + } + dispose() { + this._clearTimeout(), + this._element.classList.contains(Nn) && + this._element.classList.remove(Nn), + super.dispose(); + } + _getConfig(t) { + return ( + (t = { + ...jn, + ...U.getDataAttributes(this._element), + ...('object' == typeof t && t ? t : {}), + }), + a(Dn, t, this.constructor.DefaultType), + t + ); + } + _maybeScheduleHide() { + this._config.autohide && + (this._hasMouseInteraction || + this._hasKeyboardInteraction || + (this._timeout = setTimeout(() => { + this.hide(); + }, this._config.delay))); + } + _onInteraction(t, e) { + switch (t.type) { + case 'mouseover': + case 'mouseout': + this._hasMouseInteraction = e; + break; + case 'focusin': + case 'focusout': + this._hasKeyboardInteraction = e; + } + if (e) return void this._clearTimeout(); + const i = t.relatedTarget; + this._element === i || + this._element.contains(i) || + this._maybeScheduleHide(); + } + _setListeners() { + j.on(this._element, 'mouseover.bs.toast', (t) => + this._onInteraction(t, !0) + ), + j.on(this._element, 'mouseout.bs.toast', (t) => + this._onInteraction(t, !1) + ), + j.on(this._element, 'focusin.bs.toast', (t) => + this._onInteraction(t, !0) + ), + j.on(this._element, 'focusout.bs.toast', (t) => + this._onInteraction(t, !1) + ); + } + _clearTimeout() { + clearTimeout(this._timeout), (this._timeout = null); + } + static jQueryInterface(t) { + return this.each(function () { + const e = Mn.getOrCreateInstance(this, t); + if ('string' == typeof t) { + if (void 0 === e[t]) throw new TypeError(`No method named "${t}"`); + e[t](this); + } + }); + } + } + return ( + R(Mn), + g(Mn), + { + Alert: W, + Button: z, + Carousel: st, + Collapse: pt, + Dropdown: hi, + Modal: Hi, + Offcanvas: Fi, + Popover: gn, + ScrollSpy: An, + Tab: xn, + Toast: Mn, + Tooltip: un, + } + ); +}); +//# sourceMappingURL=bootstrap.bundle.min.js.map diff --git a/rootfs/usr/share/httpd/default/js/cookieconsent.js b/rootfs/usr/share/httpd/default/js/cookieconsent.js new file mode 100644 index 0000000..765ddad --- /dev/null +++ b/rootfs/usr/share/httpd/default/js/cookieconsent.js @@ -0,0 +1,964 @@ +!(function (e) { + if (!e.hasInitialised) { + var t = { + escapeRegExp: function (e) { + return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&'); + }, + hasClass: function (e, t) { + var i = ' '; + return ( + 1 === e.nodeType && + (i + e.className + i).replace(/[\n\t]/g, i).indexOf(i + t + i) >= 0 + ); + }, + addClass: function (e, t) { + e.className += ' ' + t; + }, + removeClass: function (e, t) { + var i = new RegExp('\\b' + this.escapeRegExp(t) + '\\b'); + e.className = e.className.replace(i, ''); + }, + interpolateString: function (e, t) { + var i = /{{([a-z][a-z0-9\-_]*)}}/gi; + return e.replace(i, function (e) { + return t(arguments[1]) || ''; + }); + }, + getCookie: function (e) { + var t = '; ' + document.cookie, + i = t.split('; ' + e + '='); + return 2 != i.length ? void 0 : i.pop().split(';').shift(); + }, + setCookie: function (e, t, i, n, o) { + var s = new Date(); + s.setDate(s.getDate() + (i || 365)); + var r = [ + e + '=' + t, + 'expires=' + s.toUTCString(), + 'path=' + (o || '/'), + ]; + n && r.push('domain=' + n), (document.cookie = r.join(';')); + }, + deepExtend: function (e, t) { + for (var i in t) + t.hasOwnProperty(i) && + (i in e && this.isPlainObject(e[i]) && this.isPlainObject(t[i]) + ? this.deepExtend(e[i], t[i]) + : (e[i] = t[i])); + return e; + }, + throttle: function (e, t) { + var i = !1; + return function () { + i || + (e.apply(this, arguments), + (i = !0), + setTimeout(function () { + i = !1; + }, t)); + }; + }, + hash: function (e) { + var t, + i, + n, + o = 0; + if (0 === e.length) return o; + for (t = 0, n = e.length; t < n; ++t) + (i = e.charCodeAt(t)), (o = (o << 5) - o + i), (o |= 0); + return o; + }, + normaliseHex: function (e) { + return ( + '#' == e[0] && (e = e.substr(1)), + 3 == e.length && (e = e[0] + e[0] + e[1] + e[1] + e[2] + e[2]), + e + ); + }, + getContrast: function (e) { + e = this.normaliseHex(e); + var t = parseInt(e.substr(0, 2), 16), + i = parseInt(e.substr(2, 2), 16), + n = parseInt(e.substr(4, 2), 16), + o = (299 * t + 587 * i + 114 * n) / 1e3; + return o >= 128 ? '#000' : '#fff'; + }, + getLuminance: function (e) { + var t = parseInt(this.normaliseHex(e), 16), + i = 38, + n = (t >> 16) + i, + o = ((t >> 8) & 255) + i, + s = (255 & t) + i, + r = ( + 16777216 + + 65536 * (n < 255 ? (n < 1 ? 0 : n) : 255) + + 256 * (o < 255 ? (o < 1 ? 0 : o) : 255) + + (s < 255 ? (s < 1 ? 0 : s) : 255) + ) + .toString(16) + .slice(1); + return '#' + r; + }, + isMobile: function () { + return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test( + navigator.userAgent + ); + }, + isPlainObject: function (e) { + return 'object' == typeof e && null !== e && e.constructor == Object; + }, + }; + (e.status = { deny: 'deny', allow: 'allow', dismiss: 'dismiss' }), + (e.transitionEnd = (function () { + var e = document.createElement('div'), + t = { + t: 'transitionend', + OT: 'oTransitionEnd', + msT: 'MSTransitionEnd', + MozT: 'transitionend', + WebkitT: 'webkitTransitionEnd', + }; + for (var i in t) + if ( + t.hasOwnProperty(i) && + 'undefined' != typeof e.style[i + 'ransition'] + ) + return t[i]; + return ''; + })()), + (e.hasTransition = !!e.transitionEnd); + var i = Object.keys(e.status).map(t.escapeRegExp); + (e.customStyles = {}), + (e.Popup = (function () { + function n() { + this.initialise.apply(this, arguments); + } + function o(e) { + (this.openingTimeout = null), t.removeClass(e, 'cc-invisible'); + } + function s(t) { + (t.style.display = 'none'), + t.removeEventListener(e.transitionEnd, this.afterTransition), + (this.afterTransition = null); + } + function r() { + var t = this.options.onInitialise.bind(this); + if (!window.navigator.cookieEnabled) return t(e.status.deny), !0; + if (window.CookiesOK || window.navigator.CookiesOK) + return t(e.status.allow), !0; + var i = Object.keys(e.status), + n = this.getStatus(), + o = i.indexOf(n) >= 0; + return o && t(n), o; + } + function a() { + var e = this.options.position.split('-'), + t = []; + return ( + e.forEach(function (e) { + t.push('cc-' + e); + }), + t + ); + } + function c() { + var e = this.options, + i = + 'top' == e.position || 'bottom' == e.position + ? 'banner' + : 'floating'; + t.isMobile() && (i = 'floating'); + var n = ['cc-' + i, 'cc-type-' + e.type, 'cc-theme-' + e.theme]; + e['static'] && n.push('cc-static'), n.push.apply(n, a.call(this)); + p.call(this, this.options.palette); + return ( + this.customStyleSelector && n.push(this.customStyleSelector), n + ); + } + function l() { + var e = {}, + i = this.options; + i.showLink || + ((i.elements.link = ''), + (i.elements.messagelink = i.elements.message)), + Object.keys(i.elements).forEach(function (n) { + e[n] = t.interpolateString(i.elements[n], function (e) { + var t = i.content[e]; + return e && 'string' == typeof t && t.length ? t : ''; + }); + }); + var n = i.compliance[i.type]; + n || (n = i.compliance.info), + (e.compliance = t.interpolateString(n, function (t) { + return e[t]; + })); + var o = i.layouts[i.layout]; + return ( + o || (o = i.layouts.basic), + t.interpolateString(o, function (t) { + return e[t]; + }) + ); + } + function u(i) { + var n = this.options, + o = document.createElement('div'), + s = + n.container && 1 === n.container.nodeType + ? n.container + : document.body; + o.innerHTML = i; + var r = o.children[0]; + return ( + (r.style.display = 'none'), + t.hasClass(r, 'cc-window') && + e.hasTransition && + t.addClass(r, 'cc-invisible'), + (this.onButtonClick = h.bind(this)), + r.addEventListener('click', this.onButtonClick), + n.autoAttach && + (s.firstChild + ? s.insertBefore(r, s.firstChild) + : s.appendChild(r)), + r + ); + } + function h(n) { + var o = n.target; + if (t.hasClass(o, 'cc-btn')) { + var s = o.className.match( + new RegExp('\\bcc-(' + i.join('|') + ')\\b') + ), + r = (s && s[1]) || !1; + r && (this.setStatus(r), this.close(!0)); + } + t.hasClass(o, 'cc-close') && + (this.setStatus(e.status.dismiss), this.close(!0)), + t.hasClass(o, 'cc-revoke') && this.revokeChoice(); + } + function p(e) { + var i = t.hash(JSON.stringify(e)), + n = 'cc-color-override-' + i, + o = t.isPlainObject(e); + return ( + (this.customStyleSelector = o ? n : null), o && d(i, e, '.' + n), o + ); + } + function d(i, n, o) { + if (e.customStyles[i]) return void ++e.customStyles[i].references; + var s = {}, + r = n.popup, + a = n.button, + c = n.highlight; + r && + ((r.text = r.text ? r.text : t.getContrast(r.background)), + (r.link = r.link ? r.link : r.text), + (s[o + '.cc-window'] = [ + 'color: ' + r.text, + 'background-color: ' + r.background, + ]), + (s[o + '.cc-revoke'] = [ + 'color: ' + r.text, + 'background-color: ' + r.background, + ]), + (s[ + o + + ' .cc-link,' + + o + + ' .cc-link:active,' + + o + + ' .cc-link:visited' + ] = ['color: ' + r.link]), + a && + ((a.text = a.text ? a.text : t.getContrast(a.background)), + (a.border = a.border ? a.border : 'transparent'), + (s[o + ' .cc-btn'] = [ + 'color: ' + a.text, + 'border-color: ' + a.border, + 'background-color: ' + a.background, + ]), + 'transparent' != a.background && + (s[o + ' .cc-btn:hover, ' + o + ' .cc-btn:focus'] = [ + 'background-color: ' + v(a.background), + ]), + c + ? ((c.text = c.text ? c.text : t.getContrast(c.background)), + (c.border = c.border ? c.border : 'transparent'), + (s[o + ' .cc-highlight .cc-btn:first-child'] = [ + 'color: ' + c.text, + 'border-color: ' + c.border, + 'background-color: ' + c.background, + ])) + : (s[o + ' .cc-highlight .cc-btn:first-child'] = [ + 'color: ' + r.text, + ]))); + var l = document.createElement('style'); + document.head.appendChild(l), + (e.customStyles[i] = { references: 1, element: l.sheet }); + var u = -1; + for (var h in s) + s.hasOwnProperty(h) && + l.sheet.insertRule(h + '{' + s[h].join(';') + '}', ++u); + } + function v(e) { + return ( + (e = t.normaliseHex(e)), '000000' == e ? '#222' : t.getLuminance(e) + ); + } + function f(i) { + if (t.isPlainObject(i)) { + var n = t.hash(JSON.stringify(i)), + o = e.customStyles[n]; + if (o && !--o.references) { + var s = o.element.ownerNode; + s && s.parentNode && s.parentNode.removeChild(s), + (e.customStyles[n] = null); + } + } + } + function m(e, t) { + for (var i = 0, n = e.length; i < n; ++i) { + var o = e[i]; + if ( + (o instanceof RegExp && o.test(t)) || + ('string' == typeof o && o.length && o === t) + ) + return !0; + } + return !1; + } + function b() { + var t = this.setStatus.bind(this), + i = this.options.dismissOnTimeout; + 'number' == typeof i && + i >= 0 && + (this.dismissTimeout = window.setTimeout(function () { + t(e.status.dismiss); + }, Math.floor(i))); + var n = this.options.dismissOnScroll; + if ('number' == typeof n && n >= 0) { + var o = function (i) { + window.pageYOffset > Math.floor(n) && + (t(e.status.dismiss), + window.removeEventListener('scroll', o), + (this.onWindowScroll = null)); + }; + (this.onWindowScroll = o), window.addEventListener('scroll', o); + } + } + function y() { + if ( + ('info' != this.options.type && (this.options.revokable = !0), + t.isMobile() && (this.options.animateRevokable = !1), + this.options.revokable) + ) { + var e = a.call(this); + this.options.animateRevokable && e.push('cc-animate'), + this.customStyleSelector && e.push(this.customStyleSelector); + var i = this.options.revokeBtn.replace('{{classes}}', e.join(' ')); + this.revokeBtn = u.call(this, i); + var n = this.revokeBtn; + if (this.options.animateRevokable) { + var o = t.throttle(function (e) { + var i = !1, + o = 20, + s = window.innerHeight - 20; + t.hasClass(n, 'cc-top') && e.clientY < o && (i = !0), + t.hasClass(n, 'cc-bottom') && e.clientY > s && (i = !0), + i + ? t.hasClass(n, 'cc-active') || t.addClass(n, 'cc-active') + : t.hasClass(n, 'cc-active') && + t.removeClass(n, 'cc-active'); + }, 200); + (this.onMouseMove = o), window.addEventListener('mousemove', o); + } + } + } + var g = { + enabled: !0, + container: null, + cookie: { + name: 'cookieconsent_status', + path: '/', + domain: '', + expiryDays: 365, + }, + onPopupOpen: function () {}, + onPopupClose: function () {}, + onInitialise: function (e) {}, + onStatusChange: function (e, t) {}, + onRevokeChoice: function () {}, + content: { + header: 'Cookies used on the website!', + message: + 'This website uses cookies to ensure you get the best experience on our website.', + dismiss: 'Got it!', + allow: 'Allow cookies', + deny: 'Decline', + link: 'Learn more', + href: 'http://cookiesandyou.com', + close: '❌', + }, + elements: { + header: '{{header}} ', + message: + '{{message}}', + messagelink: + '{{message}} {{link}}', + dismiss: + '{{dismiss}}', + allow: + '{{allow}}', + deny: '{{deny}}', + link: '{{link}}', + close: + '{{close}}', + }, + window: + '', + revokeBtn: '
Cookie Policy
', + compliance: { + info: '
{{dismiss}}
', + 'opt-in': + '
{{dismiss}}{{allow}}
', + 'opt-out': + '
{{deny}}{{dismiss}}
', + }, + type: 'info', + layouts: { + basic: '{{messagelink}}{{compliance}}', + 'basic-close': '{{messagelink}}{{compliance}}{{close}}', + 'basic-header': '{{header}}{{message}}{{link}}{{compliance}}', + }, + layout: 'basic', + position: 'bottom', + theme: 'block', + static: !1, + palette: null, + revokable: !1, + animateRevokable: !0, + showLink: !0, + dismissOnScroll: !1, + dismissOnTimeout: !1, + autoOpen: !0, + autoAttach: !0, + whitelistPage: [], + blacklistPage: [], + overrideHTML: null, + }; + return ( + (n.prototype.initialise = function (e) { + this.options && this.destroy(), + t.deepExtend((this.options = {}), g), + t.isPlainObject(e) && t.deepExtend(this.options, e), + r.call(this) && (this.options.enabled = !1), + m(this.options.blacklistPage, location.pathname) && + (this.options.enabled = !1), + m(this.options.whitelistPage, location.pathname) && + (this.options.enabled = !0); + var i = this.options.window + .replace('{{classes}}', c.call(this).join(' ')) + .replace('{{children}}', l.call(this)), + n = this.options.overrideHTML; + if ( + ('string' == typeof n && n.length && (i = n), + this.options['static']) + ) { + var o = u.call(this, '
' + i + '
'); + (o.style.display = ''), + (this.element = o.firstChild), + (this.element.style.display = 'none'), + t.addClass(this.element, 'cc-invisible'); + } else this.element = u.call(this, i); + b.call(this), + y.call(this), + this.options.autoOpen && this.autoOpen(); + }), + (n.prototype.destroy = function () { + this.onButtonClick && + this.element && + (this.element.removeEventListener('click', this.onButtonClick), + (this.onButtonClick = null)), + this.dismissTimeout && + (clearTimeout(this.dismissTimeout), + (this.dismissTimeout = null)), + this.onWindowScroll && + (window.removeEventListener('scroll', this.onWindowScroll), + (this.onWindowScroll = null)), + this.onMouseMove && + (window.removeEventListener('mousemove', this.onMouseMove), + (this.onMouseMove = null)), + this.element && + this.element.parentNode && + this.element.parentNode.removeChild(this.element), + (this.element = null), + this.revokeBtn && + this.revokeBtn.parentNode && + this.revokeBtn.parentNode.removeChild(this.revokeBtn), + (this.revokeBtn = null), + f(this.options.palette), + (this.options = null); + }), + (n.prototype.open = function (t) { + if (this.element) + return ( + this.isOpen() || + (e.hasTransition + ? this.fadeIn() + : (this.element.style.display = ''), + this.options.revokable && this.toggleRevokeButton(), + this.options.onPopupOpen.call(this)), + this + ); + }), + (n.prototype.close = function (t) { + if (this.element) + return ( + this.isOpen() && + (e.hasTransition + ? this.fadeOut() + : (this.element.style.display = 'none'), + t && this.options.revokable && this.toggleRevokeButton(!0), + this.options.onPopupClose.call(this)), + this + ); + }), + (n.prototype.fadeIn = function () { + var i = this.element; + if ( + e.hasTransition && + i && + (this.afterTransition && s.call(this, i), + t.hasClass(i, 'cc-invisible')) + ) { + if (((i.style.display = ''), this.options['static'])) { + var n = this.element.clientHeight; + this.element.parentNode.style.maxHeight = n + 'px'; + } + var r = 20; + this.openingTimeout = setTimeout(o.bind(this, i), r); + } + }), + (n.prototype.fadeOut = function () { + var i = this.element; + e.hasTransition && + i && + (this.openingTimeout && + (clearTimeout(this.openingTimeout), o.bind(this, i)), + t.hasClass(i, 'cc-invisible') || + (this.options['static'] && + (this.element.parentNode.style.maxHeight = ''), + (this.afterTransition = s.bind(this, i)), + i.addEventListener(e.transitionEnd, this.afterTransition), + t.addClass(i, 'cc-invisible'))); + }), + (n.prototype.isOpen = function () { + return ( + this.element && + '' == this.element.style.display && + (!e.hasTransition || !t.hasClass(this.element, 'cc-invisible')) + ); + }), + (n.prototype.toggleRevokeButton = function (e) { + this.revokeBtn && (this.revokeBtn.style.display = e ? '' : 'none'); + }), + (n.prototype.revokeChoice = function (e) { + (this.options.enabled = !0), + this.clearStatus(), + this.options.onRevokeChoice.call(this), + e || this.autoOpen(); + }), + (n.prototype.hasAnswered = function (t) { + return Object.keys(e.status).indexOf(this.getStatus()) >= 0; + }), + (n.prototype.hasConsented = function (t) { + var i = this.getStatus(); + return i == e.status.allow || i == e.status.dismiss; + }), + (n.prototype.autoOpen = function (e) { + !this.hasAnswered() && this.options.enabled && this.open(); + }), + (n.prototype.setStatus = function (i) { + var n = this.options.cookie, + o = t.getCookie(n.name), + s = Object.keys(e.status).indexOf(o) >= 0; + Object.keys(e.status).indexOf(i) >= 0 + ? (t.setCookie(n.name, i, n.expiryDays, n.domain, n.path), + this.options.onStatusChange.call(this, i, s)) + : this.clearStatus(); + }), + (n.prototype.getStatus = function () { + return t.getCookie(this.options.cookie.name); + }), + (n.prototype.clearStatus = function () { + var e = this.options.cookie; + t.setCookie(e.name, '', -1, e.domain, e.path); + }), + n + ); + })()), + (e.Location = (function () { + function e(e) { + t.deepExtend((this.options = {}), s), + t.isPlainObject(e) && t.deepExtend(this.options, e), + (this.currentServiceIndex = -1); + } + function i(e, t, i) { + var n, + o = document.createElement('script'); + (o.type = 'text/' + (e.type || 'javascript')), + (o.src = e.src || e), + (o.async = !1), + (o.onreadystatechange = o.onload = + function () { + var e = o.readyState; + clearTimeout(n), + t.done || + (e && !/loaded|complete/.test(e)) || + ((t.done = !0), + t(), + (o.onreadystatechange = o.onload = null)); + }), + document.body.appendChild(o), + (n = setTimeout(function () { + (t.done = !0), t(), (o.onreadystatechange = o.onload = null); + }, i)); + } + function n(e, t, i, n, o) { + var s = new (window.XMLHttpRequest || window.ActiveXObject)( + 'MSXML2.XMLHTTP.3.0' + ); + if ( + (s.open(n ? 'POST' : 'GET', e, 1), + s.setRequestHeader('X-Requested-With', 'XMLHttpRequest'), + s.setRequestHeader( + 'Content-type', + 'application/x-www-form-urlencoded' + ), + Array.isArray(o)) + ) + for (var r = 0, a = o.length; r < a; ++r) { + var c = o[r].split(':', 2); + s.setRequestHeader( + c[0].replace(/^\s+|\s+$/g, ''), + c[1].replace(/^\s+|\s+$/g, '') + ); + } + 'function' == typeof t && + (s.onreadystatechange = function () { + s.readyState > 3 && t(s); + }), + s.send(n); + } + function o(e) { + return new Error('Error [' + (e.code || 'UNKNOWN') + ']: ' + e.error); + } + var s = { + timeout: 5e3, + services: ['freegeoip', 'ipinfo', 'maxmind'], + serviceDefinitions: { + freegeoip: function () { + return { + url: '//freegeoip.net/json/?callback={callback}', + isScript: !0, + callback: function (e, t) { + try { + var i = JSON.parse(t); + return i.error ? o(i) : { code: i.country_code }; + } catch (n) { + return o({ error: 'Invalid response (' + n + ')' }); + } + }, + }; + }, + ipinfo: function () { + return { + url: '//ipinfo.io', + headers: ['Accept: application/json'], + callback: function (e, t) { + try { + var i = JSON.parse(t); + return i.error ? o(i) : { code: i.country }; + } catch (n) { + return o({ error: 'Invalid response (' + n + ')' }); + } + }, + }; + }, + ipinfodb: function (e) { + return { + url: '//api.ipinfodb.com/v3/ip-country/?key={api_key}&format=json&callback={callback}', + isScript: !0, + callback: function (e, t) { + try { + var i = JSON.parse(t); + return 'ERROR' == i.statusCode + ? o({ error: i.statusMessage }) + : { code: i.countryCode }; + } catch (n) { + return o({ error: 'Invalid response (' + n + ')' }); + } + }, + }; + }, + maxmind: function () { + return { + url: '//js.maxmind.com/js/apis/geoip2/v2.1/geoip2.js', + isScript: !0, + callback: function (e) { + return window.geoip2 + ? void geoip2.country( + function (t) { + try { + e({ code: t.country.iso_code }); + } catch (i) { + e(o(i)); + } + }, + function (t) { + e(o(t)); + } + ) + : void e( + new Error( + 'Unexpected response format. The downloaded script should have exported `geoip2` to the global scope' + ) + ); + }, + }; + }, + }, + }; + return ( + (e.prototype.getNextService = function () { + var e; + do e = this.getServiceByIdx(++this.currentServiceIndex); + while ( + this.currentServiceIndex < this.options.services.length && + !e + ); + return e; + }), + (e.prototype.getServiceByIdx = function (e) { + var i = this.options.services[e]; + if ('function' == typeof i) { + var n = i(); + return ( + n.name && + t.deepExtend(n, this.options.serviceDefinitions[n.name](n)), + n + ); + } + return 'string' == typeof i + ? this.options.serviceDefinitions[i]() + : t.isPlainObject(i) + ? this.options.serviceDefinitions[i.name](i) + : null; + }), + (e.prototype.locate = function (e, t) { + var i = this.getNextService(); + return i + ? ((this.callbackComplete = e), + (this.callbackError = t), + void this.runService(i, this.runNextServiceOnError.bind(this))) + : void t(new Error('No services to run')); + }), + (e.prototype.setupUrl = function (e) { + var t = this.getCurrentServiceOpts(); + return e.url.replace(/\{(.*?)\}/g, function (i, n) { + if ('callback' === n) { + var o = 'callback' + Date.now(); + return ( + (window[o] = function (t) { + e.__JSONP_DATA = JSON.stringify(t); + }), + o + ); + } + if (n in t.interpolateUrl) return t.interpolateUrl[n]; + }); + }), + (e.prototype.runService = function (e, t) { + var o = this; + if (e && e.url && e.callback) { + var s = e.isScript ? i : n, + r = this.setupUrl(e); + s( + r, + function (i) { + var n = i ? i.responseText : ''; + e.__JSONP_DATA && + ((n = e.__JSONP_DATA), delete e.__JSONP_DATA), + o.runServiceCallback.call(o, t, e, n); + }, + this.options.timeout, + e.data, + e.headers + ); + } + }), + (e.prototype.runServiceCallback = function (e, t, i) { + var n = this, + o = function (t) { + s || n.onServiceResult.call(n, e, t); + }, + s = t.callback(o, i); + s && this.onServiceResult.call(this, e, s); + }), + (e.prototype.onServiceResult = function (e, t) { + t instanceof Error || (t && t.error) + ? e.call(this, t, null) + : e.call(this, null, t); + }), + (e.prototype.runNextServiceOnError = function (e, t) { + if (e) { + this.logError(e); + var i = this.getNextService(); + i + ? this.runService(i, this.runNextServiceOnError.bind(this)) + : this.completeService.call( + this, + this.callbackError, + new Error('All services failed') + ); + } else this.completeService.call(this, this.callbackComplete, t); + }), + (e.prototype.getCurrentServiceOpts = function () { + var e = this.options.services[this.currentServiceIndex]; + return 'string' == typeof e + ? { name: e } + : 'function' == typeof e + ? e() + : t.isPlainObject(e) + ? e + : {}; + }), + (e.prototype.completeService = function (e, t) { + (this.currentServiceIndex = -1), e && e(t); + }), + (e.prototype.logError = function (e) { + var t = this.currentServiceIndex, + i = this.getServiceByIdx(t); + console.error( + 'The service[' + + t + + '] (' + + i.url + + ') responded with the following error', + e + ); + }), + e + ); + })()), + (e.Law = (function () { + function e(e) { + this.initialise.apply(this, arguments); + } + var i = { + regionalLaw: !0, + hasLaw: [ + 'AT', + 'BE', + 'BG', + 'HR', + 'CZ', + 'CY', + 'DK', + 'EE', + 'FI', + 'FR', + 'DE', + 'EL', + 'HU', + 'IE', + 'IT', + 'LV', + 'LT', + 'LU', + 'MT', + 'NL', + 'PL', + 'PT', + 'SK', + 'SI', + 'ES', + 'SE', + 'GB', + 'UK', + ], + revokable: [ + 'HR', + 'CY', + 'DK', + 'EE', + 'FR', + 'DE', + 'LV', + 'LT', + 'NL', + 'PT', + 'ES', + ], + explicitAction: ['HR', 'IT', 'ES'], + }; + return ( + (e.prototype.initialise = function (e) { + t.deepExtend((this.options = {}), i), + t.isPlainObject(e) && t.deepExtend(this.options, e); + }), + (e.prototype.get = function (e) { + var t = this.options; + return { + hasLaw: t.hasLaw.indexOf(e) >= 0, + revokable: t.revokable.indexOf(e) >= 0, + explicitAction: t.explicitAction.indexOf(e) >= 0, + }; + }), + (e.prototype.applyLaw = function (e, t) { + var i = this.get(t); + return ( + i.hasLaw || (e.enabled = !1), + this.options.regionalLaw && + (i.revokable && (e.revokable = !0), + i.explicitAction && + ((e.dismissOnScroll = !1), (e.dismissOnTimeout = !1))), + e + ); + }), + e + ); + })()), + (e.initialise = function (t, i, n) { + var o = new e.Law(t.law); + i || (i = function () {}), + n || (n = function () {}), + e.getCountryCode( + t, + function (n) { + delete t.law, + delete t.location, + n.code && (t = o.applyLaw(t, n.code)), + i(new e.Popup(t)); + }, + function (i) { + delete t.law, delete t.location, n(i, new e.Popup(t)); + } + ); + }), + (e.getCountryCode = function (t, i, n) { + if (t.law && t.law.countryCode) + return void i({ code: t.law.countryCode }); + if (t.location) { + var o = new e.Location(t.location); + return void o.locate(function (e) { + i(e || {}); + }, n); + } + i({}); + }), + (e.utils = t), + (e.hasInitialised = !0), + (window.cookieconsent = e); + } +})(window.cookieconsent || {}); diff --git a/rootfs/usr/share/httpd/default/js/errorpages/homepage.js b/rootfs/usr/share/httpd/default/js/errorpages/homepage.js new file mode 100644 index 0000000..bd3925d --- /dev/null +++ b/rootfs/usr/share/httpd/default/js/errorpages/homepage.js @@ -0,0 +1,6 @@ +function homepage() { + let proto = location.protocol; + let port = location.port; + let currentSite = window.location.hostname; + window.location = proto + '//' + currentSite + ':' + port; +} diff --git a/rootfs/usr/share/httpd/default/js/errorpages/isup.js b/rootfs/usr/share/httpd/default/js/errorpages/isup.js new file mode 100644 index 0000000..60a653f --- /dev/null +++ b/rootfs/usr/share/httpd/default/js/errorpages/isup.js @@ -0,0 +1,7 @@ +function isupme() { + let proto = location.protocol; + let port = location.port; + let currentSite = window.location.hostname; + fullurllocation = proto + '//' + currentSite + ':' + port; + window.location = 'http://isup.me/' + fullurllocation; +} diff --git a/rootfs/usr/share/httpd/default/js/errorpages/loaddomain.js b/rootfs/usr/share/httpd/default/js/errorpages/loaddomain.js new file mode 100644 index 0000000..dc9f958 --- /dev/null +++ b/rootfs/usr/share/httpd/default/js/errorpages/loaddomain.js @@ -0,0 +1,26 @@ +function loadDomain(getURI, getID, getMessage) { + let id = getID; + let baseURI = getURI; + let message = getMessage; + let port = location.port; + let url = location.hostname; + let proto = location.protocol; + let baseURL = baseURI || location.pathname; + let base = baseURL.slice(0, baseURL.lastIndexOf('/')); + if (!id) id = 'display-domain'; + if (!base) base = '/'; + if (!port) + if (proto == 'https:') { + port = 443; + } else { + port = 80; + } + console.log('Base: ' + base); + full_url = proto + '//' + url + ':' + port + base; + display = document.getElementById(id); + display.href = full_url; + display.title = full_url; + message = message || '
' + full_url + '
'; + display.innerHTML = message; + return full_url; +} diff --git a/rootfs/usr/share/httpd/default/js/errorpages/loadlocation.js b/rootfs/usr/share/httpd/default/js/errorpages/loadlocation.js new file mode 100644 index 0000000..c302dc2 --- /dev/null +++ b/rootfs/usr/share/httpd/default/js/errorpages/loadlocation.js @@ -0,0 +1,26 @@ +function loadLocation(getURI, getID, getMessage) { + let id = getID; + let baseURI = getURI; + let message = getMessage; + let port = location.port; + let url = location.hostname; + let proto = location.protocol; + let baseURL = baseURI || location.pathname; + let base = baseURL.slice(0, baseURL.lastIndexOf('/')); + if (!id) id = 'display-location'; + if (!base) base = '/'; + if (!port) + if (proto == 'https:') { + port = 443; + } else { + port = 80; + } + console.log('Base: ' + base); + full_url = proto + '//' + url + ':' + port + base; + display = document.getElementById(id); + display.href = full_url; + display.title = full_url; + message = message || '
Return to homepage
'; + display.innerHTML = message; + return full_url; +} diff --git a/rootfs/usr/share/httpd/default/js/errorpages/scale.fix.js b/rootfs/usr/share/httpd/default/js/errorpages/scale.fix.js new file mode 100644 index 0000000..33fb0d4 --- /dev/null +++ b/rootfs/usr/share/httpd/default/js/errorpages/scale.fix.js @@ -0,0 +1,20 @@ +var metas = document.getElementsByTagName('meta'); +var i; +if (navigator.userAgent.match(/iPhone/i)) { + for (i = 0; i < metas.length; i++) { + if (metas[i].name == 'viewport') { + metas[i].content = + 'width=device-width, minimum-scale=1.0, maximum-scale=1.0'; + } + } + document.addEventListener('gesturestart', gestureStart, false); +} + +function gestureStart() { + for (i = 0; i < metas.length; i++) { + if (metas[i].name == 'viewport') { + metas[i].content = + 'width=device-width, minimum-scale=0.25, maximum-scale=1.6'; + } + } +} diff --git a/rootfs/usr/share/httpd/default/js/jquery/default.js b/rootfs/usr/share/httpd/default/js/jquery/default.js new file mode 100644 index 0000000..d47405a --- /dev/null +++ b/rootfs/usr/share/httpd/default/js/jquery/default.js @@ -0,0 +1,5540 @@ +/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!(function (e, t) { + "use strict"; + "object" == typeof module && "object" == typeof module.exports + ? (module.exports = e.document + ? t(e, !0) + : function (e) { + if (!e.document) + throw new Error("jQuery requires a window with a document"); + return t(e); + }) + : t(e); +})("undefined" != typeof window ? window : this, function (C, e) { + "use strict"; + var t = [], + r = Object.getPrototypeOf, + s = t.slice, + g = t.flat + ? function (e) { + return t.flat.call(e); + } + : function (e) { + return t.concat.apply([], e); + }, + u = t.push, + i = t.indexOf, + n = {}, + o = n.toString, + v = n.hasOwnProperty, + a = v.toString, + l = a.call(Object), + y = {}, + m = function (e) { + return "function" == typeof e && "number" != typeof e.nodeType; + }, + x = function (e) { + return null != e && e === e.window; + }, + E = C.document, + c = { type: !0, src: !0, nonce: !0, noModule: !0 }; + function b(e, t, n) { + var r, + i, + o = (n = n || E).createElement("script"); + if (((o.text = e), t)) + for (r in c) + (i = t[r] || (t.getAttribute && t.getAttribute(r))) && + o.setAttribute(r, i); + n.head.appendChild(o).parentNode.removeChild(o); + } + function w(e) { + return null == e + ? e + "" + : "object" == typeof e || "function" == typeof e + ? n[o.call(e)] || "object" + : typeof e; + } + var f = "3.5.1", + S = function (e, t) { + return new S.fn.init(e, t); + }; + function p(e) { + var t = !!e && "length" in e && e.length, + n = w(e); + return ( + !m(e) && + !x(e) && + ("array" === n || + 0 === t || + ("number" == typeof t && 0 < t && t - 1 in e)) + ); + } + (S.fn = S.prototype = { + jquery: f, + constructor: S, + length: 0, + toArray: function () { + return s.call(this); + }, + get: function (e) { + return null == e ? s.call(this) : e < 0 ? this[e + this.length] : this[e]; + }, + pushStack: function (e) { + var t = S.merge(this.constructor(), e); + return (t.prevObject = this), t; + }, + each: function (e) { + return S.each(this, e); + }, + map: function (n) { + return this.pushStack( + S.map(this, function (e, t) { + return n.call(e, t, e); + }) + ); + }, + slice: function () { + return this.pushStack(s.apply(this, arguments)); + }, + first: function () { + return this.eq(0); + }, + last: function () { + return this.eq(-1); + }, + even: function () { + return this.pushStack( + S.grep(this, function (e, t) { + return (t + 1) % 2; + }) + ); + }, + odd: function () { + return this.pushStack( + S.grep(this, function (e, t) { + return t % 2; + }) + ); + }, + eq: function (e) { + var t = this.length, + n = +e + (e < 0 ? t : 0); + return this.pushStack(0 <= n && n < t ? [this[n]] : []); + }, + end: function () { + return this.prevObject || this.constructor(); + }, + push: u, + sort: t.sort, + splice: t.splice, + }), + (S.extend = S.fn.extend = function () { + var e, + t, + n, + r, + i, + o, + a = arguments[0] || {}, + s = 1, + u = arguments.length, + l = !1; + for ( + "boolean" == typeof a && ((l = a), (a = arguments[s] || {}), s++), + "object" == typeof a || m(a) || (a = {}), + s === u && ((a = this), s--); + s < u; + s++ + ) + if (null != (e = arguments[s])) + for (t in e) + (r = e[t]), + "__proto__" !== t && + a !== r && + (l && r && (S.isPlainObject(r) || (i = Array.isArray(r))) + ? ((n = a[t]), + (o = + i && !Array.isArray(n) + ? [] + : i || S.isPlainObject(n) + ? n + : {}), + (i = !1), + (a[t] = S.extend(l, o, r))) + : void 0 !== r && (a[t] = r)); + return a; + }), + S.extend({ + expando: "jQuery" + (f + Math.random()).replace(/\D/g, ""), + isReady: !0, + error: function (e) { + throw new Error(e); + }, + noop: function () {}, + isPlainObject: function (e) { + var t, n; + return ( + !(!e || "[object Object]" !== o.call(e)) && + (!(t = r(e)) || + ("function" == + typeof (n = v.call(t, "constructor") && t.constructor) && + a.call(n) === l)) + ); + }, + isEmptyObject: function (e) { + var t; + for (t in e) return !1; + return !0; + }, + globalEval: function (e, t, n) { + b(e, { nonce: t && t.nonce }, n); + }, + each: function (e, t) { + var n, + r = 0; + if (p(e)) { + for (n = e.length; r < n; r++) + if (!1 === t.call(e[r], r, e[r])) break; + } else for (r in e) if (!1 === t.call(e[r], r, e[r])) break; + return e; + }, + makeArray: function (e, t) { + var n = t || []; + return ( + null != e && + (p(Object(e)) + ? S.merge(n, "string" == typeof e ? [e] : e) + : u.call(n, e)), + n + ); + }, + inArray: function (e, t, n) { + return null == t ? -1 : i.call(t, e, n); + }, + merge: function (e, t) { + for (var n = +t.length, r = 0, i = e.length; r < n; r++) e[i++] = t[r]; + return (e.length = i), e; + }, + grep: function (e, t, n) { + for (var r = [], i = 0, o = e.length, a = !n; i < o; i++) + !t(e[i], i) !== a && r.push(e[i]); + return r; + }, + map: function (e, t, n) { + var r, + i, + o = 0, + a = []; + if (p(e)) + for (r = e.length; o < r; o++) + null != (i = t(e[o], o, n)) && a.push(i); + else for (o in e) null != (i = t(e[o], o, n)) && a.push(i); + return g(a); + }, + guid: 1, + support: y, + }), + "function" == typeof Symbol && (S.fn[Symbol.iterator] = t[Symbol.iterator]), + S.each( + "Boolean Number String Function Array Date RegExp Object Error Symbol".split( + " " + ), + function (e, t) { + n["[object " + t + "]"] = t.toLowerCase(); + } + ); + var d = (function (n) { + var e, + d, + b, + o, + i, + h, + f, + g, + w, + u, + l, + T, + C, + a, + E, + v, + s, + c, + y, + S = "sizzle" + 1 * new Date(), + p = n.document, + k = 0, + r = 0, + m = ue(), + x = ue(), + A = ue(), + N = ue(), + D = function (e, t) { + return e === t && (l = !0), 0; + }, + j = {}.hasOwnProperty, + t = [], + q = t.pop, + L = t.push, + H = t.push, + O = t.slice, + P = function (e, t) { + for (var n = 0, r = e.length; n < r; n++) if (e[n] === t) return n; + return -1; + }, + R = + "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", + M = "[\\x20\\t\\r\\n\\f]", + I = + "(?:\\\\[\\da-fA-F]{1,6}" + + M + + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", + W = + "\\[" + + M + + "*(" + + I + + ")(?:" + + M + + "*([*^$|!~]?=)" + + M + + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + + I + + "))|)" + + M + + "*\\]", + F = + ":(" + + I + + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + + W + + ")*)|.*)\\)|)", + B = new RegExp(M + "+", "g"), + $ = new RegExp("^" + M + "+|((?:^|[^\\\\])(?:\\\\.)*)" + M + "+$", "g"), + _ = new RegExp("^" + M + "*," + M + "*"), + z = new RegExp("^" + M + "*([>+~]|" + M + ")" + M + "*"), + U = new RegExp(M + "|>"), + X = new RegExp(F), + V = new RegExp("^" + I + "$"), + G = { + ID: new RegExp("^#(" + I + ")"), + CLASS: new RegExp("^\\.(" + I + ")"), + TAG: new RegExp("^(" + I + "|[*])"), + ATTR: new RegExp("^" + W), + PSEUDO: new RegExp("^" + F), + CHILD: new RegExp( + "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + + M + + "*(even|odd|(([+-]|)(\\d*)n|)" + + M + + "*(?:([+-]|)" + + M + + "*(\\d+)|))" + + M + + "*\\)|)", + "i" + ), + bool: new RegExp("^(?:" + R + ")$", "i"), + needsContext: new RegExp( + "^" + + M + + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + M + + "*((?:-\\d)?\\d*)" + + M + + "*\\)|)(?=[^-]|$)", + "i" + ), + }, + Y = /HTML$/i, + Q = /^(?:input|select|textarea|button)$/i, + J = /^h\d$/i, + K = /^[^{]+\{\s*\[native \w/, + Z = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + ee = /[+~]/, + te = new RegExp("\\\\[\\da-fA-F]{1,6}" + M + "?|\\\\([^\\r\\n\\f])", "g"), + ne = function (e, t) { + var n = "0x" + e.slice(1) - 65536; + return ( + t || + (n < 0 + ? String.fromCharCode(n + 65536) + : String.fromCharCode((n >> 10) | 55296, (1023 & n) | 56320)) + ); + }, + re = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, + ie = function (e, t) { + return t + ? "\0" === e + ? "\ufffd" + : e.slice(0, -1) + + "\\" + + e.charCodeAt(e.length - 1).toString(16) + + " " + : "\\" + e; + }, + oe = function () { + T(); + }, + ae = be( + function (e) { + return !0 === e.disabled && "fieldset" === e.nodeName.toLowerCase(); + }, + { dir: "parentNode", next: "legend" } + ); + try { + H.apply((t = O.call(p.childNodes)), p.childNodes), + t[p.childNodes.length].nodeType; + } catch (e) { + H = { + apply: t.length + ? function (e, t) { + L.apply(e, O.call(t)); + } + : function (e, t) { + var n = e.length, + r = 0; + while ((e[n++] = t[r++])); + e.length = n - 1; + }, + }; + } + function se(t, e, n, r) { + var i, + o, + a, + s, + u, + l, + c, + f = e && e.ownerDocument, + p = e ? e.nodeType : 9; + if ( + ((n = n || []), + "string" != typeof t || !t || (1 !== p && 9 !== p && 11 !== p)) + ) + return n; + if (!r && (T(e), (e = e || C), E)) { + if (11 !== p && (u = Z.exec(t))) + if ((i = u[1])) { + if (9 === p) { + if (!(a = e.getElementById(i))) return n; + if (a.id === i) return n.push(a), n; + } else if (f && (a = f.getElementById(i)) && y(e, a) && a.id === i) + return n.push(a), n; + } else { + if (u[2]) return H.apply(n, e.getElementsByTagName(t)), n; + if ( + (i = u[3]) && + d.getElementsByClassName && + e.getElementsByClassName + ) + return H.apply(n, e.getElementsByClassName(i)), n; + } + if ( + d.qsa && + !N[t + " "] && + (!v || !v.test(t)) && + (1 !== p || "object" !== e.nodeName.toLowerCase()) + ) { + if (((c = t), (f = e), 1 === p && (U.test(t) || z.test(t)))) { + ((f = (ee.test(t) && ye(e.parentNode)) || e) === e && d.scope) || + ((s = e.getAttribute("id")) + ? (s = s.replace(re, ie)) + : e.setAttribute("id", (s = S))), + (o = (l = h(t)).length); + while (o--) l[o] = (s ? "#" + s : ":scope") + " " + xe(l[o]); + c = l.join(","); + } + try { + return H.apply(n, f.querySelectorAll(c)), n; + } catch (e) { + N(t, !0); + } finally { + s === S && e.removeAttribute("id"); + } + } + } + return g(t.replace($, "$1"), e, n, r); + } + function ue() { + var r = []; + return function e(t, n) { + return ( + r.push(t + " ") > b.cacheLength && delete e[r.shift()], + (e[t + " "] = n) + ); + }; + } + function le(e) { + return (e[S] = !0), e; + } + function ce(e) { + var t = C.createElement("fieldset"); + try { + return !!e(t); + } catch (e) { + return !1; + } finally { + t.parentNode && t.parentNode.removeChild(t), (t = null); + } + } + function fe(e, t) { + var n = e.split("|"), + r = n.length; + while (r--) b.attrHandle[n[r]] = t; + } + function pe(e, t) { + var n = t && e, + r = + n && + 1 === e.nodeType && + 1 === t.nodeType && + e.sourceIndex - t.sourceIndex; + if (r) return r; + if (n) while ((n = n.nextSibling)) if (n === t) return -1; + return e ? 1 : -1; + } + function de(t) { + return function (e) { + return "input" === e.nodeName.toLowerCase() && e.type === t; + }; + } + function he(n) { + return function (e) { + var t = e.nodeName.toLowerCase(); + return ("input" === t || "button" === t) && e.type === n; + }; + } + function ge(t) { + return function (e) { + return "form" in e + ? e.parentNode && !1 === e.disabled + ? "label" in e + ? "label" in e.parentNode + ? e.parentNode.disabled === t + : e.disabled === t + : e.isDisabled === t || (e.isDisabled !== !t && ae(e) === t) + : e.disabled === t + : "label" in e && e.disabled === t; + }; + } + function ve(a) { + return le(function (o) { + return ( + (o = +o), + le(function (e, t) { + var n, + r = a([], e.length, o), + i = r.length; + while (i--) e[(n = r[i])] && (e[n] = !(t[n] = e[n])); + }) + ); + }); + } + function ye(e) { + return e && "undefined" != typeof e.getElementsByTagName && e; + } + for (e in ((d = se.support = {}), + (i = se.isXML = function (e) { + var t = e.namespaceURI, + n = (e.ownerDocument || e).documentElement; + return !Y.test(t || (n && n.nodeName) || "HTML"); + }), + (T = se.setDocument = function (e) { + var t, + n, + r = e ? e.ownerDocument || e : p; + return ( + r != C && + 9 === r.nodeType && + r.documentElement && + ((a = (C = r).documentElement), + (E = !i(C)), + p != C && + (n = C.defaultView) && + n.top !== n && + (n.addEventListener + ? n.addEventListener("unload", oe, !1) + : n.attachEvent && n.attachEvent("onunload", oe)), + (d.scope = ce(function (e) { + return ( + a.appendChild(e).appendChild(C.createElement("div")), + "undefined" != typeof e.querySelectorAll && + !e.querySelectorAll(":scope fieldset div").length + ); + })), + (d.attributes = ce(function (e) { + return (e.className = "i"), !e.getAttribute("className"); + })), + (d.getElementsByTagName = ce(function (e) { + return ( + e.appendChild(C.createComment("")), + !e.getElementsByTagName("*").length + ); + })), + (d.getElementsByClassName = K.test(C.getElementsByClassName)), + (d.getById = ce(function (e) { + return ( + (a.appendChild(e).id = S), + !C.getElementsByName || !C.getElementsByName(S).length + ); + })), + d.getById + ? ((b.filter.ID = function (e) { + var t = e.replace(te, ne); + return function (e) { + return e.getAttribute("id") === t; + }; + }), + (b.find.ID = function (e, t) { + if ("undefined" != typeof t.getElementById && E) { + var n = t.getElementById(e); + return n ? [n] : []; + } + })) + : ((b.filter.ID = function (e) { + var n = e.replace(te, ne); + return function (e) { + var t = + "undefined" != typeof e.getAttributeNode && + e.getAttributeNode("id"); + return t && t.value === n; + }; + }), + (b.find.ID = function (e, t) { + if ("undefined" != typeof t.getElementById && E) { + var n, + r, + i, + o = t.getElementById(e); + if (o) { + if ((n = o.getAttributeNode("id")) && n.value === e) + return [o]; + (i = t.getElementsByName(e)), (r = 0); + while ((o = i[r++])) + if ((n = o.getAttributeNode("id")) && n.value === e) + return [o]; + } + return []; + } + })), + (b.find.TAG = d.getElementsByTagName + ? function (e, t) { + return "undefined" != typeof t.getElementsByTagName + ? t.getElementsByTagName(e) + : d.qsa + ? t.querySelectorAll(e) + : void 0; + } + : function (e, t) { + var n, + r = [], + i = 0, + o = t.getElementsByTagName(e); + if ("*" === e) { + while ((n = o[i++])) 1 === n.nodeType && r.push(n); + return r; + } + return o; + }), + (b.find.CLASS = + d.getElementsByClassName && + function (e, t) { + if ("undefined" != typeof t.getElementsByClassName && E) + return t.getElementsByClassName(e); + }), + (s = []), + (v = []), + (d.qsa = K.test(C.querySelectorAll)) && + (ce(function (e) { + var t; + (a.appendChild(e).innerHTML = + ""), + e.querySelectorAll("[msallowcapture^='']").length && + v.push("[*^$]=" + M + "*(?:''|\"\")"), + e.querySelectorAll("[selected]").length || + v.push("\\[" + M + "*(?:value|" + R + ")"), + e.querySelectorAll("[id~=" + S + "-]").length || v.push("~="), + (t = C.createElement("input")).setAttribute("name", ""), + e.appendChild(t), + e.querySelectorAll("[name='']").length || + v.push("\\[" + M + "*name" + M + "*=" + M + "*(?:''|\"\")"), + e.querySelectorAll(":checked").length || v.push(":checked"), + e.querySelectorAll("a#" + S + "+*").length || + v.push(".#.+[+~]"), + e.querySelectorAll("\\\f"), + v.push("[\\r\\n\\f]"); + }), + ce(function (e) { + e.innerHTML = + ""; + var t = C.createElement("input"); + t.setAttribute("type", "hidden"), + e.appendChild(t).setAttribute("name", "D"), + e.querySelectorAll("[name=d]").length && + v.push("name" + M + "*[*^$|!~]?="), + 2 !== e.querySelectorAll(":enabled").length && + v.push(":enabled", ":disabled"), + (a.appendChild(e).disabled = !0), + 2 !== e.querySelectorAll(":disabled").length && + v.push(":enabled", ":disabled"), + e.querySelectorAll("*,:x"), + v.push(",.*:"); + })), + (d.matchesSelector = K.test( + (c = + a.matches || + a.webkitMatchesSelector || + a.mozMatchesSelector || + a.oMatchesSelector || + a.msMatchesSelector) + )) && + ce(function (e) { + (d.disconnectedMatch = c.call(e, "*")), + c.call(e, "[s!='']:x"), + s.push("!=", F); + }), + (v = v.length && new RegExp(v.join("|"))), + (s = s.length && new RegExp(s.join("|"))), + (t = K.test(a.compareDocumentPosition)), + (y = + t || K.test(a.contains) + ? function (e, t) { + var n = 9 === e.nodeType ? e.documentElement : e, + r = t && t.parentNode; + return ( + e === r || + !( + !r || + 1 !== r.nodeType || + !(n.contains + ? n.contains(r) + : e.compareDocumentPosition && + 16 & e.compareDocumentPosition(r)) + ) + ); + } + : function (e, t) { + if (t) while ((t = t.parentNode)) if (t === e) return !0; + return !1; + }), + (D = t + ? function (e, t) { + if (e === t) return (l = !0), 0; + var n = !e.compareDocumentPosition - !t.compareDocumentPosition; + return ( + n || + (1 & + (n = + (e.ownerDocument || e) == (t.ownerDocument || t) + ? e.compareDocumentPosition(t) + : 1) || + (!d.sortDetached && t.compareDocumentPosition(e) === n) + ? e == C || (e.ownerDocument == p && y(p, e)) + ? -1 + : t == C || (t.ownerDocument == p && y(p, t)) + ? 1 + : u + ? P(u, e) - P(u, t) + : 0 + : 4 & n + ? -1 + : 1) + ); + } + : function (e, t) { + if (e === t) return (l = !0), 0; + var n, + r = 0, + i = e.parentNode, + o = t.parentNode, + a = [e], + s = [t]; + if (!i || !o) + return e == C + ? -1 + : t == C + ? 1 + : i + ? -1 + : o + ? 1 + : u + ? P(u, e) - P(u, t) + : 0; + if (i === o) return pe(e, t); + n = e; + while ((n = n.parentNode)) a.unshift(n); + n = t; + while ((n = n.parentNode)) s.unshift(n); + while (a[r] === s[r]) r++; + return r ? pe(a[r], s[r]) : a[r] == p ? -1 : s[r] == p ? 1 : 0; + })), + C + ); + }), + (se.matches = function (e, t) { + return se(e, null, null, t); + }), + (se.matchesSelector = function (e, t) { + if ( + (T(e), + d.matchesSelector && + E && + !N[t + " "] && + (!s || !s.test(t)) && + (!v || !v.test(t))) + ) + try { + var n = c.call(e, t); + if ( + n || + d.disconnectedMatch || + (e.document && 11 !== e.document.nodeType) + ) + return n; + } catch (e) { + N(t, !0); + } + return 0 < se(t, C, null, [e]).length; + }), + (se.contains = function (e, t) { + return (e.ownerDocument || e) != C && T(e), y(e, t); + }), + (se.attr = function (e, t) { + (e.ownerDocument || e) != C && T(e); + var n = b.attrHandle[t.toLowerCase()], + r = n && j.call(b.attrHandle, t.toLowerCase()) ? n(e, t, !E) : void 0; + return void 0 !== r + ? r + : d.attributes || !E + ? e.getAttribute(t) + : (r = e.getAttributeNode(t)) && r.specified + ? r.value + : null; + }), + (se.escape = function (e) { + return (e + "").replace(re, ie); + }), + (se.error = function (e) { + throw new Error("Syntax error, unrecognized expression: " + e); + }), + (se.uniqueSort = function (e) { + var t, + n = [], + r = 0, + i = 0; + if ( + ((l = !d.detectDuplicates), + (u = !d.sortStable && e.slice(0)), + e.sort(D), + l) + ) { + while ((t = e[i++])) t === e[i] && (r = n.push(i)); + while (r--) e.splice(n[r], 1); + } + return (u = null), e; + }), + (o = se.getText = function (e) { + var t, + n = "", + r = 0, + i = e.nodeType; + if (i) { + if (1 === i || 9 === i || 11 === i) { + if ("string" == typeof e.textContent) return e.textContent; + for (e = e.firstChild; e; e = e.nextSibling) n += o(e); + } else if (3 === i || 4 === i) return e.nodeValue; + } else while ((t = e[r++])) n += o(t); + return n; + }), + ((b = se.selectors = { + cacheLength: 50, + createPseudo: le, + match: G, + attrHandle: {}, + find: {}, + relative: { + ">": { dir: "parentNode", first: !0 }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: !0 }, + "~": { dir: "previousSibling" }, + }, + preFilter: { + ATTR: function (e) { + return ( + (e[1] = e[1].replace(te, ne)), + (e[3] = (e[3] || e[4] || e[5] || "").replace(te, ne)), + "~=" === e[2] && (e[3] = " " + e[3] + " "), + e.slice(0, 4) + ); + }, + CHILD: function (e) { + return ( + (e[1] = e[1].toLowerCase()), + "nth" === e[1].slice(0, 3) + ? (e[3] || se.error(e[0]), + (e[4] = +(e[4] + ? e[5] + (e[6] || 1) + : 2 * ("even" === e[3] || "odd" === e[3]))), + (e[5] = +(e[7] + e[8] || "odd" === e[3]))) + : e[3] && se.error(e[0]), + e + ); + }, + PSEUDO: function (e) { + var t, + n = !e[6] && e[2]; + return G.CHILD.test(e[0]) + ? null + : (e[3] + ? (e[2] = e[4] || e[5] || "") + : n && + X.test(n) && + (t = h(n, !0)) && + (t = n.indexOf(")", n.length - t) - n.length) && + ((e[0] = e[0].slice(0, t)), (e[2] = n.slice(0, t))), + e.slice(0, 3)); + }, + }, + filter: { + TAG: function (e) { + var t = e.replace(te, ne).toLowerCase(); + return "*" === e + ? function () { + return !0; + } + : function (e) { + return e.nodeName && e.nodeName.toLowerCase() === t; + }; + }, + CLASS: function (e) { + var t = m[e + " "]; + return ( + t || + ((t = new RegExp("(^|" + M + ")" + e + "(" + M + "|$)")) && + m(e, function (e) { + return t.test( + ("string" == typeof e.className && e.className) || + ("undefined" != typeof e.getAttribute && + e.getAttribute("class")) || + "" + ); + })) + ); + }, + ATTR: function (n, r, i) { + return function (e) { + var t = se.attr(e, n); + return null == t + ? "!=" === r + : !r || + ((t += ""), + "=" === r + ? t === i + : "!=" === r + ? t !== i + : "^=" === r + ? i && 0 === t.indexOf(i) + : "*=" === r + ? i && -1 < t.indexOf(i) + : "$=" === r + ? i && t.slice(-i.length) === i + : "~=" === r + ? -1 < (" " + t.replace(B, " ") + " ").indexOf(i) + : "|=" === r && + (t === i || t.slice(0, i.length + 1) === i + "-")); + }; + }, + CHILD: function (h, e, t, g, v) { + var y = "nth" !== h.slice(0, 3), + m = "last" !== h.slice(-4), + x = "of-type" === e; + return 1 === g && 0 === v + ? function (e) { + return !!e.parentNode; + } + : function (e, t, n) { + var r, + i, + o, + a, + s, + u, + l = y !== m ? "nextSibling" : "previousSibling", + c = e.parentNode, + f = x && e.nodeName.toLowerCase(), + p = !n && !x, + d = !1; + if (c) { + if (y) { + while (l) { + a = e; + while ((a = a[l])) + if ( + x ? a.nodeName.toLowerCase() === f : 1 === a.nodeType + ) + return !1; + u = l = "only" === h && !u && "nextSibling"; + } + return !0; + } + if (((u = [m ? c.firstChild : c.lastChild]), m && p)) { + (d = + (s = + (r = + (i = + (o = (a = c)[S] || (a[S] = {}))[a.uniqueID] || + (o[a.uniqueID] = {}))[h] || [])[0] === k && r[1]) && + r[2]), + (a = s && c.childNodes[s]); + while ((a = (++s && a && a[l]) || (d = s = 0) || u.pop())) + if (1 === a.nodeType && ++d && a === e) { + i[h] = [k, s, d]; + break; + } + } else if ( + (p && + (d = s = + (r = + (i = + (o = (a = e)[S] || (a[S] = {}))[a.uniqueID] || + (o[a.uniqueID] = {}))[h] || [])[0] === k && r[1]), + !1 === d) + ) + while ((a = (++s && a && a[l]) || (d = s = 0) || u.pop())) + if ( + (x + ? a.nodeName.toLowerCase() === f + : 1 === a.nodeType) && + ++d && + (p && + ((i = + (o = a[S] || (a[S] = {}))[a.uniqueID] || + (o[a.uniqueID] = {}))[h] = [k, d]), + a === e) + ) + break; + return (d -= v) === g || (d % g == 0 && 0 <= d / g); + } + }; + }, + PSEUDO: function (e, o) { + var t, + a = + b.pseudos[e] || + b.setFilters[e.toLowerCase()] || + se.error("unsupported pseudo: " + e); + return a[S] + ? a(o) + : 1 < a.length + ? ((t = [e, e, "", o]), + b.setFilters.hasOwnProperty(e.toLowerCase()) + ? le(function (e, t) { + var n, + r = a(e, o), + i = r.length; + while (i--) e[(n = P(e, r[i]))] = !(t[n] = r[i]); + }) + : function (e) { + return a(e, 0, t); + }) + : a; + }, + }, + pseudos: { + not: le(function (e) { + var r = [], + i = [], + s = f(e.replace($, "$1")); + return s[S] + ? le(function (e, t, n, r) { + var i, + o = s(e, null, r, []), + a = e.length; + while (a--) (i = o[a]) && (e[a] = !(t[a] = i)); + }) + : function (e, t, n) { + return (r[0] = e), s(r, null, n, i), (r[0] = null), !i.pop(); + }; + }), + has: le(function (t) { + return function (e) { + return 0 < se(t, e).length; + }; + }), + contains: le(function (t) { + return ( + (t = t.replace(te, ne)), + function (e) { + return -1 < (e.textContent || o(e)).indexOf(t); + } + ); + }), + lang: le(function (n) { + return ( + V.test(n || "") || se.error("unsupported lang: " + n), + (n = n.replace(te, ne).toLowerCase()), + function (e) { + var t; + do { + if ( + (t = E + ? e.lang + : e.getAttribute("xml:lang") || e.getAttribute("lang")) + ) + return ( + (t = t.toLowerCase()) === n || 0 === t.indexOf(n + "-") + ); + } while ((e = e.parentNode) && 1 === e.nodeType); + return !1; + } + ); + }), + target: function (e) { + var t = n.location && n.location.hash; + return t && t.slice(1) === e.id; + }, + root: function (e) { + return e === a; + }, + focus: function (e) { + return ( + e === C.activeElement && + (!C.hasFocus || C.hasFocus()) && + !!(e.type || e.href || ~e.tabIndex) + ); + }, + enabled: ge(!1), + disabled: ge(!0), + checked: function (e) { + var t = e.nodeName.toLowerCase(); + return ( + ("input" === t && !!e.checked) || ("option" === t && !!e.selected) + ); + }, + selected: function (e) { + return e.parentNode && e.parentNode.selectedIndex, !0 === e.selected; + }, + empty: function (e) { + for (e = e.firstChild; e; e = e.nextSibling) + if (e.nodeType < 6) return !1; + return !0; + }, + parent: function (e) { + return !b.pseudos.empty(e); + }, + header: function (e) { + return J.test(e.nodeName); + }, + input: function (e) { + return Q.test(e.nodeName); + }, + button: function (e) { + var t = e.nodeName.toLowerCase(); + return ("input" === t && "button" === e.type) || "button" === t; + }, + text: function (e) { + var t; + return ( + "input" === e.nodeName.toLowerCase() && + "text" === e.type && + (null == (t = e.getAttribute("type")) || "text" === t.toLowerCase()) + ); + }, + first: ve(function () { + return [0]; + }), + last: ve(function (e, t) { + return [t - 1]; + }), + eq: ve(function (e, t, n) { + return [n < 0 ? n + t : n]; + }), + even: ve(function (e, t) { + for (var n = 0; n < t; n += 2) e.push(n); + return e; + }), + odd: ve(function (e, t) { + for (var n = 1; n < t; n += 2) e.push(n); + return e; + }), + lt: ve(function (e, t, n) { + for (var r = n < 0 ? n + t : t < n ? t : n; 0 <= --r; ) e.push(r); + return e; + }), + gt: ve(function (e, t, n) { + for (var r = n < 0 ? n + t : n; ++r < t; ) e.push(r); + return e; + }), + }, + }).pseudos.nth = b.pseudos.eq), + { radio: !0, checkbox: !0, file: !0, password: !0, image: !0 })) + b.pseudos[e] = de(e); + for (e in { submit: !0, reset: !0 }) b.pseudos[e] = he(e); + function me() {} + function xe(e) { + for (var t = 0, n = e.length, r = ""; t < n; t++) r += e[t].value; + return r; + } + function be(s, e, t) { + var u = e.dir, + l = e.next, + c = l || u, + f = t && "parentNode" === c, + p = r++; + return e.first + ? function (e, t, n) { + while ((e = e[u])) if (1 === e.nodeType || f) return s(e, t, n); + return !1; + } + : function (e, t, n) { + var r, + i, + o, + a = [k, p]; + if (n) { + while ((e = e[u])) + if ((1 === e.nodeType || f) && s(e, t, n)) return !0; + } else + while ((e = e[u])) + if (1 === e.nodeType || f) + if ( + ((i = + (o = e[S] || (e[S] = {}))[e.uniqueID] || + (o[e.uniqueID] = {})), + l && l === e.nodeName.toLowerCase()) + ) + e = e[u] || e; + else { + if ((r = i[c]) && r[0] === k && r[1] === p) + return (a[2] = r[2]); + if (((i[c] = a)[2] = s(e, t, n))) return !0; + } + return !1; + }; + } + function we(i) { + return 1 < i.length + ? function (e, t, n) { + var r = i.length; + while (r--) if (!i[r](e, t, n)) return !1; + return !0; + } + : i[0]; + } + function Te(e, t, n, r, i) { + for (var o, a = [], s = 0, u = e.length, l = null != t; s < u; s++) + (o = e[s]) && ((n && !n(o, r, i)) || (a.push(o), l && t.push(s))); + return a; + } + function Ce(d, h, g, v, y, e) { + return ( + v && !v[S] && (v = Ce(v)), + y && !y[S] && (y = Ce(y, e)), + le(function (e, t, n, r) { + var i, + o, + a, + s = [], + u = [], + l = t.length, + c = + e || + (function (e, t, n) { + for (var r = 0, i = t.length; r < i; r++) se(e, t[r], n); + return n; + })(h || "*", n.nodeType ? [n] : n, []), + f = !d || (!e && h) ? c : Te(c, s, d, n, r), + p = g ? (y || (e ? d : l || v) ? [] : t) : f; + if ((g && g(f, p, n, r), v)) { + (i = Te(p, u)), v(i, [], n, r), (o = i.length); + while (o--) (a = i[o]) && (p[u[o]] = !(f[u[o]] = a)); + } + if (e) { + if (y || d) { + if (y) { + (i = []), (o = p.length); + while (o--) (a = p[o]) && i.push((f[o] = a)); + y(null, (p = []), i, r); + } + o = p.length; + while (o--) + (a = p[o]) && + -1 < (i = y ? P(e, a) : s[o]) && + (e[i] = !(t[i] = a)); + } + } else (p = Te(p === t ? p.splice(l, p.length) : p)), y ? y(null, t, p, r) : H.apply(t, p); + }) + ); + } + function Ee(e) { + for ( + var i, + t, + n, + r = e.length, + o = b.relative[e[0].type], + a = o || b.relative[" "], + s = o ? 1 : 0, + u = be( + function (e) { + return e === i; + }, + a, + !0 + ), + l = be( + function (e) { + return -1 < P(i, e); + }, + a, + !0 + ), + c = [ + function (e, t, n) { + var r = + (!o && (n || t !== w)) || + ((i = t).nodeType ? u(e, t, n) : l(e, t, n)); + return (i = null), r; + }, + ]; + s < r; + s++ + ) + if ((t = b.relative[e[s].type])) c = [be(we(c), t)]; + else { + if ((t = b.filter[e[s].type].apply(null, e[s].matches))[S]) { + for (n = ++s; n < r; n++) if (b.relative[e[n].type]) break; + return Ce( + 1 < s && we(c), + 1 < s && + xe( + e + .slice(0, s - 1) + .concat({ value: " " === e[s - 2].type ? "*" : "" }) + ).replace($, "$1"), + t, + s < n && Ee(e.slice(s, n)), + n < r && Ee((e = e.slice(n))), + n < r && xe(e) + ); + } + c.push(t); + } + return we(c); + } + return ( + (me.prototype = b.filters = b.pseudos), + (b.setFilters = new me()), + (h = se.tokenize = function (e, t) { + var n, + r, + i, + o, + a, + s, + u, + l = x[e + " "]; + if (l) return t ? 0 : l.slice(0); + (a = e), (s = []), (u = b.preFilter); + while (a) { + for (o in ((n && !(r = _.exec(a))) || + (r && (a = a.slice(r[0].length) || a), s.push((i = []))), + (n = !1), + (r = z.exec(a)) && + ((n = r.shift()), + i.push({ value: n, type: r[0].replace($, " ") }), + (a = a.slice(n.length))), + b.filter)) + !(r = G[o].exec(a)) || + (u[o] && !(r = u[o](r))) || + ((n = r.shift()), + i.push({ value: n, type: o, matches: r }), + (a = a.slice(n.length))); + if (!n) break; + } + return t ? a.length : a ? se.error(e) : x(e, s).slice(0); + }), + (f = se.compile = function (e, t) { + var n, + v, + y, + m, + x, + r, + i = [], + o = [], + a = A[e + " "]; + if (!a) { + t || (t = h(e)), (n = t.length); + while (n--) (a = Ee(t[n]))[S] ? i.push(a) : o.push(a); + (a = A( + e, + ((v = o), + (m = 0 < (y = i).length), + (x = 0 < v.length), + (r = function (e, t, n, r, i) { + var o, + a, + s, + u = 0, + l = "0", + c = e && [], + f = [], + p = w, + d = e || (x && b.find.TAG("*", i)), + h = (k += null == p ? 1 : Math.random() || 0.1), + g = d.length; + for ( + i && (w = t == C || t || i); + l !== g && null != (o = d[l]); + l++ + ) { + if (x && o) { + (a = 0), t || o.ownerDocument == C || (T(o), (n = !E)); + while ((s = v[a++])) + if (s(o, t || C, n)) { + r.push(o); + break; + } + i && (k = h); + } + m && ((o = !s && o) && u--, e && c.push(o)); + } + if (((u += l), m && l !== u)) { + a = 0; + while ((s = y[a++])) s(c, f, t, n); + if (e) { + if (0 < u) while (l--) c[l] || f[l] || (f[l] = q.call(r)); + f = Te(f); + } + H.apply(r, f), + i && + !e && + 0 < f.length && + 1 < u + y.length && + se.uniqueSort(r); + } + return i && ((k = h), (w = p)), c; + }), + m ? le(r) : r) + )).selector = e; + } + return a; + }), + (g = se.select = function (e, t, n, r) { + var i, + o, + a, + s, + u, + l = "function" == typeof e && e, + c = !r && h((e = l.selector || e)); + if (((n = n || []), 1 === c.length)) { + if ( + 2 < (o = c[0] = c[0].slice(0)).length && + "ID" === (a = o[0]).type && + 9 === t.nodeType && + E && + b.relative[o[1].type] + ) { + if (!(t = (b.find.ID(a.matches[0].replace(te, ne), t) || [])[0])) + return n; + l && (t = t.parentNode), (e = e.slice(o.shift().value.length)); + } + i = G.needsContext.test(e) ? 0 : o.length; + while (i--) { + if (((a = o[i]), b.relative[(s = a.type)])) break; + if ( + (u = b.find[s]) && + (r = u( + a.matches[0].replace(te, ne), + (ee.test(o[0].type) && ye(t.parentNode)) || t + )) + ) { + if ((o.splice(i, 1), !(e = r.length && xe(o)))) + return H.apply(n, r), n; + break; + } + } + } + return ( + (l || f(e, c))( + r, + t, + !E, + n, + !t || (ee.test(e) && ye(t.parentNode)) || t + ), + n + ); + }), + (d.sortStable = S.split("").sort(D).join("") === S), + (d.detectDuplicates = !!l), + T(), + (d.sortDetached = ce(function (e) { + return 1 & e.compareDocumentPosition(C.createElement("fieldset")); + })), + ce(function (e) { + return ( + (e.innerHTML = ""), + "#" === e.firstChild.getAttribute("href") + ); + }) || + fe("type|href|height|width", function (e, t, n) { + if (!n) return e.getAttribute(t, "type" === t.toLowerCase() ? 1 : 2); + }), + (d.attributes && + ce(function (e) { + return ( + (e.innerHTML = ""), + e.firstChild.setAttribute("value", ""), + "" === e.firstChild.getAttribute("value") + ); + })) || + fe("value", function (e, t, n) { + if (!n && "input" === e.nodeName.toLowerCase()) return e.defaultValue; + }), + ce(function (e) { + return null == e.getAttribute("disabled"); + }) || + fe(R, function (e, t, n) { + var r; + if (!n) + return !0 === e[t] + ? t.toLowerCase() + : (r = e.getAttributeNode(t)) && r.specified + ? r.value + : null; + }), + se + ); + })(C); + (S.find = d), + (S.expr = d.selectors), + (S.expr[":"] = S.expr.pseudos), + (S.uniqueSort = S.unique = d.uniqueSort), + (S.text = d.getText), + (S.isXMLDoc = d.isXML), + (S.contains = d.contains), + (S.escapeSelector = d.escape); + var h = function (e, t, n) { + var r = [], + i = void 0 !== n; + while ((e = e[t]) && 9 !== e.nodeType) + if (1 === e.nodeType) { + if (i && S(e).is(n)) break; + r.push(e); + } + return r; + }, + T = function (e, t) { + for (var n = []; e; e = e.nextSibling) + 1 === e.nodeType && e !== t && n.push(e); + return n; + }, + k = S.expr.match.needsContext; + function A(e, t) { + return e.nodeName && e.nodeName.toLowerCase() === t.toLowerCase(); + } + var N = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i; + function D(e, n, r) { + return m(n) + ? S.grep(e, function (e, t) { + return !!n.call(e, t, e) !== r; + }) + : n.nodeType + ? S.grep(e, function (e) { + return (e === n) !== r; + }) + : "string" != typeof n + ? S.grep(e, function (e) { + return -1 < i.call(n, e) !== r; + }) + : S.filter(n, e, r); + } + (S.filter = function (e, t, n) { + var r = t[0]; + return ( + n && (e = ":not(" + e + ")"), + 1 === t.length && 1 === r.nodeType + ? S.find.matchesSelector(r, e) + ? [r] + : [] + : S.find.matches( + e, + S.grep(t, function (e) { + return 1 === e.nodeType; + }) + ) + ); + }), + S.fn.extend({ + find: function (e) { + var t, + n, + r = this.length, + i = this; + if ("string" != typeof e) + return this.pushStack( + S(e).filter(function () { + for (t = 0; t < r; t++) if (S.contains(i[t], this)) return !0; + }) + ); + for (n = this.pushStack([]), t = 0; t < r; t++) S.find(e, i[t], n); + return 1 < r ? S.uniqueSort(n) : n; + }, + filter: function (e) { + return this.pushStack(D(this, e || [], !1)); + }, + not: function (e) { + return this.pushStack(D(this, e || [], !0)); + }, + is: function (e) { + return !!D(this, "string" == typeof e && k.test(e) ? S(e) : e || [], !1) + .length; + }, + }); + var j, + q = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/; + ((S.fn.init = function (e, t, n) { + var r, i; + if (!e) return this; + if (((n = n || j), "string" == typeof e)) { + if ( + !(r = + "<" === e[0] && ">" === e[e.length - 1] && 3 <= e.length + ? [null, e, null] + : q.exec(e)) || + (!r[1] && t) + ) + return !t || t.jquery ? (t || n).find(e) : this.constructor(t).find(e); + if (r[1]) { + if ( + ((t = t instanceof S ? t[0] : t), + S.merge( + this, + S.parseHTML(r[1], t && t.nodeType ? t.ownerDocument || t : E, !0) + ), + N.test(r[1]) && S.isPlainObject(t)) + ) + for (r in t) m(this[r]) ? this[r](t[r]) : this.attr(r, t[r]); + return this; + } + return ( + (i = E.getElementById(r[2])) && ((this[0] = i), (this.length = 1)), this + ); + } + return e.nodeType + ? ((this[0] = e), (this.length = 1), this) + : m(e) + ? void 0 !== n.ready + ? n.ready(e) + : e(S) + : S.makeArray(e, this); + }).prototype = S.fn), + (j = S(E)); + var L = /^(?:parents|prev(?:Until|All))/, + H = { children: !0, contents: !0, next: !0, prev: !0 }; + function O(e, t) { + while ((e = e[t]) && 1 !== e.nodeType); + return e; + } + S.fn.extend({ + has: function (e) { + var t = S(e, this), + n = t.length; + return this.filter(function () { + for (var e = 0; e < n; e++) if (S.contains(this, t[e])) return !0; + }); + }, + closest: function (e, t) { + var n, + r = 0, + i = this.length, + o = [], + a = "string" != typeof e && S(e); + if (!k.test(e)) + for (; r < i; r++) + for (n = this[r]; n && n !== t; n = n.parentNode) + if ( + n.nodeType < 11 && + (a + ? -1 < a.index(n) + : 1 === n.nodeType && S.find.matchesSelector(n, e)) + ) { + o.push(n); + break; + } + return this.pushStack(1 < o.length ? S.uniqueSort(o) : o); + }, + index: function (e) { + return e + ? "string" == typeof e + ? i.call(S(e), this[0]) + : i.call(this, e.jquery ? e[0] : e) + : this[0] && this[0].parentNode + ? this.first().prevAll().length + : -1; + }, + add: function (e, t) { + return this.pushStack(S.uniqueSort(S.merge(this.get(), S(e, t)))); + }, + addBack: function (e) { + return this.add(null == e ? this.prevObject : this.prevObject.filter(e)); + }, + }), + S.each( + { + parent: function (e) { + var t = e.parentNode; + return t && 11 !== t.nodeType ? t : null; + }, + parents: function (e) { + return h(e, "parentNode"); + }, + parentsUntil: function (e, t, n) { + return h(e, "parentNode", n); + }, + next: function (e) { + return O(e, "nextSibling"); + }, + prev: function (e) { + return O(e, "previousSibling"); + }, + nextAll: function (e) { + return h(e, "nextSibling"); + }, + prevAll: function (e) { + return h(e, "previousSibling"); + }, + nextUntil: function (e, t, n) { + return h(e, "nextSibling", n); + }, + prevUntil: function (e, t, n) { + return h(e, "previousSibling", n); + }, + siblings: function (e) { + return T((e.parentNode || {}).firstChild, e); + }, + children: function (e) { + return T(e.firstChild); + }, + contents: function (e) { + return null != e.contentDocument && r(e.contentDocument) + ? e.contentDocument + : (A(e, "template") && (e = e.content || e), + S.merge([], e.childNodes)); + }, + }, + function (r, i) { + S.fn[r] = function (e, t) { + var n = S.map(this, i, e); + return ( + "Until" !== r.slice(-5) && (t = e), + t && "string" == typeof t && (n = S.filter(t, n)), + 1 < this.length && + (H[r] || S.uniqueSort(n), L.test(r) && n.reverse()), + this.pushStack(n) + ); + }; + } + ); + var P = /[^\x20\t\r\n\f]+/g; + function R(e) { + return e; + } + function M(e) { + throw e; + } + function I(e, t, n, r) { + var i; + try { + e && m((i = e.promise)) + ? i.call(e).done(t).fail(n) + : e && m((i = e.then)) + ? i.call(e, t, n) + : t.apply(void 0, [e].slice(r)); + } catch (e) { + n.apply(void 0, [e]); + } + } + (S.Callbacks = function (r) { + var e, n; + r = + "string" == typeof r + ? ((e = r), + (n = {}), + S.each(e.match(P) || [], function (e, t) { + n[t] = !0; + }), + n) + : S.extend({}, r); + var i, + t, + o, + a, + s = [], + u = [], + l = -1, + c = function () { + for (a = a || r.once, o = i = !0; u.length; l = -1) { + t = u.shift(); + while (++l < s.length) + !1 === s[l].apply(t[0], t[1]) && + r.stopOnFalse && + ((l = s.length), (t = !1)); + } + r.memory || (t = !1), (i = !1), a && (s = t ? [] : ""); + }, + f = { + add: function () { + return ( + s && + (t && !i && ((l = s.length - 1), u.push(t)), + (function n(e) { + S.each(e, function (e, t) { + m(t) + ? (r.unique && f.has(t)) || s.push(t) + : t && t.length && "string" !== w(t) && n(t); + }); + })(arguments), + t && !i && c()), + this + ); + }, + remove: function () { + return ( + S.each(arguments, function (e, t) { + var n; + while (-1 < (n = S.inArray(t, s, n))) + s.splice(n, 1), n <= l && l--; + }), + this + ); + }, + has: function (e) { + return e ? -1 < S.inArray(e, s) : 0 < s.length; + }, + empty: function () { + return s && (s = []), this; + }, + disable: function () { + return (a = u = []), (s = t = ""), this; + }, + disabled: function () { + return !s; + }, + lock: function () { + return (a = u = []), t || i || (s = t = ""), this; + }, + locked: function () { + return !!a; + }, + fireWith: function (e, t) { + return ( + a || + ((t = [e, (t = t || []).slice ? t.slice() : t]), + u.push(t), + i || c()), + this + ); + }, + fire: function () { + return f.fireWith(this, arguments), this; + }, + fired: function () { + return !!o; + }, + }; + return f; + }), + S.extend({ + Deferred: function (e) { + var o = [ + [ + "notify", + "progress", + S.Callbacks("memory"), + S.Callbacks("memory"), + 2, + ], + [ + "resolve", + "done", + S.Callbacks("once memory"), + S.Callbacks("once memory"), + 0, + "resolved", + ], + [ + "reject", + "fail", + S.Callbacks("once memory"), + S.Callbacks("once memory"), + 1, + "rejected", + ], + ], + i = "pending", + a = { + state: function () { + return i; + }, + always: function () { + return s.done(arguments).fail(arguments), this; + }, + catch: function (e) { + return a.then(null, e); + }, + pipe: function () { + var i = arguments; + return S.Deferred(function (r) { + S.each(o, function (e, t) { + var n = m(i[t[4]]) && i[t[4]]; + s[t[1]](function () { + var e = n && n.apply(this, arguments); + e && m(e.promise) + ? e + .promise() + .progress(r.notify) + .done(r.resolve) + .fail(r.reject) + : r[t[0] + "With"](this, n ? [e] : arguments); + }); + }), + (i = null); + }).promise(); + }, + then: function (t, n, r) { + var u = 0; + function l(i, o, a, s) { + return function () { + var n = this, + r = arguments, + e = function () { + var e, t; + if (!(i < u)) { + if ((e = a.apply(n, r)) === o.promise()) + throw new TypeError("Thenable self-resolution"); + (t = + e && + ("object" == typeof e || "function" == typeof e) && + e.then), + m(t) + ? s + ? t.call(e, l(u, o, R, s), l(u, o, M, s)) + : (u++, + t.call( + e, + l(u, o, R, s), + l(u, o, M, s), + l(u, o, R, o.notifyWith) + )) + : (a !== R && ((n = void 0), (r = [e])), + (s || o.resolveWith)(n, r)); + } + }, + t = s + ? e + : function () { + try { + e(); + } catch (e) { + S.Deferred.exceptionHook && + S.Deferred.exceptionHook(e, t.stackTrace), + u <= i + 1 && + (a !== M && ((n = void 0), (r = [e])), + o.rejectWith(n, r)); + } + }; + i + ? t() + : (S.Deferred.getStackHook && + (t.stackTrace = S.Deferred.getStackHook()), + C.setTimeout(t)); + }; + } + return S.Deferred(function (e) { + o[0][3].add(l(0, e, m(r) ? r : R, e.notifyWith)), + o[1][3].add(l(0, e, m(t) ? t : R)), + o[2][3].add(l(0, e, m(n) ? n : M)); + }).promise(); + }, + promise: function (e) { + return null != e ? S.extend(e, a) : a; + }, + }, + s = {}; + return ( + S.each(o, function (e, t) { + var n = t[2], + r = t[5]; + (a[t[1]] = n.add), + r && + n.add( + function () { + i = r; + }, + o[3 - e][2].disable, + o[3 - e][3].disable, + o[0][2].lock, + o[0][3].lock + ), + n.add(t[3].fire), + (s[t[0]] = function () { + return ( + s[t[0] + "With"](this === s ? void 0 : this, arguments), this + ); + }), + (s[t[0] + "With"] = n.fireWith); + }), + a.promise(s), + e && e.call(s, s), + s + ); + }, + when: function (e) { + var n = arguments.length, + t = n, + r = Array(t), + i = s.call(arguments), + o = S.Deferred(), + a = function (t) { + return function (e) { + (r[t] = this), + (i[t] = 1 < arguments.length ? s.call(arguments) : e), + --n || o.resolveWith(r, i); + }; + }; + if ( + n <= 1 && + (I(e, o.done(a(t)).resolve, o.reject, !n), + "pending" === o.state() || m(i[t] && i[t].then)) + ) + return o.then(); + while (t--) I(i[t], a(t), o.reject); + return o.promise(); + }, + }); + var W = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; + (S.Deferred.exceptionHook = function (e, t) { + C.console && + C.console.warn && + e && + W.test(e.name) && + C.console.warn("jQuery.Deferred exception: " + e.message, e.stack, t); + }), + (S.readyException = function (e) { + C.setTimeout(function () { + throw e; + }); + }); + var F = S.Deferred(); + function B() { + E.removeEventListener("DOMContentLoaded", B), + C.removeEventListener("load", B), + S.ready(); + } + (S.fn.ready = function (e) { + return ( + F.then(e)["catch"](function (e) { + S.readyException(e); + }), + this + ); + }), + S.extend({ + isReady: !1, + readyWait: 1, + ready: function (e) { + (!0 === e ? --S.readyWait : S.isReady) || + ((S.isReady = !0) !== e && 0 < --S.readyWait) || + F.resolveWith(E, [S]); + }, + }), + (S.ready.then = F.then), + "complete" === E.readyState || + ("loading" !== E.readyState && !E.documentElement.doScroll) + ? C.setTimeout(S.ready) + : (E.addEventListener("DOMContentLoaded", B), + C.addEventListener("load", B)); + var $ = function (e, t, n, r, i, o, a) { + var s = 0, + u = e.length, + l = null == n; + if ("object" === w(n)) + for (s in ((i = !0), n)) $(e, t, s, n[s], !0, o, a); + else if ( + void 0 !== r && + ((i = !0), + m(r) || (a = !0), + l && + (a + ? (t.call(e, r), (t = null)) + : ((l = t), + (t = function (e, t, n) { + return l.call(S(e), n); + }))), + t) + ) + for (; s < u; s++) t(e[s], n, a ? r : r.call(e[s], s, t(e[s], n))); + return i ? e : l ? t.call(e) : u ? t(e[0], n) : o; + }, + _ = /^-ms-/, + z = /-([a-z])/g; + function U(e, t) { + return t.toUpperCase(); + } + function X(e) { + return e.replace(_, "ms-").replace(z, U); + } + var V = function (e) { + return 1 === e.nodeType || 9 === e.nodeType || !+e.nodeType; + }; + function G() { + this.expando = S.expando + G.uid++; + } + (G.uid = 1), + (G.prototype = { + cache: function (e) { + var t = e[this.expando]; + return ( + t || + ((t = {}), + V(e) && + (e.nodeType + ? (e[this.expando] = t) + : Object.defineProperty(e, this.expando, { + value: t, + configurable: !0, + }))), + t + ); + }, + set: function (e, t, n) { + var r, + i = this.cache(e); + if ("string" == typeof t) i[X(t)] = n; + else for (r in t) i[X(r)] = t[r]; + return i; + }, + get: function (e, t) { + return void 0 === t + ? this.cache(e) + : e[this.expando] && e[this.expando][X(t)]; + }, + access: function (e, t, n) { + return void 0 === t || (t && "string" == typeof t && void 0 === n) + ? this.get(e, t) + : (this.set(e, t, n), void 0 !== n ? n : t); + }, + remove: function (e, t) { + var n, + r = e[this.expando]; + if (void 0 !== r) { + if (void 0 !== t) { + n = (t = Array.isArray(t) + ? t.map(X) + : (t = X(t)) in r + ? [t] + : t.match(P) || []).length; + while (n--) delete r[t[n]]; + } + (void 0 === t || S.isEmptyObject(r)) && + (e.nodeType ? (e[this.expando] = void 0) : delete e[this.expando]); + } + }, + hasData: function (e) { + var t = e[this.expando]; + return void 0 !== t && !S.isEmptyObject(t); + }, + }); + var Y = new G(), + Q = new G(), + J = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, + K = /[A-Z]/g; + function Z(e, t, n) { + var r, i; + if (void 0 === n && 1 === e.nodeType) + if ( + ((r = "data-" + t.replace(K, "-$&").toLowerCase()), + "string" == typeof (n = e.getAttribute(r))) + ) { + try { + n = + "true" === (i = n) || + ("false" !== i && + ("null" === i + ? null + : i === +i + "" + ? +i + : J.test(i) + ? JSON.parse(i) + : i)); + } catch (e) {} + Q.set(e, t, n); + } else n = void 0; + return n; + } + S.extend({ + hasData: function (e) { + return Q.hasData(e) || Y.hasData(e); + }, + data: function (e, t, n) { + return Q.access(e, t, n); + }, + removeData: function (e, t) { + Q.remove(e, t); + }, + _data: function (e, t, n) { + return Y.access(e, t, n); + }, + _removeData: function (e, t) { + Y.remove(e, t); + }, + }), + S.fn.extend({ + data: function (n, e) { + var t, + r, + i, + o = this[0], + a = o && o.attributes; + if (void 0 === n) { + if ( + this.length && + ((i = Q.get(o)), 1 === o.nodeType && !Y.get(o, "hasDataAttrs")) + ) { + t = a.length; + while (t--) + a[t] && + 0 === (r = a[t].name).indexOf("data-") && + ((r = X(r.slice(5))), Z(o, r, i[r])); + Y.set(o, "hasDataAttrs", !0); + } + return i; + } + return "object" == typeof n + ? this.each(function () { + Q.set(this, n); + }) + : $( + this, + function (e) { + var t; + if (o && void 0 === e) + return void 0 !== (t = Q.get(o, n)) + ? t + : void 0 !== (t = Z(o, n)) + ? t + : void 0; + this.each(function () { + Q.set(this, n, e); + }); + }, + null, + e, + 1 < arguments.length, + null, + !0 + ); + }, + removeData: function (e) { + return this.each(function () { + Q.remove(this, e); + }); + }, + }), + S.extend({ + queue: function (e, t, n) { + var r; + if (e) + return ( + (t = (t || "fx") + "queue"), + (r = Y.get(e, t)), + n && + (!r || Array.isArray(n) + ? (r = Y.access(e, t, S.makeArray(n))) + : r.push(n)), + r || [] + ); + }, + dequeue: function (e, t) { + t = t || "fx"; + var n = S.queue(e, t), + r = n.length, + i = n.shift(), + o = S._queueHooks(e, t); + "inprogress" === i && ((i = n.shift()), r--), + i && + ("fx" === t && n.unshift("inprogress"), + delete o.stop, + i.call( + e, + function () { + S.dequeue(e, t); + }, + o + )), + !r && o && o.empty.fire(); + }, + _queueHooks: function (e, t) { + var n = t + "queueHooks"; + return ( + Y.get(e, n) || + Y.access(e, n, { + empty: S.Callbacks("once memory").add(function () { + Y.remove(e, [t + "queue", n]); + }), + }) + ); + }, + }), + S.fn.extend({ + queue: function (t, n) { + var e = 2; + return ( + "string" != typeof t && ((n = t), (t = "fx"), e--), + arguments.length < e + ? S.queue(this[0], t) + : void 0 === n + ? this + : this.each(function () { + var e = S.queue(this, t, n); + S._queueHooks(this, t), + "fx" === t && "inprogress" !== e[0] && S.dequeue(this, t); + }) + ); + }, + dequeue: function (e) { + return this.each(function () { + S.dequeue(this, e); + }); + }, + clearQueue: function (e) { + return this.queue(e || "fx", []); + }, + promise: function (e, t) { + var n, + r = 1, + i = S.Deferred(), + o = this, + a = this.length, + s = function () { + --r || i.resolveWith(o, [o]); + }; + "string" != typeof e && ((t = e), (e = void 0)), (e = e || "fx"); + while (a--) + (n = Y.get(o[a], e + "queueHooks")) && + n.empty && + (r++, n.empty.add(s)); + return s(), i.promise(t); + }, + }); + var ee = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, + te = new RegExp("^(?:([+-])=|)(" + ee + ")([a-z%]*)$", "i"), + ne = ["Top", "Right", "Bottom", "Left"], + re = E.documentElement, + ie = function (e) { + return S.contains(e.ownerDocument, e); + }, + oe = { composed: !0 }; + re.getRootNode && + (ie = function (e) { + return ( + S.contains(e.ownerDocument, e) || e.getRootNode(oe) === e.ownerDocument + ); + }); + var ae = function (e, t) { + return ( + "none" === (e = t || e).style.display || + ("" === e.style.display && ie(e) && "none" === S.css(e, "display")) + ); + }; + function se(e, t, n, r) { + var i, + o, + a = 20, + s = r + ? function () { + return r.cur(); + } + : function () { + return S.css(e, t, ""); + }, + u = s(), + l = (n && n[3]) || (S.cssNumber[t] ? "" : "px"), + c = + e.nodeType && + (S.cssNumber[t] || ("px" !== l && +u)) && + te.exec(S.css(e, t)); + if (c && c[3] !== l) { + (u /= 2), (l = l || c[3]), (c = +u || 1); + while (a--) + S.style(e, t, c + l), + (1 - o) * (1 - (o = s() / u || 0.5)) <= 0 && (a = 0), + (c /= o); + (c *= 2), S.style(e, t, c + l), (n = n || []); + } + return ( + n && + ((c = +c || +u || 0), + (i = n[1] ? c + (n[1] + 1) * n[2] : +n[2]), + r && ((r.unit = l), (r.start = c), (r.end = i))), + i + ); + } + var ue = {}; + function le(e, t) { + for (var n, r, i, o, a, s, u, l = [], c = 0, f = e.length; c < f; c++) + (r = e[c]).style && + ((n = r.style.display), + t + ? ("none" === n && + ((l[c] = Y.get(r, "display") || null), + l[c] || (r.style.display = "")), + "" === r.style.display && + ae(r) && + (l[c] = + ((u = a = o = void 0), + (a = (i = r).ownerDocument), + (s = i.nodeName), + (u = ue[s]) || + ((o = a.body.appendChild(a.createElement(s))), + (u = S.css(o, "display")), + o.parentNode.removeChild(o), + "none" === u && (u = "block"), + (ue[s] = u))))) + : "none" !== n && ((l[c] = "none"), Y.set(r, "display", n))); + for (c = 0; c < f; c++) null != l[c] && (e[c].style.display = l[c]); + return e; + } + S.fn.extend({ + show: function () { + return le(this, !0); + }, + hide: function () { + return le(this); + }, + toggle: function (e) { + return "boolean" == typeof e + ? e + ? this.show() + : this.hide() + : this.each(function () { + ae(this) ? S(this).show() : S(this).hide(); + }); + }, + }); + var ce, + fe, + pe = /^(?:checkbox|radio)$/i, + de = /<([a-z][^\/\0>\x20\t\r\n\f]*)/i, + he = /^$|^module$|\/(?:java|ecma)script/i; + (ce = E.createDocumentFragment().appendChild(E.createElement("div"))), + (fe = E.createElement("input")).setAttribute("type", "radio"), + fe.setAttribute("checked", "checked"), + fe.setAttribute("name", "t"), + ce.appendChild(fe), + (y.checkClone = ce.cloneNode(!0).cloneNode(!0).lastChild.checked), + (ce.innerHTML = ""), + (y.noCloneChecked = !!ce.cloneNode(!0).lastChild.defaultValue), + (ce.innerHTML = ""), + (y.option = !!ce.lastChild); + var ge = { + thead: [1, "", "
"], + col: [2, "", "
"], + tr: [2, "", "
"], + td: [3, "", "
"], + _default: [0, "", ""], + }; + function ve(e, t) { + var n; + return ( + (n = + "undefined" != typeof e.getElementsByTagName + ? e.getElementsByTagName(t || "*") + : "undefined" != typeof e.querySelectorAll + ? e.querySelectorAll(t || "*") + : []), + void 0 === t || (t && A(e, t)) ? S.merge([e], n) : n + ); + } + function ye(e, t) { + for (var n = 0, r = e.length; n < r; n++) + Y.set(e[n], "globalEval", !t || Y.get(t[n], "globalEval")); + } + (ge.tbody = ge.tfoot = ge.colgroup = ge.caption = ge.thead), + (ge.th = ge.td), + y.option || + (ge.optgroup = ge.option = [ + 1, + "", + ]); + var me = /<|&#?\w+;/; + function xe(e, t, n, r, i) { + for ( + var o, + a, + s, + u, + l, + c, + f = t.createDocumentFragment(), + p = [], + d = 0, + h = e.length; + d < h; + d++ + ) + if ((o = e[d]) || 0 === o) + if ("object" === w(o)) S.merge(p, o.nodeType ? [o] : o); + else if (me.test(o)) { + (a = a || f.appendChild(t.createElement("div"))), + (s = (de.exec(o) || ["", ""])[1].toLowerCase()), + (u = ge[s] || ge._default), + (a.innerHTML = u[1] + S.htmlPrefilter(o) + u[2]), + (c = u[0]); + while (c--) a = a.lastChild; + S.merge(p, a.childNodes), ((a = f.firstChild).textContent = ""); + } else p.push(t.createTextNode(o)); + (f.textContent = ""), (d = 0); + while ((o = p[d++])) + if (r && -1 < S.inArray(o, r)) i && i.push(o); + else if ( + ((l = ie(o)), (a = ve(f.appendChild(o), "script")), l && ye(a), n) + ) { + c = 0; + while ((o = a[c++])) he.test(o.type || "") && n.push(o); + } + return f; + } + var be = /^key/, + we = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, + Te = /^([^.]*)(?:\.(.+)|)/; + function Ce() { + return !0; + } + function Ee() { + return !1; + } + function Se(e, t) { + return ( + (e === + (function () { + try { + return E.activeElement; + } catch (e) {} + })()) == + ("focus" === t) + ); + } + function ke(e, t, n, r, i, o) { + var a, s; + if ("object" == typeof t) { + for (s in ("string" != typeof n && ((r = r || n), (n = void 0)), t)) + ke(e, s, n, r, t[s], o); + return e; + } + if ( + (null == r && null == i + ? ((i = n), (r = n = void 0)) + : null == i && + ("string" == typeof n + ? ((i = r), (r = void 0)) + : ((i = r), (r = n), (n = void 0))), + !1 === i) + ) + i = Ee; + else if (!i) return e; + return ( + 1 === o && + ((a = i), + ((i = function (e) { + return S().off(e), a.apply(this, arguments); + }).guid = a.guid || (a.guid = S.guid++))), + e.each(function () { + S.event.add(this, t, i, r, n); + }) + ); + } + function Ae(e, i, o) { + o + ? (Y.set(e, i, !1), + S.event.add(e, i, { + namespace: !1, + handler: function (e) { + var t, + n, + r = Y.get(this, i); + if (1 & e.isTrigger && this[i]) { + if (r.length) + (S.event.special[i] || {}).delegateType && e.stopPropagation(); + else if ( + ((r = s.call(arguments)), + Y.set(this, i, r), + (t = o(this, i)), + this[i](), + r !== (n = Y.get(this, i)) || t ? Y.set(this, i, !1) : (n = {}), + r !== n) + ) + return ( + e.stopImmediatePropagation(), e.preventDefault(), n.value + ); + } else + r.length && + (Y.set(this, i, { + value: S.event.trigger( + S.extend(r[0], S.Event.prototype), + r.slice(1), + this + ), + }), + e.stopImmediatePropagation()); + }, + })) + : void 0 === Y.get(e, i) && S.event.add(e, i, Ce); + } + (S.event = { + global: {}, + add: function (t, e, n, r, i) { + var o, + a, + s, + u, + l, + c, + f, + p, + d, + h, + g, + v = Y.get(t); + if (V(t)) { + n.handler && ((n = (o = n).handler), (i = o.selector)), + i && S.find.matchesSelector(re, i), + n.guid || (n.guid = S.guid++), + (u = v.events) || (u = v.events = Object.create(null)), + (a = v.handle) || + (a = v.handle = function (e) { + return "undefined" != typeof S && S.event.triggered !== e.type + ? S.event.dispatch.apply(t, arguments) + : void 0; + }), + (l = (e = (e || "").match(P) || [""]).length); + while (l--) + (d = g = (s = Te.exec(e[l]) || [])[1]), + (h = (s[2] || "").split(".").sort()), + d && + ((f = S.event.special[d] || {}), + (d = (i ? f.delegateType : f.bindType) || d), + (f = S.event.special[d] || {}), + (c = S.extend( + { + type: d, + origType: g, + data: r, + handler: n, + guid: n.guid, + selector: i, + needsContext: i && S.expr.match.needsContext.test(i), + namespace: h.join("."), + }, + o + )), + (p = u[d]) || + (((p = u[d] = []).delegateCount = 0), + (f.setup && !1 !== f.setup.call(t, r, h, a)) || + (t.addEventListener && t.addEventListener(d, a))), + f.add && + (f.add.call(t, c), c.handler.guid || (c.handler.guid = n.guid)), + i ? p.splice(p.delegateCount++, 0, c) : p.push(c), + (S.event.global[d] = !0)); + } + }, + remove: function (e, t, n, r, i) { + var o, + a, + s, + u, + l, + c, + f, + p, + d, + h, + g, + v = Y.hasData(e) && Y.get(e); + if (v && (u = v.events)) { + l = (t = (t || "").match(P) || [""]).length; + while (l--) + if ( + ((d = g = (s = Te.exec(t[l]) || [])[1]), + (h = (s[2] || "").split(".").sort()), + d) + ) { + (f = S.event.special[d] || {}), + (p = u[(d = (r ? f.delegateType : f.bindType) || d)] || []), + (s = + s[2] && + new RegExp("(^|\\.)" + h.join("\\.(?:.*\\.|)") + "(\\.|$)")), + (a = o = p.length); + while (o--) + (c = p[o]), + (!i && g !== c.origType) || + (n && n.guid !== c.guid) || + (s && !s.test(c.namespace)) || + (r && r !== c.selector && ("**" !== r || !c.selector)) || + (p.splice(o, 1), + c.selector && p.delegateCount--, + f.remove && f.remove.call(e, c)); + a && + !p.length && + ((f.teardown && !1 !== f.teardown.call(e, h, v.handle)) || + S.removeEvent(e, d, v.handle), + delete u[d]); + } else for (d in u) S.event.remove(e, d + t[l], n, r, !0); + S.isEmptyObject(u) && Y.remove(e, "handle events"); + } + }, + dispatch: function (e) { + var t, + n, + r, + i, + o, + a, + s = new Array(arguments.length), + u = S.event.fix(e), + l = (Y.get(this, "events") || Object.create(null))[u.type] || [], + c = S.event.special[u.type] || {}; + for (s[0] = u, t = 1; t < arguments.length; t++) s[t] = arguments[t]; + if ( + ((u.delegateTarget = this), + !c.preDispatch || !1 !== c.preDispatch.call(this, u)) + ) { + (a = S.event.handlers.call(this, u, l)), (t = 0); + while ((i = a[t++]) && !u.isPropagationStopped()) { + (u.currentTarget = i.elem), (n = 0); + while ((o = i.handlers[n++]) && !u.isImmediatePropagationStopped()) + (u.rnamespace && + !1 !== o.namespace && + !u.rnamespace.test(o.namespace)) || + ((u.handleObj = o), + (u.data = o.data), + void 0 !== + (r = ( + (S.event.special[o.origType] || {}).handle || o.handler + ).apply(i.elem, s)) && + !1 === (u.result = r) && + (u.preventDefault(), u.stopPropagation())); + } + return c.postDispatch && c.postDispatch.call(this, u), u.result; + } + }, + handlers: function (e, t) { + var n, + r, + i, + o, + a, + s = [], + u = t.delegateCount, + l = e.target; + if (u && l.nodeType && !("click" === e.type && 1 <= e.button)) + for (; l !== this; l = l.parentNode || this) + if (1 === l.nodeType && ("click" !== e.type || !0 !== l.disabled)) { + for (o = [], a = {}, n = 0; n < u; n++) + void 0 === a[(i = (r = t[n]).selector + " ")] && + (a[i] = r.needsContext + ? -1 < S(i, this).index(l) + : S.find(i, this, null, [l]).length), + a[i] && o.push(r); + o.length && s.push({ elem: l, handlers: o }); + } + return ( + (l = this), u < t.length && s.push({ elem: l, handlers: t.slice(u) }), s + ); + }, + addProp: function (t, e) { + Object.defineProperty(S.Event.prototype, t, { + enumerable: !0, + configurable: !0, + get: m(e) + ? function () { + if (this.originalEvent) return e(this.originalEvent); + } + : function () { + if (this.originalEvent) return this.originalEvent[t]; + }, + set: function (e) { + Object.defineProperty(this, t, { + enumerable: !0, + configurable: !0, + writable: !0, + value: e, + }); + }, + }); + }, + fix: function (e) { + return e[S.expando] ? e : new S.Event(e); + }, + special: { + load: { noBubble: !0 }, + click: { + setup: function (e) { + var t = this || e; + return ( + pe.test(t.type) && t.click && A(t, "input") && Ae(t, "click", Ce), + !1 + ); + }, + trigger: function (e) { + var t = this || e; + return ( + pe.test(t.type) && t.click && A(t, "input") && Ae(t, "click"), !0 + ); + }, + _default: function (e) { + var t = e.target; + return ( + (pe.test(t.type) && + t.click && + A(t, "input") && + Y.get(t, "click")) || + A(t, "a") + ); + }, + }, + beforeunload: { + postDispatch: function (e) { + void 0 !== e.result && + e.originalEvent && + (e.originalEvent.returnValue = e.result); + }, + }, + }, + }), + (S.removeEvent = function (e, t, n) { + e.removeEventListener && e.removeEventListener(t, n); + }), + (S.Event = function (e, t) { + if (!(this instanceof S.Event)) return new S.Event(e, t); + e && e.type + ? ((this.originalEvent = e), + (this.type = e.type), + (this.isDefaultPrevented = + e.defaultPrevented || + (void 0 === e.defaultPrevented && !1 === e.returnValue) + ? Ce + : Ee), + (this.target = + e.target && 3 === e.target.nodeType + ? e.target.parentNode + : e.target), + (this.currentTarget = e.currentTarget), + (this.relatedTarget = e.relatedTarget)) + : (this.type = e), + t && S.extend(this, t), + (this.timeStamp = (e && e.timeStamp) || Date.now()), + (this[S.expando] = !0); + }), + (S.Event.prototype = { + constructor: S.Event, + isDefaultPrevented: Ee, + isPropagationStopped: Ee, + isImmediatePropagationStopped: Ee, + isSimulated: !1, + preventDefault: function () { + var e = this.originalEvent; + (this.isDefaultPrevented = Ce), + e && !this.isSimulated && e.preventDefault(); + }, + stopPropagation: function () { + var e = this.originalEvent; + (this.isPropagationStopped = Ce), + e && !this.isSimulated && e.stopPropagation(); + }, + stopImmediatePropagation: function () { + var e = this.originalEvent; + (this.isImmediatePropagationStopped = Ce), + e && !this.isSimulated && e.stopImmediatePropagation(), + this.stopPropagation(); + }, + }), + S.each( + { + altKey: !0, + bubbles: !0, + cancelable: !0, + changedTouches: !0, + ctrlKey: !0, + detail: !0, + eventPhase: !0, + metaKey: !0, + pageX: !0, + pageY: !0, + shiftKey: !0, + view: !0, + char: !0, + code: !0, + charCode: !0, + key: !0, + keyCode: !0, + button: !0, + buttons: !0, + clientX: !0, + clientY: !0, + offsetX: !0, + offsetY: !0, + pointerId: !0, + pointerType: !0, + screenX: !0, + screenY: !0, + targetTouches: !0, + toElement: !0, + touches: !0, + which: function (e) { + var t = e.button; + return null == e.which && be.test(e.type) + ? null != e.charCode + ? e.charCode + : e.keyCode + : !e.which && void 0 !== t && we.test(e.type) + ? 1 & t + ? 1 + : 2 & t + ? 3 + : 4 & t + ? 2 + : 0 + : e.which; + }, + }, + S.event.addProp + ), + S.each({ focus: "focusin", blur: "focusout" }, function (e, t) { + S.event.special[e] = { + setup: function () { + return Ae(this, e, Se), !1; + }, + trigger: function () { + return Ae(this, e), !0; + }, + delegateType: t, + }; + }), + S.each( + { + mouseenter: "mouseover", + mouseleave: "mouseout", + pointerenter: "pointerover", + pointerleave: "pointerout", + }, + function (e, i) { + S.event.special[e] = { + delegateType: i, + bindType: i, + handle: function (e) { + var t, + n = e.relatedTarget, + r = e.handleObj; + return ( + (n && (n === this || S.contains(this, n))) || + ((e.type = r.origType), + (t = r.handler.apply(this, arguments)), + (e.type = i)), + t + ); + }, + }; + } + ), + S.fn.extend({ + on: function (e, t, n, r) { + return ke(this, e, t, n, r); + }, + one: function (e, t, n, r) { + return ke(this, e, t, n, r, 1); + }, + off: function (e, t, n) { + var r, i; + if (e && e.preventDefault && e.handleObj) + return ( + (r = e.handleObj), + S(e.delegateTarget).off( + r.namespace ? r.origType + "." + r.namespace : r.origType, + r.selector, + r.handler + ), + this + ); + if ("object" == typeof e) { + for (i in e) this.off(i, t, e[i]); + return this; + } + return ( + (!1 !== t && "function" != typeof t) || ((n = t), (t = void 0)), + !1 === n && (n = Ee), + this.each(function () { + S.event.remove(this, e, n, t); + }) + ); + }, + }); + var Ne = /\s*$/g; + function qe(e, t) { + return ( + (A(e, "table") && + A(11 !== t.nodeType ? t : t.firstChild, "tr") && + S(e).children("tbody")[0]) || + e + ); + } + function Le(e) { + return (e.type = (null !== e.getAttribute("type")) + "/" + e.type), e; + } + function He(e) { + return ( + "true/" === (e.type || "").slice(0, 5) + ? (e.type = e.type.slice(5)) + : e.removeAttribute("type"), + e + ); + } + function Oe(e, t) { + var n, r, i, o, a, s; + if (1 === t.nodeType) { + if (Y.hasData(e) && (s = Y.get(e).events)) + for (i in (Y.remove(t, "handle events"), s)) + for (n = 0, r = s[i].length; n < r; n++) S.event.add(t, i, s[i][n]); + Q.hasData(e) && ((o = Q.access(e)), (a = S.extend({}, o)), Q.set(t, a)); + } + } + function Pe(n, r, i, o) { + r = g(r); + var e, + t, + a, + s, + u, + l, + c = 0, + f = n.length, + p = f - 1, + d = r[0], + h = m(d); + if (h || (1 < f && "string" == typeof d && !y.checkClone && De.test(d))) + return n.each(function (e) { + var t = n.eq(e); + h && (r[0] = d.call(this, e, t.html())), Pe(t, r, i, o); + }); + if ( + f && + ((t = (e = xe(r, n[0].ownerDocument, !1, n, o)).firstChild), + 1 === e.childNodes.length && (e = t), + t || o) + ) { + for (s = (a = S.map(ve(e, "script"), Le)).length; c < f; c++) + (u = e), + c !== p && + ((u = S.clone(u, !0, !0)), s && S.merge(a, ve(u, "script"))), + i.call(n[c], u, c); + if (s) + for (l = a[a.length - 1].ownerDocument, S.map(a, He), c = 0; c < s; c++) + (u = a[c]), + he.test(u.type || "") && + !Y.access(u, "globalEval") && + S.contains(l, u) && + (u.src && "module" !== (u.type || "").toLowerCase() + ? S._evalUrl && + !u.noModule && + S._evalUrl( + u.src, + { nonce: u.nonce || u.getAttribute("nonce") }, + l + ) + : b(u.textContent.replace(je, ""), u, l)); + } + return n; + } + function Re(e, t, n) { + for (var r, i = t ? S.filter(t, e) : e, o = 0; null != (r = i[o]); o++) + n || 1 !== r.nodeType || S.cleanData(ve(r)), + r.parentNode && + (n && ie(r) && ye(ve(r, "script")), r.parentNode.removeChild(r)); + return e; + } + S.extend({ + htmlPrefilter: function (e) { + return e; + }, + clone: function (e, t, n) { + var r, + i, + o, + a, + s, + u, + l, + c = e.cloneNode(!0), + f = ie(e); + if ( + !( + y.noCloneChecked || + (1 !== e.nodeType && 11 !== e.nodeType) || + S.isXMLDoc(e) + ) + ) + for (a = ve(c), r = 0, i = (o = ve(e)).length; r < i; r++) + (s = o[r]), + (u = a[r]), + void 0, + "input" === (l = u.nodeName.toLowerCase()) && pe.test(s.type) + ? (u.checked = s.checked) + : ("input" !== l && "textarea" !== l) || + (u.defaultValue = s.defaultValue); + if (t) + if (n) + for (o = o || ve(e), a = a || ve(c), r = 0, i = o.length; r < i; r++) + Oe(o[r], a[r]); + else Oe(e, c); + return ( + 0 < (a = ve(c, "script")).length && ye(a, !f && ve(e, "script")), c + ); + }, + cleanData: function (e) { + for (var t, n, r, i = S.event.special, o = 0; void 0 !== (n = e[o]); o++) + if (V(n)) { + if ((t = n[Y.expando])) { + if (t.events) + for (r in t.events) + i[r] ? S.event.remove(n, r) : S.removeEvent(n, r, t.handle); + n[Y.expando] = void 0; + } + n[Q.expando] && (n[Q.expando] = void 0); + } + }, + }), + S.fn.extend({ + detach: function (e) { + return Re(this, e, !0); + }, + remove: function (e) { + return Re(this, e); + }, + text: function (e) { + return $( + this, + function (e) { + return void 0 === e + ? S.text(this) + : this.empty().each(function () { + (1 !== this.nodeType && + 11 !== this.nodeType && + 9 !== this.nodeType) || + (this.textContent = e); + }); + }, + null, + e, + arguments.length + ); + }, + append: function () { + return Pe(this, arguments, function (e) { + (1 !== this.nodeType && + 11 !== this.nodeType && + 9 !== this.nodeType) || + qe(this, e).appendChild(e); + }); + }, + prepend: function () { + return Pe(this, arguments, function (e) { + if ( + 1 === this.nodeType || + 11 === this.nodeType || + 9 === this.nodeType + ) { + var t = qe(this, e); + t.insertBefore(e, t.firstChild); + } + }); + }, + before: function () { + return Pe(this, arguments, function (e) { + this.parentNode && this.parentNode.insertBefore(e, this); + }); + }, + after: function () { + return Pe(this, arguments, function (e) { + this.parentNode && this.parentNode.insertBefore(e, this.nextSibling); + }); + }, + empty: function () { + for (var e, t = 0; null != (e = this[t]); t++) + 1 === e.nodeType && (S.cleanData(ve(e, !1)), (e.textContent = "")); + return this; + }, + clone: function (e, t) { + return ( + (e = null != e && e), + (t = null == t ? e : t), + this.map(function () { + return S.clone(this, e, t); + }) + ); + }, + html: function (e) { + return $( + this, + function (e) { + var t = this[0] || {}, + n = 0, + r = this.length; + if (void 0 === e && 1 === t.nodeType) return t.innerHTML; + if ( + "string" == typeof e && + !Ne.test(e) && + !ge[(de.exec(e) || ["", ""])[1].toLowerCase()] + ) { + e = S.htmlPrefilter(e); + try { + for (; n < r; n++) + 1 === (t = this[n] || {}).nodeType && + (S.cleanData(ve(t, !1)), (t.innerHTML = e)); + t = 0; + } catch (e) {} + } + t && this.empty().append(e); + }, + null, + e, + arguments.length + ); + }, + replaceWith: function () { + var n = []; + return Pe( + this, + arguments, + function (e) { + var t = this.parentNode; + S.inArray(this, n) < 0 && + (S.cleanData(ve(this)), t && t.replaceChild(e, this)); + }, + n + ); + }, + }), + S.each( + { + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith", + }, + function (e, a) { + S.fn[e] = function (e) { + for (var t, n = [], r = S(e), i = r.length - 1, o = 0; o <= i; o++) + (t = o === i ? this : this.clone(!0)), + S(r[o])[a](t), + u.apply(n, t.get()); + return this.pushStack(n); + }; + } + ); + var Me = new RegExp("^(" + ee + ")(?!px)[a-z%]+$", "i"), + Ie = function (e) { + var t = e.ownerDocument.defaultView; + return (t && t.opener) || (t = C), t.getComputedStyle(e); + }, + We = function (e, t, n) { + var r, + i, + o = {}; + for (i in t) (o[i] = e.style[i]), (e.style[i] = t[i]); + for (i in ((r = n.call(e)), t)) e.style[i] = o[i]; + return r; + }, + Fe = new RegExp(ne.join("|"), "i"); + function Be(e, t, n) { + var r, + i, + o, + a, + s = e.style; + return ( + (n = n || Ie(e)) && + ("" !== (a = n.getPropertyValue(t) || n[t]) || + ie(e) || + (a = S.style(e, t)), + !y.pixelBoxStyles() && + Me.test(a) && + Fe.test(t) && + ((r = s.width), + (i = s.minWidth), + (o = s.maxWidth), + (s.minWidth = s.maxWidth = s.width = a), + (a = n.width), + (s.width = r), + (s.minWidth = i), + (s.maxWidth = o))), + void 0 !== a ? a + "" : a + ); + } + function $e(e, t) { + return { + get: function () { + if (!e()) return (this.get = t).apply(this, arguments); + delete this.get; + }, + }; + } + !(function () { + function e() { + if (l) { + (u.style.cssText = + "position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0"), + (l.style.cssText = + "position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%"), + re.appendChild(u).appendChild(l); + var e = C.getComputedStyle(l); + (n = "1%" !== e.top), + (s = 12 === t(e.marginLeft)), + (l.style.right = "60%"), + (o = 36 === t(e.right)), + (r = 36 === t(e.width)), + (l.style.position = "absolute"), + (i = 12 === t(l.offsetWidth / 3)), + re.removeChild(u), + (l = null); + } + } + function t(e) { + return Math.round(parseFloat(e)); + } + var n, + r, + i, + o, + a, + s, + u = E.createElement("div"), + l = E.createElement("div"); + l.style && + ((l.style.backgroundClip = "content-box"), + (l.cloneNode(!0).style.backgroundClip = ""), + (y.clearCloneStyle = "content-box" === l.style.backgroundClip), + S.extend(y, { + boxSizingReliable: function () { + return e(), r; + }, + pixelBoxStyles: function () { + return e(), o; + }, + pixelPosition: function () { + return e(), n; + }, + reliableMarginLeft: function () { + return e(), s; + }, + scrollboxSize: function () { + return e(), i; + }, + reliableTrDimensions: function () { + var e, t, n, r; + return ( + null == a && + ((e = E.createElement("table")), + (t = E.createElement("tr")), + (n = E.createElement("div")), + (e.style.cssText = "position:absolute;left:-11111px"), + (t.style.height = "1px"), + (n.style.height = "9px"), + re.appendChild(e).appendChild(t).appendChild(n), + (r = C.getComputedStyle(t)), + (a = 3 < parseInt(r.height)), + re.removeChild(e)), + a + ); + }, + })); + })(); + var _e = ["Webkit", "Moz", "ms"], + ze = E.createElement("div").style, + Ue = {}; + function Xe(e) { + var t = S.cssProps[e] || Ue[e]; + return ( + t || + (e in ze + ? e + : (Ue[e] = + (function (e) { + var t = e[0].toUpperCase() + e.slice(1), + n = _e.length; + while (n--) if ((e = _e[n] + t) in ze) return e; + })(e) || e)) + ); + } + var Ve = /^(none|table(?!-c[ea]).+)/, + Ge = /^--/, + Ye = { position: "absolute", visibility: "hidden", display: "block" }, + Qe = { letterSpacing: "0", fontWeight: "400" }; + function Je(e, t, n) { + var r = te.exec(t); + return r ? Math.max(0, r[2] - (n || 0)) + (r[3] || "px") : t; + } + function Ke(e, t, n, r, i, o) { + var a = "width" === t ? 1 : 0, + s = 0, + u = 0; + if (n === (r ? "border" : "content")) return 0; + for (; a < 4; a += 2) + "margin" === n && (u += S.css(e, n + ne[a], !0, i)), + r + ? ("content" === n && (u -= S.css(e, "padding" + ne[a], !0, i)), + "margin" !== n && + (u -= S.css(e, "border" + ne[a] + "Width", !0, i))) + : ((u += S.css(e, "padding" + ne[a], !0, i)), + "padding" !== n + ? (u += S.css(e, "border" + ne[a] + "Width", !0, i)) + : (s += S.css(e, "border" + ne[a] + "Width", !0, i))); + return ( + !r && + 0 <= o && + (u += + Math.max( + 0, + Math.ceil( + e["offset" + t[0].toUpperCase() + t.slice(1)] - o - u - s - 0.5 + ) + ) || 0), + u + ); + } + function Ze(e, t, n) { + var r = Ie(e), + i = + (!y.boxSizingReliable() || n) && + "border-box" === S.css(e, "boxSizing", !1, r), + o = i, + a = Be(e, t, r), + s = "offset" + t[0].toUpperCase() + t.slice(1); + if (Me.test(a)) { + if (!n) return a; + a = "auto"; + } + return ( + ((!y.boxSizingReliable() && i) || + (!y.reliableTrDimensions() && A(e, "tr")) || + "auto" === a || + (!parseFloat(a) && "inline" === S.css(e, "display", !1, r))) && + e.getClientRects().length && + ((i = "border-box" === S.css(e, "boxSizing", !1, r)), + (o = s in e) && (a = e[s])), + (a = parseFloat(a) || 0) + + Ke(e, t, n || (i ? "border" : "content"), o, r, a) + + "px" + ); + } + function et(e, t, n, r, i) { + return new et.prototype.init(e, t, n, r, i); + } + S.extend({ + cssHooks: { + opacity: { + get: function (e, t) { + if (t) { + var n = Be(e, "opacity"); + return "" === n ? "1" : n; + } + }, + }, + }, + cssNumber: { + animationIterationCount: !0, + columnCount: !0, + fillOpacity: !0, + flexGrow: !0, + flexShrink: !0, + fontWeight: !0, + gridArea: !0, + gridColumn: !0, + gridColumnEnd: !0, + gridColumnStart: !0, + gridRow: !0, + gridRowEnd: !0, + gridRowStart: !0, + lineHeight: !0, + opacity: !0, + order: !0, + orphans: !0, + widows: !0, + zIndex: !0, + zoom: !0, + }, + cssProps: {}, + style: function (e, t, n, r) { + if (e && 3 !== e.nodeType && 8 !== e.nodeType && e.style) { + var i, + o, + a, + s = X(t), + u = Ge.test(t), + l = e.style; + if ( + (u || (t = Xe(s)), (a = S.cssHooks[t] || S.cssHooks[s]), void 0 === n) + ) + return a && "get" in a && void 0 !== (i = a.get(e, !1, r)) ? i : l[t]; + "string" === (o = typeof n) && + (i = te.exec(n)) && + i[1] && + ((n = se(e, t, i)), (o = "number")), + null != n && + n == n && + ("number" !== o || + u || + (n += (i && i[3]) || (S.cssNumber[s] ? "" : "px")), + y.clearCloneStyle || + "" !== n || + 0 !== t.indexOf("background") || + (l[t] = "inherit"), + (a && "set" in a && void 0 === (n = a.set(e, n, r))) || + (u ? l.setProperty(t, n) : (l[t] = n))); + } + }, + css: function (e, t, n, r) { + var i, + o, + a, + s = X(t); + return ( + Ge.test(t) || (t = Xe(s)), + (a = S.cssHooks[t] || S.cssHooks[s]) && + "get" in a && + (i = a.get(e, !0, n)), + void 0 === i && (i = Be(e, t, r)), + "normal" === i && t in Qe && (i = Qe[t]), + "" === n || n + ? ((o = parseFloat(i)), !0 === n || isFinite(o) ? o || 0 : i) + : i + ); + }, + }), + S.each(["height", "width"], function (e, u) { + S.cssHooks[u] = { + get: function (e, t, n) { + if (t) + return !Ve.test(S.css(e, "display")) || + (e.getClientRects().length && e.getBoundingClientRect().width) + ? Ze(e, u, n) + : We(e, Ye, function () { + return Ze(e, u, n); + }); + }, + set: function (e, t, n) { + var r, + i = Ie(e), + o = !y.scrollboxSize() && "absolute" === i.position, + a = (o || n) && "border-box" === S.css(e, "boxSizing", !1, i), + s = n ? Ke(e, u, n, a, i) : 0; + return ( + a && + o && + (s -= Math.ceil( + e["offset" + u[0].toUpperCase() + u.slice(1)] - + parseFloat(i[u]) - + Ke(e, u, "border", !1, i) - + 0.5 + )), + s && + (r = te.exec(t)) && + "px" !== (r[3] || "px") && + ((e.style[u] = t), (t = S.css(e, u))), + Je(0, t, s) + ); + }, + }; + }), + (S.cssHooks.marginLeft = $e(y.reliableMarginLeft, function (e, t) { + if (t) + return ( + (parseFloat(Be(e, "marginLeft")) || + e.getBoundingClientRect().left - + We(e, { marginLeft: 0 }, function () { + return e.getBoundingClientRect().left; + })) + "px" + ); + })), + S.each({ margin: "", padding: "", border: "Width" }, function (i, o) { + (S.cssHooks[i + o] = { + expand: function (e) { + for ( + var t = 0, n = {}, r = "string" == typeof e ? e.split(" ") : [e]; + t < 4; + t++ + ) + n[i + ne[t] + o] = r[t] || r[t - 2] || r[0]; + return n; + }, + }), + "margin" !== i && (S.cssHooks[i + o].set = Je); + }), + S.fn.extend({ + css: function (e, t) { + return $( + this, + function (e, t, n) { + var r, + i, + o = {}, + a = 0; + if (Array.isArray(t)) { + for (r = Ie(e), i = t.length; a < i; a++) + o[t[a]] = S.css(e, t[a], !1, r); + return o; + } + return void 0 !== n ? S.style(e, t, n) : S.css(e, t); + }, + e, + t, + 1 < arguments.length + ); + }, + }), + (((S.Tween = et).prototype = { + constructor: et, + init: function (e, t, n, r, i, o) { + (this.elem = e), + (this.prop = n), + (this.easing = i || S.easing._default), + (this.options = t), + (this.start = this.now = this.cur()), + (this.end = r), + (this.unit = o || (S.cssNumber[n] ? "" : "px")); + }, + cur: function () { + var e = et.propHooks[this.prop]; + return e && e.get ? e.get(this) : et.propHooks._default.get(this); + }, + run: function (e) { + var t, + n = et.propHooks[this.prop]; + return ( + this.options.duration + ? (this.pos = t = S.easing[this.easing]( + e, + this.options.duration * e, + 0, + 1, + this.options.duration + )) + : (this.pos = t = e), + (this.now = (this.end - this.start) * t + this.start), + this.options.step && + this.options.step.call(this.elem, this.now, this), + n && n.set ? n.set(this) : et.propHooks._default.set(this), + this + ); + }, + }).init.prototype = et.prototype), + ((et.propHooks = { + _default: { + get: function (e) { + var t; + return 1 !== e.elem.nodeType || + (null != e.elem[e.prop] && null == e.elem.style[e.prop]) + ? e.elem[e.prop] + : (t = S.css(e.elem, e.prop, "")) && "auto" !== t + ? t + : 0; + }, + set: function (e) { + S.fx.step[e.prop] + ? S.fx.step[e.prop](e) + : 1 !== e.elem.nodeType || + (!S.cssHooks[e.prop] && null == e.elem.style[Xe(e.prop)]) + ? (e.elem[e.prop] = e.now) + : S.style(e.elem, e.prop, e.now + e.unit); + }, + }, + }).scrollTop = et.propHooks.scrollLeft = { + set: function (e) { + e.elem.nodeType && e.elem.parentNode && (e.elem[e.prop] = e.now); + }, + }), + (S.easing = { + linear: function (e) { + return e; + }, + swing: function (e) { + return 0.5 - Math.cos(e * Math.PI) / 2; + }, + _default: "swing", + }), + (S.fx = et.prototype.init), + (S.fx.step = {}); + var tt, + nt, + rt, + it, + ot = /^(?:toggle|show|hide)$/, + at = /queueHooks$/; + function st() { + nt && + (!1 === E.hidden && C.requestAnimationFrame + ? C.requestAnimationFrame(st) + : C.setTimeout(st, S.fx.interval), + S.fx.tick()); + } + function ut() { + return ( + C.setTimeout(function () { + tt = void 0; + }), + (tt = Date.now()) + ); + } + function lt(e, t) { + var n, + r = 0, + i = { height: e }; + for (t = t ? 1 : 0; r < 4; r += 2 - t) + i["margin" + (n = ne[r])] = i["padding" + n] = e; + return t && (i.opacity = i.width = e), i; + } + function ct(e, t, n) { + for ( + var r, + i = (ft.tweeners[t] || []).concat(ft.tweeners["*"]), + o = 0, + a = i.length; + o < a; + o++ + ) + if ((r = i[o].call(n, t, e))) return r; + } + function ft(o, e, t) { + var n, + a, + r = 0, + i = ft.prefilters.length, + s = S.Deferred().always(function () { + delete u.elem; + }), + u = function () { + if (a) return !1; + for ( + var e = tt || ut(), + t = Math.max(0, l.startTime + l.duration - e), + n = 1 - (t / l.duration || 0), + r = 0, + i = l.tweens.length; + r < i; + r++ + ) + l.tweens[r].run(n); + return ( + s.notifyWith(o, [l, n, t]), + n < 1 && i + ? t + : (i || s.notifyWith(o, [l, 1, 0]), s.resolveWith(o, [l]), !1) + ); + }, + l = s.promise({ + elem: o, + props: S.extend({}, e), + opts: S.extend(!0, { specialEasing: {}, easing: S.easing._default }, t), + originalProperties: e, + originalOptions: t, + startTime: tt || ut(), + duration: t.duration, + tweens: [], + createTween: function (e, t) { + var n = S.Tween( + o, + l.opts, + e, + t, + l.opts.specialEasing[e] || l.opts.easing + ); + return l.tweens.push(n), n; + }, + stop: function (e) { + var t = 0, + n = e ? l.tweens.length : 0; + if (a) return this; + for (a = !0; t < n; t++) l.tweens[t].run(1); + return ( + e + ? (s.notifyWith(o, [l, 1, 0]), s.resolveWith(o, [l, e])) + : s.rejectWith(o, [l, e]), + this + ); + }, + }), + c = l.props; + for ( + !(function (e, t) { + var n, r, i, o, a; + for (n in e) + if ( + ((i = t[(r = X(n))]), + (o = e[n]), + Array.isArray(o) && ((i = o[1]), (o = e[n] = o[0])), + n !== r && ((e[r] = o), delete e[n]), + (a = S.cssHooks[r]) && ("expand" in a)) + ) + for (n in ((o = a.expand(o)), delete e[r], o)) + (n in e) || ((e[n] = o[n]), (t[n] = i)); + else t[r] = i; + })(c, l.opts.specialEasing); + r < i; + r++ + ) + if ((n = ft.prefilters[r].call(l, o, c, l.opts))) + return ( + m(n.stop) && + (S._queueHooks(l.elem, l.opts.queue).stop = n.stop.bind(n)), + n + ); + return ( + S.map(c, ct, l), + m(l.opts.start) && l.opts.start.call(o, l), + l + .progress(l.opts.progress) + .done(l.opts.done, l.opts.complete) + .fail(l.opts.fail) + .always(l.opts.always), + S.fx.timer(S.extend(u, { elem: o, anim: l, queue: l.opts.queue })), + l + ); + } + (S.Animation = S.extend(ft, { + tweeners: { + "*": [ + function (e, t) { + var n = this.createTween(e, t); + return se(n.elem, e, te.exec(t), n), n; + }, + ], + }, + tweener: function (e, t) { + m(e) ? ((t = e), (e = ["*"])) : (e = e.match(P)); + for (var n, r = 0, i = e.length; r < i; r++) + (n = e[r]), + (ft.tweeners[n] = ft.tweeners[n] || []), + ft.tweeners[n].unshift(t); + }, + prefilters: [ + function (e, t, n) { + var r, + i, + o, + a, + s, + u, + l, + c, + f = "width" in t || "height" in t, + p = this, + d = {}, + h = e.style, + g = e.nodeType && ae(e), + v = Y.get(e, "fxshow"); + for (r in (n.queue || + (null == (a = S._queueHooks(e, "fx")).unqueued && + ((a.unqueued = 0), + (s = a.empty.fire), + (a.empty.fire = function () { + a.unqueued || s(); + })), + a.unqueued++, + p.always(function () { + p.always(function () { + a.unqueued--, S.queue(e, "fx").length || a.empty.fire(); + }); + })), + t)) + if (((i = t[r]), ot.test(i))) { + if ( + (delete t[r], + (o = o || "toggle" === i), + i === (g ? "hide" : "show")) + ) { + if ("show" !== i || !v || void 0 === v[r]) continue; + g = !0; + } + d[r] = (v && v[r]) || S.style(e, r); + } + if ((u = !S.isEmptyObject(t)) || !S.isEmptyObject(d)) + for (r in (f && + 1 === e.nodeType && + ((n.overflow = [h.overflow, h.overflowX, h.overflowY]), + null == (l = v && v.display) && (l = Y.get(e, "display")), + "none" === (c = S.css(e, "display")) && + (l + ? (c = l) + : (le([e], !0), + (l = e.style.display || l), + (c = S.css(e, "display")), + le([e]))), + ("inline" === c || ("inline-block" === c && null != l)) && + "none" === S.css(e, "float") && + (u || + (p.done(function () { + h.display = l; + }), + null == l && ((c = h.display), (l = "none" === c ? "" : c))), + (h.display = "inline-block"))), + n.overflow && + ((h.overflow = "hidden"), + p.always(function () { + (h.overflow = n.overflow[0]), + (h.overflowX = n.overflow[1]), + (h.overflowY = n.overflow[2]); + })), + (u = !1), + d)) + u || + (v + ? "hidden" in v && (g = v.hidden) + : (v = Y.access(e, "fxshow", { display: l })), + o && (v.hidden = !g), + g && le([e], !0), + p.done(function () { + for (r in (g || le([e]), Y.remove(e, "fxshow"), d)) + S.style(e, r, d[r]); + })), + (u = ct(g ? v[r] : 0, r, p)), + r in v || + ((v[r] = u.start), g && ((u.end = u.start), (u.start = 0))); + }, + ], + prefilter: function (e, t) { + t ? ft.prefilters.unshift(e) : ft.prefilters.push(e); + }, + })), + (S.speed = function (e, t, n) { + var r = + e && "object" == typeof e + ? S.extend({}, e) + : { + complete: n || (!n && t) || (m(e) && e), + duration: e, + easing: (n && t) || (t && !m(t) && t), + }; + return ( + S.fx.off + ? (r.duration = 0) + : "number" != typeof r.duration && + (r.duration in S.fx.speeds + ? (r.duration = S.fx.speeds[r.duration]) + : (r.duration = S.fx.speeds._default)), + (null != r.queue && !0 !== r.queue) || (r.queue = "fx"), + (r.old = r.complete), + (r.complete = function () { + m(r.old) && r.old.call(this), r.queue && S.dequeue(this, r.queue); + }), + r + ); + }), + S.fn.extend({ + fadeTo: function (e, t, n, r) { + return this.filter(ae) + .css("opacity", 0) + .show() + .end() + .animate({ opacity: t }, e, n, r); + }, + animate: function (t, e, n, r) { + var i = S.isEmptyObject(t), + o = S.speed(e, n, r), + a = function () { + var e = ft(this, S.extend({}, t), o); + (i || Y.get(this, "finish")) && e.stop(!0); + }; + return ( + (a.finish = a), + i || !1 === o.queue ? this.each(a) : this.queue(o.queue, a) + ); + }, + stop: function (i, e, o) { + var a = function (e) { + var t = e.stop; + delete e.stop, t(o); + }; + return ( + "string" != typeof i && ((o = e), (e = i), (i = void 0)), + e && this.queue(i || "fx", []), + this.each(function () { + var e = !0, + t = null != i && i + "queueHooks", + n = S.timers, + r = Y.get(this); + if (t) r[t] && r[t].stop && a(r[t]); + else for (t in r) r[t] && r[t].stop && at.test(t) && a(r[t]); + for (t = n.length; t--; ) + n[t].elem !== this || + (null != i && n[t].queue !== i) || + (n[t].anim.stop(o), (e = !1), n.splice(t, 1)); + (!e && o) || S.dequeue(this, i); + }) + ); + }, + finish: function (a) { + return ( + !1 !== a && (a = a || "fx"), + this.each(function () { + var e, + t = Y.get(this), + n = t[a + "queue"], + r = t[a + "queueHooks"], + i = S.timers, + o = n ? n.length : 0; + for ( + t.finish = !0, + S.queue(this, a, []), + r && r.stop && r.stop.call(this, !0), + e = i.length; + e--; + + ) + i[e].elem === this && + i[e].queue === a && + (i[e].anim.stop(!0), i.splice(e, 1)); + for (e = 0; e < o; e++) + n[e] && n[e].finish && n[e].finish.call(this); + delete t.finish; + }) + ); + }, + }), + S.each(["toggle", "show", "hide"], function (e, r) { + var i = S.fn[r]; + S.fn[r] = function (e, t, n) { + return null == e || "boolean" == typeof e + ? i.apply(this, arguments) + : this.animate(lt(r, !0), e, t, n); + }; + }), + S.each( + { + slideDown: lt("show"), + slideUp: lt("hide"), + slideToggle: lt("toggle"), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" }, + fadeToggle: { opacity: "toggle" }, + }, + function (e, r) { + S.fn[e] = function (e, t, n) { + return this.animate(r, e, t, n); + }; + } + ), + (S.timers = []), + (S.fx.tick = function () { + var e, + t = 0, + n = S.timers; + for (tt = Date.now(); t < n.length; t++) + (e = n[t])() || n[t] !== e || n.splice(t--, 1); + n.length || S.fx.stop(), (tt = void 0); + }), + (S.fx.timer = function (e) { + S.timers.push(e), S.fx.start(); + }), + (S.fx.interval = 13), + (S.fx.start = function () { + nt || ((nt = !0), st()); + }), + (S.fx.stop = function () { + nt = null; + }), + (S.fx.speeds = { slow: 600, fast: 200, _default: 400 }), + (S.fn.delay = function (r, e) { + return ( + (r = (S.fx && S.fx.speeds[r]) || r), + (e = e || "fx"), + this.queue(e, function (e, t) { + var n = C.setTimeout(e, r); + t.stop = function () { + C.clearTimeout(n); + }; + }) + ); + }), + (rt = E.createElement("input")), + (it = E.createElement("select").appendChild(E.createElement("option"))), + (rt.type = "checkbox"), + (y.checkOn = "" !== rt.value), + (y.optSelected = it.selected), + ((rt = E.createElement("input")).value = "t"), + (rt.type = "radio"), + (y.radioValue = "t" === rt.value); + var pt, + dt = S.expr.attrHandle; + S.fn.extend({ + attr: function (e, t) { + return $(this, S.attr, e, t, 1 < arguments.length); + }, + removeAttr: function (e) { + return this.each(function () { + S.removeAttr(this, e); + }); + }, + }), + S.extend({ + attr: function (e, t, n) { + var r, + i, + o = e.nodeType; + if (3 !== o && 8 !== o && 2 !== o) + return "undefined" == typeof e.getAttribute + ? S.prop(e, t, n) + : ((1 === o && S.isXMLDoc(e)) || + (i = + S.attrHooks[t.toLowerCase()] || + (S.expr.match.bool.test(t) ? pt : void 0)), + void 0 !== n + ? null === n + ? void S.removeAttr(e, t) + : i && "set" in i && void 0 !== (r = i.set(e, n, t)) + ? r + : (e.setAttribute(t, n + ""), n) + : i && "get" in i && null !== (r = i.get(e, t)) + ? r + : null == (r = S.find.attr(e, t)) + ? void 0 + : r); + }, + attrHooks: { + type: { + set: function (e, t) { + if (!y.radioValue && "radio" === t && A(e, "input")) { + var n = e.value; + return e.setAttribute("type", t), n && (e.value = n), t; + } + }, + }, + }, + removeAttr: function (e, t) { + var n, + r = 0, + i = t && t.match(P); + if (i && 1 === e.nodeType) while ((n = i[r++])) e.removeAttribute(n); + }, + }), + (pt = { + set: function (e, t, n) { + return !1 === t ? S.removeAttr(e, n) : e.setAttribute(n, n), n; + }, + }), + S.each(S.expr.match.bool.source.match(/\w+/g), function (e, t) { + var a = dt[t] || S.find.attr; + dt[t] = function (e, t, n) { + var r, + i, + o = t.toLowerCase(); + return ( + n || + ((i = dt[o]), + (dt[o] = r), + (r = null != a(e, t, n) ? o : null), + (dt[o] = i)), + r + ); + }; + }); + var ht = /^(?:input|select|textarea|button)$/i, + gt = /^(?:a|area)$/i; + function vt(e) { + return (e.match(P) || []).join(" "); + } + function yt(e) { + return (e.getAttribute && e.getAttribute("class")) || ""; + } + function mt(e) { + return Array.isArray(e) ? e : ("string" == typeof e && e.match(P)) || []; + } + S.fn.extend({ + prop: function (e, t) { + return $(this, S.prop, e, t, 1 < arguments.length); + }, + removeProp: function (e) { + return this.each(function () { + delete this[S.propFix[e] || e]; + }); + }, + }), + S.extend({ + prop: function (e, t, n) { + var r, + i, + o = e.nodeType; + if (3 !== o && 8 !== o && 2 !== o) + return ( + (1 === o && S.isXMLDoc(e)) || + ((t = S.propFix[t] || t), (i = S.propHooks[t])), + void 0 !== n + ? i && "set" in i && void 0 !== (r = i.set(e, n, t)) + ? r + : (e[t] = n) + : i && "get" in i && null !== (r = i.get(e, t)) + ? r + : e[t] + ); + }, + propHooks: { + tabIndex: { + get: function (e) { + var t = S.find.attr(e, "tabindex"); + return t + ? parseInt(t, 10) + : ht.test(e.nodeName) || (gt.test(e.nodeName) && e.href) + ? 0 + : -1; + }, + }, + }, + propFix: { for: "htmlFor", class: "className" }, + }), + y.optSelected || + (S.propHooks.selected = { + get: function (e) { + var t = e.parentNode; + return t && t.parentNode && t.parentNode.selectedIndex, null; + }, + set: function (e) { + var t = e.parentNode; + t && (t.selectedIndex, t.parentNode && t.parentNode.selectedIndex); + }, + }), + S.each( + [ + "tabIndex", + "readOnly", + "maxLength", + "cellSpacing", + "cellPadding", + "rowSpan", + "colSpan", + "useMap", + "frameBorder", + "contentEditable", + ], + function () { + S.propFix[this.toLowerCase()] = this; + } + ), + S.fn.extend({ + addClass: function (t) { + var e, + n, + r, + i, + o, + a, + s, + u = 0; + if (m(t)) + return this.each(function (e) { + S(this).addClass(t.call(this, e, yt(this))); + }); + if ((e = mt(t)).length) + while ((n = this[u++])) + if (((i = yt(n)), (r = 1 === n.nodeType && " " + vt(i) + " "))) { + a = 0; + while ((o = e[a++])) + r.indexOf(" " + o + " ") < 0 && (r += o + " "); + i !== (s = vt(r)) && n.setAttribute("class", s); + } + return this; + }, + removeClass: function (t) { + var e, + n, + r, + i, + o, + a, + s, + u = 0; + if (m(t)) + return this.each(function (e) { + S(this).removeClass(t.call(this, e, yt(this))); + }); + if (!arguments.length) return this.attr("class", ""); + if ((e = mt(t)).length) + while ((n = this[u++])) + if (((i = yt(n)), (r = 1 === n.nodeType && " " + vt(i) + " "))) { + a = 0; + while ((o = e[a++])) + while (-1 < r.indexOf(" " + o + " ")) + r = r.replace(" " + o + " ", " "); + i !== (s = vt(r)) && n.setAttribute("class", s); + } + return this; + }, + toggleClass: function (i, t) { + var o = typeof i, + a = "string" === o || Array.isArray(i); + return "boolean" == typeof t && a + ? t + ? this.addClass(i) + : this.removeClass(i) + : m(i) + ? this.each(function (e) { + S(this).toggleClass(i.call(this, e, yt(this), t), t); + }) + : this.each(function () { + var e, t, n, r; + if (a) { + (t = 0), (n = S(this)), (r = mt(i)); + while ((e = r[t++])) + n.hasClass(e) ? n.removeClass(e) : n.addClass(e); + } else (void 0 !== i && "boolean" !== o) || ((e = yt(this)) && Y.set(this, "__className__", e), this.setAttribute && this.setAttribute("class", e || !1 === i ? "" : Y.get(this, "__className__") || "")); + }); + }, + hasClass: function (e) { + var t, + n, + r = 0; + t = " " + e + " "; + while ((n = this[r++])) + if (1 === n.nodeType && -1 < (" " + vt(yt(n)) + " ").indexOf(t)) + return !0; + return !1; + }, + }); + var xt = /\r/g; + S.fn.extend({ + val: function (n) { + var r, + e, + i, + t = this[0]; + return arguments.length + ? ((i = m(n)), + this.each(function (e) { + var t; + 1 === this.nodeType && + (null == (t = i ? n.call(this, e, S(this).val()) : n) + ? (t = "") + : "number" == typeof t + ? (t += "") + : Array.isArray(t) && + (t = S.map(t, function (e) { + return null == e ? "" : e + ""; + })), + ((r = + S.valHooks[this.type] || + S.valHooks[this.nodeName.toLowerCase()]) && + "set" in r && + void 0 !== r.set(this, t, "value")) || + (this.value = t)); + })) + : t + ? (r = S.valHooks[t.type] || S.valHooks[t.nodeName.toLowerCase()]) && + "get" in r && + void 0 !== (e = r.get(t, "value")) + ? e + : "string" == typeof (e = t.value) + ? e.replace(xt, "") + : null == e + ? "" + : e + : void 0; + }, + }), + S.extend({ + valHooks: { + option: { + get: function (e) { + var t = S.find.attr(e, "value"); + return null != t ? t : vt(S.text(e)); + }, + }, + select: { + get: function (e) { + var t, + n, + r, + i = e.options, + o = e.selectedIndex, + a = "select-one" === e.type, + s = a ? null : [], + u = a ? o + 1 : i.length; + for (r = o < 0 ? u : a ? o : 0; r < u; r++) + if ( + ((n = i[r]).selected || r === o) && + !n.disabled && + (!n.parentNode.disabled || !A(n.parentNode, "optgroup")) + ) { + if (((t = S(n).val()), a)) return t; + s.push(t); + } + return s; + }, + set: function (e, t) { + var n, + r, + i = e.options, + o = S.makeArray(t), + a = i.length; + while (a--) + ((r = i[a]).selected = + -1 < S.inArray(S.valHooks.option.get(r), o)) && (n = !0); + return n || (e.selectedIndex = -1), o; + }, + }, + }, + }), + S.each(["radio", "checkbox"], function () { + (S.valHooks[this] = { + set: function (e, t) { + if (Array.isArray(t)) + return (e.checked = -1 < S.inArray(S(e).val(), t)); + }, + }), + y.checkOn || + (S.valHooks[this].get = function (e) { + return null === e.getAttribute("value") ? "on" : e.value; + }); + }), + (y.focusin = "onfocusin" in C); + var bt = /^(?:focusinfocus|focusoutblur)$/, + wt = function (e) { + e.stopPropagation(); + }; + S.extend(S.event, { + trigger: function (e, t, n, r) { + var i, + o, + a, + s, + u, + l, + c, + f, + p = [n || E], + d = v.call(e, "type") ? e.type : e, + h = v.call(e, "namespace") ? e.namespace.split(".") : []; + if ( + ((o = f = a = n = n || E), + 3 !== n.nodeType && + 8 !== n.nodeType && + !bt.test(d + S.event.triggered) && + (-1 < d.indexOf(".") && ((d = (h = d.split(".")).shift()), h.sort()), + (u = d.indexOf(":") < 0 && "on" + d), + ((e = e[S.expando] + ? e + : new S.Event(d, "object" == typeof e && e)).isTrigger = r ? 2 : 3), + (e.namespace = h.join(".")), + (e.rnamespace = e.namespace + ? new RegExp("(^|\\.)" + h.join("\\.(?:.*\\.|)") + "(\\.|$)") + : null), + (e.result = void 0), + e.target || (e.target = n), + (t = null == t ? [e] : S.makeArray(t, [e])), + (c = S.event.special[d] || {}), + r || !c.trigger || !1 !== c.trigger.apply(n, t))) + ) { + if (!r && !c.noBubble && !x(n)) { + for ( + s = c.delegateType || d, bt.test(s + d) || (o = o.parentNode); + o; + o = o.parentNode + ) + p.push(o), (a = o); + a === (n.ownerDocument || E) && + p.push(a.defaultView || a.parentWindow || C); + } + i = 0; + while ((o = p[i++]) && !e.isPropagationStopped()) + (f = o), + (e.type = 1 < i ? s : c.bindType || d), + (l = + (Y.get(o, "events") || Object.create(null))[e.type] && + Y.get(o, "handle")) && l.apply(o, t), + (l = u && o[u]) && + l.apply && + V(o) && + ((e.result = l.apply(o, t)), + !1 === e.result && e.preventDefault()); + return ( + (e.type = d), + r || + e.isDefaultPrevented() || + (c._default && !1 !== c._default.apply(p.pop(), t)) || + !V(n) || + (u && + m(n[d]) && + !x(n) && + ((a = n[u]) && (n[u] = null), + (S.event.triggered = d), + e.isPropagationStopped() && f.addEventListener(d, wt), + n[d](), + e.isPropagationStopped() && f.removeEventListener(d, wt), + (S.event.triggered = void 0), + a && (n[u] = a))), + e.result + ); + } + }, + simulate: function (e, t, n) { + var r = S.extend(new S.Event(), n, { type: e, isSimulated: !0 }); + S.event.trigger(r, null, t); + }, + }), + S.fn.extend({ + trigger: function (e, t) { + return this.each(function () { + S.event.trigger(e, t, this); + }); + }, + triggerHandler: function (e, t) { + var n = this[0]; + if (n) return S.event.trigger(e, t, n, !0); + }, + }), + y.focusin || + S.each({ focus: "focusin", blur: "focusout" }, function (n, r) { + var i = function (e) { + S.event.simulate(r, e.target, S.event.fix(e)); + }; + S.event.special[r] = { + setup: function () { + var e = this.ownerDocument || this.document || this, + t = Y.access(e, r); + t || e.addEventListener(n, i, !0), Y.access(e, r, (t || 0) + 1); + }, + teardown: function () { + var e = this.ownerDocument || this.document || this, + t = Y.access(e, r) - 1; + t + ? Y.access(e, r, t) + : (e.removeEventListener(n, i, !0), Y.remove(e, r)); + }, + }; + }); + var Tt = C.location, + Ct = { guid: Date.now() }, + Et = /\?/; + S.parseXML = function (e) { + var t; + if (!e || "string" != typeof e) return null; + try { + t = new C.DOMParser().parseFromString(e, "text/xml"); + } catch (e) { + t = void 0; + } + return ( + (t && !t.getElementsByTagName("parsererror").length) || + S.error("Invalid XML: " + e), + t + ); + }; + var St = /\[\]$/, + kt = /\r?\n/g, + At = /^(?:submit|button|image|reset|file)$/i, + Nt = /^(?:input|select|textarea|keygen)/i; + function Dt(n, e, r, i) { + var t; + if (Array.isArray(e)) + S.each(e, function (e, t) { + r || St.test(n) + ? i(n, t) + : Dt( + n + "[" + ("object" == typeof t && null != t ? e : "") + "]", + t, + r, + i + ); + }); + else if (r || "object" !== w(e)) i(n, e); + else for (t in e) Dt(n + "[" + t + "]", e[t], r, i); + } + (S.param = function (e, t) { + var n, + r = [], + i = function (e, t) { + var n = m(t) ? t() : t; + r[r.length] = + encodeURIComponent(e) + "=" + encodeURIComponent(null == n ? "" : n); + }; + if (null == e) return ""; + if (Array.isArray(e) || (e.jquery && !S.isPlainObject(e))) + S.each(e, function () { + i(this.name, this.value); + }); + else for (n in e) Dt(n, e[n], t, i); + return r.join("&"); + }), + S.fn.extend({ + serialize: function () { + return S.param(this.serializeArray()); + }, + serializeArray: function () { + return this.map(function () { + var e = S.prop(this, "elements"); + return e ? S.makeArray(e) : this; + }) + .filter(function () { + var e = this.type; + return ( + this.name && + !S(this).is(":disabled") && + Nt.test(this.nodeName) && + !At.test(e) && + (this.checked || !pe.test(e)) + ); + }) + .map(function (e, t) { + var n = S(this).val(); + return null == n + ? null + : Array.isArray(n) + ? S.map(n, function (e) { + return { name: t.name, value: e.replace(kt, "\r\n") }; + }) + : { name: t.name, value: n.replace(kt, "\r\n") }; + }) + .get(); + }, + }); + var jt = /%20/g, + qt = /#.*$/, + Lt = /([?&])_=[^&]*/, + Ht = /^(.*?):[ \t]*([^\r\n]*)$/gm, + Ot = /^(?:GET|HEAD)$/, + Pt = /^\/\//, + Rt = {}, + Mt = {}, + It = "*/".concat("*"), + Wt = E.createElement("a"); + function Ft(o) { + return function (e, t) { + "string" != typeof e && ((t = e), (e = "*")); + var n, + r = 0, + i = e.toLowerCase().match(P) || []; + if (m(t)) + while ((n = i[r++])) + "+" === n[0] + ? ((n = n.slice(1) || "*"), (o[n] = o[n] || []).unshift(t)) + : (o[n] = o[n] || []).push(t); + }; + } + function Bt(t, i, o, a) { + var s = {}, + u = t === Mt; + function l(e) { + var r; + return ( + (s[e] = !0), + S.each(t[e] || [], function (e, t) { + var n = t(i, o, a); + return "string" != typeof n || u || s[n] + ? u + ? !(r = n) + : void 0 + : (i.dataTypes.unshift(n), l(n), !1); + }), + r + ); + } + return l(i.dataTypes[0]) || (!s["*"] && l("*")); + } + function $t(e, t) { + var n, + r, + i = S.ajaxSettings.flatOptions || {}; + for (n in t) void 0 !== t[n] && ((i[n] ? e : r || (r = {}))[n] = t[n]); + return r && S.extend(!0, e, r), e; + } + (Wt.href = Tt.href), + S.extend({ + active: 0, + lastModified: {}, + etag: {}, + ajaxSettings: { + url: Tt.href, + type: "GET", + isLocal: /^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test( + Tt.protocol + ), + global: !0, + processData: !0, + async: !0, + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + accepts: { + "*": It, + text: "text/plain", + html: "text/html", + xml: "application/xml, text/xml", + json: "application/json, text/javascript", + }, + contents: { xml: /\bxml\b/, html: /\bhtml/, json: /\bjson\b/ }, + responseFields: { + xml: "responseXML", + text: "responseText", + json: "responseJSON", + }, + converters: { + "* text": String, + "text html": !0, + "text json": JSON.parse, + "text xml": S.parseXML, + }, + flatOptions: { url: !0, context: !0 }, + }, + ajaxSetup: function (e, t) { + return t ? $t($t(e, S.ajaxSettings), t) : $t(S.ajaxSettings, e); + }, + ajaxPrefilter: Ft(Rt), + ajaxTransport: Ft(Mt), + ajax: function (e, t) { + "object" == typeof e && ((t = e), (e = void 0)), (t = t || {}); + var c, + f, + p, + n, + d, + r, + h, + g, + i, + o, + v = S.ajaxSetup({}, t), + y = v.context || v, + m = v.context && (y.nodeType || y.jquery) ? S(y) : S.event, + x = S.Deferred(), + b = S.Callbacks("once memory"), + w = v.statusCode || {}, + a = {}, + s = {}, + u = "canceled", + T = { + readyState: 0, + getResponseHeader: function (e) { + var t; + if (h) { + if (!n) { + n = {}; + while ((t = Ht.exec(p))) + n[t[1].toLowerCase() + " "] = ( + n[t[1].toLowerCase() + " "] || [] + ).concat(t[2]); + } + t = n[e.toLowerCase() + " "]; + } + return null == t ? null : t.join(", "); + }, + getAllResponseHeaders: function () { + return h ? p : null; + }, + setRequestHeader: function (e, t) { + return ( + null == h && + ((e = s[e.toLowerCase()] = s[e.toLowerCase()] || e), + (a[e] = t)), + this + ); + }, + overrideMimeType: function (e) { + return null == h && (v.mimeType = e), this; + }, + statusCode: function (e) { + var t; + if (e) + if (h) T.always(e[T.status]); + else for (t in e) w[t] = [w[t], e[t]]; + return this; + }, + abort: function (e) { + var t = e || u; + return c && c.abort(t), l(0, t), this; + }, + }; + if ( + (x.promise(T), + (v.url = ((e || v.url || Tt.href) + "").replace( + Pt, + Tt.protocol + "//" + )), + (v.type = t.method || t.type || v.method || v.type), + (v.dataTypes = (v.dataType || "*").toLowerCase().match(P) || [""]), + null == v.crossDomain) + ) { + r = E.createElement("a"); + try { + (r.href = v.url), + (r.href = r.href), + (v.crossDomain = + Wt.protocol + "//" + Wt.host != r.protocol + "//" + r.host); + } catch (e) { + v.crossDomain = !0; + } + } + if ( + (v.data && + v.processData && + "string" != typeof v.data && + (v.data = S.param(v.data, v.traditional)), + Bt(Rt, v, t, T), + h) + ) + return T; + for (i in ((g = S.event && v.global) && + 0 == S.active++ && + S.event.trigger("ajaxStart"), + (v.type = v.type.toUpperCase()), + (v.hasContent = !Ot.test(v.type)), + (f = v.url.replace(qt, "")), + v.hasContent + ? v.data && + v.processData && + 0 === + (v.contentType || "").indexOf( + "application/x-www-form-urlencoded" + ) && + (v.data = v.data.replace(jt, "+")) + : ((o = v.url.slice(f.length)), + v.data && + (v.processData || "string" == typeof v.data) && + ((f += (Et.test(f) ? "&" : "?") + v.data), delete v.data), + !1 === v.cache && + ((f = f.replace(Lt, "$1")), + (o = (Et.test(f) ? "&" : "?") + "_=" + Ct.guid++ + o)), + (v.url = f + o)), + v.ifModified && + (S.lastModified[f] && + T.setRequestHeader("If-Modified-Since", S.lastModified[f]), + S.etag[f] && T.setRequestHeader("If-None-Match", S.etag[f])), + ((v.data && v.hasContent && !1 !== v.contentType) || t.contentType) && + T.setRequestHeader("Content-Type", v.contentType), + T.setRequestHeader( + "Accept", + v.dataTypes[0] && v.accepts[v.dataTypes[0]] + ? v.accepts[v.dataTypes[0]] + + ("*" !== v.dataTypes[0] ? ", " + It + "; q=0.01" : "") + : v.accepts["*"] + ), + v.headers)) + T.setRequestHeader(i, v.headers[i]); + if (v.beforeSend && (!1 === v.beforeSend.call(y, T, v) || h)) + return T.abort(); + if ( + ((u = "abort"), + b.add(v.complete), + T.done(v.success), + T.fail(v.error), + (c = Bt(Mt, v, t, T))) + ) { + if (((T.readyState = 1), g && m.trigger("ajaxSend", [T, v]), h)) + return T; + v.async && + 0 < v.timeout && + (d = C.setTimeout(function () { + T.abort("timeout"); + }, v.timeout)); + try { + (h = !1), c.send(a, l); + } catch (e) { + if (h) throw e; + l(-1, e); + } + } else l(-1, "No Transport"); + function l(e, t, n, r) { + var i, + o, + a, + s, + u, + l = t; + h || + ((h = !0), + d && C.clearTimeout(d), + (c = void 0), + (p = r || ""), + (T.readyState = 0 < e ? 4 : 0), + (i = (200 <= e && e < 300) || 304 === e), + n && + (s = (function (e, t, n) { + var r, + i, + o, + a, + s = e.contents, + u = e.dataTypes; + while ("*" === u[0]) + u.shift(), + void 0 === r && + (r = e.mimeType || t.getResponseHeader("Content-Type")); + if (r) + for (i in s) + if (s[i] && s[i].test(r)) { + u.unshift(i); + break; + } + if (u[0] in n) o = u[0]; + else { + for (i in n) { + if (!u[0] || e.converters[i + " " + u[0]]) { + o = i; + break; + } + a || (a = i); + } + o = o || a; + } + if (o) return o !== u[0] && u.unshift(o), n[o]; + })(v, T, n)), + !i && + -1 < S.inArray("script", v.dataTypes) && + (v.converters["text script"] = function () {}), + (s = (function (e, t, n, r) { + var i, + o, + a, + s, + u, + l = {}, + c = e.dataTypes.slice(); + if (c[1]) + for (a in e.converters) l[a.toLowerCase()] = e.converters[a]; + o = c.shift(); + while (o) + if ( + (e.responseFields[o] && (n[e.responseFields[o]] = t), + !u && r && e.dataFilter && (t = e.dataFilter(t, e.dataType)), + (u = o), + (o = c.shift())) + ) + if ("*" === o) o = u; + else if ("*" !== u && u !== o) { + if (!(a = l[u + " " + o] || l["* " + o])) + for (i in l) + if ( + (s = i.split(" "))[1] === o && + (a = l[u + " " + s[0]] || l["* " + s[0]]) + ) { + !0 === a + ? (a = l[i]) + : !0 !== l[i] && ((o = s[0]), c.unshift(s[1])); + break; + } + if (!0 !== a) + if (a && e["throws"]) t = a(t); + else + try { + t = a(t); + } catch (e) { + return { + state: "parsererror", + error: a + ? e + : "No conversion from " + u + " to " + o, + }; + } + } + return { state: "success", data: t }; + })(v, s, T, i)), + i + ? (v.ifModified && + ((u = T.getResponseHeader("Last-Modified")) && + (S.lastModified[f] = u), + (u = T.getResponseHeader("etag")) && (S.etag[f] = u)), + 204 === e || "HEAD" === v.type + ? (l = "nocontent") + : 304 === e + ? (l = "notmodified") + : ((l = s.state), (o = s.data), (i = !(a = s.error)))) + : ((a = l), (!e && l) || ((l = "error"), e < 0 && (e = 0))), + (T.status = e), + (T.statusText = (t || l) + ""), + i ? x.resolveWith(y, [o, l, T]) : x.rejectWith(y, [T, l, a]), + T.statusCode(w), + (w = void 0), + g && m.trigger(i ? "ajaxSuccess" : "ajaxError", [T, v, i ? o : a]), + b.fireWith(y, [T, l]), + g && + (m.trigger("ajaxComplete", [T, v]), + --S.active || S.event.trigger("ajaxStop"))); + } + return T; + }, + getJSON: function (e, t, n) { + return S.get(e, t, n, "json"); + }, + getScript: function (e, t) { + return S.get(e, void 0, t, "script"); + }, + }), + S.each(["get", "post"], function (e, i) { + S[i] = function (e, t, n, r) { + return ( + m(t) && ((r = r || n), (n = t), (t = void 0)), + S.ajax( + S.extend( + { url: e, type: i, dataType: r, data: t, success: n }, + S.isPlainObject(e) && e + ) + ) + ); + }; + }), + S.ajaxPrefilter(function (e) { + var t; + for (t in e.headers) + "content-type" === t.toLowerCase() && + (e.contentType = e.headers[t] || ""); + }), + (S._evalUrl = function (e, t, n) { + return S.ajax({ + url: e, + type: "GET", + dataType: "script", + cache: !0, + async: !1, + global: !1, + converters: { "text script": function () {} }, + dataFilter: function (e) { + S.globalEval(e, t, n); + }, + }); + }), + S.fn.extend({ + wrapAll: function (e) { + var t; + return ( + this[0] && + (m(e) && (e = e.call(this[0])), + (t = S(e, this[0].ownerDocument).eq(0).clone(!0)), + this[0].parentNode && t.insertBefore(this[0]), + t + .map(function () { + var e = this; + while (e.firstElementChild) e = e.firstElementChild; + return e; + }) + .append(this)), + this + ); + }, + wrapInner: function (n) { + return m(n) + ? this.each(function (e) { + S(this).wrapInner(n.call(this, e)); + }) + : this.each(function () { + var e = S(this), + t = e.contents(); + t.length ? t.wrapAll(n) : e.append(n); + }); + }, + wrap: function (t) { + var n = m(t); + return this.each(function (e) { + S(this).wrapAll(n ? t.call(this, e) : t); + }); + }, + unwrap: function (e) { + return ( + this.parent(e) + .not("body") + .each(function () { + S(this).replaceWith(this.childNodes); + }), + this + ); + }, + }), + (S.expr.pseudos.hidden = function (e) { + return !S.expr.pseudos.visible(e); + }), + (S.expr.pseudos.visible = function (e) { + return !!(e.offsetWidth || e.offsetHeight || e.getClientRects().length); + }), + (S.ajaxSettings.xhr = function () { + try { + return new C.XMLHttpRequest(); + } catch (e) {} + }); + var _t = { 0: 200, 1223: 204 }, + zt = S.ajaxSettings.xhr(); + (y.cors = !!zt && "withCredentials" in zt), + (y.ajax = zt = !!zt), + S.ajaxTransport(function (i) { + var o, a; + if (y.cors || (zt && !i.crossDomain)) + return { + send: function (e, t) { + var n, + r = i.xhr(); + if ( + (r.open(i.type, i.url, i.async, i.username, i.password), + i.xhrFields) + ) + for (n in i.xhrFields) r[n] = i.xhrFields[n]; + for (n in (i.mimeType && + r.overrideMimeType && + r.overrideMimeType(i.mimeType), + i.crossDomain || + e["X-Requested-With"] || + (e["X-Requested-With"] = "XMLHttpRequest"), + e)) + r.setRequestHeader(n, e[n]); + (o = function (e) { + return function () { + o && + ((o = a = r.onload = r.onerror = r.onabort = r.ontimeout = r.onreadystatechange = null), + "abort" === e + ? r.abort() + : "error" === e + ? "number" != typeof r.status + ? t(0, "error") + : t(r.status, r.statusText) + : t( + _t[r.status] || r.status, + r.statusText, + "text" !== (r.responseType || "text") || + "string" != typeof r.responseText + ? { binary: r.response } + : { text: r.responseText }, + r.getAllResponseHeaders() + )); + }; + }), + (r.onload = o()), + (a = r.onerror = r.ontimeout = o("error")), + void 0 !== r.onabort + ? (r.onabort = a) + : (r.onreadystatechange = function () { + 4 === r.readyState && + C.setTimeout(function () { + o && a(); + }); + }), + (o = o("abort")); + try { + r.send((i.hasContent && i.data) || null); + } catch (e) { + if (o) throw e; + } + }, + abort: function () { + o && o(); + }, + }; + }), + S.ajaxPrefilter(function (e) { + e.crossDomain && (e.contents.script = !1); + }), + S.ajaxSetup({ + accepts: { + script: + "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript", + }, + contents: { script: /\b(?:java|ecma)script\b/ }, + converters: { + "text script": function (e) { + return S.globalEval(e), e; + }, + }, + }), + S.ajaxPrefilter("script", function (e) { + void 0 === e.cache && (e.cache = !1), e.crossDomain && (e.type = "GET"); + }), + S.ajaxTransport("script", function (n) { + var r, i; + if (n.crossDomain || n.scriptAttrs) + return { + send: function (e, t) { + (r = S("