├── src ├── server │ ├── compose │ │ ├── .gitignore │ │ ├── output_localhost_8080.json │ │ ├── k8s.yml │ │ ├── setup_single_node │ │ └── sample_docker_ps_output │ ├── start │ ├── requirements.txt │ ├── app │ │ ├── static │ │ │ ├── favicon.ico │ │ │ ├── fonts.css │ │ │ ├── jquery.color-2.1.2.min.js │ │ │ ├── jquery-ui.css │ │ │ └── jquery.min.js │ │ ├── templates │ │ │ ├── 404.html │ │ │ ├── base.html │ │ │ ├── index.html │ │ │ └── stats.html │ │ ├── decorators.py │ │ ├── __init__.py │ │ ├── controller.py │ │ └── models.py │ ├── scripts │ │ ├── test_client.sh │ │ ├── task_manager │ │ └── server.py │ ├── shell.py │ ├── config.py │ ├── install_mongo │ └── run.py └── client │ ├── app │ ├── wsgi.py │ └── run.py │ ├── scripts │ ├── request_task │ ├── stop_remove_all_containers │ ├── get_ip.py │ ├── test_server_conn │ ├── client.py │ ├── read_container_details.py │ ├── launch_workers │ └── slave_manager │ └── conf │ ├── app_supervisor.conf │ ├── app_uwsgi.ini │ ├── app_nginx.conf │ └── uwsgi_params ├── .gitignore ├── cleanup ├── configuration ├── Dockerfile ├── TODO.md ├── WIKI.md ├── installer.sh ├── README.md └── LICENSE.txt /src/server/compose/.gitignore: -------------------------------------------------------------------------------- 1 | dumps/ -------------------------------------------------------------------------------- /src/server/start: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | COMMAND="python run.py" 3 | $COMMAND 4 | -------------------------------------------------------------------------------- /src/server/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask==0.10.1 2 | flask-mongoengine==0.7.1 3 | netaddr==0.7.13 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.py[cod] 2 | *~ 3 | 4 | db.sqlite3 5 | *.db 6 | container_info.json 7 | containers_details 8 | dumps/ 9 | -------------------------------------------------------------------------------- /src/server/app/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arcolife/dockerComp/HEAD/src/server/app/static/favicon.ico -------------------------------------------------------------------------------- /src/client/app/wsgi.py: -------------------------------------------------------------------------------- 1 | # if gunicorn is used 2 | from run import app 3 | 4 | if __name__ == "__main__": 5 | app.run() 6 | -------------------------------------------------------------------------------- /src/client/scripts/request_task: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | curl -H "Content-type: application/json" -X POST http://$1/connect/1/$1 4 | -------------------------------------------------------------------------------- /src/client/conf/app_supervisor.conf: -------------------------------------------------------------------------------- 1 | [program:flaskapp] 2 | command = uwsgi --ini /opt/dockerComp/conf/app_uwsgi.ini 3 | 4 | [program:nginx] 5 | command = service nginx restart 6 | -------------------------------------------------------------------------------- /src/client/scripts/stop_remove_all_containers: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | CLEAN_IDS=$(docker ps | grep arcolife/docker_comp | awk -F' ' '{print $1}') 4 | docker stop $CLEAN_IDS 5 | docker rm $CLEAN_IDS 6 | -------------------------------------------------------------------------------- /src/server/app/templates/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Page Not Found! 5 | 6 | 7 | Oops! 404. 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/server/scripts/test_client.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Usage: ./test_client.sh '172.17.0.8' '[(1,2),(5,2),(3,5)]' 4 | 5 | curl -H "Content-type: application/json" -X POST http://$1/tasks/ -d "$2" 6 | echo 7 | -------------------------------------------------------------------------------- /src/server/app/templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{title}} 5 | 6 | 7 | {% block content %} {% endblock %} 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/server/shell.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import readline 4 | from pprint import pprint 5 | 6 | from flask import * 7 | from app import * 8 | 9 | os.environ['PYTHONINSPECT'] = 'True' 10 | -------------------------------------------------------------------------------- /src/client/conf/app_uwsgi.ini: -------------------------------------------------------------------------------- 1 | [uwsgi] 2 | chdir = /opt/dockerComp/app/ 3 | module = run:app 4 | 5 | master = true 6 | processes = 4 7 | socket = /var/dockerComp/flaskapp.sock 8 | chmod-socket = 666 9 | -------------------------------------------------------------------------------- /src/client/scripts/get_ip.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python2 2 | # -*- coding: utf-8 -*- 3 | 4 | import socket 5 | 6 | s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 7 | s.connect(("8.8.8.8",80)) 8 | print(s.getsockname()[0]) 9 | s.close() 10 | -------------------------------------------------------------------------------- /src/client/scripts/test_server_conn: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | CHECK_CONN=$(curl -s --connect-timeout 2 http://$DC_HOST:$DC_PORT/test/server/) 4 | if [[ CHECK_CONN -eq 200 ]]; then 5 | echo "Server is UP.." 6 | else 7 | echo "Server is DOWN!!" 8 | fi -------------------------------------------------------------------------------- /cleanup: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | kill -9 $(ps -e | grep slave_manager | awk -F' ' '{print $1}') 4 | 5 | CLEAN_IDS=$(docker ps -a | grep arcolife/docker_comp | awk -F' ' '{print $1}') 6 | docker stop $CLEAN_IDS 7 | docker rm $CLEAN_IDS 8 | 9 | rm -rf ~/dockerComp/ 10 | -------------------------------------------------------------------------------- /src/server/compose/output_localhost_8080.json: -------------------------------------------------------------------------------- 1 | { 2 | "paths": [ 3 | "/api", 4 | "/api/v1", 5 | "/healthz", 6 | "/healthz/ping", 7 | "/logs/", 8 | "/metrics", 9 | "/resetMetrics", 10 | "/swagger-ui/", 11 | "/swaggerapi/", 12 | "/ui/", 13 | "/version" 14 | ] 15 | } -------------------------------------------------------------------------------- /src/server/app/templates/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block content %} 4 | Actual website coming soon. Hold tight! 5 |
6 | Refer to this documentation for now 7 |
8 | Cheers! 9 | 10 | {% endblock %} 11 | -------------------------------------------------------------------------------- /src/client/conf/app_nginx.conf: -------------------------------------------------------------------------------- 1 | upstream flaskapp { 2 | server unix:/var/dockerComp/flaskapp.sock; 3 | } 4 | 5 | server { 6 | listen 80 default_server; 7 | charset utf-8; 8 | 9 | location / { 10 | uwsgi_pass flaskapp; 11 | include /opt/dockerComp/conf/uwsgi_params; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/client/scripts/client.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python2 2 | # -*- coding: utf-8 -*- 3 | 4 | import socket 5 | 6 | # Create a socket object 7 | s = socket.socket() 8 | # Get local machine name 9 | host = socket.gethostname() 10 | # Reserve a port for your service. 11 | port = 8088 12 | 13 | s.connect((host, port)) 14 | print s.recv(8089) 15 | # Close the socket when done 16 | s.close 17 | -------------------------------------------------------------------------------- /src/server/app/decorators.py: -------------------------------------------------------------------------------- 1 | from functools import wraps 2 | 3 | from flask import flash, redirect, url_for, request, session 4 | 5 | def test(f): 6 | @wraps(f) 7 | def decorated_function(*args, **kwargs): 8 | if session['user'] is None: 9 | pass 10 | return f(*args, **kwargs) 11 | return decorated_function 12 | 13 | def test2(): 14 | try: 15 | return session['user'] 16 | except: 17 | return False 18 | -------------------------------------------------------------------------------- /configuration: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # # define your server hostname amd ports using environment variables: 4 | # `DC_HOST` and `DC_PORT`. Although, if you're testing locally, 5 | # the defaults defined below will take care of dev env.. 6 | 7 | # SERVER_HOSTNAME=$(echo $HOSTNAME | awk -F'.' '{print $1}') 8 | SERVER_HOSTNAME=$(./src/client/scripts/get_ip.py) 9 | SERVER_PORT="5000" 10 | 11 | DIRECTORY=$HOME/dockerComp/ 12 | # set the no. of workers to launch on client 13 | CONTAINER_COUNT=2 14 | -------------------------------------------------------------------------------- /src/server/config.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: utf-8 -*- 3 | 4 | DEBUG = False 5 | 6 | import os 7 | BASE_DIR = os.path.abspath(os.path.dirname(__file__)) 8 | 9 | THREADS_PER_PAGE = 2 10 | 11 | SECRET_KEY = "" 12 | 13 | # Dictionary that holds all the template configuration 14 | TEMPLATE_CONFIGURATION = { 15 | "title" : "dockerComp DDSC (Dockerized Distributed Scientific Computing)", 16 | "header_text" : "dockerComp", 17 | } 18 | 19 | HOST = "0.0.0.0" 20 | 21 | PORT = 5000 22 | -------------------------------------------------------------------------------- /src/server/app/__init__.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | from flask import Flask, render_template 4 | from flask.ext.mongoengine import MongoEngine 5 | 6 | app = Flask(__name__) 7 | app.config.from_object('config') 8 | 9 | app.config["MONGODB_SETTINGS"] = { 10 | "DB": os.environ.get("U_DB"), 11 | "USERNAME": os.environ.get("U_USER"), 12 | "PASSWORD": os.environ.get("U_PASS"), 13 | "HOST": "127.0.0.1", 14 | "PORT": 27017 } 15 | db = MongoEngine(app) 16 | 17 | @app.errorhandler(404) 18 | def not_found(error): 19 | return render_template('404.html'), 404 20 | -------------------------------------------------------------------------------- /src/server/scripts/task_manager: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | user_interrupt(){ 4 | echo -e "\n\nKeyboard Interrupt detected." 5 | echo -e "Stopping Task Manager..." 6 | exit 7 | } 8 | 9 | trap user_interrupt SIGINT 10 | trap user_interrupt SIGTSTP 11 | 12 | 13 | start_daemon(){ 14 | while :; do 15 | 16 | # # install cadvisor 17 | # sudo docker run --volume=/:/rootfs:ro --volume=/var/run:/var/run:rw \ 18 | # --volume=/sys:/sys:ro --volume=/var/lib/docker/:/var/lib/docker:ro \ 19 | # --publish=8080:8080 --detach=true --name=cadvisor \ 20 | # google/cadvisor:latest 21 | echo "test" 22 | 23 | 24 | done 25 | } -------------------------------------------------------------------------------- /src/client/scripts/read_container_details.py: -------------------------------------------------------------------------------- 1 | from subprocess import Popen, PIPE 2 | import json 3 | 4 | f = open('../containers_details','rb') 5 | cmd = ['docker','inspect'] 6 | 7 | details = [] 8 | print f.readline() 9 | 10 | ids = [] 11 | 12 | with f as openfileobject: 13 | for line in openfileobject: 14 | ids.append(line.split()[-1]) 15 | 16 | for _id in ids: 17 | command = ' '.join(cmd+[_id]) 18 | p = Popen(command, shell=True, stdout=PIPE, stderr=PIPE, close_fds=True) 19 | stdout, stderr = p.communicate() 20 | retcode = p.returncode 21 | details.extend(json.loads(stdout)) 22 | 23 | json.dump(details, open('../container_info.json','wb')) 24 | -------------------------------------------------------------------------------- /src/server/app/controller.py: -------------------------------------------------------------------------------- 1 | from app.users.models import * 2 | from datetime import datetime 3 | 4 | 5 | def create_client(client_IP, containers): 6 | pass 7 | 8 | def add_container(client_IP, container_id): 9 | pass 10 | 11 | def purge_container(client_IP, container_id): 12 | # if user modified the config on the fly 13 | # then remove one of the containers and 14 | # update this on The Channel 15 | pass 16 | 17 | def purge_client(client_IP): 18 | # counter = 3 19 | pass 20 | 21 | def add_data(data, container_id, client_IP): 22 | pass 23 | 24 | def delete_data(container_id, client_IP): 25 | pass 26 | 27 | def add_result(container_id, client_IP): 28 | pass 29 | -------------------------------------------------------------------------------- /src/server/scripts/server.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import socket 4 | import json 5 | 6 | data = (1,2,3,5,6,7) 7 | 8 | # Create a socket object 9 | s = socket.socket() 10 | # Reserve a port for your service. 11 | host = socket.gethostname() # Get local machine name 12 | # Reserve a port for your service. 13 | port = 12347 14 | # Bind to the port 15 | s.bind((host, port)) 16 | 17 | # Now wait for client connection. 18 | s.listen(5) 19 | while True: 20 | # Establish connection with client. 21 | c, addr = s.accept() 22 | print 'Got connection from', addr 23 | c.send(json.dumps((data))) 24 | # Close the connection 25 | c.close() 26 | -------------------------------------------------------------------------------- /src/client/conf/uwsgi_params: -------------------------------------------------------------------------------- 1 | 2 | uwsgi_param QUERY_STRING $query_string; 3 | uwsgi_param REQUEST_METHOD $request_method; 4 | uwsgi_param CONTENT_TYPE $content_type; 5 | uwsgi_param CONTENT_LENGTH $content_length; 6 | 7 | uwsgi_param REQUEST_URI $request_uri; 8 | uwsgi_param PATH_INFO $document_uri; 9 | uwsgi_param DOCUMENT_ROOT $document_root; 10 | uwsgi_param SERVER_PROTOCOL $server_protocol; 11 | uwsgi_param HTTPS $https if_not_empty; 12 | 13 | uwsgi_param REMOTE_ADDR $remote_addr; 14 | uwsgi_param REMOTE_PORT $remote_port; 15 | uwsgi_param SERVER_PORT $server_port; 16 | uwsgi_param SERVER_NAME $server_name; 17 | -------------------------------------------------------------------------------- /src/server/compose/k8s.yml: -------------------------------------------------------------------------------- 1 | etcd: 2 | image: gcr.io/google_containers/etcd:2.0.12 3 | net: "host" 4 | command: /usr/local/bin/etcd --addr=127.0.0.1:4001 --bind-addr=0.0.0.0:4001 --data-dir=/var/etcd/data 5 | master: 6 | image: gcr.io/google_containers/hyperkube:v1.0.1 7 | net: "host" 8 | volumes: 9 | - /var/run/docker.sock:/var/run/docker.sock 10 | command: /hyperkube kubelet --api_servers=http://localhost:8080 --v=2 --address=0.0.0.0 --enable_server --hostname_override=127.0.0.1 --config=/etc/kubernetes/manifests 11 | proxy: 12 | image: gcr.io/google_containers/hyperkube:v1.0.1 13 | net: "host" 14 | privileged: true 15 | command: /hyperkube proxy --master=http://127.0.0.1:8080 --v=2 16 | -------------------------------------------------------------------------------- /src/client/scripts/launch_workers: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | END=$1 4 | 5 | for i in $(seq 1 $END); 6 | do 7 | docker run -it -d arcolife/docker_comp 8 | done 9 | echo "$END containers have been deployed.." 10 | 11 | # docker ps > containers_details 12 | # cd scripts/ 13 | # python read_container_details.py 14 | # cd .. 15 | 16 | export CURRENT_WORKERS=$(docker ps -q | head -n $END) 17 | 18 | docker inspect $CURRENT_WORKERS > container_info.json 19 | # docker inspect $(docker ps | grep arcolife/docker_comp | awk -F' ' '{print $1}') > container_info.json 20 | 21 | echo "updating worker details on server.." 22 | curl -H "Content-type: application/json" -X POST http://$DC_HOST:$DC_PORT/get_details/ -d @container_info.json -------------------------------------------------------------------------------- /src/server/app/templates/stats.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block content %} 4 | Current server stats. 5 | Total clients conected: {{total_clients}} 6 |
7 | Client details:
8 | 23 | {% endblock %} 24 | -------------------------------------------------------------------------------- /src/server/app/static/fonts.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Lato'; 3 | font-style: normal; 4 | font-weight: 300; 5 | src: local('Lato Light'), local('Lato-Light'), url(https://themes.googleusercontent.com/static/fonts/lato/v7/KT3KS9Aol4WfR6Vas8kNcg.woff) format('woff'); 6 | } 7 | @font-face { 8 | font-family: 'Lato'; 9 | font-style: normal; 10 | font-weight: 700; 11 | src: local('Lato Bold'), local('Lato-Bold'), url(https://themes.googleusercontent.com/static/fonts/lato/v7/wkfQbvfT_02e2IWO3yYueQ.woff) format('woff'); 12 | } 13 | @font-face { 14 | font-family: 'Lato'; 15 | font-style: italic; 16 | font-weight: 300; 17 | src: local('Lato Light Italic'), local('Lato-LightItalic'), url(https://themes.googleusercontent.com/static/fonts/lato/v7/2HG_tEPiQ4Z6795cGfdivD8E0i7KZn-EPnyo3HZu7kw.woff) format('woff'); 18 | } 19 | @font-face { 20 | font-family: 'Lato'; 21 | font-style: italic; 22 | font-weight: 700; 23 | src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url(https://themes.googleusercontent.com/static/fonts/lato/v7/HkF_qI1x_noxlxhrhMQYED8E0i7KZn-EPnyo3HZu7kw.woff) format('woff'); 24 | } 25 | -------------------------------------------------------------------------------- /src/server/compose/setup_single_node: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ref: http://sebgoa.blogspot.in/2015/04/1-command-to-kubernetes-with-docker.html 4 | 5 | docker-compose -f k8s.yml up -d 6 | docker ps | grep compose 7 | 8 | # had to disable selinux on fedora22 to allow kube to run on 8080 9 | 10 | # pip install gcloud 11 | # curl https://sdk.cloud.google.com | bash 12 | # gcloud beta container get-server-config --zone=CLOUDSDK_COMPUTE_ZONE 13 | 14 | # kubectl config view 15 | # gcloud auth login --no-launch-browser 16 | # gcloud config set project tenacious-plane-107419 17 | 18 | kubectl get nodes 19 | kubectl run dockercomp --image=arcolife/docker_comp --port=80 20 | kubectl run dockercomp1 --image=arcolife/docker_comp --port=80 21 | kubectl run dockercomp2 --image=arcolife/docker_comp --port=80 22 | kubectl run dockercomp3 --image=arcolife/docker_comp --port=80 23 | kubectl run dockercomp4 --image=arcolife/docker_comp --port=80 24 | kubectl run dockercomp5 --image=arcolife/docker_comp --port=80 25 | kubectl run dockercomp6 --image=arcolife/docker_comp --port=80 26 | 27 | kubectl get pods 28 | kubectl get rc 29 | 30 | kubectl expose rc dockercomp1 --port=80 --public-ip=192.168.1.101 31 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # DEPLOYMENT INSTRUCTIONS 2 | 3 | # To build the image, refer: 4 | # $ docker build -t docker_comp . 5 | 6 | # To run using the container, refer the following command: 7 | # $ docker run -it -d docker_comp 8 | ########################################################### 9 | 10 | FROM ubuntu:trusty 11 | MAINTAINER Archit Sharma 12 | 13 | # update and install deps 14 | RUN apt-get update 15 | RUN apt-get install -y python python-pip python-dev 16 | RUN apt-get install -y nginx supervisor curl git 17 | RUN pip install uwsgi Flask 18 | 19 | # clone for github 20 | # RUN git clone https://github.com/arcolife/dockerComp.git /opt/dockerComp/ 21 | 22 | # OR 23 | # add from source 24 | 25 | RUN mkdir -p /opt/dockerComp/app/ /opt/dockerComp/conf/ /var/dockerComp/ 26 | ADD ./src/client/app /opt/dockerComp/app/ 27 | ADD ./src/client/conf /opt/dockerComp/conf/ 28 | ADD ./src/client/scripts /opt/dockerComp/scripts/ 29 | 30 | # configure services 31 | RUN echo "\ndaemon off;" >> /etc/nginx/nginx.conf 32 | RUN rm /etc/nginx/sites-enabled/default 33 | RUN ln -s /opt/dockerComp/conf/app_nginx.conf /etc/nginx/sites-enabled/ 34 | RUN ln -s /opt/dockerComp/conf/app_supervisor.conf /etc/supervisor/conf.d/ 35 | 36 | EXPOSE 80 37 | 38 | CMD ["/usr/bin/supervisord", "-n"] 39 | -------------------------------------------------------------------------------- /src/client/app/run.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import ast 4 | import os, sys 5 | from flask import Flask, jsonify, request, Response 6 | 7 | import subprocess 8 | from subprocess import call 9 | 10 | import socket 11 | import requests, json 12 | 13 | app = Flask(__name__, static_url_path='') 14 | 15 | BUSY=0 16 | 17 | @app.route('/', methods=['GET']) 18 | def home(): 19 | return jsonify({'client_test': 'OK'}) 20 | 21 | 22 | @app.route('/status/', methods=['GET']) 23 | def worker_status(): 24 | return str(BUSY) 25 | 26 | 27 | @app.route('/test/client/', methods=['POST']) 28 | def test(): 29 | print request.data 30 | return jsonify({'got response from server': 'OK'}) 31 | 32 | 33 | @app.route('/tasks/', methods=['POST']) 34 | def get_tasks(): 35 | BUSY = 1 36 | # received = ast.literal_eval(request.data) 37 | received = json.loads(request.data) 38 | #print received[0] 39 | result = 0 40 | for i in received['dataset']: 41 | result += sum(i) 42 | BUSY = 0 43 | return Response(str(result)) 44 | 45 | 46 | # @app.route('/assign', methods=['POST']) 47 | # def get_task(): 48 | # while(True): 49 | # ip = socket.gethostname() 50 | # p = subprocess.Popen(["./scripts/request_task.sh",ip], stdout=subprocess.PIPE) 51 | # out, err = p.communicate() 52 | # ######## add stuff ######## 53 | 54 | if __name__ == '__main__': 55 | try: 56 | app.run(host = '0.0.0.0', 57 | # port = 80, 58 | debug = False) 59 | except: 60 | raise 61 | -------------------------------------------------------------------------------- /src/server/app/models.py: -------------------------------------------------------------------------------- 1 | from app import db 2 | 3 | 4 | # class Config(db.EmbeddedDocument): 5 | # #container_ip_addr = db.IntField(required=True) 6 | # docker_inspect = db.DictField() 7 | 8 | class Container(db.EmbeddedDocument): 9 | # container_id = db.StringField(max_length=20, 10 | # unique=True, 11 | # required=True) 12 | # pool_id = db.StringField(max_length=30, 13 | # required=True) 14 | container_name = db.StringField() 15 | container_id = db.StringField() 16 | container_port = db.IntField() 17 | container_ip_addr = db.IntField() 18 | data_received = db.ListField() 19 | data_sent = db.IntField() 20 | time_sent = db.DateTimeField() 21 | time_received = db.DateTimeField() 22 | config = db.DictField() #db.EmbeddedDocumentField(Config) 23 | 24 | 25 | class Client(db.Document): 26 | """ 27 | @containers: {'} 28 | 29 | @ip_addr: Client's IP Address 30 | (to track multiple containers on same client) 31 | 32 | @client_result: { 'client_IP' : } 33 | @client_data: { 'client_IP' : } 34 | 35 | """ 36 | containers = db.DictField() 37 | ip_addr_num = db.IntField(unique=True) 38 | ip_addr = db.StringField() 39 | #client_data = db.DictField() 40 | #client_result = db.DictField() 41 | 42 | 43 | # class Server(db.Document): 44 | # """ 45 | # @connected_pools: 46 | # 1 pool(client) is a group of containers having same IP addr. 47 | # { 'client_IP' : [binded_ports] } 48 | 49 | # """ 50 | # clients = db.DictField() 51 | 52 | -------------------------------------------------------------------------------- /src/server/install_mongo: -------------------------------------------------------------------------------- 1 | # Ubuntu 14.04 2 | sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 3 | echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list 4 | sudo apt-get update 5 | sudo apt-get install -y mongodb-org 6 | sudo service mongod start 7 | # sudo service mongod enable 8 | # sudo service mongod restart 9 | 10 | 11 | # SETUP root/user accounts 12 | 13 | # stop the service and run this 14 | sudo service mongod stop 15 | sudo mongod --noauth --dbpath=/var/lib/mongodb/ 16 | 17 | # in another terminal, run $ mongo ; then 18 | # add admin user and db, as follows: 19 | 20 | use admin 21 | db.createUser( 22 | { 23 | user: "manager", 24 | pwd: "", 25 | roles: 26 | [ 27 | { 28 | role: "userAdminAnyDatabase", 29 | db: "admin" 30 | } 31 | ] 32 | } 33 | ) 34 | 35 | # then run following for a regular db and user, as follows: 36 | 37 | use jugad 38 | db.createUser( 39 | { 40 | user: "arco", 41 | pwd: "arco123", 42 | roles: 43 | [ 44 | { 45 | role: "userAdmin", 46 | db: "jugad" 47 | } 48 | ] 49 | } 50 | ) 51 | 52 | # then exit the shell and close the manual mongod server 53 | 54 | # then run this to ensure that on restart, mongo doesn't fail 55 | sudo chown -R mongodb:mongodb /var/lib/mongodb/ 56 | 57 | sudo service mongod restart 58 | 59 | # ensure that mongod.conf contains auth:true 60 | # for logging in as user 'manager' in db 'admin' 61 | mongo admin --port 27017 -u manager -p 62 | # for logging in as user 'arco' in db 'jugad' 63 | mongo jugad --port 27017 -u arco -p 64 | 65 | # to push data to mongo from previous dumps 66 | # mongorestore -h 127.0.0.1 -d --dir 67 | 68 | # to dump existing collection from mongodb 69 | # ensure that noauth:True in mongod.conf else this will fail 70 | # mongodump -h 127.0.0.1 -d jugad -c users 71 | 72 | # to convert bson to json 73 | # bsondump users.bson > users.json 74 | 75 | -------------------------------------------------------------------------------- /TODO.md: -------------------------------------------------------------------------------- 1 | FEATURES 2 | ======== 3 | 4 | ### General 5 | 6 | - [ ] Authentication/Key signing process for client-server 7 | - [ ] Registering of client/workers 8 | - [ ] Authentication for arcolife/docker_comp image (notary) 9 | - [x] Test integration with Docker Compose / Kube 10 | - [ ] Use ansible/likes to test S/W stack setup 11 | - [ ] add perf counters 12 | - [ ] setup logging 13 | - [ ] integration with tor n/w and intelligent task distribution with independent cluster management. 14 | 15 | ### SERVER 16 | 17 | - [ ] Purging of clients/workers 18 | - [ ] take care of edge cases (connection drop/retrial) 19 | - [ ] Server side daemon to divide data in chunks and distribute to clients 20 | - [ ] integrate crunched data 21 | - [ ] integrate Task Manager / Queue on server 22 | 23 | - [ ] load-balancing for workloads based on stats from clients 24 | 25 | - [ ] accept config changes from clients on the fly 26 | 27 | - [ ] Integrate Server side Web console to keep track of clients 28 | - [x] add minimalistic UI 29 | - [x] integrate with MongoDB 30 | - [ ] integrate plugin with cAdvisor to administer clients from UI rather than just monitor them. 31 | 32 | ### CLIENT 33 | 34 | - [ ] Client side daemon to distribute workload to workers 35 | - [x] decide IP and other env sharing process (container links/aliases) 36 | - [ ] shutdown / manage resource intelligently 37 | - [x] Polling the server (if server goes down) and initiate KEEP_ALIVE 38 | 39 | - [x] provide an option (like manifest file) for client to change 40 | - [ ] configure client daemon to reload on changes to this file 41 | 42 | 43 | BUGS (or possible ones) 44 | ======================= 45 | 46 | - [ ] PAT/NAT routing - issue #1 47 | - [ ] OpenVPN testing 48 | 49 | ENHANCEMENTS 50 | ============ 51 | 52 | - [ ] Task Distribution redundancy 53 | - [ ] integrate cernvm 54 | - RPM/updates 55 | - AFS 56 | - ROOT 57 | - Contextualization 58 | - fuse-FS integration without privileged mode (refer vault volume plugin) 59 | - Define tuned config 60 | - C++11 Compiler 61 | - Makeflow 62 | 63 | - [ ] integrate PyBossa 64 | - deploy sample app (face recog?) 65 | -------------------------------------------------------------------------------- /src/client/scripts/slave_manager: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # increase this to slow down client 4 | # decrease to speed up 5 | WAIT_PERIOD=2 6 | 7 | user_interrupt(){ 8 | echo -e "\n\nKeyboard Interrupt detected." 9 | echo -e "Stopping Task Manager..." 10 | exit 11 | } 12 | 13 | trap user_interrupt SIGINT 14 | trap user_interrupt SIGTSTP 15 | 16 | TASK_REQUESTED=0 17 | CLIENT_IP=`./get_ip.py` 18 | DUMP_LOCATION='/tmp/dc_packet.json' 19 | 20 | # CURRENT_WORKERS is also set in ./launch_workers when workers are launched 21 | CURRENT_WORKERS=$(docker ps | grep arcolife/docker_comp | awk -F' ' '{print $1}') 22 | array=($CURRENT_WORKERS) 23 | 24 | start_daemon(){ 25 | while :; do 26 | for WORKER_ID in "${array[@]}" 27 | do 28 | worker_ip=$(docker inspect -f '{{ .NetworkSettings.IPAddress }}' $WORKER_ID) 29 | WORKER_STATUS=$(curl -s http://$worker_ip/status/) 30 | # if 0, worker is ready for new task 31 | if [[ $WORKER_STATUS -eq 0 ]]; then 32 | # worker waitin' on server 33 | # echo "worker: $WORKER_ID | ip: $worker_ip | status: $WORKER_STATUS" 34 | ALIVE_TEST=$(curl -s http://$DC_HOST:$DC_PORT/test/server/) 35 | if [[ ALIVE_TEST -eq 200 ]]; then 36 | # PACKET=$(curl http://$DC_HOST:$DC_PORT/task/request/$CLIENT_IP/$WORKER_ID/) 37 | curl -s http://$DC_HOST:$DC_PORT/task/request/$CLIENT_IP/$WORKER_ID/ \ 38 | > $DUMP_LOCATION 39 | # TODO: add mechanism to divide this packet in chunks and distribute accordingly 40 | 41 | # if something received 42 | # if [[ ! -z $PACKET ]]; then 43 | if [[ -f $DUMP_LOCATION ]]; then 44 | # post packet to worker 45 | result=$(curl -s -H "Content-type: application/json" -X POST \ 46 | http://$worker_ip/tasks/ -d @$DUMP_LOCATION) 47 | ack=$(curl -s -H "Content-type: application/json" -X POST \ 48 | http://$DC_HOST:$DC_PORT/task/request/$CLIENT_IP/$WORKER_ID/ \ 49 | -d '{ "result" : "'$result'" }') 50 | # set task status var back to 0 51 | echo "server ack: $ack" 52 | TASK_REQUESTED=0 53 | fi 54 | else 55 | # server not up, wait for sometime 56 | echo "server seems to be Down. Waiting.." 57 | sleep $WAIT_PERIOD 58 | fi 59 | fi 60 | done 61 | 62 | # sleep before demanding more tasks from server 63 | sleep $WAIT_PERIOD 64 | done 65 | } 66 | 67 | start_daemon 68 | -------------------------------------------------------------------------------- /WIKI.md: -------------------------------------------------------------------------------- 1 | **FAQ** 2 | 3 | - So what is dockerComp again? how do you better achieve distributed computing? 4 | 5 | basically, I've introduced dummy data right now. But when the workloads/actual agents are added, 6 | we hope to achieve better performance than VMs as theory shall indicate. 7 | 8 | - Whats to be done to enhance the prototype? 9 | 10 | I didn't have the agent that runs inside VM, any dummy workload you may put, that distriubutes data from server 11 | to the clients and further to N number of containers inside each client and then they use the client's CPU 12 | to analyse and return results. 13 | 14 | - Is there anybody doing that already? 15 | 16 | No one as far as I know. Docker is new, atleast in scientific community, as per the best of my knowledge. 17 | [google searches and blog reads ( :D )]. Everything currently runs directly on servers or in VMS. 18 | But what does it matter? Do it better in this manner. #UNIX philosophy. 19 | Don't worry. Facebook/Google wouldn't have existed if they weren't better than the rest. Just saying! 20 | 21 | - What's more in the closet? 22 | 23 | Imagine if that crowd sourced analysis could be done efficiently, in lesser time and also, being able to analyze more data in that time being able to run multiple agents (within multiple containers) on multiple clients and being able to control 24 | the number of containers launched per client that would increase even the chances of finding aliens :D through the SETI project that uses crowd sourcing. They all run things like BOINC and stuff that ultimately runs inside a VM. I really wish to take this further 25 | and finish this as a pluggable dockerized generalized distributed computing framework 26 | 27 | - So where does the app run ultimately? 28 | 29 | It runs inside Linux machines (Ubuntu/Fedora) ..i.e., RPM or DEB based systems. 30 | It currently doesn't run on Mac. We need to add suport for that. 31 | 32 | I made a basic prototype that launhes certain No.# of containers and makes it easy simple users 33 | by having to run just one script at the end ```installer.sh``` . No downloading cernVMs, 34 | no downloading oracle virtual boxes nothing, just one simple script.. 35 | 36 | - Something you should know.. 37 | 38 | I was facing problem with running the app on client in proxied networks. Since then, it's difficult to initiate request 39 | from outside, especiially if its a PAN/NAT network type. So, I sought to initiate the request from client and keep it 40 | alive and let the server communicate with client in that manner. 41 | the server IP is hardcoded inside client's test script for checking connection to server. Needs to be changed 42 | 43 | - ..but usually servers should initiate the connection, right? 44 | 45 | Right. need to work on that.. tunneling I guess.. I didn't have time and resources for that. Contributions are welcome! 46 | 47 | - Task Workflow 48 | 49 | If there are different tasks, there will be a task ID thats tracked on server inside MongoDB. Right now i'm launching 50 | a fixed no. of containers on a client; like 4 docker containers. This needs to depend on the h/w config on the client 51 | otherwise it will hang the CPU 52 | 53 | - TODO 54 | 55 | make a daemon on client side, that keeps track of containers and allots CPU power and also communicates metadata with server. 56 | 57 | 58 | **TESTS** 59 | 60 | - From client side: 61 | - although the default connection establishment test is included with install scripts; 62 | run ```$ ./src/client/test_server_conn``` 63 | 64 | - From server side: 65 | - TBD 66 | 67 | - Workloads: 68 | - Currently a simple task. TBD. 69 | 70 | 71 | **WORKFLOW** 72 | 73 | 1. Server 74 | 75 | - Dashboard to Manage: 76 | - No. of Clients (and # of containers per client) 77 | - Resources allocated to the containers 78 | 79 | - Master app that manages data sent to each client and checks for integrity. 80 | 81 | 2. Client 82 | 83 | - Installation of Docker 84 | - Starting Containers 85 | - Installation of Application inside the Container 86 | - Connection Establishment with the Server. 87 | - Scripts for the computation 88 | - Error Reporting 89 | 90 | **REFERENCES** 91 | 92 | 1. https://github.com/cernvm 93 | 2. http://en.wikipedia.org/wiki/List_of_distributed_computing_projects 94 | 3. http://www.rightscale.com/blog/sites/default/files/docker-containers-vms.png 95 | 4. http://www.psc.edu/science/ 96 | 5. http://pybossa.com/ 97 | 6. https://okfn.org/press/releases/crowdcrafting-putting-citizens-control-citizen-science/ 98 | 7. http://www.mediaagility.com/2014/docker-the-next-big-thing-on-cloud/ 99 | 8. http://cernvm.cern.ch/portal/ 100 | -------------------------------------------------------------------------------- /installer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # To be used for checking dependencies 4 | # Consider the deps to be not present 5 | DOCKER_INSTALLED=0 6 | PIP_INSTALLED=0 7 | FLASK_INSTALLED=0 8 | GIT_INSTALLED=0 9 | 10 | user_interrupt(){ 11 | echo -e "\n\nKeyboard Interrupt detected." 12 | echo -e "Cleaning Up and terminating..." 13 | if [ -d $DIRECTORY ]; then 14 | rm -rf $DIRECTORY 15 | fi 16 | exit 17 | } 18 | 19 | trap user_interrupt SIGINT 20 | trap user_interrupt SIGTSTP 21 | 22 | setup_env(){ 23 | if [ -d $DIRECTORY ]; then 24 | echo "cleaning up traces of last installation.." 25 | rm -rf $DIRECTORY 26 | fi 27 | 28 | if [ -f configuration ]; then 29 | source configuration 30 | else 31 | echo "Config file 'configuration' doesn't exist" 32 | exit 33 | fi 34 | echo $CONTAINER_COUNT 35 | if [[ -z $DC_HOST ]]; then 36 | echo "export DC_HOST='"$SERVER_HOSTNAME"'" >> $HOME/.bashrc 37 | echo "export DC_PORT='"$SERVER_PORT"'" >> $HOME/.bashrc 38 | # either source it or set it for current session 39 | export DC_HOST=$SERVER_HOSTNAME 40 | export DC_PORT=$SERVER_PORT 41 | fi 42 | } 43 | 44 | check_docker(){ 45 | DOCKER_CMD=$(which docker) 46 | if [[ ! -z $DOCKER_CMD ]]; then 47 | DOCKER_INSTALLED=1 # Docker is installed 48 | echo "Docker is already installed" 49 | fi 50 | } 51 | 52 | check_pip(){ 53 | PIP_CMD=$(which pip2) 54 | if [[ ! -z $PIP_CMD ]]; then 55 | PIP_INSTALLED=1 # pip is installed 56 | echo "pip is already installed" 57 | fi 58 | } 59 | 60 | check_flask(){ 61 | FLASK_CMD=$(python -c "try: import flask; print 62 | except: print 1") 63 | if [[ -z $FLASK_CMD ]]; then 64 | FLASK_INSTALLED=1 # flask is installed 65 | echo "flask is already installed" 66 | fi 67 | } 68 | 69 | check_git(){ 70 | GIT_CMD=$(which git) 71 | if [[ ! -z $GIT_CMD ]]; then 72 | GIT_INSTALLED=1 # git is installed 73 | echo "Git is already installed" 74 | fi 75 | } 76 | 77 | check_deps(){ 78 | check_docker 79 | check_pip 80 | check_flask 81 | check_git 82 | } 83 | 84 | setup_deps(){ 85 | check_deps 86 | if [ $GIT_INSTALLED -eq 1 ] && [ $DOCKER_INSTALLED -eq 1 ] \ 87 | && [ $PIP_INSTALLED -eq 1 ] && [ $FLASK_INSTALLED -eq 1 ]; 88 | then 89 | echo "All dependencies are statisfied." 90 | return 91 | else 92 | echo "Need to install dependencies which are currently not installed on your system" 93 | echo "Please enter password for "$USER".." 94 | fi 95 | 96 | YUM_CMD=$(which yum) 97 | APT_GET_CMD=$(which apt-get) 98 | # OTHER_CMD=$(which ) 99 | 100 | if [[ ! -z $YUM_CMD ]]; then 101 | command="sudo yum -y install" # rpm based 102 | elif [[ ! -z $APT_GET_CMD ]]; then 103 | command="sudo apt-get install -y" # deb based 104 | # elif [[ ! -z $OTHER_CMD ]]; then 105 | # $OTHER_CMD 106 | else 107 | echo "error can't install package $PACKAGE." 108 | echo "kindly edit this script to add your package manager in 'OTHER_CMD='" 109 | exit 1; 110 | fi 111 | 112 | if [ $GIT_INSTALLED -eq 0 ]; then # install git 113 | git_install=$command" git" 114 | eval $git_install 115 | fi 116 | 117 | if [ $PIP_INSTALLED -eq 0 ]; then # install pip 118 | pip_install=$command" python-pip" 119 | eval $pip_install 120 | fi 121 | 122 | if [ $FLASK_INSTALLED -eq 0 ]; then # install flask 123 | sudo pip install flask 124 | fi 125 | 126 | if [ $DOCKER_INSTALLED -eq 0 ]; then # install docker 127 | if [[ ! -z $APT_GET_CMD ]]; then # deb based 128 | docker_install=$command" docker.io" 129 | eval $docker_install 130 | sudo ln -sf /usr/bin/docker.io /usr/local/bin/docker 131 | sudo sed -i '$acomplete -F _docker docker' /etc/bash_completion.d/docker.io 132 | source /etc/bash_completion.d/docker.io 133 | fi 134 | 135 | if [[ ! -z $YUM_CMD ]]; then # rpm based 136 | docker_install=$command" docker-io" 137 | eval $docker_install 138 | sudo systemctl start docker 139 | sudo systemctl enable docker 140 | fi 141 | fi 142 | } 143 | 144 | 145 | setup_app(){ 146 | cd $HOME 147 | git clone https://github.com/arcolife/dockerComp.git $DIRECTORY 148 | cd $DIRECTORY 149 | # remove server side code, useless for normal users 150 | git config core.sparseCheckout true 151 | echo src/client/ > .git/info/sparse-checkout 152 | git checkout master 153 | cd src/client/scripts/ 154 | 155 | echo -e "launching workers.." 156 | ./launch_workers $CONTAINER_COUNT 157 | 158 | echo -e "testing connection to server.." 159 | ./test_server_conn 160 | 161 | # # copy the client daemon from here 162 | # cp ./scripts/slave_manager $HOME/ 163 | # echo -e "\n..cleaning up and removing "$DIRECTORY 164 | # rm -rf $DIRECTORY 165 | # cd $HOME 166 | 167 | echo -e "\n starting the client task manager daemon now.." 168 | nohup ./slave_manager & 169 | } 170 | 171 | setup_env 172 | setup_deps 173 | 174 | if [[ -z $(cat /etc/group | grep docker | grep $USER) ]]; then 175 | echo 'need sudo to add $USER to "docker" group.' 176 | sudo usermod -a -G docker $USER 177 | echo 178 | echo "..added user to docker group." 179 | echo "..this script will stop executing now, run it again." 180 | newgrp docker 181 | else 182 | setup_app 183 | fi 184 | -------------------------------------------------------------------------------- /src/server/compose/sample_docker_ps_output: -------------------------------------------------------------------------------- 1 | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 2 | e18e81e517fe arcolife/docker_comp "/usr/bin/supervisord" 3 minutes ago Up 3 minutes k8s_dockercomp1.7812f339_dockercomp1-hvrv3_default_d49c36aa-5fcb-11e5-ba2d-28d244be2ba2_6239500a 3 | 10e7c786863a gcr.io/google_containers/pause:0.8.0 "/pause" 3 minutes ago Up 3 minutes k8s_POD.ef28e851_dockercomp1-hvrv3_default_d49c36aa-5fcb-11e5-ba2d-28d244be2ba2_63da6771 4 | 1b057812e625 arcolife/docker_comp "/usr/bin/supervisord" 3 minutes ago Up 3 minutes k8s_dockercomp.f0cbf308_dockercomp-7eg8t_default_c532cab8-5fcb-11e5-ba2d-28d244be2ba2_2fc41849 5 | 2f0961c8dbf0 gcr.io/google_containers/pause:0.8.0 "/pause" 4 minutes ago Up 4 minutes k8s_POD.ef28e851_dockercomp-7eg8t_default_c532cab8-5fcb-11e5-ba2d-28d244be2ba2_0cff58b0 6 | a63b49f08b89 arcolife/docker_comp "/usr/bin/supervisord" 4 minutes ago Up 4 minutes k8s_dockercomp5.81eaf33d_dockercomp5-1u3i2_default_a921d53c-5fcb-11e5-ba2d-28d244be2ba2_ba904aa1 7 | f050faeab751 arcolife/docker_comp "/usr/bin/supervisord" 4 minutes ago Up 4 minutes k8s_dockercomp6.8460f33e_dockercomp6-co0el_default_a998b4f5-5fcb-11e5-ba2d-28d244be2ba2_b66d77f1 8 | 54fec19d3fb4 gcr.io/google_containers/pause:0.8.0 "/pause" 4 minutes ago Up 4 minutes k8s_POD.ef28e851_dockercomp5-1u3i2_default_a921d53c-5fcb-11e5-ba2d-28d244be2ba2_83df9340 9 | ce91f464e405 arcolife/docker_comp "/usr/bin/supervisord" 4 minutes ago Up 4 minutes k8s_dockercomp4.7f74f33c_dockercomp4-evj7i_default_a91b3353-5fcb-11e5-ba2d-28d244be2ba2_66bc1b84 10 | fc9f391d85e7 gcr.io/google_containers/pause:0.8.0 "/pause" 4 minutes ago Up 4 minutes k8s_POD.ef28e851_dockercomp6-co0el_default_a998b4f5-5fcb-11e5-ba2d-28d244be2ba2_707a7e57 11 | d31721cf974d gcr.io/google_containers/pause:0.8.0 "/pause" 4 minutes ago Up 4 minutes k8s_POD.ef28e851_dockercomp4-evj7i_default_a91b3353-5fcb-11e5-ba2d-28d244be2ba2_e3140b0d 12 | 7e2d2609fe3b arcolife/docker_comp "/usr/bin/supervisord" 6 minutes ago Up 6 minutes k8s_dockercomp3.7cfef33b_dockercomp3-h4dxw_default_63fce653-5fcb-11e5-ba2d-28d244be2ba2_29dfdcf4 13 | d86ad18635e5 arcolife/docker_comp "/usr/bin/supervisord" 6 minutes ago Up 6 minutes k8s_dockercomp2.7a88f33a_dockercomp2-1yps2_default_621b32c9-5fcb-11e5-ba2d-28d244be2ba2_010f91bd 14 | 2817690e982e gcr.io/google_containers/pause:0.8.0 "/pause" 6 minutes ago Up 6 minutes k8s_POD.ef28e851_dockercomp3-h4dxw_default_63fce653-5fcb-11e5-ba2d-28d244be2ba2_f2f35103 15 | bdb7e9eb6211 arcolife/docker_comp "/usr/bin/supervisord" 6 minutes ago Up 6 minutes k8s_dockercomp1.7812f339_dockercomp1-233ki_default_5fc894c3-5fcb-11e5-ba2d-28d244be2ba2_a2f15b08 16 | 1da82ad25e77 gcr.io/google_containers/pause:0.8.0 "/pause" 6 minutes ago Up 6 minutes k8s_POD.ef28e851_dockercomp2-1yps2_default_621b32c9-5fcb-11e5-ba2d-28d244be2ba2_409e3366 17 | 28a044ce6e5e gcr.io/google_containers/pause:0.8.0 "/pause" 6 minutes ago Up 6 minutes k8s_POD.ef28e851_dockercomp1-233ki_default_5fc894c3-5fcb-11e5-ba2d-28d244be2ba2_712bc12c 18 | ccdff10c4698 arcolife/docker_comp "/usr/bin/supervisord" 7 minutes ago Up 7 minutes k8s_dockercomp.f0cbf308_dockercomp-jplgs_default_4edbb70e-5fcb-11e5-ba2d-28d244be2ba2_786e586d 19 | b93a0e233834 gcr.io/google_containers/pause:0.8.0 "/pause" 7 minutes ago Up 7 minutes k8s_POD.ef28e851_dockercomp-jplgs_default_4edbb70e-5fcb-11e5-ba2d-28d244be2ba2_c7ce399c 20 | 73265926cd8b gcr.io/google_containers/hyperkube:v1.0.1 "/hyperkube scheduler" 24 minutes ago Up 24 minutes k8s_scheduler.2744e742_k8s-master-127.0.0.1_default_f3ccbffbd75e3c5d2fb4ba69c8856c4a_9bcf934f 21 | d82b697615a4 gcr.io/google_containers/hyperkube:v1.0.1 "/hyperkube apiserver" 24 minutes ago Up 24 minutes k8s_apiserver.cfb70250_k8s-master-127.0.0.1_default_f3ccbffbd75e3c5d2fb4ba69c8856c4a_2776331a 22 | 02a011ef730b gcr.io/google_containers/hyperkube:v1.0.1 "/hyperkube controlle" 24 minutes ago Up 24 minutes k8s_controller-manager.1598ee5c_k8s-master-127.0.0.1_default_f3ccbffbd75e3c5d2fb4ba69c8856c4a_c2cb9fa5 23 | 2a010f45e669 gcr.io/google_containers/pause:0.8.0 "/pause" 24 minutes ago Up 24 minutes k8s_POD.e4cc795_k8s-master-127.0.0.1_default_f3ccbffbd75e3c5d2fb4ba69c8856c4a_d89a64cd 24 | 05ad30f5d378 gcr.io/google_containers/etcd:2.0.12 "/usr/local/bin/etcd " 24 minutes ago Up 24 minutes compose_etcd_1 25 | e0203ebed90d gcr.io/google_containers/hyperkube:v1.0.1 "/hyperkube proxy --m" 24 minutes ago Up 24 minutes compose_proxy_1 26 | a3efafa94142 gcr.io/google_containers/hyperkube:v1.0.1 "/hyperkube kubelet -" 24 minutes ago Up 24 minutes compose_master_1 27 | -------------------------------------------------------------------------------- /src/server/app/static/jquery.color-2.1.2.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery Color v@2.1.2 http://github.com/jquery/jquery-color | jquery.org/license */ 2 | (function(a,b){function m(a,b,c){var d=h[b.type]||{};return a==null?c||!b.def?null:b.def:(a=d.floor?~~a:parseFloat(a),isNaN(a)?b.def:d.mod?(a+d.mod)%d.mod:0>a?0:d.max")[0],k,l=a.each;j.style.cssText="background-color:rgba(1,1,1,.5)",i.rgba=j.style.backgroundColor.indexOf("rgba")>-1,l(g,function(a,b){b.cache="_"+a,b.props.alpha={idx:3,type:"percent",def:1}}),f.fn=a.extend(f.prototype,{parse:function(c,d,e,h){if(c===b)return this._rgba=[null,null,null,null],this;if(c.jquery||c.nodeType)c=a(c).css(d),d=b;var i=this,j=a.type(c),o=this._rgba=[];d!==b&&(c=[c,d,e,h],j="array");if(j==="string")return this.parse(n(c)||k._default);if(j==="array")return l(g.rgba.props,function(a,b){o[b.idx]=m(c[b.idx],b)}),this;if(j==="object")return c instanceof f?l(g,function(a,b){c[b.cache]&&(i[b.cache]=c[b.cache].slice())}):l(g,function(b,d){var e=d.cache;l(d.props,function(a,b){if(!i[e]&&d.to){if(a==="alpha"||c[a]==null)return;i[e]=d.to(i._rgba)}i[e][b.idx]=m(c[a],b,!0)}),i[e]&&a.inArray(null,i[e].slice(0,3))<0&&(i[e][3]=1,d.from&&(i._rgba=d.from(i[e])))}),this},is:function(a){var b=f(a),c=!0,d=this;return l(g,function(a,e){var f,g=b[e.cache];return g&&(f=d[e.cache]||e.to&&e.to(d._rgba)||[],l(e.props,function(a,b){if(g[b.idx]!=null)return c=g[b.idx]===f[b.idx],c})),c}),c},_space:function(){var a=[],b=this;return l(g,function(c,d){b[d.cache]&&a.push(c)}),a.pop()},transition:function(a,b){var c=f(a),d=c._space(),e=g[d],i=this.alpha()===0?f("transparent"):this,j=i[e.cache]||e.to(i._rgba),k=j.slice();return c=c[e.cache],l(e.props,function(a,d){var e=d.idx,f=j[e],g=c[e],i=h[d.type]||{};if(g===null)return;f===null?k[e]=g:(i.mod&&(g-f>i.mod/2?f+=i.mod:f-g>i.mod/2&&(f-=i.mod)),k[e]=m((g-f)*b+f,d))}),this[d](k)},blend:function(b){if(this._rgba[3]===1)return this;var c=this._rgba.slice(),d=c.pop(),e=f(b)._rgba;return f(a.map(c,function(a,b){return(1-d)*e[b]+d*a}))},toRgbaString:function(){var b="rgba(",c=a.map(this._rgba,function(a,b){return a==null?b>2?1:0:a});return c[3]===1&&(c.pop(),b="rgb("),b+c.join()+")"},toHslaString:function(){var b="hsla(",c=a.map(this.hsla(),function(a,b){return a==null&&(a=b>2?1:0),b&&b<3&&(a=Math.round(a*100)+"%"),a});return c[3]===1&&(c.pop(),b="hsl("),b+c.join()+")"},toHexString:function(b){var c=this._rgba.slice(),d=c.pop();return b&&c.push(~~(d*255)),"#"+a.map(c,function(a){return a=(a||0).toString(16),a.length===1?"0"+a:a}).join("")},toString:function(){return this._rgba[3]===0?"transparent":this.toRgbaString()}}),f.fn.parse.prototype=f.fn,g.hsla.to=function(a){if(a[0]==null||a[1]==null||a[2]==null)return[null,null,null,a[3]];var b=a[0]/255,c=a[1]/255,d=a[2]/255,e=a[3],f=Math.max(b,c,d),g=Math.min(b,c,d),h=f-g,i=f+g,j=i*.5,k,l;return g===f?k=0:b===f?k=60*(c-d)/h+360:c===f?k=60*(d-b)/h+120:k=60*(b-c)/h+240,h===0?l=0:j<=.5?l=h/i:l=h/(2-i),[Math.round(k)%360,l,j,e==null?1:e]},g.hsla.from=function(a){if(a[0]==null||a[1]==null||a[2]==null)return[null,null,null,a[3]];var b=a[0]/360,c=a[1],d=a[2],e=a[3],f=d<=.5?d*(1+c):d+c-d*c,g=2*d-f;return[Math.round(o(g,f,b+1/3)*255),Math.round(o(g,f,b)*255),Math.round(o(g,f,b-1/3)*255),e]},l(g,function(c,e){var g=e.props,h=e.cache,i=e.to,j=e.from;f.fn[c]=function(c){i&&!this[h]&&(this[h]=i(this._rgba));if(c===b)return this[h].slice();var d,e=a.type(c),k=e==="array"||e==="object"?c:arguments,n=this[h].slice();return l(g,function(a,b){var c=k[e==="object"?a:b.idx];c==null&&(c=n[b.idx]),n[b.idx]=m(c,b)}),j?(d=f(j(n)),d[h]=n,d):f(n)},l(g,function(b,e){if(f.fn[b])return;f.fn[b]=function(f){var g=a.type(f),h=b==="alpha"?this._hsla?"hsla":"rgba":c,i=this[h](),j=i[e.idx],k;return g==="undefined"?j:(g==="function"&&(f=f.call(this,j),g=a.type(f)),f==null&&e.empty?this:(g==="string"&&(k=d.exec(f),k&&(f=j+parseFloat(k[2])*(k[1]==="+"?1:-1))),i[e.idx]=f,this[h](i)))}})}),f.hook=function(b){var c=b.split(" ");l(c,function(b,c){a.cssHooks[c]={set:function(b,d){var e,g,h="";if(d!=="transparent"&&(a.type(d)!=="string"||(e=n(d)))){d=f(e||d);if(!i.rgba&&d._rgba[3]!==1){g=c==="backgroundColor"?b.parentNode:b;while((h===""||h==="transparent")&&g&&g.style)try{h=a.css(g,"backgroundColor"),g=g.parentNode}catch(j){}d=d.blend(h&&h!=="transparent"?h:"_default")}d=d.toRgbaString()}try{b.style[c]=d}catch(j){}}},a.fx.step[c]=function(b){b.colorInit||(b.start=f(b.elem,c),b.end=f(b.end),b.colorInit=!0),a.cssHooks[c].set(b.elem,b.start.transition(b.end,b.pos))}})},f.hook(c),a.cssHooks.borderColor={expand:function(a){var b={};return l(["Top","Right","Bottom","Left"],function(c,d){b["border"+d+"Color"]=a}),b}},k=a.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}})(jQuery); -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | dockerComp 2 | ========== 3 | 4 | **GOAL** 5 | 6 | To setup a basic prototype for distributed computing in docker. If time permits, add a complex 7 | computing task. 8 | 9 | **INTRODUCTION** 10 | 11 | For the purpose of Distributed (Scientific) Computing, scientists across the world have been 12 | mostly using pre-configured VM images to let the client volunteer in contributing 13 | towards micro-processing tasks that involve processing of raw data received in 14 | chunks over the network. 15 | 16 | But, since the introduction of Docker, life has changed and so have the performance 17 | benchmarks. We propose an system that uses the benefits of Docker to hopefully perform 18 | far better than the currently achieved milestones through VMs. The VMs have a huge 19 | overhead of starting up, as compared to Docker containers. Moreover, we don't even need 20 | to explain the difference between running more than one VM on a HostOS compared to 21 | running multiple docker containers on that same machine! See the point? :) 22 | 23 | - Youtube Video Explaining this project: 24 | 25 | [![Here's a video for DockerComp](http://img.youtube.com/vi/lIp2nrOnKFs/0.jpg)](http://www.youtube.com/watch?v=lIp2nrOnKFs) 26 | 27 | [![Here's a current screenshot of installation and first run](https://arcolife.files.wordpress.com/2015/09/installation-and-first-contact.png)](https://arcolife.wordpress.com/2015/09/21/docker-global-hack-day-mania-dockercomp/) 28 | 29 | [![Here's a current screenshot of client logs when server goes down: constant polling](https://arcolife.files.wordpress.com/2015/09/communicatio-and-outage.png)](https://arcolife.wordpress.com/2015/09/21/docker-global-hack-day-mania-dockercomp/) 30 | 31 | - [Click here](http://asciinema.org/a/13557) for Screencast for running just one script on client side. 32 | 33 | **INSTALLATION** 34 | 35 | - Server side (src/server/): 36 | 37 | - Make sure that your 'src/server/' is up and running, either locally (for test purpose), 38 | or if its deployed elsewhere, then the hostname/IP and Port is provided in the environment 39 | variables as under `$DC_HOST` and `$DC_PORT`. 40 | 41 | (refer next major point on 'Client side' for this script) 42 | 43 | - Do ensure that for running the server, you need to install mongoDB. Refer to following: 44 | [install_mongo guide](https://github.com/arcolife/dockerComp/blob/master/src/server/install_mongo) 45 | and then set the env variables `U_DB, U_USER and U_PASS` giving the same values to them as the 46 | db name, it's user and password set while setting up mongoDB. 47 | 48 | 49 | - Ensure that you've installed deps from `dockerComp/src/server/requirements.txt` 50 | 51 | - To run the src/server, open up a terminal, go to dockerComp/src/server/ and run ```$ ./start``` 52 | This starts the server locally on your machine. 53 | 54 | 55 | - Client side (src/client/): 56 | 57 | - Note: For server side deployement (i.e., the server that basically is responsible for distributing data 58 | to clients), It has to be deployed somewhere and it's IP has to be provided in your `configuration` file. 59 | And then you may distribute the script `installer.sh` alongwith the `configuration` to the clients. 60 | 61 | 62 | - Download [This Script](https://github.com/arcolife/dockerComp/raw/master/installer.sh) and run 63 | 64 | ```$ ./installer.sh``` [configure your Server location for this script, as under `$DC_HOST` & `$DC_PORT` ] 65 | 66 | - Once installed, the daemon output would lie in `$HOME/dockerComp/src/client/scripts/nohup.out` and 67 | the daemon itself, would like in `$HOME/dockerComp/src/client/scripts/slave_manager`. To kill the 68 | daemon, you need to run `$ kill -9 $(ps -e | grep slave_manager | awk -F' ' '{print $1}')` 69 | 70 | Should you need to remove all traces of dockerComp from your machine, just run the script 'cleanup` 71 | included in the source code of this project root. 72 | 73 | Cheers! :) 74 | 75 | **NOTES** 76 | 77 | - Demo link to be updated soon. 78 | 79 | - In case you're curious how to go about running this from client side: 80 | 81 | - So once the server is up and running, all one has to do is download and run installer.sh 82 | 83 | - Docker Image: ``` $ docker pull arcolife/docker_comp ``` (will be kept updated) 84 | 85 | 86 | **FAQ** 87 | 88 | Refer to Wiki .. [click Here!](https://github.com/arcolife/dockerComp/wiki). 89 | 90 | References: 91 | 92 | - http://www.rightscale.com/blog/sites/default/files/docker-containers-vms.png 93 | - http://en.wikipedia.org/wiki/Docker_%28software%29#cite_ref-3 94 | 95 | So, just to give you a context of this whole project, take a look at this project called 96 | [CernVM](http://cernvm.cern.ch/portal/). This is a really awesome project, developed to 97 | help collect CERN's LHC data and perform data analysis on a volunteer's computer or even on 98 | commercial clouds. Just imagine if the whole process of using VM was dockerized! 99 | 100 | 101 | **FEATURES** 102 | 103 | - Can be used for: 104 | - Image Processing 105 | - General Data Analysis 106 | - Scientific Computing 107 | - CrowdSourcing projects. 108 | 109 | 110 | **FUTURE GOALS** 111 | 112 | - Make this a pluggable dockerized distributed computing tool, where you just have to include 113 | a compution task (say, map-reduce) and make it send data to clients. The app should be able 114 | to handle the rest. 115 | 116 | - Benchmark results and compare with existing methodologies. 117 | 118 | **TESTS** 119 | 120 | - From client side: 121 | - although the default connection establishment test is included with install scripts; 122 | run ```$ src/client/scripts/test_server_conn``` (make sure env vars `DC_HOST` and `DC_PORT` are set) 123 | 124 | - From server side: 125 | - TBD 126 | 127 | - Workloads: 128 | - Currently a simple task. TBD. 129 | 130 | 131 | **WORKFLOW** 132 | 133 | 1. Server 134 | 135 | - Dashboard to Manage: 136 | - No. of Clients (and # of containers per client) 137 | - Resources allocated to the containers 138 | 139 | - Master app that manages data sent to each client and checks for integrity. 140 | 141 | 2. Client 142 | 143 | - Installation of Docker 144 | - Starting Containers 145 | - Installation of Application inside the Container 146 | - Connection Establishment with the Server. 147 | - Scripts for the computation 148 | - Error Reporting 149 | 150 | 151 | **REFERENCES** 152 | 153 | 1. https://github.com/cernvm 154 | 2. http://en.wikipedia.org/wiki/List_of_distributed_computing_projects 155 | 3. http://www.rightscale.com/blog/sites/default/files/docker-containers-vms.png 156 | 4. http://www.psc.edu/science/ 157 | 5. http://pybossa.com/ 158 | 6. https://okfn.org/press/releases/crowdcrafting-putting-citizens-control-citizen-science/ 159 | 7. http://www.mediaagility.com/2014/docker-the-next-big-thing-on-cloud/ 160 | 8. http://cernvm.cern.ch/portal/ 161 | 9. http://www.nature.com/news/software-simplified-1.22059 162 | 163 | 164 | [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/arcolife/dockercomp/trend.png)](https://bitdeli.com/free "Bitdeli Badge") 165 | 166 | -------------------------------------------------------------------------------- /src/server/run.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: utf-8 -*- 3 | 4 | ############## 5 | # dockerComp # 6 | ############## 7 | from app import app 8 | from app.models import * 9 | from flask import \ 10 | Flask, \ 11 | render_template, \ 12 | Response, \ 13 | json, \ 14 | jsonify, \ 15 | make_response, \ 16 | request, \ 17 | redirect, \ 18 | session, \ 19 | abort, \ 20 | send_from_directory 21 | 22 | from config import \ 23 | HOST, \ 24 | PORT, \ 25 | DEBUG,\ 26 | TEMPLATE_CONFIGURATION 27 | 28 | from random import randrange 29 | import netaddr 30 | 31 | import subprocess 32 | from subprocess import call 33 | # from subprocess import check_out 34 | 35 | 36 | #### 37 | ## Keep track of important records 38 | #### 39 | 40 | num_machines = 0 41 | docker_arr = [] 42 | tasks_dict = {} 43 | 44 | 45 | @app.route('/', methods=['GET']) 46 | def home(): 47 | """ 48 | dockerComp Container Management dashboard 49 | """ 50 | try: 51 | #print request.path 52 | assert request.path == '/' 53 | print request.headers['Host'], request.method 54 | all_objects = Client.objects.all() 55 | docker_arr = {} 56 | for client_obj in all_objects: 57 | docker_arr[client_obj.ip_addr] = { 58 | 'container_count': len(client_obj.containers), 59 | 'container_details' : {} 60 | } 61 | for container_id in client_obj.containers: 62 | docker_arr[client_obj.ip_addr]['container_details'][container_id] = [ 63 | client_obj.containers[container_id].container_name, 64 | client_obj.containers[container_id].container_ip_addr, 65 | client_obj.containers[container_id].container_port 66 | ] 67 | return render_template("stats.html", 68 | total_clients=Client.objects.count(), 69 | docker_arr=docker_arr) 70 | 71 | except: 72 | abort(404) 73 | 74 | 75 | @app.route('//') 76 | def listener(container_id=None): 77 | """ 78 | listens for possible connections 79 | made by container. 80 | """ 81 | pass 82 | 83 | 84 | @app.route('/task/request///', methods=['GET','POST']) 85 | def data_generator(client_IP=None, container_id=None): 86 | """ 87 | generates random datasets. 88 | """ 89 | if request.method == 'GET': 90 | temp = [] 91 | for i in xrange(randrange(100)): 92 | temp.append((randrange(100), 93 | randrange(100))) 94 | return jsonify({"dataset" : temp}) 95 | elif request.method == 'POST': 96 | tasks_dict[client_IP] = [container_id, request.data] 97 | print tasks_dict 98 | return "200" 99 | else: 100 | abort(404) 101 | 102 | 103 | def integrity_checker(container_id=None, data=None): 104 | """ 105 | checks and verifies data sent over by containers 106 | """ 107 | current = Client.objects.get(container_id=container_id) 108 | 109 | 110 | @app.route('/connect///', methods=['GET','POST']) 111 | def communicator(container_id=None, client_IP=None): 112 | """ 113 | communicates with the client 114 | """ 115 | if request.method == 'POST': 116 | pass 117 | elif request.method == 'GET': 118 | pass 119 | 120 | 121 | @app.route('/test/server/', methods=['GET']) 122 | def test(): 123 | print request.host 124 | return "200" #jsonify({'got response from client': 'OK'}) 125 | 126 | 127 | @app.route('/get_details/', methods=['POST']) 128 | def get_tasks(): 129 | received = json.loads(request.data) 130 | ip_addr = request.environ['REMOTE_ADDR'] 131 | ip_addr_num = netaddr.IPAddress(ip_addr).value 132 | 133 | try: 134 | temp_client = Client.objects.get(ip_addr=ip_addr) 135 | except: 136 | temp_client = Client(ip_addr=ip_addr, 137 | ip_addr_num=ip_addr_num) 138 | 139 | for data in received: 140 | try: 141 | container_port = data['NetworkSettings']['Ports']\ 142 | ['80/tcp'][0]['HostPort'] 143 | except: 144 | # the containerized app was exposed on port 80 145 | container_port = '80' 146 | 147 | container_id = data['Config']['Hostname'] 148 | container_name = data['Name'] 149 | print container_name 150 | container_ip_addr = data['NetworkSettings']['IPAddress'] 151 | temp_container = Container(container_name=container_name, 152 | container_ip_addr=container_ip_addr, 153 | container_id=container_id, 154 | # config=data) 155 | container_port=container_port) 156 | 157 | temp_client.containers[container_name] = temp_container 158 | 159 | temp_client.save() 160 | 161 | #print temp_client.to_json() 162 | print request.host 163 | return '\n>>>> Server: container metadata received..\n' 164 | 165 | 166 | @app.route('/dockers/stats', methods=['GET']) 167 | def docker_stats(): 168 | try: 169 | #print request.path 170 | # assert request.path == '/' 171 | print request.headers['Host'], request.method 172 | # return render_template(jsonify({"num_machines":num_machines,"docker_arr":docker_arr})) 173 | return render_template("stats.html", 174 | x={"num_machines":num_machines,"docker_arr":docker_arr}) 175 | except: 176 | abort(404) 177 | 178 | 179 | # deamon runs the computing tasks in a round-robin fashion 180 | @app.route('/assign/all', methods=['POST']) 181 | def assign_all(): 182 | # dockerIDs = check_output(["docker","ps","-q"]) 183 | # print type(dockerIDs) 184 | # print dockerIDs 185 | while(True): 186 | p = subprocess.Popen(["docker", "ps", "-q"], stdout=subprocess.PIPE) 187 | out, err = p.communicate() 188 | num_machines = len(out.split()) 189 | docker_arr = [] 190 | for index,i in enumerate(out.split()): 191 | info = subprocess.Popen(["docker","inspect",i], stdout=subprocess.PIPE) 192 | info_out, err_out = info.communicate() 193 | cip = json.loads(info_out)[0]['NetworkSettings']['IPAddress'] 194 | data = data_generator() 195 | # print data 196 | # print "****" 197 | num = subprocess.Popen(["./scripts/test_client.sh",cip,str(data)], stdout=subprocess.PIPE) 198 | num_out, num_err_out = num.communicate() 199 | print num_out 200 | # print len(out.split())-index-1 201 | docker_arr.append({'dockerID':i,'dockerInstanceIP':cip}) 202 | 203 | # print "****" 204 | # subprocess.Popen(["curl","-H","Content-type: application/json","-X","POST","http://"+cip+"/tasks","-d",str(data)], stdout=subprocess.PIPE) 205 | # curl -H "Content-type: application/json" -X POST http://$1/tasks/ -d "$2" 206 | 207 | 208 | 209 | if __name__ == '__main__': 210 | try: 211 | app.run(host = HOST, 212 | port = PORT, 213 | debug = DEBUG) 214 | except: 215 | raise 216 | -------------------------------------------------------------------------------- /src/server/app/static/jquery-ui.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.9.2 - 2012-11-23 2 | * http://jqueryui.com 3 | * Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css, jquery.ui.theme.css 4 | * Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */ 5 | 6 | /* Layout helpers 7 | ----------------------------------*/ 8 | .ui-helper-hidden { display: none; } 9 | .ui-helper-hidden-accessible { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; } 10 | .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } 11 | .ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; } 12 | .ui-helper-clearfix:after { clear: both; } 13 | .ui-helper-clearfix { zoom: 1; } 14 | .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } 15 | 16 | 17 | /* Interaction Cues 18 | ----------------------------------*/ 19 | .ui-state-disabled { cursor: default !important; } 20 | 21 | 22 | /* Icons 23 | ----------------------------------*/ 24 | 25 | /* states and images */ 26 | .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } 27 | 28 | 29 | /* Misc visuals 30 | ----------------------------------*/ 31 | 32 | /* Overlays */ 33 | .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } 34 | 35 | .ui-accordion .ui-accordion-header { display: block; cursor: pointer; position: relative; margin-top: 2px; padding: .5em .5em .5em .7em; zoom: 1; } 36 | .ui-accordion .ui-accordion-icons { padding-left: 2.2em; } 37 | .ui-accordion .ui-accordion-noicons { padding-left: .7em; } 38 | .ui-accordion .ui-accordion-icons .ui-accordion-icons { padding-left: 2.2em; } 39 | .ui-accordion .ui-accordion-header .ui-accordion-header-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } 40 | .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; overflow: auto; zoom: 1; } 41 | 42 | .ui-autocomplete { 43 | position: absolute; 44 | top: 0; 45 | left: 0; 46 | cursor: default; 47 | } 48 | 49 | /* workarounds */ 50 | * html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ 51 | 52 | .ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ 53 | .ui-button, .ui-button:link, .ui-button:visited, .ui-button:hover, .ui-button:active { text-decoration: none; } 54 | .ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ 55 | button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ 56 | .ui-button-icons-only { width: 3.4em; } 57 | button.ui-button-icons-only { width: 3.7em; } 58 | 59 | /*button text element */ 60 | .ui-button .ui-button-text { display: block; line-height: 1.4; } 61 | .ui-button-text-only .ui-button-text { padding: .4em 1em; } 62 | .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } 63 | .ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } 64 | .ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } 65 | .ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } 66 | /* no icon support for input elements, provide padding by default */ 67 | input.ui-button { padding: .4em 1em; } 68 | 69 | /*button icon element(s) */ 70 | .ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } 71 | .ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } 72 | .ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } 73 | .ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } 74 | .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } 75 | 76 | /*button sets*/ 77 | .ui-buttonset { margin-right: 7px; } 78 | .ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } 79 | 80 | /* workarounds */ 81 | button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ 82 | 83 | .ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } 84 | .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } 85 | .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } 86 | .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } 87 | .ui-datepicker .ui-datepicker-prev { left:2px; } 88 | .ui-datepicker .ui-datepicker-next { right:2px; } 89 | .ui-datepicker .ui-datepicker-prev-hover { left:1px; } 90 | .ui-datepicker .ui-datepicker-next-hover { right:1px; } 91 | .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } 92 | .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } 93 | .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } 94 | .ui-datepicker select.ui-datepicker-month-year {width: 100%;} 95 | .ui-datepicker select.ui-datepicker-month, 96 | .ui-datepicker select.ui-datepicker-year { width: 49%;} 97 | .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } 98 | .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } 99 | .ui-datepicker td { border: 0; padding: 1px; } 100 | .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } 101 | .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } 102 | .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } 103 | .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } 104 | 105 | /* with multiple calendars */ 106 | .ui-datepicker.ui-datepicker-multi { width:auto; } 107 | .ui-datepicker-multi .ui-datepicker-group { float:left; } 108 | .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } 109 | .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } 110 | .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } 111 | .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } 112 | .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } 113 | .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } 114 | .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } 115 | .ui-datepicker-row-break { clear:both; width:100%; font-size:0em; } 116 | 117 | /* RTL support */ 118 | .ui-datepicker-rtl { direction: rtl; } 119 | .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } 120 | .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } 121 | .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } 122 | .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } 123 | .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } 124 | .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } 125 | .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } 126 | .ui-datepicker-rtl .ui-datepicker-group { float:right; } 127 | .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } 128 | .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } 129 | 130 | /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ 131 | .ui-datepicker-cover { 132 | position: absolute; /*must have*/ 133 | z-index: -1; /*must have*/ 134 | filter: mask(); /*must have*/ 135 | top: -4px; /*must have*/ 136 | left: -4px; /*must have*/ 137 | width: 200px; /*must have*/ 138 | height: 200px; /*must have*/ 139 | } 140 | .ui-dialog { position: absolute; top: 0; left: 0; padding: .2em; width: 300px; overflow: hidden; } 141 | .ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } 142 | .ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } 143 | .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } 144 | .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } 145 | .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } 146 | .ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } 147 | .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } 148 | .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } 149 | .ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } 150 | .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } 151 | .ui-draggable .ui-dialog-titlebar { cursor: move; } 152 | 153 | .ui-menu { list-style:none; padding: 2px; margin: 0; display:block; outline: none; } 154 | .ui-menu .ui-menu { margin-top: -3px; position: absolute; } 155 | .ui-menu .ui-menu-item { margin: 0; padding: 0; zoom: 1; width: 100%; } 156 | .ui-menu .ui-menu-divider { margin: 5px -2px 5px -2px; height: 0; font-size: 0; line-height: 0; border-width: 1px 0 0 0; } 157 | .ui-menu .ui-menu-item a { text-decoration: none; display: block; padding: 2px .4em; line-height: 1.5; zoom: 1; font-weight: normal; } 158 | .ui-menu .ui-menu-item a.ui-state-focus, 159 | .ui-menu .ui-menu-item a.ui-state-active { font-weight: normal; margin: -1px; } 160 | 161 | .ui-menu .ui-state-disabled { font-weight: normal; margin: .4em 0 .2em; line-height: 1.5; } 162 | .ui-menu .ui-state-disabled a { cursor: default; } 163 | 164 | /* icon support */ 165 | .ui-menu-icons { position: relative; } 166 | .ui-menu-icons .ui-menu-item a { position: relative; padding-left: 2em; } 167 | 168 | /* left-aligned */ 169 | .ui-menu .ui-icon { position: absolute; top: .2em; left: .2em; } 170 | 171 | /* right-aligned */ 172 | .ui-menu .ui-menu-icon { position: static; float: right; } 173 | 174 | .ui-progressbar { height:2em; text-align: left; overflow: hidden; } 175 | .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } 176 | .ui-resizable { position: relative;} 177 | .ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; } 178 | .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } 179 | .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } 180 | .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } 181 | .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } 182 | .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } 183 | .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } 184 | .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } 185 | .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } 186 | .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;} 187 | .ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } 188 | 189 | .ui-slider { position: relative; text-align: left; } 190 | .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } 191 | .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } 192 | 193 | .ui-slider-horizontal { height: .8em; } 194 | .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } 195 | .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } 196 | .ui-slider-horizontal .ui-slider-range-min { left: 0; } 197 | .ui-slider-horizontal .ui-slider-range-max { right: 0; } 198 | 199 | .ui-slider-vertical { width: .8em; height: 100px; } 200 | .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } 201 | .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } 202 | .ui-slider-vertical .ui-slider-range-min { bottom: 0; } 203 | .ui-slider-vertical .ui-slider-range-max { top: 0; } 204 | .ui-spinner { position:relative; display: inline-block; overflow: hidden; padding: 0; vertical-align: middle; } 205 | .ui-spinner-input { border: none; background: none; padding: 0; margin: .2em 0; vertical-align: middle; margin-left: .4em; margin-right: 22px; } 206 | .ui-spinner-button { width: 16px; height: 50%; font-size: .5em; padding: 0; margin: 0; text-align: center; position: absolute; cursor: default; display: block; overflow: hidden; right: 0; } 207 | .ui-spinner a.ui-spinner-button { border-top: none; border-bottom: none; border-right: none; } /* more specificity required here to overide default borders */ 208 | .ui-spinner .ui-icon { position: absolute; margin-top: -8px; top: 50%; left: 0; } /* vertical centre icon */ 209 | .ui-spinner-up { top: 0; } 210 | .ui-spinner-down { bottom: 0; } 211 | 212 | /* TR overrides */ 213 | .ui-spinner .ui-icon-triangle-1-s { 214 | /* need to fix icons sprite */ 215 | background-position:-65px -16px; 216 | } 217 | 218 | .ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ 219 | .ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } 220 | .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 0; margin: 1px .2em 0 0; border-bottom: 0; padding: 0; white-space: nowrap; } 221 | .ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } 222 | .ui-tabs .ui-tabs-nav li.ui-tabs-active { margin-bottom: -1px; padding-bottom: 1px; } 223 | .ui-tabs .ui-tabs-nav li.ui-tabs-active a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-tabs-loading a { cursor: text; } 224 | .ui-tabs .ui-tabs-nav li a, .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ 225 | .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } 226 | 227 | .ui-tooltip { 228 | padding: 8px; 229 | position: absolute; 230 | z-index: 9999; 231 | max-width: 300px; 232 | -webkit-box-shadow: 0 0 5px #aaa; 233 | box-shadow: 0 0 5px #aaa; 234 | } 235 | /* Fades and background-images don't work well together in IE6, drop the image */ 236 | * html .ui-tooltip { 237 | background-image: none; 238 | } 239 | body .ui-tooltip { border-width: 2px; } 240 | 241 | /* Component containers 242 | ----------------------------------*/ 243 | .ui-widget { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1.1em/*{fsDefault}*/; } 244 | .ui-widget .ui-widget { font-size: 1em; } 245 | .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1em; } 246 | .ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ url(images/ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #222222/*{fcContent}*/; } 247 | .ui-widget-content a { color: #222222/*{fcContent}*/; } 248 | .ui-widget-header { border: 1px solid #aaaaaa/*{borderColorHeader}*/; background: #cccccc/*{bgColorHeader}*/ url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; color: #222222/*{fcHeader}*/; font-weight: bold; } 249 | .ui-widget-header a { color: #222222/*{fcHeader}*/; } 250 | 251 | /* Interaction states 252 | ----------------------------------*/ 253 | .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background: #e6e6e6/*{bgColorDefault}*/ url(images/ui-bg_glass_75_e6e6e6_1x400.png)/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #555555/*{fcDefault}*/; } 254 | .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555/*{fcDefault}*/; text-decoration: none; } 255 | .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999/*{borderColorHover}*/; background: #dadada/*{bgColorHover}*/ url(images/ui-bg_glass_75_dadada_1x400.png)/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcHover}*/; } 256 | .ui-state-hover a, .ui-state-hover a:hover, .ui-state-hover a:link, .ui-state-hover a:visited { color: #212121/*{fcHover}*/; text-decoration: none; } 257 | .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa/*{borderColorActive}*/; background: #ffffff/*{bgColorActive}*/ url(images/ui-bg_glass_65_ffffff_1x400.png)/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcActive}*/; } 258 | .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121/*{fcActive}*/; text-decoration: none; } 259 | 260 | /* Interaction Cues 261 | ----------------------------------*/ 262 | .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1/*{borderColorHighlight}*/; background: #fbf9ee/*{bgColorHighlight}*/ url(images/ui-bg_glass_55_fbf9ee_1x400.png)/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; color: #363636/*{fcHighlight}*/; } 263 | .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636/*{fcHighlight}*/; } 264 | .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a/*{borderColorError}*/; background: #fef1ec/*{bgColorError}*/ url(images/ui-bg_glass_95_fef1ec_1x400.png)/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; color: #cd0a0a/*{fcError}*/; } 265 | .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a/*{fcError}*/; } 266 | .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a/*{fcError}*/; } 267 | .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } 268 | .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } 269 | .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } 270 | .ui-state-disabled .ui-icon { filter:Alpha(Opacity=35); } /* For IE8 - See #6059 */ 271 | 272 | /* Icons 273 | ----------------------------------*/ 274 | 275 | /* states and images */ 276 | .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; } 277 | .ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; } 278 | .ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsHeader}*/; } 279 | .ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png)/*{iconsDefault}*/; } 280 | .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsHover}*/; } 281 | .ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsActive}*/; } 282 | .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png)/*{iconsHighlight}*/; } 283 | .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png)/*{iconsError}*/; } 284 | 285 | /* positioning */ 286 | .ui-icon-carat-1-n { background-position: 0 0; } 287 | .ui-icon-carat-1-ne { background-position: -16px 0; } 288 | .ui-icon-carat-1-e { background-position: -32px 0; } 289 | .ui-icon-carat-1-se { background-position: -48px 0; } 290 | .ui-icon-carat-1-s { background-position: -64px 0; } 291 | .ui-icon-carat-1-sw { background-position: -80px 0; } 292 | .ui-icon-carat-1-w { background-position: -96px 0; } 293 | .ui-icon-carat-1-nw { background-position: -112px 0; } 294 | .ui-icon-carat-2-n-s { background-position: -128px 0; } 295 | .ui-icon-carat-2-e-w { background-position: -144px 0; } 296 | .ui-icon-triangle-1-n { background-position: 0 -16px; } 297 | .ui-icon-triangle-1-ne { background-position: -16px -16px; } 298 | .ui-icon-triangle-1-e { background-position: -32px -16px; } 299 | .ui-icon-triangle-1-se { background-position: -48px -16px; } 300 | .ui-icon-triangle-1-s { background-position: -64px -16px; } 301 | .ui-icon-triangle-1-sw { background-position: -80px -16px; } 302 | .ui-icon-triangle-1-w { background-position: -96px -16px; } 303 | .ui-icon-triangle-1-nw { background-position: -112px -16px; } 304 | .ui-icon-triangle-2-n-s { background-position: -128px -16px; } 305 | .ui-icon-triangle-2-e-w { background-position: -144px -16px; } 306 | .ui-icon-arrow-1-n { background-position: 0 -32px; } 307 | .ui-icon-arrow-1-ne { background-position: -16px -32px; } 308 | .ui-icon-arrow-1-e { background-position: -32px -32px; } 309 | .ui-icon-arrow-1-se { background-position: -48px -32px; } 310 | .ui-icon-arrow-1-s { background-position: -64px -32px; } 311 | .ui-icon-arrow-1-sw { background-position: -80px -32px; } 312 | .ui-icon-arrow-1-w { background-position: -96px -32px; } 313 | .ui-icon-arrow-1-nw { background-position: -112px -32px; } 314 | .ui-icon-arrow-2-n-s { background-position: -128px -32px; } 315 | .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } 316 | .ui-icon-arrow-2-e-w { background-position: -160px -32px; } 317 | .ui-icon-arrow-2-se-nw { background-position: -176px -32px; } 318 | .ui-icon-arrowstop-1-n { background-position: -192px -32px; } 319 | .ui-icon-arrowstop-1-e { background-position: -208px -32px; } 320 | .ui-icon-arrowstop-1-s { background-position: -224px -32px; } 321 | .ui-icon-arrowstop-1-w { background-position: -240px -32px; } 322 | .ui-icon-arrowthick-1-n { background-position: 0 -48px; } 323 | .ui-icon-arrowthick-1-ne { background-position: -16px -48px; } 324 | .ui-icon-arrowthick-1-e { background-position: -32px -48px; } 325 | .ui-icon-arrowthick-1-se { background-position: -48px -48px; } 326 | .ui-icon-arrowthick-1-s { background-position: -64px -48px; } 327 | .ui-icon-arrowthick-1-sw { background-position: -80px -48px; } 328 | .ui-icon-arrowthick-1-w { background-position: -96px -48px; } 329 | .ui-icon-arrowthick-1-nw { background-position: -112px -48px; } 330 | .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } 331 | .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } 332 | .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } 333 | .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } 334 | .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } 335 | .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } 336 | .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } 337 | .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } 338 | .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } 339 | .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } 340 | .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } 341 | .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } 342 | .ui-icon-arrowreturn-1-w { background-position: -64px -64px; } 343 | .ui-icon-arrowreturn-1-n { background-position: -80px -64px; } 344 | .ui-icon-arrowreturn-1-e { background-position: -96px -64px; } 345 | .ui-icon-arrowreturn-1-s { background-position: -112px -64px; } 346 | .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } 347 | .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } 348 | .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } 349 | .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } 350 | .ui-icon-arrow-4 { background-position: 0 -80px; } 351 | .ui-icon-arrow-4-diag { background-position: -16px -80px; } 352 | .ui-icon-extlink { background-position: -32px -80px; } 353 | .ui-icon-newwin { background-position: -48px -80px; } 354 | .ui-icon-refresh { background-position: -64px -80px; } 355 | .ui-icon-shuffle { background-position: -80px -80px; } 356 | .ui-icon-transfer-e-w { background-position: -96px -80px; } 357 | .ui-icon-transferthick-e-w { background-position: -112px -80px; } 358 | .ui-icon-folder-collapsed { background-position: 0 -96px; } 359 | .ui-icon-folder-open { background-position: -16px -96px; } 360 | .ui-icon-document { background-position: -32px -96px; } 361 | .ui-icon-document-b { background-position: -48px -96px; } 362 | .ui-icon-note { background-position: -64px -96px; } 363 | .ui-icon-mail-closed { background-position: -80px -96px; } 364 | .ui-icon-mail-open { background-position: -96px -96px; } 365 | .ui-icon-suitcase { background-position: -112px -96px; } 366 | .ui-icon-comment { background-position: -128px -96px; } 367 | .ui-icon-person { background-position: -144px -96px; } 368 | .ui-icon-print { background-position: -160px -96px; } 369 | .ui-icon-trash { background-position: -176px -96px; } 370 | .ui-icon-locked { background-position: -192px -96px; } 371 | .ui-icon-unlocked { background-position: -208px -96px; } 372 | .ui-icon-bookmark { background-position: -224px -96px; } 373 | .ui-icon-tag { background-position: -240px -96px; } 374 | .ui-icon-home { background-position: 0 -112px; } 375 | .ui-icon-flag { background-position: -16px -112px; } 376 | .ui-icon-calendar { background-position: -32px -112px; } 377 | .ui-icon-cart { background-position: -48px -112px; } 378 | .ui-icon-pencil { background-position: -64px -112px; } 379 | .ui-icon-clock { background-position: -80px -112px; } 380 | .ui-icon-disk { background-position: -96px -112px; } 381 | .ui-icon-calculator { background-position: -112px -112px; } 382 | .ui-icon-zoomin { background-position: -128px -112px; } 383 | .ui-icon-zoomout { background-position: -144px -112px; } 384 | .ui-icon-search { background-position: -160px -112px; } 385 | .ui-icon-wrench { background-position: -176px -112px; } 386 | .ui-icon-gear { background-position: -192px -112px; } 387 | .ui-icon-heart { background-position: -208px -112px; } 388 | .ui-icon-star { background-position: -224px -112px; } 389 | .ui-icon-link { background-position: -240px -112px; } 390 | .ui-icon-cancel { background-position: 0 -128px; } 391 | .ui-icon-plus { background-position: -16px -128px; } 392 | .ui-icon-plusthick { background-position: -32px -128px; } 393 | .ui-icon-minus { background-position: -48px -128px; } 394 | .ui-icon-minusthick { background-position: -64px -128px; } 395 | .ui-icon-close { background-position: -80px -128px; } 396 | .ui-icon-closethick { background-position: -96px -128px; } 397 | .ui-icon-key { background-position: -112px -128px; } 398 | .ui-icon-lightbulb { background-position: -128px -128px; } 399 | .ui-icon-scissors { background-position: -144px -128px; } 400 | .ui-icon-clipboard { background-position: -160px -128px; } 401 | .ui-icon-copy { background-position: -176px -128px; } 402 | .ui-icon-contact { background-position: -192px -128px; } 403 | .ui-icon-image { background-position: -208px -128px; } 404 | .ui-icon-video { background-position: -224px -128px; } 405 | .ui-icon-script { background-position: -240px -128px; } 406 | .ui-icon-alert { background-position: 0 -144px; } 407 | .ui-icon-info { background-position: -16px -144px; } 408 | .ui-icon-notice { background-position: -32px -144px; } 409 | .ui-icon-help { background-position: -48px -144px; } 410 | .ui-icon-check { background-position: -64px -144px; } 411 | .ui-icon-bullet { background-position: -80px -144px; } 412 | .ui-icon-radio-on { background-position: -96px -144px; } 413 | .ui-icon-radio-off { background-position: -112px -144px; } 414 | .ui-icon-pin-w { background-position: -128px -144px; } 415 | .ui-icon-pin-s { background-position: -144px -144px; } 416 | .ui-icon-play { background-position: 0 -160px; } 417 | .ui-icon-pause { background-position: -16px -160px; } 418 | .ui-icon-seek-next { background-position: -32px -160px; } 419 | .ui-icon-seek-prev { background-position: -48px -160px; } 420 | .ui-icon-seek-end { background-position: -64px -160px; } 421 | .ui-icon-seek-start { background-position: -80px -160px; } 422 | /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ 423 | .ui-icon-seek-first { background-position: -80px -160px; } 424 | .ui-icon-stop { background-position: -96px -160px; } 425 | .ui-icon-eject { background-position: -112px -160px; } 426 | .ui-icon-volume-off { background-position: -128px -160px; } 427 | .ui-icon-volume-on { background-position: -144px -160px; } 428 | .ui-icon-power { background-position: 0 -176px; } 429 | .ui-icon-signal-diag { background-position: -16px -176px; } 430 | .ui-icon-signal { background-position: -32px -176px; } 431 | .ui-icon-battery-0 { background-position: -48px -176px; } 432 | .ui-icon-battery-1 { background-position: -64px -176px; } 433 | .ui-icon-battery-2 { background-position: -80px -176px; } 434 | .ui-icon-battery-3 { background-position: -96px -176px; } 435 | .ui-icon-circle-plus { background-position: 0 -192px; } 436 | .ui-icon-circle-minus { background-position: -16px -192px; } 437 | .ui-icon-circle-close { background-position: -32px -192px; } 438 | .ui-icon-circle-triangle-e { background-position: -48px -192px; } 439 | .ui-icon-circle-triangle-s { background-position: -64px -192px; } 440 | .ui-icon-circle-triangle-w { background-position: -80px -192px; } 441 | .ui-icon-circle-triangle-n { background-position: -96px -192px; } 442 | .ui-icon-circle-arrow-e { background-position: -112px -192px; } 443 | .ui-icon-circle-arrow-s { background-position: -128px -192px; } 444 | .ui-icon-circle-arrow-w { background-position: -144px -192px; } 445 | .ui-icon-circle-arrow-n { background-position: -160px -192px; } 446 | .ui-icon-circle-zoomin { background-position: -176px -192px; } 447 | .ui-icon-circle-zoomout { background-position: -192px -192px; } 448 | .ui-icon-circle-check { background-position: -208px -192px; } 449 | .ui-icon-circlesmall-plus { background-position: 0 -208px; } 450 | .ui-icon-circlesmall-minus { background-position: -16px -208px; } 451 | .ui-icon-circlesmall-close { background-position: -32px -208px; } 452 | .ui-icon-squaresmall-plus { background-position: -48px -208px; } 453 | .ui-icon-squaresmall-minus { background-position: -64px -208px; } 454 | .ui-icon-squaresmall-close { background-position: -80px -208px; } 455 | .ui-icon-grip-dotted-vertical { background-position: 0 -224px; } 456 | .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } 457 | .ui-icon-grip-solid-vertical { background-position: -32px -224px; } 458 | .ui-icon-grip-solid-horizontal { background-position: -48px -224px; } 459 | .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } 460 | .ui-icon-grip-diagonal-se { background-position: -80px -224px; } 461 | 462 | 463 | /* Misc visuals 464 | ----------------------------------*/ 465 | 466 | /* Corner radius */ 467 | .ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; -khtml-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; } 468 | .ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; -khtml-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; } 469 | .ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; } 470 | .ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; } 471 | 472 | /* Overlays */ 473 | .ui-widget-overlay { background: #aaaaaa/*{bgColorOverlay}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityOverlay}*/; } 474 | .ui-widget-shadow { margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/; padding: 8px/*{thicknessShadow}*/; background: #aaaaaa/*{bgColorShadow}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityShadow}*/; -moz-border-radius: 8px/*{cornerRadiusShadow}*/; -khtml-border-radius: 8px/*{cornerRadiusShadow}*/; -webkit-border-radius: 8px/*{cornerRadiusShadow}*/; border-radius: 8px/*{cornerRadiusShadow}*/; } -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | {one line to give the program's name and a brief idea of what it does.} 635 | Copyright (C) {year} {name of author} 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | {project} Copyright (C) {year} {fullname} 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /src/server/app/static/jquery.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery v1.8.3 jquery.com | jquery.org/license */ 2 | (function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write(""),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t
a",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="
t
",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="
",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;ti.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="
",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="

",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t0)for(i=r;i=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*\s*$/g,Nt={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X
","
"]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1>");try{for(;r1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]===""&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("
").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return v})})(window); --------------------------------------------------------------------------------