Set two-letter country code for regularity (example: US)"
- echo " --freq-band Set frequency band. Valid inputs: 2.4, 5 (default: 2.4)"
- echo " --driver Choose your WiFi adapter driver (default: nl80211)"
- echo " --no-virt Do not create virtual interface"
- echo " --no-haveged Do not run 'haveged' automatically when needed"
- echo " --fix-unmanaged If NetworkManager shows your interface as unmanaged after you"
- echo " close create_ap, then use this option to switch your interface"
- echo " back to managed"
- echo " --mac Set MAC address"
- echo " --dhcp-dns Set DNS returned by DHCP"
- echo " --daemon Run create_ap in the background"
- echo " --stop Send stop command to an already running create_ap. For an "
- echo " you can put the PID of create_ap or the WiFi interface. You can"
- echo " get them with --list-running"
- echo " --list-running Show the create_ap processes that are already running"
- echo " --list-clients List the clients connected to create_ap instance associated with ."
- echo " For an you can put the PID of create_ap or the WiFi interface."
- echo " If virtual WiFi interface was created, then use that one."
- echo " You can get them with --list-running"
- echo " --mkconfig Store configs in conf_file"
- echo " --config Load configs from conf_file"
- echo
- echo "Non-Bridging Options:"
- echo " --no-dns Disable dnsmasq DNS server"
- echo " -g IPv4 Gateway for the Access Point (default: 192.168.12.1)"
- echo " -d DNS server will take into account /etc/hosts"
- echo
- echo "Useful informations:"
- echo " * If you're not using the --no-virt option, then you can create an AP with the same"
- echo " interface you are getting your Internet connection."
- echo " * You can pass your SSID and password through pipe or through arguments (see examples)."
- echo " * On bridge method if the is not a bridge interface, then"
- echo " a bridge interface is created automatically."
- echo
- echo "Examples:"
- echo " "$PROGNAME" wlan0 eth0 MyAccessPoint MyPassPhrase"
- echo " echo -e 'MyAccessPoint\nMyPassPhrase' | "$PROGNAME" wlan0 eth0"
- echo " "$PROGNAME" wlan0 eth0 MyAccessPoint"
- echo " echo 'MyAccessPoint' | "$PROGNAME" wlan0 eth0"
- echo " "$PROGNAME" wlan0 wlan0 MyAccessPoint MyPassPhrase"
- echo " "$PROGNAME" -n wlan0 MyAccessPoint MyPassPhrase"
- echo " "$PROGNAME" -m bridge wlan0 eth0 MyAccessPoint MyPassPhrase"
- echo " "$PROGNAME" -m bridge wlan0 br0 MyAccessPoint MyPassPhrase"
- echo " "$PROGNAME" --driver rtl871xdrv wlan0 eth0 MyAccessPoint MyPassPhrase"
- echo " "$PROGNAME" --daemon wlan0 eth0 MyAccessPoint MyPassPhrase"
- echo " "$PROGNAME" --stop wlan0"
-}
-
-# on success it echos a non-zero unused FD
-# on error it echos 0
-get_avail_fd() {
- local x
- for x in $(seq 1 $(ulimit -n)); do
- if [[ ! -a "/proc/$BASHPID/fd/$x" ]]; then
- echo $x
- return
- fi
- done
- echo 0
-}
-
-# lock file for the mutex counter
-COUNTER_LOCK_FILE=/tmp/create_ap.$$.lock
-
-cleanup_lock() {
- rm -f $COUNTER_LOCK_FILE
-}
-
-init_lock() {
- local LOCK_FILE=/tmp/create_ap.all.lock
-
- # we initialize only once
- [[ $LOCK_FD -ne 0 ]] && return 0
-
- LOCK_FD=$(get_avail_fd)
- [[ $LOCK_FD -eq 0 ]] && return 1
-
- # open/create lock file with write access for all users
- # otherwise normal users will not be able to use it.
- # to avoid race conditions on creation, we need to
- # use umask to set the permissions.
- umask 0555
- eval "exec $LOCK_FD>$LOCK_FILE" > /dev/null 2>&1 || return 1
- umask $SCRIPT_UMASK
-
- # there is a case where lock file was created from a normal
- # user. change the owner to root as soon as we can.
- [[ $(id -u) -eq 0 ]] && chown 0:0 $LOCK_FILE
-
- # create mutex counter lock file
- echo 0 > $COUNTER_LOCK_FILE
-
- return $?
-}
-
-# recursive mutex lock for all create_ap processes
-mutex_lock() {
- local counter_mutex_fd
- local counter
-
- # lock local mutex and read counter
- counter_mutex_fd=$(get_avail_fd)
- if [[ $counter_mutex_fd -ne 0 ]]; then
- eval "exec $counter_mutex_fd<>$COUNTER_LOCK_FILE"
- flock $counter_mutex_fd
- read -u $counter_mutex_fd counter
- else
- echo "Failed to lock mutex counter" >&2
- return 1
- fi
-
- # lock global mutex and increase counter
- [[ $counter -eq 0 ]] && flock $LOCK_FD
- counter=$(( $counter + 1 ))
-
- # write counter and unlock local mutex
- echo $counter > /proc/$BASHPID/fd/$counter_mutex_fd
- eval "exec ${counter_mutex_fd}<&-"
- return 0
-}
-
-# recursive mutex unlock for all create_ap processes
-mutex_unlock() {
- local counter_mutex_fd
- local counter
-
- # lock local mutex and read counter
- counter_mutex_fd=$(get_avail_fd)
- if [[ $counter_mutex_fd -ne 0 ]]; then
- eval "exec $counter_mutex_fd<>$COUNTER_LOCK_FILE"
- flock $counter_mutex_fd
- read -u $counter_mutex_fd counter
- else
- echo "Failed to lock mutex counter" >&2
- return 1
- fi
-
- # decrease counter and unlock global mutex
- if [[ $counter -gt 0 ]]; then
- counter=$(( $counter - 1 ))
- [[ $counter -eq 0 ]] && flock -u $LOCK_FD
- fi
-
- # write counter and unlock local mutex
- echo $counter > /proc/$BASHPID/fd/$counter_mutex_fd
- eval "exec ${counter_mutex_fd}<&-"
- return 0
-}
-
-# it takes 2 arguments
-# returns:
-# 0 if v1 (1st argument) and v2 (2nd argument) are the same
-# 1 if v1 is less than v2
-# 2 if v1 is greater than v2
-version_cmp() {
- local V1 V2 VN x
- [[ ! $1 =~ ^[0-9]+(\.[0-9]+)*$ ]] && die "Wrong version format!"
- [[ ! $2 =~ ^[0-9]+(\.[0-9]+)*$ ]] && die "Wrong version format!"
-
- V1=( $(echo $1 | tr '.' ' ') )
- V2=( $(echo $2 | tr '.' ' ') )
- VN=${#V1[@]}
- [[ $VN -lt ${#V2[@]} ]] && VN=${#V2[@]}
-
- for ((x = 0; x < $VN; x++)); do
- [[ ${V1[x]} -lt ${V2[x]} ]] && return 1
- [[ ${V1[x]} -gt ${V2[x]} ]] && return 2
- done
-
- return 0
-}
-
-USE_IWCONFIG=0
-
-is_interface() {
- [[ -z "$1" ]] && return 1
- [[ -d "/sys/class/net/${1}" ]]
-}
-
-is_wifi_interface() {
- which iw > /dev/null 2>&1 && iw dev $1 info > /dev/null 2>&1 && return 0
- if which iwconfig > /dev/null 2>&1 && iwconfig $1 > /dev/null 2>&1; then
- USE_IWCONFIG=1
- return 0
- fi
- return 1
-}
-
-is_bridge_interface() {
- [[ -z "$1" ]] && return 1
- [[ -d "/sys/class/net/${1}/bridge" ]]
-}
-
-get_phy_device() {
- local x
- for x in /sys/class/ieee80211/*; do
- [[ ! -e "$x" ]] && continue
- if [[ "${x##*/}" = "$1" ]]; then
- echo $1
- return 0
- elif [[ -e "$x/device/net/$1" ]]; then
- echo ${x##*/}
- return 0
- elif [[ -e "$x/device/net:$1" ]]; then
- echo ${x##*/}
- return 0
- fi
- done
- echo "Failed to get phy interface" >&2
- return 1
-}
-
-get_adapter_info() {
- local PHY
- PHY=$(get_phy_device "$1")
- [[ $? -ne 0 ]] && return 1
- iw phy $PHY info
-}
-
-get_adapter_kernel_module() {
- local MODULE
- MODULE=$(readlink -f "/sys/class/net/$1/device/driver/module")
- echo ${MODULE##*/}
-}
-
-can_be_sta_and_ap() {
- # iwconfig does not provide this information, assume false
- [[ $USE_IWCONFIG -eq 1 ]] && return 1
- get_adapter_info "$1" | grep -E '{.* managed.* AP.*}' > /dev/null 2>&1 && return 0
- get_adapter_info "$1" | grep -E '{.* AP.* managed.*}' > /dev/null 2>&1 && return 0
- return 1
-}
-
-can_be_ap() {
- # iwconfig does not provide this information, assume true
- [[ $USE_IWCONFIG -eq 1 ]] && return 0
- get_adapter_info "$1" | grep -E '\* AP$' > /dev/null 2>&1 && return 0
- return 1
-}
-
-can_transmit_to_channel() {
- local IFACE CHANNEL_NUM CHANNEL_INFO
- IFACE=$1
- CHANNEL_NUM=$2
-
- if [[ $USE_IWCONFIG -eq 0 ]]; then
- if [[ $FREQ_BAND == 2.4 ]]; then
- CHANNEL_INFO=$(get_adapter_info ${IFACE} | grep " 24[0-9][0-9] MHz \[${CHANNEL_NUM}\]")
- else
- CHANNEL_INFO=$(get_adapter_info ${IFACE} | grep " \(49[0-9][0-9]\|5[0-9]\{3\}\) MHz \[${CHANNEL_NUM}\]")
- fi
- [[ -z "${CHANNEL_INFO}" ]] && return 1
- [[ "${CHANNEL_INFO}" == *no\ IR* ]] && return 1
- [[ "${CHANNEL_INFO}" == *disabled* ]] && return 1
- return 0
- else
- CHANNEL_NUM=$(printf '%02d' ${CHANNEL_NUM})
- CHANNEL_INFO=$(iwlist ${IFACE} channel | grep -E "Channel[[:blank:]]${CHANNEL_NUM}[[:blank:]]?:")
- [[ -z "${CHANNEL_INFO}" ]] && return 1
- return 0
- fi
-}
-
-# taken from iw/util.c
-ieee80211_frequency_to_channel() {
- local FREQ=$1
- if [[ $FREQ -eq 2484 ]]; then
- echo 14
- elif [[ $FREQ -lt 2484 ]]; then
- echo $(( ($FREQ - 2407) / 5 ))
- elif [[ $FREQ -ge 4910 && $FREQ -le 4980 ]]; then
- echo $(( ($FREQ - 4000) / 5 ))
- elif [[ $FREQ -le 45000 ]]; then
- echo $(( ($FREQ - 5000) / 5 ))
- elif [[ $FREQ -ge 58320 && $FREQ -le 64800 ]]; then
- echo $(( ($FREQ - 56160) / 2160 ))
- else
- echo 0
- fi
-}
-
-is_5ghz_frequency() {
- [[ $1 =~ ^(49[0-9]{2})|(5[0-9]{3})$ ]]
-}
-
-is_wifi_connected() {
- if [[ $USE_IWCONFIG -eq 0 ]]; then
- iw dev "$1" link 2>&1 | grep -E '^Connected to' > /dev/null 2>&1 && return 0
- else
- iwconfig "$1" 2>&1 | grep -E 'Access Point: [0-9a-fA-F]{2}:' > /dev/null 2>&1 && return 0
- fi
- return 1
-}
-
-is_macaddr() {
- echo "$1" | grep -E "^([0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}$" > /dev/null 2>&1
-}
-
-is_unicast_macaddr() {
- local x
- is_macaddr "$1" || return 1
- x=$(echo "$1" | cut -d: -f1)
- x=$(printf '%d' "0x${x}")
- [[ $(expr $x % 2) -eq 0 ]]
-}
-
-get_macaddr() {
- is_interface "$1" || return
- cat "/sys/class/net/${1}/address"
-}
-
-get_mtu() {
- is_interface "$1" || return
- cat "/sys/class/net/${1}/mtu"
-}
-
-alloc_new_iface() {
- local prefix=$1
- local i=0
-
- mutex_lock
- while :; do
- if ! is_interface $prefix$i && [[ ! -f $COMMON_CONFDIR/ifaces/$prefix$i ]]; then
- mkdir -p $COMMON_CONFDIR/ifaces
- touch $COMMON_CONFDIR/ifaces/$prefix$i
- echo $prefix$i
- mutex_unlock
- return
- fi
- i=$((i + 1))
- done
- mutex_unlock
-}
-
-dealloc_iface() {
- rm -f $COMMON_CONFDIR/ifaces/$1
-}
-
-get_all_macaddrs() {
- cat /sys/class/net/*/address
-}
-
-get_new_macaddr() {
- local OLDMAC NEWMAC LAST_BYTE i
- OLDMAC=$(get_macaddr "$1")
- LAST_BYTE=$(printf %d 0x${OLDMAC##*:})
- mutex_lock
- for i in {1..255}; do
- NEWMAC="${OLDMAC%:*}:$(printf %02x $(( ($LAST_BYTE + $i) % 256 )))"
- (get_all_macaddrs | grep "$NEWMAC" > /dev/null 2>&1) || break
- done
- mutex_unlock
- echo $NEWMAC
-}
-
-# start haveged when needed
-haveged_watchdog() {
- local show_warn=1
- while :; do
- mutex_lock
- if [[ $(cat /proc/sys/kernel/random/entropy_avail) -lt 1000 ]]; then
- if ! which haveged > /dev/null 2>&1; then
- if [[ $show_warn -eq 1 ]]; then
- echo "WARN: Low entropy detected. We recommend you to install \`haveged'"
- show_warn=0
- fi
- elif ! pidof haveged > /dev/null 2>&1; then
- echo "Low entropy detected, starting haveged"
- # boost low-entropy
- haveged -w 1024 -p $COMMON_CONFDIR/haveged.pid
- fi
- fi
- mutex_unlock
- sleep 60 # owen changed 2 to 20, really only expecting 1 connection, so this is probably OK?
- done
-}
-
-NETWORKMANAGER_CONF=/etc/NetworkManager/NetworkManager.conf
-NM_OLDER_VERSION=1
-
-networkmanager_exists() {
- local NM_VER
- which nmcli > /dev/null 2>&1 || return 1
- NM_VER=$(nmcli -v | grep -m1 -oE '[0-9]+(\.[0-9]+)*\.[0-9]+')
- version_cmp $NM_VER 0.9.9
- if [[ $? -eq 1 ]]; then
- NM_OLDER_VERSION=1
- else
- NM_OLDER_VERSION=0
- fi
- return 0
-}
-
-networkmanager_is_running() {
- local NMCLI_OUT
- networkmanager_exists || return 1
- if [[ $NM_OLDER_VERSION -eq 1 ]]; then
- NMCLI_OUT=$(nmcli -t -f RUNNING nm 2>&1 | grep -E '^running$')
- else
- NMCLI_OUT=$(nmcli -t -f RUNNING g 2>&1 | grep -E '^running$')
- fi
- [[ -n "$NMCLI_OUT" ]]
-}
-
-networkmanager_iface_is_unmanaged() {
- is_interface "$1" || return 2
- (nmcli -t -f DEVICE,STATE d 2>&1 | grep -E "^$1:unmanaged$" > /dev/null 2>&1) || return 1
-}
-
-ADDED_UNMANAGED=
-
-networkmanager_add_unmanaged() {
- local MAC UNMANAGED WAS_EMPTY x
- networkmanager_exists || return 1
-
- [[ -d ${NETWORKMANAGER_CONF%/*} ]] || mkdir -p ${NETWORKMANAGER_CONF%/*}
- [[ -f ${NETWORKMANAGER_CONF} ]] || touch ${NETWORKMANAGER_CONF}
-
- if [[ $NM_OLDER_VERSION -eq 1 ]]; then
- if [[ -z "$2" ]]; then
- MAC=$(get_macaddr "$1")
- else
- MAC="$2"
- fi
- [[ -z "$MAC" ]] && return 1
- fi
-
- mutex_lock
- UNMANAGED=$(grep -m1 -Eo '^unmanaged-devices=[[:alnum:]:;,-]*' /etc/NetworkManager/NetworkManager.conf)
-
- WAS_EMPTY=0
- [[ -z "$UNMANAGED" ]] && WAS_EMPTY=1
- UNMANAGED=$(echo "$UNMANAGED" | sed 's/unmanaged-devices=//' | tr ';,' ' ')
-
- # if it exists, do nothing
- for x in $UNMANAGED; do
- if [[ $x == "mac:${MAC}" ]] ||
- [[ $NM_OLDER_VERSION -eq 0 && $x == "interface-name:${1}" ]]; then
- mutex_unlock
- return 2
- fi
- done
-
- if [[ $NM_OLDER_VERSION -eq 1 ]]; then
- UNMANAGED="${UNMANAGED} mac:${MAC}"
- else
- UNMANAGED="${UNMANAGED} interface-name:${1}"
- fi
-
- UNMANAGED=$(echo $UNMANAGED | sed -e 's/^ //')
- UNMANAGED="${UNMANAGED// /;}"
- UNMANAGED="unmanaged-devices=${UNMANAGED}"
-
- if ! grep -E '^\[keyfile\]' ${NETWORKMANAGER_CONF} > /dev/null 2>&1; then
- echo -e "\n\n[keyfile]\n${UNMANAGED}" >> ${NETWORKMANAGER_CONF}
- elif [[ $WAS_EMPTY -eq 1 ]]; then
- sed -e "s/^\(\[keyfile\].*\)$/\1\n${UNMANAGED}/" -i ${NETWORKMANAGER_CONF}
- else
- sed -e "s/^unmanaged-devices=.*/${UNMANAGED}/" -i ${NETWORKMANAGER_CONF}
- fi
-
- ADDED_UNMANAGED="${ADDED_UNMANAGED} ${1} "
- mutex_unlock
-
- local nm_pid=$(pidof NetworkManager)
- [[ -n "$nm_pid" ]] && kill -HUP $nm_pid
-
- return 0
-}
-
-networkmanager_rm_unmanaged() {
- local MAC UNMANAGED
- networkmanager_exists || return 1
- [[ ! -f ${NETWORKMANAGER_CONF} ]] && return 1
-
- if [[ $NM_OLDER_VERSION -eq 1 ]]; then
- if [[ -z "$2" ]]; then
- MAC=$(get_macaddr "$1")
- else
- MAC="$2"
- fi
- [[ -z "$MAC" ]] && return 1
- fi
-
- mutex_lock
- UNMANAGED=$(grep -m1 -Eo '^unmanaged-devices=[[:alnum:]:;,-]*' /etc/NetworkManager/NetworkManager.conf | sed 's/unmanaged-devices=//' | tr ';,' ' ')
-
- if [[ -z "$UNMANAGED" ]]; then
- mutex_unlock
- return 1
- fi
-
- [[ -n "$MAC" ]] && UNMANAGED=$(echo $UNMANAGED | sed -e "s/mac:${MAC}\( \|$\)//g")
- UNMANAGED=$(echo $UNMANAGED | sed -e "s/interface-name:${1}\( \|$\)//g")
- UNMANAGED=$(echo $UNMANAGED | sed -e 's/ $//')
-
- if [[ -z "$UNMANAGED" ]]; then
- sed -e "/^unmanaged-devices=.*/d" -i ${NETWORKMANAGER_CONF}
- else
- UNMANAGED="${UNMANAGED// /;}"
- UNMANAGED="unmanaged-devices=${UNMANAGED}"
- sed -e "s/^unmanaged-devices=.*/${UNMANAGED}/" -i ${NETWORKMANAGER_CONF}
- fi
-
- ADDED_UNMANAGED="${ADDED_UNMANAGED/ ${1} /}"
- mutex_unlock
-
- local nm_pid=$(pidof NetworkManager)
- [[ -n "$nm_pid" ]] && kill -HUP $nm_pid
-
- return 0
-}
-
-networkmanager_fix_unmanaged() {
- [[ -f ${NETWORKMANAGER_CONF} ]] || return
-
- mutex_lock
- sed -e "/^unmanaged-devices=.*/d" -i ${NETWORKMANAGER_CONF}
- mutex_unlock
-
- local nm_pid=$(pidof NetworkManager)
- [[ -n "$nm_pid" ]] && kill -HUP $nm_pid
-}
-
-networkmanager_rm_unmanaged_if_needed() {
- [[ $ADDED_UNMANAGED =~ .*\ ${1}\ .* ]] && networkmanager_rm_unmanaged $1 $2
-}
-
-networkmanager_wait_until_unmanaged() {
- local RES
- networkmanager_is_running || return 1
- while :; do
- networkmanager_iface_is_unmanaged "$1"
- RES=$?
- [[ $RES -eq 0 ]] && break
- [[ $RES -eq 2 ]] && die "Interface '${1}' does not exists.
- It's probably renamed by a udev rule."
- sleep 1
- done
- sleep 2
- return 0
-}
-
-
-CHANNEL=default
-GATEWAY=192.168.12.1
-WPA_VERSION=1+2
-ETC_HOSTS=0
-DHCP_DNS=gateway
-NO_DNS=0
-HIDDEN=0
-ISOLATE_CLIENTS=0
-SHARE_METHOD=nat
-IEEE80211N=0
-IEEE80211AC=0
-HT_CAPAB='[HT40+]'
-VHT_CAPAB=
-DRIVER=nl80211
-NO_VIRT=0
-COUNTRY=
-FREQ_BAND=2.4
-NEW_MACADDR=
-DAEMONIZE=0
-NO_HAVEGED=0
-USE_PSK=0
-
-HOSTAPD_DEBUG_ARGS=
-REDIRECT_TO_LOCALHOST=0
-
-CONFIG_OPTS=(CHANNEL GATEWAY WPA_VERSION ETC_HOSTS DHCP_DNS NO_DNS HIDDEN ISOLATE_CLIENTS SHARE_METHOD
- IEEE80211N IEEE80211AC HT_CAPAB VHT_CAPAB DRIVER NO_VIRT COUNTRY FREQ_BAND
- NEW_MACADDR DAEMONIZE NO_HAVEGED WIFI_IFACE INTERNET_IFACE
- SSID PASSPHRASE USE_PSK)
-
-FIX_UNMANAGED=0
-LIST_RUNNING=0
-STOP_ID=
-LIST_CLIENTS_ID=
-
-STORE_CONFIG=
-LOAD_CONFIG=
-
-CONFDIR=
-WIFI_IFACE=
-VWIFI_IFACE=
-INTERNET_IFACE=
-BRIDGE_IFACE=
-OLD_MACADDR=
-IP_ADDRS=
-ROUTE_ADDRS=
-
-HAVEGED_WATCHDOG_PID=
-
-_cleanup() {
- local PID x
-
- trap "" SIGINT SIGUSR1 SIGUSR2 EXIT
- mutex_lock
- disown -a
-
- # kill haveged_watchdog
- [[ -n "$HAVEGED_WATCHDOG_PID" ]] && kill $HAVEGED_WATCHDOG_PID
-
- # kill processes
- for x in $CONFDIR/*.pid; do
- # even if the $CONFDIR is empty, the for loop will assign
- # a value in $x. so we need to check if the value is a file
- [[ -f $x ]] && kill -9 $(cat $x)
- done
-
- rm -rf $CONFDIR
-
- local found=0
- for x in $(list_running_conf); do
- if [[ -f $x/nat_internet_iface && $(cat $x/nat_internet_iface) == $INTERNET_IFACE ]]; then
- found=1
- break
- fi
- done
-
- if [[ $found -eq 0 ]]; then
- cp -f $COMMON_CONFDIR/${INTERNET_IFACE}_forwarding \
- /proc/sys/net/ipv4/conf/$INTERNET_IFACE/forwarding
- rm -f $COMMON_CONFDIR/${INTERNET_IFACE}_forwarding
- fi
-
- # if we are the last create_ap instance then set back the common values
- if ! has_running_instance; then
- # kill common processes
- for x in $COMMON_CONFDIR/*.pid; do
- [[ -f $x ]] && kill -9 $(cat $x)
- done
-
- # set old ip_forward
- if [[ -f $COMMON_CONFDIR/ip_forward ]]; then
- cp -f $COMMON_CONFDIR/ip_forward /proc/sys/net/ipv4
- rm -f $COMMON_CONFDIR/ip_forward
- fi
-
- # set old bridge-nf-call-iptables
- if [[ -f $COMMON_CONFDIR/bridge-nf-call-iptables ]]; then
- if [[ -e /proc/sys/net/bridge/bridge-nf-call-iptables ]]; then
- cp -f $COMMON_CONFDIR/bridge-nf-call-iptables /proc/sys/net/bridge
- fi
- rm -f $COMMON_CONFDIR/bridge-nf-call-iptables
- fi
-
- rm -rf $COMMON_CONFDIR
- fi
-
- if [[ "$SHARE_METHOD" != "none" ]]; then
- if [[ "$SHARE_METHOD" == "nat" ]]; then
- iptables -w -t nat -D POSTROUTING -o ${INTERNET_IFACE} -s ${GATEWAY%.*}.0/24 -j MASQUERADE
- iptables -w -D FORWARD -i ${WIFI_IFACE} -s ${GATEWAY%.*}.0/24 -j ACCEPT
- iptables -w -D FORWARD -i ${INTERNET_IFACE} -d ${GATEWAY%.*}.0/24 -j ACCEPT
- elif [[ "$SHARE_METHOD" == "bridge" ]]; then
- if ! is_bridge_interface $INTERNET_IFACE; then
- ip link set dev $BRIDGE_IFACE down
- ip link set dev $INTERNET_IFACE down
- ip link set dev $INTERNET_IFACE promisc off
- ip link set dev $INTERNET_IFACE nomaster
- ip link delete $BRIDGE_IFACE type bridge
- ip addr flush $INTERNET_IFACE
- ip link set dev $INTERNET_IFACE up
- dealloc_iface $BRIDGE_IFACE
-
- for x in "${IP_ADDRS[@]}"; do
- x="${x/inet/}"
- x="${x/secondary/}"
- x="${x/dynamic/}"
- x=$(echo $x | sed 's/\([0-9]\)sec/\1/g')
- x="${x/${INTERNET_IFACE}/}"
- ip addr add $x dev $INTERNET_IFACE
- done
-
- ip route flush dev $INTERNET_IFACE
-
- for x in "${ROUTE_ADDRS[@]}"; do
- [[ -z "$x" ]] && continue
- [[ "$x" == default* ]] && continue
- ip route add $x dev $INTERNET_IFACE
- done
-
- for x in "${ROUTE_ADDRS[@]}"; do
- [[ -z "$x" ]] && continue
- [[ "$x" != default* ]] && continue
- ip route add $x dev $INTERNET_IFACE
- done
-
- networkmanager_rm_unmanaged_if_needed $INTERNET_IFACE
- fi
- fi
- fi
-
- if [[ "$SHARE_METHOD" != "bridge" ]]; then
- if [[ $NO_DNS -eq 0 ]]; then
- iptables -w -D INPUT -p tcp -m tcp --dport 5353 -j ACCEPT
- iptables -w -D INPUT -p udp -m udp --dport 5353 -j ACCEPT
- iptables -w -t nat -D PREROUTING -s ${GATEWAY%.*}.0/24 -d ${GATEWAY} \
- -p tcp -m tcp --dport 53 -j REDIRECT --to-ports 5353
- iptables -w -t nat -D PREROUTING -s ${GATEWAY%.*}.0/24 -d ${GATEWAY} \
- -p udp -m udp --dport 53 -j REDIRECT --to-ports 5353
- fi
- iptables -w -D INPUT -p udp -m udp --dport 67 -j ACCEPT
- fi
-
- if [[ $NO_VIRT -eq 0 ]]; then
- if [[ -n "$VWIFI_IFACE" ]]; then
- ip link set down dev ${VWIFI_IFACE}
- ip addr flush ${VWIFI_IFACE}
- networkmanager_rm_unmanaged_if_needed ${VWIFI_IFACE} ${OLD_MACADDR}
- iw dev ${VWIFI_IFACE} del
- dealloc_iface $VWIFI_IFACE
- fi
- else
- ip link set down dev ${WIFI_IFACE}
- ip addr flush ${WIFI_IFACE}
- if [[ -n "$NEW_MACADDR" ]]; then
- ip link set dev ${WIFI_IFACE} address ${OLD_MACADDR}
- fi
- networkmanager_rm_unmanaged_if_needed ${WIFI_IFACE} ${OLD_MACADDR}
- fi
-
- mutex_unlock
- cleanup_lock
-}
-
-cleanup() {
- echo
- echo -n "Doing cleanup.. "
- _cleanup > /dev/null 2>&1
- echo "done"
-}
-
-die() {
- [[ -n "$1" ]] && echo -e "\nERROR: $1\n" >&2
- # send die signal to the main process
- [[ $BASHPID -ne $$ ]] && kill -USR2 $$
- # we don't need to call cleanup because it's traped on EXIT
- exit 1
-}
-
-clean_exit() {
- # send clean_exit signal to the main process
- [[ $BASHPID -ne $$ ]] && kill -USR1 $$
- # we don't need to call cleanup because it's traped on EXIT
- exit 0
-}
-
-list_running_conf() {
- local x
- mutex_lock
- for x in /tmp/create_ap.*; do
- if [[ -f $x/pid && -f $x/wifi_iface && -d /proc/$(cat $x/pid) ]]; then
- echo $x
- fi
- done
- mutex_unlock
-}
-
-list_running() {
- local IFACE wifi_iface x
- mutex_lock
- for x in $(list_running_conf); do
- IFACE=${x#*.}
- IFACE=${IFACE%%.*}
- wifi_iface=$(cat $x/wifi_iface)
-
- if [[ $IFACE == $wifi_iface ]]; then
- echo $(cat $x/pid) $IFACE
- else
- echo $(cat $x/pid) $IFACE '('$(cat $x/wifi_iface)')'
- fi
- done
- mutex_unlock
-}
-
-get_wifi_iface_from_pid() {
- list_running | awk '{print $1 " " $NF}' | tr -d '\(\)' | grep -E "^${1} " | cut -d' ' -f2
-}
-
-get_pid_from_wifi_iface() {
- list_running | awk '{print $1 " " $NF}' | tr -d '\(\)' | grep -E " ${1}$" | cut -d' ' -f1
-}
-
-get_confdir_from_pid() {
- local IFACE x
- mutex_lock
- for x in $(list_running_conf); do
- if [[ $(cat $x/pid) == "$1" ]]; then
- echo $x
- break
- fi
- done
- mutex_unlock
-}
-
-print_client() {
- local line ipaddr hostname
- local mac="$1"
-
- if [[ -f $CONFDIR/dnsmasq.leases ]]; then
- line=$(grep " $mac " $CONFDIR/dnsmasq.leases | tail -n 1)
- ipaddr=$(echo $line | cut -d' ' -f3)
- hostname=$(echo $line | cut -d' ' -f4)
- fi
-
- [[ -z "$ipaddr" ]] && ipaddr="*"
- [[ -z "$hostname" ]] && hostname="*"
-
- printf "%-20s %-18s %s\n" "$mac" "$ipaddr" "$hostname"
-}
-
-list_clients() {
- local wifi_iface pid
-
- # If PID is given, get the associated wifi iface
- if [[ "$1" =~ ^[1-9][0-9]*$ ]]; then
- pid="$1"
- wifi_iface=$(get_wifi_iface_from_pid "$pid")
- [[ -z "$wifi_iface" ]] && die "'$pid' is not the pid of a running $PROGNAME instance."
- fi
-
- [[ -z "$wifi_iface" ]] && wifi_iface="$1"
- is_wifi_interface "$wifi_iface" || die "'$wifi_iface' is not a WiFi interface."
-
- [[ -z "$pid" ]] && pid=$(get_pid_from_wifi_iface "$wifi_iface")
- [[ -z "$pid" ]] && die "'$wifi_iface' is not used from $PROGNAME instance.\n\
- Maybe you need to pass the virtual interface instead.\n\
- Use --list-running to find it out."
- [[ -z "$CONFDIR" ]] && CONFDIR=$(get_confdir_from_pid "$pid")
-
- if [[ $USE_IWCONFIG -eq 0 ]]; then
- local awk_cmd='($1 ~ /Station$/) {print $2}'
- local client_list=$(iw dev "$wifi_iface" station dump | awk "$awk_cmd")
-
- if [[ -z "$client_list" ]]; then
- echo "No clients connected"
- return
- fi
-
- printf "%-20s %-18s %s\n" "MAC" "IP" "Hostname"
-
- local mac
- for mac in $client_list; do
- print_client $mac
- done
- else
- die "This option is not supported for the current driver."
- fi
-}
-
-has_running_instance() {
- local PID x
-
- mutex_lock
- for x in /tmp/create_ap.*; do
- if [[ -f $x/pid ]]; then
- PID=$(cat $x/pid)
- if [[ -d /proc/$PID ]]; then
- mutex_unlock
- return 0
- fi
- fi
- done
- mutex_lock
-
- return 1
-}
-
-is_running_pid() {
- list_running | grep -E "^${1} " > /dev/null 2>&1
-}
-
-send_stop() {
- local x
-
- mutex_lock
- # send stop signal to specific pid
- if is_running_pid $1; then
- kill -USR1 $1
- mutex_unlock
- return
- fi
-
- # send stop signal to specific interface
- for x in $(list_running | grep -E " \(?${1}( |\)?\$)" | cut -f1 -d' '); do
- kill -USR1 $x
- done
- mutex_unlock
-}
-
-# Storing configs
-write_config() {
- local i=1
-
- if ! eval 'echo -n > "$STORE_CONFIG"' > /dev/null 2>&1; then
- echo "ERROR: Unable to create config file $STORE_CONFIG" >&2
- exit 1
- fi
-
- WIFI_IFACE=$1
- if [[ "$SHARE_METHOD" == "none" ]]; then
- SSID="$2"
- PASSPHRASE="$3"
- else
- INTERNET_IFACE="$2"
- SSID="$3"
- PASSPHRASE="$4"
- fi
-
- for config_opt in "${CONFIG_OPTS[@]}"; do
- eval echo $config_opt=\$$config_opt
- done >> "$STORE_CONFIG"
-
- echo -e "Config options written to '$STORE_CONFIG'"
- exit 0
-}
-
-is_config_opt() {
- local elem opt="$1"
-
- for elem in "${CONFIG_OPTS[@]}"; do
- if [[ "$elem" == "$opt" ]]; then
- return 0
- fi
- done
- return 1
-}
-
-# Load options from config file
-read_config() {
- local opt_name opt_val line
-
- while read line; do
- # Read switches and their values
- opt_name="${line%%=*}"
- opt_val="${line#*=}"
- if is_config_opt "$opt_name" ; then
- eval $opt_name="\$opt_val"
- else
- echo "WARN: Unrecognized configuration entry $opt_name" >&2
- fi
- done < "$LOAD_CONFIG"
-}
-
-
-ARGS=( "$@" )
-
-# Preprocessing for --config before option-parsing starts
-for ((i=0; i<$#; i++)); do
- if [[ "${ARGS[i]}" = "--config" ]]; then
- if [[ -f "${ARGS[i+1]}" ]]; then
- LOAD_CONFIG="${ARGS[i+1]}"
- read_config
- else
- echo "ERROR: No config file found at given location" >&2
- exit 1
- fi
- break
- fi
-done
-
-GETOPT_ARGS=$(getopt -o hc:w:g:dnm: -l "help","hidden","hostapd-debug:","redirect-to-localhost","isolate-clients","ieee80211n","ieee80211ac","ht_capab:","vht_capab:","driver:","no-virt","fix-unmanaged","country:","freq-band:","mac:","dhcp-dns:","daemon","stop:","list","list-running","list-clients:","version","psk","no-haveged","no-dns","mkconfig:","config:" -n "$PROGNAME" -- "$@")
-[[ $? -ne 0 ]] && exit 1
-eval set -- "$GETOPT_ARGS"
-
-while :; do
- case "$1" in
- -h|--help)
- usage
- exit 0
- ;;
- --version)
- echo $VERSION
- exit 0
- ;;
- --hidden)
- shift
- HIDDEN=1
- ;;
- --isolate-clients)
- shift
- ISOLATE_CLIENTS=1
- ;;
- -c)
- shift
- CHANNEL="$1"
- shift
- ;;
- -w)
- shift
- WPA_VERSION="$1"
- [[ "$WPA_VERSION" == "2+1" ]] && WPA_VERSION=1+2
- shift
- ;;
- -g)
- shift
- GATEWAY="$1"
- shift
- ;;
- -d)
- shift
- ETC_HOSTS=1
- ;;
- -n)
- shift
- SHARE_METHOD=none
- ;;
- -m)
- shift
- SHARE_METHOD="$1"
- shift
- ;;
- --ieee80211n)
- shift
- IEEE80211N=1
- ;;
- --ieee80211ac)
- shift
- IEEE80211AC=1
- ;;
- --ht_capab)
- shift
- HT_CAPAB="$1"
- shift
- ;;
- --vht_capab)
- shift
- VHT_CAPAB="$1"
- shift
- ;;
- --driver)
- shift
- DRIVER="$1"
- shift
- ;;
- --no-virt)
- shift
- NO_VIRT=1
- ;;
- --fix-unmanaged)
- shift
- FIX_UNMANAGED=1
- ;;
- --country)
- shift
- COUNTRY="$1"
- shift
- ;;
- --freq-band)
- shift
- FREQ_BAND="$1"
- shift
- ;;
- --mac)
- shift
- NEW_MACADDR="$1"
- shift
- ;;
- --dhcp-dns)
- shift
- DHCP_DNS="$1"
- shift
- ;;
- --daemon)
- shift
- DAEMONIZE=1
- ;;
- --stop)
- shift
- STOP_ID="$1"
- shift
- ;;
- --list)
- shift
- LIST_RUNNING=1
- echo -e "WARN: --list is deprecated, use --list-running instead.\n" >&2
- ;;
- --list-running)
- shift
- LIST_RUNNING=1
- ;;
- --list-clients)
- shift
- LIST_CLIENTS_ID="$1"
- shift
- ;;
- --no-haveged)
- shift
- NO_HAVEGED=1
- ;;
- --psk)
- shift
- USE_PSK=1
- ;;
- --no-dns)
- shift
- NO_DNS=1
- ;;
- --redirect-to-localhost)
- shift
- REDIRECT_TO_LOCALHOST=1
- ;;
- --hostapd-debug)
- shift
- if [ "x$1" = "x1" ]; then
- HOSTAPD_DEBUG_ARGS="-d"
- elif [ "x$1" = "x2" ]; then
- HOSTAPD_DEBUG_ARGS="-dd"
- else
- printf "Error: argument for --hostapd-debug expected 1 or 2, got %s\n" "$1"
- exit 1
- fi
- shift
- ;;
- --mkconfig)
- shift
- STORE_CONFIG="$1"
- shift
- ;;
- --config)
- shift
- shift
- ;;
- --)
- shift
- break
- ;;
- esac
-done
-
-# Load positional args from config file, if needed
-if [[ -n "$LOAD_CONFIG" && $# -eq 0 ]]; then
- i=0
- # set arguments in order
- for x in WIFI_IFACE INTERNET_IFACE SSID PASSPHRASE; do
- if eval "[[ -n \"\$${x}\" ]]"; then
- eval "set -- \"\${@:1:$i}\" \"\$${x}\""
- ((i++))
- fi
- # we unset the variable to avoid any problems later
- eval "unset $x"
- done
-fi
-
-# Check if required number of positional args are present
-if [[ $# -lt 1 && $FIX_UNMANAGED -eq 0 && -z "$STOP_ID" &&
- $LIST_RUNNING -eq 0 && -z "$LIST_CLIENTS_ID" ]]; then
- usage >&2
- exit 1
-fi
-
-trap "cleanup_lock" EXIT
-
-if ! init_lock; then
- echo "ERROR: Failed to initialize lock" >&2
- exit 1
-fi
-
-# if the user press ctrl+c or we get USR1 signal
-# then run clean_exit()
-trap "clean_exit" SIGINT SIGUSR1
-# if we get USR2 signal then run die().
-trap "die" SIGUSR2
-
-[[ -n "$STORE_CONFIG" ]] && write_config "$@"
-
-if [[ $LIST_RUNNING -eq 1 ]]; then
- echo -e "List of running $PROGNAME instances:\n"
- list_running
- exit 0
-fi
-
-if [[ -n "$LIST_CLIENTS_ID" ]]; then
- list_clients "$LIST_CLIENTS_ID"
- exit 0
-fi
-
-if [[ $(id -u) -ne 0 ]]; then
- echo "You must run it as root." >&2
- exit 1
-fi
-
-if [[ -n "$STOP_ID" ]]; then
- echo "Trying to kill $PROGNAME instance associated with $STOP_ID..."
- send_stop "$STOP_ID"
- exit 0
-fi
-
-if [[ $FIX_UNMANAGED -eq 1 ]]; then
- echo "Trying to fix unmanaged status in NetworkManager..."
- networkmanager_fix_unmanaged
- exit 0
-fi
-
-if [[ $DAEMONIZE -eq 1 && $RUNNING_AS_DAEMON -eq 0 ]]; then
- echo "Running as Daemon..."
- # run a detached create_ap
- RUNNING_AS_DAEMON=1 setsid "$0" "${ARGS[@]}" &
- exit 0
-fi
-
-if [[ $FREQ_BAND != 2.4 && $FREQ_BAND != 5 ]]; then
- echo "ERROR: Invalid frequency band" >&2
- exit 1
-fi
-
-if [[ $CHANNEL == default ]]; then
- if [[ $FREQ_BAND == 2.4 ]]; then
- CHANNEL=1
- else
- CHANNEL=36
- fi
-fi
-
-if [[ $FREQ_BAND != 5 && $CHANNEL -gt 14 ]]; then
- echo "Channel number is greater than 14, assuming 5GHz frequency band"
- FREQ_BAND=5
-fi
-
-WIFI_IFACE=$1
-
-if ! is_wifi_interface ${WIFI_IFACE}; then
- echo "ERROR: '${WIFI_IFACE}' is not a WiFi interface" >&2
- exit 1
-fi
-
-if ! can_be_ap ${WIFI_IFACE}; then
- echo "ERROR: Your adapter does not support AP (master) mode" >&2
- exit 1
-fi
-
-if ! can_be_sta_and_ap ${WIFI_IFACE}; then
- if is_wifi_connected ${WIFI_IFACE}; then
- echo "ERROR: Your adapter can not be a station (i.e. be connected) and an AP at the same time" >&2
- exit 1
- elif [[ $NO_VIRT -eq 0 ]]; then
- echo "WARN: Your adapter does not fully support AP virtual interface, enabling --no-virt" >&2
- NO_VIRT=1
- fi
-fi
-
-HOSTAPD=$(which hostapd)
-
-if [[ ! -x "$HOSTAPD" ]]; then
- echo "ERROR: hostapd not found." >&2
- exit 1
-fi
-
-if [[ $(get_adapter_kernel_module ${WIFI_IFACE}) =~ ^(8192[cd][ue]|8723a[sue])$ ]]; then
- if ! strings "$HOSTAPD" | grep -m1 rtl871xdrv > /dev/null 2>&1; then
- echo "ERROR: You need to patch your hostapd with rtl871xdrv patches." >&2
- exit 1
- fi
-
- if [[ $DRIVER != "rtl871xdrv" ]]; then
- echo "WARN: Your adapter needs rtl871xdrv, enabling --driver=rtl871xdrv" >&2
- DRIVER=rtl871xdrv
- fi
-fi
-
-if [[ "$SHARE_METHOD" != "nat" && "$SHARE_METHOD" != "bridge" && "$SHARE_METHOD" != "none" ]]; then
- echo "ERROR: Wrong Internet sharing method" >&2
- echo
- usage >&2
- exit 1
-fi
-
-if [[ -n "$NEW_MACADDR" ]]; then
- if ! is_macaddr "$NEW_MACADDR"; then
- echo "ERROR: '${NEW_MACADDR}' is not a valid MAC address" >&2
- exit 1
- fi
-
- if ! is_unicast_macaddr "$NEW_MACADDR"; then
- echo "ERROR: The first byte of MAC address (${NEW_MACADDR}) must be even" >&2
- exit 1
- fi
-
- if [[ $(get_all_macaddrs | grep -c ${NEW_MACADDR}) -ne 0 ]]; then
- echo "WARN: MAC address '${NEW_MACADDR}' already exists. Because of this, you may encounter some problems" >&2
- fi
-fi
-
-if [[ "$SHARE_METHOD" != "none" ]]; then
- MIN_REQUIRED_ARGS=2
-else
- MIN_REQUIRED_ARGS=1
-fi
-
-if [[ $# -gt $MIN_REQUIRED_ARGS ]]; then
- if [[ "$SHARE_METHOD" != "none" ]]; then
- if [[ $# -ne 3 && $# -ne 4 ]]; then
- usage >&2
- exit 1
- fi
- INTERNET_IFACE="$2"
- SSID="$3"
- PASSPHRASE="$4"
- else
- if [[ $# -ne 2 && $# -ne 3 ]]; then
- usage >&2
- exit 1
- fi
- SSID="$2"
- PASSPHRASE="$3"
- fi
-else
- if [[ "$SHARE_METHOD" != "none" ]]; then
- if [[ $# -ne 2 ]]; then
- usage >&2
- exit 1
- fi
- INTERNET_IFACE="$2"
- fi
- if tty -s; then
- while :; do
- read -p "SSID: " SSID
- if [[ ${#SSID} -lt 1 || ${#SSID} -gt 32 ]]; then
- echo "ERROR: Invalid SSID length ${#SSID} (expected 1..32)" >&2
- continue
- fi
- break
- done
- while :; do
- if [[ $USE_PSK -eq 0 ]]; then
- read -p "Passphrase: " -s PASSPHRASE
- echo
- if [[ ${#PASSPHRASE} -gt 0 && ${#PASSPHRASE} -lt 8 ]] || [[ ${#PASSPHRASE} -gt 63 ]]; then
- echo "ERROR: Invalid passphrase length ${#PASSPHRASE} (expected 8..63)" >&2
- continue
- fi
- read -p "Retype passphrase: " -s PASSPHRASE2
- echo
- if [[ "$PASSPHRASE" != "$PASSPHRASE2" ]]; then
- echo "Passphrases do not match."
- else
- break
- fi
- else
- read -p "PSK: " PASSPHRASE
- echo
- if [[ ${#PASSPHRASE} -gt 0 && ${#PASSPHRASE} -ne 64 ]]; then
- echo "ERROR: Invalid pre-shared-key length ${#PASSPHRASE} (expected 64)" >&2
- continue
- fi
- fi
- done
- else
- read SSID
- read PASSPHRASE
- fi
-fi
-
-if [[ "$SHARE_METHOD" != "none" ]] && ! is_interface $INTERNET_IFACE; then
- echo "ERROR: '${INTERNET_IFACE}' is not an interface" >&2
- exit 1
-fi
-
-if [[ ${#SSID} -lt 1 || ${#SSID} -gt 32 ]]; then
- echo "ERROR: Invalid SSID length ${#SSID} (expected 1..32)" >&2
- exit 1
-fi
-
-if [[ $USE_PSK -eq 0 ]]; then
- if [[ ${#PASSPHRASE} -gt 0 && ${#PASSPHRASE} -lt 8 ]] || [[ ${#PASSPHRASE} -gt 63 ]]; then
- echo "ERROR: Invalid passphrase length ${#PASSPHRASE} (expected 8..63)" >&2
- exit 1
- fi
-elif [[ ${#PASSPHRASE} -gt 0 && ${#PASSPHRASE} -ne 64 ]]; then
- echo "ERROR: Invalid pre-shared-key length ${#PASSPHRASE} (expected 64)" >&2
- exit 1
-fi
-
-if [[ $(get_adapter_kernel_module ${WIFI_IFACE}) =~ ^rtl[0-9].*$ ]]; then
- if [[ -n "$PASSPHRASE" ]]; then
- echo "WARN: Realtek drivers usually have problems with WPA1, enabling -w 2" >&2
- WPA_VERSION=2
- fi
- echo "WARN: If AP doesn't work, please read: howto/realtek.md" >&2
-fi
-
-if [[ $NO_VIRT -eq 1 && "$WIFI_IFACE" == "$INTERNET_IFACE" ]]; then
- echo -n "ERROR: You can not share your connection from the same" >&2
- echo " interface if you are using --no-virt option." >&2
- exit 1
-fi
-
-mutex_lock
-trap "cleanup" EXIT
-CONFDIR=$(mktemp -d /tmp/create_ap.${WIFI_IFACE}.conf.XXXXXXXX)
-echo "Config dir: $CONFDIR"
-echo "PID: $$"
-echo $$ > $CONFDIR/pid
-
-# to make --list-running work from any user, we must give read
-# permissions to $CONFDIR and $CONFDIR/pid
-chmod 755 $CONFDIR
-chmod 444 $CONFDIR/pid
-
-COMMON_CONFDIR=/tmp/create_ap.common.conf
-mkdir -p $COMMON_CONFDIR
-
-if [[ "$SHARE_METHOD" == "nat" ]]; then
- echo $INTERNET_IFACE > $CONFDIR/nat_internet_iface
- cp -n /proc/sys/net/ipv4/conf/$INTERNET_IFACE/forwarding \
- $COMMON_CONFDIR/${INTERNET_IFACE}_forwarding
-fi
-cp -n /proc/sys/net/ipv4/ip_forward $COMMON_CONFDIR
-if [[ -e /proc/sys/net/bridge/bridge-nf-call-iptables ]]; then
- cp -n /proc/sys/net/bridge/bridge-nf-call-iptables $COMMON_CONFDIR
-fi
-mutex_unlock
-
-if [[ "$SHARE_METHOD" == "bridge" ]]; then
- if is_bridge_interface $INTERNET_IFACE; then
- BRIDGE_IFACE=$INTERNET_IFACE
- else
- BRIDGE_IFACE=$(alloc_new_iface br)
- fi
-fi
-
-if [[ $USE_IWCONFIG -eq 0 ]]; then
- iw dev ${WIFI_IFACE} set power_save off
-fi
-
-if [[ $NO_VIRT -eq 0 ]]; then
- VWIFI_IFACE=$(alloc_new_iface ap)
-
- # in NetworkManager 0.9.9 and above we can set the interface as unmanaged without
- # the need of MAC address, so we set it before we create the virtual interface.
- if networkmanager_is_running && [[ $NM_OLDER_VERSION -eq 0 ]]; then
- echo -n "Network Manager found, set ${VWIFI_IFACE} as unmanaged device... "
- networkmanager_add_unmanaged ${VWIFI_IFACE}
- # do not call networkmanager_wait_until_unmanaged because interface does not
- # exist yet
- echo "DONE"
- fi
-
- if is_wifi_connected ${WIFI_IFACE}; then
- WIFI_IFACE_FREQ=$(iw dev ${WIFI_IFACE} link | grep -i freq | awk '{print $2}')
- WIFI_IFACE_CHANNEL=$(ieee80211_frequency_to_channel ${WIFI_IFACE_FREQ})
- echo -n "${WIFI_IFACE} is already associated with channel ${WIFI_IFACE_CHANNEL} (${WIFI_IFACE_FREQ} MHz)"
- if is_5ghz_frequency $WIFI_IFACE_FREQ; then
- FREQ_BAND=5
- else
- FREQ_BAND=2.4
- fi
- if [[ $WIFI_IFACE_CHANNEL -ne $CHANNEL ]]; then
- echo ", fallback to channel ${WIFI_IFACE_CHANNEL}"
- CHANNEL=$WIFI_IFACE_CHANNEL
- else
- echo
- fi
- fi
-
- VIRTDIEMSG="Maybe your WiFi adapter does not fully support virtual interfaces.
- Try again with --no-virt."
- echo -n "Creating a virtual WiFi interface... "
-
- if iw dev ${WIFI_IFACE} interface add ${VWIFI_IFACE} type __ap; then
- # now we can call networkmanager_wait_until_unmanaged
- networkmanager_is_running && [[ $NM_OLDER_VERSION -eq 0 ]] && networkmanager_wait_until_unmanaged ${VWIFI_IFACE}
- echo "${VWIFI_IFACE} created."
- else
- VWIFI_IFACE=
- die "$VIRTDIEMSG"
- fi
- OLD_MACADDR=$(get_macaddr ${VWIFI_IFACE})
- if [[ -z "$NEW_MACADDR" && $(get_all_macaddrs | grep -c ${OLD_MACADDR}) -ne 1 ]]; then
- NEW_MACADDR=$(get_new_macaddr ${VWIFI_IFACE})
- fi
- WIFI_IFACE=${VWIFI_IFACE}
-else
- OLD_MACADDR=$(get_macaddr ${WIFI_IFACE})
-fi
-
-mutex_lock
-echo $WIFI_IFACE > $CONFDIR/wifi_iface
-chmod 444 $CONFDIR/wifi_iface
-mutex_unlock
-
-if [[ -n "$COUNTRY" && $USE_IWCONFIG -eq 0 ]]; then
- iw reg set "$COUNTRY"
-fi
-
-can_transmit_to_channel ${WIFI_IFACE} ${CHANNEL} || die "Your adapter can not transmit to channel ${CHANNEL}, frequency band ${FREQ_BAND}GHz."
-
-if networkmanager_exists && ! networkmanager_iface_is_unmanaged ${WIFI_IFACE}; then
- echo -n "Network Manager found, set ${WIFI_IFACE} as unmanaged device... "
- networkmanager_add_unmanaged ${WIFI_IFACE}
-
- if networkmanager_is_running; then
- networkmanager_wait_until_unmanaged ${WIFI_IFACE}
- fi
-
- echo "DONE"
-fi
-
-[[ $HIDDEN -eq 1 ]] && echo "Access Point's SSID is hidden!"
-
-[[ $ISOLATE_CLIENTS -eq 1 ]] && echo "Access Point's clients will be isolated!"
-
-# hostapd config
-cat << EOF > $CONFDIR/hostapd.conf
-beacon_int=100
-ssid=${SSID}
-interface=${WIFI_IFACE}
-driver=${DRIVER}
-channel=${CHANNEL}
-ctrl_interface=$CONFDIR/hostapd_ctrl
-ctrl_interface_group=0
-ignore_broadcast_ssid=$HIDDEN
-ap_isolate=$ISOLATE_CLIENTS
-EOF
-
-if [[ -n "$COUNTRY" ]]; then
- cat << EOF >> $CONFDIR/hostapd.conf
-country_code=${COUNTRY}
-ieee80211d=1
-EOF
-fi
-
-if [[ $FREQ_BAND == 2.4 ]]; then
- echo "hw_mode=g" >> $CONFDIR/hostapd.conf
-else
- echo "hw_mode=a" >> $CONFDIR/hostapd.conf
-fi
-
-if [[ $IEEE80211N -eq 1 ]]; then
- cat << EOF >> $CONFDIR/hostapd.conf
-ieee80211n=1
-ht_capab=${HT_CAPAB}
-EOF
-fi
-
-if [[ $IEEE80211AC -eq 1 ]]; then
- echo "ieee80211ac=1" >> $CONFDIR/hostapd.conf
-fi
-
-if [[ -n "$VHT_CAPAB" ]]; then
- echo "vht_capab=${VHT_CAPAB}" >> $CONFDIR/hostapd.conf
-fi
-
-if [[ $IEEE80211N -eq 1 ]] || [[ $IEEE80211AC -eq 1 ]]; then
- echo "wmm_enabled=1" >> $CONFDIR/hostapd.conf
-fi
-
-if [[ -n "$PASSPHRASE" ]]; then
- [[ "$WPA_VERSION" == "1+2" ]] && WPA_VERSION=3
- if [[ $USE_PSK -eq 0 ]]; then
- WPA_KEY_TYPE=passphrase
- else
- WPA_KEY_TYPE=psk
- fi
- cat << EOF >> $CONFDIR/hostapd.conf
-wpa=${WPA_VERSION}
-wpa_${WPA_KEY_TYPE}=${PASSPHRASE}
-wpa_key_mgmt=WPA-PSK
-wpa_pairwise=TKIP CCMP
-rsn_pairwise=CCMP
-EOF
-fi
-
-if [[ "$SHARE_METHOD" == "bridge" ]]; then
- echo "bridge=${BRIDGE_IFACE}" >> $CONFDIR/hostapd.conf
-else
- # dnsmasq config (dhcp + dns)
- DNSMASQ_VER=$(dnsmasq -v | grep -m1 -oE '[0-9]+(\.[0-9]+)*\.[0-9]+')
- version_cmp $DNSMASQ_VER 2.63
- if [[ $? -eq 1 ]]; then
- DNSMASQ_BIND=bind-interfaces
- else
- DNSMASQ_BIND=bind-dynamic
- fi
- if [[ "$DHCP_DNS" == "gateway" ]]; then
- DHCP_DNS="$GATEWAY"
- fi
- cat << EOF > $CONFDIR/dnsmasq.conf
-listen-address=${GATEWAY}
-${DNSMASQ_BIND}
-dhcp-range=${GATEWAY%.*}.1,${GATEWAY%.*}.254,255.255.255.0,24h
-dhcp-option-force=option:router,${GATEWAY}
-dhcp-option-force=option:dns-server,${DHCP_DNS}
-EOF
- MTU=$(get_mtu $INTERNET_IFACE)
- [[ -n "$MTU" ]] && echo "dhcp-option-force=option:mtu,${MTU}" >> $CONFDIR/dnsmasq.conf
- [[ $ETC_HOSTS -eq 0 ]] && echo no-hosts >> $CONFDIR/dnsmasq.conf
- if [[ "$SHARE_METHOD" == "none" && "$REDIRECT_TO_LOCALHOST" == "1" ]]; then
- cat << EOF >> $CONFDIR/dnsmasq.conf
-address=/#/$GATEWAY
-EOF
- fi
-fi
-
-# initialize WiFi interface
-if [[ $NO_VIRT -eq 0 && -n "$NEW_MACADDR" ]]; then
- ip link set dev ${WIFI_IFACE} address ${NEW_MACADDR} || die "$VIRTDIEMSG"
-fi
-
-ip link set down dev ${WIFI_IFACE} || die "$VIRTDIEMSG"
-ip addr flush ${WIFI_IFACE} || die "$VIRTDIEMSG"
-
-if [[ $NO_VIRT -eq 1 && -n "$NEW_MACADDR" ]]; then
- ip link set dev ${WIFI_IFACE} address ${NEW_MACADDR} || die
-fi
-
-if [[ "$SHARE_METHOD" != "bridge" ]]; then
- ip link set up dev ${WIFI_IFACE} || die "$VIRTDIEMSG"
- ip addr add ${GATEWAY}/24 broadcast ${GATEWAY%.*}.255 dev ${WIFI_IFACE} || die "$VIRTDIEMSG"
-fi
-
-# enable Internet sharing
-if [[ "$SHARE_METHOD" != "none" ]]; then
- echo "Sharing Internet using method: $SHARE_METHOD"
- if [[ "$SHARE_METHOD" == "nat" ]]; then
- iptables -w -t nat -I POSTROUTING -o ${INTERNET_IFACE} -s ${GATEWAY%.*}.0/24 -j MASQUERADE || die
- iptables -w -I FORWARD -i ${WIFI_IFACE} -s ${GATEWAY%.*}.0/24 -j ACCEPT || die
- iptables -w -I FORWARD -i ${INTERNET_IFACE} -d ${GATEWAY%.*}.0/24 -j ACCEPT || die
- echo 1 > /proc/sys/net/ipv4/conf/$INTERNET_IFACE/forwarding || die
- echo 1 > /proc/sys/net/ipv4/ip_forward || die
- # to enable clients to establish PPTP connections we must
- # load nf_nat_pptp module
- modprobe nf_nat_pptp > /dev/null 2>&1
- elif [[ "$SHARE_METHOD" == "bridge" ]]; then
- # disable iptables rules for bridged interfaces
- if [[ -e /proc/sys/net/bridge/bridge-nf-call-iptables ]]; then
- echo 0 > /proc/sys/net/bridge/bridge-nf-call-iptables
- fi
-
- # to initialize the bridge interface correctly we need to do the following:
- #
- # 1) save the IPs and route table of INTERNET_IFACE
- # 2) if NetworkManager is running set INTERNET_IFACE as unmanaged
- # 3) create BRIDGE_IFACE and attach INTERNET_IFACE to it
- # 4) set the previously saved IPs and route table to BRIDGE_IFACE
- #
- # we need the above because BRIDGE_IFACE is the master interface from now on
- # and it must know where is connected, otherwise connection is lost.
- if ! is_bridge_interface $INTERNET_IFACE; then
- echo -n "Create a bridge interface... "
- OLD_IFS="$IFS"
- IFS=$'\n'
-
- IP_ADDRS=( $(ip addr show $INTERNET_IFACE | grep -A 1 -E 'inet[[:blank:]]' | paste - -) )
- ROUTE_ADDRS=( $(ip route show dev $INTERNET_IFACE) )
-
- IFS="$OLD_IFS"
-
- if networkmanager_is_running; then
- networkmanager_add_unmanaged $INTERNET_IFACE
- networkmanager_wait_until_unmanaged $INTERNET_IFACE
- fi
-
- # create bridge interface
- ip link add name $BRIDGE_IFACE type bridge || die
- ip link set dev $BRIDGE_IFACE up || die
- # set 0ms forward delay
- echo 0 > /sys/class/net/$BRIDGE_IFACE/bridge/forward_delay
-
- # attach internet interface to bridge interface
- ip link set dev $INTERNET_IFACE promisc on || die
- ip link set dev $INTERNET_IFACE up || die
- ip link set dev $INTERNET_IFACE master $BRIDGE_IFACE || die
-
- ip addr flush $INTERNET_IFACE
- for x in "${IP_ADDRS[@]}"; do
- x="${x/inet/}"
- x="${x/secondary/}"
- x="${x/dynamic/}"
- x=$(echo $x | sed 's/\([0-9]\)sec/\1/g')
- x="${x/${INTERNET_IFACE}/}"
- ip addr add $x dev $BRIDGE_IFACE || die
- done
-
- # remove any existing entries that were added from 'ip addr add'
- ip route flush dev $INTERNET_IFACE
- ip route flush dev $BRIDGE_IFACE
-
- # we must first add the entries that specify the subnets and then the
- # gateway entry, otherwise 'ip addr add' will return an error
- for x in "${ROUTE_ADDRS[@]}"; do
- [[ "$x" == default* ]] && continue
- ip route add $x dev $BRIDGE_IFACE || die
- done
-
- for x in "${ROUTE_ADDRS[@]}"; do
- [[ "$x" != default* ]] && continue
- ip route add $x dev $BRIDGE_IFACE || die
- done
-
- echo "$BRIDGE_IFACE created."
- fi
- fi
-else
- echo "No Internet sharing"
-fi
-
-# start dhcp + dns (optional)
-if [[ "$SHARE_METHOD" != "bridge" ]]; then
- if [[ $NO_DNS -eq 0 ]]; then
- DNS_PORT=5353
- iptables -w -I INPUT -p tcp -m tcp --dport $DNS_PORT -j ACCEPT || die
- iptables -w -I INPUT -p udp -m udp --dport $DNS_PORT -j ACCEPT || die
- iptables -w -t nat -I PREROUTING -s ${GATEWAY%.*}.0/24 -d ${GATEWAY} \
- -p tcp -m tcp --dport 53 -j REDIRECT --to-ports $DNS_PORT || die
- iptables -w -t nat -I PREROUTING -s ${GATEWAY%.*}.0/24 -d ${GATEWAY} \
- -p udp -m udp --dport 53 -j REDIRECT --to-ports $DNS_PORT || die
- else
- DNS_PORT=0
- fi
- iptables -w -I INPUT -p udp -m udp --dport 67 -j ACCEPT || die
-
- if which complain > /dev/null 2>&1; then
- # openSUSE's apparmor does not allow dnsmasq to read files.
- # remove restriction.
- complain dnsmasq
- fi
-
- umask 0033
- dnsmasq -C $CONFDIR/dnsmasq.conf -x $CONFDIR/dnsmasq.pid -l $CONFDIR/dnsmasq.leases -p $DNS_PORT || die
- umask $SCRIPT_UMASK
-fi
-
-# start access point
-echo "hostapd command-line interface: hostapd_cli -p $CONFDIR/hostapd_ctrl"
-
-if [[ $NO_HAVEGED -eq 0 ]]; then
- haveged_watchdog &
- HAVEGED_WATCHDOG_PID=$!
-fi
-
-# start hostapd (use stdbuf for no delayed output in programs that redirect stdout)
-stdbuf -oL $HOSTAPD $HOSTAPD_DEBUG_ARGS $CONFDIR/hostapd.conf &
-HOSTAPD_PID=$!
-echo $HOSTAPD_PID > $CONFDIR/hostapd.pid
-
-if ! wait $HOSTAPD_PID; then
- echo -e "\nError: Failed to run hostapd, maybe a program is interfering." >&2
- if networkmanager_is_running; then
- echo "If an error like 'n80211: Could not configure driver mode' was thrown" >&2
- echo "try running the following before starting create_ap:" >&2
- if [[ $NM_OLDER_VERSION -eq 1 ]]; then
- echo " nmcli nm wifi off" >&2
- else
- echo " nmcli r wifi off" >&2
- fi
- echo " rfkill unblock wlan" >&2
- fi
- die
-fi
-
-clean_exit
-
-# Local Variables:
-# tab-width: 4
-# indent-tabs-mode: nil
-# End:
-
-# vim: et sts=4 sw=4
diff --git a/UpdateOS-3.1/scripts/create_install_package.sh b/UpdateOS-3.1/scripts/create_install_package.sh
deleted file mode 100755
index 9215a8a..0000000
--- a/UpdateOS-3.1/scripts/create_install_package.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-echo create install package for $1
-
-INSTALL_DIR=$1
-
-if [ -f "$INSTALL_DIR/deploy.sh" ]
-then
- chmod +x "$INSTALL_DIR/deploy.sh"
-fi
-
-if [ -f "$INSTALL_DIR/manifest.txt" ]
-then
- echo move existing manifest away
- mv "$INSTALL_DIR/manifest.txt" /tmp
-fi
-rm -rf __MACOSX
-
-find "$INSTALL_DIR" -type f ! -name "._*" -print0 | xargs -0 sha1sum > /tmp/manifest.new
-mv /tmp/manifest.new "$INSTALL_DIR/manifest.txt"
-
-zip -r "$INSTALL_DIR.zop" "$INSTALL_DIR"/*
diff --git a/UpdateOS-3.1/scripts/eject.sh b/UpdateOS-3.1/scripts/eject.sh
deleted file mode 100755
index e523448..0000000
--- a/UpdateOS-3.1/scripts/eject.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# USER_DIR=${USER_DIR:="/usbdrive"}
-# PATCH_DIR=${PATCH_DIR:="/usbdrive/Patches"}
-FW_DIR=${FW_DIR:="/root"}
-SCRIPTS_DIR=$FW_DIR/scripts
-
-echo "Stopping pd, unmounting USB drive..."
-oscsend localhost 4001 /oled/aux/clear i 1
-oscsend localhost 4001 /oled/aux/line/1 s "Ejecting USB drive..."
-oscsend localhost 4001 /oled/setscreen i 1
-$SCRIPTS_DIR/killpatch.sh
-
-if grep -qs " /usbdrive" /proc/mounts; then
- fuser -km /usbdrive/
- umount /usbdrive
-fi
-
-echo "done"
-oscsend localhost 4001 /oled/aux/line/3 s "Safe to remove."
-# set to aux screen signals screen update
-oscsend localhost 4001 /oled/setscreen i 1
-oscsend localhost 4001 /reload i 1
diff --git a/UpdateOS-3.1/scripts/get-usb-drive-dev.sh b/UpdateOS-3.1/scripts/get-usb-drive-dev.sh
deleted file mode 100755
index a985584..0000000
--- a/UpdateOS-3.1/scripts/get-usb-drive-dev.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-# USER_DIR=${USER_DIR:="/usbdrive"}
-# PATCH_DIR=${PATCH_DIR:="/usbdrive/Patches"}
-# FW_DIR=${FW_DIR:="/root"}
-# SCRIPTS_DIR=$FW_DIR/scripts
-
-# this returns the most recently plugged usb block device suitable for mounting
-
-devices=(/dev/sd*)
-
-if [ -e ${devices[-1]} ]; then
- echo "${devices[-1]}"
- exit 0
-else
- exit 1
-fi
-
-
diff --git a/UpdateOS-3.1/scripts/get-user-dir.sh b/UpdateOS-3.1/scripts/get-user-dir.sh
deleted file mode 100755
index 1e0a956..0000000
--- a/UpdateOS-3.1/scripts/get-user-dir.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-# export PATCH_DIR=${PATCH_DIR:="/usbdrive/Patches"}
-export FW_DIR=${FW_DIR:="/root"}
-export SCRIPTS_DIR=$FW_DIR/scripts
-
-if grep -qs "/usbdrive" /proc/mounts
-then
- export USER_DIR=/usbdrive
-else
- if grep -qs "/sdcard" /proc/mounts
- then
- export USER_DIR=/sdcard
- else
- # not practical, as its not mounted, but we have no choice
- export USER_DIR=/usbdrive
- fi
-fi
-
-echo $USER_DIR
diff --git a/UpdateOS-3.1/scripts/info.py b/UpdateOS-3.1/scripts/info.py
deleted file mode 100755
index 3f29b21..0000000
--- a/UpdateOS-3.1/scripts/info.py
+++ /dev/null
@@ -1,99 +0,0 @@
-import os
-import imp
-import sys
-import time
-import threading
-import subprocess
-import socket
-
-print "Starting INFO script"
-
-# usb or sd card
-user_dir = os.getenv("USER_DIR", "/usbdrive")
-patch_dir = os.getenv("PATCH_DIR", "/usbdrive/Patches")
-fw_dir = os.getenv("FW_DIR", "/root")
-
-print "loading og module"
-# imports
-current_dir = os.path.dirname(os.path.abspath(__file__))
-og = imp.load_source('og', current_dir + '/og.py')
-wifi = imp.load_source('wifi_control', current_dir + '/wifi_control.py')
-
-# returns output if exit code 0, NA otherwise
-def run_cmd(cmd) :
- ret = 'None'
- try:
- ret = subprocess.check_output(['bash', '-c', cmd], close_fds=True)
- except: pass
- return ret
-
-def check_status():
- global info
- while True:
- info.items[0] = "CPU: " + str(100 - int(run_cmd("vmstat 1 2|tail -1|awk '{print $15}'"))) + " %"
- info.items[3] = "IP: " + socket.gethostbyname(socket.gethostname())
- og.redraw_flag = True
-
-info = og.InfoList()
-
-print "start app"
-# start it up
-og.start_app()
-
-# get info
-cpu = "CPU: ..."
-usbdrive = "USB Drive: " + run_cmd("grep usbdrive /proc/mounts | awk '{print $1}' | sed -e 's/\/dev\///'")
-midi_dev = run_cmd("aplaymidi -l | awk '{if (NR==2) print $2}'")
-if (midi_dev == ""): midi_dev = 'None'
-midi_dev = "MIDI Dev: " + midi_dev
-version = run_cmd("cat " + fw_dir + "/version")
-build_tag = run_cmd("cat " + fw_dir + "/buildtag")
-version = "Version: " + version + build_tag
-patch_dir = " " + patch_dir.split(user_dir + "/", 1).pop()
-user_dir = " " + user_dir
-patch = " " + run_cmd("ls /tmp/curpatchname")
-ip_address = "IP: " + socket.gethostbyname(socket.gethostname())
-host_name = " " + run_cmd("ps aux | grep 'avahi.*running' | awk 'NR==1{print $13}' | sed 's/\[//' | sed 's/]//'")
-
-# check for wifi
-ssid = "not connected"
-if wifi.wifi_connected() :
- ssid = wifi.current_net
-ssid = " " + ssid
-
-#info.items = [usbdrive, midi_dev, version, "Patch Folder:", patch_dir, "User Root:", user_dir, ip_address, "Host Name:",host_name]
-info.items = [
-cpu,
-usbdrive,
-midi_dev,
-ip_address,
-"WiFi Network:",
-ssid,
-"Host Name:",
-host_name,
-"Patch: ",
-patch,
-"Patch Folder:",
-patch_dir,
-"User Root:",
-user_dir,
-version,
-]
-
-info.header='INFO press to exit.'
-
-# bg thread
-menu_updater = threading.Thread(target=check_status)
-menu_updater.daemon = True # stop the thread when we exit
-
-
-# start thread to update connection status
-menu_updater.start()
-
-# enter menu
-info.draw()
-og.redraw_flag = True
-info.perform()
-
-og.end_app()
-
diff --git a/UpdateOS-3.1/scripts/info.sh b/UpdateOS-3.1/scripts/info.sh
deleted file mode 100755
index a74b8e1..0000000
--- a/UpdateOS-3.1/scripts/info.sh
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-USER_DIR=${USER_DIR:="/usbdrive"}
-PATCH_DIR=${PATCH_DIR:="/usbdrive/Patches"}
-export FW_DIR=${FW_DIR:="/root"}
-# SCRIPTS_DIR=$FW_DIR/scripts
-
-# don't clear aux screen. it is cleared and set with OG version
-# on first line before this script is called
-
-USBDRIVE="$(grep usbdrive /proc/mounts | awk '{print $1}' | sed -e 's/\/dev\///')"
-
-# second column on second line of output from aplaymidi -l is the name of the first attached MIDI device
-MIDIDEV="$(aplaymidi -l | awk '{if (NR==2) print $2}')"
-
-VERSION="$(cat $FW_DIR/version) $(cat $FW_DIR/buildtag)"
-
-oscsend localhost 4001 /oled/setscreen i 1
-oscsend localhost 4001 /oled/gClear ii 1 1
-oscsend localhost 4001 /oled/gPrintln iiiiis 1 2 0 8 1 " System Info"
-oscsend localhost 4001 /oled/gFlip i 1
-oscsend localhost 4001 /oled/aux/line/1 s "CPU: ..."
-oscsend localhost 4001 /oled/aux/line/2 s "MIDI: $MIDIDEV"
-oscsend localhost 4001 /oled/aux/line/3 s "Version: $VERSION"
-oscsend localhost 4001 /oled/aux/line/4 s "Patch: $PATCH_DIR"
-oscsend localhost 4001 /oled/aux/line/5 s "User: $USER_DIR"
-
-# set to aux screen, signals screen update
-
-# takes a sec for the cpu
-CPU="$(echo $[100-$(vmstat 1 2|tail -1|awk '{print $15}')])"
-oscsend localhost 4001 /oled/aux/line/1 s "CPU: $CPU %"
-oscsend localhost 4001 /oled/setscreen i 1
diff --git a/UpdateOS-3.1/scripts/install_package.sh b/UpdateOS-3.1/scripts/install_package.sh
deleted file mode 100755
index 81e0844..0000000
--- a/UpdateOS-3.1/scripts/install_package.sh
+++ /dev/null
@@ -1,126 +0,0 @@
-#!/bin/bash
-
-#in case the deploy scripts need these
-export USER_DIR=${USER_DIR:="/usbdrive"}
-export PATCH_DIR=${PATCH_DIR:="$USER_DIR/Patches"}
-export FW_DIR=${FW_DIR:="/root"}
-export SCRIPTS_DIR=$FW_DIR/scripts
-
-oscsend localhost 4001 /oled/setscreen i 1
-
-oscsend localhost 4001 /enableauxsub i 1
-oscsend localhost 4001 /oled/aux/clear i 1
-oscsend localhost 4001 /oled/aux/line/1 s "Installing"
-oscsend localhost 4001 /oled/aux/line/2 s "$1"
-oscsend localhost 4001 /oled/aux/line/5 s "Do not interrupt!"
-
-echo "installing : " $1
-cd "$PATCH_DIR"
-
-export INSTALL_FILE="$1"
-
-
-rm ._*.z?p
-
-
-INSTALL_DIR=`unzip -l "$INSTALL_FILE" -x "__MACOSX/*" "._*" ".DS_Store" | head -4 |tail -1 | cut -b 31- |cut -d '/' -f 1`
-
-echo "install dir : $INSTALL_DIR"
-if [ "$INSTALL_DIR" == "" ]
-then
- oscsend localhost 4001 /oled/aux/line/4 s "Install FAILED"
- oscsend localhost 4001 /oled/aux/line/5 s "unable no files"
- oscsend localhost 4001 /enableauxsub i 0
- exit 130
-fi
-
-rm -rf $INSTALL_DIR
-
-oscsend localhost 4001 /oled/aux/line/4 s "unzipping"
-unzip -o "$INSTALL_FILE" -x "__MACOSX/*" "._*" ".DS_Store"> /tmp/install_files.txt ; ec=$?;
-if [ $ec -ne 0 ]
-then
- oscsend localhost 4001 /oled/aux/line/4 s "Install FAILED"
- oscsend localhost 4001 /oled/aux/line/5 s "unable to unzip"
- oscsend localhost 4001 /enableauxsub i 0
- exit 128
-fi
-
-
-
-ec=0
-
-if [ -f "$INSTALL_DIR/manifest.txt" ]
-then
- oscsend localhost 4001 /oled/aux/line/4 s "Checking manifest"
- mv "$INSTALL_DIR/manifest.txt" /tmp
- find "$INSTALL_DIR" -type f ! -name "._*" ! -name ".DS_Store" -print0 | xargs -0 sha1sum > /tmp/sha1sum.txt
- sort /tmp/manifest.txt > /tmp/manifest.orig
- sort /tmp/sha1sum.txt > /tmp/manifest.new
- diff /tmp/manifest.orig /tmp/manifest.new; ec=$?;
- mv /tmp/manifest.txt "$INSTALL_DIR"
- if [ $ec -ne 0 ]
- then
- export LOGFILE=${USER_DIR}/install_log.txt
- echo "Install failed for $INSTALL_FILE" > $LOGFILE
- echo "file diff incorrect" >> $LOGFILE
- diff /tmp/manifest.orig /tmp/manifest.new >> $LOGFILE
- oscsend localhost 4001 /oled/aux/line/4 s "Install FAILED"
- oscsend localhost 4001 /oled/aux/line/5 s "Files corrupt"
- oscsend localhost 4001 /enableauxsub i 0
- exit 129
- fi
-fi
-
-if [ -f "$INSTALL_DIR/deploy.sh" ]
-then
- oscsend localhost 4001 /oled/aux/line/4 s "Running deploy"
- cd "$INSTALL_DIR"
- ./deploy.sh "$INSTALL_DIR" ; ec=$?
- if [ $ec -gt 127 ]
- then
- oscsend localhost 4001 /enableauxsub i 0
- oscsend localhost 4001 /oled/aux/line/4 s "Install FAILED"
- oscsend localhost 4001 /oled/aux/line/5 s "deploy failed"
- oscsend localhost 4001 /enableauxsub i 0
- exit $ec
- fi
-fi
-
-#success
-
-#remove zip file
-cd "$PATCH_DIR"
-rm "$INSTALL_FILE"
-
-oscsend localhost 4001 /oled/aux/clear i 1
-oscsend localhost 4001 /oled/aux/line/1 s "Installation"
-oscsend localhost 4001 /oled/aux/line/2 s "Successful"
-oscsend localhost 4001 /oled/aux/line/3 s "Enjoy :)"
-case "$ec" in
- 0)
- oscsend localhost 4001 /oled/aux/line/5 s "restarting mother"
- sleep 1
- ~/scripts/restart-mother.sh
- ;;
- 1)
- oscsend localhost 4001 /oled/aux/line/5 s "restarting mother"
- sleep 1
- ~/scripts/restart-mother.sh
- ;;
- 2)
- oscsend localhost 4001 /oled/aux/line/5 s "rebooting..."
- sleep 1
- ~/scripts/reboot.sh
- ;;
- 3)
- oscsend localhost 4001 /oled/aux/line/5 s "shutting down..."
- sleep 1
- ~/scripts/shutdown.sh
- ;;
-esac
-
-#irrelevant we dont get here :)
-oscsend localhost 4001 /enableauxsub i 0
-exit $ec
-
diff --git a/UpdateOS-3.1/scripts/killmother.sh b/UpdateOS-3.1/scripts/killmother.sh
deleted file mode 100755
index bfa9429..0000000
--- a/UpdateOS-3.1/scripts/killmother.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-# USER_DIR=${USER_DIR:="/usbdrive"}
-# PATCH_DIR=${PATCH_DIR:="/usbdrive/Patches"}
-export FW_DIR=${FW_DIR:="/root"}
-SCRIPTS_DIR=$FW_DIR/scripts
-
-
-# quit patch
-$SCRIPTS_DIR/killpatch.sh
-# then mother
-# give a chance to shut itself off
-oscsend localhost 4001 /quitmother i 1
-sleep .1
-
-
-#kill webserver if running
-kill `cat /tmp/webserver.pid`
-sleep .1
-kill -9 `cat /tmp/webserver.pid`
-
-# kill SIGTERM
-killall mother
-sleep .1
-
-# and kill SIGKILL
-killall -s 9 mother
-
diff --git a/UpdateOS-3.1/scripts/killpatch.sh b/UpdateOS-3.1/scripts/killpatch.sh
deleted file mode 100755
index a643b75..0000000
--- a/UpdateOS-3.1/scripts/killpatch.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-
-# USER_DIR=${USER_DIR:="/usbdrive"}
-# PATCH_DIR=${PATCH_DIR:="/usbdrive/Patches"}
-# FW_DIR=${FW_DIR:="/root"}
-# SCRIPTS_DIR=$FW_DIR/scripts
-
-# quiting patches
-# 3 stages, inform by osc, then kill SIGTERM, then SIGKILL
-# currently legacy pd is included
-
-
-# give patch an opportunity to quit/cleanup
-oscsend localhost 4000 /quitpd i 1
-oscsend localhost 4000 /quit i 1
-sleep .12
-
-#kill all with SIGTERM
-killall pd
-kill `cat /tmp/pids/*.pid`
-sleep .1
-
-# and kill all with SIGKILL
-killall -s 9 pd
-kill -9 `cat /tmp/pids/*.pid`
-
-
-rm /tmp/pids/*.pid
-
-# turn off led, just to be sure
-oscsend localhost 4001 /led i 0
-
-# clean up
-# remove old state directory
-rm -fr /tmp/state
-mkdir /tmp/state
-
-
diff --git a/UpdateOS-3.1/scripts/midi-config.sh b/UpdateOS-3.1/scripts/midi-config.sh
deleted file mode 100755
index 4d9b1c8..0000000
--- a/UpdateOS-3.1/scripts/midi-config.sh
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/bin/bash
-
-USER_DIR=${USER_DIR:="/usbdrive"}
-# PATCH_DIR=${PATCH_DIR:="/usbdrive/Patches"}
-export FW_DIR=${FW_DIR:="/root"}
-SCRIPTS_DIR=$FW_DIR/scripts
-
-# encoder wheel is ignored (until /gohome is called at end of script)
-oscsend localhost 4001 /enableauxsub i 1
-
-# clear aux screen
-oscsend localhost 4001 /oled/aux/clear i 1
-oscsend localhost 4001 /oled/setscreen i 1
-
-
-MIDIFILE=$USER_DIR/MIDI-Config.txt
-
-# get current channel, create channel file if it doesn't exist
-CH=1
-if [ -f $MIDIFILE ]
-then
- CH=$(cat $MIDIFILE | grep channel | sed "s/channel //" | sed s/\;//)
-else
- echo "channel 1;" > $MIDIFILE
- CH=$(cat $MIDIFILE | grep channel | sed "s/channel //" | sed s/\;//)
-fi
-
-oscsend localhost 4001 /oled/aux/line/1 s "Set the default"
-oscsend localhost 4001 /oled/aux/line/2 s "MIDI input / output"
-oscsend localhost 4001 /oled/aux/line/3 s "channel."
-oscsend localhost 4001 /oled/aux/line/5 s "MIDI Channel: $CH"
-
-while read line; do
-# echo $line
-
- if [ "$line" == "/encoder/turn i 0" ]
- then
- CH=$(($CH-1))
- if (( $CH < 1 )); then
- CH=1
- fi
- echo $CH
- oscsend localhost 4001 /oled/aux/line/5 s "MIDI Channel: $CH"
- fi
-
- if [ "$line" == "/encoder/turn i 1" ]
- then
- CH=$(($CH+1))
- if (( $CH > 16 )); then
- CH=16
- fi
- echo $CH
- oscsend localhost 4001 /oled/aux/line/5 s "MIDI Channel: $CH"
- fi
-
- if [ "$line" == "/encoder/button i 1" ]
- then
- grep -v "channel" $MIDIFILE > $MIDIFILE.tmp
- echo "channel $CH;" >> $MIDIFILE.tmp
- mv $MIDIFILE.tmp $MIDIFILE
- oscsend localhost 4000 /midich i $CH
-
- oscsend localhost 4001 /oled/aux/clear i 1
- oscsend localhost 4001 /oled/aux/line/2 s "MIDI Channel"
- oscsend localhost 4001 /oled/aux/line/3 s "set to ${CH}."
- oscsend localhost 4001 /enableauxsub i 0
- oscsend localhost 4001 /midiConfig i 1
- break 2
- fi
-done < <($SCRIPTS_DIR/oscdump2 4002)
-echo returned from setmidich
-
-killall oscdump2
-sleep 2
-
-echo "cool set the ch"
-
-#oscsend localhost 4001 /gohome i 1
-oscsend localhost 4001 /oled/setscreen i 2
-
-
diff --git a/UpdateOS-3.1/scripts/midi_setup.py b/UpdateOS-3.1/scripts/midi_setup.py
deleted file mode 100755
index 237f780..0000000
--- a/UpdateOS-3.1/scripts/midi_setup.py
+++ /dev/null
@@ -1,282 +0,0 @@
-import os
-import subprocess
-import imp
-import sys
-import time
-import threading
-
-#vars
-midiIn = 0
-midiOut = 1
-midiInGate = 1
-midiOutGate = 1
-midiDeviceIdx = 0
-midiDevices = [ ]
-midiDevice = '28:0'
-
-# usb or sd card
-user_dir = os.getenv("USER_DIR", "/usbdrive")
-
-# imports
-current_dir = os.path.dirname(os.path.abspath(__file__))
-og = imp.load_source('og', current_dir + '/og.py')
-
-# UI elements
-menu = og.Menu()
-banner = og.Alert()
-
-# lock for updating menu
-menu_lock = threading.Lock()
-
-
-def run_cmd(cmd) :
- ret = False
- try:
- ret = subprocess.check_output(['bash', '-c', cmd], close_fds=True)
- except:
- pass
- return ret
-
-
-def quit():
- og.end_app()
-
-
-def update_menu():
- menu_lock.acquire()
- try :
- pass
- finally :
- menu_lock.release()
-
-# bg connection checker
-def check_status():
- while True:
- time.sleep(1)
- update_menu()
- og.redraw_flag = True
-
-
-# build main menu
-menu.items = []
-menu.header='MIDI Setup'
-
-# start it up
-og.start_app()
-
-def getStrVal(key, dval) :
- s = run_cmd("grep '# " + key +",' < "+user_dir+"/patch_loaded.sh| awk -F, ' { print $2 }'").strip()
- if(len(s)>0) :
- return s
- return dval
-
-def getIntVal(key, dval) :
- s = run_cmd("grep '# " + key +",' < "+user_dir+"/patch_loaded.sh| awk -F, ' { print $2 }'").strip()
- if(len(s)>0) :
- return int(s)
- return dval
-
-midiIn=getIntVal('midiIn',0)
-midiOut=getIntVal('midiOut',1)
-midiInGate=getIntVal('midiInGate',1)
-midiOutGate=getIntVal('midiOutGate',1)
-midiDevice=getStrVal('midiDevice',"28:0")
-
-def midiInGateSelect():
- global midiInGate
- og.clear_screen()
- og.println(1,"Input")
- ms = "Enabled" if midiInGate>0 else "Disabled"
- og.println(2,ms)
- og.flip()
- og.enc_but_flag = False
- while True :
- og.enc_input()
- if (og.enc_turn_flag):
- if(og.enc_turn and midiInGate==0):
- midiInGate=1
- elif(og.enc_turn==0 and midiInGate==1):
- midiInGate=0
- og.clear_screen()
- og.println(1,"Input")
- ms = "Enabled" if midiInGate>0 else "Disabled"
- og.println(2,ms)
- og.flip()
- elif (og.enc_but_flag and og.enc_but==1):
- print midiInGate
- menu.items[menu.selection][0] = 'Midi In : ' + ("Enabled" if midiInGate>0 else "Disabled");
- break
-
-def midiOutGateSelect():
- global midiOutGate
- og.clear_screen()
- og.println(1,"Output")
- ms = "Enabled" if midiOutGate>0 else "Disabled"
- og.println(2,ms)
- og.flip()
- og.enc_but_flag = False
- while True :
- og.enc_input()
- if (og.enc_turn_flag):
- if(og.enc_turn and midiOutGate==0):
- midiOutGate=1
- elif(og.enc_turn==0 and midiOutGate==1):
- midiOutGate=0
- og.clear_screen()
- og.println(1,"Output")
- ms = "Enabled" if midiOutGate>0 else "Disabled"
- og.println(2,ms)
- og.flip()
- elif (og.enc_but_flag and og.enc_but==1):
- print midiOutGate
- menu.items[menu.selection][0] = 'Midi Out : ' + ("Enabled" if midiOutGate>0 else "Disabled");
- break
-
-
-def midiInSelect():
- global midiIn
- og.clear_screen()
- og.println(1,"Input Channel")
- ms = str(midiIn) if midiIn>0 else "Omni"
- og.println(2,ms)
- og.flip()
- og.enc_but_flag = False
- while True :
- og.enc_input()
- if (og.enc_turn_flag):
- if(og.enc_turn and midiIn<16) :
- midiIn+=1
- elif(og.enc_turn==0 and midiIn>0):
- midiIn-=1
- og.clear_screen()
- og.println(1,"Input Channel")
- ms = str(midiIn) if midiIn>0 else "Omni"
- og.println(2,ms)
- og.flip()
- elif (og.enc_but_flag and og.enc_but==1):
- print midiIn
- menu.items[menu.selection][0] = 'Midi In Ch.: ' + (str(midiIn) if midiIn>0 else "Omni")
- break
-
-def midiOutSelect():
- global midiOut
- og.clear_screen()
- og.println(1,"Output Channel")
- og.println(2,str(midiOut))
- og.flip()
- og.enc_but_flag = False
- while True :
- og.enc_input()
- if (og.enc_turn_flag):
- if(og.enc_turn and midiOut<16) :
- midiOut+=1
- elif(og.enc_turn==0 and midiOut>1):
- midiOut-=1
- og.clear_screen()
- og.println(1,"Output Channel")
- og.println(2,str(midiOut))
- og.flip()
- elif (og.enc_but_flag and og.enc_but==1):
- print midiOut
- menu.items[menu.selection][0] = 'Midi Out Ch.: ' + (str(midiOut))
- break
-
-
-def midiDeviceSelect():
- global midiDevice,midiDeviceIdx,midiDevices
- devices = run_cmd("aplaymidi -l")
-
- #remove empty lines, and header
- midiDevices = [ x for x in devices.split("\n") if not len(x)==0]
- if len(midiDevices)>0 : midiDevices.pop(0);
-
- og.clear_screen()
- og.println(1,"Midi Device")
- midiDeviceIdx=0
- print(midiDevices)
- for x in midiDevices:
- #print(midiDevices[midiDeviceIdx][9:42].strip() + midiDevices[midiDeviceIdx][4:8].strip())
- if midiDevice == (midiDevices[midiDeviceIdx][9:42].strip() + ":" + midiDevices[midiDeviceIdx][4:8].strip()) : break
- midiDeviceIdx+=1
-
- if midiDeviceIdx>=len(midiDevices): midiDeviceIdx=0
-
- device = midiDevices[midiDeviceIdx][42:].strip() if len(midiDevices)>0 else "None"
- og.println(2,device)
- og.flip()
- og.enc_but_flag = False
- while True :
- og.enc_input()
- if (og.enc_turn_flag and len(midiDevices)>0):
- if(og.enc_turn and midiDeviceIdx < len(midiDevices)-1) :
- midiDeviceIdx+=1
- elif(og.enc_turn==0 and midiDeviceIdx>0):
- midiDeviceIdx-=1
- og.clear_screen()
- og.println(1,"Midi Device")
- device = midiDevices[midiDeviceIdx][42:].strip()
- og.println(2,device)
- og.flip()
- elif (og.enc_but_flag and og.enc_but==1):
- if(len(midiDevices)==0): midiDevice = "28:0"
- else: midiDevice = midiDevices[midiDeviceIdx][9:42].strip() + ":" + midiDevices[midiDeviceIdx][4:8].strip()
- print midiDevice
- menu.items[menu.selection][0] = 'Midi Device: ' + midiDevice
- break
-
-
-def save():
- og.clear_screen()
- og.flip()
- f = open(user_dir + "/patch_loaded.sh", "w")
- # write parameters for possible reading
- f.write("# MIDI PARAMETERS:START\n")
- f.write("# midiIn," + str(midiIn) + "\n")
- f.write("# midiOut," + str(midiOut) + "\n")
- f.write("# midiInGate," + str(midiInGate) +"\n")
- f.write("# midiOutGate," + str(midiOutGate) +"\n")
- f.write("# midiDevice," + str(midiDevice) + "\n")
- f.write("# MIDI PARAMETERS:END\n")
- # write script to be executed
- f.write("oscsend localhost 4000 /midiInCh i " + str(midiIn) + "\n")
- f.write("oscsend localhost 4000 /midiOutCh i " + str(midiOut) + "\n")
- f.write("oscsend localhost 4000 /midiInGate i " + str(midiInGate) + "\n")
- f.write("oscsend localhost 4000 /midiOutGate i " + str(midiOutGate) + "\n")
- f.write("aconnect \"" + str(midiDevice) + "\" \"Pure Data:0\"\n")
- f.write("aconnect \"Pure Data:1\" \"" + str(midiDevice) + "\"\n")
- f.close()
- os.system("aconnect -x")
- os.system("chmod +x "+user_dir+"/patch_loaded.sh")
- og.clear_screen()
- og.println(1,"Midi configuration")
- og.println(2,"SAVED")
- og.flip()
- os.system('oscsend localhost 4001 /midiConfig i 1')
- time.sleep(0.5)
- pass
-
-
-
-menu.items.append(['Midi In : ' + ("Enabled" if midiInGate>0 else "Disabled") , midiInGateSelect])
-menu.items.append(['Midi In Ch.: ' + (str(midiIn) if midiIn>0 else "Omni") , midiInSelect])
-menu.items.append(['Midi Out : ' + ("Enabled" if midiOutGate>0 else "Disabled") , midiOutGateSelect])
-menu.items.append(['Midi Out Ch.: ' + (str(midiOut)) , midiOutSelect])
-menu.items.append(['Midi Device: ' + midiDevice, midiDeviceSelect])
-menu.items.append(['Save', save])
-menu.items.append(['< Home', quit])
-menu.selection = 0
-
-# bg thread
-menu_updater = threading.Thread(target=check_status)
-menu_updater.daemon = True # stop the thread when we exit
-
-og.redraw_flag = True
-
-# start thread to update connection status
-menu_updater.start()
-
-# enter menu
-menu.perform()
-
-
-
diff --git a/UpdateOS-3.1/scripts/mount.sh b/UpdateOS-3.1/scripts/mount.sh
deleted file mode 100755
index d87f4ac..0000000
--- a/UpdateOS-3.1/scripts/mount.sh
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/bin/sh
-
-# USER_DIR=${USER_DIR:="/usbdrive"}
-# PATCH_DIR=${PATCH_DIR:="/usbdrive/Patches"}
-# FW_DIR=${FW_DIR:="/root"}
-# SCRIPTS_DIR=$FW_DIR/scripts
-
-# this returns the most recently plugged usb block device suitable for mounting
-devices=(/dev/sd*)
-if [ -e ${devices[-1]} ]; then
- DEVICE="${devices[-1]}"
- echo "found USB drive, using ${DEVICE}"
-else
- echo "no usb drive device found!"
- exit 1
-fi
-
-# test that this device isn't already mounted
-if grep -qs "$DEVICE " /proc/mounts; then
- echo "${DEVICE} is already mounted"
- exit 1
-fi
-
-# also test /usbdrive isn't mounted
-# this should warn to eject or something..
-if grep -qs " /usbdrive" /proc/mounts; then
- echo "/usbdrive is already mounted"
- exit 1
-fi
-
-
-# pull in useful variables from vol_id, quote everything Just In Case
-eval `/sbin/blkid -o udev ${DEVICE} | sed 's/^/export /; s/=/="/; s/$/"/'`
-
-if [ -z "$ID_FS_TYPE" ]; then
- echo "error: ID_FS_LABEL is empty! did vol_id break? tried ${DEVICE}"
- exit 1
-fi
-
-# mount the device
-#
-# If expecting thumbdrives, you probably want
-# mount -t auto -o async,noatime [...]
-#
-# If drive is VFAT/NFTS, this mounts the filesystem such that all files
-# are owned by a std user instead of by root. Change to your user's UID
-# (listed in /etc/passwd). You may also want "gid=1000" and/or "umask=022", eg:
-# mount -t auto -o uid=1000,gid=1000 [...]
-#
-#
-case "$ID_FS_TYPE" in
-
- vfat) mount -t vfat -o async,noatime,uid=1000 ${DEVICE} "/usbdrive"
- ;;
-
- exfat) mount -t exfat -o async,noatime,uid=1000 ${DEVICE} "/usbdrive"
- ;;
-
-
- # I like the locale setting for ntfs
- ntfs) mount -t auto -o async,noatime,uid=1000,locale=en_US.UTF-8 ${DEVICE} "/usbdrive"
- ;;
-
- # ext2/3/4 don't like uid option
- ext*) mount -t auto -o async,noatime ${DEVICE} "/usbdrive"
- ;;
-esac
-
-# all done here, return successful
-exit 0
-
diff --git a/UpdateOS-3.1/scripts/og.py b/UpdateOS-3.1/scripts/og.py
deleted file mode 100755
index 59afa9e..0000000
--- a/UpdateOS-3.1/scripts/og.py
+++ /dev/null
@@ -1,223 +0,0 @@
-import liblo
-import time
-import sys
-import os
-
-enc_turn = 0
-enc_but = 0
-enc_turn_flag = False
-enc_but_flag = False
-redraw_flag = False # to break waiting for input for a screen update
-osc_target = None
-osc_server = None
-
-# sometimes it takes a second to aquire the OSC port
-# this provides a loading screen
-def loading_screen ():
- os.system('oscsend localhost 4001 /oled/gClear ii 1 1')
- os.system('oscsend localhost 4001 /oled/aux/line/3 s "loading..."')
- os.system('oscsend localhost 4001 /enableauxsub i 1')
- os.system('oscsend localhost 4001 /oled/setscreen i 1')
-
-# OSC and UI primitives
-def start_app ():
- loading_screen()
- init_osc()
-
-def end_app ():
- # send this as system call just in case something happend to our liblo sender
- os.system('oscsend localhost 4001 /gohome i 1')
- os.system('oscsend localhost 4001 /enableauxsub i 0')
- osc_server.free()
- exit()
-
-def invert_line(num) :
- liblo.send(osc_target, '/oled/gInvertArea', 1, 0, num*11+1, 127, 11)
-
-def truncate_mid(s, n):
- if len(s) <= n:
- return s
- n_2 = int(n) / 2 - 3
- n_1 = n - n_2 - 3
- return '{0}...{1}'.format(s[:n_1], s[-n_2:])
-
-def println(num, s) :
- s = truncate_mid(s, 20)
- liblo.send(osc_target, '/oled/gPrintln', 1, 2, num*11 + 2, 8, 1, s)
-
-def clear_screen() :
- liblo.send(osc_target, '/oled/gClear', 1, 1)
-
-def flip() :
- liblo.send(osc_target, '/oled/gFlip', 1)
-
-def init_osc() :
- global osc_server, osc_target
- print "config osc target"
- osc_target = liblo.Address(4001)
- print "config osc osc_server"
- # make sure the port is available... ahh ok
- os.system("fuser -k 4002/udp")
- try:
- osc_server = liblo.Server(4002)
- osc_server.add_method("/encoder/turn", 'i', enc_turn)
- osc_server.add_method("/encoder/button", 'i', enc_press)
-
- except liblo.ServerError, err:
- print str(err)
- sys.exit()
- print "done config osc_server"
-
-def enc_turn(path, args) :
- global enc_turn_flag, enc_turn
- enc_turn_flag = True
- enc_turn = args[0]
-
-def enc_press(path, args) :
- global enc_but_flag, enc_but
- enc_but_flag = True
- enc_but = args[0]
-
-# wait for input, or for redraw flag to be set
-def enc_input():
- global osc_server, enc_turn_flag, enc_but_flag, redraw_flag
- enc_turn_flag = False
- enc_but_flag = False
- redraw_flag = False
- while True :
- osc_server.recv(10)
- if (enc_turn_flag or enc_but_flag) : break
- if (redraw_flag) : break
-
-def wait_for_turn():
- while True :
- enc_input()
- if (enc_turn_flag): break
- return enc_turn
-
-def wait_for_press():
- while True :
- enc_input()
- if (enc_but_flag and (enc_but == 1)): break
- return enc_but
-
-def wait_for_release():
- while True :
- enc_input()
- if (enc_but_flag and (enc_but == 0)): break
- return enc_but
-
-# UI helpers
-class Alert :
- msg = "blank"
- def perform(self):
- clear_line(0)
- println(0, self.msg)
- flip()
- #wait_for_turn()
-
-class Menu :
- items = None
- selection = 0
- menu_offset = 0
- cursor_offset = 0
- back_flag = False
- header = ''
-
- def draw(self) :
- clear_screen()
-
- # header first line
- println(0, self.header)
-
- # menu entries for the rest
- sz = min(len(self.items),4)
- for i in range(0, sz) :
- println(i+1, self.items[i + self.menu_offset][0])
- invert_line(self.cursor_offset + 1)
-
- flip()
-
- def back(self):
- self.back_flag = True
-
- def enter(self) :
- self.perform()
-
- def enc_up(self) :
- if (self.cursor_offset == 3) :
- if not (self.menu_offset >= (len(self.items) - 4)) : self.menu_offset +=1
- if not (self.cursor_offset >= 3) : self.cursor_offset += 1
- self.selection = self.cursor_offset + self.menu_offset
-
- def enc_down(self) :
- if (self.cursor_offset == 0) :
- if not (self.menu_offset < 1) : self.menu_offset -= 1
- if not (self.cursor_offset < 1) : self.cursor_offset -= 1
- self.selection = self.cursor_offset + self.menu_offset
-
-
- def perform(self) :
- self.back_flag = False
- self.draw()
- while True :
- enc_input()
- if (enc_turn_flag) :
- i = enc_turn
- if i == 0 :
- self.enc_down()
- if i == 1 :
- self.enc_up()
- self.draw()
- if (enc_but_flag) :
- if (enc_but == 1) :
- self.items[self.selection][1]()
- if (self.back_flag) : break
- else : self.draw()
- if (redraw_flag) :
- self.draw()
-
-class InfoList :
- items = None
- menu_offset = 0
- header = ''
-
- def draw(self) :
- clear_screen()
-
- # header first line
- println(0, self.header)
-
- # menu entries for the rest
- sz = min(len(self.items),4)
- for i in range(0, sz) :
- println(i+1, self.items[i + self.menu_offset])
-
- flip()
-
- def enc_up(self) :
- if not (self.menu_offset >= (len(self.items) - 4)) : self.menu_offset +=1
-
- def enc_down(self) :
- if not (self.menu_offset < 1) : self.menu_offset -= 1
-
- def perform(self) :
- self.back_flag = False
- self.draw()
- while True :
- enc_input()
- if (enc_turn_flag) :
- i = enc_turn
- if i == 0 :
- self.enc_down()
- if i == 1 :
- self.enc_up()
- self.draw()
- if (enc_but_flag) :
- if (enc_but == 1) :
- break
- if (redraw_flag) :
- self.draw()
-
-
-
diff --git a/UpdateOS-3.1/scripts/oscdump2 b/UpdateOS-3.1/scripts/oscdump2
deleted file mode 100755
index 46c7d4f..0000000
Binary files a/UpdateOS-3.1/scripts/oscdump2 and /dev/null differ
diff --git a/UpdateOS-3.1/scripts/patch_loaded.sh b/UpdateOS-3.1/scripts/patch_loaded.sh
deleted file mode 100755
index f4e3f77..0000000
--- a/UpdateOS-3.1/scripts/patch_loaded.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-# MIDI PARAMETERS:START
-# midiIn,0
-# midiOut,1
-# midiInGate,1
-# midiOutGate,1
-# midiDevice,28:0
-# MIDI PARAMETERS:END
-oscsend localhost 4000 /midiInCh i 0
-oscsend localhost 4000 /midiOutCh i 1
-oscsend localhost 4000 /midiInGate i 1
-oscsend localhost 4000 /midiOutGate i 1
-aconnect "28:0" "Pure Data:0"
-aconnect "Pure Data:1" "28:0"
diff --git a/UpdateOS-3.1/scripts/pedal_setup.py b/UpdateOS-3.1/scripts/pedal_setup.py
deleted file mode 100755
index 8c69ed6..0000000
--- a/UpdateOS-3.1/scripts/pedal_setup.py
+++ /dev/null
@@ -1,209 +0,0 @@
-import os
-import subprocess
-import imp
-import sys
-import time
-import threading
-
-#vars
-exprMin=0
-exprMax=1023
-switchMode=0
-
-
-# usb or sd card
-user_dir = os.getenv("USER_DIR", "/usbdrive")
-
-# imports
-current_dir = os.path.dirname(os.path.abspath(__file__))
-og = imp.load_source('og', current_dir + '/og.py')
-
-# UI elements
-menu = og.Menu()
-banner = og.Alert()
-
-# lock for updating menu
-menu_lock = threading.Lock()
-
-
-def run_cmd(cmd) :
- ret = False
- try:
- ret = subprocess.check_output(['bash', '-c', cmd], close_fds=True)
- except:
- pass
- return ret
-
-
-def quit():
- og.end_app()
-
-
-def update_menu():
- menu_lock.acquire()
- try :
- pass
- finally :
- menu_lock.release()
-
-# bg connection checker
-def check_status():
- while True:
- time.sleep(1)
- update_menu()
- og.redraw_flag = True
-
-
-# build main menu
-menu.items = []
-menu.header='Pedal Setup'
-
-switchtypes=["Patch","Favourites"]
-
-def switchType(i) :
- return switchtypes[i]
-
-
-
-# start it up
-og.start_app()
-
-def getStrVal(key, dval) :
- s = run_cmd("grep '# " + key +",' < "+user_dir+"/pedal_cfg.sh| awk -F, ' { print $2 }'").strip()
- if(len(s)>0) :
- return s
- return dval
-
-def getIntVal(key, dval) :
- s = run_cmd("grep '# " + key +",' < "+user_dir+"/pedal_cfg.sh| awk -F, ' { print $2 }'").strip()
- if(len(s)>0) :
- return int(s)
- return dval
-
-exprMin=getIntVal('exprMin',0)
-exprMax=getIntVal('exprMax',1023)
-switchMode=getIntVal('switchMode',0)
-
-def ExprMinSelect():
- global exprMin
- og.clear_screen()
- og.println(1,"Expr Min")
- og.println(2,str(exprMin))
- og.flip()
- og.enc_but_flag = False
- while True :
- og.enc_input()
- if (og.enc_turn_flag):
- if(og.enc_turn and exprMin < 1023):
- exprMin += 1
- elif(og.enc_turn==0 and exprMin > 0):
- exprMin -= 1
- #exprMin=max(min(exprMin, 1023, 0)
- og.clear_screen()
- og.println(1,"Expr Min")
- og.println(2,str(exprMin))
- og.flip()
- elif (og.enc_but_flag and og.enc_but==1):
- print exprMin
- menu.items[menu.selection][0] = 'Expr Min : ' + str(exprMin)
- break
-
-def ExprMaxSelect():
- global exprMax
- og.clear_screen()
- og.println(1,"Expr Max")
- og.println(2,str(exprMax))
- og.flip()
- og.enc_but_flag = False
- while True :
- og.enc_input()
- if (og.enc_turn_flag):
- if(og.enc_turn and exprMax < 1023):
- exprMax += 1
- elif(og.enc_turn==0 and exprMax > 0):
- exprMax -= 1
- #exprMax=max(min(exprMax,1023), 0)
-
- og.clear_screen()
- og.println(1,"Expr Max")
- og.println(2,str(exprMax))
- og.flip()
- elif (og.enc_but_flag and og.enc_but==1):
- print exprMax
- menu.items[menu.selection][0] = 'Expr Max : ' + str(exprMax)
- break
-
-
-def SwitchModeSelect():
- global switchMode
- og.clear_screen()
- og.println(1,"Switch Mode")
- og.println(2,switchType(switchMode))
- og.flip()
- og.enc_but_flag = False
- while True :
- og.enc_input()
- if (og.enc_turn_flag):
- if(og.enc_turn and switchMode < (len(switchtypes)-1)):
- switchMode += 1
- elif(og.enc_turn==0 and switchMode > 0):
- switchMode -= 1
-
- og.clear_screen()
- og.println(1,"Switch Mode")
- og.println(2,switchType(switchMode))
- og.flip()
- elif (og.enc_but_flag and og.enc_but==1):
- print switchMode
- menu.items[menu.selection][0] = 'Switch : ' + switchType(switchMode)
- break
-
-
-def save():
- og.clear_screen()
- og.flip()
- f = open(user_dir + "/pedal_cfg.sh", "w")
- # write parameters for possible reading
- f.write("# PEDAL PARAMETERS:START\n")
- f.write("# exprMin," + str(exprMin) + "\n")
- f.write("# exprMax," + str(exprMax) + "\n")
- f.write("# switchMode," + str(switchMode) + "\n")
- f.write("# PEDAL PARAMETERS:END\n")
- # write script to be executed
- f.write("oscsend localhost 4001 /pedal/exprMin i " + str(exprMin) + "\n")
- f.write("oscsend localhost 4001 /pedal/exprMax i " + str(exprMax) + "\n")
- f.write("oscsend localhost 4001 /pedal/switchMode i " + str(switchMode) + "\n")
- f.close()
- os.system("chmod +x "+user_dir+"/pedal_cfg.sh")
- os.system(user_dir+"/pedal_cfg.sh")
- og.clear_screen()
- og.println(1,"Pedal configuration")
- og.println(2,"SAVED")
- og.flip()
- os.system('oscsend localhost 4001 /pedalConfig i 1')
- time.sleep(0.5)
- pass
-
-
-
-menu.items.append(['Expr Min : ' + str(exprMin) , ExprMinSelect])
-menu.items.append(['Expr Max : ' + str(exprMax) , ExprMaxSelect])
-menu.items.append(['Switch : ' + switchType(switchMode) , SwitchModeSelect])
-menu.items.append(['Save', save])
-menu.items.append(['< Home', quit])
-menu.selection = 0
-
-# bg thread
-menu_updater = threading.Thread(target=check_status)
-menu_updater.daemon = True # stop the thread when we exit
-
-og.redraw_flag = True
-
-# start thread to update connection status
-menu_updater.start()
-
-# enter menu
-menu.perform()
-
-
-
diff --git a/UpdateOS-3.1/scripts/play-sound.sh b/UpdateOS-3.1/scripts/play-sound.sh
deleted file mode 100755
index 552c168..0000000
--- a/UpdateOS-3.1/scripts/play-sound.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-# USER_DIR=${USER_DIR:="/usbdrive"}
-# PATCH_DIR=${PATCH_DIR:="/usbdrive/Patches"}
-# FW_DIR=${FW_DIR:="/root"}
-# SCRIPTS_DIR=$FW_DIR/scripts
-
-rm /tmp/sound.wav
-ln -s "$1" /tmp/sound.wav
-/usr/lib/pd/tcl/pd-gui.tcl /root/sfplayer.pd
-
diff --git a/UpdateOS-3.1/scripts/reboot.sh b/UpdateOS-3.1/scripts/reboot.sh
deleted file mode 100755
index 8903ea6..0000000
--- a/UpdateOS-3.1/scripts/reboot.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-# USER_DIR=${USER_DIR:="/usbdrive"}
-# PATCH_DIR=${PATCH_DIR:="/usbdrive/Patches"}
-FW_DIR=${FW_DIR:="/root"}
-
-oscsend localhost 4001 /oled/setscreen i 1
-
-oscsend localhost 4001 /enableauxsub i 1
-oscsend localhost 4001 /oled/aux/clear i 1
-oscsend localhost 4001 /oled/aux/line/1 s "Rebooting...."
-oscsend localhost 4001 /oled/aux/line/2 s "(~1 minute)"
-oscsend localhost 4001 /oled/aux/line/5 s "Do not remove power!"
-
-sync
-sleep 1
-SCRIPTS_DIR=$FW_DIR/scripts
-
-$SCRIPTS_DIR/killpatch.sh
-$SCRIPTS_DIR/killmother.sh
-killall wpa_supplicant
-killall dhcpcd
-reboot
-#echo "reboot"
diff --git a/UpdateOS-3.1/scripts/reload.sh b/UpdateOS-3.1/scripts/reload.sh
deleted file mode 100755
index 6bd4ec0..0000000
--- a/UpdateOS-3.1/scripts/reload.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-# USER_DIR=${USER_DIR:="/usbdrive"}
-# PATCH_DIR=${PATCH_DIR:="/usbdrive/Patches"}
-# FW_DIR=${FW_DIR:="/root"}
-# SCRIPTS_DIR=$FW_DIR/scripts
-
-oscsend localhost 4001 /reload i 1
diff --git a/UpdateOS-3.1/scripts/remount-ro.sh b/UpdateOS-3.1/scripts/remount-ro.sh
deleted file mode 100755
index 14c01c0..0000000
--- a/UpdateOS-3.1/scripts/remount-ro.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-# USER_DIR=${USER_DIR:="/usbdrive"}
-# PATCH_DIR=${PATCH_DIR:="/usbdrive/Patches"}
-# FW_DIR=${FW_DIR:="/root"}
-# SCRIPTS_DIR=$FW_DIR/scripts
-
-mount / -o remount,ro
diff --git a/UpdateOS-3.1/scripts/remount-rw.sh b/UpdateOS-3.1/scripts/remount-rw.sh
deleted file mode 100755
index f993fa0..0000000
--- a/UpdateOS-3.1/scripts/remount-rw.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-# USER_DIR=${USER_DIR:="/usbdrive"}
-# PATCH_DIR=${PATCH_DIR:="/usbdrive/Patches"}
-# FW_DIR=${FW_DIR:="/root"}
-# SCRIPTS_DIR=$FW_DIR/scripts
-
-mount / -o remount,rw
diff --git a/UpdateOS-3.1/scripts/restart-mother.sh b/UpdateOS-3.1/scripts/restart-mother.sh
deleted file mode 100755
index 5e1fd62..0000000
--- a/UpdateOS-3.1/scripts/restart-mother.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-# USER_DIR=${USER_DIR:="/usbdrive"}
-# PATCH_DIR=${PATCH_DIR:="/usbdrive/Patches"}
-export FW_DIR=${FW_DIR:="/root"}
-export SCRIPTS_DIR=$FW_DIR/scripts
-
-$SCRIPTS_DIR/killmother.sh
-$SCRIPTS_DIR/start-mother.sh
diff --git a/UpdateOS-3.1/scripts/save-new-patch.sh b/UpdateOS-3.1/scripts/save-new-patch.sh
deleted file mode 100755
index 0b1a06a..0000000
--- a/UpdateOS-3.1/scripts/save-new-patch.sh
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/bash
-
-# USER_DIR=${USER_DIR:="/usbdrive"}
-PATCH_DIR=${PATCH_DIR:="/usbdrive/Patches"}
-# FW_DIR=${FW_DIR:="/root"}
-# SCRIPTS_DIR=$FW_DIR/scripts
-
-
-echo "about to save new patch..."
-
-# encoder wheel is ignored (until /gohome is called at end of script)
-oscsend localhost 4001 /enableauxsub i 1
-
-# clear aux screen
-oscsend localhost 4001 /oled/aux/clear i 1
-oscsend localhost 4001 /oled/aux/line/1 s "Saving New..."
-
-# set to aux screen, signals screen update
-oscsend localhost 4001 /oled/setscreen i 1
-
-# signal patch to save state
-oscsend localhost 4000 /saveState i 1
-
-# allow patch to save stuff in state folder if it wants
-sleep .25
-
-# get newest name
-OLDNAME=$( ls /tmp/curpatchname )
-
-# if it ends in numbers, assume it is already a copy so don't add more numbers
-# remove a space followed by more numbers then start incrementing
-BASENAME=$( echo "${OLDNAME}" | sed 's/ [0-9]\+$//' )
-
-# start at 2 cause this will always be at least a sequel
-N=2
-NEWNAME="${BASENAME} ${N}"
-while [[ -d "${PATCH_DIR}/${NEWNAME}" ]] ; do
- N=$(($N+1))
- NEWNAME="${BASENAME} ${N}"
-done
-
-echo $NEWNAME
-
-# copy current patch to a new one
-cp -Hr /tmp/patch/ "${PATCH_DIR}/${NEWNAME}"
-
-# copy knobstate.txt and any other files saved by the patch
-cp -r /tmp/state/* "${PATCH_DIR}/${NEWNAME}"
-
-# reload
-oscsend localhost 4001 /reload i 1
-oscsend localhost 4001 /gohome i 1
-oscsend localhost 4001 /loadPatch s "${NEWNAME}"
-
-
diff --git a/UpdateOS-3.1/scripts/save-patch.sh b/UpdateOS-3.1/scripts/save-patch.sh
deleted file mode 100755
index 3b24904..0000000
--- a/UpdateOS-3.1/scripts/save-patch.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-
-# USER_DIR=${USER_DIR:="/usbdrive"}
-# PATCH_DIR=${PATCH_DIR:="/usbdrive/Patches"}
-# FW_DIR=${FW_DIR:="/root"}
-# SCRIPTS_DIR=$FW_DIR/scripts
-
-echo "about to save patch..."
-
-# encoder wheel is ignored (until /gohome is called at end of script)
-oscsend localhost 4001 /enableauxsub i 1
-
-# clear aux screen
-oscsend localhost 4001 /oled/aux/clear i 1
-oscsend localhost 4001 /oled/aux/line/1 s "Saving..."
-
-# set to aux screen, signals screen update
-oscsend localhost 4001 /oled/setscreen i 1
-
-# signal patch to save state
-oscsend localhost 4000 /saveState i 1
-
-# allow patch to save stuff in state folder if it wants
-sleep .5
-
-# copy knobstate.txt and any other files saved by the patch
-cp -r /tmp/state/* "/tmp/patch"
-
-# retrun to patch
-oscsend localhost 4001 /enableauxsub i 0
-oscsend localhost 4001 /oled/setscreen i 3
-
diff --git a/UpdateOS-3.1/scripts/savepre.sh b/UpdateOS-3.1/scripts/savepre.sh
deleted file mode 100755
index b3d3d32..0000000
--- a/UpdateOS-3.1/scripts/savepre.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-USER_DIR=${USER_DIR:="/usbdrive"}
-# PATCH_DIR=${PATCH_DIR:="/usbdrive/Patches"}
-# FW_DIR=${FW_DIR:="/root"}
-# SCRIPTS_DIR=$FW_DIR/scripts
-
-# don't clear aux screen. it is cleared and set with OG version
-
-oscsend localhost 4001 /oled/aux/line/1 s "Saveing Preset..."
-oscsend localhost 4001 /oled/aux/line/2 s "$1"
-oscsend localhost 4001 /oled/aux/line/3 s "Sates: "
-oscsend localhost 4001 /oled/aux/line/4 s ""
-oscsend localhost 4001 /oled/aux/line/5 s ""
-
-# set to aux screen, signals screen update
-oscsend localhost 4001 /oled/setscreen i 1
-
-oscsend localhost 4000 /save s "$USER_DIR/Scenes/z1-$1/state.txt"
-cp -r "$USER_DIR/Patches/$1" "$DRIVE/Scenes/z1-$1"
diff --git a/UpdateOS-3.1/scripts/setup.sh b/UpdateOS-3.1/scripts/setup.sh
deleted file mode 100755
index 41314fe..0000000
--- a/UpdateOS-3.1/scripts/setup.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-sudo systemctl stop serial-getty@ttymxc0.service
-sudo dmesg -n 1
-amixer set PCM 192-
-amixer set PCM 170+
-amixer set Headphone 127-
-amixer set Headphone 127+
-amixer set 'Capture Mux' 'LINE_IN'
-
diff --git a/UpdateOS-3.1/scripts/shutdown.sh b/UpdateOS-3.1/scripts/shutdown.sh
deleted file mode 100755
index 4442fd6..0000000
--- a/UpdateOS-3.1/scripts/shutdown.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-# USER_DIR=${USER_DIR:="/usbdrive"}
-# PATCH_DIR=${PATCH_DIR:="/usbdrive/Patches"}
-FW_DIR=${FW_DIR:="/root"}
-SCRIPTS_DIR=$FW_DIR/scripts
-
-
-oscsend localhost 4001 /shutdown i 1
-$SCRIPTS_DIR/killpatch.sh
-$SCRIPTS_DIR/killmother.sh
-
-# shutdown wifi
-wpa_cli -i wlan0 terminate
-dhcpcd -b -x wlan0
-/root/scripts/create_ap --stop wlan0
-
-shutdown -h now
-#echo "shutting down"
diff --git a/UpdateOS-3.1/scripts/splash.sh b/UpdateOS-3.1/scripts/splash.sh
deleted file mode 100755
index ef023af..0000000
--- a/UpdateOS-3.1/scripts/splash.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-clear
-echo "************* WELCOME TO ORGANELLE ******************"
-echo ""
-echo ""
-echo "Type 'startx' to enter editing mode...."
diff --git a/UpdateOS-3.1/scripts/start-ap.sh b/UpdateOS-3.1/scripts/start-ap.sh
deleted file mode 100755
index f6ca369..0000000
--- a/UpdateOS-3.1/scripts/start-ap.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-killall wpa_supplicant
-killall dhcpcd
-/root/scripts/create_ap --no-virt -n wlan0 Organelle coolmusic
diff --git a/UpdateOS-3.1/scripts/start-gui.sh b/UpdateOS-3.1/scripts/start-gui.sh
deleted file mode 100755
index 155592a..0000000
--- a/UpdateOS-3.1/scripts/start-gui.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-export XAUTHORITY=/var/tmp/.Xauthority_$USER
-startx
diff --git a/UpdateOS-3.1/scripts/start-jack.sh b/UpdateOS-3.1/scripts/start-jack.sh
deleted file mode 100755
index aa2f105..0000000
--- a/UpdateOS-3.1/scripts/start-jack.sh
+++ /dev/null
@@ -1 +0,0 @@
-jackd -R -P90 -p16 -t200 -d alsa -dhw:0 -p 128 -r 44100 -s -i2 -o2 & echo $! > /tmp/pids/jack.pid
diff --git a/UpdateOS-3.1/scripts/start-mother.sh b/UpdateOS-3.1/scripts/start-mother.sh
deleted file mode 100755
index 20849c7..0000000
--- a/UpdateOS-3.1/scripts/start-mother.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/sh
-
-# export PATCH_DIR=${PATCH_DIR:="/usbdrive/Patches"}
-export FW_DIR=${FW_DIR:="/root"}
-export SCRIPTS_DIR=$FW_DIR/scripts
-
-clear
-$SCRIPTS_DIR/killmother.sh
-$SCRIPTS_DIR/setup.sh
-#$SCRIPTS_DIR/check-for-usb-drive.sh
-$SCRIPTS_DIR/mount.sh
-
-mkdir -p /tmp/pids
-
-export USER_DIR=`$SCRIPTS_DIR/get-user-dir.sh`
-echo using USER_DIR: $USER_DIR
-
-M_DIR=/root
-FW_DIR=/root
-# mother usbdrive/system -> usbdrive/Firmware -> sdcard/Firmrware -> root
-if [ -f /usbdrive/System/mother ]
-then
- # for backwards compatibility (<2.2)
- M_DIR=/usbdrive/System
-
-elif [ -f /usbdrive/Firmware/mother ]
-then
- M_DIR=/usbdrive/Firmware
- if [ -d /usbdrive/Firmware/scripts ]
- then
- export FW_DIR="/usbdrive/Firmware"
- fi
-elif [ -f /sdcard/Firmware/mother ]
-then
- M_DIR=/sdcard/Firmware
- if [ -d /sdcard/Firmware/scripts ]
- then
- export FW_DIR="/sdcard/Firmware"
- fi
-fi
-echo running $M_DIR/mother with scripts $FW_DIR/scripts
-$M_DIR/mother &
diff --git a/UpdateOS-3.1/scripts/stop-gui.sh b/UpdateOS-3.1/scripts/stop-gui.sh
deleted file mode 100755
index c54204a..0000000
--- a/UpdateOS-3.1/scripts/stop-gui.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-# USER_DIR=${USER_DIR:="/usbdrive"}
-export PATCH_DIR=${PATCH_DIR:="/usbdrive/Patches"}
-export FW_DIR=${FW_DIR:="/root"}
-export SCRIPTS_DIR=$FW_DIR/scripts
-
-jwm -exit
-$SCRIPTS_DIR/start-mother.sh > /dev/null 2>&1
-$SCRIPTS_DIR/welcome.sh
diff --git a/UpdateOS-3.1/scripts/usb-dev-removed.sh b/UpdateOS-3.1/scripts/usb-dev-removed.sh
deleted file mode 100755
index 0b82c7e..0000000
--- a/UpdateOS-3.1/scripts/usb-dev-removed.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-# USER_DIR=${USER_DIR:="/usbdrive"}
-# PATCH_DIR=${PATCH_DIR:="/usbdrive/Patches"}
-# FW_DIR=${FW_DIR:="/root"}
-# SCRIPTS_DIR=$FW_DIR/scripts
-
-
-# I don't think this is actually necessary (shutting down Pd) ...
-# If USB disk device was removed, Pd won't be able to save anything anyway.
-# If MIDI device removed, MIDI won't work. User will have to restart patch.
-
-#oscsend localhost 4001 /oled/aux/clear i 1
-#oscsend localhost 4001 /oled/aux/line/1 s "USB Device Removed!"
-#oscsend localhost 4001 /oled/aux/line/3 s "Stopping patch..."
-# set to aux screen which also causes screen refresh
-#oscsend localhost 4001 /oled/setscreen i 1
-
-#$SCRIPTS_DIR/killpatch.sh
-#oscsend localhost 4001 /oled/aux/line/3 s "Stopped patch."
-#oscsend localhost 4001 /oled/setscreen i 1
-#oscsend localhost 4001 /reload i 1
diff --git a/UpdateOS-3.1/scripts/welcome.sh b/UpdateOS-3.1/scripts/welcome.sh
deleted file mode 100755
index 844697b..0000000
--- a/UpdateOS-3.1/scripts/welcome.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-clear
-echo " "
-echo " "
-echo "*************************************************************************"
-echo "* *"
-echo "* Welcome to the Organelle! *"
-echo "* *"
-echo "* *"
-echo "* To enter patch edit mode type 'startx' and press enter *"
-echo "* *"
-echo "*************************************************************************"
-echo " "
-echo " "
diff --git a/UpdateOS-3.1/scripts/wifi-config.sh b/UpdateOS-3.1/scripts/wifi-config.sh
deleted file mode 100755
index 6922f32..0000000
--- a/UpdateOS-3.1/scripts/wifi-config.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-ip link set wlan0 up
-wpa_supplicant -D nl80211,wext -i wlan0 -c <(wpa_passphrase "name" "pass") &
-
diff --git a/UpdateOS-3.1/scripts/wifi_control.py b/UpdateOS-3.1/scripts/wifi_control.py
deleted file mode 100755
index dc5b6d0..0000000
--- a/UpdateOS-3.1/scripts/wifi_control.py
+++ /dev/null
@@ -1,167 +0,0 @@
-import os
-import subprocess
-
-log_file = os.getenv("USER_DIR", "/usbdrive") + "/wifi_log.txt"
-
-# states
-NOT_CONNECTED = 0
-CONNECTING = 1
-CONNECTED = 2
-DISCONNECTING = 3
-CONNECTION_ERROR = 4
-
-# current state
-state = NOT_CONNECTED
-connecting_timer = 0
-
-# AP
-AP_STOPPED = 0
-AP_RUNNING = 1
-ap_state = AP_STOPPED
-
-
-# webserver
-WEB_SERVER_STOPPED = 0
-WEB_SERVER_RUNNING = 1
-web_server_state = WEB_SERVER_STOPPED
-
-current_net = ''
-ip_address = ''
-
-# returns output if exit code 0, false otherwise
-def run_cmd(cmd) :
- ret = False
- try:
- ret = subprocess.check_output(['bash', '-c', cmd], close_fds=True)
- except: pass
- return ret
-
-# returns true or false on exit status
-def run_cmd_check(cmd) :
- ret = False
- try:
- subprocess.check_output(['bash', '-c', cmd], close_fds=True)
- ret = True
- except: pass
- return ret
-
-def start_web_server():
- global web_server_state
- run_cmd('systemctl start cherrypy')
- web_server_state = WEB_SERVER_RUNNING
-
-def stop_web_server():
- global web_server_state
- run_cmd('systemctl stop cherrypy')
- web_server_state = WEB_SERVER_STOPPED
-
-
-def start_ap_server():
- global ap_state
- run_cmd('systemctl start createap')
- ap_state = AP_RUNNING
-
-def stop_ap_server():
- global ap_state
- run_cmd('systemctl stop createap')
- ap_state = AP_STOPPED
-
-
-# true or false connected with ip address
-# updates ip and current network when connected
-def wifi_connected():
- global ap_state,ip_address, current_net
- ret = False
- if ap_state == AP_RUNNING :
- ip_address = "192.168.12.1"
- current_net = "Organelle"
- return True
-
- try :
- wifi_info = run_cmd('wpa_cli -i wlan0 status').splitlines()
- if (any("ip_address" in s for s in wifi_info)):
- update_network_info(wifi_info)
- ret = True
- except : pass
- return ret
-
-# get current wifi IP and ssid when connected
-# passed the output of wpa_cli status
-def update_network_info(info):
- global ip_address, current_net
- try : ip_address = [s for s in info if s.startswith('ip_address')][0][11:]
- except : pass
- try : current_net = [s for s in info if s.startswith('ssid')][0][5:]
- except : pass
-
-# get initial connection state and ip and ssid
-def initialize_state():
- global state, web_server_state, ap_state
-
- # wifi state on startup
- if wifi_connected() :
- state = CONNECTED
- else : state = NOT_CONNECTED
-
- # web server state on startup
- if (run_cmd_check('systemctl status cherrypy')) : web_server_state = WEB_SERVER_RUNNING
- else : web_server_state = WEB_SERVER_STOPPED
-
- # ap state on startup
- if (run_cmd_check('systemctl status createap')) : ap_state = AP_RUNNING
- else : ap_state = AP_STOPPED
-
-# assume this is called 1 / sec from the bg thread
-def update_state() :
- global state, connecting_timer, web_server_state, ap_state
-
- # wifi states
- if (state == NOT_CONNECTED):
- if wifi_connected() : state = CONNECTED
- elif (state == CONNECTING) :
- if wifi_connected() :
- state = CONNECTED
- else :
- connecting_timer += 1
- if (connecting_timer > 30) : state = CONNECTION_ERROR
- #elif (state == CONNECTED): do nothing
- elif (state == DISCONNECTING): state = NOT_CONNECTED
- #elif (state == CONNECTION_ERROR): do nothing
-
- # web server states
- if (run_cmd_check('systemctl status cherrypy')) : web_server_state = WEB_SERVER_RUNNING
- else : web_server_state = WEB_SERVER_STOPPED
-
- # ap statu=e
- if (run_cmd_check('systemctl status createap')) : ap_state = AP_RUNNING
- else : ap_state = AP_STOPPED
-
-
-# shut everything off
-def disconnect_all() :
- global state
- state = DISCONNECTING
- run_cmd("wpa_cli -i wlan0 terminate >> "+log_file+" 2>&1")
- run_cmd("dhcpcd -b -x wlan0 >> "+log_file+" 2>&1")
- run_cmd("/root/scripts/create_ap --stop wlan0 >> "+log_file+" 2>&1")
-
-# shut
-def connect(ssid, pw) :
- global state, connecting_timer, current_net
-
- # disconnect everything
- disconnect_all()
-
- # restart log
- run_cmd("echo WIFI LOG > " + log_file)
-
- # update state
- state = CONNECTING
- connecting_timer = 0
- current_net = ssid
-
- run_cmd("ip link set wlan0 up >> "+log_file+" 2>&1")
- run_cmd("wpa_supplicant -B -D nl80211,wext -i wlan0 -c <(cat <(echo ctrl_interface=/var/run/wpa_supplicant) <(wpa_passphrase \""+ssid+"\" \""+pw+"\")) >> "+log_file+" 2>&1")
- run_cmd("dhcpcd -b wlan0 >> "+log_file+" 2>&1")
-
-
diff --git a/UpdateOS-3.1/scripts/wifi_setup.py b/UpdateOS-3.1/scripts/wifi_setup.py
deleted file mode 100755
index 69ab0d2..0000000
--- a/UpdateOS-3.1/scripts/wifi_setup.py
+++ /dev/null
@@ -1,228 +0,0 @@
-import os
-import imp
-import sys
-import time
-import threading
-
-# usb or sd card
-user_dir = os.getenv("USER_DIR", "/usbdrive")
-
-# imports
-current_dir = os.path.dirname(os.path.abspath(__file__))
-og = imp.load_source('og', current_dir + '/og.py')
-wifi = imp.load_source('wifi_control', current_dir + '/wifi_control.py')
-
-wifi.log_file = user_dir + "/wifi_log.txt"
-
-# UI elements
-menu = og.Menu()
-banner = og.Alert()
-
-# lock for updating menu
-menu_lock = threading.Lock()
-
-def quit():
- og.end_app()
-
-# stores possible networks
-# used to build wifi menu
-# contains connect callback
-class WifiNet :
- ssid = ''
- pw = ''
- def connect (self):
- wifi.connect(self.ssid, self.pw)
- update_menu()
- og.redraw_flag = True
-
-def disconnect():
- print "wifi disconnect all"
- wifi.disconnect_all()
- update_menu()
- og.redraw_flag = True
-
-def start_web():
- print "start web"
- wifi.start_web_server()
- update_menu()
- og.redraw_flag = True
-
-def stop_web():
- print "stop web"
- wifi.stop_web_server()
- update_menu()
- og.redraw_flag = True
-
-
-
-def start_ap():
- print "start ap"
- wifi.start_ap_server()
- update_menu()
- og.redraw_flag = True
-
-def stop_ap():
- print "stop ap"
- wifi.stop_ap_server()
- update_menu()
- og.redraw_flag = True
-
-# update menu based on connection status
-def update_menu():
- dots = ['.','..','...','....']
- menu_lock.acquire()
- try :
- # update wifi network labels
- if (wifi.state == wifi.CONNECTING) :
- menu.header = 'Connecting'+dots[wifi.connecting_timer % 4]
- update_net_status_label('.')
- elif (wifi.state == wifi.CONNECTED) :
- menu.header = 'Connected ' + wifi.current_net
- update_net_status_label('*')
- elif (wifi.state == wifi.DISCONNECTING) :
- menu.header = 'Disconnecting..'
- update_net_status_label('-')
- elif (wifi.state == wifi.CONNECTION_ERROR) :
- menu.header = 'Problem Connecting'
- update_net_status_label('-')
- else :
- menu.header = 'Not Connected'
- update_net_status_label('-')
-
- # update webserver menu entry
- if (wifi.web_server_state == wifi.WEB_SERVER_RUNNING) :
- update_web_server_menu_entry(True)
- else :
- update_web_server_menu_entry(False)
-
- # update webserver menu entry
- if (wifi.ap_state == wifi.AP_RUNNING) :
- update_ap_menu_entry(True)
- else :
- update_ap_menu_entry(False)
- finally :
- menu_lock.release()
-
-# show connected status for each network
-def update_net_status_label(stat):
- # check entries that have stashed net info (I know)
- for i in range(len(menu.items)) :
- try :
- if (menu.items[i][2]['type'] == 'net') :
- if (menu.items[i][2]['ssid'] == wifi.current_net) :
- menu.items[i][0] = ' '+stat+' ' + menu.items[i][2]['ssid']
- else :
- menu.items[i][0] = ' - ' + menu.items[i][2]['ssid']
- except :
- pass
-
-def update_web_server_menu_entry(stat):
- if (stat) :
- label = 'Stop Web Server'
- action = stop_web
- else :
- label = 'Start Web server'
- action = start_web
- for i in range(len(menu.items)) :
- try :
- if (menu.items[i][2]['type'] == 'web_server_control') :
- menu.items[i][0] = label
- menu.items[i][1] = action
- except :
- pass
-
-def update_ap_menu_entry(stat):
- if (stat) :
- label = 'Stop AP'
- action = stop_ap
- else :
- label = 'Start AP'
- action = start_ap
- for i in range(len(menu.items)) :
- try :
- if (menu.items[i][2]['type'] == 'ap_control') :
- menu.items[i][0] = label
- menu.items[i][1] = action
- except :
- pass
-
-
-# bg connection checker
-def check_status():
- while True:
- time.sleep(1)
- wifi.update_state()
- update_menu()
- og.redraw_flag = True
-
-def non():
- pass
-
-def error_wifi_file() :
- og.clear_screen()
- og.println(0, "Error with wifi.txt")
- og.println(2, "Please check file")
- og.println(3, "is in the correct")
- og.println(4, "format.")
- og.flip()
- og.enc_input()
- quit()
-
-# build main menu
-menu.items = []
-menu.header='Not Connected'
-
-# start it up
-og.start_app()
-
-# check for wifi file, create one if not found
-wifi_file = user_dir + "/wifi.txt"
-if os.path.exists(wifi_file):
- f = open(user_dir + "/wifi.txt", "r")
-else :
- print "wifi file not found, creating"
- f = open(user_dir + "/wifi.txt", "w")
- f.write("Network Name\n")
- f.write("password\n")
- f.close()
- f = open(user_dir + "/wifi.txt", "r")
-
-try :
- networks = f.readlines()
- networks = [x.strip() for x in networks]
- ssids = networks[0::2]
- pws = networks[1::2]
- for i in range(len(ssids)) :
- if (ssids[i] != '') :
- ssid = ssids[i]
- pw = pws[i]
- net = WifiNet()
- net.ssid = ssid
- net.pw = pw
- menu.items.append([' - ' + ssid, net.connect, {'type':'net', 'ssid':ssid}]) # stash some extra info with these net entries
-except :
- error_wifi_file()
- print "bad wifi file"
-
-menu.items.append(['Start Web Server', non, {'type':'web_server_control'}])
-menu.items.append(['Start AP', non, {'type':'ap_control'}])
-menu.items.append(['Turn Wifi Off', disconnect])
-menu.items.append(['< Home', quit])
-menu.selection = 0
-
-# bg thread
-menu_updater = threading.Thread(target=check_status)
-menu_updater.daemon = True # stop the thread when we exit
-
-wifi.initialize_state()
-update_menu()
-og.redraw_flag = True
-
-# start thread to update connection status
-menu_updater.start()
-
-# enter menu
-menu.perform()
-
-
-
diff --git a/UpdateOS-3.1/system/etc/nsswitch.conf b/UpdateOS-3.1/system/etc/nsswitch.conf
deleted file mode 100755
index 21e7735..0000000
--- a/UpdateOS-3.1/system/etc/nsswitch.conf
+++ /dev/null
@@ -1,20 +0,0 @@
-# Begin /etc/nsswitch.conf
-
-passwd: files
-group: files
-shadow: files
-
-publickey: files
-
-#hosts: files dns myhostname
-hosts: files mdns_minimal [NOTFOUND=return] dns myhostname
-networks: files
-
-protocols: files
-services: files
-ethers: files
-rpc: files
-
-netgroup: files
-
-# End /etc/nsswitch.conf
diff --git a/UpdateOS-3.1/system/etc/ssh/sshd_config b/UpdateOS-3.1/system/etc/ssh/sshd_config
deleted file mode 100644
index 45bd81b..0000000
--- a/UpdateOS-3.1/system/etc/ssh/sshd_config
+++ /dev/null
@@ -1,136 +0,0 @@
-# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
-
-# The strategy used for options in the default sshd_config shipped with
-# OpenSSH is to specify options with their default value where
-# possible, but leave them commented. Uncommented options override the
-# default value.
-
-#Port 22
-#AddressFamily any
-#ListenAddress 0.0.0.0
-#ListenAddress ::
-
-# The default requires explicit activation of protocol 1
-#Protocol 2
-
-# HostKey for protocol version 1
-#HostKey /etc/ssh/ssh_host_key
-# HostKeys for protocol version 2
-#HostKey /etc/ssh/ssh_host_rsa_key
-#HostKey /etc/ssh/ssh_host_dsa_key
-#HostKey /etc/ssh/ssh_host_ecdsa_key
-#HostKey /etc/ssh/ssh_host_ed25519_key
-
-# Lifetime and size of ephemeral version 1 server key
-#KeyRegenerationInterval 1h
-#ServerKeyBits 1024
-
-# Ciphers and keying
-#RekeyLimit default none
-
-# Logging
-# obsoletes QuietMode and FascistLogging
-#SyslogFacility AUTH
-#LogLevel INFO
-
-# Authentication:
-
-#LoginGraceTime 2m
-#PermitRootLogin no
-#StrictModes yes
-#MaxAuthTries 6
-#MaxSessions 10
-
-#RSAAuthentication yes
-#PubkeyAuthentication yes
-
-# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
-# but this is overridden so installations will only check .ssh/authorized_keys
-AuthorizedKeysFile .ssh/authorized_keys
-
-#AuthorizedPrincipalsFile none
-
-#AuthorizedKeysCommand none
-#AuthorizedKeysCommandUser nobody
-
-# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
-#RhostsRSAAuthentication no
-# similar for protocol version 2
-#HostbasedAuthentication no
-# Change to yes if you don't trust ~/.ssh/known_hosts for
-# RhostsRSAAuthentication and HostbasedAuthentication
-#IgnoreUserKnownHosts no
-# Don't read the user's ~/.rhosts and ~/.shosts files
-#IgnoreRhosts yes
-
-# To disable tunneled clear text passwords, change to no here!
-#PasswordAuthentication yes
-#PermitEmptyPasswords no
-
-# Change to no to disable s/key passwords
-ChallengeResponseAuthentication no
-
-# Kerberos options
-#KerberosAuthentication no
-#KerberosOrLocalPasswd yes
-#KerberosTicketCleanup yes
-#KerberosGetAFSToken no
-
-# GSSAPI options
-#GSSAPIAuthentication no
-#GSSAPICleanupCredentials yes
-
-# Set this to 'yes' to enable PAM authentication, account processing,
-# and session processing. If this is enabled, PAM authentication will
-# be allowed through the ChallengeResponseAuthentication and
-# PasswordAuthentication. Depending on your PAM configuration,
-# PAM authentication via ChallengeResponseAuthentication may bypass
-# the setting of "PermitRootLogin without-password".
-# If you just want the PAM account and session checks to run without
-# PAM authentication, then enable this but set PasswordAuthentication
-# and ChallengeResponseAuthentication to 'no'.
-UsePAM yes
-
-#AllowAgentForwarding yes
-#AllowTcpForwarding no
-#GatewayPorts no
-#X11Forwarding no
-#X11DisplayOffset 10
-#X11UseLocalhost yes
-#PermitTTY yes
-PrintMotd no # pam does that
-#PrintLastLog yes
-#TCPKeepAlive yes
-#UseLogin no
-UsePrivilegeSeparation sandbox # Default for new installations.
-#PermitUserEnvironment no
-#Compression delayed
-#ClientAliveInterval 0
-#ClientAliveCountMax 3
-#UseDNS no
-#PidFile /run/sshd.pid
-#MaxStartups 10:30:100
-#PermitTunnel no
-#ChrootDirectory none
-#VersionAddendum none
-
-# no default banner path
-#Banner none
-
-# override default of no subsystems
-Subsystem sftp /usr/lib/ssh/sftp-server
-
-# Example of overriding settings on a per-user basis
-#Match User anoncvs
-# X11Forwarding no
-# AllowTcpForwarding no
-# PermitTTY no
-# ForceCommand cvs server
-
-PermitRootLogin yes
-AllowTcpForwarding yes
-X11Forwarding yes
-X11DisplayOffset 10
-X11UseLocalhost yes
-PermitUserEnvironment yes
-
diff --git a/UpdateOS-3.1/system/etc/udev/rules.d/70-wifi-powersave.rules b/UpdateOS-3.1/system/etc/udev/rules.d/70-wifi-powersave.rules
deleted file mode 100644
index a5834d5..0000000
--- a/UpdateOS-3.1/system/etc/udev/rules.d/70-wifi-powersave.rules
+++ /dev/null
@@ -1 +0,0 @@
-ACTION=="add", SUBSYSTEM=="net", KERNEL=="wlan*" RUN+="/usr/bin/iw dev %k set power_save off"
diff --git a/UpdateOS-3.1/system/lib/systemd/system/cherrypy.service b/UpdateOS-3.1/system/lib/systemd/system/cherrypy.service
deleted file mode 100644
index 85ad3cd..0000000
--- a/UpdateOS-3.1/system/lib/systemd/system/cherrypy.service
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=Cherrypy Web Server
-
-[Service]
-Type=simple
-WorkingDirectory=/root/web/server
-ExecStart=/root/web/server/run.sh
-
-[Install]
-WantedBy=multi-user.target
diff --git a/UpdateOS-3.1/system/lib/systemd/system/createap.service b/UpdateOS-3.1/system/lib/systemd/system/createap.service
deleted file mode 100755
index e88b2db..0000000
--- a/UpdateOS-3.1/system/lib/systemd/system/createap.service
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=Create AP Daemon
-
-[Service]
-Type=simple
-WorkingDirectory=/root/
-ExecStart=/root/scripts/start-ap.sh
-
-[Install]
-WantedBy=multi-user.target
diff --git a/UpdateOS-3.1/web/apps/FileManagerOG/app.py b/UpdateOS-3.1/web/apps/FileManagerOG/app.py
deleted file mode 100755
index 0951d9a..0000000
--- a/UpdateOS-3.1/web/apps/FileManagerOG/app.py
+++ /dev/null
@@ -1,116 +0,0 @@
-import os.path
-import time
-import glob
-import json
-import cherrypy
-import urllib
-import time
-import socket
-from cherrypy.lib import static
-import imp
-
-
-current_dir = os.path.dirname(os.path.abspath(__file__))
-
-file_operations = imp.load_source('file_operations', current_dir + '/file_operations.py')
-
-def get_immediate_subdirectories(dir) :
- return [name for name in os.listdir(dir)
- if os.path.isdir(os.path.join(dir, name))]
-
-config = { '/':
- {
- 'tools.staticdir.on': True,
- 'tools.staticdir.dir': current_dir + '/static/',
- 'tools.staticdir.index': 'index.html',
- }
-}
-base = '/files'
-name = 'Patch Manager'
-
-class Root():
-
- def tester(self, name):
- return "TESTdf"
- print "cool"
- tester.exposed = True
-
- def flash(self):
- os.system("oscsend localhost 4001 /led/flash i 4")
- return "done"
- flash.exposed = True
-
- def resync(self):
- os.system("oscsend localhost 4001 /reload i 1")
- return "done"
- resync.exposed = True
-
- def media(self, fpath, cb):
- cherrypy.response.headers['Cache-Control'] = "no-cache, no-store, must-revalidate"
- cherrypy.response.headers['Pragma'] = "no-cache"
- cherrypy.response.headers['Expires'] = "0"
- src = file_operations.BASE_DIR + fpath
- return static.serve_file(src)
- media.exposed = True
-
- def download(self, fpath, cb):
- src = file_operations.BASE_DIR + fpath
- dl = open(src, 'r').read()
- fname = os.path.basename(fpath)
- cherrypy.response.headers['content-type'] = 'application/octet-stream'
- cherrypy.response.headers['content-disposition'] = 'attachment; filename={}'.format(fname)
- return dl
- download.exposed = True
-
- def upload(self, dst, **fdata):
- upload = fdata['files[]']
- folder = dst
- filename = upload.filename
- size = 0
- filepath = file_operations.BASE_DIR + folder + '/' + filename
- filepath = file_operations.check_and_inc_name(filepath)
- with open(filepath, 'wb') as newfile:
- while True:
- data = upload.file.read(8192)
- if not data:
- break
- size += len(data)
- newfile.write(data)
- print "saved file, size: " + str(size)
- p, ext = os.path.splitext(filepath)
- cherrypy.response.headers['Content-Type'] = "application/json"
- return '{"files":[{"name":"x","size":'+str(size)+',"url":"na","thumbnailUrl":"na","deleteUrl":"na","deleteType":"DELETE"}]}'
-
- upload.exposed = True
-
- def fmdata(self, **data):
-
- ret = ''
- if 'operation' in data :
- cherrypy.response.headers['Content-Type'] = "application/json"
- if data['operation'] == 'get_node' :
- return file_operations.get_node(data['path'])
- if data['operation'] == 'create_node' :
- return file_operations.create(data['path'], data['name'])
- if data['operation'] == 'rename_node' :
- return file_operations.rename(data['path'], data['name'])
- if data['operation'] == 'delete_node' :
- return file_operations.delete(data['path'])
- if data['operation'] == 'move_node' :
- return file_operations.move(data['src'], data['dst'])
- if data['operation'] == 'copy_node' :
- return file_operations.copy(data['src'], data['dst'])
- if data['operation'] == 'unzip_node' :
- return file_operations.unzip(data['path'])
- if data['operation'] == 'download_node' :
- return file_operations.download(data['path'])
- if data['operation'] == 'zip_node' :
- return file_operations.zip(data['path'])
-
- else :
- cherrypy.response.headers['Content-Type'] = "application/json"
- return "no operation specified"
-
- fmdata.exposed = True
-
-
diff --git a/UpdateOS-3.1/web/apps/FileManagerOG/file_operations.py b/UpdateOS-3.1/web/apps/FileManagerOG/file_operations.py
deleted file mode 100755
index fc3692f..0000000
--- a/UpdateOS-3.1/web/apps/FileManagerOG/file_operations.py
+++ /dev/null
@@ -1,135 +0,0 @@
-import json
-import os
-import shutil
-import cherrypy
-
-BASE_DIR = "/"
-
-#TODO check all the paths here
-def check_path(path) :
- path = os.path.normpath(path)
- print path
- if path.startswith("/usbdrive") or path.startswith("/sdcard") : return True
- else : return False
-
-def check_and_inc_name(path) :
- newpath = path
- count = 2
- while os.path.isdir(newpath) or os.path.isfile(newpath):
- p, e = os.path.splitext(path)
- newpath = p + " " + str(count) + e
- count += 1
-
- return newpath
-
-#TODO don't return ok if error what the hell
-def rename(old, new):
- src = BASE_DIR + old
- dst = os.path.dirname(src) + '/' + new
- if src != dst :
- dst = check_and_inc_name(dst)
- os.rename(src, dst)
- return '{"ok":"ok"}'
-
-def create(dst, name):
- dst = BASE_DIR + dst + '/' + name
- dst = check_and_inc_name(dst)
- os.mkdir(dst)
- return '{"ok":"ok"}'
-
-def move(src, dst):
- src = BASE_DIR + src
- dst = BASE_DIR + dst + '/' + os.path.basename(src)
- dst = check_and_inc_name(dst)
- shutil.move(src, dst)
- return '{"ok":"ok"}'
-
-def unzip(zip_path):
- zip_path = BASE_DIR + zip_path
- zip_parent_folder =os.path.dirname(zip_path)
- os.system("unzip -o \""+zip_path+"\" -d \""+zip_parent_folder+"\" -x '__MACOSX/*'")
- return '{"ok":"ok"}'
-
-def zip(folder):
- folder = BASE_DIR + folder
- zipname = os.path.basename(folder)+".zip"
- if os.path.isdir(folder) :
- os.system("cd \""+os.path.dirname(folder)+"\" && zip -r \""+zipname+"\" \""+os.path.basename(folder)+"\"")
- return '{"ok":"ok"}'
-
-def copy(src, dst):
- src = BASE_DIR + src
- dst = BASE_DIR + dst
- dst = dst + '/' + os.path.basename(src)
- dst = check_and_inc_name(dst)
- if os.path.isfile(src) :
- shutil.copy(src, dst)
- if os.path.isdir(src) :
- shutil.copytree(src, dst)
- return '{"ok":"ok"}'
-
-def delete(src):
- src = BASE_DIR + src
- if os.path.isfile(src) :
- os.remove(src)
- if os.path.isdir(src) :
- shutil.rmtree(src)
- return '{"ok":"ok"}'
-
-def get_node(fpath):
- if fpath == '#' :
- return get_files(BASE_DIR)
- else :
- fpath = fpath
- return get_files(BASE_DIR + fpath)
-
-def convert_bytes(num):
- for x in ['bytes', 'KB', 'MB', 'GB', 'TB']:
- if num < 1024.0:
- if x == 'bytes' : return "%d %s" % (int(num), x)
- else : return "%3.1f %s" % (num, x)
- num /= 1024.0
-
-def file_to_dict(fpath):
- return {
- 'name': os.path.basename(fpath),
- 'children': False,
- 'type': 'file',
- 'size': str(convert_bytes(os.stat(fpath).st_size)),
- 'path': fpath.split(BASE_DIR,1)[1],
- }
-
-def folder_to_dict(fpath):
- return {
- 'name': os.path.basename(fpath),
- 'children': True,
- 'type': 'folder',
- 'path': fpath.split(BASE_DIR,1)[1],
- }
-
-def get_files(rootpath):
- root, folders, files = os.walk(rootpath).next()
- contents = []
-
- # some reason root is // when rootpath is /, fix it
- if root == "//" : root = "/"
-
- folders = sorted(folders, key=lambda s: s.lower())
- files = sorted(files, key=lambda s: s.lower())
- # add to the list if they are cool
- for folder in folders :
- if not folder[0] == '.' :
- path = os.path.join(root, folder)
- #if check_path(path):
- contents += [folder_to_dict(path)]
-
- for ffile in files :
- if not ffile[0] == '.' :
- path = os.path.join(root, ffile)
- #if check_path(path):
- contents += [file_to_dict(path)]
-
- #print json.dumps(contents, indent=4, encoding='utf-8')
- return json.dumps(contents, indent=4, encoding='utf-8')
-
-
diff --git a/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/bootstrap.min.css b/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/bootstrap.min.css
deleted file mode 100755
index 996a216..0000000
--- a/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/bootstrap.min.css
+++ /dev/null
@@ -1,6 +0,0 @@
-/*!
- * Bootstrap v3.3.7 (http://getbootstrap.com)
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(./fonts/glyphicons-halflings-regular.eot);src:url(./fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(./fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(./fonts/glyphicons-halflings-regular.woff) format('woff'),url(./fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(./fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}
-/*# sourceMappingURL=bootstrap.min.css.map */
diff --git a/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/bootstrap.min.js b/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/bootstrap.min.js
deleted file mode 100755
index 9bcd2fc..0000000
--- a/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/bootstrap.min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*!
- * Bootstrap v3.3.7 (http://getbootstrap.com)
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under the MIT license
- */
-if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.7",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a("#"===f?[]:f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.7",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c).prop(c,!0)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c).prop(c,!1))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target).closest(".btn");b.call(d,"toggle"),a(c.target).is('input[type="radio"], input[type="checkbox"]')||(c.preventDefault(),d.is("input,button")?d.trigger("focus"):d.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(a>this.$items.length-1||a<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.7",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.7",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),!c.isInStateTrue())return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null,a.$element=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.7",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.7",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return e=a-d&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
\ No newline at end of file
diff --git a/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/folder.png b/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/folder.png
deleted file mode 100755
index 201d66a..0000000
Binary files a/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/folder.png and /dev/null differ
diff --git a/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/fonts/glyphicons-halflings-regular.eot b/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/fonts/glyphicons-halflings-regular.eot
deleted file mode 100755
index b93a495..0000000
Binary files a/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/fonts/glyphicons-halflings-regular.eot and /dev/null differ
diff --git a/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/fonts/glyphicons-halflings-regular.svg b/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/fonts/glyphicons-halflings-regular.svg
deleted file mode 100755
index 94fb549..0000000
--- a/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/fonts/glyphicons-halflings-regular.svg
+++ /dev/null
@@ -1,288 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/fonts/glyphicons-halflings-regular.ttf b/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/fonts/glyphicons-halflings-regular.ttf
deleted file mode 100755
index 1413fc6..0000000
Binary files a/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/fonts/glyphicons-halflings-regular.ttf and /dev/null differ
diff --git a/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/fonts/glyphicons-halflings-regular.woff b/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/fonts/glyphicons-halflings-regular.woff
deleted file mode 100755
index 9e61285..0000000
Binary files a/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/fonts/glyphicons-halflings-regular.woff and /dev/null differ
diff --git a/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/fonts/glyphicons-halflings-regular.woff2 b/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/fonts/glyphicons-halflings-regular.woff2
deleted file mode 100755
index 64539b5..0000000
Binary files a/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/fonts/glyphicons-halflings-regular.woff2 and /dev/null differ
diff --git a/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/jplayer.simple.css b/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/jplayer.simple.css
deleted file mode 100755
index 1ebfe6d..0000000
--- a/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/jplayer.simple.css
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Skin for jPlayer Plugin (jQuery JavaScript Library)
- * http://www.jplayer.org
- *
- * Skin Name: Blue Monday
- *
- * Copyright (c) 2010-2012 Happyworm Ltd
- * Dual licensed under the MIT and GPL licenses.
- * - http://www.opensource.org/licenses/mit-license.php
- * - http://www.gnu.org/copyleft/gpl.html
- *
- * Author: Silvia Benvenuti
- * Skin Version: 4.2 (jPlayer 2.2.0)
- * Date: 22nd October 2012
- */
-
-div.jp-audio{
- padding-left: 8px;
- display: inline-block;
-}
-
-div.jp-progress {
- overflow:hidden;
- background-color: #ddd;
-}
-div.jp-audio div.jp-progress {
- height:9px;
-}
-div.jp-audio div.jp-type-single div.jp-progress {
- left:0px;
- width:200px;
- margin-top:6px;
-}
-
-div.jp-seek-bar {
- /*background: url("jplayer.blue.monday.jpg") 0 -202px repeat-x;*/
- background-color: #ccc;
- width:0px;
- height:100%;
- cursor: pointer;
-}
-div.jp-play-bar {
- /*background: url("jplayer.blue.monday.jpg") 0 -218px repeat-x ;*/
- background-color: #3392e3;
- width:0px;
- height:100%;
-}
-div.jp-duration {
- float:left;
-
-}
-
-div.jp-current-time {
- float:left;
- margin-top:4px;
- padding: 4px;
-}
-
-div .jp-pp {
- float:left;
- margin-top: -5px;
-}
-div.jp-pp a {
- padding-right:4px;
-
-}
-
-ul.jp-controls {
- float:left;
- min-width:100px;
-}
-
-/* The seeking class is added/removed inside jPlayer */
-div.jp-seeking-bg {
- background: url("jplayer.blue.monday.seeking.gif");
-}
-
-/* @end */
-
diff --git a/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/jquery.fileupload.js b/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/jquery.fileupload.js
deleted file mode 100755
index 5ff151b..0000000
--- a/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/jquery.fileupload.js
+++ /dev/null
@@ -1,1482 +0,0 @@
-/*
- * jQuery File Upload Plugin
- * https://github.com/blueimp/jQuery-File-Upload
- *
- * Copyright 2010, Sebastian Tschan
- * https://blueimp.net
- *
- * Licensed under the MIT license:
- * https://opensource.org/licenses/MIT
- */
-
-/* jshint nomen:false */
-/* global define, require, window, document, location, Blob, FormData */
-
-;(function (factory) {
- 'use strict';
- if (typeof define === 'function' && define.amd) {
- // Register as an anonymous AMD module:
- define([
- 'jquery',
- 'jquery-ui/ui/widget'
- ], factory);
- } else if (typeof exports === 'object') {
- // Node/CommonJS:
- factory(
- require('jquery'),
- require('./vendor/jquery.ui.widget')
- );
- } else {
- // Browser globals:
- factory(window.jQuery);
- }
-}(function ($) {
- 'use strict';
-
- // Detect file input support, based on
- // http://viljamis.com/blog/2012/file-upload-support-on-mobile/
- $.support.fileInput = !(new RegExp(
- // Handle devices which give false positives for the feature detection:
- '(Android (1\\.[0156]|2\\.[01]))' +
- '|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)' +
- '|(w(eb)?OSBrowser)|(webOS)' +
- '|(Kindle/(1\\.0|2\\.[05]|3\\.0))'
- ).test(window.navigator.userAgent) ||
- // Feature detection for all other devices:
- $('').prop('disabled'));
-
- // The FileReader API is not actually used, but works as feature detection,
- // as some Safari versions (5?) support XHR file uploads via the FormData API,
- // but not non-multipart XHR file uploads.
- // window.XMLHttpRequestUpload is not available on IE10, so we check for
- // window.ProgressEvent instead to detect XHR2 file upload capability:
- $.support.xhrFileUpload = !!(window.ProgressEvent && window.FileReader);
- $.support.xhrFormDataFileUpload = !!window.FormData;
-
- // Detect support for Blob slicing (required for chunked uploads):
- $.support.blobSlice = window.Blob && (Blob.prototype.slice ||
- Blob.prototype.webkitSlice || Blob.prototype.mozSlice);
-
- // Helper function to create drag handlers for dragover/dragenter/dragleave:
- function getDragHandler(type) {
- var isDragOver = type === 'dragover';
- return function (e) {
- e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer;
- var dataTransfer = e.dataTransfer;
- if (dataTransfer && $.inArray('Files', dataTransfer.types) !== -1 &&
- this._trigger(
- type,
- $.Event(type, {delegatedEvent: e})
- ) !== false) {
- e.preventDefault();
- if (isDragOver) {
- dataTransfer.dropEffect = 'copy';
- }
- }
- };
- }
-
- // The fileupload widget listens for change events on file input fields defined
- // via fileInput setting and paste or drop events of the given dropZone.
- // In addition to the default jQuery Widget methods, the fileupload widget
- // exposes the "add" and "send" methods, to add or directly send files using
- // the fileupload API.
- // By default, files added via file input selection, paste, drag & drop or
- // "add" method are uploaded immediately, but it is possible to override
- // the "add" callback option to queue file uploads.
- $.widget('blueimp.fileupload', {
-
- options: {
- // The drop target element(s), by the default the complete document.
- // Set to null to disable drag & drop support:
- dropZone: $(document),
- // The paste target element(s), by the default undefined.
- // Set to a DOM node or jQuery object to enable file pasting:
- pasteZone: undefined,
- // The file input field(s), that are listened to for change events.
- // If undefined, it is set to the file input fields inside
- // of the widget element on plugin initialization.
- // Set to null to disable the change listener.
- fileInput: undefined,
- // By default, the file input field is replaced with a clone after
- // each input field change event. This is required for iframe transport
- // queues and allows change events to be fired for the same file
- // selection, but can be disabled by setting the following option to false:
- replaceFileInput: true,
- // The parameter name for the file form data (the request argument name).
- // If undefined or empty, the name property of the file input field is
- // used, or "files[]" if the file input name property is also empty,
- // can be a string or an array of strings:
- paramName: undefined,
- // By default, each file of a selection is uploaded using an individual
- // request for XHR type uploads. Set to false to upload file
- // selections in one request each:
- singleFileUploads: true,
- // To limit the number of files uploaded with one XHR request,
- // set the following option to an integer greater than 0:
- limitMultiFileUploads: undefined,
- // The following option limits the number of files uploaded with one
- // XHR request to keep the request size under or equal to the defined
- // limit in bytes:
- limitMultiFileUploadSize: undefined,
- // Multipart file uploads add a number of bytes to each uploaded file,
- // therefore the following option adds an overhead for each file used
- // in the limitMultiFileUploadSize configuration:
- limitMultiFileUploadSizeOverhead: 512,
- // Set the following option to true to issue all file upload requests
- // in a sequential order:
- sequentialUploads: false,
- // To limit the number of concurrent uploads,
- // set the following option to an integer greater than 0:
- limitConcurrentUploads: undefined,
- // Set the following option to true to force iframe transport uploads:
- forceIframeTransport: false,
- // Set the following option to the location of a redirect url on the
- // origin server, for cross-domain iframe transport uploads:
- redirect: undefined,
- // The parameter name for the redirect url, sent as part of the form
- // data and set to 'redirect' if this option is empty:
- redirectParamName: undefined,
- // Set the following option to the location of a postMessage window,
- // to enable postMessage transport uploads:
- postMessage: undefined,
- // By default, XHR file uploads are sent as multipart/form-data.
- // The iframe transport is always using multipart/form-data.
- // Set to false to enable non-multipart XHR uploads:
- multipart: true,
- // To upload large files in smaller chunks, set the following option
- // to a preferred maximum chunk size. If set to 0, null or undefined,
- // or the browser does not support the required Blob API, files will
- // be uploaded as a whole.
- maxChunkSize: undefined,
- // When a non-multipart upload or a chunked multipart upload has been
- // aborted, this option can be used to resume the upload by setting
- // it to the size of the already uploaded bytes. This option is most
- // useful when modifying the options object inside of the "add" or
- // "send" callbacks, as the options are cloned for each file upload.
- uploadedBytes: undefined,
- // By default, failed (abort or error) file uploads are removed from the
- // global progress calculation. Set the following option to false to
- // prevent recalculating the global progress data:
- recalculateProgress: true,
- // Interval in milliseconds to calculate and trigger progress events:
- progressInterval: 100,
- // Interval in milliseconds to calculate progress bitrate:
- bitrateInterval: 500,
- // By default, uploads are started automatically when adding files:
- autoUpload: true,
-
- // Error and info messages:
- messages: {
- uploadedBytes: 'Uploaded bytes exceed file size'
- },
-
- // Translation function, gets the message key to be translated
- // and an object with context specific data as arguments:
- i18n: function (message, context) {
- message = this.messages[message] || message.toString();
- if (context) {
- $.each(context, function (key, value) {
- message = message.replace('{' + key + '}', value);
- });
- }
- return message;
- },
-
- // Additional form data to be sent along with the file uploads can be set
- // using this option, which accepts an array of objects with name and
- // value properties, a function returning such an array, a FormData
- // object (for XHR file uploads), or a simple object.
- // The form of the first fileInput is given as parameter to the function:
- formData: function (form) {
- return form.serializeArray();
- },
-
- // The add callback is invoked as soon as files are added to the fileupload
- // widget (via file input selection, drag & drop, paste or add API call).
- // If the singleFileUploads option is enabled, this callback will be
- // called once for each file in the selection for XHR file uploads, else
- // once for each file selection.
- //
- // The upload starts when the submit method is invoked on the data parameter.
- // The data object contains a files property holding the added files
- // and allows you to override plugin options as well as define ajax settings.
- //
- // Listeners for this callback can also be bound the following way:
- // .bind('fileuploadadd', func);
- //
- // data.submit() returns a Promise object and allows to attach additional
- // handlers using jQuery's Deferred callbacks:
- // data.submit().done(func).fail(func).always(func);
- add: function (e, data) {
- if (e.isDefaultPrevented()) {
- return false;
- }
- if (data.autoUpload || (data.autoUpload !== false &&
- $(this).fileupload('option', 'autoUpload'))) {
- data.process().done(function () {
- data.submit();
- });
- }
- },
-
- // Other callbacks:
-
- // Callback for the submit event of each file upload:
- // submit: function (e, data) {}, // .bind('fileuploadsubmit', func);
-
- // Callback for the start of each file upload request:
- // send: function (e, data) {}, // .bind('fileuploadsend', func);
-
- // Callback for successful uploads:
- // done: function (e, data) {}, // .bind('fileuploaddone', func);
-
- // Callback for failed (abort or error) uploads:
- // fail: function (e, data) {}, // .bind('fileuploadfail', func);
-
- // Callback for completed (success, abort or error) requests:
- // always: function (e, data) {}, // .bind('fileuploadalways', func);
-
- // Callback for upload progress events:
- // progress: function (e, data) {}, // .bind('fileuploadprogress', func);
-
- // Callback for global upload progress events:
- // progressall: function (e, data) {}, // .bind('fileuploadprogressall', func);
-
- // Callback for uploads start, equivalent to the global ajaxStart event:
- // start: function (e) {}, // .bind('fileuploadstart', func);
-
- // Callback for uploads stop, equivalent to the global ajaxStop event:
- // stop: function (e) {}, // .bind('fileuploadstop', func);
-
- // Callback for change events of the fileInput(s):
- // change: function (e, data) {}, // .bind('fileuploadchange', func);
-
- // Callback for paste events to the pasteZone(s):
- // paste: function (e, data) {}, // .bind('fileuploadpaste', func);
-
- // Callback for drop events of the dropZone(s):
- // drop: function (e, data) {}, // .bind('fileuploaddrop', func);
-
- // Callback for dragover events of the dropZone(s):
- // dragover: function (e) {}, // .bind('fileuploaddragover', func);
-
- // Callback for the start of each chunk upload request:
- // chunksend: function (e, data) {}, // .bind('fileuploadchunksend', func);
-
- // Callback for successful chunk uploads:
- // chunkdone: function (e, data) {}, // .bind('fileuploadchunkdone', func);
-
- // Callback for failed (abort or error) chunk uploads:
- // chunkfail: function (e, data) {}, // .bind('fileuploadchunkfail', func);
-
- // Callback for completed (success, abort or error) chunk upload requests:
- // chunkalways: function (e, data) {}, // .bind('fileuploadchunkalways', func);
-
- // The plugin options are used as settings object for the ajax calls.
- // The following are jQuery ajax settings required for the file uploads:
- processData: false,
- contentType: false,
- cache: false,
- timeout: 0
- },
-
- // A list of options that require reinitializing event listeners and/or
- // special initialization code:
- _specialOptions: [
- 'fileInput',
- 'dropZone',
- 'pasteZone',
- 'multipart',
- 'forceIframeTransport'
- ],
-
- _blobSlice: $.support.blobSlice && function () {
- var slice = this.slice || this.webkitSlice || this.mozSlice;
- return slice.apply(this, arguments);
- },
-
- _BitrateTimer: function () {
- this.timestamp = ((Date.now) ? Date.now() : (new Date()).getTime());
- this.loaded = 0;
- this.bitrate = 0;
- this.getBitrate = function (now, loaded, interval) {
- var timeDiff = now - this.timestamp;
- if (!this.bitrate || !interval || timeDiff > interval) {
- this.bitrate = (loaded - this.loaded) * (1000 / timeDiff) * 8;
- this.loaded = loaded;
- this.timestamp = now;
- }
- return this.bitrate;
- };
- },
-
- _isXHRUpload: function (options) {
- return !options.forceIframeTransport &&
- ((!options.multipart && $.support.xhrFileUpload) ||
- $.support.xhrFormDataFileUpload);
- },
-
- _getFormData: function (options) {
- var formData;
- if ($.type(options.formData) === 'function') {
- return options.formData(options.form);
- }
- if ($.isArray(options.formData)) {
- return options.formData;
- }
- if ($.type(options.formData) === 'object') {
- formData = [];
- $.each(options.formData, function (name, value) {
- formData.push({name: name, value: value});
- });
- return formData;
- }
- return [];
- },
-
- _getTotal: function (files) {
- var total = 0;
- $.each(files, function (index, file) {
- total += file.size || 1;
- });
- return total;
- },
-
- _initProgressObject: function (obj) {
- var progress = {
- loaded: 0,
- total: 0,
- bitrate: 0
- };
- if (obj._progress) {
- $.extend(obj._progress, progress);
- } else {
- obj._progress = progress;
- }
- },
-
- _initResponseObject: function (obj) {
- var prop;
- if (obj._response) {
- for (prop in obj._response) {
- if (obj._response.hasOwnProperty(prop)) {
- delete obj._response[prop];
- }
- }
- } else {
- obj._response = {};
- }
- },
-
- _onProgress: function (e, data) {
- if (e.lengthComputable) {
- var now = ((Date.now) ? Date.now() : (new Date()).getTime()),
- loaded;
- if (data._time && data.progressInterval &&
- (now - data._time < data.progressInterval) &&
- e.loaded !== e.total) {
- return;
- }
- data._time = now;
- loaded = Math.floor(
- e.loaded / e.total * (data.chunkSize || data._progress.total)
- ) + (data.uploadedBytes || 0);
- // Add the difference from the previously loaded state
- // to the global loaded counter:
- this._progress.loaded += (loaded - data._progress.loaded);
- this._progress.bitrate = this._bitrateTimer.getBitrate(
- now,
- this._progress.loaded,
- data.bitrateInterval
- );
- data._progress.loaded = data.loaded = loaded;
- data._progress.bitrate = data.bitrate = data._bitrateTimer.getBitrate(
- now,
- loaded,
- data.bitrateInterval
- );
- // Trigger a custom progress event with a total data property set
- // to the file size(s) of the current upload and a loaded data
- // property calculated accordingly:
- this._trigger(
- 'progress',
- $.Event('progress', {delegatedEvent: e}),
- data
- );
- // Trigger a global progress event for all current file uploads,
- // including ajax calls queued for sequential file uploads:
- this._trigger(
- 'progressall',
- $.Event('progressall', {delegatedEvent: e}),
- this._progress
- );
- }
- },
-
- _initProgressListener: function (options) {
- var that = this,
- xhr = options.xhr ? options.xhr() : $.ajaxSettings.xhr();
- // Accesss to the native XHR object is required to add event listeners
- // for the upload progress event:
- if (xhr.upload) {
- $(xhr.upload).bind('progress', function (e) {
- var oe = e.originalEvent;
- // Make sure the progress event properties get copied over:
- e.lengthComputable = oe.lengthComputable;
- e.loaded = oe.loaded;
- e.total = oe.total;
- that._onProgress(e, options);
- });
- options.xhr = function () {
- return xhr;
- };
- }
- },
-
- _isInstanceOf: function (type, obj) {
- // Cross-frame instanceof check
- return Object.prototype.toString.call(obj) === '[object ' + type + ']';
- },
-
- _initXHRData: function (options) {
- var that = this,
- formData,
- file = options.files[0],
- // Ignore non-multipart setting if not supported:
- multipart = options.multipart || !$.support.xhrFileUpload,
- paramName = $.type(options.paramName) === 'array' ?
- options.paramName[0] : options.paramName;
- options.headers = $.extend({}, options.headers);
- if (options.contentRange) {
- options.headers['Content-Range'] = options.contentRange;
- }
- if (!multipart || options.blob || !this._isInstanceOf('File', file)) {
- options.headers['Content-Disposition'] = 'attachment; filename="' +
- encodeURI(file.name) + '"';
- }
- if (!multipart) {
- options.contentType = file.type || 'application/octet-stream';
- options.data = options.blob || file;
- } else if ($.support.xhrFormDataFileUpload) {
- if (options.postMessage) {
- // window.postMessage does not allow sending FormData
- // objects, so we just add the File/Blob objects to
- // the formData array and let the postMessage window
- // create the FormData object out of this array:
- formData = this._getFormData(options);
- if (options.blob) {
- formData.push({
- name: paramName,
- value: options.blob
- });
- } else {
- $.each(options.files, function (index, file) {
- formData.push({
- name: ($.type(options.paramName) === 'array' &&
- options.paramName[index]) || paramName,
- value: file
- });
- });
- }
- } else {
- if (that._isInstanceOf('FormData', options.formData)) {
- formData = options.formData;
- } else {
- formData = new FormData();
- $.each(this._getFormData(options), function (index, field) {
- formData.append(field.name, field.value);
- });
- }
- if (options.blob) {
- formData.append(paramName, options.blob, file.name);
- } else {
- $.each(options.files, function (index, file) {
- // This check allows the tests to run with
- // dummy objects:
- if (that._isInstanceOf('File', file) ||
- that._isInstanceOf('Blob', file)) {
- formData.append(
- ($.type(options.paramName) === 'array' &&
- options.paramName[index]) || paramName,
- file,
- file.uploadName || file.name
- );
- }
- });
- }
- }
- options.data = formData;
- }
- // Blob reference is not needed anymore, free memory:
- options.blob = null;
- },
-
- _initIframeSettings: function (options) {
- var targetHost = $('').prop('href', options.url).prop('host');
- // Setting the dataType to iframe enables the iframe transport:
- options.dataType = 'iframe ' + (options.dataType || '');
- // The iframe transport accepts a serialized array as form data:
- options.formData = this._getFormData(options);
- // Add redirect url to form data on cross-domain uploads:
- if (options.redirect && targetHost && targetHost !== location.host) {
- options.formData.push({
- name: options.redirectParamName || 'redirect',
- value: options.redirect
- });
- }
- },
-
- _initDataSettings: function (options) {
- if (this._isXHRUpload(options)) {
- if (!this._chunkedUpload(options, true)) {
- if (!options.data) {
- this._initXHRData(options);
- }
- this._initProgressListener(options);
- }
- if (options.postMessage) {
- // Setting the dataType to postmessage enables the
- // postMessage transport:
- options.dataType = 'postmessage ' + (options.dataType || '');
- }
- } else {
- this._initIframeSettings(options);
- }
- },
-
- _getParamName: function (options) {
- var fileInput = $(options.fileInput),
- paramName = options.paramName;
- if (!paramName) {
- paramName = [];
- fileInput.each(function () {
- var input = $(this),
- name = input.prop('name') || 'files[]',
- i = (input.prop('files') || [1]).length;
- while (i) {
- paramName.push(name);
- i -= 1;
- }
- });
- if (!paramName.length) {
- paramName = [fileInput.prop('name') || 'files[]'];
- }
- } else if (!$.isArray(paramName)) {
- paramName = [paramName];
- }
- return paramName;
- },
-
- _initFormSettings: function (options) {
- // Retrieve missing options from the input field and the
- // associated form, if available:
- if (!options.form || !options.form.length) {
- options.form = $(options.fileInput.prop('form'));
- // If the given file input doesn't have an associated form,
- // use the default widget file input's form:
- if (!options.form.length) {
- options.form = $(this.options.fileInput.prop('form'));
- }
- }
- options.paramName = this._getParamName(options);
- if (!options.url) {
- options.url = options.form.prop('action') || location.href;
- }
- // The HTTP request method must be "POST" or "PUT":
- options.type = (options.type ||
- ($.type(options.form.prop('method')) === 'string' &&
- options.form.prop('method')) || ''
- ).toUpperCase();
- if (options.type !== 'POST' && options.type !== 'PUT' &&
- options.type !== 'PATCH') {
- options.type = 'POST';
- }
- if (!options.formAcceptCharset) {
- options.formAcceptCharset = options.form.attr('accept-charset');
- }
- },
-
- _getAJAXSettings: function (data) {
- var options = $.extend({}, this.options, data);
- this._initFormSettings(options);
- this._initDataSettings(options);
- return options;
- },
-
- // jQuery 1.6 doesn't provide .state(),
- // while jQuery 1.8+ removed .isRejected() and .isResolved():
- _getDeferredState: function (deferred) {
- if (deferred.state) {
- return deferred.state();
- }
- if (deferred.isResolved()) {
- return 'resolved';
- }
- if (deferred.isRejected()) {
- return 'rejected';
- }
- return 'pending';
- },
-
- // Maps jqXHR callbacks to the equivalent
- // methods of the given Promise object:
- _enhancePromise: function (promise) {
- promise.success = promise.done;
- promise.error = promise.fail;
- promise.complete = promise.always;
- return promise;
- },
-
- // Creates and returns a Promise object enhanced with
- // the jqXHR methods abort, success, error and complete:
- _getXHRPromise: function (resolveOrReject, context, args) {
- var dfd = $.Deferred(),
- promise = dfd.promise();
- context = context || this.options.context || promise;
- if (resolveOrReject === true) {
- dfd.resolveWith(context, args);
- } else if (resolveOrReject === false) {
- dfd.rejectWith(context, args);
- }
- promise.abort = dfd.promise;
- return this._enhancePromise(promise);
- },
-
- // Adds convenience methods to the data callback argument:
- _addConvenienceMethods: function (e, data) {
- var that = this,
- getPromise = function (args) {
- return $.Deferred().resolveWith(that, args).promise();
- };
- data.process = function (resolveFunc, rejectFunc) {
- if (resolveFunc || rejectFunc) {
- data._processQueue = this._processQueue =
- (this._processQueue || getPromise([this])).then(
- function () {
- if (data.errorThrown) {
- return $.Deferred()
- .rejectWith(that, [data]).promise();
- }
- return getPromise(arguments);
- }
- ).then(resolveFunc, rejectFunc);
- }
- return this._processQueue || getPromise([this]);
- };
- data.submit = function () {
- if (this.state() !== 'pending') {
- data.jqXHR = this.jqXHR =
- (that._trigger(
- 'submit',
- $.Event('submit', {delegatedEvent: e}),
- this
- ) !== false) && that._onSend(e, this);
- }
- return this.jqXHR || that._getXHRPromise();
- };
- data.abort = function () {
- if (this.jqXHR) {
- return this.jqXHR.abort();
- }
- this.errorThrown = 'abort';
- that._trigger('fail', null, this);
- return that._getXHRPromise(false);
- };
- data.state = function () {
- if (this.jqXHR) {
- return that._getDeferredState(this.jqXHR);
- }
- if (this._processQueue) {
- return that._getDeferredState(this._processQueue);
- }
- };
- data.processing = function () {
- return !this.jqXHR && this._processQueue && that
- ._getDeferredState(this._processQueue) === 'pending';
- };
- data.progress = function () {
- return this._progress;
- };
- data.response = function () {
- return this._response;
- };
- },
-
- // Parses the Range header from the server response
- // and returns the uploaded bytes:
- _getUploadedBytes: function (jqXHR) {
- var range = jqXHR.getResponseHeader('Range'),
- parts = range && range.split('-'),
- upperBytesPos = parts && parts.length > 1 &&
- parseInt(parts[1], 10);
- return upperBytesPos && upperBytesPos + 1;
- },
-
- // Uploads a file in multiple, sequential requests
- // by splitting the file up in multiple blob chunks.
- // If the second parameter is true, only tests if the file
- // should be uploaded in chunks, but does not invoke any
- // upload requests:
- _chunkedUpload: function (options, testOnly) {
- options.uploadedBytes = options.uploadedBytes || 0;
- var that = this,
- file = options.files[0],
- fs = file.size,
- ub = options.uploadedBytes,
- mcs = options.maxChunkSize || fs,
- slice = this._blobSlice,
- dfd = $.Deferred(),
- promise = dfd.promise(),
- jqXHR,
- upload;
- if (!(this._isXHRUpload(options) && slice && (ub || mcs < fs)) ||
- options.data) {
- return false;
- }
- if (testOnly) {
- return true;
- }
- if (ub >= fs) {
- file.error = options.i18n('uploadedBytes');
- return this._getXHRPromise(
- false,
- options.context,
- [null, 'error', file.error]
- );
- }
- // The chunk upload method:
- upload = function () {
- // Clone the options object for each chunk upload:
- var o = $.extend({}, options),
- currentLoaded = o._progress.loaded;
- o.blob = slice.call(
- file,
- ub,
- ub + mcs,
- file.type
- );
- // Store the current chunk size, as the blob itself
- // will be dereferenced after data processing:
- o.chunkSize = o.blob.size;
- // Expose the chunk bytes position range:
- o.contentRange = 'bytes ' + ub + '-' +
- (ub + o.chunkSize - 1) + '/' + fs;
- // Process the upload data (the blob and potential form data):
- that._initXHRData(o);
- // Add progress listeners for this chunk upload:
- that._initProgressListener(o);
- jqXHR = ((that._trigger('chunksend', null, o) !== false && $.ajax(o)) ||
- that._getXHRPromise(false, o.context))
- .done(function (result, textStatus, jqXHR) {
- ub = that._getUploadedBytes(jqXHR) ||
- (ub + o.chunkSize);
- // Create a progress event if no final progress event
- // with loaded equaling total has been triggered
- // for this chunk:
- if (currentLoaded + o.chunkSize - o._progress.loaded) {
- that._onProgress($.Event('progress', {
- lengthComputable: true,
- loaded: ub - o.uploadedBytes,
- total: ub - o.uploadedBytes
- }), o);
- }
- options.uploadedBytes = o.uploadedBytes = ub;
- o.result = result;
- o.textStatus = textStatus;
- o.jqXHR = jqXHR;
- that._trigger('chunkdone', null, o);
- that._trigger('chunkalways', null, o);
- if (ub < fs) {
- // File upload not yet complete,
- // continue with the next chunk:
- upload();
- } else {
- dfd.resolveWith(
- o.context,
- [result, textStatus, jqXHR]
- );
- }
- })
- .fail(function (jqXHR, textStatus, errorThrown) {
- o.jqXHR = jqXHR;
- o.textStatus = textStatus;
- o.errorThrown = errorThrown;
- that._trigger('chunkfail', null, o);
- that._trigger('chunkalways', null, o);
- dfd.rejectWith(
- o.context,
- [jqXHR, textStatus, errorThrown]
- );
- });
- };
- this._enhancePromise(promise);
- promise.abort = function () {
- return jqXHR.abort();
- };
- upload();
- return promise;
- },
-
- _beforeSend: function (e, data) {
- if (this._active === 0) {
- // the start callback is triggered when an upload starts
- // and no other uploads are currently running,
- // equivalent to the global ajaxStart event:
- this._trigger('start');
- // Set timer for global bitrate progress calculation:
- this._bitrateTimer = new this._BitrateTimer();
- // Reset the global progress values:
- this._progress.loaded = this._progress.total = 0;
- this._progress.bitrate = 0;
- }
- // Make sure the container objects for the .response() and
- // .progress() methods on the data object are available
- // and reset to their initial state:
- this._initResponseObject(data);
- this._initProgressObject(data);
- data._progress.loaded = data.loaded = data.uploadedBytes || 0;
- data._progress.total = data.total = this._getTotal(data.files) || 1;
- data._progress.bitrate = data.bitrate = 0;
- this._active += 1;
- // Initialize the global progress values:
- this._progress.loaded += data.loaded;
- this._progress.total += data.total;
- },
-
- _onDone: function (result, textStatus, jqXHR, options) {
- var total = options._progress.total,
- response = options._response;
- if (options._progress.loaded < total) {
- // Create a progress event if no final progress event
- // with loaded equaling total has been triggered:
- this._onProgress($.Event('progress', {
- lengthComputable: true,
- loaded: total,
- total: total
- }), options);
- }
- response.result = options.result = result;
- response.textStatus = options.textStatus = textStatus;
- response.jqXHR = options.jqXHR = jqXHR;
- this._trigger('done', null, options);
- },
-
- _onFail: function (jqXHR, textStatus, errorThrown, options) {
- var response = options._response;
- if (options.recalculateProgress) {
- // Remove the failed (error or abort) file upload from
- // the global progress calculation:
- this._progress.loaded -= options._progress.loaded;
- this._progress.total -= options._progress.total;
- }
- response.jqXHR = options.jqXHR = jqXHR;
- response.textStatus = options.textStatus = textStatus;
- response.errorThrown = options.errorThrown = errorThrown;
- this._trigger('fail', null, options);
- },
-
- _onAlways: function (jqXHRorResult, textStatus, jqXHRorError, options) {
- // jqXHRorResult, textStatus and jqXHRorError are added to the
- // options object via done and fail callbacks
- this._trigger('always', null, options);
- },
-
- _onSend: function (e, data) {
- if (!data.submit) {
- this._addConvenienceMethods(e, data);
- }
- var that = this,
- jqXHR,
- aborted,
- slot,
- pipe,
- options = that._getAJAXSettings(data),
- send = function () {
- that._sending += 1;
- // Set timer for bitrate progress calculation:
- options._bitrateTimer = new that._BitrateTimer();
- jqXHR = jqXHR || (
- ((aborted || that._trigger(
- 'send',
- $.Event('send', {delegatedEvent: e}),
- options
- ) === false) &&
- that._getXHRPromise(false, options.context, aborted)) ||
- that._chunkedUpload(options) || $.ajax(options)
- ).done(function (result, textStatus, jqXHR) {
- that._onDone(result, textStatus, jqXHR, options);
- }).fail(function (jqXHR, textStatus, errorThrown) {
- that._onFail(jqXHR, textStatus, errorThrown, options);
- }).always(function (jqXHRorResult, textStatus, jqXHRorError) {
- that._onAlways(
- jqXHRorResult,
- textStatus,
- jqXHRorError,
- options
- );
- that._sending -= 1;
- that._active -= 1;
- if (options.limitConcurrentUploads &&
- options.limitConcurrentUploads > that._sending) {
- // Start the next queued upload,
- // that has not been aborted:
- var nextSlot = that._slots.shift();
- while (nextSlot) {
- if (that._getDeferredState(nextSlot) === 'pending') {
- nextSlot.resolve();
- break;
- }
- nextSlot = that._slots.shift();
- }
- }
- if (that._active === 0) {
- // The stop callback is triggered when all uploads have
- // been completed, equivalent to the global ajaxStop event:
- that._trigger('stop');
- }
- });
- return jqXHR;
- };
- this._beforeSend(e, options);
- if (this.options.sequentialUploads ||
- (this.options.limitConcurrentUploads &&
- this.options.limitConcurrentUploads <= this._sending)) {
- if (this.options.limitConcurrentUploads > 1) {
- slot = $.Deferred();
- this._slots.push(slot);
- pipe = slot.then(send);
- } else {
- this._sequence = this._sequence.then(send, send);
- pipe = this._sequence;
- }
- // Return the piped Promise object, enhanced with an abort method,
- // which is delegated to the jqXHR object of the current upload,
- // and jqXHR callbacks mapped to the equivalent Promise methods:
- pipe.abort = function () {
- aborted = [undefined, 'abort', 'abort'];
- if (!jqXHR) {
- if (slot) {
- slot.rejectWith(options.context, aborted);
- }
- return send();
- }
- return jqXHR.abort();
- };
- return this._enhancePromise(pipe);
- }
- return send();
- },
-
- _onAdd: function (e, data) {
- var that = this,
- result = true,
- options = $.extend({}, this.options, data),
- files = data.files,
- filesLength = files.length,
- limit = options.limitMultiFileUploads,
- limitSize = options.limitMultiFileUploadSize,
- overhead = options.limitMultiFileUploadSizeOverhead,
- batchSize = 0,
- paramName = this._getParamName(options),
- paramNameSet,
- paramNameSlice,
- fileSet,
- i,
- j = 0;
- if (!filesLength) {
- return false;
- }
- if (limitSize && files[0].size === undefined) {
- limitSize = undefined;
- }
- if (!(options.singleFileUploads || limit || limitSize) ||
- !this._isXHRUpload(options)) {
- fileSet = [files];
- paramNameSet = [paramName];
- } else if (!(options.singleFileUploads || limitSize) && limit) {
- fileSet = [];
- paramNameSet = [];
- for (i = 0; i < filesLength; i += limit) {
- fileSet.push(files.slice(i, i + limit));
- paramNameSlice = paramName.slice(i, i + limit);
- if (!paramNameSlice.length) {
- paramNameSlice = paramName;
- }
- paramNameSet.push(paramNameSlice);
- }
- } else if (!options.singleFileUploads && limitSize) {
- fileSet = [];
- paramNameSet = [];
- for (i = 0; i < filesLength; i = i + 1) {
- batchSize += files[i].size + overhead;
- if (i + 1 === filesLength ||
- ((batchSize + files[i + 1].size + overhead) > limitSize) ||
- (limit && i + 1 - j >= limit)) {
- fileSet.push(files.slice(j, i + 1));
- paramNameSlice = paramName.slice(j, i + 1);
- if (!paramNameSlice.length) {
- paramNameSlice = paramName;
- }
- paramNameSet.push(paramNameSlice);
- j = i + 1;
- batchSize = 0;
- }
- }
- } else {
- paramNameSet = paramName;
- }
- data.originalFiles = files;
- $.each(fileSet || files, function (index, element) {
- var newData = $.extend({}, data);
- newData.files = fileSet ? element : [element];
- newData.paramName = paramNameSet[index];
- that._initResponseObject(newData);
- that._initProgressObject(newData);
- that._addConvenienceMethods(e, newData);
- result = that._trigger(
- 'add',
- $.Event('add', {delegatedEvent: e}),
- newData
- );
- return result;
- });
- return result;
- },
-
- _replaceFileInput: function (data) {
- var input = data.fileInput,
- inputClone = input.clone(true),
- restoreFocus = input.is(document.activeElement);
- // Add a reference for the new cloned file input to the data argument:
- data.fileInputClone = inputClone;
- $('').append(inputClone)[0].reset();
- // Detaching allows to insert the fileInput on another form
- // without loosing the file input value:
- input.after(inputClone).detach();
- // If the fileInput had focus before it was detached,
- // restore focus to the inputClone.
- if (restoreFocus) {
- inputClone.focus();
- }
- // Avoid memory leaks with the detached file input:
- $.cleanData(input.unbind('remove'));
- // Replace the original file input element in the fileInput
- // elements set with the clone, which has been copied including
- // event handlers:
- this.options.fileInput = this.options.fileInput.map(function (i, el) {
- if (el === input[0]) {
- return inputClone[0];
- }
- return el;
- });
- // If the widget has been initialized on the file input itself,
- // override this.element with the file input clone:
- if (input[0] === this.element[0]) {
- this.element = inputClone;
- }
- },
-
- _handleFileTreeEntry: function (entry, path) {
- var that = this,
- dfd = $.Deferred(),
- entries = [],
- dirReader,
- errorHandler = function (e) {
- if (e && !e.entry) {
- e.entry = entry;
- }
- // Since $.when returns immediately if one
- // Deferred is rejected, we use resolve instead.
- // This allows valid files and invalid items
- // to be returned together in one set:
- dfd.resolve([e]);
- },
- successHandler = function (entries) {
- that._handleFileTreeEntries(
- entries,
- path + entry.name + '/'
- ).done(function (files) {
- dfd.resolve(files);
- }).fail(errorHandler);
- },
- readEntries = function () {
- dirReader.readEntries(function (results) {
- if (!results.length) {
- successHandler(entries);
- } else {
- entries = entries.concat(results);
- readEntries();
- }
- }, errorHandler);
- };
- path = path || '';
- if (entry.isFile) {
- if (entry._file) {
- // Workaround for Chrome bug #149735
- entry._file.relativePath = path;
- dfd.resolve(entry._file);
- } else {
- entry.file(function (file) {
- file.relativePath = path;
- dfd.resolve(file);
- }, errorHandler);
- }
- } else if (entry.isDirectory) {
- dirReader = entry.createReader();
- readEntries();
- } else {
- // Return an empy list for file system items
- // other than files or directories:
- dfd.resolve([]);
- }
- return dfd.promise();
- },
-
- _handleFileTreeEntries: function (entries, path) {
- var that = this;
- return $.when.apply(
- $,
- $.map(entries, function (entry) {
- return that._handleFileTreeEntry(entry, path);
- })
- ).then(function () {
- return Array.prototype.concat.apply(
- [],
- arguments
- );
- });
- },
-
- _getDroppedFiles: function (dataTransfer) {
- dataTransfer = dataTransfer || {};
- var items = dataTransfer.items;
- if (items && items.length && (items[0].webkitGetAsEntry ||
- items[0].getAsEntry)) {
- return this._handleFileTreeEntries(
- $.map(items, function (item) {
- var entry;
- if (item.webkitGetAsEntry) {
- entry = item.webkitGetAsEntry();
- if (entry) {
- // Workaround for Chrome bug #149735:
- entry._file = item.getAsFile();
- }
- return entry;
- }
- return item.getAsEntry();
- })
- );
- }
- return $.Deferred().resolve(
- $.makeArray(dataTransfer.files)
- ).promise();
- },
-
- _getSingleFileInputFiles: function (fileInput) {
- fileInput = $(fileInput);
- var entries = fileInput.prop('webkitEntries') ||
- fileInput.prop('entries'),
- files,
- value;
- if (entries && entries.length) {
- return this._handleFileTreeEntries(entries);
- }
- files = $.makeArray(fileInput.prop('files'));
- if (!files.length) {
- value = fileInput.prop('value');
- if (!value) {
- return $.Deferred().resolve([]).promise();
- }
- // If the files property is not available, the browser does not
- // support the File API and we add a pseudo File object with
- // the input value as name with path information removed:
- files = [{name: value.replace(/^.*\\/, '')}];
- } else if (files[0].name === undefined && files[0].fileName) {
- // File normalization for Safari 4 and Firefox 3:
- $.each(files, function (index, file) {
- file.name = file.fileName;
- file.size = file.fileSize;
- });
- }
- return $.Deferred().resolve(files).promise();
- },
-
- _getFileInputFiles: function (fileInput) {
- if (!(fileInput instanceof $) || fileInput.length === 1) {
- return this._getSingleFileInputFiles(fileInput);
- }
- return $.when.apply(
- $,
- $.map(fileInput, this._getSingleFileInputFiles)
- ).then(function () {
- return Array.prototype.concat.apply(
- [],
- arguments
- );
- });
- },
-
- _onChange: function (e) {
- var that = this,
- data = {
- fileInput: $(e.target),
- form: $(e.target.form)
- };
- this._getFileInputFiles(data.fileInput).always(function (files) {
- data.files = files;
- if (that.options.replaceFileInput) {
- that._replaceFileInput(data);
- }
- if (that._trigger(
- 'change',
- $.Event('change', {delegatedEvent: e}),
- data
- ) !== false) {
- that._onAdd(e, data);
- }
- });
- },
-
- _onPaste: function (e) {
- var items = e.originalEvent && e.originalEvent.clipboardData &&
- e.originalEvent.clipboardData.items,
- data = {files: []};
- if (items && items.length) {
- $.each(items, function (index, item) {
- var file = item.getAsFile && item.getAsFile();
- if (file) {
- data.files.push(file);
- }
- });
- if (this._trigger(
- 'paste',
- $.Event('paste', {delegatedEvent: e}),
- data
- ) !== false) {
- this._onAdd(e, data);
- }
- }
- },
-
- _onDrop: function (e) {
- e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer;
- var that = this,
- dataTransfer = e.dataTransfer,
- data = {};
- if (dataTransfer && dataTransfer.files && dataTransfer.files.length) {
- e.preventDefault();
- this._getDroppedFiles(dataTransfer).always(function (files) {
- data.files = files;
- if (that._trigger(
- 'drop',
- $.Event('drop', {delegatedEvent: e}),
- data
- ) !== false) {
- that._onAdd(e, data);
- }
- });
- }
- },
-
- _onDragOver: getDragHandler('dragover'),
-
- _onDragEnter: getDragHandler('dragenter'),
-
- _onDragLeave: getDragHandler('dragleave'),
-
- _initEventHandlers: function () {
- if (this._isXHRUpload(this.options)) {
- this._on(this.options.dropZone, {
- dragover: this._onDragOver,
- drop: this._onDrop,
- // event.preventDefault() on dragenter is required for IE10+:
- dragenter: this._onDragEnter,
- // dragleave is not required, but added for completeness:
- dragleave: this._onDragLeave
- });
- this._on(this.options.pasteZone, {
- paste: this._onPaste
- });
- }
- if ($.support.fileInput) {
- this._on(this.options.fileInput, {
- change: this._onChange
- });
- }
- },
-
- _destroyEventHandlers: function () {
- this._off(this.options.dropZone, 'dragenter dragleave dragover drop');
- this._off(this.options.pasteZone, 'paste');
- this._off(this.options.fileInput, 'change');
- },
-
- _destroy: function () {
- this._destroyEventHandlers();
- },
-
- _setOption: function (key, value) {
- var reinit = $.inArray(key, this._specialOptions) !== -1;
- if (reinit) {
- this._destroyEventHandlers();
- }
- this._super(key, value);
- if (reinit) {
- this._initSpecialOptions();
- this._initEventHandlers();
- }
- },
-
- _initSpecialOptions: function () {
- var options = this.options;
- if (options.fileInput === undefined) {
- options.fileInput = this.element.is('input[type="file"]') ?
- this.element : this.element.find('input[type="file"]');
- } else if (!(options.fileInput instanceof $)) {
- options.fileInput = $(options.fileInput);
- }
- if (!(options.dropZone instanceof $)) {
- options.dropZone = $(options.dropZone);
- }
- if (!(options.pasteZone instanceof $)) {
- options.pasteZone = $(options.pasteZone);
- }
- },
-
- _getRegExp: function (str) {
- var parts = str.split('/'),
- modifiers = parts.pop();
- parts.shift();
- return new RegExp(parts.join('/'), modifiers);
- },
-
- _isRegExpOption: function (key, value) {
- return key !== 'url' && $.type(value) === 'string' &&
- /^\/.*\/[igm]{0,3}$/.test(value);
- },
-
- _initDataAttributes: function () {
- var that = this,
- options = this.options,
- data = this.element.data();
- // Initialize options set via HTML5 data-attributes:
- $.each(
- this.element[0].attributes,
- function (index, attr) {
- var key = attr.name.toLowerCase(),
- value;
- if (/^data-/.test(key)) {
- // Convert hyphen-ated key to camelCase:
- key = key.slice(5).replace(/-[a-z]/g, function (str) {
- return str.charAt(1).toUpperCase();
- });
- value = data[key];
- if (that._isRegExpOption(key, value)) {
- value = that._getRegExp(value);
- }
- options[key] = value;
- }
- }
- );
- },
-
- _create: function () {
- this._initDataAttributes();
- this._initSpecialOptions();
- this._slots = [];
- this._sequence = this._getXHRPromise(true);
- this._sending = this._active = 0;
- this._initProgressObject(this);
- this._initEventHandlers();
- },
-
- // This method is exposed to the widget API and allows to query
- // the number of active uploads:
- active: function () {
- return this._active;
- },
-
- // This method is exposed to the widget API and allows to query
- // the widget upload progress.
- // It returns an object with loaded, total and bitrate properties
- // for the running uploads:
- progress: function () {
- return this._progress;
- },
-
- // This method is exposed to the widget API and allows adding files
- // using the fileupload API. The data parameter accepts an object which
- // must have a files property and can contain additional options:
- // .fileupload('add', {files: filesList});
- add: function (data) {
- var that = this;
- if (!data || this.options.disabled) {
- return;
- }
- if (data.fileInput && !data.files) {
- this._getFileInputFiles(data.fileInput).always(function (files) {
- data.files = files;
- that._onAdd(null, data);
- });
- } else {
- data.files = $.makeArray(data.files);
- this._onAdd(null, data);
- }
- },
-
- // This method is exposed to the widget API and allows sending files
- // using the fileupload API. The data parameter accepts an object which
- // must have a files or fileInput property and can contain additional options:
- // .fileupload('send', {files: filesList});
- // The method returns a Promise object for the file upload call.
- send: function (data) {
- if (data && !this.options.disabled) {
- if (data.fileInput && !data.files) {
- var that = this,
- dfd = $.Deferred(),
- promise = dfd.promise(),
- jqXHR,
- aborted;
- promise.abort = function () {
- aborted = true;
- if (jqXHR) {
- return jqXHR.abort();
- }
- dfd.reject(null, 'abort', 'abort');
- return promise;
- };
- this._getFileInputFiles(data.fileInput).always(
- function (files) {
- if (aborted) {
- return;
- }
- if (!files.length) {
- dfd.reject();
- return;
- }
- data.files = files;
- jqXHR = that._onSend(null, data);
- jqXHR.then(
- function (result, textStatus, jqXHR) {
- dfd.resolve(result, textStatus, jqXHR);
- },
- function (jqXHR, textStatus, errorThrown) {
- dfd.reject(jqXHR, textStatus, errorThrown);
- }
- );
- }
- );
- return this._enhancePromise(promise);
- }
- data.files = $.makeArray(data.files);
- if (data.files.length) {
- return this._onSend(null, data);
- }
- }
- return this._getXHRPromise(false, data && data.context);
- }
-
- });
-
-}));
diff --git a/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/jquery.jplayer.js b/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/jquery.jplayer.js
deleted file mode 100755
index 842f31b..0000000
--- a/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/jquery.jplayer.js
+++ /dev/null
@@ -1,3506 +0,0 @@
-/*
- * jPlayer Plugin for jQuery JavaScript Library
- * http://www.jplayer.org
- *
- * Copyright (c) 2009 - 2014 Happyworm Ltd
- * Licensed under the MIT license.
- * http://opensource.org/licenses/MIT
- *
- * Author: Mark J Panaghiston
- * Version: 2.9.2
- * Date: 14th December 2014
- */
-
-/* Support for Zepto 1.0 compiled with optional data module.
- * For AMD or NODE/CommonJS support, you will need to manually switch the related 2 lines in the code below.
- * Search terms: "jQuery Switch" and "Zepto Switch"
- */
-
-(function (root, factory) {
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(['jquery'], factory); // jQuery Switch
- // define(['zepto'], factory); // Zepto Switch
- } else if (typeof exports === 'object') {
- // Node/CommonJS
- factory(require('jquery')); // jQuery Switch
- //factory(require('zepto')); // Zepto Switch
- } else {
- // Browser globals
- if(root.jQuery) { // Use jQuery if available
- factory(root.jQuery);
- } else { // Otherwise, use Zepto
- factory(root.Zepto);
- }
- }
-}(this, function ($, undefined) {
-
- // Adapted from jquery.ui.widget.js (1.8.7): $.widget.bridge - Tweaked $.data(this,XYZ) to $(this).data(XYZ) for Zepto
- $.fn.jPlayer = function( options ) {
- var name = "jPlayer";
- var isMethodCall = typeof options === "string",
- args = Array.prototype.slice.call( arguments, 1 ),
- returnValue = this;
-
- // allow multiple hashes to be passed on init
- options = !isMethodCall && args.length ?
- $.extend.apply( null, [ true, options ].concat(args) ) :
- options;
-
- // prevent calls to internal methods
- if ( isMethodCall && options.charAt( 0 ) === "_" ) {
- return returnValue;
- }
-
- if ( isMethodCall ) {
- this.each(function() {
- var instance = $(this).data( name ),
- methodValue = instance && $.isFunction( instance[options] ) ?
- instance[ options ].apply( instance, args ) :
- instance;
- if ( methodValue !== instance && methodValue !== undefined ) {
- returnValue = methodValue;
- return false;
- }
- });
- } else {
- this.each(function() {
- var instance = $(this).data( name );
- if ( instance ) {
- // instance.option( options || {} )._init(); // Orig jquery.ui.widget.js code: Not recommend for jPlayer. ie., Applying new options to an existing instance (via the jPlayer constructor) and performing the _init(). The _init() is what concerns me. It would leave a lot of event handlers acting on jPlayer instance and the interface.
- instance.option( options || {} ); // The new constructor only changes the options. Changing options only has basic support atm.
- } else {
- $(this).data( name, new $.jPlayer( options, this ) );
- }
- });
- }
-
- return returnValue;
- };
-
- $.jPlayer = function( options, element ) {
- // allow instantiation without initializing for simple inheritance
- if ( arguments.length ) {
- this.element = $(element);
- this.options = $.extend(true, {},
- this.options,
- options
- );
- var self = this;
- this.element.bind( "remove.jPlayer", function() {
- self.destroy();
- });
- this._init();
- }
- };
- // End of: (Adapted from jquery.ui.widget.js (1.8.7))
-
- // Zepto is missing one of the animation methods.
- if(typeof $.fn.stop !== 'function') {
- $.fn.stop = function() {};
- }
-
- // Emulated HTML5 methods and properties
- $.jPlayer.emulateMethods = "load play pause";
- $.jPlayer.emulateStatus = "src readyState networkState currentTime duration paused ended playbackRate";
- $.jPlayer.emulateOptions = "muted volume";
-
- // Reserved event names generated by jPlayer that are not part of the HTML5 Media element spec
- $.jPlayer.reservedEvent = "ready flashreset resize repeat error warning";
-
- // Events generated by jPlayer
- $.jPlayer.event = {};
- $.each(
- [
- 'ready',
- 'setmedia', // Fires when the media is set
- 'flashreset', // Similar to the ready event if the Flash solution is set to display:none and then shown again or if it's reloaded for another reason by the browser. For example, using CSS position:fixed on Firefox for the full screen feature.
- 'resize', // Occurs when the size changes through a full/restore screen operation or if the size/sizeFull options are changed.
- 'repeat', // Occurs when the repeat status changes. Usually through clicks on the repeat button of the interface.
- 'click', // Occurs when the user clicks on one of the following: poster image, html video, flash video.
- 'error', // Event error code in event.jPlayer.error.type. See $.jPlayer.error
- 'warning', // Event warning code in event.jPlayer.warning.type. See $.jPlayer.warning
-
- // Other events match HTML5 spec.
- 'loadstart',
- 'progress',
- 'suspend',
- 'abort',
- 'emptied',
- 'stalled',
- 'play',
- 'pause',
- 'loadedmetadata',
- 'loadeddata',
- 'waiting',
- 'playing',
- 'canplay',
- 'canplaythrough',
- 'seeking',
- 'seeked',
- 'timeupdate',
- 'ended',
- 'ratechange',
- 'durationchange',
- 'volumechange'
- ],
- function() {
- $.jPlayer.event[ this ] = 'jPlayer_' + this;
- }
- );
-
- $.jPlayer.htmlEvent = [ // These HTML events are bubbled through to the jPlayer event, without any internal action.
- "loadstart",
- // "progress", // jPlayer uses internally before bubbling.
- // "suspend", // jPlayer uses internally before bubbling.
- "abort",
- // "error", // jPlayer uses internally before bubbling.
- "emptied",
- "stalled",
- // "play", // jPlayer uses internally before bubbling.
- // "pause", // jPlayer uses internally before bubbling.
- "loadedmetadata",
- // "loadeddata", // jPlayer uses internally before bubbling.
- // "waiting", // jPlayer uses internally before bubbling.
- // "playing", // jPlayer uses internally before bubbling.
- "canplay",
- "canplaythrough"
- // "seeking", // jPlayer uses internally before bubbling.
- // "seeked", // jPlayer uses internally before bubbling.
- // "timeupdate", // jPlayer uses internally before bubbling.
- // "ended", // jPlayer uses internally before bubbling.
- // "ratechange" // jPlayer uses internally before bubbling.
- // "durationchange" // jPlayer uses internally before bubbling.
- // "volumechange" // jPlayer uses internally before bubbling.
- ];
-
- $.jPlayer.pause = function() {
- $.jPlayer.prototype.destroyRemoved();
- $.each($.jPlayer.prototype.instances, function(i, element) {
- if(element.data("jPlayer").status.srcSet) { // Check that media is set otherwise would cause error event.
- element.jPlayer("pause");
- }
- });
- };
-
- // Default for jPlayer option.timeFormat
- $.jPlayer.timeFormat = {
- showHour: false,
- showMin: true,
- showSec: true,
- padHour: false,
- padMin: true,
- padSec: true,
- sepHour: ":",
- sepMin: ":",
- sepSec: ""
- };
- var ConvertTime = function() {
- this.init();
- };
- ConvertTime.prototype = {
- init: function() {
- this.options = {
- timeFormat: $.jPlayer.timeFormat
- };
- },
- time: function(s) { // function used on jPlayer.prototype._convertTime to enable per instance options.
- s = (s && typeof s === 'number') ? s : 0;
-
- var myTime = new Date(s * 1000),
- hour = myTime.getUTCHours(),
- min = this.options.timeFormat.showHour ? myTime.getUTCMinutes() : myTime.getUTCMinutes() + hour * 60,
- sec = this.options.timeFormat.showMin ? myTime.getUTCSeconds() : myTime.getUTCSeconds() + min * 60,
- strHour = (this.options.timeFormat.padHour && hour < 10) ? "0" + hour : hour,
- strMin = (this.options.timeFormat.padMin && min < 10) ? "0" + min : min,
- strSec = (this.options.timeFormat.padSec && sec < 10) ? "0" + sec : sec,
- strTime = "";
-
- strTime += this.options.timeFormat.showHour ? strHour + this.options.timeFormat.sepHour : "";
- strTime += this.options.timeFormat.showMin ? strMin + this.options.timeFormat.sepMin : "";
- strTime += this.options.timeFormat.showSec ? strSec + this.options.timeFormat.sepSec : "";
-
- return strTime;
- }
- };
- var myConvertTime = new ConvertTime();
- $.jPlayer.convertTime = function(s) {
- return myConvertTime.time(s);
- };
-
- // Adapting jQuery 1.4.4 code for jQuery.browser. Required since jQuery 1.3.2 does not detect Chrome as webkit.
- $.jPlayer.uaBrowser = function( userAgent ) {
- var ua = userAgent.toLowerCase();
-
- // Useragent RegExp
- var rwebkit = /(webkit)[ \/]([\w.]+)/;
- var ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/;
- var rmsie = /(msie) ([\w.]+)/;
- var rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/;
-
- var match = rwebkit.exec( ua ) ||
- ropera.exec( ua ) ||
- rmsie.exec( ua ) ||
- ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
- [];
-
- return { browser: match[1] || "", version: match[2] || "0" };
- };
-
- // Platform sniffer for detecting mobile devices
- $.jPlayer.uaPlatform = function( userAgent ) {
- var ua = userAgent.toLowerCase();
-
- // Useragent RegExp
- var rplatform = /(ipad|iphone|ipod|android|blackberry|playbook|windows ce|webos)/;
- var rtablet = /(ipad|playbook)/;
- var randroid = /(android)/;
- var rmobile = /(mobile)/;
-
- var platform = rplatform.exec( ua ) || [];
- var tablet = rtablet.exec( ua ) ||
- !rmobile.exec( ua ) && randroid.exec( ua ) ||
- [];
-
- if(platform[1]) {
- platform[1] = platform[1].replace(/\s/g, "_"); // Change whitespace to underscore. Enables dot notation.
- }
-
- return { platform: platform[1] || "", tablet: tablet[1] || "" };
- };
-
- $.jPlayer.browser = {
- };
- $.jPlayer.platform = {
- };
-
- var browserMatch = $.jPlayer.uaBrowser(navigator.userAgent);
- if ( browserMatch.browser ) {
- $.jPlayer.browser[ browserMatch.browser ] = true;
- $.jPlayer.browser.version = browserMatch.version;
- }
- var platformMatch = $.jPlayer.uaPlatform(navigator.userAgent);
- if ( platformMatch.platform ) {
- $.jPlayer.platform[ platformMatch.platform ] = true;
- $.jPlayer.platform.mobile = !platformMatch.tablet;
- $.jPlayer.platform.tablet = !!platformMatch.tablet;
- }
-
- // Internet Explorer (IE) Browser Document Mode Sniffer. Based on code at:
- // http://msdn.microsoft.com/en-us/library/cc288325%28v=vs.85%29.aspx#GetMode
- $.jPlayer.getDocMode = function() {
- var docMode;
- if ($.jPlayer.browser.msie) {
- if (document.documentMode) { // IE8 or later
- docMode = document.documentMode;
- } else { // IE 5-7
- docMode = 5; // Assume quirks mode unless proven otherwise
- if (document.compatMode) {
- if (document.compatMode === "CSS1Compat") {
- docMode = 7; // standards mode
- }
- }
- }
- }
- return docMode;
- };
- $.jPlayer.browser.documentMode = $.jPlayer.getDocMode();
-
- $.jPlayer.nativeFeatures = {
- init: function() {
-
- /* Fullscreen function naming influenced by W3C naming.
- * No support for: Mozilla Proposal: https://wiki.mozilla.org/Gecko:FullScreenAPI
- */
-
- var d = document,
- v = d.createElement('video'),
- spec = {
- // http://www.w3.org/TR/fullscreen/
- w3c: [
- 'fullscreenEnabled',
- 'fullscreenElement',
- 'requestFullscreen',
- 'exitFullscreen',
- 'fullscreenchange',
- 'fullscreenerror'
- ],
- // https://developer.mozilla.org/en-US/docs/DOM/Using_fullscreen_mode
- moz: [
- 'mozFullScreenEnabled',
- 'mozFullScreenElement',
- 'mozRequestFullScreen',
- 'mozCancelFullScreen',
- 'mozfullscreenchange',
- 'mozfullscreenerror'
- ],
- // http://developer.apple.com/library/safari/#documentation/WebKit/Reference/ElementClassRef/Element/Element.html
- // http://developer.apple.com/library/safari/#documentation/UserExperience/Reference/DocumentAdditionsReference/DocumentAdditions/DocumentAdditions.html
- webkit: [
- '',
- 'webkitCurrentFullScreenElement',
- 'webkitRequestFullScreen',
- 'webkitCancelFullScreen',
- 'webkitfullscreenchange',
- ''
- ],
- // http://developer.apple.com/library/safari/#documentation/AudioVideo/Reference/HTMLVideoElementClassReference/HTMLVideoElement/HTMLVideoElement.html
- // https://developer.apple.com/library/safari/samplecode/HTML5VideoEventFlow/Listings/events_js.html#//apple_ref/doc/uid/DTS40010085-events_js-DontLinkElementID_5
- // Events: 'webkitbeginfullscreen' and 'webkitendfullscreen'
- webkitVideo: [
- 'webkitSupportsFullscreen',
- 'webkitDisplayingFullscreen',
- 'webkitEnterFullscreen',
- 'webkitExitFullscreen',
- '',
- ''
- ],
- ms: [
- '',
- 'msFullscreenElement',
- 'msRequestFullscreen',
- 'msExitFullscreen',
- 'MSFullscreenChange',
- 'MSFullscreenError'
- ]
- },
- specOrder = [
- 'w3c',
- 'moz',
- 'webkit',
- 'webkitVideo',
- 'ms'
- ],
- fs, i, il;
-
- this.fullscreen = fs = {
- support: {
- w3c: !!d[spec.w3c[0]],
- moz: !!d[spec.moz[0]],
- webkit: typeof d[spec.webkit[3]] === 'function',
- webkitVideo: typeof v[spec.webkitVideo[2]] === 'function',
- ms: typeof v[spec.ms[2]] === 'function'
- },
- used: {}
- };
-
- // Store the name of the spec being used and as a handy boolean.
- for(i = 0, il = specOrder.length; i < il; i++) {
- var n = specOrder[i];
- if(fs.support[n]) {
- fs.spec = n;
- fs.used[n] = true;
- break;
- }
- }
-
- if(fs.spec) {
- var s = spec[fs.spec];
- fs.api = {
- fullscreenEnabled: true,
- fullscreenElement: function(elem) {
- elem = elem ? elem : d; // Video element required for webkitVideo
- return elem[s[1]];
- },
- requestFullscreen: function(elem) {
- return elem[s[2]](); // Chrome and Opera want parameter (Element.ALLOW_KEYBOARD_INPUT) but Safari fails if flag used.
- },
- exitFullscreen: function(elem) {
- elem = elem ? elem : d; // Video element required for webkitVideo
- return elem[s[3]]();
- }
- };
- fs.event = {
- fullscreenchange: s[4],
- fullscreenerror: s[5]
- };
- } else {
- fs.api = {
- fullscreenEnabled: false,
- fullscreenElement: function() {
- return null;
- },
- requestFullscreen: function() {},
- exitFullscreen: function() {}
- };
- fs.event = {};
- }
- }
- };
- $.jPlayer.nativeFeatures.init();
-
- // The keyboard control system.
-
- // The current jPlayer instance in focus.
- $.jPlayer.focus = null;
-
- // The list of element node names to ignore with key controls.
- $.jPlayer.keyIgnoreElementNames = "A INPUT TEXTAREA SELECT BUTTON";
-
- // The function that deals with key presses.
- var keyBindings = function(event) {
- var f = $.jPlayer.focus,
- ignoreKey;
-
- // A jPlayer instance must be in focus. ie., keyEnabled and the last one played.
- if(f) {
- // What generated the key press?
- $.each( $.jPlayer.keyIgnoreElementNames.split(/\s+/g), function(i, name) {
- // The strings should already be uppercase.
- if(event.target.nodeName.toUpperCase() === name.toUpperCase()) {
- ignoreKey = true;
- return false; // exit each.
- }
- });
- if(!ignoreKey) {
- // See if the key pressed matches any of the bindings.
- $.each(f.options.keyBindings, function(action, binding) {
- // The binding could be a null when the default has been disabled. ie., 1st clause in if()
- if(
- (binding && $.isFunction(binding.fn)) &&
- ((typeof binding.key === 'number' && event.which === binding.key) ||
- (typeof binding.key === 'string' && event.key === binding.key))
- ) {
- event.preventDefault(); // Key being used by jPlayer, so prevent default operation.
- binding.fn(f);
- return false; // exit each.
- }
- });
- }
- }
- };
-
- $.jPlayer.keys = function(en) {
- var event = "keydown.jPlayer";
- // Remove any binding, just in case enabled more than once.
- $(document.documentElement).unbind(event);
- if(en) {
- $(document.documentElement).bind(event, keyBindings);
- }
- };
-
- // Enable the global key control handler ready for any jPlayer instance with the keyEnabled option enabled.
- $.jPlayer.keys(true);
-
- $.jPlayer.prototype = {
- count: 0, // Static Variable: Change it via prototype.
- version: { // Static Object
- script: "2.9.2",
- needFlash: "2.9.0",
- flash: "unknown"
- },
- options: { // Instanced in $.jPlayer() constructor
- swfPath: "js", // Path to jquery.jplayer.swf. Can be relative, absolute or server root relative.
- solution: "html, flash", // Valid solutions: html, flash, aurora. Order defines priority. 1st is highest,
- supplied: "mp3", // Defines which formats jPlayer will try and support and the priority by the order. 1st is highest,
- auroraFormats: "wav", // List the aurora.js codecs being loaded externally. Its core supports "wav". Specify format in jPlayer context. EG., The aac.js codec gives the "m4a" format.
- preload: 'metadata', // HTML5 Spec values: none, metadata, auto.
- volume: 0.8, // The volume. Number 0 to 1.
- muted: false,
- remainingDuration: false, // When true, the remaining time is shown in the duration GUI element.
- toggleDuration: false, // When true, clicks on the duration toggle between the duration and remaining display.
- captureDuration: true, // When true, clicks on the duration are captured and no longer propagate up the DOM.
- playbackRate: 1,
- defaultPlaybackRate: 1,
- minPlaybackRate: 0.5,
- maxPlaybackRate: 4,
- wmode: "opaque", // Valid wmode: window, transparent, opaque, direct, gpu.
- backgroundColor: "#000000", // To define the jPlayer div and Flash background color.
- cssSelectorAncestor: "#jp_container_1",
- cssSelector: { // * denotes properties that should only be required when video media type required. _cssSelector() would require changes to enable splitting these into Audio and Video defaults.
- videoPlay: ".jp-video-play", // *
- play: ".jp-play",
- pause: ".jp-pause",
- stop: ".jp-stop",
- seekBar: ".jp-seek-bar",
- playBar: ".jp-play-bar",
- mute: ".jp-mute",
- unmute: ".jp-unmute",
- volumeBar: ".jp-volume-bar",
- volumeBarValue: ".jp-volume-bar-value",
- volumeMax: ".jp-volume-max",
- playbackRateBar: ".jp-playback-rate-bar",
- playbackRateBarValue: ".jp-playback-rate-bar-value",
- currentTime: ".jp-current-time",
- duration: ".jp-duration",
- title: ".jp-title",
- fullScreen: ".jp-full-screen", // *
- restoreScreen: ".jp-restore-screen", // *
- repeat: ".jp-repeat",
- repeatOff: ".jp-repeat-off",
- gui: ".jp-gui", // The interface used with autohide feature.
- noSolution: ".jp-no-solution" // For error feedback when jPlayer cannot find a solution.
- },
- stateClass: { // Classes added to the cssSelectorAncestor to indicate the state.
- playing: "jp-state-playing",
- seeking: "jp-state-seeking",
- muted: "jp-state-muted",
- looped: "jp-state-looped",
- fullScreen: "jp-state-full-screen",
- noVolume: "jp-state-no-volume"
- },
- useStateClassSkin: false, // A state class skin relies on the state classes to change the visual appearance. The single control toggles the effect, for example: play then pause, mute then unmute.
- autoBlur: true, // GUI control handlers will drop focus after clicks.
- smoothPlayBar: false, // Smooths the play bar transitions, which affects clicks and short media with big changes per second.
- fullScreen: false, // Native Full Screen
- fullWindow: false,
- autohide: {
- restored: false, // Controls the interface autohide feature.
- full: true, // Controls the interface autohide feature.
- fadeIn: 200, // Milliseconds. The period of the fadeIn anim.
- fadeOut: 600, // Milliseconds. The period of the fadeOut anim.
- hold: 1000 // Milliseconds. The period of the pause before autohide beings.
- },
- loop: false,
- repeat: function(event) { // The default jPlayer repeat event handler
- if(event.jPlayer.options.loop) {
- $(this).unbind(".jPlayerRepeat").bind($.jPlayer.event.ended + ".jPlayer.jPlayerRepeat", function() {
- $(this).jPlayer("play");
- });
- } else {
- $(this).unbind(".jPlayerRepeat");
- }
- },
- nativeVideoControls: {
- // Works well on standard browsers.
- // Phone and tablet browsers can have problems with the controls disappearing.
- },
- noFullWindow: {
- msie: /msie [0-6]\./,
- ipad: /ipad.*?os [0-4]\./,
- iphone: /iphone/,
- ipod: /ipod/,
- android_pad: /android [0-3]\.(?!.*?mobile)/,
- android_phone: /(?=.*android)(?!.*chrome)(?=.*mobile)/,
- blackberry: /blackberry/,
- windows_ce: /windows ce/,
- iemobile: /iemobile/,
- webos: /webos/
- },
- noVolume: {
- ipad: /ipad/,
- iphone: /iphone/,
- ipod: /ipod/,
- android_pad: /android(?!.*?mobile)/,
- android_phone: /android.*?mobile/,
- blackberry: /blackberry/,
- windows_ce: /windows ce/,
- iemobile: /iemobile/,
- webos: /webos/,
- playbook: /playbook/
- },
- timeFormat: {
- // Specific time format for this instance. The supported options are defined in $.jPlayer.timeFormat
- // For the undefined options we use the default from $.jPlayer.timeFormat
- },
- keyEnabled: false, // Enables keyboard controls.
- audioFullScreen: false, // Enables keyboard controls to enter full screen with audio media.
- keyBindings: { // The key control object, defining the key codes and the functions to execute.
- // The parameter, f = $.jPlayer.focus, will be checked truethy before attempting to call any of these functions.
- // Properties may be added to this object, in key/fn pairs, to enable other key controls. EG, for the playlist add-on.
- play: {
- key: 80, // p
- fn: function(f) {
- if(f.status.paused) {
- f.play();
- } else {
- f.pause();
- }
- }
- },
- fullScreen: {
- key: 70, // f
- fn: function(f) {
- if(f.status.video || f.options.audioFullScreen) {
- f._setOption("fullScreen", !f.options.fullScreen);
- }
- }
- },
- muted: {
- key: 77, // m
- fn: function(f) {
- f._muted(!f.options.muted);
- }
- },
- volumeUp: {
- key: 190, // .
- fn: function(f) {
- f.volume(f.options.volume + 0.1);
- }
- },
- volumeDown: {
- key: 188, // ,
- fn: function(f) {
- f.volume(f.options.volume - 0.1);
- }
- },
- loop: {
- key: 76, // l
- fn: function(f) {
- f._loop(!f.options.loop);
- }
- }
- },
- verticalVolume: false, // Calculate volume from the bottom of the volume bar. Default is from the left. Also volume affects either width or height.
- verticalPlaybackRate: false,
- globalVolume: false, // Set to make volume and muted changes affect all jPlayer instances with this option enabled
- idPrefix: "jp", // Prefix for the ids of html elements created by jPlayer. For flash, this must not include characters: . - + * / \
- noConflict: "jQuery",
- emulateHtml: false, // Emulates the HTML5 Media element on the jPlayer element.
- consoleAlerts: true, // Alerts are sent to the console.log() instead of alert().
- errorAlerts: false,
- warningAlerts: false
- },
- optionsAudio: {
- size: {
- width: "0px",
- height: "0px",
- cssClass: ""
- },
- sizeFull: {
- width: "0px",
- height: "0px",
- cssClass: ""
- }
- },
- optionsVideo: {
- size: {
- width: "480px",
- height: "270px",
- cssClass: "jp-video-270p"
- },
- sizeFull: {
- width: "100%",
- height: "100%",
- cssClass: "jp-video-full"
- }
- },
- instances: {}, // Static Object
- status: { // Instanced in _init()
- src: "",
- media: {},
- paused: true,
- format: {},
- formatType: "",
- waitForPlay: true, // Same as waitForLoad except in case where preloading.
- waitForLoad: true,
- srcSet: false,
- video: false, // True if playing a video
- seekPercent: 0,
- currentPercentRelative: 0,
- currentPercentAbsolute: 0,
- currentTime: 0,
- duration: 0,
- remaining: 0,
- videoWidth: 0, // Intrinsic width of the video in pixels.
- videoHeight: 0, // Intrinsic height of the video in pixels.
- readyState: 0,
- networkState: 0,
- playbackRate: 1, // Warning - Now both an option and a status property
- ended: 0
-
-/* Persistant status properties created dynamically at _init():
- width
- height
- cssClass
- nativeVideoControls
- noFullWindow
- noVolume
- playbackRateEnabled // Warning - Technically, we can have both Flash and HTML, so this might not be correct if the Flash is active. That is a niche case.
-*/
- },
-
- internal: { // Instanced in _init()
- ready: false
- // instance: undefined
- // domNode: undefined
- // htmlDlyCmdId: undefined
- // autohideId: undefined
- // mouse: undefined
- // cmdsIgnored
- },
- solution: { // Static Object: Defines the solutions built in jPlayer.
- html: true,
- aurora: true,
- flash: true
- },
- // 'MPEG-4 support' : canPlayType('video/mp4; codecs="mp4v.20.8"')
- format: { // Static Object
- mp3: {
- codec: 'audio/mpeg',
- flashCanPlay: true,
- media: 'audio'
- },
- m4a: { // AAC / MP4
- codec: 'audio/mp4; codecs="mp4a.40.2"',
- flashCanPlay: true,
- media: 'audio'
- },
- m3u8a: { // AAC / MP4 / Apple HLS
- codec: 'application/vnd.apple.mpegurl; codecs="mp4a.40.2"',
- flashCanPlay: false,
- media: 'audio'
- },
- m3ua: { // M3U
- codec: 'audio/mpegurl',
- flashCanPlay: false,
- media: 'audio'
- },
- oga: { // OGG
- codec: 'audio/ogg; codecs="vorbis, opus"',
- flashCanPlay: false,
- media: 'audio'
- },
- flac: { // FLAC
- codec: 'audio/x-flac',
- flashCanPlay: false,
- media: 'audio'
- },
- wav: { // PCM
- codec: 'audio/wav; codecs="1"',
- flashCanPlay: false,
- media: 'audio'
- },
- webma: { // WEBM
- codec: 'audio/webm; codecs="vorbis"',
- flashCanPlay: false,
- media: 'audio'
- },
- fla: { // FLV / F4A
- codec: 'audio/x-flv',
- flashCanPlay: true,
- media: 'audio'
- },
- rtmpa: { // RTMP AUDIO
- codec: 'audio/rtmp; codecs="rtmp"',
- flashCanPlay: true,
- media: 'audio'
- },
- m4v: { // H.264 / MP4
- codec: 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"',
- flashCanPlay: true,
- media: 'video'
- },
- m3u8v: { // H.264 / AAC / MP4 / Apple HLS
- codec: 'application/vnd.apple.mpegurl; codecs="avc1.42E01E, mp4a.40.2"',
- flashCanPlay: false,
- media: 'video'
- },
- m3uv: { // M3U
- codec: 'audio/mpegurl',
- flashCanPlay: false,
- media: 'video'
- },
- ogv: { // OGG
- codec: 'video/ogg; codecs="theora, vorbis"',
- flashCanPlay: false,
- media: 'video'
- },
- webmv: { // WEBM
- codec: 'video/webm; codecs="vorbis, vp8"',
- flashCanPlay: false,
- media: 'video'
- },
- flv: { // FLV / F4V
- codec: 'video/x-flv',
- flashCanPlay: true,
- media: 'video'
- },
- rtmpv: { // RTMP VIDEO
- codec: 'video/rtmp; codecs="rtmp"',
- flashCanPlay: true,
- media: 'video'
- }
- },
- _init: function() {
- var self = this;
-
- this.element.empty();
-
- this.status = $.extend({}, this.status); // Copy static to unique instance.
- this.internal = $.extend({}, this.internal); // Copy static to unique instance.
-
- // Initialize the time format
- this.options.timeFormat = $.extend({}, $.jPlayer.timeFormat, this.options.timeFormat);
-
- // On iOS, assume commands will be ignored before user initiates them.
- this.internal.cmdsIgnored = $.jPlayer.platform.ipad || $.jPlayer.platform.iphone || $.jPlayer.platform.ipod;
-
- this.internal.domNode = this.element.get(0);
-
- // Add key bindings focus to 1st jPlayer instanced with key control enabled.
- if(this.options.keyEnabled && !$.jPlayer.focus) {
- $.jPlayer.focus = this;
- }
-
- // A fix for Android where older (2.3) and even some 4.x devices fail to work when changing the *audio* SRC and then playing immediately.
- this.androidFix = {
- setMedia: false, // True when media set
- play: false, // True when a progress event will instruct the media to play
- pause: false, // True when a progress event will instruct the media to pause at a time.
- time: NaN // The play(time) parameter
- };
- if($.jPlayer.platform.android) {
- this.options.preload = this.options.preload !== 'auto' ? 'metadata' : 'auto'; // Default to metadata, but allow auto.
- }
-
- this.formats = []; // Array based on supplied string option. Order defines priority.
- this.solutions = []; // Array based on solution string option. Order defines priority.
- this.require = {}; // Which media types are required: video, audio.
-
- this.htmlElement = {}; // DOM elements created by jPlayer
- this.html = {}; // In _init()'s this.desired code and setmedia(): Accessed via this[solution], where solution from this.solutions array.
- this.html.audio = {};
- this.html.video = {};
- this.aurora = {}; // In _init()'s this.desired code and setmedia(): Accessed via this[solution], where solution from this.solutions array.
- this.aurora.formats = [];
- this.aurora.properties = [];
- this.flash = {}; // In _init()'s this.desired code and setmedia(): Accessed via this[solution], where solution from this.solutions array.
-
- this.css = {};
- this.css.cs = {}; // Holds the css selector strings
- this.css.jq = {}; // Holds jQuery selectors. ie., $(css.cs.method)
-
- this.ancestorJq = []; // Holds jQuery selector of cssSelectorAncestor. Init would use $() instead of [], but it is only 1.4+
-
- this.options.volume = this._limitValue(this.options.volume, 0, 1); // Limit volume value's bounds.
-
- // Create the formats array, with prority based on the order of the supplied formats string
- $.each(this.options.supplied.toLowerCase().split(","), function(index1, value1) {
- var format = value1.replace(/^\s+|\s+$/g, ""); //trim
- if(self.format[format]) { // Check format is valid.
- var dupFound = false;
- $.each(self.formats, function(index2, value2) { // Check for duplicates
- if(format === value2) {
- dupFound = true;
- return false;
- }
- });
- if(!dupFound) {
- self.formats.push(format);
- }
- }
- });
-
- // Create the solutions array, with prority based on the order of the solution string
- $.each(this.options.solution.toLowerCase().split(","), function(index1, value1) {
- var solution = value1.replace(/^\s+|\s+$/g, ""); //trim
- if(self.solution[solution]) { // Check solution is valid.
- var dupFound = false;
- $.each(self.solutions, function(index2, value2) { // Check for duplicates
- if(solution === value2) {
- dupFound = true;
- return false;
- }
- });
- if(!dupFound) {
- self.solutions.push(solution);
- }
- }
- });
-
- // Create Aurora.js formats array
- $.each(this.options.auroraFormats.toLowerCase().split(","), function(index1, value1) {
- var format = value1.replace(/^\s+|\s+$/g, ""); //trim
- if(self.format[format]) { // Check format is valid.
- var dupFound = false;
- $.each(self.aurora.formats, function(index2, value2) { // Check for duplicates
- if(format === value2) {
- dupFound = true;
- return false;
- }
- });
- if(!dupFound) {
- self.aurora.formats.push(format);
- }
- }
- });
-
- this.internal.instance = "jp_" + this.count;
- this.instances[this.internal.instance] = this.element;
-
- // Check the jPlayer div has an id and create one if required. Important for Flash to know the unique id for comms.
- if(!this.element.attr("id")) {
- this.element.attr("id", this.options.idPrefix + "_jplayer_" + this.count);
- }
-
- this.internal.self = $.extend({}, {
- id: this.element.attr("id"),
- jq: this.element
- });
- this.internal.audio = $.extend({}, {
- id: this.options.idPrefix + "_audio_" + this.count,
- jq: undefined
- });
- this.internal.video = $.extend({}, {
- id: this.options.idPrefix + "_video_" + this.count,
- jq: undefined
- });
- this.internal.flash = $.extend({}, {
- id: this.options.idPrefix + "_flash_" + this.count,
- jq: undefined,
- swf: this.options.swfPath + (this.options.swfPath.toLowerCase().slice(-4) !== ".swf" ? (this.options.swfPath && this.options.swfPath.slice(-1) !== "/" ? "/" : "") + "jquery.jplayer.swf" : "")
- });
- this.internal.poster = $.extend({}, {
- id: this.options.idPrefix + "_poster_" + this.count,
- jq: undefined
- });
-
- // Register listeners defined in the constructor
- $.each($.jPlayer.event, function(eventName,eventType) {
- if(self.options[eventName] !== undefined) {
- self.element.bind(eventType + ".jPlayer", self.options[eventName]); // With .jPlayer namespace.
- self.options[eventName] = undefined; // Destroy the handler pointer copy on the options. Reason, events can be added/removed in other ways so this could be obsolete and misleading.
- }
- });
-
- // Determine if we require solutions for audio, video or both media types.
- this.require.audio = false;
- this.require.video = false;
- $.each(this.formats, function(priority, format) {
- self.require[self.format[format].media] = true;
- });
-
- // Now required types are known, finish the options default settings.
- if(this.require.video) {
- this.options = $.extend(true, {},
- this.optionsVideo,
- this.options
- );
- } else {
- this.options = $.extend(true, {},
- this.optionsAudio,
- this.options
- );
- }
- this._setSize(); // update status and jPlayer element size
-
- // Determine the status for Blocklisted options.
- this.status.nativeVideoControls = this._uaBlocklist(this.options.nativeVideoControls);
- this.status.noFullWindow = this._uaBlocklist(this.options.noFullWindow);
- this.status.noVolume = this._uaBlocklist(this.options.noVolume);
-
- // Create event handlers if native fullscreen is supported
- if($.jPlayer.nativeFeatures.fullscreen.api.fullscreenEnabled) {
- this._fullscreenAddEventListeners();
- }
-
- // The native controls are only for video and are disabled when audio is also used.
- this._restrictNativeVideoControls();
-
- // Create the poster image.
- this.htmlElement.poster = document.createElement('img');
- this.htmlElement.poster.id = this.internal.poster.id;
- this.htmlElement.poster.onload = function() { // Note that this did not work on Firefox 3.6: poster.addEventListener("onload", function() {}, false); Did not investigate x-browser.
- if(!self.status.video || self.status.waitForPlay) {
- self.internal.poster.jq.show();
- }
- };
- this.element.append(this.htmlElement.poster);
- this.internal.poster.jq = $("#" + this.internal.poster.id);
- this.internal.poster.jq.css({'width': this.status.width, 'height': this.status.height});
- this.internal.poster.jq.hide();
- this.internal.poster.jq.bind("click.jPlayer", function() {
- self._trigger($.jPlayer.event.click);
- });
-
- // Generate the required media elements
- this.html.audio.available = false;
- if(this.require.audio) { // If a supplied format is audio
- this.htmlElement.audio = document.createElement('audio');
- this.htmlElement.audio.id = this.internal.audio.id;
- this.html.audio.available = !!this.htmlElement.audio.canPlayType && this._testCanPlayType(this.htmlElement.audio); // Test is for IE9 on Win Server 2008.
- }
- this.html.video.available = false;
- if(this.require.video) { // If a supplied format is video
- this.htmlElement.video = document.createElement('video');
- this.htmlElement.video.id = this.internal.video.id;
- this.html.video.available = !!this.htmlElement.video.canPlayType && this._testCanPlayType(this.htmlElement.video); // Test is for IE9 on Win Server 2008.
- }
-
- this.flash.available = this._checkForFlash(10.1);
-
- this.html.canPlay = {};
- this.aurora.canPlay = {};
- this.flash.canPlay = {};
- $.each(this.formats, function(priority, format) {
- self.html.canPlay[format] = self.html[self.format[format].media].available && "" !== self.htmlElement[self.format[format].media].canPlayType(self.format[format].codec);
- self.aurora.canPlay[format] = ($.inArray(format, self.aurora.formats) > -1);
- self.flash.canPlay[format] = self.format[format].flashCanPlay && self.flash.available;
- });
- this.html.desired = false;
- this.aurora.desired = false;
- this.flash.desired = false;
- $.each(this.solutions, function(solutionPriority, solution) {
- if(solutionPriority === 0) {
- self[solution].desired = true;
- } else {
- var audioCanPlay = false;
- var videoCanPlay = false;
- $.each(self.formats, function(formatPriority, format) {
- if(self[self.solutions[0]].canPlay[format]) { // The other solution can play
- if(self.format[format].media === 'video') {
- videoCanPlay = true;
- } else {
- audioCanPlay = true;
- }
- }
- });
- self[solution].desired = (self.require.audio && !audioCanPlay) || (self.require.video && !videoCanPlay);
- }
- });
- // This is what jPlayer will support, based on solution and supplied.
- this.html.support = {};
- this.aurora.support = {};
- this.flash.support = {};
- $.each(this.formats, function(priority, format) {
- self.html.support[format] = self.html.canPlay[format] && self.html.desired;
- self.aurora.support[format] = self.aurora.canPlay[format] && self.aurora.desired;
- self.flash.support[format] = self.flash.canPlay[format] && self.flash.desired;
- });
- // If jPlayer is supporting any format in a solution, then the solution is used.
- this.html.used = false;
- this.aurora.used = false;
- this.flash.used = false;
- $.each(this.solutions, function(solutionPriority, solution) {
- $.each(self.formats, function(formatPriority, format) {
- if(self[solution].support[format]) {
- self[solution].used = true;
- return false;
- }
- });
- });
-
- // Init solution active state and the event gates to false.
- this._resetActive();
- this._resetGate();
-
- // Set up the css selectors for the control and feedback entities.
- this._cssSelectorAncestor(this.options.cssSelectorAncestor);
-
- // If neither html nor aurora nor flash are being used by this browser, then media playback is not possible. Trigger an error event.
- if(!(this.html.used || this.aurora.used || this.flash.used)) {
- this._error( {
- type: $.jPlayer.error.NO_SOLUTION,
- context: "{solution:'" + this.options.solution + "', supplied:'" + this.options.supplied + "'}",
- message: $.jPlayer.errorMsg.NO_SOLUTION,
- hint: $.jPlayer.errorHint.NO_SOLUTION
- });
- if(this.css.jq.noSolution.length) {
- this.css.jq.noSolution.show();
- }
- } else {
- if(this.css.jq.noSolution.length) {
- this.css.jq.noSolution.hide();
- }
- }
-
- // Add the flash solution if it is being used.
- if(this.flash.used) {
- var htmlObj,
- flashVars = 'jQuery=' + encodeURI(this.options.noConflict) + '&id=' + encodeURI(this.internal.self.id) + '&vol=' + this.options.volume + '&muted=' + this.options.muted;
-
- // Code influenced by SWFObject 2.2: http://code.google.com/p/swfobject/
- // Non IE browsers have an initial Flash size of 1 by 1 otherwise the wmode affected the Flash ready event.
-
- if($.jPlayer.browser.msie && (Number($.jPlayer.browser.version) < 9 || $.jPlayer.browser.documentMode < 9)) {
- var objStr = '';
-
- var paramStr = [
- '',
- '',
- '',
- '',
- ''
- ];
-
- htmlObj = document.createElement(objStr);
- for(var i=0; i < paramStr.length; i++) {
- htmlObj.appendChild(document.createElement(paramStr[i]));
- }
- } else {
- var createParam = function(el, n, v) {
- var p = document.createElement("param");
- p.setAttribute("name", n);
- p.setAttribute("value", v);
- el.appendChild(p);
- };
-
- htmlObj = document.createElement("object");
- htmlObj.setAttribute("id", this.internal.flash.id);
- htmlObj.setAttribute("name", this.internal.flash.id);
- htmlObj.setAttribute("data", this.internal.flash.swf);
- htmlObj.setAttribute("type", "application/x-shockwave-flash");
- htmlObj.setAttribute("width", "1"); // Non-zero
- htmlObj.setAttribute("height", "1"); // Non-zero
- htmlObj.setAttribute("tabindex", "-1");
- createParam(htmlObj, "flashvars", flashVars);
- createParam(htmlObj, "allowscriptaccess", "always");
- createParam(htmlObj, "bgcolor", this.options.backgroundColor);
- createParam(htmlObj, "wmode", this.options.wmode);
- }
-
- this.element.append(htmlObj);
- this.internal.flash.jq = $(htmlObj);
- }
-
- // Setup playbackRate ability before using _addHtmlEventListeners()
- if(this.html.used && !this.flash.used) { // If only HTML
- // Using the audio element capabilities for playbackRate. ie., Assuming video element is the same.
- this.status.playbackRateEnabled = this._testPlaybackRate('audio');
- } else {
- this.status.playbackRateEnabled = false;
- }
-
- this._updatePlaybackRate();
-
- // Add the HTML solution if being used.
- if(this.html.used) {
-
- // The HTML Audio handlers
- if(this.html.audio.available) {
- this._addHtmlEventListeners(this.htmlElement.audio, this.html.audio);
- this.element.append(this.htmlElement.audio);
- this.internal.audio.jq = $("#" + this.internal.audio.id);
- }
-
- // The HTML Video handlers
- if(this.html.video.available) {
- this._addHtmlEventListeners(this.htmlElement.video, this.html.video);
- this.element.append(this.htmlElement.video);
- this.internal.video.jq = $("#" + this.internal.video.id);
- if(this.status.nativeVideoControls) {
- this.internal.video.jq.css({'width': this.status.width, 'height': this.status.height});
- } else {
- this.internal.video.jq.css({'width':'0px', 'height':'0px'}); // Using size 0x0 since a .hide() causes issues in iOS
- }
- this.internal.video.jq.bind("click.jPlayer", function() {
- self._trigger($.jPlayer.event.click);
- });
- }
- }
-
- // Add the Aurora.js solution if being used.
- if(this.aurora.used) {
- // Aurora.js player need to be created for each media, see setMedia function.
- }
-
- // Create the bridge that emulates the HTML Media element on the jPlayer DIV
- if( this.options.emulateHtml ) {
- this._emulateHtmlBridge();
- }
-
- if((this.html.used || this.aurora.used) && !this.flash.used) { // If only HTML, then emulate flash ready() call after 100ms.
- setTimeout( function() {
- self.internal.ready = true;
- self.version.flash = "n/a";
- self._trigger($.jPlayer.event.repeat); // Trigger the repeat event so its handler can initialize itself with the loop option.
- self._trigger($.jPlayer.event.ready);
- }, 100);
- }
-
- // Initialize the interface components with the options.
- this._updateNativeVideoControls();
- // The other controls are now setup in _cssSelectorAncestor()
- if(this.css.jq.videoPlay.length) {
- this.css.jq.videoPlay.hide();
- }
-
- $.jPlayer.prototype.count++; // Change static variable via prototype.
- },
- destroy: function() {
- // MJP: The background change remains. Would need to store the original to restore it correctly.
- // MJP: The jPlayer element's size change remains.
-
- // Clear the media to reset the GUI and stop any downloads. Streams on some browsers had persited. (Chrome)
- this.clearMedia();
- // Remove the size/sizeFull cssClass from the cssSelectorAncestor
- this._removeUiClass();
- // Remove the times from the GUI
- if(this.css.jq.currentTime.length) {
- this.css.jq.currentTime.text("");
- }
- if(this.css.jq.duration.length) {
- this.css.jq.duration.text("");
- }
- // Remove any bindings from the interface controls.
- $.each(this.css.jq, function(fn, jq) {
- // Check selector is valid before trying to execute method.
- if(jq.length) {
- jq.unbind(".jPlayer");
- }
- });
- // Remove the click handlers for $.jPlayer.event.click
- this.internal.poster.jq.unbind(".jPlayer");
- if(this.internal.video.jq) {
- this.internal.video.jq.unbind(".jPlayer");
- }
- // Remove the fullscreen event handlers
- this._fullscreenRemoveEventListeners();
- // Remove key bindings
- if(this === $.jPlayer.focus) {
- $.jPlayer.focus = null;
- }
- // Destroy the HTML bridge.
- if(this.options.emulateHtml) {
- this._destroyHtmlBridge();
- }
- this.element.removeData("jPlayer"); // Remove jPlayer data
- this.element.unbind(".jPlayer"); // Remove all event handlers created by the jPlayer constructor
- this.element.empty(); // Remove the inserted child elements
-
- delete this.instances[this.internal.instance]; // Clear the instance on the static instance object
- },
- destroyRemoved: function() { // Destroy any instances that have gone away.
- var self = this;
- $.each(this.instances, function(i, element) {
- if(self.element !== element) { // Do not destroy this instance.
- if(!element.data("jPlayer")) { // Check that element is a real jPlayer.
- element.jPlayer("destroy");
- delete self.instances[i];
- }
- }
- });
- },
- enable: function() { // Plan to implement
- // options.disabled = false
- },
- disable: function () { // Plan to implement
- // options.disabled = true
- },
- _testCanPlayType: function(elem) {
- // IE9 on Win Server 2008 did not implement canPlayType(), but it has the property.
- try {
- elem.canPlayType(this.format.mp3.codec); // The type is irrelevant.
- return true;
- } catch(err) {
- return false;
- }
- },
- _testPlaybackRate: function(type) {
- // type: String 'audio' or 'video'
- var el, rate = 0.5;
- type = typeof type === 'string' ? type : 'audio';
- el = document.createElement(type);
- // Wrapping in a try/catch, just in case older HTML5 browsers throw and error.
- try {
- if('playbackRate' in el) {
- el.playbackRate = rate;
- return el.playbackRate === rate;
- } else {
- return false;
- }
- } catch(err) {
- return false;
- }
- },
- _uaBlocklist: function(list) {
- // list : object with properties that are all regular expressions. Property names are irrelevant.
- // Returns true if the user agent is matched in list.
- var ua = navigator.userAgent.toLowerCase(),
- block = false;
-
- $.each(list, function(p, re) {
- if(re && re.test(ua)) {
- block = true;
- return false; // exit $.each.
- }
- });
- return block;
- },
- _restrictNativeVideoControls: function() {
- // Fallback to noFullWindow when nativeVideoControls is true and audio media is being used. Affects when both media types are used.
- if(this.require.audio) {
- if(this.status.nativeVideoControls) {
- this.status.nativeVideoControls = false;
- this.status.noFullWindow = true;
- }
- }
- },
- _updateNativeVideoControls: function() {
- if(this.html.video.available && this.html.used) {
- // Turn the HTML Video controls on/off
- this.htmlElement.video.controls = this.status.nativeVideoControls;
- // Show/hide the jPlayer GUI.
- this._updateAutohide();
- // For when option changed. The poster image is not updated, as it is dealt with in setMedia(). Acceptable degradation since seriously doubt these options will change on the fly. Can again review later.
- if(this.status.nativeVideoControls && this.require.video) {
- this.internal.poster.jq.hide();
- this.internal.video.jq.css({'width': this.status.width, 'height': this.status.height});
- } else if(this.status.waitForPlay && this.status.video) {
- this.internal.poster.jq.show();
- this.internal.video.jq.css({'width': '0px', 'height': '0px'});
- }
- }
- },
- _addHtmlEventListeners: function(mediaElement, entity) {
- var self = this;
- mediaElement.preload = this.options.preload;
- mediaElement.muted = this.options.muted;
- mediaElement.volume = this.options.volume;
-
- if(this.status.playbackRateEnabled) {
- mediaElement.defaultPlaybackRate = this.options.defaultPlaybackRate;
- mediaElement.playbackRate = this.options.playbackRate;
- }
-
- // Create the event listeners
- // Only want the active entity to affect jPlayer and bubble events.
- // Using entity.gate so that object is referenced and gate property always current
-
- mediaElement.addEventListener("progress", function() {
- if(entity.gate) {
- if(self.internal.cmdsIgnored && this.readyState > 0) { // Detect iOS executed the command
- self.internal.cmdsIgnored = false;
- }
- self._getHtmlStatus(mediaElement);
- self._updateInterface();
- self._trigger($.jPlayer.event.progress);
- }
- }, false);
- mediaElement.addEventListener("loadeddata", function() {
- if(entity.gate) {
- self.androidFix.setMedia = false; // Disable the fix after the first progress event.
- if(self.androidFix.play) { // Play Android audio - performing the fix.
- self.androidFix.play = false;
- self.play(self.androidFix.time);
- }
- if(self.androidFix.pause) { // Pause Android audio at time - performing the fix.
- self.androidFix.pause = false;
- self.pause(self.androidFix.time);
- }
- self._trigger($.jPlayer.event.loadeddata);
- }
- }, false);
- mediaElement.addEventListener("timeupdate", function() {
- if(entity.gate) {
- self._getHtmlStatus(mediaElement);
- self._updateInterface();
- self._trigger($.jPlayer.event.timeupdate);
- }
- }, false);
- mediaElement.addEventListener("durationchange", function() {
- if(entity.gate) {
- self._getHtmlStatus(mediaElement);
- self._updateInterface();
- self._trigger($.jPlayer.event.durationchange);
- }
- }, false);
- mediaElement.addEventListener("play", function() {
- if(entity.gate) {
- self._updateButtons(true);
- self._html_checkWaitForPlay(); // So the native controls update this variable and puts the hidden interface in the correct state. Affects toggling native controls.
- self._trigger($.jPlayer.event.play);
- }
- }, false);
- mediaElement.addEventListener("playing", function() {
- if(entity.gate) {
- self._updateButtons(true);
- self._seeked();
- self._trigger($.jPlayer.event.playing);
- }
- }, false);
- mediaElement.addEventListener("pause", function() {
- if(entity.gate) {
- self._updateButtons(false);
- self._trigger($.jPlayer.event.pause);
- }
- }, false);
- mediaElement.addEventListener("waiting", function() {
- if(entity.gate) {
- self._seeking();
- self._trigger($.jPlayer.event.waiting);
- }
- }, false);
- mediaElement.addEventListener("seeking", function() {
- if(entity.gate) {
- self._seeking();
- self._trigger($.jPlayer.event.seeking);
- }
- }, false);
- mediaElement.addEventListener("seeked", function() {
- if(entity.gate) {
- self._seeked();
- self._trigger($.jPlayer.event.seeked);
- }
- }, false);
- mediaElement.addEventListener("volumechange", function() {
- if(entity.gate) {
- // Read the values back from the element as the Blackberry PlayBook shares the volume with the physical buttons master volume control.
- // However, when tested 6th July 2011, those buttons do not generate an event. The physical play/pause button does though.
- self.options.volume = mediaElement.volume;
- self.options.muted = mediaElement.muted;
- self._updateMute();
- self._updateVolume();
- self._trigger($.jPlayer.event.volumechange);
- }
- }, false);
- mediaElement.addEventListener("ratechange", function() {
- if(entity.gate) {
- self.options.defaultPlaybackRate = mediaElement.defaultPlaybackRate;
- self.options.playbackRate = mediaElement.playbackRate;
- self._updatePlaybackRate();
- self._trigger($.jPlayer.event.ratechange);
- }
- }, false);
- mediaElement.addEventListener("suspend", function() { // Seems to be the only way of capturing that the iOS4 browser did not actually play the media from the page code. ie., It needs a user gesture.
- if(entity.gate) {
- self._seeked();
- self._trigger($.jPlayer.event.suspend);
- }
- }, false);
- mediaElement.addEventListener("ended", function() {
- if(entity.gate) {
- // Order of the next few commands are important. Change the time and then pause.
- // Solves a bug in Firefox, where issuing pause 1st causes the media to play from the start. ie., The pause is ignored.
- if(!$.jPlayer.browser.webkit) { // Chrome crashes if you do this in conjunction with a setMedia command in an ended event handler. ie., The playlist demo.
- self.htmlElement.media.currentTime = 0; // Safari does not care about this command. ie., It works with or without this line. (Both Safari and Chrome are Webkit.)
- }
- self.htmlElement.media.pause(); // Pause otherwise a click on the progress bar will play from that point, when it shouldn't, since it stopped playback.
- self._updateButtons(false);
- self._getHtmlStatus(mediaElement, true); // With override true. Otherwise Chrome leaves progress at full.
- self._updateInterface();
- self._trigger($.jPlayer.event.ended);
- }
- }, false);
- mediaElement.addEventListener("error", function() {
- if(entity.gate) {
- self._updateButtons(false);
- self._seeked();
- if(self.status.srcSet) { // Deals with case of clearMedia() causing an error event.
- clearTimeout(self.internal.htmlDlyCmdId); // Clears any delayed commands used in the HTML solution.
- self.status.waitForLoad = true; // Allows the load operation to try again.
- self.status.waitForPlay = true; // Reset since a play was captured.
- if(self.status.video && !self.status.nativeVideoControls) {
- self.internal.video.jq.css({'width':'0px', 'height':'0px'});
- }
- if(self._validString(self.status.media.poster) && !self.status.nativeVideoControls) {
- self.internal.poster.jq.show();
- }
- if(self.css.jq.videoPlay.length) {
- self.css.jq.videoPlay.show();
- }
- self._error( {
- type: $.jPlayer.error.URL,
- context: self.status.src, // this.src shows absolute urls. Want context to show the url given.
- message: $.jPlayer.errorMsg.URL,
- hint: $.jPlayer.errorHint.URL
- });
- }
- }
- }, false);
- // Create all the other event listeners that bubble up to a jPlayer event from html, without being used by jPlayer.
- $.each($.jPlayer.htmlEvent, function(i, eventType) {
- mediaElement.addEventListener(this, function() {
- if(entity.gate) {
- self._trigger($.jPlayer.event[eventType]);
- }
- }, false);
- });
- },
- _addAuroraEventListeners : function(player, entity) {
- var self = this;
- //player.preload = this.options.preload;
- //player.muted = this.options.muted;
- player.volume = this.options.volume * 100;
-
- // Create the event listeners
- // Only want the active entity to affect jPlayer and bubble events.
- // Using entity.gate so that object is referenced and gate property always current
-
- player.on("progress", function() {
- if(entity.gate) {
- if(self.internal.cmdsIgnored && this.readyState > 0) { // Detect iOS executed the command
- self.internal.cmdsIgnored = false;
- }
- self._getAuroraStatus(player);
- self._updateInterface();
- self._trigger($.jPlayer.event.progress);
- // Progress with song duration, we estimate timeupdate need to be triggered too.
- if (player.duration > 0) {
- self._trigger($.jPlayer.event.timeupdate);
- }
- }
- }, false);
- player.on("ready", function() {
- if(entity.gate) {
- self._trigger($.jPlayer.event.loadeddata);
- }
- }, false);
- player.on("duration", function() {
- if(entity.gate) {
- self._getAuroraStatus(player);
- self._updateInterface();
- self._trigger($.jPlayer.event.durationchange);
- }
- }, false);
- player.on("end", function() {
- if(entity.gate) {
- // Order of the next few commands are important. Change the time and then pause.
- self._updateButtons(false);
- self._getAuroraStatus(player, true);
- self._updateInterface();
- self._trigger($.jPlayer.event.ended);
- }
- }, false);
- player.on("error", function() {
- if(entity.gate) {
- self._updateButtons(false);
- self._seeked();
- if(self.status.srcSet) { // Deals with case of clearMedia() causing an error event.
- self.status.waitForLoad = true; // Allows the load operation to try again.
- self.status.waitForPlay = true; // Reset since a play was captured.
- if(self.status.video && !self.status.nativeVideoControls) {
- self.internal.video.jq.css({'width':'0px', 'height':'0px'});
- }
- if(self._validString(self.status.media.poster) && !self.status.nativeVideoControls) {
- self.internal.poster.jq.show();
- }
- if(self.css.jq.videoPlay.length) {
- self.css.jq.videoPlay.show();
- }
- self._error( {
- type: $.jPlayer.error.URL,
- context: self.status.src, // this.src shows absolute urls. Want context to show the url given.
- message: $.jPlayer.errorMsg.URL,
- hint: $.jPlayer.errorHint.URL
- });
- }
- }
- }, false);
- },
- _getHtmlStatus: function(media, override) {
- var ct = 0, cpa = 0, sp = 0, cpr = 0;
-
- // Fixes the duration bug in iOS, where the durationchange event occurs when media.duration is not always correct.
- // Fixes the initial duration bug in BB OS7, where the media.duration is infinity and displays as NaN:NaN due to Date() using inifity.
- if(isFinite(media.duration)) {
- this.status.duration = media.duration;
- }
-
- ct = media.currentTime;
- cpa = (this.status.duration > 0) ? 100 * ct / this.status.duration : 0;
- if((typeof media.seekable === "object") && (media.seekable.length > 0)) {
- sp = (this.status.duration > 0) ? 100 * media.seekable.end(media.seekable.length-1) / this.status.duration : 100;
- cpr = (this.status.duration > 0) ? 100 * media.currentTime / media.seekable.end(media.seekable.length-1) : 0; // Duration conditional for iOS duration bug. ie., seekable.end is a NaN in that case.
- } else {
- sp = 100;
- cpr = cpa;
- }
-
- if(override) {
- ct = 0;
- cpr = 0;
- cpa = 0;
- }
-
- this.status.seekPercent = sp;
- this.status.currentPercentRelative = cpr;
- this.status.currentPercentAbsolute = cpa;
- this.status.currentTime = ct;
-
- this.status.remaining = this.status.duration - this.status.currentTime;
-
- this.status.videoWidth = media.videoWidth;
- this.status.videoHeight = media.videoHeight;
-
- this.status.readyState = media.readyState;
- this.status.networkState = media.networkState;
- this.status.playbackRate = media.playbackRate;
- this.status.ended = media.ended;
- },
- _getAuroraStatus: function(player, override) {
- var ct = 0, cpa = 0, sp = 0, cpr = 0;
-
- this.status.duration = player.duration / 1000;
-
- ct = player.currentTime / 1000;
- cpa = (this.status.duration > 0) ? 100 * ct / this.status.duration : 0;
- if(player.buffered > 0) {
- sp = (this.status.duration > 0) ? (player.buffered * this.status.duration) / this.status.duration : 100;
- cpr = (this.status.duration > 0) ? ct / (player.buffered * this.status.duration) : 0;
- } else {
- sp = 100;
- cpr = cpa;
- }
-
- if(override) {
- ct = 0;
- cpr = 0;
- cpa = 0;
- }
-
- this.status.seekPercent = sp;
- this.status.currentPercentRelative = cpr;
- this.status.currentPercentAbsolute = cpa;
- this.status.currentTime = ct;
-
- this.status.remaining = this.status.duration - this.status.currentTime;
-
- this.status.readyState = 4; // status.readyState;
- this.status.networkState = 0; // status.networkState;
- this.status.playbackRate = 1; // status.playbackRate;
- this.status.ended = false; // status.ended;
- },
- _resetStatus: function() {
- this.status = $.extend({}, this.status, $.jPlayer.prototype.status); // Maintains the status properties that persist through a reset.
- },
- _trigger: function(eventType, error, warning) { // eventType always valid as called using $.jPlayer.event.eventType
- var event = $.Event(eventType);
- event.jPlayer = {};
- event.jPlayer.version = $.extend({}, this.version);
- event.jPlayer.options = $.extend(true, {}, this.options); // Deep copy
- event.jPlayer.status = $.extend(true, {}, this.status); // Deep copy
- event.jPlayer.html = $.extend(true, {}, this.html); // Deep copy
- event.jPlayer.aurora = $.extend(true, {}, this.aurora); // Deep copy
- event.jPlayer.flash = $.extend(true, {}, this.flash); // Deep copy
- if(error) {
- event.jPlayer.error = $.extend({}, error);
- }
- if(warning) {
- event.jPlayer.warning = $.extend({}, warning);
- }
- this.element.trigger(event);
- },
- jPlayerFlashEvent: function(eventType, status) { // Called from Flash
- if(eventType === $.jPlayer.event.ready) {
- if(!this.internal.ready) {
- this.internal.ready = true;
- this.internal.flash.jq.css({'width':'0px', 'height':'0px'}); // Once Flash generates the ready event, minimise to zero as it is not affected by wmode anymore.
-
- this.version.flash = status.version;
- if(this.version.needFlash !== this.version.flash) {
- this._error( {
- type: $.jPlayer.error.VERSION,
- context: this.version.flash,
- message: $.jPlayer.errorMsg.VERSION + this.version.flash,
- hint: $.jPlayer.errorHint.VERSION
- });
- }
- this._trigger($.jPlayer.event.repeat); // Trigger the repeat event so its handler can initialize itself with the loop option.
- this._trigger(eventType);
- } else {
- // This condition occurs if the Flash is hidden and then shown again.
- // Firefox also reloads the Flash if the CSS position changes. position:fixed is used for full screen.
-
- // Only do this if the Flash is the solution being used at the moment. Affects Media players where both solution may be being used.
- if(this.flash.gate) {
-
- // Send the current status to the Flash now that it is ready (available) again.
- if(this.status.srcSet) {
-
- // Need to read original status before issuing the setMedia command.
- var currentTime = this.status.currentTime,
- paused = this.status.paused;
-
- this.setMedia(this.status.media);
- this.volumeWorker(this.options.volume);
- if(currentTime > 0) {
- if(paused) {
- this.pause(currentTime);
- } else {
- this.play(currentTime);
- }
- }
- }
- this._trigger($.jPlayer.event.flashreset);
- }
- }
- }
- if(this.flash.gate) {
- switch(eventType) {
- case $.jPlayer.event.progress:
- this._getFlashStatus(status);
- this._updateInterface();
- this._trigger(eventType);
- break;
- case $.jPlayer.event.timeupdate:
- this._getFlashStatus(status);
- this._updateInterface();
- this._trigger(eventType);
- break;
- case $.jPlayer.event.play:
- this._seeked();
- this._updateButtons(true);
- this._trigger(eventType);
- break;
- case $.jPlayer.event.pause:
- this._updateButtons(false);
- this._trigger(eventType);
- break;
- case $.jPlayer.event.ended:
- this._updateButtons(false);
- this._trigger(eventType);
- break;
- case $.jPlayer.event.click:
- this._trigger(eventType); // This could be dealt with by the default
- break;
- case $.jPlayer.event.error:
- this.status.waitForLoad = true; // Allows the load operation to try again.
- this.status.waitForPlay = true; // Reset since a play was captured.
- if(this.status.video) {
- this.internal.flash.jq.css({'width':'0px', 'height':'0px'});
- }
- if(this._validString(this.status.media.poster)) {
- this.internal.poster.jq.show();
- }
- if(this.css.jq.videoPlay.length && this.status.video) {
- this.css.jq.videoPlay.show();
- }
- if(this.status.video) { // Set up for another try. Execute before error event.
- this._flash_setVideo(this.status.media);
- } else {
- this._flash_setAudio(this.status.media);
- }
- this._updateButtons(false);
- this._error( {
- type: $.jPlayer.error.URL,
- context:status.src,
- message: $.jPlayer.errorMsg.URL,
- hint: $.jPlayer.errorHint.URL
- });
- break;
- case $.jPlayer.event.seeking:
- this._seeking();
- this._trigger(eventType);
- break;
- case $.jPlayer.event.seeked:
- this._seeked();
- this._trigger(eventType);
- break;
- case $.jPlayer.event.ready:
- // The ready event is handled outside the switch statement.
- // Captured here otherwise 2 ready events would be generated if the ready event handler used setMedia.
- break;
- default:
- this._trigger(eventType);
- }
- }
- return false;
- },
- _getFlashStatus: function(status) {
- this.status.seekPercent = status.seekPercent;
- this.status.currentPercentRelative = status.currentPercentRelative;
- this.status.currentPercentAbsolute = status.currentPercentAbsolute;
- this.status.currentTime = status.currentTime;
- this.status.duration = status.duration;
- this.status.remaining = status.duration - status.currentTime;
-
- this.status.videoWidth = status.videoWidth;
- this.status.videoHeight = status.videoHeight;
-
- // The Flash does not generate this information in this release
- this.status.readyState = 4; // status.readyState;
- this.status.networkState = 0; // status.networkState;
- this.status.playbackRate = 1; // status.playbackRate;
- this.status.ended = false; // status.ended;
- },
- _updateButtons: function(playing) {
- if(playing === undefined) {
- playing = !this.status.paused;
- } else {
- this.status.paused = !playing;
- }
- // Apply the state classes. (For the useStateClassSkin:true option)
- if(playing) {
- this.addStateClass('playing');
- } else {
- this.removeStateClass('playing');
- }
- if(!this.status.noFullWindow && this.options.fullWindow) {
- this.addStateClass('fullScreen');
- } else {
- this.removeStateClass('fullScreen');
- }
- if(this.options.loop) {
- this.addStateClass('looped');
- } else {
- this.removeStateClass('looped');
- }
- // Toggle the GUI element pairs. (For the useStateClassSkin:false option)
- if(this.css.jq.play.length && this.css.jq.pause.length) {
- if(playing) {
- this.css.jq.play.hide();
- this.css.jq.pause.show();
- } else {
- this.css.jq.play.show();
- this.css.jq.pause.hide();
- }
- }
- if(this.css.jq.restoreScreen.length && this.css.jq.fullScreen.length) {
- if(this.status.noFullWindow) {
- this.css.jq.fullScreen.hide();
- this.css.jq.restoreScreen.hide();
- } else if(this.options.fullWindow) {
- this.css.jq.fullScreen.hide();
- this.css.jq.restoreScreen.show();
- } else {
- this.css.jq.fullScreen.show();
- this.css.jq.restoreScreen.hide();
- }
- }
- if(this.css.jq.repeat.length && this.css.jq.repeatOff.length) {
- if(this.options.loop) {
- this.css.jq.repeat.hide();
- this.css.jq.repeatOff.show();
- } else {
- this.css.jq.repeat.show();
- this.css.jq.repeatOff.hide();
- }
- }
- },
- _updateInterface: function() {
- if(this.css.jq.seekBar.length) {
- this.css.jq.seekBar.width(this.status.seekPercent+"%");
- }
- if(this.css.jq.playBar.length) {
- if(this.options.smoothPlayBar) {
- this.css.jq.playBar.stop().animate({
- width: this.status.currentPercentAbsolute+"%"
- }, 250, "linear");
- } else {
- this.css.jq.playBar.width(this.status.currentPercentRelative+"%");
- }
- }
- var currentTimeText = '';
- if(this.css.jq.currentTime.length) {
- currentTimeText = this._convertTime(this.status.currentTime);
- if(currentTimeText !== this.css.jq.currentTime.text()) {
- this.css.jq.currentTime.text(this._convertTime(this.status.currentTime));
- }
- }
- var durationText = '',
- duration = this.status.duration,
- remaining = this.status.remaining;
- if(this.css.jq.duration.length) {
- if(typeof this.status.media.duration === 'string') {
- durationText = this.status.media.duration;
- } else {
- if(typeof this.status.media.duration === 'number') {
- duration = this.status.media.duration;
- remaining = duration - this.status.currentTime;
- }
- if(this.options.remainingDuration) {
- durationText = (remaining > 0 ? '-' : '') + this._convertTime(remaining);
- } else {
- durationText = this._convertTime(duration);
- }
- }
- if(durationText !== this.css.jq.duration.text()) {
- this.css.jq.duration.text(durationText);
- }
- }
- },
- _convertTime: ConvertTime.prototype.time,
- _seeking: function() {
- if(this.css.jq.seekBar.length) {
- this.css.jq.seekBar.addClass("jp-seeking-bg");
- }
- this.addStateClass('seeking');
- },
- _seeked: function() {
- if(this.css.jq.seekBar.length) {
- this.css.jq.seekBar.removeClass("jp-seeking-bg");
- }
- this.removeStateClass('seeking');
- },
- _resetGate: function() {
- this.html.audio.gate = false;
- this.html.video.gate = false;
- this.aurora.gate = false;
- this.flash.gate = false;
- },
- _resetActive: function() {
- this.html.active = false;
- this.aurora.active = false;
- this.flash.active = false;
- },
- _escapeHtml: function(s) {
- return s.split('&').join('&').split('<').join('<').split('>').join('>').split('"').join('"');
- },
- _qualifyURL: function(url) {
- var el = document.createElement('div');
- el.innerHTML= 'x';
- return el.firstChild.href;
- },
- _absoluteMediaUrls: function(media) {
- var self = this;
- $.each(media, function(type, url) {
- if(url && self.format[type] && url.substr(0, 5) !== "data:") {
- media[type] = self._qualifyURL(url);
- }
- });
- return media;
- },
- addStateClass: function(state) {
- if(this.ancestorJq.length) {
- this.ancestorJq.addClass(this.options.stateClass[state]);
- }
- },
- removeStateClass: function(state) {
- if(this.ancestorJq.length) {
- this.ancestorJq.removeClass(this.options.stateClass[state]);
- }
- },
- setMedia: function(media) {
-
- /* media[format] = String: URL of format. Must contain all of the supplied option's video or audio formats.
- * media.poster = String: Video poster URL.
- * media.track = Array: Of objects defining the track element: kind, src, srclang, label, def.
- * media.stream = Boolean: * NOT IMPLEMENTED * Designating actual media streams. ie., "false/undefined" for files. Plan to refresh the flash every so often.
- */
-
- var self = this,
- supported = false,
- posterChanged = this.status.media.poster !== media.poster; // Compare before reset. Important for OSX Safari as this.htmlElement.poster.src is absolute, even if original poster URL was relative.
-
- this._resetMedia();
- this._resetGate();
- this._resetActive();
-
- // Clear the Android Fix.
- this.androidFix.setMedia = false;
- this.androidFix.play = false;
- this.androidFix.pause = false;
-
- // Convert all media URLs to absolute URLs.
- media = this._absoluteMediaUrls(media);
-
- $.each(this.formats, function(formatPriority, format) {
- var isVideo = self.format[format].media === 'video';
- $.each(self.solutions, function(solutionPriority, solution) {
- if(self[solution].support[format] && self._validString(media[format])) { // Format supported in solution and url given for format.
- var isHtml = solution === 'html';
- var isAurora = solution === 'aurora';
-
- if(isVideo) {
- if(isHtml) {
- self.html.video.gate = true;
- self._html_setVideo(media);
- self.html.active = true;
- } else {
- self.flash.gate = true;
- self._flash_setVideo(media);
- self.flash.active = true;
- }
- if(self.css.jq.videoPlay.length) {
- self.css.jq.videoPlay.show();
- }
- self.status.video = true;
- } else {
- if(isHtml) {
- self.html.audio.gate = true;
- self._html_setAudio(media);
- self.html.active = true;
-
- // Setup the Android Fix - Only for HTML audio.
- if($.jPlayer.platform.android) {
- self.androidFix.setMedia = true;
- }
- } else if(isAurora) {
- self.aurora.gate = true;
- self._aurora_setAudio(media);
- self.aurora.active = true;
- } else {
- self.flash.gate = true;
- self._flash_setAudio(media);
- self.flash.active = true;
- }
- if(self.css.jq.videoPlay.length) {
- self.css.jq.videoPlay.hide();
- }
- self.status.video = false;
- }
-
- supported = true;
- return false; // Exit $.each
- }
- });
- if(supported) {
- return false; // Exit $.each
- }
- });
-
- if(supported) {
- if(!(this.status.nativeVideoControls && this.html.video.gate)) {
- // Set poster IMG if native video controls are not being used
- // Note: With IE the IMG onload event occurs immediately when cached.
- // Note: Poster hidden by default in _resetMedia()
- if(this._validString(media.poster)) {
- if(posterChanged) { // Since some browsers do not generate img onload event.
- this.htmlElement.poster.src = media.poster;
- } else {
- this.internal.poster.jq.show();
- }
- }
- }
- if(typeof media.title === 'string') {
- if(this.css.jq.title.length) {
- this.css.jq.title.html(media.title);
- }
- if(this.htmlElement.audio) {
- this.htmlElement.audio.setAttribute('title', media.title);
- }
- if(this.htmlElement.video) {
- this.htmlElement.video.setAttribute('title', media.title);
- }
- }
- this.status.srcSet = true;
- this.status.media = $.extend({}, media);
- this._updateButtons(false);
- this._updateInterface();
- this._trigger($.jPlayer.event.setmedia);
- } else { // jPlayer cannot support any formats provided in this browser
- // Send an error event
- this._error( {
- type: $.jPlayer.error.NO_SUPPORT,
- context: "{supplied:'" + this.options.supplied + "'}",
- message: $.jPlayer.errorMsg.NO_SUPPORT,
- hint: $.jPlayer.errorHint.NO_SUPPORT
- });
- }
- },
- _resetMedia: function() {
- this._resetStatus();
- this._updateButtons(false);
- this._updateInterface();
- this._seeked();
- this.internal.poster.jq.hide();
-
- clearTimeout(this.internal.htmlDlyCmdId);
-
- if(this.html.active) {
- this._html_resetMedia();
- } else if(this.aurora.active) {
- this._aurora_resetMedia();
- } else if(this.flash.active) {
- this._flash_resetMedia();
- }
- },
- clearMedia: function() {
- this._resetMedia();
-
- if(this.html.active) {
- this._html_clearMedia();
- } else if(this.aurora.active) {
- this._aurora_clearMedia();
- } else if(this.flash.active) {
- this._flash_clearMedia();
- }
-
- this._resetGate();
- this._resetActive();
- },
- load: function() {
- if(this.status.srcSet) {
- if(this.html.active) {
- this._html_load();
- } else if(this.aurora.active) {
- this._aurora_load();
- } else if(this.flash.active) {
- this._flash_load();
- }
- } else {
- this._urlNotSetError("load");
- }
- },
- focus: function() {
- if(this.options.keyEnabled) {
- $.jPlayer.focus = this;
- }
- },
- play: function(time) {
- var guiAction = typeof time === "object"; // Flags GUI click events so we know this was not a direct command, but an action taken by the user on the GUI.
- if(guiAction && this.options.useStateClassSkin && !this.status.paused) {
- this.pause(time); // The time would be the click event, but passing it over so info is not lost.
- } else {
- time = (typeof time === "number") ? time : NaN; // Remove jQuery event from click handler
- if(this.status.srcSet) {
- this.focus();
- if(this.html.active) {
- this._html_play(time);
- } else if(this.aurora.active) {
- this._aurora_play(time);
- } else if(this.flash.active) {
- this._flash_play(time);
- }
- } else {
- this._urlNotSetError("play");
- }
- }
- },
- videoPlay: function() { // Handles clicks on the play button over the video poster
- this.play();
- },
- pause: function(time) {
- time = (typeof time === "number") ? time : NaN; // Remove jQuery event from click handler
- if(this.status.srcSet) {
- if(this.html.active) {
- this._html_pause(time);
- } else if(this.aurora.active) {
- this._aurora_pause(time);
- } else if(this.flash.active) {
- this._flash_pause(time);
- }
- } else {
- this._urlNotSetError("pause");
- }
- },
- tellOthers: function(command, conditions) {
- var self = this,
- hasConditions = typeof conditions === 'function',
- args = Array.prototype.slice.call(arguments); // Convert arguments to an Array.
-
- if(typeof command !== 'string') { // Ignore, since no command.
- return; // Return undefined to maintain chaining.
- }
- if(hasConditions) {
- args.splice(1, 1); // Remove the conditions from the arguments
- }
-
- $.jPlayer.prototype.destroyRemoved();
- $.each(this.instances, function() {
- // Remember that "this" is the instance's "element" in the $.each() loop.
- if(self.element !== this) { // Do not tell my instance.
- if(!hasConditions || conditions.call(this.data("jPlayer"), self)) {
- this.jPlayer.apply(this, args);
- }
- }
- });
- },
- pauseOthers: function(time) {
- this.tellOthers("pause", function() {
- // In the conditions function, the "this" context is the other instance's jPlayer object.
- return this.status.srcSet;
- }, time);
- },
- stop: function() {
- if(this.status.srcSet) {
- if(this.html.active) {
- this._html_pause(0);
- } else if(this.aurora.active) {
- this._aurora_pause(0);
- } else if(this.flash.active) {
- this._flash_pause(0);
- }
- } else {
- this._urlNotSetError("stop");
- }
- },
- playHead: function(p) {
- p = this._limitValue(p, 0, 100);
- if(this.status.srcSet) {
- if(this.html.active) {
- this._html_playHead(p);
- } else if(this.aurora.active) {
- this._aurora_playHead(p);
- } else if(this.flash.active) {
- this._flash_playHead(p);
- }
- } else {
- this._urlNotSetError("playHead");
- }
- },
- _muted: function(muted) {
- this.mutedWorker(muted);
- if(this.options.globalVolume) {
- this.tellOthers("mutedWorker", function() {
- // Check the other instance has global volume enabled.
- return this.options.globalVolume;
- }, muted);
- }
- },
- mutedWorker: function(muted) {
- this.options.muted = muted;
- if(this.html.used) {
- this._html_setProperty('muted', muted);
- }
- if(this.aurora.used) {
- this._aurora_mute(muted);
- }
- if(this.flash.used) {
- this._flash_mute(muted);
- }
-
- // The HTML solution generates this event from the media element itself.
- if(!this.html.video.gate && !this.html.audio.gate) {
- this._updateMute(muted);
- this._updateVolume(this.options.volume);
- this._trigger($.jPlayer.event.volumechange);
- }
- },
- mute: function(mute) { // mute is either: undefined (true), an event object (true) or a boolean (muted).
- var guiAction = typeof mute === "object"; // Flags GUI click events so we know this was not a direct command, but an action taken by the user on the GUI.
- if(guiAction && this.options.useStateClassSkin && this.options.muted) {
- this._muted(false);
- } else {
- mute = mute === undefined ? true : !!mute;
- this._muted(mute);
- }
- },
- unmute: function(unmute) { // unmute is either: undefined (true), an event object (true) or a boolean (!muted).
- unmute = unmute === undefined ? true : !!unmute;
- this._muted(!unmute);
- },
- _updateMute: function(mute) {
- if(mute === undefined) {
- mute = this.options.muted;
- }
- if(mute) {
- this.addStateClass('muted');
- } else {
- this.removeStateClass('muted');
- }
- if(this.css.jq.mute.length && this.css.jq.unmute.length) {
- if(this.status.noVolume) {
- this.css.jq.mute.hide();
- this.css.jq.unmute.hide();
- } else if(mute) {
- this.css.jq.mute.hide();
- this.css.jq.unmute.show();
- } else {
- this.css.jq.mute.show();
- this.css.jq.unmute.hide();
- }
- }
- },
- volume: function(v) {
- this.volumeWorker(v);
- if(this.options.globalVolume) {
- this.tellOthers("volumeWorker", function() {
- // Check the other instance has global volume enabled.
- return this.options.globalVolume;
- }, v);
- }
- },
- volumeWorker: function(v) {
- v = this._limitValue(v, 0, 1);
- this.options.volume = v;
-
- if(this.html.used) {
- this._html_setProperty('volume', v);
- }
- if(this.aurora.used) {
- this._aurora_volume(v);
- }
- if(this.flash.used) {
- this._flash_volume(v);
- }
-
- // The HTML solution generates this event from the media element itself.
- if(!this.html.video.gate && !this.html.audio.gate) {
- this._updateVolume(v);
- this._trigger($.jPlayer.event.volumechange);
- }
- },
- volumeBar: function(e) { // Handles clicks on the volumeBar
- if(this.css.jq.volumeBar.length) {
- // Using $(e.currentTarget) to enable multiple volume bars
- var $bar = $(e.currentTarget),
- offset = $bar.offset(),
- x = e.pageX - offset.left,
- w = $bar.width(),
- y = $bar.height() - e.pageY + offset.top,
- h = $bar.height();
- if(this.options.verticalVolume) {
- this.volume(y/h);
- } else {
- this.volume(x/w);
- }
- }
- if(this.options.muted) {
- this._muted(false);
- }
- },
- _updateVolume: function(v) {
- if(v === undefined) {
- v = this.options.volume;
- }
- v = this.options.muted ? 0 : v;
-
- if(this.status.noVolume) {
- this.addStateClass('noVolume');
- if(this.css.jq.volumeBar.length) {
- this.css.jq.volumeBar.hide();
- }
- if(this.css.jq.volumeBarValue.length) {
- this.css.jq.volumeBarValue.hide();
- }
- if(this.css.jq.volumeMax.length) {
- this.css.jq.volumeMax.hide();
- }
- } else {
- this.removeStateClass('noVolume');
- if(this.css.jq.volumeBar.length) {
- this.css.jq.volumeBar.show();
- }
- if(this.css.jq.volumeBarValue.length) {
- this.css.jq.volumeBarValue.show();
- this.css.jq.volumeBarValue[this.options.verticalVolume ? "height" : "width"]((v*100)+"%");
- }
- if(this.css.jq.volumeMax.length) {
- this.css.jq.volumeMax.show();
- }
- }
- },
- volumeMax: function() { // Handles clicks on the volume max
- this.volume(1);
- if(this.options.muted) {
- this._muted(false);
- }
- },
- _cssSelectorAncestor: function(ancestor) {
- var self = this;
- this.options.cssSelectorAncestor = ancestor;
- this._removeUiClass();
- this.ancestorJq = ancestor ? $(ancestor) : []; // Would use $() instead of [], but it is only 1.4+
- if(ancestor && this.ancestorJq.length !== 1) { // So empty strings do not generate the warning.
- this._warning( {
- type: $.jPlayer.warning.CSS_SELECTOR_COUNT,
- context: ancestor,
- message: $.jPlayer.warningMsg.CSS_SELECTOR_COUNT + this.ancestorJq.length + " found for cssSelectorAncestor.",
- hint: $.jPlayer.warningHint.CSS_SELECTOR_COUNT
- });
- }
- this._addUiClass();
- $.each(this.options.cssSelector, function(fn, cssSel) {
- self._cssSelector(fn, cssSel);
- });
-
- // Set the GUI to the current state.
- this._updateInterface();
- this._updateButtons();
- this._updateAutohide();
- this._updateVolume();
- this._updateMute();
- },
- _cssSelector: function(fn, cssSel) {
- var self = this;
- if(typeof cssSel === 'string') {
- if($.jPlayer.prototype.options.cssSelector[fn]) {
- if(this.css.jq[fn] && this.css.jq[fn].length) {
- this.css.jq[fn].unbind(".jPlayer");
- }
- this.options.cssSelector[fn] = cssSel;
- this.css.cs[fn] = this.options.cssSelectorAncestor + " " + cssSel;
-
- if(cssSel) { // Checks for empty string
- this.css.jq[fn] = $(this.css.cs[fn]);
- } else {
- this.css.jq[fn] = []; // To comply with the css.jq[fn].length check before its use. As of jQuery 1.4 could have used $() for an empty set.
- }
-
- if(this.css.jq[fn].length && this[fn]) {
- var handler = function(e) {
- e.preventDefault();
- self[fn](e);
- if(self.options.autoBlur) {
- $(this).blur();
- } else {
- $(this).focus(); // Force focus for ARIA.
- }
- };
- this.css.jq[fn].bind("click.jPlayer", handler); // Using jPlayer namespace
- }
-
- if(cssSel && this.css.jq[fn].length !== 1) { // So empty strings do not generate the warning. ie., they just remove the old one.
- this._warning( {
- type: $.jPlayer.warning.CSS_SELECTOR_COUNT,
- context: this.css.cs[fn],
- message: $.jPlayer.warningMsg.CSS_SELECTOR_COUNT + this.css.jq[fn].length + " found for " + fn + " method.",
- hint: $.jPlayer.warningHint.CSS_SELECTOR_COUNT
- });
- }
- } else {
- this._warning( {
- type: $.jPlayer.warning.CSS_SELECTOR_METHOD,
- context: fn,
- message: $.jPlayer.warningMsg.CSS_SELECTOR_METHOD,
- hint: $.jPlayer.warningHint.CSS_SELECTOR_METHOD
- });
- }
- } else {
- this._warning( {
- type: $.jPlayer.warning.CSS_SELECTOR_STRING,
- context: cssSel,
- message: $.jPlayer.warningMsg.CSS_SELECTOR_STRING,
- hint: $.jPlayer.warningHint.CSS_SELECTOR_STRING
- });
- }
- },
- duration: function(e) {
- if(this.options.toggleDuration) {
- if(this.options.captureDuration) {
- e.stopPropagation();
- }
- this._setOption("remainingDuration", !this.options.remainingDuration);
- }
- },
- seekBar: function(e) { // Handles clicks on the seekBar
- if(this.css.jq.seekBar.length) {
- // Using $(e.currentTarget) to enable multiple seek bars
- var $bar = $(e.currentTarget),
- offset = $bar.offset(),
- x = e.pageX - offset.left,
- w = $bar.width(),
- p = 100 * x / w;
- this.playHead(p);
- }
- },
- playbackRate: function(pbr) {
- this._setOption("playbackRate", pbr);
- },
- playbackRateBar: function(e) { // Handles clicks on the playbackRateBar
- if(this.css.jq.playbackRateBar.length) {
- // Using $(e.currentTarget) to enable multiple playbackRate bars
- var $bar = $(e.currentTarget),
- offset = $bar.offset(),
- x = e.pageX - offset.left,
- w = $bar.width(),
- y = $bar.height() - e.pageY + offset.top,
- h = $bar.height(),
- ratio, pbr;
- if(this.options.verticalPlaybackRate) {
- ratio = y/h;
- } else {
- ratio = x/w;
- }
- pbr = ratio * (this.options.maxPlaybackRate - this.options.minPlaybackRate) + this.options.minPlaybackRate;
- this.playbackRate(pbr);
- }
- },
- _updatePlaybackRate: function() {
- var pbr = this.options.playbackRate,
- ratio = (pbr - this.options.minPlaybackRate) / (this.options.maxPlaybackRate - this.options.minPlaybackRate);
- if(this.status.playbackRateEnabled) {
- if(this.css.jq.playbackRateBar.length) {
- this.css.jq.playbackRateBar.show();
- }
- if(this.css.jq.playbackRateBarValue.length) {
- this.css.jq.playbackRateBarValue.show();
- this.css.jq.playbackRateBarValue[this.options.verticalPlaybackRate ? "height" : "width"]((ratio*100)+"%");
- }
- } else {
- if(this.css.jq.playbackRateBar.length) {
- this.css.jq.playbackRateBar.hide();
- }
- if(this.css.jq.playbackRateBarValue.length) {
- this.css.jq.playbackRateBarValue.hide();
- }
- }
- },
- repeat: function(event) { // Handle clicks on the repeat button
- var guiAction = typeof event === "object"; // Flags GUI click events so we know this was not a direct command, but an action taken by the user on the GUI.
- if(guiAction && this.options.useStateClassSkin && this.options.loop) {
- this._loop(false);
- } else {
- this._loop(true);
- }
- },
- repeatOff: function() { // Handle clicks on the repeatOff button
- this._loop(false);
- },
- _loop: function(loop) {
- if(this.options.loop !== loop) {
- this.options.loop = loop;
- this._updateButtons();
- this._trigger($.jPlayer.event.repeat);
- }
- },
-
- // Options code adapted from ui.widget.js (1.8.7). Made changes so the key can use dot notation. To match previous getData solution in jPlayer 1.
- option: function(key, value) {
- var options = key;
-
- // Enables use: options(). Returns a copy of options object
- if ( arguments.length === 0 ) {
- return $.extend( true, {}, this.options );
- }
-
- if(typeof key === "string") {
- var keys = key.split(".");
-
- // Enables use: options("someOption") Returns a copy of the option. Supports dot notation.
- if(value === undefined) {
-
- var opt = $.extend(true, {}, this.options);
- for(var i = 0; i < keys.length; i++) {
- if(opt[keys[i]] !== undefined) {
- opt = opt[keys[i]];
- } else {
- this._warning( {
- type: $.jPlayer.warning.OPTION_KEY,
- context: key,
- message: $.jPlayer.warningMsg.OPTION_KEY,
- hint: $.jPlayer.warningHint.OPTION_KEY
- });
- return undefined;
- }
- }
- return opt;
- }
-
- // Enables use: options("someOptionObject", someObject}). Creates: {someOptionObject:someObject}
- // Enables use: options("someOption", someValue). Creates: {someOption:someValue}
- // Enables use: options("someOptionObject.someOption", someValue). Creates: {someOptionObject:{someOption:someValue}}
-
- options = {};
- var opts = options;
-
- for(var j = 0; j < keys.length; j++) {
- if(j < keys.length - 1) {
- opts[keys[j]] = {};
- opts = opts[keys[j]];
- } else {
- opts[keys[j]] = value;
- }
- }
- }
-
- // Otherwise enables use: options(optionObject). Uses original object (the key)
-
- this._setOptions(options);
-
- return this;
- },
- _setOptions: function(options) {
- var self = this;
- $.each(options, function(key, value) { // This supports the 2 level depth that the options of jPlayer has. Would review if we ever need more depth.
- self._setOption(key, value);
- });
-
- return this;
- },
- _setOption: function(key, value) {
- var self = this;
-
- // The ability to set options is limited at this time.
-
- switch(key) {
- case "volume" :
- this.volume(value);
- break;
- case "muted" :
- this._muted(value);
- break;
- case "globalVolume" :
- this.options[key] = value;
- break;
- case "cssSelectorAncestor" :
- this._cssSelectorAncestor(value); // Set and refresh all associations for the new ancestor.
- break;
- case "cssSelector" :
- $.each(value, function(fn, cssSel) {
- self._cssSelector(fn, cssSel); // NB: The option is set inside this function, after further validity checks.
- });
- break;
- case "playbackRate" :
- this.options[key] = value = this._limitValue(value, this.options.minPlaybackRate, this.options.maxPlaybackRate);
- if(this.html.used) {
- this._html_setProperty('playbackRate', value);
- }
- this._updatePlaybackRate();
- break;
- case "defaultPlaybackRate" :
- this.options[key] = value = this._limitValue(value, this.options.minPlaybackRate, this.options.maxPlaybackRate);
- if(this.html.used) {
- this._html_setProperty('defaultPlaybackRate', value);
- }
- this._updatePlaybackRate();
- break;
- case "minPlaybackRate" :
- this.options[key] = value = this._limitValue(value, 0.1, this.options.maxPlaybackRate - 0.1);
- this._updatePlaybackRate();
- break;
- case "maxPlaybackRate" :
- this.options[key] = value = this._limitValue(value, this.options.minPlaybackRate + 0.1, 16);
- this._updatePlaybackRate();
- break;
- case "fullScreen" :
- if(this.options[key] !== value) { // if changed
- var wkv = $.jPlayer.nativeFeatures.fullscreen.used.webkitVideo;
- if(!wkv || wkv && !this.status.waitForPlay) {
- if(!wkv) { // No sensible way to unset option on these devices.
- this.options[key] = value;
- }
- if(value) {
- this._requestFullscreen();
- } else {
- this._exitFullscreen();
- }
- if(!wkv) {
- this._setOption("fullWindow", value);
- }
- }
- }
- break;
- case "fullWindow" :
- if(this.options[key] !== value) { // if changed
- this._removeUiClass();
- this.options[key] = value;
- this._refreshSize();
- }
- break;
- case "size" :
- if(!this.options.fullWindow && this.options[key].cssClass !== value.cssClass) {
- this._removeUiClass();
- }
- this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed.
- this._refreshSize();
- break;
- case "sizeFull" :
- if(this.options.fullWindow && this.options[key].cssClass !== value.cssClass) {
- this._removeUiClass();
- }
- this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed.
- this._refreshSize();
- break;
- case "autohide" :
- this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed.
- this._updateAutohide();
- break;
- case "loop" :
- this._loop(value);
- break;
- case "remainingDuration" :
- this.options[key] = value;
- this._updateInterface();
- break;
- case "toggleDuration" :
- this.options[key] = value;
- break;
- case "nativeVideoControls" :
- this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed.
- this.status.nativeVideoControls = this._uaBlocklist(this.options.nativeVideoControls);
- this._restrictNativeVideoControls();
- this._updateNativeVideoControls();
- break;
- case "noFullWindow" :
- this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed.
- this.status.nativeVideoControls = this._uaBlocklist(this.options.nativeVideoControls); // Need to check again as noFullWindow can depend on this flag and the restrict() can override it.
- this.status.noFullWindow = this._uaBlocklist(this.options.noFullWindow);
- this._restrictNativeVideoControls();
- this._updateButtons();
- break;
- case "noVolume" :
- this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed.
- this.status.noVolume = this._uaBlocklist(this.options.noVolume);
- this._updateVolume();
- this._updateMute();
- break;
- case "emulateHtml" :
- if(this.options[key] !== value) { // To avoid multiple event handlers being created, if true already.
- this.options[key] = value;
- if(value) {
- this._emulateHtmlBridge();
- } else {
- this._destroyHtmlBridge();
- }
- }
- break;
- case "timeFormat" :
- this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed.
- break;
- case "keyEnabled" :
- this.options[key] = value;
- if(!value && this === $.jPlayer.focus) {
- $.jPlayer.focus = null;
- }
- break;
- case "keyBindings" :
- this.options[key] = $.extend(true, {}, this.options[key], value); // store a merged DEEP copy of it, incase not all properties changed.
- break;
- case "audioFullScreen" :
- this.options[key] = value;
- break;
- case "autoBlur" :
- this.options[key] = value;
- break;
- }
-
- return this;
- },
- // End of: (Options code adapted from ui.widget.js)
-
- _refreshSize: function() {
- this._setSize(); // update status and jPlayer element size
- this._addUiClass(); // update the ui class
- this._updateSize(); // update internal sizes
- this._updateButtons();
- this._updateAutohide();
- this._trigger($.jPlayer.event.resize);
- },
- _setSize: function() {
- // Determine the current size from the options
- if(this.options.fullWindow) {
- this.status.width = this.options.sizeFull.width;
- this.status.height = this.options.sizeFull.height;
- this.status.cssClass = this.options.sizeFull.cssClass;
- } else {
- this.status.width = this.options.size.width;
- this.status.height = this.options.size.height;
- this.status.cssClass = this.options.size.cssClass;
- }
-
- // Set the size of the jPlayer area.
- this.element.css({'width': this.status.width, 'height': this.status.height});
- },
- _addUiClass: function() {
- if(this.ancestorJq.length) {
- this.ancestorJq.addClass(this.status.cssClass);
- }
- },
- _removeUiClass: function() {
- if(this.ancestorJq.length) {
- this.ancestorJq.removeClass(this.status.cssClass);
- }
- },
- _updateSize: function() {
- // The poster uses show/hide so can simply resize it.
- this.internal.poster.jq.css({'width': this.status.width, 'height': this.status.height});
-
- // Video html or flash resized if necessary at this time, or if native video controls being used.
- if(!this.status.waitForPlay && this.html.active && this.status.video || this.html.video.available && this.html.used && this.status.nativeVideoControls) {
- this.internal.video.jq.css({'width': this.status.width, 'height': this.status.height});
- }
- else if(!this.status.waitForPlay && this.flash.active && this.status.video) {
- this.internal.flash.jq.css({'width': this.status.width, 'height': this.status.height});
- }
- },
- _updateAutohide: function() {
- var self = this,
- event = "mousemove.jPlayer",
- namespace = ".jPlayerAutohide",
- eventType = event + namespace,
- handler = function(event) {
- var moved = false,
- deltaX, deltaY;
- if(typeof self.internal.mouse !== "undefined") {
- //get the change from last position to this position
- deltaX = self.internal.mouse.x - event.pageX;
- deltaY = self.internal.mouse.y - event.pageY;
- moved = (Math.floor(deltaX) > 0) || (Math.floor(deltaY)>0);
- } else {
- moved = true;
- }
- // store current position for next method execution
- self.internal.mouse = {
- x : event.pageX,
- y : event.pageY
- };
- // if mouse has been actually moved, do the gui fadeIn/fadeOut
- if (moved) {
- self.css.jq.gui.fadeIn(self.options.autohide.fadeIn, function() {
- clearTimeout(self.internal.autohideId);
- self.internal.autohideId = setTimeout( function() {
- self.css.jq.gui.fadeOut(self.options.autohide.fadeOut);
- }, self.options.autohide.hold);
- });
- }
- };
-
- if(this.css.jq.gui.length) {
-
- // End animations first so that its callback is executed now.
- // Otherwise an in progress fadeIn animation still has the callback to fadeOut again.
- this.css.jq.gui.stop(true, true);
-
- // Removes the fadeOut operation from the fadeIn callback.
- clearTimeout(this.internal.autohideId);
- // undefine mouse
- delete this.internal.mouse;
-
- this.element.unbind(namespace);
- this.css.jq.gui.unbind(namespace);
-
- if(!this.status.nativeVideoControls) {
- if(this.options.fullWindow && this.options.autohide.full || !this.options.fullWindow && this.options.autohide.restored) {
- this.element.bind(eventType, handler);
- this.css.jq.gui.bind(eventType, handler);
- this.css.jq.gui.hide();
- } else {
- this.css.jq.gui.show();
- }
- } else {
- this.css.jq.gui.hide();
- }
- }
- },
- fullScreen: function(event) {
- var guiAction = typeof event === "object"; // Flags GUI click events so we know this was not a direct command, but an action taken by the user on the GUI.
- if(guiAction && this.options.useStateClassSkin && this.options.fullScreen) {
- this._setOption("fullScreen", false);
- } else {
- this._setOption("fullScreen", true);
- }
- },
- restoreScreen: function() {
- this._setOption("fullScreen", false);
- },
- _fullscreenAddEventListeners: function() {
- var self = this,
- fs = $.jPlayer.nativeFeatures.fullscreen;
-
- if(fs.api.fullscreenEnabled) {
- if(fs.event.fullscreenchange) {
- // Create the event handler function and store it for removal.
- if(typeof this.internal.fullscreenchangeHandler !== 'function') {
- this.internal.fullscreenchangeHandler = function() {
- self._fullscreenchange();
- };
- }
- document.addEventListener(fs.event.fullscreenchange, this.internal.fullscreenchangeHandler, false);
- }
- // No point creating handler for fullscreenerror.
- // Either logic avoids fullscreen occurring (w3c/moz), or their is no event on the browser (webkit).
- }
- },
- _fullscreenRemoveEventListeners: function() {
- var fs = $.jPlayer.nativeFeatures.fullscreen;
- if(this.internal.fullscreenchangeHandler) {
- document.removeEventListener(fs.event.fullscreenchange, this.internal.fullscreenchangeHandler, false);
- }
- },
- _fullscreenchange: function() {
- // If nothing is fullscreen, then we cannot be in fullscreen mode.
- if(this.options.fullScreen && !$.jPlayer.nativeFeatures.fullscreen.api.fullscreenElement()) {
- this._setOption("fullScreen", false);
- }
- },
- _requestFullscreen: function() {
- // Either the container or the jPlayer div
- var e = this.ancestorJq.length ? this.ancestorJq[0] : this.element[0],
- fs = $.jPlayer.nativeFeatures.fullscreen;
-
- // This method needs the video element. For iOS and Android.
- if(fs.used.webkitVideo) {
- e = this.htmlElement.video;
- }
-
- if(fs.api.fullscreenEnabled) {
- fs.api.requestFullscreen(e);
- }
- },
- _exitFullscreen: function() {
-
- var fs = $.jPlayer.nativeFeatures.fullscreen,
- e;
-
- // This method needs the video element. For iOS and Android.
- if(fs.used.webkitVideo) {
- e = this.htmlElement.video;
- }
-
- if(fs.api.fullscreenEnabled) {
- fs.api.exitFullscreen(e);
- }
- },
- _html_initMedia: function(media) {
- // Remove any existing track elements
- var $media = $(this.htmlElement.media).empty();
-
- // Create any track elements given with the media, as an Array of track Objects.
- $.each(media.track || [], function(i,v) {
- var track = document.createElement('track');
- track.setAttribute("kind", v.kind ? v.kind : "");
- track.setAttribute("src", v.src ? v.src : "");
- track.setAttribute("srclang", v.srclang ? v.srclang : "");
- track.setAttribute("label", v.label ? v.label : "");
- if(v.def) {
- track.setAttribute("default", v.def);
- }
- $media.append(track);
- });
-
- this.htmlElement.media.src = this.status.src;
-
- if(this.options.preload !== 'none') {
- this._html_load(); // See function for comments
- }
- this._trigger($.jPlayer.event.timeupdate); // The flash generates this event for its solution.
- },
- _html_setFormat: function(media) {
- var self = this;
- // Always finds a format due to checks in setMedia()
- $.each(this.formats, function(priority, format) {
- if(self.html.support[format] && media[format]) {
- self.status.src = media[format];
- self.status.format[format] = true;
- self.status.formatType = format;
- return false;
- }
- });
- },
- _html_setAudio: function(media) {
- this._html_setFormat(media);
- this.htmlElement.media = this.htmlElement.audio;
- this._html_initMedia(media);
- },
- _html_setVideo: function(media) {
- this._html_setFormat(media);
- if(this.status.nativeVideoControls) {
- this.htmlElement.video.poster = this._validString(media.poster) ? media.poster : "";
- }
- this.htmlElement.media = this.htmlElement.video;
- this._html_initMedia(media);
- },
- _html_resetMedia: function() {
- if(this.htmlElement.media) {
- if(this.htmlElement.media.id === this.internal.video.id && !this.status.nativeVideoControls) {
- this.internal.video.jq.css({'width':'0px', 'height':'0px'});
- }
- this.htmlElement.media.pause();
- }
- },
- _html_clearMedia: function() {
- if(this.htmlElement.media) {
- this.htmlElement.media.src = "about:blank";
- // The following load() is only required for Firefox 3.6 (PowerMacs).
- // Recent HTMl5 browsers only require the src change. Due to changes in W3C spec and load() effect.
- this.htmlElement.media.load(); // Stops an old, "in progress" download from continuing the download. Triggers the loadstart, error and emptied events, due to the empty src. Also an abort event if a download was in progress.
- }
- },
- _html_load: function() {
- // This function remains to allow the early HTML5 browsers to work, such as Firefox 3.6
- // A change in the W3C spec for the media.load() command means that this is no longer necessary.
- // This command should be removed and actually causes minor undesirable effects on some browsers. Such as loading the whole file and not only the metadata.
- if(this.status.waitForLoad) {
- this.status.waitForLoad = false;
- this.htmlElement.media.load();
- }
- clearTimeout(this.internal.htmlDlyCmdId);
- },
- _html_play: function(time) {
- var self = this,
- media = this.htmlElement.media;
-
- this.androidFix.pause = false; // Cancel the pause fix.
-
- this._html_load(); // Loads if required and clears any delayed commands.
-
- // Setup the Android Fix.
- if(this.androidFix.setMedia) {
- this.androidFix.play = true;
- this.androidFix.time = time;
-
- } else if(!isNaN(time)) {
-
- // Attempt to play it, since iOS has been ignoring commands
- if(this.internal.cmdsIgnored) {
- media.play();
- }
-
- try {
- // !media.seekable is for old HTML5 browsers, like Firefox 3.6.
- // Checking seekable.length is important for iOS6 to work with setMedia().play(time)
- if(!media.seekable || typeof media.seekable === "object" && media.seekable.length > 0) {
- media.currentTime = time;
- media.play();
- } else {
- throw 1;
- }
- } catch(err) {
- this.internal.htmlDlyCmdId = setTimeout(function() {
- self.play(time);
- }, 250);
- return; // Cancel execution and wait for the delayed command.
- }
- } else {
- media.play();
- }
- this._html_checkWaitForPlay();
- },
- _html_pause: function(time) {
- var self = this,
- media = this.htmlElement.media;
-
- this.androidFix.play = false; // Cancel the play fix.
-
- if(time > 0) { // We do not want the stop() command, which does pause(0), causing a load operation.
- this._html_load(); // Loads if required and clears any delayed commands.
- } else {
- clearTimeout(this.internal.htmlDlyCmdId);
- }
-
- // Order of these commands is important for Safari (Win) and IE9. Pause then change currentTime.
- media.pause();
-
- // Setup the Android Fix.
- if(this.androidFix.setMedia) {
- this.androidFix.pause = true;
- this.androidFix.time = time;
-
- } else if(!isNaN(time)) {
- try {
- if(!media.seekable || typeof media.seekable === "object" && media.seekable.length > 0) {
- media.currentTime = time;
- } else {
- throw 1;
- }
- } catch(err) {
- this.internal.htmlDlyCmdId = setTimeout(function() {
- self.pause(time);
- }, 250);
- return; // Cancel execution and wait for the delayed command.
- }
- }
- if(time > 0) { // Avoids a setMedia() followed by stop() or pause(0) hiding the video play button.
- this._html_checkWaitForPlay();
- }
- },
- _html_playHead: function(percent) {
- var self = this,
- media = this.htmlElement.media;
-
- this._html_load(); // Loads if required and clears any delayed commands.
-
- // This playHead() method needs a refactor to apply the android fix.
-
- try {
- if(typeof media.seekable === "object" && media.seekable.length > 0) {
- media.currentTime = percent * media.seekable.end(media.seekable.length-1) / 100;
- } else if(media.duration > 0 && !isNaN(media.duration)) {
- media.currentTime = percent * media.duration / 100;
- } else {
- throw "e";
- }
- } catch(err) {
- this.internal.htmlDlyCmdId = setTimeout(function() {
- self.playHead(percent);
- }, 250);
- return; // Cancel execution and wait for the delayed command.
- }
- if(!this.status.waitForLoad) {
- this._html_checkWaitForPlay();
- }
- },
- _html_checkWaitForPlay: function() {
- if(this.status.waitForPlay) {
- this.status.waitForPlay = false;
- if(this.css.jq.videoPlay.length) {
- this.css.jq.videoPlay.hide();
- }
- if(this.status.video) {
- this.internal.poster.jq.hide();
- this.internal.video.jq.css({'width': this.status.width, 'height': this.status.height});
- }
- }
- },
- _html_setProperty: function(property, value) {
- if(this.html.audio.available) {
- this.htmlElement.audio[property] = value;
- }
- if(this.html.video.available) {
- this.htmlElement.video[property] = value;
- }
- },
- _aurora_setAudio: function(media) {
- var self = this;
-
- // Always finds a format due to checks in setMedia()
- $.each(this.formats, function(priority, format) {
- if(self.aurora.support[format] && media[format]) {
- self.status.src = media[format];
- self.status.format[format] = true;
- self.status.formatType = format;
-
- return false;
- }
- });
-
- this.aurora.player = new AV.Player.fromURL(this.status.src);
- this._addAuroraEventListeners(this.aurora.player, this.aurora);
-
- if(this.options.preload === 'auto') {
- this._aurora_load();
- this.status.waitForLoad = false;
- }
- },
- _aurora_resetMedia: function() {
- if (this.aurora.player) {
- this.aurora.player.stop();
- }
- },
- _aurora_clearMedia: function() {
- // Nothing to clear.
- },
- _aurora_load: function() {
- if(this.status.waitForLoad) {
- this.status.waitForLoad = false;
- this.aurora.player.preload();
- }
- },
- _aurora_play: function(time) {
- if (!this.status.waitForLoad) {
- if (!isNaN(time)) {
- this.aurora.player.seek(time);
- }
- }
- if (!this.aurora.player.playing) {
- this.aurora.player.play();
- }
- this.status.waitForLoad = false;
- this._aurora_checkWaitForPlay();
-
- // No event from the player, update UI now.
- this._updateButtons(true);
- this._trigger($.jPlayer.event.play);
- },
- _aurora_pause: function(time) {
- if (!isNaN(time)) {
- this.aurora.player.seek(time * 1000);
- }
- this.aurora.player.pause();
-
- if(time > 0) { // Avoids a setMedia() followed by stop() or pause(0) hiding the video play button.
- this._aurora_checkWaitForPlay();
- }
-
- // No event from the player, update UI now.
- this._updateButtons(false);
- this._trigger($.jPlayer.event.pause);
- },
- _aurora_playHead: function(percent) {
- if(this.aurora.player.duration > 0) {
- // The seek() sould be in milliseconds, but the only codec that works with seek (aac.js) uses seconds.
- this.aurora.player.seek(percent * this.aurora.player.duration / 100); // Using seconds
- }
-
- if(!this.status.waitForLoad) {
- this._aurora_checkWaitForPlay();
- }
- },
- _aurora_checkWaitForPlay: function() {
- if(this.status.waitForPlay) {
- this.status.waitForPlay = false;
- }
- },
- _aurora_volume: function(v) {
- this.aurora.player.volume = v * 100;
- },
- _aurora_mute: function(m) {
- if (m) {
- this.aurora.properties.lastvolume = this.aurora.player.volume;
- this.aurora.player.volume = 0;
- } else {
- this.aurora.player.volume = this.aurora.properties.lastvolume;
- }
- this.aurora.properties.muted = m;
- },
- _flash_setAudio: function(media) {
- var self = this;
- try {
- // Always finds a format due to checks in setMedia()
- $.each(this.formats, function(priority, format) {
- if(self.flash.support[format] && media[format]) {
- switch (format) {
- case "m4a" :
- case "fla" :
- self._getMovie().fl_setAudio_m4a(media[format]);
- break;
- case "mp3" :
- self._getMovie().fl_setAudio_mp3(media[format]);
- break;
- case "rtmpa":
- self._getMovie().fl_setAudio_rtmp(media[format]);
- break;
- }
- self.status.src = media[format];
- self.status.format[format] = true;
- self.status.formatType = format;
- return false;
- }
- });
-
- if(this.options.preload === 'auto') {
- this._flash_load();
- this.status.waitForLoad = false;
- }
- } catch(err) { this._flashError(err); }
- },
- _flash_setVideo: function(media) {
- var self = this;
- try {
- // Always finds a format due to checks in setMedia()
- $.each(this.formats, function(priority, format) {
- if(self.flash.support[format] && media[format]) {
- switch (format) {
- case "m4v" :
- case "flv" :
- self._getMovie().fl_setVideo_m4v(media[format]);
- break;
- case "rtmpv":
- self._getMovie().fl_setVideo_rtmp(media[format]);
- break;
- }
- self.status.src = media[format];
- self.status.format[format] = true;
- self.status.formatType = format;
- return false;
- }
- });
-
- if(this.options.preload === 'auto') {
- this._flash_load();
- this.status.waitForLoad = false;
- }
- } catch(err) { this._flashError(err); }
- },
- _flash_resetMedia: function() {
- this.internal.flash.jq.css({'width':'0px', 'height':'0px'}); // Must do via CSS as setting attr() to zero causes a jQuery error in IE.
- this._flash_pause(NaN);
- },
- _flash_clearMedia: function() {
- try {
- this._getMovie().fl_clearMedia();
- } catch(err) { this._flashError(err); }
- },
- _flash_load: function() {
- try {
- this._getMovie().fl_load();
- } catch(err) { this._flashError(err); }
- this.status.waitForLoad = false;
- },
- _flash_play: function(time) {
- try {
- this._getMovie().fl_play(time);
- } catch(err) { this._flashError(err); }
- this.status.waitForLoad = false;
- this._flash_checkWaitForPlay();
- },
- _flash_pause: function(time) {
- try {
- this._getMovie().fl_pause(time);
- } catch(err) { this._flashError(err); }
- if(time > 0) { // Avoids a setMedia() followed by stop() or pause(0) hiding the video play button.
- this.status.waitForLoad = false;
- this._flash_checkWaitForPlay();
- }
- },
- _flash_playHead: function(p) {
- try {
- this._getMovie().fl_play_head(p);
- } catch(err) { this._flashError(err); }
- if(!this.status.waitForLoad) {
- this._flash_checkWaitForPlay();
- }
- },
- _flash_checkWaitForPlay: function() {
- if(this.status.waitForPlay) {
- this.status.waitForPlay = false;
- if(this.css.jq.videoPlay.length) {
- this.css.jq.videoPlay.hide();
- }
- if(this.status.video) {
- this.internal.poster.jq.hide();
- this.internal.flash.jq.css({'width': this.status.width, 'height': this.status.height});
- }
- }
- },
- _flash_volume: function(v) {
- try {
- this._getMovie().fl_volume(v);
- } catch(err) { this._flashError(err); }
- },
- _flash_mute: function(m) {
- try {
- this._getMovie().fl_mute(m);
- } catch(err) { this._flashError(err); }
- },
- _getMovie: function() {
- return document[this.internal.flash.id];
- },
- _getFlashPluginVersion: function() {
-
- // _getFlashPluginVersion() code influenced by:
- // - FlashReplace 1.01: http://code.google.com/p/flashreplace/
- // - SWFObject 2.2: http://code.google.com/p/swfobject/
-
- var version = 0,
- flash;
- if(window.ActiveXObject) {
- try {
- flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
- if (flash) { // flash will return null when ActiveX is disabled
- var v = flash.GetVariable("$version");
- if(v) {
- v = v.split(" ")[1].split(",");
- version = parseInt(v[0], 10) + "." + parseInt(v[1], 10);
- }
- }
- } catch(e) {}
- }
- else if(navigator.plugins && navigator.mimeTypes.length > 0) {
- flash = navigator.plugins["Shockwave Flash"];
- if(flash) {
- version = navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/, "$1");
- }
- }
- return version * 1; // Converts to a number
- },
- _checkForFlash: function (version) {
- var flashOk = false;
- if(this._getFlashPluginVersion() >= version) {
- flashOk = true;
- }
- return flashOk;
- },
- _validString: function(url) {
- return (url && typeof url === "string"); // Empty strings return false
- },
- _limitValue: function(value, min, max) {
- return (value < min) ? min : ((value > max) ? max : value);
- },
- _urlNotSetError: function(context) {
- this._error( {
- type: $.jPlayer.error.URL_NOT_SET,
- context: context,
- message: $.jPlayer.errorMsg.URL_NOT_SET,
- hint: $.jPlayer.errorHint.URL_NOT_SET
- });
- },
- _flashError: function(error) {
- var errorType;
- if(!this.internal.ready) {
- errorType = "FLASH";
- } else {
- errorType = "FLASH_DISABLED";
- }
- this._error( {
- type: $.jPlayer.error[errorType],
- context: this.internal.flash.swf,
- message: $.jPlayer.errorMsg[errorType] + error.message,
- hint: $.jPlayer.errorHint[errorType]
- });
- // Allow the audio player to recover if display:none and then shown again, or with position:fixed on Firefox.
- // This really only affects audio in a media player, as an audio player could easily move the jPlayer element away from such issues.
- this.internal.flash.jq.css({'width':'1px', 'height':'1px'});
- },
- _error: function(error) {
- this._trigger($.jPlayer.event.error, error);
- if(this.options.errorAlerts) {
- this._alert("Error!" + (error.message ? "\n" + error.message : "") + (error.hint ? "\n" + error.hint : "") + "\nContext: " + error.context);
- }
- },
- _warning: function(warning) {
- this._trigger($.jPlayer.event.warning, undefined, warning);
- if(this.options.warningAlerts) {
- this._alert("Warning!" + (warning.message ? "\n" + warning.message : "") + (warning.hint ? "\n" + warning.hint : "") + "\nContext: " + warning.context);
- }
- },
- _alert: function(message) {
- var msg = "jPlayer " + this.version.script + " : id='" + this.internal.self.id +"' : " + message;
- if(!this.options.consoleAlerts) {
- alert(msg);
- } else if(window.console && window.console.log) {
- window.console.log(msg);
- }
- },
- _emulateHtmlBridge: function() {
- var self = this;
-
- // Emulate methods on jPlayer's DOM element.
- $.each( $.jPlayer.emulateMethods.split(/\s+/g), function(i, name) {
- self.internal.domNode[name] = function(arg) {
- self[name](arg);
- };
-
- });
-
- // Bubble jPlayer events to its DOM element.
- $.each($.jPlayer.event, function(eventName,eventType) {
- var nativeEvent = true;
- $.each( $.jPlayer.reservedEvent.split(/\s+/g), function(i, name) {
- if(name === eventName) {
- nativeEvent = false;
- return false;
- }
- });
- if(nativeEvent) {
- self.element.bind(eventType + ".jPlayer.jPlayerHtml", function() { // With .jPlayer & .jPlayerHtml namespaces.
- self._emulateHtmlUpdate();
- var domEvent = document.createEvent("Event");
- domEvent.initEvent(eventName, false, true);
- self.internal.domNode.dispatchEvent(domEvent);
- });
- }
- // The error event would require a special case
- });
-
- // IE9 has a readyState property on all elements. The document should have it, but all (except media) elements inherit it in IE9. This conflicts with Popcorn, which polls the readyState.
- },
- _emulateHtmlUpdate: function() {
- var self = this;
-
- $.each( $.jPlayer.emulateStatus.split(/\s+/g), function(i, name) {
- self.internal.domNode[name] = self.status[name];
- });
- $.each( $.jPlayer.emulateOptions.split(/\s+/g), function(i, name) {
- self.internal.domNode[name] = self.options[name];
- });
- },
- _destroyHtmlBridge: function() {
- var self = this;
-
- // Bridge event handlers are also removed by destroy() through .jPlayer namespace.
- this.element.unbind(".jPlayerHtml"); // Remove all event handlers created by the jPlayer bridge. So you can change the emulateHtml option.
-
- // Remove the methods and properties
- var emulated = $.jPlayer.emulateMethods + " " + $.jPlayer.emulateStatus + " " + $.jPlayer.emulateOptions;
- $.each( emulated.split(/\s+/g), function(i, name) {
- delete self.internal.domNode[name];
- });
- }
- };
-
- $.jPlayer.error = {
- FLASH: "e_flash",
- FLASH_DISABLED: "e_flash_disabled",
- NO_SOLUTION: "e_no_solution",
- NO_SUPPORT: "e_no_support",
- URL: "e_url",
- URL_NOT_SET: "e_url_not_set",
- VERSION: "e_version"
- };
-
- $.jPlayer.errorMsg = {
- FLASH: "jPlayer's Flash fallback is not configured correctly, or a command was issued before the jPlayer Ready event. Details: ", // Used in: _flashError()
- FLASH_DISABLED: "jPlayer's Flash fallback has been disabled by the browser due to the CSS rules you have used. Details: ", // Used in: _flashError()
- NO_SOLUTION: "No solution can be found by jPlayer in this browser. Neither HTML nor Flash can be used.", // Used in: _init()
- NO_SUPPORT: "It is not possible to play any media format provided in setMedia() on this browser using your current options.", // Used in: setMedia()
- URL: "Media URL could not be loaded.", // Used in: jPlayerFlashEvent() and _addHtmlEventListeners()
- URL_NOT_SET: "Attempt to issue media playback commands, while no media url is set.", // Used in: load(), play(), pause(), stop() and playHead()
- VERSION: "jPlayer " + $.jPlayer.prototype.version.script + " needs Jplayer.swf version " + $.jPlayer.prototype.version.needFlash + " but found " // Used in: jPlayerReady()
- };
-
- $.jPlayer.errorHint = {
- FLASH: "Check your swfPath option and that Jplayer.swf is there.",
- FLASH_DISABLED: "Check that you have not display:none; the jPlayer entity or any ancestor.",
- NO_SOLUTION: "Review the jPlayer options: support and supplied.",
- NO_SUPPORT: "Video or audio formats defined in the supplied option are missing.",
- URL: "Check media URL is valid.",
- URL_NOT_SET: "Use setMedia() to set the media URL.",
- VERSION: "Update jPlayer files."
- };
-
- $.jPlayer.warning = {
- CSS_SELECTOR_COUNT: "e_css_selector_count",
- CSS_SELECTOR_METHOD: "e_css_selector_method",
- CSS_SELECTOR_STRING: "e_css_selector_string",
- OPTION_KEY: "e_option_key"
- };
-
- $.jPlayer.warningMsg = {
- CSS_SELECTOR_COUNT: "The number of css selectors found did not equal one: ",
- CSS_SELECTOR_METHOD: "The methodName given in jPlayer('cssSelector') is not a valid jPlayer method.",
- CSS_SELECTOR_STRING: "The methodCssSelector given in jPlayer('cssSelector') is not a String or is empty.",
- OPTION_KEY: "The option requested in jPlayer('option') is undefined."
- };
-
- $.jPlayer.warningHint = {
- CSS_SELECTOR_COUNT: "Check your css selector and the ancestor.",
- CSS_SELECTOR_METHOD: "Check your method name.",
- CSS_SELECTOR_STRING: "Check your css selector is a string.",
- OPTION_KEY: "Check your option name."
- };
-}));
diff --git a/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/jquery.min.js b/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/jquery.min.js
deleted file mode 100755
index 644d35e..0000000
--- a/UpdateOS-3.1/web/apps/FileManagerOG/static/assets/jquery.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery v3.2.1 | (c) JS Foundation and other contributors | jquery.org/license */
-!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.2.1",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null==a?f.call(this):a<0?this[a+this.length]:this[a]},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0&&("form"in a||"label"in a)},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"form"in b?b.parentNode&&b.disabled===!1?"label"in b?"label"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&ea(b)===a:b.disabled===a:"label"in b&&b.disabled===a}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}}):(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c,d,e,f=b.getElementById(a);if(f){if(c=f.getAttributeNode("id"),c&&c.value===a)return[f];e=b.getElementsByName(a),d=0;while(f=e[d++])if(c=f.getAttributeNode("id"),c&&c.value===a)return[f]}return[]}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,c,e){var f,i,j,k,l,m="function"==typeof a&&a,n=!e&&g(a=m.selector||a);if(c=c||[],1===n.length){if(i=n[0]=n[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&9===b.nodeType&&p&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(_,aa),b)||[])[0],!b)return c;m&&(b=b.parentNode),a=a.slice(i.shift().value.length)}f=V.needsContext.test(a)?0:i.length;while(f--){if(j=i[f],d.relative[k=j.type])break;if((l=d.find[k])&&(e=l(j.matches[0].replace(_,aa),$.test(i[0].type)&&qa(b.parentNode)||b))){if(i.splice(f,1),a=e.length&&sa(i),!a)return G.apply(c,e),c;break}}}return(m||h(a,n))(e,b,!p,c,!b||$.test(a)&&qa(b.parentNode)||b),c},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext;function B(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()}var C=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,D=/^.[^:#\[\.,]*$/;function E(a,b,c){return r.isFunction(b)?r.grep(a,function(a,d){return!!b.call(a,d,a)!==c}):b.nodeType?r.grep(a,function(a){return a===b!==c}):"string"!=typeof b?r.grep(a,function(a){return i.call(b,a)>-1!==c}):D.test(b)?r.filter(b,a,c):(b=r.filter(b,a),r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType}))}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(E(this,a||[],!1))},not:function(a){return this.pushStack(E(this,a||[],!0))},is:function(a){return!!E(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var F,G=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,H=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||F,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:G.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),C.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};H.prototype=r.fn,F=r(d);var I=/^(?:parents|prev(?:Until|All))/,J={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function K(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return K(a,"nextSibling")},prev:function(a){return K(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return B(a,"iframe")?a.contentDocument:(B(a,"template")&&(a=a.content||a),r.merge([],a.childNodes))}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(J[a]||r.uniqueSort(e),I.test(a)&&e.reverse()),this.pushStack(e)}});var L=/[^\x20\t\r\n\f]+/g;function M(a){var b={};return r.each(a.match(L)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?M(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=e||a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function N(a){return a}function O(a){throw a}function P(a,b,c,d){var e;try{a&&r.isFunction(e=a.promise)?e.call(a).done(b).fail(c):a&&r.isFunction(e=a.then)?e.call(a,b,c):b.apply(void 0,[a].slice(d))}catch(a){c.apply(void 0,[a])}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b=f&&(d!==O&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:N,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:N)),c[2][3].add(g(0,a,r.isFunction(d)?d:O))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(P(a,g.done(h(c)).resolve,g.reject,!b),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)P(e[c],h(c),g.reject);return g.promise()}});var Q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&Q.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var R=r.Deferred();r.fn.ready=function(a){return R.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||R.resolveWith(d,[r]))}}),r.ready.then=R.then;function S(){d.removeEventListener("DOMContentLoaded",S),
-a.removeEventListener("load",S),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",S),a.addEventListener("load",S));var T=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)T(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h1,null,!0)},removeData:function(a){return this.each(function(){X.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=W.get(a,b),c&&(!d||Array.isArray(c)?d=W.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return W.get(a,c)||W.access(a,c,{empty:r.Callbacks("once memory").add(function(){W.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length\x20\t\r\n\f]+)/i,la=/^$|\/(?:java|ecma)script/i,ma={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ma.optgroup=ma.option,ma.tbody=ma.tfoot=ma.colgroup=ma.caption=ma.thead,ma.th=ma.td;function na(a,b){var c;return c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[],void 0===b||b&&B(a,b)?r.merge([a],c):c}function oa(a,b){for(var c=0,d=a.length;c-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=na(l.appendChild(f),"script"),j&&oa(g),c){k=0;while(f=g[k++])la.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var ra=d.documentElement,sa=/^key/,ta=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ua=/^([^.]*)(?:\.(.+)|)/;function va(){return!0}function wa(){return!1}function xa(){try{return d.activeElement}catch(a){}}function ya(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ya(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=wa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(ra,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(L)||[""],j=b.length;while(j--)h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.hasData(a)&&W.get(a);if(q&&(i=q.events)){b=(b||"").match(L)||[""],j=b.length;while(j--)if(h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&W.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(W.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c=1))for(;j!==this;j=j.parentNode||this)if(1===j.nodeType&&("click"!==a.type||j.disabled!==!0)){for(f=[],g={},c=0;c-1:r.find(e,this,null,[j]).length),g[e]&&f.push(d);f.length&&h.push({elem:j,handlers:f})}return j=this,i\x20\t\r\n\f]*)[^>]*)\/>/gi,Aa=/
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Select
- Name
- Size
-
-
-
-
-
-
-
-