aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Jenkinsfile23
-rw-r--r--README.md95
-rw-r--r--docs/DEV.md11
-rw-r--r--moon_forming/Dockerfile6
-rw-r--r--moon_forming/README.md7
-rw-r--r--moon_forming/config_moon.sh (renamed from moon_forming/run.sh)4
-rw-r--r--moon_forming/switch.sh19
-rw-r--r--moon_gui/DEV.md28
-rw-r--r--moon_gui/delivery/assets/css/main.css2
-rwxr-xr-xmoon_gui/delivery/assets/i18n/en.json4
-rw-r--r--moon_gui/delivery/assets/img/et.jpgbin0 -> 31641 bytes
-rw-r--r--moon_gui/delivery/html/common/compatibility/compatibility.tpl.html2
-rw-r--r--moon_gui/delivery/html/common/header/header.tpl.html2
-rw-r--r--moon_gui/delivery/html/model/action/model-add.tpl.html2
-rw-r--r--moon_gui/delivery/html/model/action/model-delete.tpl.html2
-rw-r--r--moon_gui/delivery/html/model/action/model-view.tpl.html2
-rw-r--r--moon_gui/delivery/html/model/edit/metadata/metadata-edit.tpl.html2
-rw-r--r--moon_gui/delivery/html/model/edit/metarules/action/mapping/metarules-map.tpl.html2
-rw-r--r--moon_gui/delivery/html/model/edit/metarules/action/mapping/metarules-unmap.tpl.html2
-rw-r--r--moon_gui/delivery/html/model/edit/metarules/action/metarules-edit.tpl.html2
-rw-r--r--moon_gui/delivery/html/pdp/action/pdp-add.tpl.html2
-rw-r--r--moon_gui/delivery/html/pdp/action/pdp-delete.tpl.html2
-rw-r--r--moon_gui/delivery/html/policy/action/mapping/policy-map.tpl.html2
-rw-r--r--moon_gui/delivery/html/policy/action/mapping/policy-unmap.tpl.html2
-rw-r--r--moon_gui/delivery/html/policy/action/policy-add.tpl.html2
-rw-r--r--moon_gui/delivery/html/policy/action/policy-delete.tpl.html2
-rw-r--r--moon_gui/delivery/html/policy/edit/parameter/assignments/assignments-edit.tpl.html1
-rw-r--r--moon_gui/delivery/html/policy/edit/parameter/data/data-edit.tpl.html1
-rw-r--r--moon_gui/delivery/html/policy/edit/parameter/perimeter/perimeter-edit.tpl.html11
-rw-r--r--moon_gui/delivery/html/policy/edit/parameter/rules/rules-edit.tpl.html1
-rw-r--r--moon_gui/delivery/html/policy/edit/parameter/rules/rules-list.tpl.html2
-rw-r--r--moon_gui/delivery/html/policy/edit/policy-edit.tpl.html8
-rw-r--r--moon_gui/delivery/html/project/action/mapping/project-map.tpl.html2
-rw-r--r--moon_gui/delivery/html/project/action/mapping/project-unmap.tpl.html2
-rw-r--r--moon_gui/delivery/html/project/action/project-add.tpl.html2
-rw-r--r--moon_gui/delivery/html/project/action/project-delete.tpl.html2
-rw-r--r--moon_gui/delivery/html/project/action/project-view.tpl.html2
-rw-r--r--moon_gui/delivery/js/app.js8
-rw-r--r--moon_gui/delivery/js/modules.js39
-rw-r--r--moon_gui/package.json2
-rwxr-xr-xmoon_gui/static/app/common/header/header.tpl.html2
-rwxr-xr-xmoon_gui/static/app/model/edit/metadata/metadata.edit.dir.js10
-rwxr-xr-xmoon_gui/static/app/model/edit/metadata/metadata.list.dir.js12
-rwxr-xr-xmoon_gui/static/app/model/edit/metarules/action/metarules.controller.edit.js2
-rwxr-xr-xmoon_gui/static/app/model/edit/metarules/action/metarules.edit.basic.dir.js4
-rwxr-xr-xmoon_gui/static/app/model/edit/metarules/metarules.list.dir.js3
-rwxr-xr-xmoon_gui/static/app/moon.module.js4
-rwxr-xr-xmoon_gui/static/app/policy/edit/parameter/data/data-edit.tpl.html27
-rwxr-xr-xmoon_gui/static/app/policy/edit/parameter/data/data.edit.dir.js98
-rwxr-xr-xmoon_gui/static/app/policy/edit/parameter/perimeter/perimeter.edit.dir.js2
-rwxr-xr-xmoon_gui/static/app/policy/edit/parameter/rules/rules-list.tpl.html2
-rwxr-xr-xmoon_gui/static/app/policy/edit/policy-edit.tpl.html8
-rwxr-xr-xmoon_gui/static/app/policy/edit/policy.controller.edit.js14
-rwxr-xr-xmoon_gui/static/app/services/moon/rule/metarule.service.js2
-rwxr-xr-xmoon_gui/static/i18n/en.json4
-rwxr-xr-xmoon_gui/static/version.json4
-rw-r--r--moon_interface/moon_interface/authz_requests.py2
-rw-r--r--moon_manager/moon_manager/__init__.py2
-rw-r--r--moon_manager/moon_manager/api/slaves.py110
-rw-r--r--moon_manager/moon_manager/http_server.py3
-rw-r--r--moon_manager/tests/functional_pod/conftest.py12
-rw-r--r--moon_manager/tests/functional_pod/run_functional_tests.sh11
-rw-r--r--moon_manager/tests/functional_pod/test_manager.py77
-rw-r--r--moon_manager/tests/functional_pod/test_models.py78
-rw-r--r--moon_manager/tests/unit_python/api/test_assignemnt.py174
-rw-r--r--moon_manager/tests/unit_python/api/test_data.py168
-rw-r--r--moon_manager/tests/unit_python/api/test_pdp.py62
-rw-r--r--moon_manager/tests/unit_python/api/test_rules.py58
-rw-r--r--moon_manager/tests/unit_python/api/utilities.py16
-rw-r--r--moon_manager/tests/unit_python/conftest.py61
-rw-r--r--moon_orchestrator/moon_orchestrator/__init__.py2
-rw-r--r--moon_orchestrator/moon_orchestrator/api/pods.py139
-rw-r--r--moon_orchestrator/moon_orchestrator/api/slaves.py46
-rw-r--r--moon_orchestrator/moon_orchestrator/drivers.py128
-rw-r--r--moon_orchestrator/moon_orchestrator/http_server.py7
-rw-r--r--moon_orchestrator/tests/unit_python/test_pods.py104
-rw-r--r--moon_orchestrator/tests/unit_python/test_slaves.py17
-rw-r--r--python_moonclient/Changelog7
-rw-r--r--python_moonclient/python_moonclient/__init__.py2
-rw-r--r--python_moonclient/python_moonclient/scripts.py74
-rw-r--r--python_moonclient/python_moonclient/slaves.py61
-rw-r--r--python_moonclient/setup.py5
-rw-r--r--python_moonclient/tests/unit_python/__init__.py0
-rw-r--r--python_moondb/python_moondb/api/policy.py36
-rwxr-xr-xpython_moondb/tests/unit_python/policies/test_assignments.py29
-rwxr-xr-xpython_moondb/tests/unit_python/policies/test_data.py84
-rwxr-xr-xpython_moondb/tests/unit_python/policies/test_policies.py7
-rw-r--r--python_moonutilities/Changelog4
-rw-r--r--python_moonutilities/python_moonutilities/__init__.py2
-rw-r--r--python_moonutilities/python_moonutilities/configuration.py5
-rw-r--r--python_moonutilities/python_moonutilities/exceptions.py35
-rw-r--r--python_moonutilities/tests/unit_python/mock_repo/urls.py5
-rw-r--r--python_moonutilities/tests/unit_python/test_configuration.py10
-rw-r--r--tests/README.md77
-rw-r--r--tests/functional/README.md27
-rw-r--r--tests/functional/run_tests.sh13
-rw-r--r--tests/functional/run_tests_for_component.sh27
-rw-r--r--tests/python_unit/README.md5
-rw-r--r--tests/python_unit/run_tests.sh12
-rw-r--r--tools/moon_jenkins/Dockerfile8
-rw-r--r--tools/moon_jenkins/README.md37
-rw-r--r--tools/moon_jenkins/docker-compose.yml20
-rw-r--r--tools/moon_jenkins/images/Create Multibranch Pipeline.pngbin0 -> 55639 bytes
-rw-r--r--tools/moon_jenkins/images/Git Source Multibranch Pipeline.pngbin0 -> 31054 bytes
-rw-r--r--tools/moon_jenkins/images/Multibranch Pipeline Log.pngbin0 -> 55231 bytes
-rw-r--r--tools/moon_jenkins/images/Select Source Multibranch Pipeline.pngbin0 -> 23375 bytes
-rw-r--r--tools/moon_jenkins/plugins.txt100
-rw-r--r--tools/moon_jenkins/security.groovy20
-rw-r--r--tools/moon_kubernetes/README.md33
-rw-r--r--tools/moon_kubernetes/templates/moon_forming_functest.yaml30
-rw-r--r--tools/moon_kubernetes/templates/moon_gui.yaml2
111 files changed, 2091 insertions, 473 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 00000000..42756ece
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,23 @@
+properties([
+ pipelineTriggers([cron('H * * * *')])
+])
+node {
+ checkout scm
+ def packages = ["python_moonutilities","python_moondb","python_moonclient"]
+ def subtests = [:]
+ for (x in packages) {
+ def pkg = x
+ subtests[pkg] = {
+ withDockerContainer('wukongsun/moon_python_unit_test') {
+ stage("Install prerequisites for package ${pkg}") {
+ sh("pip install pytest requests_mock requests --upgrade")
+ sh("cd ${pkg} && pip install -r tests/unit_python/requirements.txt && pip install .")
+ }
+ stage("Unit test for package ${pkg}") {
+ sh "cd ${pkg}/tests/unit_python && pytest ."
+ }
+ }
+ }
+ }
+ parallel subtests
+} \ No newline at end of file
diff --git a/README.md b/README.md
index ecb868b3..23061d7d 100644
--- a/README.md
+++ b/README.md
@@ -1,16 +1,16 @@
# Moon
__Version 4.3__
-
This directory contains all the modules for running the Moon platform.
-## Platform Setup
+
+## Platform
+### Setup
- [Docker installation](tools/moon_kubernetes/README.md)
- [kubeadm installation](tools/moon_kubernetes/README.md)
- [Moon deployment](tools/moon_kubernetes/README.md)
- [OpenStack deployment](tools/openstack/README.md)
-
-## Micro-service Architecture
+### Micro-service Architecture
The Moon platform is composed on the following components/containers:
- *consul*: a Consul configuration server
- *db*: a MySQL database server
@@ -23,83 +23,56 @@ The Moon platform is composed on the following components/containers:
## Manipulation
### moon_gui
-The Moon platform comes with a graphical user interface which can be used with
-a web browser at this URL `http://$MOON_HOST:30002`
-
-You will be asked to put a login and password. Those elements are the login and password
-of the Keystone server, if you didn't modify the Keystone server, you will find the
-login and password here `http://$MOON_HOST:30005/ui/#/dc1/kv/openstack/keystone/edit`
+The web access of Moon is through the URL `http://$MOON_HOST:30002` with the login and password of Keystone.
+The default login and password can be found here: `http://$MOON_HOST:30005/ui/#/dc1/kv/openstack/keystone/edit`.
**WARNING: the password is in clear text, this is a known security issue.**
### moon_manager
-The Moon platform can also be requested through its API `http://$MOON_HOST:30001`
+The REST access of Moon is through `http://$MOON_HOST:30001`
-**WARNING: By default, no login/password will be needed because of
-the configuration which is in DEV mode.**
+**WARNING: By default, no login/password will be needed because of the configuration which is in DEV mode.**
-If you want more security, you have to update the configuration of the Keystone server here:
-`http://$MOON_HOST:30005/ui/#/dc1/kv/openstack/keystone/edit`
-by modifying the `check_token` argument to `yes`.
-If you write this modification, your requests to Moon API must always include a valid token
-taken from the Keystone server. This token must be place in the header of the request
-(`X-Auth-Token`).
+For more security, update `http://$MOON_HOST:30005/ui/#/dc1/kv/openstack/keystone/edit` by modifying the `check_token` argument to `yes`
+Requests to Moon API must include a valid token taken from Keystone in the header of `X-Auth-Token`.
-### End-to-end Functional Test
-Check if the Manager API is running:
+Check if the Manager API is running with:
```bash
curl http://$MOON_HOST:30001
curl http://$MOON_HOST:30001/pdp
curl http://$MOON_HOST:30001/policies
```
-### Consul Check
-Check the Consul service for
-- *Components/Manager*, e.g.
-```json
-{
- "port": 8082,
- "bind": "0.0.0.0",
- "hostname": "manager",
- "container": "wukongsun/moon_manager:v4.3.1",
- "external": {
- "port": 30001,
- "hostname": "$MOON_HOST"
- }
-}
-```
-- *OpenStack/Keystone*: e.g.
-```json
-{
- "url": "http://keystone:5000/v3",
- "user": "admin",
- "password": "p4ssw0rd",
- "domain": "default",
- "project": "admin",
- "check_token": false,
- "certificate": false,
- "external": {
- "url": "http://$MOON_HOST:30006/v3"
- }
-}
+The Moon platform is fully installed and configured when you have no error with the `moon_get_keystone_projects`:
+```bash
+sudo pip install python_moonclient --upgrade
+moon_get_keystone_projects
```
-### Tests
-Launch functional [test scenario](tests/functional/scenario_enabled) :
+### moon_wrapper
+The moon_wrapper component is used to connect OpenStack to the Moon platform.
+You need to load one wrapper before connecting OpenStack to Moon.
+First of all, get the names of all available slaves:
```bash
-sudo pip install python_moonclient --upgrade
-cd $MOON_HOME/tests/functional/scenario_tests
-moon_create_pdp --consul-host=$MOON_HOST --consul-port=30005 -v rbac_large.py
-moon_get_keystone_project --consul-host=$MOON_HOST --consul-port=30005
-moon_get_pdp --consul-host=$MOON_HOST --consul-port=30005
-moon_map_pdp_to_project "<pdp_id>" "<keystone_project_id>"
-moon_send_authz_to_wrapper --consul-host=$MOON_HOST --consul-port=30005 --authz-host=$WRAPPER_HOST --authz-port=$WRAPPER_PORT -v rbac_large.py
+moon_get_slaves
```
+Select the slave you want to configure:
+```bash
+moon_set_slave <name_of_the_slave>
+```
+If you don't put a name here, by default, the script will use `kubernetes-admin@kubernetes`
+which is the master.
-To retrieve the wrapper information, use the following command:
+If you need to unload the slave, use the following command:
```bash
-kubectl get -n moon services | grep wrapper
+moon_delete_slave <name_of_the_slave>
```
+If you don't put a name here, by default, the script will use `kubernetes-admin@kubernetes`.
+
+
+## Tests
+- [Python Unit Test](tests/python_unit/README.md)
+- [Functional Test](tests/functional/README.md)
## Annexe
diff --git a/docs/DEV.md b/docs/DEV.md
index 0dff2f17..be540d40 100644
--- a/docs/DEV.md
+++ b/docs/DEV.md
@@ -34,7 +34,7 @@
- git commit --signoff --all
- git review
-### Review Correction
+### Review Correction [ from existed Repo which contains commit-id ]
- `git clone https://git.opnfv.org/moon`
- `cd moon`
- get the commit id from Gerrit dashboard
@@ -45,6 +45,15 @@
- `git commit –amend`
- `git review`
+### Review Correction [ from existed Repo/or new one which not contains commit-id ]
+- `git clone https://git.openstack.org/openstack/oslo-specs`
+- `cd oslo-specs`
+- `git fetch https://git.openstack.org/openstack/oslo-specs refs/changes/43/492543/1 && git checkout FETCH_HEAD`
+- `git checkout -b 492543-1`
+- `vi specs/policy/external-pdp.rst`
+- `git add specs/policy/external-pdp.rst`
+- `git commit –amend`
+- `git review`
## Build Python Package
### pre-requist
diff --git a/moon_forming/Dockerfile b/moon_forming/Dockerfile
index ca0eba76..74616c89 100644
--- a/moon_forming/Dockerfile
+++ b/moon_forming/Dockerfile
@@ -1,11 +1,11 @@
FROM python:3
WORKDIR /usr/src/app
-RUN pip install --no-cache-dir --upgrade requests pyyaml python_moonutilities python_moondb python_moonclient
+RUN pip install --no-cache-dir --upgrade requests pytest pyyaml python_moonutilities python_moondb python_moonclient
-ENV POPULATE_ARGS "-v"
+ENV COMMAND "config"
ADD . /root
WORKDIR /root
-CMD sh /root/run.sh ${POPULATE_ARGS} \ No newline at end of file
+CMD /bin/bash /root/switch.sh ${COMMAND}
diff --git a/moon_forming/README.md b/moon_forming/README.md
index cc08f676..9b755d96 100644
--- a/moon_forming/README.md
+++ b/moon_forming/README.md
@@ -39,6 +39,9 @@ kubectl delete -f $MOON_HOME/tools/moon_kubernetes/templates/moon_forming.yaml
kubectl create -f $MOON_HOME/tools/moon_kubernetes/templates/moon_forming.yaml
```
+## Functional tests
-
-
+```bash
+cd $MOON_HOME/moon_manager
+bash ../tests/functional/run_tests_for_component.sh
+```
diff --git a/moon_forming/run.sh b/moon_forming/config_moon.sh
index d731cb17..0a55898f 100644
--- a/moon_forming/run.sh
+++ b/moon_forming/config_moon.sh
@@ -37,7 +37,3 @@ while ! python -c "import requests; req = requests.get('http://manager:8082')" 2
done
echo "."
echo "Manager (http://manager:8082) is up."
-
-#for i in /data/*.py ; do
-# moon_populate_values $populate_args --consul-host=consul --consul-port=8500 $i
-#done
diff --git a/moon_forming/switch.sh b/moon_forming/switch.sh
new file mode 100644
index 00000000..adb1ebe9
--- /dev/null
+++ b/moon_forming/switch.sh
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+
+CMD=$1
+
+echo "COMMAND IS ${CMD}"
+
+if [ "${CMD}" = "functest" ]; then
+ echo "FUNCTIONAL TESTS"
+ ls -l /data
+ ls -l /data/tests
+ sh /data/tests/functional_pod/run_functional_tests.sh
+#elif [ $CMD == "unittest" ]; then
+# sh /data/tests/functional_pod/run_functional_tests.sh
+else
+ echo "CONFIGURATION"
+ bash config_moon.sh
+fi
+
+echo "<END OF JOB>" \ No newline at end of file
diff --git a/moon_gui/DEV.md b/moon_gui/DEV.md
index 28743da3..1bd1ef4c 100644
--- a/moon_gui/DEV.md
+++ b/moon_gui/DEV.md
@@ -22,28 +22,28 @@ To run the GUI service, follow the `README.md` file.
## Current bugs
-1) Models -> "`List of Meta rules`", after updating the meta_rule
-"`Actions` -> `edit`" and clicking on `close`, the main screen doesn't refresh
+1) ~~Models -> "`List of Meta rules`", after updating the meta_rule
+"`Actions` -> `edit`" and clicking on `close`, the main screen doesn't refresh~~
-2) idem if we want to remove the meta_rule
+2) ~~idem if we want to remove the meta_rule~~
-3) after deleting an action perimeter (`Policy` -> `Add an action` -> `select a perimeter` and delete it),
-the dropdown list is not updated
+3) ~~after deleting an action perimeter (`Policy` -> `Add an action` -> `select a perimeter` and delete it),
+the dropdown list is not updated~~
-4) when adding a data subject (`Policy` -> `Data` -> `Add a Data Subject`), only the right category names must
-be listed in `Catagory list`. Hide the categories that doesn't belong to that policy.
+4) ~~when adding a data subject (`Policy` -> `Data` -> `Add a Data Subject`), only the right category names must
+be listed in `Catagory list`. Hide the categories that doesn't belong to that policy.~~
-5) idem for object data
+5) ~~idem for object data~~
-6) idem for action data
+6) ~~idem for action data~~
-7) after adding data (subject, object, action), the dropdown list in `Rules` -> `Add a rules` are not updated
-if the page is not manually refresh by the user and if the `Rules` window is already showing.
+7) ~~after adding data (subject, object, action), the dropdown list in `Rules` -> `Add a rules` are not updated
+if the page is not manually refresh by the user and if the `Rules` window is already showing.~~
-8) typographic error in `Add a rules`
+8) ~~typographic error in `Add a rules`~~
-9) in `Data` -> `Add a Data Object`, the `Create Data` never create the data in the backend
+9) ~~in `Data` -> `Add a Data Object`, the `Create Data` never create the data in the backend~~
-10) Move the `project` tabular to the end
+10) ~~Move the `project` tabular to the end~~
11) create a simplified version (to be discussed)
diff --git a/moon_gui/delivery/assets/css/main.css b/moon_gui/delivery/assets/css/main.css
index dbc15489..3aefca39 100644
--- a/moon_gui/delivery/assets/css/main.css
+++ b/moon_gui/delivery/assets/css/main.css
@@ -2,7 +2,7 @@
* Bootstrap v3.2.0 (http://getbootstrap.com)
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- *//*! normalize.css v3.0.1 | MIT License | git.io/normalize */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}@media print{*{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:transparent}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:focus,a:hover{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}cite{font-style:normal}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#428bca}a.text-primary:hover{color:#3071a9}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#428bca}a.bg-primary:hover{background-color:#3071a9}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}blockquote:after,blockquote:before{content:""}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#777;opacity:1}.form-control:-ms-input-placeholder{color:#777}.form-control::-webkit-input-placeholder{color:#777}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{line-height:34px}input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;min-height:20px;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.form-horizontal .form-group-sm .form-control,.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-horizontal .form-group-lg .form-control,.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:25px;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center}.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:14.3px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active:focus,.btn:active:focus,.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;-webkit-box-shadow:none;box-shadow:none;opacity:.65}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.active,.btn-default:active,.btn-default:focus,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary.active,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#3071a9;border-color:#285e8e}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.active,.btn-success:active,.btn-success:focus,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.active,.btn-info:active,.btn-info:focus,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.active,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.active,.btn-danger:active,.btn-danger:focus,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#428bca;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#428bca;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px solid}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group-vertical>.btn:focus,.btn-group>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn>input[type=checkbox],[data-toggle=buttons]>.btn>input[type=radio]{position:absolute;z-index:-1;opacity:0}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#428bca}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030;-webkit-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}.navbar-nav.navbar-right:last-child{margin-right:-15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-form.navbar-right:last-child{margin-right:-15px}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}.navbar-text.navbar-right:last-child{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#777}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#777}.navbar-inverse .navbar-nav>li>a{color:#777}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#777}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#777}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#428bca;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:2;color:#fff;cursor:default;background-color:#428bca;border-color:#428bca}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#428bca}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.nav-pills>.active>a>.badge,a.list-group-item.active>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#428bca}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar[aria-valuenow="1"],.progress-bar[aria-valuenow="2"]{min-width:30px}.progress-bar[aria-valuenow="0"]{min-width:30px;color:#777;background-color:transparent;background-image:none;-webkit-box-shadow:none;box-shadow:none}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#e1edf7}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#428bca}.panel-primary>.panel-heading .badge{color:#428bca;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate3d(0,-25%,0);-o-transform:translate3d(0,-25%,0);transform:translate3d(0,-25%,0)}.modal.in .modal-dialog{-webkit-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.in{opacity:.5}.modal-header{min-height:16.42857143px;padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-size:12px;line-height:1.4;visibility:visible;opacity:0}.tooltip.in{opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{right:5px;bottom:0;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;margin-top:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-15px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-15px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-15px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed;-webkit-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}.ng-table th{text-align:center;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ng-table th.sortable{cursor:pointer}.ng-table th.sortable .sort-indicator{padding-right:18px;position:relative}.ng-table th.sortable .sort-indicator:after,.ng-table th.sortable .sort-indicator:before{content:"";border-width:0 4px 4px;border-style:solid;border-color:#000 transparent;visibility:visible;right:5px;top:50%;position:absolute;opacity:.3;margin-top:-4px}.ng-table th.sortable .sort-indicator:before{margin-top:2px;border-bottom:none;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000}.ng-table th.sortable .sort-indicator:hover:after,.ng-table th.sortable .sort-indicator:hover:before{opacity:1;visibility:visible}.ng-table th.sortable.sort-asc,.ng-table th.sortable.sort-desc{background-color:rgba(141,192,219,.25);text-shadow:0 1px 1px rgba(255,255,255,.75)}.ng-table th.sortable.sort-asc .sort-indicator:after,.ng-table th.sortable.sort-desc .sort-indicator:after{margin-top:-2px}.ng-table th.sortable.sort-asc .sort-indicator:before,.ng-table th.sortable.sort-desc .sort-indicator:before{visibility:hidden}.ng-table th.sortable.sort-asc .sort-indicator:after,.ng-table th.sortable.sort-asc .sort-indicator:hover:after{visibility:visible;-khtml-opacity:.6;-moz-opacity:.6;opacity:.6}.ng-table th.sortable.sort-desc .sort-indicator:after{border-bottom:none;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000;visibility:visible;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-khtml-opacity:.6;-moz-opacity:.6;opacity:.6}.ng-table th.filter .input-filter{margin:0;display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ng-table+.pagination{margin-top:0}@media only screen and (max-width:800px){.ng-table-responsive{border-bottom:1px solid #999}.ng-table-responsive tr{border-top:1px solid #999;border-left:1px solid #999;border-right:1px solid #999}.ng-table-responsive td:before{position:absolute;padding:8px;left:0;top:0;width:50%;white-space:nowrap;text-align:left;font-weight:700}.ng-table-responsive thead tr th{text-align:left}.ng-table-responsive thead tr.ng-table-filters th{padding:0}.ng-table-responsive thead tr.ng-table-filters th form>div{padding:8px}.ng-table-responsive td{border:none;border-bottom:1px solid #eee;position:relative;padding-left:50%;white-space:normal;text-align:left}.ng-table-responsive td:before{content:attr(data-title-text)}.ng-table-responsive,.ng-table-responsive tbody,.ng-table-responsive td,.ng-table-responsive th,.ng-table-responsive thead,.ng-table-responsive tr{display:block}}.select2-container{margin:0;position:relative;display:inline-block;/* inline-block for ie7 */zoom:1;vertical-align:middle}.select2-container,.select2-drop,.select2-search,.select2-search input{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.select2-container .select2-choice{display:block;height:26px;padding:0 0 0 8px;overflow:hidden;position:relative;border:1px solid #aaa;white-space:nowrap;line-height:26px;color:#444;text-decoration:none;border-radius:4px;background-clip:padding-box;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#fff;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0,#eee),color-stop(.5,#fff));background-image:-webkit-linear-gradient(center bottom,#eee 0,#fff 50%);background-image:-moz-linear-gradient(center bottom,#eee 0,#fff 50%);background-image:linear-gradient(to top,#eee 0,#fff 50%)}html[dir=rtl] .select2-container .select2-choice{padding:0 8px 0 0}.select2-container.select2-drop-above .select2-choice{border-bottom-color:#aaa;border-radius:0 0 4px 4px;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0,#eee),color-stop(.9,#fff));background-image:-webkit-linear-gradient(center bottom,#eee 0,#fff 90%);background-image:-moz-linear-gradient(center bottom,#eee 0,#fff 90%);background-image:linear-gradient(to bottom,#eee 0,#fff 90%)}.select2-container.select2-allowclear .select2-choice .select2-chosen{margin-right:42px}.select2-container .select2-choice>.select2-chosen{margin-right:26px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;float:none;width:auto}html[dir=rtl] .select2-container .select2-choice>.select2-chosen{margin-left:26px;margin-right:0}.select2-container .select2-choice abbr{display:none;width:12px;height:12px;position:absolute;right:24px;top:8px;font-size:1px;text-decoration:none;border:0;background:url(select2.png) right top no-repeat;cursor:pointer;outline:0}.select2-container.select2-allowclear .select2-choice abbr{display:inline-block}.select2-container .select2-choice abbr:hover{background-position:right -11px;cursor:pointer}.select2-drop-mask{border:0;margin:0;padding:0;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:9998;/* styles required for IE to work */background-color:#fff}.select2-drop{width:100%;margin-top:-1px;position:absolute;z-index:9999;top:100%;background:#fff;color:#000;border:1px solid #aaa;border-top:0;border-radius:0 0 4px 4px;-webkit-box-shadow:0 4px 5px rgba(0,0,0,.15);box-shadow:0 4px 5px rgba(0,0,0,.15)}.select2-drop.select2-drop-above{margin-top:1px;border-top:1px solid #aaa;border-bottom:0;border-radius:4px 4px 0 0;-webkit-box-shadow:0 -4px 5px rgba(0,0,0,.15);box-shadow:0 -4px 5px rgba(0,0,0,.15)}.select2-drop-active{border:1px solid #5897fb;border-top:none}.select2-drop.select2-drop-above.select2-drop-active{border-top:1px solid #5897fb}.select2-drop-auto-width{border-top:1px solid #aaa;width:auto}.select2-drop-auto-width .select2-search{padding-top:4px}.select2-container .select2-choice .select2-arrow{display:inline-block;width:18px;height:100%;position:absolute;right:0;top:0;border-left:1px solid #aaa;border-radius:0 4px 4px 0;background-clip:padding-box;background:#ccc;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0,#ccc),color-stop(.6,#eee));background-image:-webkit-linear-gradient(center bottom,#ccc 0,#eee 60%);background-image:-moz-linear-gradient(center bottom,#ccc 0,#eee 60%);background-image:linear-gradient(to top,#ccc 0,#eee 60%)}html[dir=rtl] .select2-container .select2-choice .select2-arrow{left:0;right:auto;border-left:none;border-right:1px solid #aaa;border-radius:4px 0 0 4px}.select2-container .select2-choice .select2-arrow b{display:block;width:100%;height:100%;background:url(select2.png) no-repeat 0 1px}html[dir=rtl] .select2-container .select2-choice .select2-arrow b{background-position:2px 1px}.select2-search{display:inline-block;width:100%;min-height:26px;margin:0;padding-left:4px;padding-right:4px;position:relative;z-index:10000;white-space:nowrap}.select2-search input{width:100%;height:auto!important;min-height:26px;padding:4px 20px 4px 5px;margin:0;outline:0;font-family:sans-serif;font-size:1em;border:1px solid #aaa;border-radius:0;-webkit-box-shadow:none;box-shadow:none;background:#fff url(select2.png) no-repeat 100% -22px;background:url(select2.png) no-repeat 100% -22px,-webkit-gradient(linear,left bottom,left top,color-stop(.85,#fff),color-stop(.99,#eee));background:url(select2.png) no-repeat 100% -22px,-webkit-linear-gradient(center bottom,#fff 85%,#eee 99%);background:url(select2.png) no-repeat 100% -22px,-moz-linear-gradient(center bottom,#fff 85%,#eee 99%);background:url(select2.png) no-repeat 100% -22px,linear-gradient(to bottom,#fff 85%,#eee 99%) 0 0}html[dir=rtl] .select2-search input{padding:4px 5px 4px 20px;background:#fff url(select2.png) no-repeat -37px -22px;background:url(select2.png) no-repeat -37px -22px,-webkit-gradient(linear,left bottom,left top,color-stop(.85,#fff),color-stop(.99,#eee));background:url(select2.png) no-repeat -37px -22px,-webkit-linear-gradient(center bottom,#fff 85%,#eee 99%);background:url(select2.png) no-repeat -37px -22px,-moz-linear-gradient(center bottom,#fff 85%,#eee 99%);background:url(select2.png) no-repeat -37px -22px,linear-gradient(to bottom,#fff 85%,#eee 99%) 0 0}.select2-drop.select2-drop-above .select2-search input{margin-top:4px}.select2-search input.select2-active{background:#fff url(select2-spinner.gif) no-repeat 100%;background:url(select2-spinner.gif) no-repeat 100%,-webkit-gradient(linear,left bottom,left top,color-stop(.85,#fff),color-stop(.99,#eee));background:url(select2-spinner.gif) no-repeat 100%,-webkit-linear-gradient(center bottom,#fff 85%,#eee 99%);background:url(select2-spinner.gif) no-repeat 100%,-moz-linear-gradient(center bottom,#fff 85%,#eee 99%);background:url(select2-spinner.gif) no-repeat 100%,linear-gradient(to bottom,#fff 85%,#eee 99%) 0 0}.select2-container-active .select2-choice,.select2-container-active .select2-choices{border:1px solid #5897fb;outline:0;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.select2-dropdown-open .select2-choice{border-bottom-color:transparent;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;border-bottom-left-radius:0;border-bottom-right-radius:0;background-color:#eee;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0,#fff),color-stop(.5,#eee));background-image:-webkit-linear-gradient(center bottom,#fff 0,#eee 50%);background-image:-moz-linear-gradient(center bottom,#fff 0,#eee 50%);background-image:linear-gradient(to top,#fff 0,#eee 50%)}.select2-dropdown-open.select2-drop-above .select2-choice,.select2-dropdown-open.select2-drop-above .select2-choices{border:1px solid #5897fb;border-top-color:transparent;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(.5,#eee));background-image:-webkit-linear-gradient(center top,#fff 0,#eee 50%);background-image:-moz-linear-gradient(center top,#fff 0,#eee 50%);background-image:linear-gradient(to bottom,#fff 0,#eee 50%)}.select2-dropdown-open .select2-choice .select2-arrow{background:0 0;border-left:none;filter:none}html[dir=rtl] .select2-dropdown-open .select2-choice .select2-arrow{border-right:none}.select2-dropdown-open .select2-choice .select2-arrow b{background-position:-18px 1px}html[dir=rtl] .select2-dropdown-open .select2-choice .select2-arrow b{background-position:-16px 1px}.select2-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.select2-results{max-height:200px;padding:0 0 0 4px;margin:4px 4px 4px 0;position:relative;overflow-x:hidden;overflow-y:auto;-webkit-tap-highlight-color:transparent}html[dir=rtl] .select2-results{padding:0 4px 0 0;margin:4px 0 4px 4px}.select2-results ul.select2-result-sub{margin:0;padding-left:0}.select2-results li{list-style:none;display:list-item;background-image:none}.select2-results li.select2-result-with-children>.select2-result-label{font-weight:700}.select2-results .select2-result-label{padding:3px 7px 4px;margin:0;cursor:pointer;min-height:1em;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.select2-results-dept-1 .select2-result-label{padding-left:20px}.select2-results-dept-2 .select2-result-label{padding-left:40px}.select2-results-dept-3 .select2-result-label{padding-left:60px}.select2-results-dept-4 .select2-result-label{padding-left:80px}.select2-results-dept-5 .select2-result-label{padding-left:100px}.select2-results-dept-6 .select2-result-label{padding-left:110px}.select2-results-dept-7 .select2-result-label{padding-left:120px}.select2-results .select2-highlighted{background:#3875d7;color:#fff}.select2-results li em{background:#feffde;font-style:normal}.select2-results .select2-highlighted em{background:0 0}.select2-results .select2-highlighted ul{background:#fff;color:#000}.select2-results .select2-ajax-error,.select2-results .select2-no-results,.select2-results .select2-searching,.select2-results .select2-selection-limit{background:#f4f4f4;display:list-item;padding-left:5px}.select2-results .select2-disabled.select2-highlighted{color:#666;background:#f4f4f4;display:list-item;cursor:default}.select2-results .select2-disabled{background:#f4f4f4;display:list-item;cursor:default}.select2-results .select2-selected{display:none}.select2-more-results.select2-active{background:#f4f4f4 url(select2-spinner.gif) no-repeat 100%}.select2-results .select2-ajax-error{background:rgba(255,50,50,.2)}.select2-more-results{background:#f4f4f4;display:list-item}.select2-container.select2-container-disabled .select2-choice{background-color:#f4f4f4;background-image:none;border:1px solid #ddd;cursor:default}.select2-container.select2-container-disabled .select2-choice .select2-arrow{background-color:#f4f4f4;background-image:none;border-left:0}.select2-container.select2-container-disabled .select2-choice abbr{display:none}.select2-container-multi .select2-choices{height:auto!important;height:1%;margin:0;padding:0 5px 0 0;position:relative;border:1px solid #aaa;cursor:text;overflow:hidden;background-color:#fff;background-image:-webkit-gradient(linear,0 0,0 100%,color-stop(1%,#eee),color-stop(15%,#fff));background-image:-webkit-linear-gradient(top,#eee 1%,#fff 15%);background-image:-moz-linear-gradient(top,#eee 1%,#fff 15%);background-image:linear-gradient(to bottom,#eee 1%,#fff 15%)}html[dir=rtl] .select2-container-multi .select2-choices{padding:0 0 0 5px}.select2-locked{padding:3px 5px 3px 5px!important}.select2-container-multi .select2-choices{min-height:26px}.select2-container-multi.select2-container-active .select2-choices{border:1px solid #5897fb;outline:0;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.select2-container-multi .select2-choices li{float:left;list-style:none}html[dir=rtl] .select2-container-multi .select2-choices li{float:right}.select2-container-multi .select2-choices .select2-search-field{margin:0;padding:0;white-space:nowrap}.select2-container-multi .select2-choices .select2-search-field input{padding:5px;margin:1px 0;font-family:sans-serif;font-size:100%;color:#666;outline:0;border:0;-webkit-box-shadow:none;box-shadow:none;background:0 0!important}.select2-container-multi .select2-choices .select2-search-field input.select2-active{background:#fff url(select2-spinner.gif) no-repeat 100%!important}.select2-default{color:#999!important}.select2-container-multi .select2-choices .select2-search-choice{padding:3px 5px 3px 18px;margin:3px 0 3px 5px;position:relative;line-height:13px;color:#333;cursor:default;border:1px solid #aaa;border-radius:3px;-webkit-box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);background-clip:padding-box;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#e4e4e4;background-image:-webkit-gradient(linear,0 0,0 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear-gradient(to bottom,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%)}html[dir=rtl] .select2-container-multi .select2-choices .select2-search-choice{margin:3px 5px 3px 0;padding:3px 18px 3px 5px}.select2-container-multi .select2-choices .select2-search-choice .select2-chosen{cursor:default}.select2-container-multi .select2-choices .select2-search-choice-focus{background:#d4d4d4}.select2-search-choice-close{display:block;width:12px;height:13px;position:absolute;right:3px;top:4px;font-size:1px;outline:0;background:url(select2.png) right top no-repeat}html[dir=rtl] .select2-search-choice-close{right:auto;left:3px}.select2-container-multi .select2-search-choice-close{left:3px}html[dir=rtl] .select2-container-multi .select2-search-choice-close{left:auto;right:2px}.select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover{background-position:right -11px}.select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close{background-position:right -11px}.select2-container-multi.select2-container-disabled .select2-choices{background-color:#f4f4f4;background-image:none;border:1px solid #ddd;cursor:default}.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice{padding:3px 5px 3px 5px;border:1px solid #ddd;background-image:none;background-color:#f4f4f4}.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close{display:none;background:0 0}.select2-result-selectable .select2-match,.select2-result-unselectable .select2-match{text-decoration:underline}.select2-offscreen,.select2-offscreen:focus{clip:rect(0 0 0 0)!important;width:1px!important;height:1px!important;border:0!important;margin:0!important;padding:0!important;overflow:hidden!important;position:absolute!important;outline:0!important;left:0!important;top:0!important}.select2-display-none{display:none}.select2-measure-scrollbar{position:absolute;top:-10000px;left:-10000px;width:100px;height:100px;overflow:scroll}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:2dppx){.select2-container .select2-choice .select2-arrow b,.select2-container .select2-choice abbr,.select2-search input,.select2-search-choice-close{background-image:url(select2x2.png)!important;background-repeat:no-repeat!important;background-size:60px 40px!important}.select2-search input{background-position:100% -21px!important}}/*!
+ *//*! normalize.css v3.0.1 | MIT License | git.io/normalize */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}@media print{*{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:transparent}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:focus,a:hover{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}cite{font-style:normal}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#428bca}a.text-primary:hover{color:#3071a9}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#428bca}a.bg-primary:hover{background-color:#3071a9}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}blockquote:after,blockquote:before{content:""}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#777;opacity:1}.form-control:-ms-input-placeholder{color:#777}.form-control::-webkit-input-placeholder{color:#777}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{line-height:34px}input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;min-height:20px;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.form-horizontal .form-group-sm .form-control,.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-horizontal .form-group-lg .form-control,.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:25px;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center}.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:14.3px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active:focus,.btn:active:focus,.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;-webkit-box-shadow:none;box-shadow:none;opacity:.65}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.active,.btn-default:active,.btn-default:focus,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary.active,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#3071a9;border-color:#285e8e}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.active,.btn-success:active,.btn-success:focus,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.active,.btn-info:active,.btn-info:focus,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.active,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.active,.btn-danger:active,.btn-danger:focus,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#428bca;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#428bca;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px solid}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group-vertical>.btn:focus,.btn-group>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn>input[type=checkbox],[data-toggle=buttons]>.btn>input[type=radio]{position:absolute;z-index:-1;opacity:0}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#428bca}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030;-webkit-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}.navbar-nav.navbar-right:last-child{margin-right:-15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-form.navbar-right:last-child{margin-right:-15px}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}.navbar-text.navbar-right:last-child{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#777}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#777}.navbar-inverse .navbar-nav>li>a{color:#777}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#777}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#777}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#428bca;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:2;color:#fff;cursor:default;background-color:#428bca;border-color:#428bca}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#428bca}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.nav-pills>.active>a>.badge,a.list-group-item.active>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#428bca}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar[aria-valuenow="1"],.progress-bar[aria-valuenow="2"]{min-width:30px}.progress-bar[aria-valuenow="0"]{min-width:30px;color:#777;background-color:transparent;background-image:none;-webkit-box-shadow:none;box-shadow:none}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#e1edf7}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#428bca}.panel-primary>.panel-heading .badge{color:#428bca;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate3d(0,-25%,0);-o-transform:translate3d(0,-25%,0);transform:translate3d(0,-25%,0)}.modal.in .modal-dialog{-webkit-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.in{opacity:.5}.modal-header{min-height:16.42857143px;padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-size:12px;line-height:1.4;visibility:visible;opacity:0}.tooltip.in{opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{right:5px;bottom:0;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;margin-top:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-15px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-15px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-15px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed;-webkit-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}.ng-table th{text-align:center;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ng-table th.sortable{cursor:pointer}.ng-table th.sortable .sort-indicator{padding-right:18px;position:relative}.ng-table th.sortable .sort-indicator:after,.ng-table th.sortable .sort-indicator:before{content:"";border-width:0 4px 4px;border-style:solid;border-color:#000 transparent;visibility:visible;right:5px;top:50%;position:absolute;opacity:.3;margin-top:-4px}.ng-table th.sortable .sort-indicator:before{margin-top:2px;border-bottom:none;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000}.ng-table th.sortable .sort-indicator:hover:after,.ng-table th.sortable .sort-indicator:hover:before{opacity:1;visibility:visible}.ng-table th.sortable.sort-asc,.ng-table th.sortable.sort-desc{background-color:rgba(141,192,219,.25);text-shadow:0 1px 1px rgba(255,255,255,.75)}.ng-table th.sortable.sort-asc .sort-indicator:after,.ng-table th.sortable.sort-desc .sort-indicator:after{margin-top:-2px}.ng-table th.sortable.sort-asc .sort-indicator:before,.ng-table th.sortable.sort-desc .sort-indicator:before{visibility:hidden}.ng-table th.sortable.sort-asc .sort-indicator:after,.ng-table th.sortable.sort-asc .sort-indicator:hover:after{visibility:visible;-khtml-opacity:.6;-moz-opacity:.6;opacity:.6}.ng-table th.sortable.sort-desc .sort-indicator:after{border-bottom:none;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000;visibility:visible;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-khtml-opacity:.6;-moz-opacity:.6;opacity:.6}.ng-table th.filter .input-filter{margin:0;display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ng-table+.pagination{margin-top:0}@media only screen and (max-width:800px){.ng-table-responsive{border-bottom:1px solid #999}.ng-table-responsive tr{border-top:1px solid #999;border-left:1px solid #999;border-right:1px solid #999}.ng-table-responsive td:before{position:absolute;padding:8px;left:0;top:0;width:50%;white-space:nowrap;text-align:left;font-weight:700}.ng-table-responsive thead tr th{text-align:left}.ng-table-responsive thead tr.ng-table-filters th{padding:0}.ng-table-responsive thead tr.ng-table-filters th form>div{padding:8px}.ng-table-responsive td{border:none;border-bottom:1px solid #eee;position:relative;padding-left:50%;white-space:normal;text-align:left}.ng-table-responsive td:before{content:attr(data-title-text)}.ng-table-responsive,.ng-table-responsive tbody,.ng-table-responsive td,.ng-table-responsive th,.ng-table-responsive thead,.ng-table-responsive tr{display:block}}.select2-container{margin:0;position:relative;display:inline-block;zoom:1;vertical-align:middle}.select2-container,.select2-drop,.select2-search,.select2-search input{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.select2-container .select2-choice{display:block;height:26px;padding:0 0 0 8px;overflow:hidden;position:relative;border:1px solid #aaa;white-space:nowrap;line-height:26px;color:#444;text-decoration:none;border-radius:4px;background-clip:padding-box;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#fff;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0,#eee),color-stop(.5,#fff));background-image:-webkit-linear-gradient(center bottom,#eee 0,#fff 50%);background-image:-moz-linear-gradient(center bottom,#eee 0,#fff 50%);background-image:linear-gradient(to top,#eee 0,#fff 50%)}html[dir=rtl] .select2-container .select2-choice{padding:0 8px 0 0}.select2-container.select2-drop-above .select2-choice{border-bottom-color:#aaa;border-radius:0 0 4px 4px;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0,#eee),color-stop(.9,#fff));background-image:-webkit-linear-gradient(center bottom,#eee 0,#fff 90%);background-image:-moz-linear-gradient(center bottom,#eee 0,#fff 90%);background-image:linear-gradient(to bottom,#eee 0,#fff 90%)}.select2-container.select2-allowclear .select2-choice .select2-chosen{margin-right:42px}.select2-container .select2-choice>.select2-chosen{margin-right:26px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;float:none;width:auto}html[dir=rtl] .select2-container .select2-choice>.select2-chosen{margin-left:26px;margin-right:0}.select2-container .select2-choice abbr{display:none;width:12px;height:12px;position:absolute;right:24px;top:8px;font-size:1px;text-decoration:none;border:0;background:url(select2.png) right top no-repeat;cursor:pointer;outline:0}.select2-container.select2-allowclear .select2-choice abbr{display:inline-block}.select2-container .select2-choice abbr:hover{background-position:right -11px;cursor:pointer}.select2-drop-mask{border:0;margin:0;padding:0;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:9998;background-color:#fff}.select2-drop{width:100%;margin-top:-1px;position:absolute;z-index:9999;top:100%;background:#fff;color:#000;border:1px solid #aaa;border-top:0;border-radius:0 0 4px 4px;-webkit-box-shadow:0 4px 5px rgba(0,0,0,.15);box-shadow:0 4px 5px rgba(0,0,0,.15)}.select2-drop.select2-drop-above{margin-top:1px;border-top:1px solid #aaa;border-bottom:0;border-radius:4px 4px 0 0;-webkit-box-shadow:0 -4px 5px rgba(0,0,0,.15);box-shadow:0 -4px 5px rgba(0,0,0,.15)}.select2-drop-active{border:1px solid #5897fb;border-top:none}.select2-drop.select2-drop-above.select2-drop-active{border-top:1px solid #5897fb}.select2-drop-auto-width{border-top:1px solid #aaa;width:auto}.select2-drop-auto-width .select2-search{padding-top:4px}.select2-container .select2-choice .select2-arrow{display:inline-block;width:18px;height:100%;position:absolute;right:0;top:0;border-left:1px solid #aaa;border-radius:0 4px 4px 0;background-clip:padding-box;background:#ccc;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0,#ccc),color-stop(.6,#eee));background-image:-webkit-linear-gradient(center bottom,#ccc 0,#eee 60%);background-image:-moz-linear-gradient(center bottom,#ccc 0,#eee 60%);background-image:linear-gradient(to top,#ccc 0,#eee 60%)}html[dir=rtl] .select2-container .select2-choice .select2-arrow{left:0;right:auto;border-left:none;border-right:1px solid #aaa;border-radius:4px 0 0 4px}.select2-container .select2-choice .select2-arrow b{display:block;width:100%;height:100%;background:url(select2.png) no-repeat 0 1px}html[dir=rtl] .select2-container .select2-choice .select2-arrow b{background-position:2px 1px}.select2-search{display:inline-block;width:100%;min-height:26px;margin:0;padding-left:4px;padding-right:4px;position:relative;z-index:10000;white-space:nowrap}.select2-search input{width:100%;height:auto!important;min-height:26px;padding:4px 20px 4px 5px;margin:0;outline:0;font-family:sans-serif;font-size:1em;border:1px solid #aaa;border-radius:0;-webkit-box-shadow:none;box-shadow:none;background:#fff url(select2.png) no-repeat 100% -22px;background:url(select2.png) no-repeat 100% -22px,-webkit-gradient(linear,left bottom,left top,color-stop(.85,#fff),color-stop(.99,#eee));background:url(select2.png) no-repeat 100% -22px,-webkit-linear-gradient(center bottom,#fff 85%,#eee 99%);background:url(select2.png) no-repeat 100% -22px,-moz-linear-gradient(center bottom,#fff 85%,#eee 99%);background:url(select2.png) no-repeat 100% -22px,linear-gradient(to bottom,#fff 85%,#eee 99%) 0 0}html[dir=rtl] .select2-search input{padding:4px 5px 4px 20px;background:#fff url(select2.png) no-repeat -37px -22px;background:url(select2.png) no-repeat -37px -22px,-webkit-gradient(linear,left bottom,left top,color-stop(.85,#fff),color-stop(.99,#eee));background:url(select2.png) no-repeat -37px -22px,-webkit-linear-gradient(center bottom,#fff 85%,#eee 99%);background:url(select2.png) no-repeat -37px -22px,-moz-linear-gradient(center bottom,#fff 85%,#eee 99%);background:url(select2.png) no-repeat -37px -22px,linear-gradient(to bottom,#fff 85%,#eee 99%) 0 0}.select2-drop.select2-drop-above .select2-search input{margin-top:4px}.select2-search input.select2-active{background:#fff url(select2-spinner.gif) no-repeat 100%;background:url(select2-spinner.gif) no-repeat 100%,-webkit-gradient(linear,left bottom,left top,color-stop(.85,#fff),color-stop(.99,#eee));background:url(select2-spinner.gif) no-repeat 100%,-webkit-linear-gradient(center bottom,#fff 85%,#eee 99%);background:url(select2-spinner.gif) no-repeat 100%,-moz-linear-gradient(center bottom,#fff 85%,#eee 99%);background:url(select2-spinner.gif) no-repeat 100%,linear-gradient(to bottom,#fff 85%,#eee 99%) 0 0}.select2-container-active .select2-choice,.select2-container-active .select2-choices{border:1px solid #5897fb;outline:0;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.select2-dropdown-open .select2-choice{border-bottom-color:transparent;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;border-bottom-left-radius:0;border-bottom-right-radius:0;background-color:#eee;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0,#fff),color-stop(.5,#eee));background-image:-webkit-linear-gradient(center bottom,#fff 0,#eee 50%);background-image:-moz-linear-gradient(center bottom,#fff 0,#eee 50%);background-image:linear-gradient(to top,#fff 0,#eee 50%)}.select2-dropdown-open.select2-drop-above .select2-choice,.select2-dropdown-open.select2-drop-above .select2-choices{border:1px solid #5897fb;border-top-color:transparent;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(.5,#eee));background-image:-webkit-linear-gradient(center top,#fff 0,#eee 50%);background-image:-moz-linear-gradient(center top,#fff 0,#eee 50%);background-image:linear-gradient(to bottom,#fff 0,#eee 50%)}.select2-dropdown-open .select2-choice .select2-arrow{background:0 0;border-left:none;filter:none}html[dir=rtl] .select2-dropdown-open .select2-choice .select2-arrow{border-right:none}.select2-dropdown-open .select2-choice .select2-arrow b{background-position:-18px 1px}html[dir=rtl] .select2-dropdown-open .select2-choice .select2-arrow b{background-position:-16px 1px}.select2-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.select2-results{max-height:200px;padding:0 0 0 4px;margin:4px 4px 4px 0;position:relative;overflow-x:hidden;overflow-y:auto;-webkit-tap-highlight-color:transparent}html[dir=rtl] .select2-results{padding:0 4px 0 0;margin:4px 0 4px 4px}.select2-results ul.select2-result-sub{margin:0;padding-left:0}.select2-results li{list-style:none;display:list-item;background-image:none}.select2-results li.select2-result-with-children>.select2-result-label{font-weight:700}.select2-results .select2-result-label{padding:3px 7px 4px;margin:0;cursor:pointer;min-height:1em;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.select2-results-dept-1 .select2-result-label{padding-left:20px}.select2-results-dept-2 .select2-result-label{padding-left:40px}.select2-results-dept-3 .select2-result-label{padding-left:60px}.select2-results-dept-4 .select2-result-label{padding-left:80px}.select2-results-dept-5 .select2-result-label{padding-left:100px}.select2-results-dept-6 .select2-result-label{padding-left:110px}.select2-results-dept-7 .select2-result-label{padding-left:120px}.select2-results .select2-highlighted{background:#3875d7;color:#fff}.select2-results li em{background:#feffde;font-style:normal}.select2-results .select2-highlighted em{background:0 0}.select2-results .select2-highlighted ul{background:#fff;color:#000}.select2-results .select2-ajax-error,.select2-results .select2-no-results,.select2-results .select2-searching,.select2-results .select2-selection-limit{background:#f4f4f4;display:list-item;padding-left:5px}.select2-results .select2-disabled.select2-highlighted{color:#666;background:#f4f4f4;display:list-item;cursor:default}.select2-results .select2-disabled{background:#f4f4f4;display:list-item;cursor:default}.select2-results .select2-selected{display:none}.select2-more-results.select2-active{background:#f4f4f4 url(select2-spinner.gif) no-repeat 100%}.select2-results .select2-ajax-error{background:rgba(255,50,50,.2)}.select2-more-results{background:#f4f4f4;display:list-item}.select2-container.select2-container-disabled .select2-choice{background-color:#f4f4f4;background-image:none;border:1px solid #ddd;cursor:default}.select2-container.select2-container-disabled .select2-choice .select2-arrow{background-color:#f4f4f4;background-image:none;border-left:0}.select2-container.select2-container-disabled .select2-choice abbr{display:none}.select2-container-multi .select2-choices{height:auto!important;height:1%;margin:0;padding:0 5px 0 0;position:relative;border:1px solid #aaa;cursor:text;overflow:hidden;background-color:#fff;background-image:-webkit-gradient(linear,0 0,0 100%,color-stop(1%,#eee),color-stop(15%,#fff));background-image:-webkit-linear-gradient(top,#eee 1%,#fff 15%);background-image:-moz-linear-gradient(top,#eee 1%,#fff 15%);background-image:linear-gradient(to bottom,#eee 1%,#fff 15%)}html[dir=rtl] .select2-container-multi .select2-choices{padding:0 0 0 5px}.select2-locked{padding:3px 5px 3px 5px!important}.select2-container-multi .select2-choices{min-height:26px}.select2-container-multi.select2-container-active .select2-choices{border:1px solid #5897fb;outline:0;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.select2-container-multi .select2-choices li{float:left;list-style:none}html[dir=rtl] .select2-container-multi .select2-choices li{float:right}.select2-container-multi .select2-choices .select2-search-field{margin:0;padding:0;white-space:nowrap}.select2-container-multi .select2-choices .select2-search-field input{padding:5px;margin:1px 0;font-family:sans-serif;font-size:100%;color:#666;outline:0;border:0;-webkit-box-shadow:none;box-shadow:none;background:0 0!important}.select2-container-multi .select2-choices .select2-search-field input.select2-active{background:#fff url(select2-spinner.gif) no-repeat 100%!important}.select2-default{color:#999!important}.select2-container-multi .select2-choices .select2-search-choice{padding:3px 5px 3px 18px;margin:3px 0 3px 5px;position:relative;line-height:13px;color:#333;cursor:default;border:1px solid #aaa;border-radius:3px;-webkit-box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);background-clip:padding-box;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#e4e4e4;background-image:-webkit-gradient(linear,0 0,0 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear-gradient(to bottom,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%)}html[dir=rtl] .select2-container-multi .select2-choices .select2-search-choice{margin:3px 5px 3px 0;padding:3px 18px 3px 5px}.select2-container-multi .select2-choices .select2-search-choice .select2-chosen{cursor:default}.select2-container-multi .select2-choices .select2-search-choice-focus{background:#d4d4d4}.select2-search-choice-close{display:block;width:12px;height:13px;position:absolute;right:3px;top:4px;font-size:1px;outline:0;background:url(select2.png) right top no-repeat}html[dir=rtl] .select2-search-choice-close{right:auto;left:3px}.select2-container-multi .select2-search-choice-close{left:3px}html[dir=rtl] .select2-container-multi .select2-search-choice-close{left:auto;right:2px}.select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover{background-position:right -11px}.select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close{background-position:right -11px}.select2-container-multi.select2-container-disabled .select2-choices{background-color:#f4f4f4;background-image:none;border:1px solid #ddd;cursor:default}.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice{padding:3px 5px 3px 5px;border:1px solid #ddd;background-image:none;background-color:#f4f4f4}.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close{display:none;background:0 0}.select2-result-selectable .select2-match,.select2-result-unselectable .select2-match{text-decoration:underline}.select2-offscreen,.select2-offscreen:focus{clip:rect(0 0 0 0)!important;width:1px!important;height:1px!important;border:0!important;margin:0!important;padding:0!important;overflow:hidden!important;position:absolute!important;outline:0!important;left:0!important;top:0!important}.select2-display-none{display:none}.select2-measure-scrollbar{position:absolute;top:-10000px;left:-10000px;width:100px;height:100px;overflow:scroll}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:2dppx){.select2-container .select2-choice .select2-arrow b,.select2-container .select2-choice abbr,.select2-search input,.select2-search-choice-close{background-image:url(select2x2.png)!important;background-repeat:no-repeat!important;background-size:60px 40px!important}.select2-search input{background-position:100% -21px!important}}/*!
* ui-select
* http://github.com/angular-ui/ui-select
* Version: 0.12.1 - 2015-07-28T03:50:59.080Z
diff --git a/moon_gui/delivery/assets/i18n/en.json b/moon_gui/delivery/assets/i18n/en.json
index dd54e112..4dc7cea5 100755
--- a/moon_gui/delivery/assets/i18n/en.json
+++ b/moon_gui/delivery/assets/i18n/en.json
@@ -387,7 +387,7 @@
"success": "Rules `{{rulesName}}` successfully deleted"
},
"add": {
- "title": "Add a Rules",
+ "title": "Add a Rule",
"policies": "Select a policy",
"instructions": "Instruction",
"metarules" : "Select one of the associated MetaRules",
@@ -420,7 +420,7 @@
"required": "{{number}} Object(s) are required"
},
"action":{
- "required": "{{number}} a(s) are required"
+ "required": "{{number}} Action(s) are required"
}
},
"create":{
diff --git a/moon_gui/delivery/assets/img/et.jpg b/moon_gui/delivery/assets/img/et.jpg
new file mode 100644
index 00000000..67cc0a9d
--- /dev/null
+++ b/moon_gui/delivery/assets/img/et.jpg
Binary files differ
diff --git a/moon_gui/delivery/html/common/compatibility/compatibility.tpl.html b/moon_gui/delivery/html/common/compatibility/compatibility.tpl.html
index 7a39554e..26c0f09e 100644
--- a/moon_gui/delivery/html/common/compatibility/compatibility.tpl.html
+++ b/moon_gui/delivery/html/common/compatibility/compatibility.tpl.html
@@ -1 +1 @@
-<div class="modal" tabindex="-1" data-role="modalCompatibility"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.compatibility.title"></h4></div><div class="modal-body"><span data-translate="moon.compatibility.content"></span></div><div class="modal-footer"><div class="btn-toolbar" style="float: right"><button ng-click="$hide()" class="btn btn-default" data-translate="moon.compatibility.close">Close</button></div></div></div></div></div> \ No newline at end of file
+<div class="modal" tabindex="-1" data-role="modalCompatibility"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.compatibility.title"></h4></div><div class="modal-body"><span data-translate="moon.compatibility.content"></span></div><div class="modal-footer"><div class="btn-toolbar" style="float: right;"><button ng-click="$hide()" class="btn btn-default" data-translate="moon.compatibility.close">Close</button></div></div></div></div></div> \ No newline at end of file
diff --git a/moon_gui/delivery/html/common/header/header.tpl.html b/moon_gui/delivery/html/common/header/header.tpl.html
index 6f46cf8f..92224309 100644
--- a/moon_gui/delivery/html/common/header/header.tpl.html
+++ b/moon_gui/delivery/html/common/header/header.tpl.html
@@ -1 +1 @@
-<div class="container banner" ng-controller="HeaderController as header"><div class="row"><div class="col-md-3 sub-banner"><a ui-sref="moon.dashboard"><img src="assets/img/logo-orange.gif" alt="Orange"> </a><img src="assets/img/logo-openstack.png" alt="OpenStack"></div><div class="col-md-6 center-block"><h1 data-translate="moon.global.applicationName">Moon UI</h1></div><div class="col-md-3"><span class="pull-right"><a href="" ng-click="header.changeLocale('fr', $event)" ng-class="{'strong' : header.currentLanguage === 'fr'}"><img src="assets/img/arrow-link.gif" alt="fr_">fr</a> <a href="" ng-click="header.changeLocale('en', $event)" ng-class="{'strong' : header.currentLanguage === 'en'}"><img src="assets/img/arrow-link.gif" alt="en_">en</a> <a href="" ng-if="connected" ng-click="header.logout()" class="left30"><span class="glyphicon glyphicon-log-out"></span> <span data-translate="moon.logout.title">Logout</span>(<span ng-bind="header.getUser().token.user.name"></span>) </a><a href="" ng-if="!connected" class="left30"><span class="glyphicon glyphicon-log-in"></span> <span data-translate="moon.login.title">Login</span></a></span></div></div><div class="row"><toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button': true}"></toaster-container></div><div class="row" ng-if="connected"><ul class="nav nav-tabs"><li ng-class="{active: header.isProjectTabActive()}"><a ui-sref="moon.project.list" data-translate="moon.menu.project">Projects</a></li><li ng-class="{active: header.isModelTabActive()}"><a ui-sref="moon.model.list" data-translate="moon.menu.model">Models</a></li><li ng-class="{active: header.isPolicyTabActive()}"><a ui-sref="moon.policy.list" data-translate="moon.menu.policy">Policy</a></li><li ng-class="{active: header.isPDPTabActive()}"><a ui-sref="moon.pdp.list" data-translate="moon.menu.pdp">PDP</a></li><!--<li ng-class="{active: header.isLogsTabActive()}"><a ui-sref="moon.logs" data-translate="moon.menu.logs">Logs</a></li>--></ul></div></div> \ No newline at end of file
+<div class="container banner" ng-controller="HeaderController as header"><div class="row"><div class="col-md-3 sub-banner"><a ui-sref="moon.dashboard"><img src="assets/img/logo-orange.gif" alt="Orange"> </a><img src="assets/img/logo-openstack.png" alt="OpenStack"></div><div class="col-md-6 center-block"><h1 data-translate="moon.global.applicationName">Moon UI</h1></div><div class="col-md-3"><span class="pull-right"><a href="" ng-click="header.changeLocale('fr', $event)" ng-class="{'strong' : header.currentLanguage === 'fr'}"><img src="assets/img/arrow-link.gif" alt="fr_">fr</a> <a href="" ng-click="header.changeLocale('en', $event)" ng-class="{'strong' : header.currentLanguage === 'en'}"><img src="assets/img/arrow-link.gif" alt="en_">en</a> <a href="" ng-if="connected" ng-click="header.logout()" class="left30"><span class="glyphicon glyphicon-log-out"></span> <span data-translate="moon.logout.title">Logout</span>(<span ng-bind="header.getUser().token.user.name"></span>) </a><a href="" ng-if="!connected" class="left30"><span class="glyphicon glyphicon-log-in"></span> <span data-translate="moon.login.title">Login</span></a></span></div></div><div class="row"><toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button': true}"></toaster-container></div><div class="row" ng-if="connected"><ul class="nav nav-tabs"><li ng-class="{active: header.isModelTabActive()}"><a ui-sref="moon.model.list" data-translate="moon.menu.model">Models</a></li><li ng-class="{active: header.isPolicyTabActive()}"><a ui-sref="moon.policy.list" data-translate="moon.menu.policy">Policy</a></li><li ng-class="{active: header.isPDPTabActive()}"><a ui-sref="moon.pdp.list" data-translate="moon.menu.pdp">PDP</a></li><li ng-class="{active: header.isProjectTabActive()}"><a ui-sref="moon.project.list" data-translate="moon.menu.project">Projects</a></li><!--<li ng-class="{active: header.isLogsTabActive()}"><a ui-sref="moon.logs" data-translate="moon.menu.logs">Logs</a></li>--></ul></div></div> \ No newline at end of file
diff --git a/moon_gui/delivery/html/model/action/model-add.tpl.html b/moon_gui/delivery/html/model/action/model-add.tpl.html
index 5741b537..ed370f05 100644
--- a/moon_gui/delivery/html/model/action/model-add.tpl.html
+++ b/moon_gui/delivery/html/model/action/model-add.tpl.html
@@ -1 +1 @@
-<div ng-controller="ModelAddController as add" class="modal" tabindex="-1" data-role="modalAddModel"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.model.add.title"></h4></div><div class="modal-body"><form class="form-horizontal" role="form" name="add.form"><div class="form-group" ng-class="{'has-error': add.form.name.$invalid && add.form.name.$dirty}"><label for="name" class="col-sm-3 control-label" data-translate="moon.model.add.form.name">Name</label><div class="col-sm-6"><input name="name" id="name" class="form-control" type="text" data-ng-model="add.model.name" required><div class="help-block" ng-show="add.form.name.$dirty && add.form.name.$invalid"><small class="error" ng-show="add.form.name.$error.required" data-translate="moon.model.add.check.name.required">Name is required</small></div></div></div><div class="form-group"><label for="description" class="col-sm-3 control-label" data-translate="moon.model.add.form.description">Description</label><div class="col-sm-6"><textarea id="description" name="description" class="form-control" data-ng-model="add.model.description"></textarea></div></div></form></div><div class="modal-footer"><div class="btn-toolbar" style="float: right"><a href="" ng-click="$hide()" class="btn btn-default"><span data-translate="moon.model.add.action.cancel">Cancel</span> </a><a href="" ng-disabled="add.loading" ng-click="add.create()" class="btn btn-warning"><span class="glyphicon glyphicon-save"></span> <span data-translate="moon.model.add.action.create">Create Model</span></a><moon-loader ng-if="add.loading"></moon-loader></div></div></div></div></div> \ No newline at end of file
+<div ng-controller="ModelAddController as add" class="modal" tabindex="-1" data-role="modalAddModel"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.model.add.title"></h4></div><div class="modal-body"><form class="form-horizontal" role="form" name="add.form"><div class="form-group" ng-class="{'has-error': add.form.name.$invalid && add.form.name.$dirty}"><label for="name" class="col-sm-3 control-label" data-translate="moon.model.add.form.name">Name</label><div class="col-sm-6"><input name="name" id="name" class="form-control" type="text" data-ng-model="add.model.name" required><div class="help-block" ng-show="add.form.name.$dirty && add.form.name.$invalid"><small class="error" ng-show="add.form.name.$error.required" data-translate="moon.model.add.check.name.required">Name is required</small></div></div></div><div class="form-group"><label for="description" class="col-sm-3 control-label" data-translate="moon.model.add.form.description">Description</label><div class="col-sm-6"><textarea id="description" name="description" class="form-control" data-ng-model="add.model.description"></textarea></div></div></form></div><div class="modal-footer"><div class="btn-toolbar" style="float: right;"><a href="" ng-click="$hide()" class="btn btn-default"><span data-translate="moon.model.add.action.cancel">Cancel</span> </a><a href="" ng-disabled="add.loading" ng-click="add.create()" class="btn btn-warning"><span class="glyphicon glyphicon-save"></span> <span data-translate="moon.model.add.action.create">Create Model</span></a><moon-loader ng-if="add.loading"></moon-loader></div></div></div></div></div> \ No newline at end of file
diff --git a/moon_gui/delivery/html/model/action/model-delete.tpl.html b/moon_gui/delivery/html/model/action/model-delete.tpl.html
index 79e4aa0d..a3e51261 100644
--- a/moon_gui/delivery/html/model/action/model-delete.tpl.html
+++ b/moon_gui/delivery/html/model/action/model-delete.tpl.html
@@ -1 +1 @@
-<div ng-controller="ModelDeleteController as del" class="modal" tabindex="-1" data-role="modalDeleteModel"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.model.remove.title"></h4></div><div class="modal-body"><p><span data-translate="moon.model.remove.content.query" data-translate-values="{ modelName: del.model.name }"></span></p></div><div class="modal-footer"><div class="btn-toolbar" style="float: right"><a href="" ng-click="$hide()" class="btn btn-default"><span data-translate="moon.model.remove.action.cancel">Cancel</span> </a><a href="" ng-disabled="del.loading" ng-click="del.remove()" class="btn btn-warning"><span class="glyphicon glyphicon-trash"></span> <span data-translate="moon.model.remove.action.delete">Delete</span></a><moon-loader ng-if="del.loading"></moon-loader></div></div></div></div></div> \ No newline at end of file
+<div ng-controller="ModelDeleteController as del" class="modal" tabindex="-1" data-role="modalDeleteModel"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.model.remove.title"></h4></div><div class="modal-body"><p><span data-translate="moon.model.remove.content.query" data-translate-values="{ modelName: del.model.name }"></span></p></div><div class="modal-footer"><div class="btn-toolbar" style="float: right;"><a href="" ng-click="$hide()" class="btn btn-default"><span data-translate="moon.model.remove.action.cancel">Cancel</span> </a><a href="" ng-disabled="del.loading" ng-click="del.remove()" class="btn btn-warning"><span class="glyphicon glyphicon-trash"></span> <span data-translate="moon.model.remove.action.delete">Delete</span></a><moon-loader ng-if="del.loading"></moon-loader></div></div></div></div></div> \ No newline at end of file
diff --git a/moon_gui/delivery/html/model/action/model-view.tpl.html b/moon_gui/delivery/html/model/action/model-view.tpl.html
index 46673c0a..4e016c12 100644
--- a/moon_gui/delivery/html/model/action/model-view.tpl.html
+++ b/moon_gui/delivery/html/model/action/model-view.tpl.html
@@ -1 +1 @@
-<div ng-controller="ModelViewController as view" class="modal" tabindex="-1" data-role="modalViewProject"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.model.view.title" data-translate-values="{modelName: view.model.name}"></h4></div><div class="modal-body"><dl class="dl-horizontal"><dt data-translate="moon.model.view.id">Id</dt><dd ng-bind="view.model.id"></dd><dt data-translate="moon.model.view.name">Name</dt><dd ng-bind="view.model.name"></dd><dt data-translate="moon.model.view.description">Description</dt><dd ng-bind="view.model.description"></dd></dl><div ng-if="view.meta_rules_values"><moon-meta-rules-list mapped-model="view.model" edit-mode="false"></moon-meta-rules-list></div><div ng-if="!view.meta_rules_values"><moon-loader></moon-loader></div></div><div class="modal-footer top10"><div class="btn-toolbar" style="float: right"><button ng-click="$hide()" class="btn btn-default" data-translate="moon.model.view.action.close">Close</button></div></div></div></div></div> \ No newline at end of file
+<div ng-controller="ModelViewController as view" class="modal" tabindex="-1" data-role="modalViewProject"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.model.view.title" data-translate-values="{modelName: view.model.name}"></h4></div><div class="modal-body"><dl class="dl-horizontal"><dt data-translate="moon.model.view.id">Id</dt><dd ng-bind="view.model.id"></dd><dt data-translate="moon.model.view.name">Name</dt><dd ng-bind="view.model.name"></dd><dt data-translate="moon.model.view.description">Description</dt><dd ng-bind="view.model.description"></dd></dl><div ng-if="view.meta_rules_values"><moon-meta-rules-list mapped-model="view.model" edit-mode="false"></moon-meta-rules-list></div><div ng-if="!view.meta_rules_values"><moon-loader></moon-loader></div></div><div class="modal-footer top10"><div class="btn-toolbar" style="float: right;"><button ng-click="$hide()" class="btn btn-default" data-translate="moon.model.view.action.close">Close</button></div></div></div></div></div> \ No newline at end of file
diff --git a/moon_gui/delivery/html/model/edit/metadata/metadata-edit.tpl.html b/moon_gui/delivery/html/model/edit/metadata/metadata-edit.tpl.html
index 7d53a991..188c3678 100644
--- a/moon_gui/delivery/html/model/edit/metadata/metadata-edit.tpl.html
+++ b/moon_gui/delivery/html/model/edit/metadata/metadata-edit.tpl.html
@@ -1 +1 @@
-<div><div class="col-md-4 col-sm-4 col-xs-4"><a class="btn btn-primary" type="button" style="white-space: normal" ng-click="edit.fromList = !edit.fromList"><span ng-if="!edit.fromList" data-translate="moon.model.metadata.edit.action.list">Add from the list</span> <span ng-if="edit.fromList" data-translate="moon.model.metadata.edit.action.new">Add a new Category</span></a></div><div class="col-md-8 col-sm-8 col-xs-8"><form name="selectMetaData" ng-if="edit.fromList" class="form-horizontal" role="form"><div class="form-group"><ui-select ng-model="edit.selectedMetaData" name="object"><ui-select-match placeholder="(None)" ng-bind="$select.selected.name"></ui-select-match><ui-select-choices repeat="ametaData in edit.list"><div ng-value="ametaData" ng-bind="ametaData.name"></div></ui-select-choices></ui-select></div><div class="form-group"><div class="pull-left col-md-4 col-sm-4 col-xs-4"><a href="" ng-disabled="edit.loading || !edit.selectedMetaData" ng-click="edit.deleteMetaData()" class="btn btn-warning"><span class="glyphicon glyphicon-trash"></span> <span data-translate="moon.model.metadata.edit.action.delete">Delete</span></a></div><div class="pull-right col-md-7 col-md-offset-1 col-sm-7 col-sm-offset-1 col-xs-7 col-xs-offset-1"><a href="" ng-disabled="edit.loading || !edit.selectedMetaData" ng-click="edit.addToMetaRule()" class="btn btn-warning" style="white-space: normal"><span class="glyphicon glyphicon-link"></span> <span data-translate="moon.model.metadata.edit.action.add">Add the selected Category</span></a></div></div><moon-loader ng-if="edit.loading"></moon-loader></form><form ng-if="!edit.fromList" class="form-horizontal" role="form" name="edit.form"><div class="form-group" ng-class="{'has-error': edit.form.name.$invalid && edit.form.name.$dirty}"><label for="name" class="col-sm-3 control-label" data-translate="moon.model.metadata.edit.name">Name</label><div class="col-sm-6"><input name="name" id="name" class="form-control" type="text" data-ng-model="edit.metaData.name" required><div class="help-block" ng-show="edit.form.name.$dirty && edit.form.name.$invalid"><small class="error" ng-show="edit.form.name.$error.required" data-translate="moon.model.metadata.edit.check.name.required">Name is required</small></div></div></div><div class="form-group"><label for="description" class="col-sm-3 control-label" data-translate="moon.model.metadata.edit.description">Description</label><div class="col-sm-6"><textarea id="description" name="description" class="form-control" data-ng-model="edit.metaData.description"></textarea></div></div><div class="form-group"><div class="pull-right"><a href="" ng-disabled="edit.loading" ng-click="edit.create()" class="btn btn-warning"><span class="glyphicon glyphicon-save"></span> <span data-translate="moon.model.metadata.edit.action.create">Create</span></a><moon-loader ng-if="edit.loading"></moon-loader></div></div></form></div></div> \ No newline at end of file
+<div><div class="col-md-4 col-sm-4 col-xs-4"><a class="btn btn-primary" type="button" style="white-space: normal;" ng-click="edit.fromList = !edit.fromList"><span ng-if="!edit.fromList" data-translate="moon.model.metadata.edit.action.list">Add from the list</span> <span ng-if="edit.fromList" data-translate="moon.model.metadata.edit.action.new">Add a new Category</span></a></div><div class="col-md-8 col-sm-8 col-xs-8"><form name="selectMetaData" ng-if="edit.fromList" class="form-horizontal" role="form"><div class="form-group"><ui-select ng-model="edit.selectedMetaData" name="object"><ui-select-match placeholder="(None)" ng-bind="$select.selected.name"></ui-select-match><ui-select-choices repeat="ametaData in edit.list"><div ng-value="ametaData" ng-bind="ametaData.name"></div></ui-select-choices></ui-select></div><div class="form-group"><div class="pull-left col-md-4 col-sm-4 col-xs-4"><a href="" ng-disabled="edit.loading || !edit.selectedMetaData" ng-click="edit.deleteMetaData()" class="btn btn-warning"><span class="glyphicon glyphicon-trash"></span> <span data-translate="moon.model.metadata.edit.action.delete">Delete</span></a></div><div class="pull-right col-md-7 col-md-offset-1 col-sm-7 col-sm-offset-1 col-xs-7 col-xs-offset-1"><a href="" ng-disabled="edit.loading || !edit.selectedMetaData" ng-click="edit.addToMetaRule()" class="btn btn-warning" style="white-space: normal;"><span class="glyphicon glyphicon-link"></span> <span data-translate="moon.model.metadata.edit.action.add">Add the selected Category</span></a></div></div><moon-loader ng-if="edit.loading"></moon-loader></form><form ng-if="!edit.fromList" class="form-horizontal" role="form" name="edit.form"><div class="form-group" ng-class="{'has-error': edit.form.name.$invalid && edit.form.name.$dirty}"><label for="name" class="col-sm-3 control-label" data-translate="moon.model.metadata.edit.name">Name</label><div class="col-sm-6"><input name="name" id="name" class="form-control" type="text" data-ng-model="edit.metaData.name" required><div class="help-block" ng-show="edit.form.name.$dirty && edit.form.name.$invalid"><small class="error" ng-show="edit.form.name.$error.required" data-translate="moon.model.metadata.edit.check.name.required">Name is required</small></div></div></div><div class="form-group"><label for="description" class="col-sm-3 control-label" data-translate="moon.model.metadata.edit.description">Description</label><div class="col-sm-6"><textarea id="description" name="description" class="form-control" data-ng-model="edit.metaData.description"></textarea></div></div><div class="form-group"><div class="pull-right"><a href="" ng-disabled="edit.loading" ng-click="edit.create()" class="btn btn-warning"><span class="glyphicon glyphicon-save"></span> <span data-translate="moon.model.metadata.edit.action.create">Create</span></a><moon-loader ng-if="edit.loading"></moon-loader></div></div></form></div></div> \ No newline at end of file
diff --git a/moon_gui/delivery/html/model/edit/metarules/action/mapping/metarules-map.tpl.html b/moon_gui/delivery/html/model/edit/metarules/action/mapping/metarules-map.tpl.html
index 0170fc2e..9041f072 100644
--- a/moon_gui/delivery/html/model/edit/metarules/action/mapping/metarules-map.tpl.html
+++ b/moon_gui/delivery/html/model/edit/metarules/action/mapping/metarules-map.tpl.html
@@ -1 +1 @@
-<div ng-controller="moonMetaRulesMapController as map" class="modal" tabindex="-1" data-role="MapMetaRules"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.model.metarules.map.title"></h4></div><div class="modal-body"><div class="row"><div class="col-sm-3"><button class="btn btn-primary" style="white-space: normal" ng-click="map.addMetaRuleToList = !map.addMetaRuleToList"><span ng-if="!map.addMetaRuleToList" data-translate="moon.model.metarules.map.action.new">Add a new Meta Rule</span> <span ng-if="map.addMetaRuleToList" data-translate="moon.model.metarules.map.action.list">List of Meta Rules</span></button></div><div class="col-sm-9"><form class="form-horizontal" role="form" name="map.form"><div class="form-group" ng-if="!map.addMetaRuleToList"><label class="col-sm-3 control-label" data-translate="moon.model.metarules.map.form.list">List of Meta Rule</label><div class="col-sm-9"><ui-select ng-model="map.selectedMetaRule" name="object"><ui-select-match placeholder="(None)" ng-bind="$select.selected.name"></ui-select-match><ui-select-choices repeat="ametaRule in map.metaRules"><div ng-value="ametaRule" ng-bind="ametaRule.name"></div></ui-select-choices></ui-select></div></div><div class="form-group" ng-if="!map.addMetaRuleToList"><moon-loader ng-if="map.metaRulesLoading || map.mappingLoading"></moon-loader><div class="col-sm-5"><a href="" ng-disabled="map.metaRulesLoading || map.mappingLoading || !map.selectedMetaRule" ng-click="map.deleteMetaRule()" class="btn btn-warning" style="white-space: normal"><span class="glyphicon glyphicon-trash"></span> <span data-translate="moon.model.metarules.map.action.delete">Delete the selected Meta Rule</span></a></div><div class="col-sm-5 col-sm-offset-2"><a href="" ng-disabled="map.metaRulesLoading || map.mappingLoading || !map.selectedMetaRule" ng-click="map.mapToModel()" class="btn btn-warning" style="white-space: normal"><span class="glyphicon glyphicon-link"></span> <span data-translate="moon.model.metarules.map.action.add">Add the selected Meta Rule</span></a></div></div><div class="form-group" ng-if="map.addMetaRuleToList"><moon-meta-rules-add></moon-meta-rules-add></div></form></div></div></div><div class="modal-footer"><div class="btn-toolbar" style="float: right"><a href="" ng-click="$hide()" class="btn btn-default"><span data-translate="moon.model.metarules.add.action.cancel">Cancel</span></a></div></div></div></div></div> \ No newline at end of file
+<div ng-controller="moonMetaRulesMapController as map" class="modal" tabindex="-1" data-role="MapMetaRules"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.model.metarules.map.title"></h4></div><div class="modal-body"><div class="row"><div class="col-sm-3"><button class="btn btn-primary" style="white-space: normal;" ng-click="map.addMetaRuleToList = !map.addMetaRuleToList"><span ng-if="!map.addMetaRuleToList" data-translate="moon.model.metarules.map.action.new">Add a new Meta Rule</span> <span ng-if="map.addMetaRuleToList" data-translate="moon.model.metarules.map.action.list">List of Meta Rules</span></button></div><div class="col-sm-9"><form class="form-horizontal" role="form" name="map.form"><div class="form-group" ng-if="!map.addMetaRuleToList"><label class="col-sm-3 control-label" data-translate="moon.model.metarules.map.form.list">List of Meta Rule</label><div class="col-sm-9"><ui-select ng-model="map.selectedMetaRule" name="object"><ui-select-match placeholder="(None)" ng-bind="$select.selected.name"></ui-select-match><ui-select-choices repeat="ametaRule in map.metaRules"><div ng-value="ametaRule" ng-bind="ametaRule.name"></div></ui-select-choices></ui-select></div></div><div class="form-group" ng-if="!map.addMetaRuleToList"><moon-loader ng-if="map.metaRulesLoading || map.mappingLoading"></moon-loader><div class="col-sm-5"><a href="" ng-disabled="map.metaRulesLoading || map.mappingLoading || !map.selectedMetaRule" ng-click="map.deleteMetaRule()" class="btn btn-warning" style="white-space: normal;"><span class="glyphicon glyphicon-trash"></span> <span data-translate="moon.model.metarules.map.action.delete">Delete the selected Meta Rule</span></a></div><div class="col-sm-5 col-sm-offset-2"><a href="" ng-disabled="map.metaRulesLoading || map.mappingLoading || !map.selectedMetaRule" ng-click="map.mapToModel()" class="btn btn-warning" style="white-space: normal;"><span class="glyphicon glyphicon-link"></span> <span data-translate="moon.model.metarules.map.action.add">Add the selected Meta Rule</span></a></div></div><div class="form-group" ng-if="map.addMetaRuleToList"><moon-meta-rules-add></moon-meta-rules-add></div></form></div></div></div><div class="modal-footer"><div class="btn-toolbar" style="float: right;"><a href="" ng-click="$hide()" class="btn btn-default"><span data-translate="moon.model.metarules.add.action.cancel">Cancel</span></a></div></div></div></div></div> \ No newline at end of file
diff --git a/moon_gui/delivery/html/model/edit/metarules/action/mapping/metarules-unmap.tpl.html b/moon_gui/delivery/html/model/edit/metarules/action/mapping/metarules-unmap.tpl.html
index 76e1e486..37e21f11 100644
--- a/moon_gui/delivery/html/model/edit/metarules/action/mapping/metarules-unmap.tpl.html
+++ b/moon_gui/delivery/html/model/edit/metarules/action/mapping/metarules-unmap.tpl.html
@@ -1 +1 @@
-<div ng-controller="MetaRulesUnMapController as unmap" class="modal" tabindex="-1" data-role="modalUnMapMetaRule"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.model.metarules.unmap.title"></h4></div><div class="modal-body"><span data-translate="moon.model.metarules.unmap.content" data-translate-values="{ modelName: unmap.model.name, metaRuleName: unmap.metaRule.name }"></span></div><div class="modal-footer"><div class="btn-toolbar" style="float: right"><a href="" ng-click="$hide()" class="btn btn-default"><span data-translate="moon.model.metarules.unmap.action.cancel">Cancel</span> </a><a href="" ng-disabled="unmap.unMappingLoading" ng-click="unmap.unmap()" class="btn btn-warning"><span class="glyphicon glyphicon-transfer"></span> <span data-translate="moon.model.metarules.unmap.action.unmap">Unmap</span></a><moon-loader ng-if="unmap.unMappingLoading"></moon-loader></div></div></div></div></div> \ No newline at end of file
+<div ng-controller="MetaRulesUnMapController as unmap" class="modal" tabindex="-1" data-role="modalUnMapMetaRule"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.model.metarules.unmap.title"></h4></div><div class="modal-body"><span data-translate="moon.model.metarules.unmap.content" data-translate-values="{ modelName: unmap.model.name, metaRuleName: unmap.metaRule.name }"></span></div><div class="modal-footer"><div class="btn-toolbar" style="float: right;"><a href="" ng-click="$hide()" class="btn btn-default"><span data-translate="moon.model.metarules.unmap.action.cancel">Cancel</span> </a><a href="" ng-disabled="unmap.unMappingLoading" ng-click="unmap.unmap()" class="btn btn-warning"><span class="glyphicon glyphicon-transfer"></span> <span data-translate="moon.model.metarules.unmap.action.unmap">Unmap</span></a><moon-loader ng-if="unmap.unMappingLoading"></moon-loader></div></div></div></div></div> \ No newline at end of file
diff --git a/moon_gui/delivery/html/model/edit/metarules/action/metarules-edit.tpl.html b/moon_gui/delivery/html/model/edit/metarules/action/metarules-edit.tpl.html
index fe37cc90..5c454d3f 100644
--- a/moon_gui/delivery/html/model/edit/metarules/action/metarules-edit.tpl.html
+++ b/moon_gui/delivery/html/model/edit/metarules/action/metarules-edit.tpl.html
@@ -1 +1 @@
-<div ng-controller="MetaRulesEditController as edit" class="modal" tabindex="-1" data-role="modalViewProject"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.model.metarules.edit.title" data-translate-values="{metaRuleName: edit.metaRule.name}"></h4></div><div class="modal-body"><div class="panel panel-default"><div class="panel-heading"><h4><span data-translate="moon.model.edit.basic.title">Basic Information</span> <a href="" ng-click="edit.editBasic = !edit.editBasic"><span data-translate="moon.model.metarules.edit.update">Update</span> <span class="glyphicon glyphicon-cog"></span></a></h4></div><div class="panel-body"><div ng-if="edit.editBasic"><moon-meta-rules-edit-basic meta-rule="edit.metaRule"></moon-meta-rules-edit-basic></div><div ng-if="!edit.editBasic"><dl class="dl-horizontal"><dt>Id</dt><dd ng-bind="edit.metaRule.id"></dd><dt>Name</dt><dd ng-bind="edit.metaRule.name"></dd><dt>Description</dt><dd ng-bind="edit.metaRule.description"></dd></dl></div></div></div><moon-meta-data-list edit-mode="true" meta-rule="edit.metaRule"></moon-meta-data-list></div><div class="modal-footer top10"><div class="btn-toolbar" style="float: right"><button ng-click="$hide()" class="btn btn-default" data-translate="moon.model.view.action.close">Close</button></div></div></div></div></div> \ No newline at end of file
+<div ng-controller="MetaRulesEditController as edit" class="modal" tabindex="-1" data-role="modalViewProject"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.model.metarules.edit.title" data-translate-values="{metaRuleName: edit.metaRule.name}"></h4></div><div class="modal-body"><div class="panel panel-default"><div class="panel-heading"><h4><span data-translate="moon.model.edit.basic.title">Basic Information</span> <a href="" ng-click="edit.editBasic = !edit.editBasic"><span data-translate="moon.model.metarules.edit.update">Update</span> <span class="glyphicon glyphicon-cog"></span></a></h4></div><div class="panel-body"><div ng-if="edit.editBasic"><moon-meta-rules-edit-basic meta-rule="edit.metaRule"></moon-meta-rules-edit-basic></div><div ng-if="!edit.editBasic"><dl class="dl-horizontal"><dt>Id</dt><dd ng-bind="edit.metaRule.id"></dd><dt>Name</dt><dd ng-bind="edit.metaRule.name"></dd><dt>Description</dt><dd ng-bind="edit.metaRule.description"></dd></dl></div></div></div><moon-meta-data-list edit-mode="true" meta-rule="edit.metaRule"></moon-meta-data-list></div><div class="modal-footer top10"><div class="btn-toolbar" style="float: right;"><button ng-click="$hide()" class="btn btn-default" data-translate="moon.model.view.action.close">Close</button></div></div></div></div></div> \ No newline at end of file
diff --git a/moon_gui/delivery/html/pdp/action/pdp-add.tpl.html b/moon_gui/delivery/html/pdp/action/pdp-add.tpl.html
index e372a8c3..5d8b2b65 100644
--- a/moon_gui/delivery/html/pdp/action/pdp-add.tpl.html
+++ b/moon_gui/delivery/html/pdp/action/pdp-add.tpl.html
@@ -1 +1 @@
-<div ng-controller="PDPAddController as add" class="modal" tabindex="-1" data-role="modalAddPDP"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.pdp.add.title"></h4></div><div class="modal-body"><form class="form-horizontal" role="form" name="add.form"><div class="form-group" ng-class="{'has-error': add.form.name.$invalid && add.form.name.$dirty}"><label for="name" class="col-sm-3 control-label" data-translate="moon.pdp.add.form.name">Name</label><div class="col-sm-6"><input name="name" id="name" class="form-control" type="text" data-ng-model="add.pdp.name" required><div class="help-block" ng-show="add.form.name.$dirty && add.form.name.$invalid"><small class="error" ng-show="add.form.name.$error.required" data-translate="moon.pdp.add.check.name.required">Name is required</small></div></div></div><div class="form-group" ng-class="{'has-error': add.form.policy.$dirty && (add.form.policy.$invalid || !add.selectedPolicy)}"><label class="col-sm-3 control-label" data-translate="moon.pdp.add.form.policy">Policy</label><div class="col-sm-6" ng-if="!add.loadingPolicies"><ui-select ng-model="add.selectedPolicy" name="policy" required><ui-select-match placeholder="(None)">{{$select.selected.name}}</ui-select-match><ui-select-choices repeat="policy in add.policies"><div ng-value="policy">{{policy.name}}</div></ui-select-choices></ui-select><div class="help-block" ng-show="add.form.policy.$dirty && (add.form.policy.$invalid || !add.selectedPolicy)"><small class="error" ng-show="add.form.policy.$error.required" data-translate="moon.pdp.add.check.policy.required">Policy is required</small></div></div><div class="col-sm-6" ng-if="add.loadingPolicies"><moon-loader ng-if="add.loadingPolicies"></moon-loader></div></div><div class="form-group"><label for="description" class="col-sm-3 control-label" data-translate="moon.pdp.add.form.description">Description</label><div class="col-sm-6"><textarea name="description" id="description" class="form-control" ng-model="add.pdp.description"></textarea></div></div></form></div><div class="modal-footer"><div class="btn-toolbar" style="float: right"><a href="" ng-click="$hide()" class="btn btn-default"><span data-translate="moon.pdp.add.action.cancel">Cancel</span> </a><a href="" ng-disabled="add.loading" ng-click="add.create(add.pdp)" class="btn btn-warning"><span class="glyphicon glyphicon-save"></span> <span data-translate="moon.pdp.add.action.create">Create</span></a><moon-loader ng-if="add.loading"></moon-loader></div></div></div></div></div> \ No newline at end of file
+<div ng-controller="PDPAddController as add" class="modal" tabindex="-1" data-role="modalAddPDP"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.pdp.add.title"></h4></div><div class="modal-body"><form class="form-horizontal" role="form" name="add.form"><div class="form-group" ng-class="{'has-error': add.form.name.$invalid && add.form.name.$dirty}"><label for="name" class="col-sm-3 control-label" data-translate="moon.pdp.add.form.name">Name</label><div class="col-sm-6"><input name="name" id="name" class="form-control" type="text" data-ng-model="add.pdp.name" required><div class="help-block" ng-show="add.form.name.$dirty && add.form.name.$invalid"><small class="error" ng-show="add.form.name.$error.required" data-translate="moon.pdp.add.check.name.required">Name is required</small></div></div></div><div class="form-group" ng-class="{'has-error': add.form.policy.$dirty && (add.form.policy.$invalid || !add.selectedPolicy)}"><label class="col-sm-3 control-label" data-translate="moon.pdp.add.form.policy">Policy</label><div class="col-sm-6" ng-if="!add.loadingPolicies"><ui-select ng-model="add.selectedPolicy" name="policy" required><ui-select-match placeholder="(None)">{{$select.selected.name}}</ui-select-match><ui-select-choices repeat="policy in add.policies"><div ng-value="policy">{{policy.name}}</div></ui-select-choices></ui-select><div class="help-block" ng-show="add.form.policy.$dirty && (add.form.policy.$invalid || !add.selectedPolicy)"><small class="error" ng-show="add.form.policy.$error.required" data-translate="moon.pdp.add.check.policy.required">Policy is required</small></div></div><div class="col-sm-6" ng-if="add.loadingPolicies"><moon-loader ng-if="add.loadingPolicies"></moon-loader></div></div><div class="form-group"><label for="description" class="col-sm-3 control-label" data-translate="moon.pdp.add.form.description">Description</label><div class="col-sm-6"><textarea name="description" id="description" class="form-control" ng-model="add.pdp.description"></textarea></div></div></form></div><div class="modal-footer"><div class="btn-toolbar" style="float: right;"><a href="" ng-click="$hide()" class="btn btn-default"><span data-translate="moon.pdp.add.action.cancel">Cancel</span> </a><a href="" ng-disabled="add.loading" ng-click="add.create(add.pdp)" class="btn btn-warning"><span class="glyphicon glyphicon-save"></span> <span data-translate="moon.pdp.add.action.create">Create</span></a><moon-loader ng-if="add.loading"></moon-loader></div></div></div></div></div> \ No newline at end of file
diff --git a/moon_gui/delivery/html/pdp/action/pdp-delete.tpl.html b/moon_gui/delivery/html/pdp/action/pdp-delete.tpl.html
index 2c8a5f34..f5f1d322 100644
--- a/moon_gui/delivery/html/pdp/action/pdp-delete.tpl.html
+++ b/moon_gui/delivery/html/pdp/action/pdp-delete.tpl.html
@@ -1 +1 @@
-<div ng-controller="PDPDeleteController as del" class="modal" tabindex="-1" data-role="modalDeletePDP"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.pdp.remove.title"></h4></div><div class="modal-body"><span data-translate="moon.pdp.remove.content" data-translate-values="{ pdpName: del.pdp.name}"></span></div><div class="modal-footer"><div class="btn-toolbar" style="float: right"><a href="" ng-click="$hide()" class="btn btn-default"><span data-translate="moon.pdp.remove.action.cancel">Cancel</span> </a><a href="" ng-disabled="del.loading" ng-click="del.remove()" class="btn btn-warning"><span class="glyphicon glyphicon-trash"></span> <span data-translate="moon.pdp.remove.action.delete">Delete</span></a><moon-loader ng-if="del.loading"></moon-loader></div></div></div></div></div> \ No newline at end of file
+<div ng-controller="PDPDeleteController as del" class="modal" tabindex="-1" data-role="modalDeletePDP"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.pdp.remove.title"></h4></div><div class="modal-body"><span data-translate="moon.pdp.remove.content" data-translate-values="{ pdpName: del.pdp.name}"></span></div><div class="modal-footer"><div class="btn-toolbar" style="float: right;"><a href="" ng-click="$hide()" class="btn btn-default"><span data-translate="moon.pdp.remove.action.cancel">Cancel</span> </a><a href="" ng-disabled="del.loading" ng-click="del.remove()" class="btn btn-warning"><span class="glyphicon glyphicon-trash"></span> <span data-translate="moon.pdp.remove.action.delete">Delete</span></a><moon-loader ng-if="del.loading"></moon-loader></div></div></div></div></div> \ No newline at end of file
diff --git a/moon_gui/delivery/html/policy/action/mapping/policy-map.tpl.html b/moon_gui/delivery/html/policy/action/mapping/policy-map.tpl.html
index 9d115c18..0d185618 100644
--- a/moon_gui/delivery/html/policy/action/mapping/policy-map.tpl.html
+++ b/moon_gui/delivery/html/policy/action/mapping/policy-map.tpl.html
@@ -1 +1 @@
-<div ng-controller="PolicyMapController as map" class="modal" tabindex="-1" data-role="modalMappingPolicy"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.policy.map.title" data-translate-values="{ pdpName: map.pdp.name}"></h4></div><div class="modal-body"><form class="form-horizontal" role="form" name="map.form"><div class="form-group" ng-class="{'has-error': map.form.policy.$dirty && (map.form.policy.$invalid || !map.selectedPolicy)}"><label class="col-sm-3 control-label" data-translate="moon.policy.map.form.list">List of Policies</label><div class="col-sm-6"><ui-select ng-model="map.selectedPolicy" name="policy" required><ui-select-match placeholder="(None)" ng-bind="$select.selected.name"></ui-select-match><ui-select-choices repeat="policy in map.policies"><div ng-bind="policy.name" ng-value="policy"></div></ui-select-choices></ui-select><moon-loader ng-if="map.policiesLoading"></moon-loader><div class="help-block" ng-show="map.form.policy.$dirty && (map.form.policy.$invalid || !map.selectedPolicy)"><small class="error" ng-show="map.form.policy.$error.required" data-translate="moon.policy.map.check.policy.required">Policy is required</small></div></div></div></form></div><div class="modal-footer"><div class="btn-toolbar" style="float: right"><a href="" ng-click="$hide()" class="btn btn-default"><span data-translate="moon.policy.map.action.cancel">Cancel</span> </a><a href="" ng-disabled="map.mappingLoading" ng-click="map.map()" class="btn btn-warning"><span class="glyphicon glyphicon-link"></span> <span data-translate="moon.policy.map.action.map">Map</span></a><moon-loader ng-if="map.mappingLoading"></moon-loader></div></div></div></div></div> \ No newline at end of file
+<div ng-controller="PolicyMapController as map" class="modal" tabindex="-1" data-role="modalMappingPolicy"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.policy.map.title" data-translate-values="{ pdpName: map.pdp.name}"></h4></div><div class="modal-body"><form class="form-horizontal" role="form" name="map.form"><div class="form-group" ng-class="{'has-error': map.form.policy.$dirty && (map.form.policy.$invalid || !map.selectedPolicy)}"><label class="col-sm-3 control-label" data-translate="moon.policy.map.form.list">List of Policies</label><div class="col-sm-6"><ui-select ng-model="map.selectedPolicy" name="policy" required><ui-select-match placeholder="(None)" ng-bind="$select.selected.name"></ui-select-match><ui-select-choices repeat="policy in map.policies"><div ng-bind="policy.name" ng-value="policy"></div></ui-select-choices></ui-select><moon-loader ng-if="map.policiesLoading"></moon-loader><div class="help-block" ng-show="map.form.policy.$dirty && (map.form.policy.$invalid || !map.selectedPolicy)"><small class="error" ng-show="map.form.policy.$error.required" data-translate="moon.policy.map.check.policy.required">Policy is required</small></div></div></div></form></div><div class="modal-footer"><div class="btn-toolbar" style="float: right;"><a href="" ng-click="$hide()" class="btn btn-default"><span data-translate="moon.policy.map.action.cancel">Cancel</span> </a><a href="" ng-disabled="map.mappingLoading" ng-click="map.map()" class="btn btn-warning"><span class="glyphicon glyphicon-link"></span> <span data-translate="moon.policy.map.action.map">Map</span></a><moon-loader ng-if="map.mappingLoading"></moon-loader></div></div></div></div></div> \ No newline at end of file
diff --git a/moon_gui/delivery/html/policy/action/mapping/policy-unmap.tpl.html b/moon_gui/delivery/html/policy/action/mapping/policy-unmap.tpl.html
index 3892782d..844510e9 100644
--- a/moon_gui/delivery/html/policy/action/mapping/policy-unmap.tpl.html
+++ b/moon_gui/delivery/html/policy/action/mapping/policy-unmap.tpl.html
@@ -1 +1 @@
-<div ng-controller="PolicyUnMapController as unmap" class="modal" tabindex="-1" data-role="modalUnmapPolicy"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.policy.unmap.title"></h4></div><div class="modal-body"><span data-translate="moon.policy.unmap.content" data-translate-values="{ policyName: unmap.policy.name, pdpName: unmap.pdp.name }"></span></div><div class="modal-footer"><div class="btn-toolbar" style="float: right"><a href="" ng-click="$hide()" class="btn btn-default"><span data-translate="moon.policy.unmap.action.cancel">Cancel</span> </a><a href="" ng-disabled="unmap.unMappingLoading" ng-click="unmap.unmap()" class="btn btn-warning"><span class="glyphicon glyphicon-transfer"></span> <span data-translate="moon.policy.unmap.action.unmap">Unmap</span></a><moon-loader ng-if="unmap.unMappingLoading"></moon-loader></div></div></div></div></div> \ No newline at end of file
+<div ng-controller="PolicyUnMapController as unmap" class="modal" tabindex="-1" data-role="modalUnmapPolicy"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.policy.unmap.title"></h4></div><div class="modal-body"><span data-translate="moon.policy.unmap.content" data-translate-values="{ policyName: unmap.policy.name, pdpName: unmap.pdp.name }"></span></div><div class="modal-footer"><div class="btn-toolbar" style="float: right;"><a href="" ng-click="$hide()" class="btn btn-default"><span data-translate="moon.policy.unmap.action.cancel">Cancel</span> </a><a href="" ng-disabled="unmap.unMappingLoading" ng-click="unmap.unmap()" class="btn btn-warning"><span class="glyphicon glyphicon-transfer"></span> <span data-translate="moon.policy.unmap.action.unmap">Unmap</span></a><moon-loader ng-if="unmap.unMappingLoading"></moon-loader></div></div></div></div></div> \ No newline at end of file
diff --git a/moon_gui/delivery/html/policy/action/policy-add.tpl.html b/moon_gui/delivery/html/policy/action/policy-add.tpl.html
index e1220479..17f714c8 100644
--- a/moon_gui/delivery/html/policy/action/policy-add.tpl.html
+++ b/moon_gui/delivery/html/policy/action/policy-add.tpl.html
@@ -1 +1 @@
-<div ng-controller="PolicyAddController as add" class="modal" tabindex="-1" data-role="modalAddPolicy"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.policy.add.title"></h4></div><div class="modal-body"><form class="form-horizontal" role="form" name="add.form"><div class="form-group" ng-class="{'has-error': add.form.name.$invalid && add.form.name.$dirty}"><label for="name" class="col-sm-3 control-label" data-translate="moon.policy.add.form.name">Name</label><div class="col-sm-6"><input name="name" id="name" class="form-control" type="text" data-ng-model="add.policy.name" required><div class="help-block" ng-show="add.form.name.$dirty && add.form.name.$invalid"><small class="error" ng-show="add.form.name.$error.required" data-translate="moon.policy.add.check.name.required">Name is required</small></div></div></div><div class="form-group" ng-class="{'has-error': add.form.genre.$dirty && (add.form.genre.$invalid || !add.selectedGenre)}"><label class="col-sm-3 control-label" data-translate="moon.policy.add.form.genre">Genre</label><div class="col-sm-6"><ui-select ng-model="add.selectedGenre" name="genre" required><ui-select-match placeholder="(None)">{{$select.selected}}</ui-select-match><ui-select-choices repeat="genre in add.genres"><div ng-value="genre">{{genre}}</div></ui-select-choices></ui-select><div class="help-block" ng-show="add.form.genre.$dirty && (add.form.genre.$invalid || !add.selectedPolicy)"><small class="error" ng-show="add.form.genre.$error.required" data-translate="moon.policy.add.check.genre.required">Genre is required</small></div></div></div><div class="form-group" ng-class="{'has-error': add.form.model.$dirty && (add.form.model.$invalid || !add.selectedModel)}"><label class="col-sm-3 control-label" data-translate="moon.policy.add.form.model">Models</label><div class="col-sm-6"><ui-select ng-model="add.selectedModel" name="model" required><ui-select-match placeholder="(None)">{{$select.selected.name}}</ui-select-match><ui-select-choices repeat="model in add.models"><div ng-value="model">{{model.name}}</div></ui-select-choices></ui-select><moon-loader ng-if="add.modelsLoading"></moon-loader><div class="help-block" ng-show="add.form.model.$dirty && (add.form.model.$invalid || !add.selectedModel)"><small class="error" ng-show="add.form.model.$error.required" data-translate="moon.policy.add.check.model.required">Model is required</small></div></div></div><div class="form-group"><label for="description" class="col-sm-3 control-label" data-translate="moon.policy.add.form.description">Description</label><div class="col-sm-6"><textarea id="description" name="description" class="form-control" data-ng-model="add.policy.description"></textarea></div></div></form></div><div class="modal-footer"><div class="btn-toolbar" style="float: right"><a href="" ng-click="$hide()" class="btn btn-default"><span data-translate="moon.policy.add.action.cancel">Cancel</span> </a><a href="" ng-disabled="add.loading" ng-click="add.create()" class="btn btn-warning"><span class="glyphicon glyphicon-save"></span> <span data-translate="moon.policy.add.action.create">Create Policy</span></a><moon-loader ng-if="add.loading"></moon-loader></div></div></div></div></div> \ No newline at end of file
+<div ng-controller="PolicyAddController as add" class="modal" tabindex="-1" data-role="modalAddPolicy"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.policy.add.title"></h4></div><div class="modal-body"><form class="form-horizontal" role="form" name="add.form"><div class="form-group" ng-class="{'has-error': add.form.name.$invalid && add.form.name.$dirty}"><label for="name" class="col-sm-3 control-label" data-translate="moon.policy.add.form.name">Name</label><div class="col-sm-6"><input name="name" id="name" class="form-control" type="text" data-ng-model="add.policy.name" required><div class="help-block" ng-show="add.form.name.$dirty && add.form.name.$invalid"><small class="error" ng-show="add.form.name.$error.required" data-translate="moon.policy.add.check.name.required">Name is required</small></div></div></div><div class="form-group" ng-class="{'has-error': add.form.genre.$dirty && (add.form.genre.$invalid || !add.selectedGenre)}"><label class="col-sm-3 control-label" data-translate="moon.policy.add.form.genre">Genre</label><div class="col-sm-6"><ui-select ng-model="add.selectedGenre" name="genre" required><ui-select-match placeholder="(None)">{{$select.selected}}</ui-select-match><ui-select-choices repeat="genre in add.genres"><div ng-value="genre">{{genre}}</div></ui-select-choices></ui-select><div class="help-block" ng-show="add.form.genre.$dirty && (add.form.genre.$invalid || !add.selectedPolicy)"><small class="error" ng-show="add.form.genre.$error.required" data-translate="moon.policy.add.check.genre.required">Genre is required</small></div></div></div><div class="form-group" ng-class="{'has-error': add.form.model.$dirty && (add.form.model.$invalid || !add.selectedModel)}"><label class="col-sm-3 control-label" data-translate="moon.policy.add.form.model">Models</label><div class="col-sm-6"><ui-select ng-model="add.selectedModel" name="model" required><ui-select-match placeholder="(None)">{{$select.selected.name}}</ui-select-match><ui-select-choices repeat="model in add.models"><div ng-value="model">{{model.name}}</div></ui-select-choices></ui-select><moon-loader ng-if="add.modelsLoading"></moon-loader><div class="help-block" ng-show="add.form.model.$dirty && (add.form.model.$invalid || !add.selectedModel)"><small class="error" ng-show="add.form.model.$error.required" data-translate="moon.policy.add.check.model.required">Model is required</small></div></div></div><div class="form-group"><label for="description" class="col-sm-3 control-label" data-translate="moon.policy.add.form.description">Description</label><div class="col-sm-6"><textarea id="description" name="description" class="form-control" data-ng-model="add.policy.description"></textarea></div></div></form></div><div class="modal-footer"><div class="btn-toolbar" style="float: right;"><a href="" ng-click="$hide()" class="btn btn-default"><span data-translate="moon.policy.add.action.cancel">Cancel</span> </a><a href="" ng-disabled="add.loading" ng-click="add.create()" class="btn btn-warning"><span class="glyphicon glyphicon-save"></span> <span data-translate="moon.policy.add.action.create">Create Policy</span></a><moon-loader ng-if="add.loading"></moon-loader></div></div></div></div></div> \ No newline at end of file
diff --git a/moon_gui/delivery/html/policy/action/policy-delete.tpl.html b/moon_gui/delivery/html/policy/action/policy-delete.tpl.html
index d2c679e3..2e042fc0 100644
--- a/moon_gui/delivery/html/policy/action/policy-delete.tpl.html
+++ b/moon_gui/delivery/html/policy/action/policy-delete.tpl.html
@@ -1 +1 @@
-<div ng-controller="PolicyDeleteController as del" class="modal" tabindex="-1" data-role="modalDeletePolicy"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.policy.remove.title"></h4></div><div class="modal-body"><p><span data-translate="moon.policy.remove.content.query" data-translate-values="{ policyName: del.policy.name }"></span></p></div><div class="modal-footer"><div class="btn-toolbar" style="float: right"><a href="" ng-click="$hide()" class="btn btn-default"><span data-translate="moon.policy.remove.action.cancel">Cancel</span> </a><a href="" ng-disabled="del.loading" ng-click="del.remove()" class="btn btn-warning"><span class="glyphicon glyphicon-trash"></span> <span data-translate="moon.policy.remove.action.delete">Delete</span></a><moon-loader ng-if="del.loading"></moon-loader></div></div></div></div></div> \ No newline at end of file
+<div ng-controller="PolicyDeleteController as del" class="modal" tabindex="-1" data-role="modalDeletePolicy"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.policy.remove.title"></h4></div><div class="modal-body"><p><span data-translate="moon.policy.remove.content.query" data-translate-values="{ policyName: del.policy.name }"></span></p></div><div class="modal-footer"><div class="btn-toolbar" style="float: right;"><a href="" ng-click="$hide()" class="btn btn-default"><span data-translate="moon.policy.remove.action.cancel">Cancel</span> </a><a href="" ng-disabled="del.loading" ng-click="del.remove()" class="btn btn-warning"><span class="glyphicon glyphicon-trash"></span> <span data-translate="moon.policy.remove.action.delete">Delete</span></a><moon-loader ng-if="del.loading"></moon-loader></div></div></div></div></div> \ No newline at end of file
diff --git a/moon_gui/delivery/html/policy/edit/parameter/assignments/assignments-edit.tpl.html b/moon_gui/delivery/html/policy/edit/parameter/assignments/assignments-edit.tpl.html
new file mode 100644
index 00000000..4d9e8a85
--- /dev/null
+++ b/moon_gui/delivery/html/policy/edit/parameter/assignments/assignments-edit.tpl.html
@@ -0,0 +1 @@
+<div><div class="col-md-12 col-sm-12 col-xs-12"><form ng-if="!edit.fromList" class="form-horizontal" role="form" name="edit.form"><!-- Select Policy --><div class="form-group" ng-class="{'has-error': edit.form.policyList.$invalid && edit.form.policyList.$dirty}"><label for="policyList" class="col-sm-3 control-label" data-translate="moon.policy.assignments.edit.policies">Policy List</label><div class="col-sm-6" ng-if="edit.loadingPolicies"><moon-loader></moon-loader></div><div class="col-sm-6" ng-if="!edit.loadingPolicies"><ui-select ng-model="edit.selectedPolicy" name="policyList" id="policyList" required><ui-select-match placeholder="(None)" ng-bind="$select.selected.name"></ui-select-match><ui-select-choices repeat="aPolicy in edit.policyList"><div ng-value="aPolicy" ng-bind="aPolicy.name"></div></ui-select-choices></ui-select><div class="help-block" ng-show="edit.form.policyList.$dirty && edit.form.policyList.$invalid"><small class="error" ng-show="edit.form.policyList.$error.required" data-translate="moon.policy.assignments.edit.check.policy.required">Policy is required</small></div></div></div><!-- Select Perimeter --><div class="form-group" ng-class="{'has-error': edit.form.perimeterList.$invalid && edit.form.perimeterList.$dirty}"><label for="perimeterList" class="col-sm-3 control-label" data-translate="moon.policy.assignments.edit.perimeters">Perimeter List</label><div class="col-sm-6" ng-if="edit.loadingPerimeters"><moon-loader></moon-loader></div><div class="col-sm-6" ng-if="!edit.loadingPerimeters"><ui-select ng-model="edit.selectedPerimeter" name="perimeterList" id="perimeterList" required><ui-select-match placeholder="(None)" ng-bind="$select.selected.name"></ui-select-match><ui-select-choices repeat="aPerimeter in edit.perimeterList"><div ng-value="aPerimeter" ng-bind="aPerimeter.name"></div></ui-select-choices></ui-select><div class="help-block" ng-show="edit.form.perimeterList.$dirty && edit.form.perimeterList.$invalid"><small class="error" ng-show="edit.form.perimeterList.$error.required" data-translate="moon.policy.assignments.edit.check.perimeter.required">Perimeter is required</small></div></div></div><!-- Select Category --><div class="form-group" ng-class="{'has-error': edit.form.categoryList.$invalid && edit.form.categoryList.$dirty}"><label for="categoryList" class="col-sm-3 control-label" data-translate="moon.policy.assignments.edit.categories">Category List</label><div class="col-sm-6" ng-if="edit.loadingCategories"><moon-loader></moon-loader></div><div class="col-sm-6" ng-if="!edit.loadingCategories"><ui-select ng-model="edit.selectedCategory" name="categoryList" id="categoryList" required><ui-select-match placeholder="(None)" ng-bind="$select.selected.name"></ui-select-match><ui-select-choices repeat="aCategory in edit.categoryList"><div ng-value="aCategory" ng-bind="aCategory.name"></div></ui-select-choices></ui-select><div class="help-block" ng-show="edit.form.categoryList.$dirty && edit.form.categoryList.$invalid"><small class="error" ng-show="edit.form.categoryList.$error.required" data-translate="moon.policy.assignments.edit.check.category.required">Category is required</small></div></div></div><!-- Select Data --><div class="form-group" ng-if="edit.selectedCategory" ng-class="{'has-error': edit.form.dataList.$invalid && edit.form.dataList.$dirty}"><label for="dataList" class="col-sm-3 control-label" data-translate="moon.policy.assignments.edit.data">Data List</label><div class="col-sm-6" ng-if="edit.loadingData"><moon-loader></moon-loader></div><div class="col-sm-4" ng-if="!edit.loadingData"><ui-select ng-model="edit.selectedData" name="dataList" id="dataList"><ui-select-match placeholder="(None)" ng-bind="edit.getName($select.selected)"></ui-select-match><ui-select-choices repeat="aData in edit.dataToBeSelected"><div ng-value="aData" ng-bind="edit.getName(aData)"></div></ui-select-choices></ui-select><div class="help-block" ng-show="edit.form.dataList.$dirty && edit.form.dataList.$invalid || !edit.assignementsAttributeValid"><small class="error" ng-show="edit.form.dataList.$error.required || !edit.assignementsAttributeValid" data-translate="moon.policy.assignments.edit.check.data.required">Data is required</small></div></div><div class="col-sm-2 text-center"><a href="" ng-if="edit.selectedData" ng-click="edit.addSelectedData()"><span style="font-size:1.5em; line-height: 1.5em;" class="glyphicon glyphicon-plus-sign"></span></a></div></div><!-- Selected DataList --><div class="form-group" ng-if="!edit.loadingData"><label class="col-sm-3 control-label" data-translate="moon.policy.assignments.edit.selectedData">Selected Data)</label><div class="col-sm-6"><ul><li ng-repeat="(key, value) in edit.selectedDataList"><span ng-bind="edit.getName(value)"></span> <a href="" ng-click="edit.removeSelectedData(value)"><span style="font-size:1.5em; line-height: 1.5em" class="glyphicon glyphicon-remove"></span></a></li></ul></div></div><div class="form-group"><div class="pull-right"><a href="" ng-disabled="edit.loading" ng-click="edit.create()" class="btn btn-warning"><span class="glyphicon glyphicon-save"></span> <span data-translate="moon.policy.assignments.edit.action.create">Create</span></a><moon-loader ng-if="edit.loading"></moon-loader></div></div></form></div></div> \ No newline at end of file
diff --git a/moon_gui/delivery/html/policy/edit/parameter/data/data-edit.tpl.html b/moon_gui/delivery/html/policy/edit/parameter/data/data-edit.tpl.html
new file mode 100644
index 00000000..d63f6683
--- /dev/null
+++ b/moon_gui/delivery/html/policy/edit/parameter/data/data-edit.tpl.html
@@ -0,0 +1 @@
+<div><div class="col-md-12 col-sm-12 col-xs-12"><form ng-if="!edit.fromList" class="form-horizontal" role="form" name="edit.form"><div class="form-group" ng-class="{'has-error': edit.form.name.$invalid && edit.form.name.$dirty}"><label for="name" class="col-sm-3 control-label" data-translate="moon.policy.data.edit.name">Name</label><div class="col-sm-6"><input name="name" id="name" class="form-control" type="text" data-ng-model="edit.data.name" required><div class="help-block" ng-show="edit.form.name.$dirty && edit.form.name.$invalid"><small class="error" ng-show="edit.form.name.$error.required" data-translate="moon.policy.data.edit.check.name.required">Name is required</small></div></div></div><div class="form-group"><label for="description" class="col-sm-3 control-label" data-translate="moon.policy.data.edit.description">Description</label><div class="col-sm-6"><textarea id="description" name="description" class="form-control" data-ng-model="edit.data.description"></textarea></div></div><div class="form-group" ng-class="{'has-error': edit.form.categoryList.$invalid && edit.form.categoryList.$dirty}"><label for="categoryList" class="col-sm-3 control-label" data-translate="moon.policy.data.edit.categories">Category List</label><div class="col-sm-6"><ui-select ng-model="edit.selectedCategory" name="categoryList" id="categoryList" required><ui-select-match placeholder="(None)" ng-bind="$select.selected.name"></ui-select-match><ui-select-choices repeat="aCategory in edit.categoriesToBeSelected"><div ng-value="aCategory" ng-bind="aCategory.name"></div></ui-select-choices></ui-select><div class="help-block" ng-show="edit.form.categoryList.$dirty && edit.form.categoryList.$invalid"><small class="error" ng-show="edit.form.categoryList.$error.required" data-translate="moon.policy.data.edit.check.category.required">Category is required</small></div></div></div><div class="form-group"><div class="pull-right"><a href="" ng-disabled="edit.loading" ng-click="edit.create()" class="btn btn-warning"><span class="glyphicon glyphicon-save"></span> <span data-translate="moon.policy.data.edit.action.create">Create</span></a><moon-loader ng-if="edit.loading"></moon-loader></div></div></form></div></div> \ No newline at end of file
diff --git a/moon_gui/delivery/html/policy/edit/parameter/perimeter/perimeter-edit.tpl.html b/moon_gui/delivery/html/policy/edit/parameter/perimeter/perimeter-edit.tpl.html
new file mode 100644
index 00000000..23b29cb5
--- /dev/null
+++ b/moon_gui/delivery/html/policy/edit/parameter/perimeter/perimeter-edit.tpl.html
@@ -0,0 +1,11 @@
+<div><div class="col-md-4 col-sm-4 col-xs-4"><a class="btn btn-primary" type="button" style="white-space: normal;" ng-click="edit.fromList = !edit.fromList"><span ng-if="!edit.fromList" data-translate="moon.policy.perimeter.edit.action.list">Add from the list</span> <span ng-if="edit.fromList" data-translate="moon.policy.perimeter.edit.action.new">Add a new Perimeter</span></a></div><div class="col-md-8 col-sm-8 col-xs-8"><form name="selectMetaData" ng-if="edit.fromList" class="form-horizontal" role="form"><div class="form-group"><ui-select ng-model="edit.selectedPerimeter" name="object"><ui-select-match placeholder="(None)" ng-bind="$select.selected.name"></ui-select-match><ui-select-choices repeat="aPerimeter in edit.list"><div ng-value="aPerimeter" ng-bind="aPerimeter.name"></div></ui-select-choices></ui-select></div><div class="form-group"><div class="pull-left col-md-4 col-sm-4 col-xs-4"><a href="" ng-disabled="edit.loading || !edit.selectedPerimeter" ng-click="edit.deletePerimeter()" class="btn btn-warning"><span class="glyphicon glyphicon-trash"></span> <span data-translate="moon.policy.perimeter.edit.action.delete">Delete</span></a></div><div class="pull-right col-md-7 col-md-offset-1 col-sm-7 col-sm-offset-1 col-xs-7 col-xs-offset-1"><a href="" ng-disabled="edit.loading || !edit.selectedPerimeter" ng-click="edit.addToPolicy()" class="btn btn-warning" style="white-space: normal;"><span class="glyphicon glyphicon-link"></span> <span data-translate="moon.policy.perimeter.edit.action.add">Add the selected Perimeter</span></a></div></div><moon-loader ng-if="edit.loading"></moon-loader></form><form ng-if="!edit.fromList" class="form-horizontal" role="form" name="edit.form"><div class="form-group" ng-class="{'has-error': edit.form.name.$invalid && edit.form.name.$dirty}"><label for="name" class="col-sm-3 control-label" data-translate="moon.policy.perimeter.edit.name">Name</label><div class="col-sm-6"><input name="name" id="name" class="form-control" type="text" data-ng-model="edit.perimeter.name" required><div class="help-block" ng-show="edit.form.name.$dirty && edit.form.name.$invalid"><small class="error" ng-show="edit.form.name.$error.required" data-translate="moon.policy.perimeter.edit.check.name.required">Name is required</small></div></div></div><div class="form-group"><label for="description" class="col-sm-3 control-label" data-translate="moon.policy.perimeter.edit.description">Description</label><div class="col-sm-6"><textarea id="description" name="description" class="form-control" data-ng-model="edit.perimeter.description"></textarea></div></div><!--
+ <div class="form-group">
+
+ <label for="partnerId" class="col-sm-3 control-label" data-translate="moon.policy.perimeter.edit.partnerId">Partner Id</label>
+
+ <div class="col-sm-6">
+ <input name="partnerId" id="partnerId" class="form-control" type="text" data-ng-model="edit.perimeter.partnerId" />
+ </div>
+
+ </div>
+ --><div class="form-group" ng-if="edit.perimeterType === edit.subjectType" ng-class="{'has-error': edit.form.email.$invalid && edit.form.email.$dirty}"><label for="email" class="col-sm-3 control-label" data-translate="moon.policy.perimeter.edit.email">Email</label><div class="col-sm-6"><input name="email" id="email" class="form-control" type="email" data-ng-model="edit.perimeter.email"></div></div><div class="form-group"><label for="policyList" class="col-sm-3 control-label" data-translate="moon.policy.perimeter.edit.policies">Policy List</label><div class="col-sm-5"><ui-select ng-model="edit.selectedPolicy" id="policyList"><ui-select-match placeholder="(None)" ng-bind="$select.selected.name"></ui-select-match><ui-select-choices repeat="aPolicy in edit.policiesToBeSelected"><div ng-value="aPolicy" ng-bind="aPolicy.name"></div></ui-select-choices></ui-select></div><div class="col-sm-1 text-center"><a href="" ng-click="edit.addPolicyToPerimeter()"><span style="font-size:1.5em; line-height: 1.5em;" class="glyphicon glyphicon-plus-sign"></span></a></div></div><div class="form-group"><label class="col-sm-3 control-label" data-translate="moon.policy.perimeter.edit.selectedPolicies">Selected Policies</label><div class="col-sm-6"><ul><li ng-repeat="(key, value) in edit.selectedPolicyList"><span ng-bind="value.name"></span> <a href="" ng-click="edit.removeSelectedPolicy(value)"><span style="font-size:1.5em; line-height: 1.5em" class="glyphicon glyphicon-remove"></span></a></li></ul></div></div><div class="form-group"><div class="pull-right"><a href="" ng-disabled="edit.loading" ng-click="edit.create()" class="btn btn-warning"><span class="glyphicon glyphicon-save"></span> <span data-translate="moon.policy.perimeter.edit.action.create">Create</span></a><moon-loader ng-if="edit.loading"></moon-loader></div></div></form></div></div> \ No newline at end of file
diff --git a/moon_gui/delivery/html/policy/edit/parameter/rules/rules-edit.tpl.html b/moon_gui/delivery/html/policy/edit/parameter/rules/rules-edit.tpl.html
new file mode 100644
index 00000000..46716d0d
--- /dev/null
+++ b/moon_gui/delivery/html/policy/edit/parameter/rules/rules-edit.tpl.html
@@ -0,0 +1 @@
+<div><div class="col-md-12 col-sm-12 col-xs-12"><form ng-if="!edit.fromList" class="form-horizontal" role="form" name="edit.form"><!-- Select Policy --><div class="form-group" ng-class="{'has-error': edit.form.policyList.$invalid && edit.form.policyList.$dirty}"><label for="policyList" class="col-sm-3 control-label" data-translate="moon.policy.rules.edit.action.add.policies">Policy List</label><div class="col-sm-6"><ui-select ng-model="edit.selectedPolicy" name="policyList" id="policyList" required><ui-select-match placeholder="(None)" ng-bind="$select.selected.name"></ui-select-match><ui-select-choices repeat="aPolicy in edit.policyList"><div ng-value="aPolicy" ng-bind="aPolicy.name"></div></ui-select-choices></ui-select><div class="help-block" ng-show="edit.form.policyList.$dirty && edit.form.policyList.$invalid"><small class="error" ng-show="edit.form.policyList.$error.required" data-translate="moon.policy.rules.edit.action.add.check.policy.required">Policy is required</small></div></div></div><div ng-if="!edit.selectedPolicy.meta_rules_values"><div class="col-sm-6 col-sm-offset-3"><moon-loader></moon-loader></div></div><div ng-if="edit.selectedPolicy.meta_rules_values"><!-- Select Meta Rules --><div class="form-group" ng-class="{'has-error': edit.form.metaRulesList.$invalid && edit.form.metaRulesList.$dirty}"><label for="metaRulesList" class="col-sm-3 control-label" data-translate="moon.policy.rules.edit.action.add.metarules">MetaRules List</label><div class="col-sm-6"><ui-select ng-model="edit.selectedMetaRules" name="metaRulesList" id="metaRulesList" required><ui-select-match placeholder="(None)" ng-bind="$select.selected.name"></ui-select-match><ui-select-choices repeat="aMetaRules in edit.selectedPolicy.meta_rules_values"><div ng-value="aMetaRules" ng-bind="aMetaRules.name"></div></ui-select-choices></ui-select><div class="help-block" ng-show="edit.form.metaRulesList.$dirty && edit.form.metaRulesList.$invalid"><small class="error" ng-show="edit.form.metaRulesList.$error.required" data-translate="moon.policy.rules.edit.action.add.check.metarules.required">A MetaRules is required</small></div></div><div><a href="" ng-if="edit.selectedMetaRules" ng-click="edit.showDetailselectedMetaRules = !edit.showDetailselectedMetaRules"><span ng-if="!edit.showDetailselectedMetaRules"><span data-translate="moon.policy.rules.edit.action.add.details.show">Show</span> <span class="glyphicon glyphicon-eye-open"></span> </span><span ng-if="edit.showDetailselectedMetaRules"><span data-translate="moon.policy.rules.edit.action.add.details.close">Close</span> <span class="glyphicon glyphicon-eye-close"></span></span></a></div></div><div class="form-group" ng-if="edit.showDetailselectedMetaRules && edit.selectedMetaRules"><moon-meta-data-list edit-mode="edit.editMode" meta-rule="edit.selectedMetaRules" short-display="true"></moon-meta-data-list></div><!-- Select Data --><div class="form-group" ng-if="edit.selectedMetaRules"><div class="col-md-4"><div ng-if="edit.selectedMetaRules.subject_categories.length > 0"><div class="row"><div ng-if="!edit.data.loadingSubjects"><label for="subjectsList" class="col-sm-3 control-label" data-translate="moon.policy.rules.edit.action.add.categories.subject" data-translate-values="{ number: edit.selectedMetaRules.subject_categories.length }">Select Subject(s)</label><div class="col-sm-7"><ui-select ng-model="edit.selectedSubject" name="subjectsList" id="subjectsList" required><ui-select-match placeholder="(None)" ng-bind="$select.selected.name"></ui-select-match><ui-select-choices repeat="aSubject in edit.data.subjectsToBeSelected"><div ng-value="aSubject" ng-bind="aSubject.name"></div></ui-select-choices></ui-select><div class="help-block" ng-show="edit.form.subjectsList.$dirty && edit.form.subjectsList.$invalid || !edit.numberOfSelectedSubjectValid"><small class="error" ng-show="edit.form.subjectsList.$error.required || !edit.numberOfSelectedSubjectValid" data-translate="moon.policy.rules.edit.action.add.check.subject.required" data-translate-values="{ number: edit.selectedMetaRules.subject_categories.length }">Some subject are required</small></div></div><div class="col-sm-2 text-center"><a href="" ng-if="edit.selectedSubject && !edit.isNumberSelectedDataAtMaximum(edit.data.subjectCST)" ng-click="edit.addDataToRules(edit.data.subjectCST)"><span style="font-size:1.5em; line-height: 1.5em;" class="glyphicon glyphicon-plus-sign"></span></a></div></div><div ng-if="edit.data.loadingSubjects"><moon-loader></moon-loader></div></div><div class="row" ng-if="!edit.data.loadingSubjects"><div class="form-group"><label class="col-sm-3 control-label" data-translate="moon.policy.rules.edit.action.add.selectedSubjects">Selected Subjcet(s)</label><div class="col-sm-6"><ul><li ng-repeat="(key, value) in edit.data.selectedSubjectsList"><span ng-bind="value.name"></span> <a href="" ng-click="edit.removeSelectedDataFromRules(value, edit.data.subjectCST)"><span style="font-size:1.5em; line-height: 1.5em" class="glyphicon glyphicon-remove"></span></a></li></ul></div></div></div></div><div ng-if="edit.selectedMetaRules.subject_categories.length === 0"></div></div><div class="col-md-4"><div ng-if="edit.selectedMetaRules.object_categories.length > 0"><div class="row"><div ng-if="!edit.data.loadingObjects"><label for="objectsList" class="col-sm-3 control-label" data-translate="moon.policy.rules.edit.action.add.categories.object" data-translate-values="{ number: edit.selectedMetaRules.object_categories.length }">Select Object(s)</label><div class="col-sm-7"><ui-select ng-model="edit.selectedObject" name="objectsList" id="objectsList" required><ui-select-match placeholder="(None)" ng-bind="$select.selected.value.name"></ui-select-match><ui-select-choices repeat="aObject in edit.data.objectsToBeSelected"><div ng-value="aObject" ng-bind="aObject.value.name"></div></ui-select-choices></ui-select><div class="help-block" ng-show="edit.form.objectsList.$dirty && edit.form.objectsList.$invalid || !edit.numberOfSelectedObjecttValid"><small class="error" ng-show="edit.form.objectsList.$error.required || !edit.numberOfSelectedObjecttValid" data-translate="moon.policy.rules.edit.action.add.check.object.required" data-translate-values="{ number: edit.selectedMetaRules.object_categories.length }">Some objects are required</small></div></div><div class="col-sm-2 text-center"><a href="" ng-if="edit.selectedObject && !edit.isNumberSelectedDataAtMaximum(edit.data.objectCST)" ng-click="edit.addDataToRules(edit.data.objectCST)"><span style="font-size:1.5em; line-height: 1.5em;" class="glyphicon glyphicon-plus-sign"></span></a></div></div><div ng-if="edit.data.loadingObjects"><moon-loader></moon-loader></div></div><div class="row" ng-if="!edit.data.loadingObjects"><div class="form-group"><label class="col-sm-3 control-label" data-translate="moon.policy.rules.edit.action.add.selectedObjects">Selected Objcet(s)</label><div class="col-sm-6"><ul><li ng-repeat="(key, value) in edit.data.selectedObjectsList"><span ng-bind="value.value.name"></span> <a href="" ng-click="edit.removeSelectedDataFromRules(value, edit.data.objectCST)"><span style="font-size:1.5em; line-height: 1.5em" class="glyphicon glyphicon-remove"></span></a></li></ul></div></div></div></div><div ng-if="edit.selectedMetaRules.object_categories.length === 0"></div></div><div class="col-md-4"><div ng-if="edit.selectedMetaRules.action_categories.length > 0"><div class="row"><div ng-if="!edit.data.loadingActions"><label for="actionsList" class="col-sm-3 control-label" data-translate="moon.policy.rules.edit.action.add.categories.action" data-translate-values="{ number: edit.selectedMetaRules.action_categories.length }">Select Action(s)</label><div class="col-sm-7"><ui-select ng-model="edit.selectedAction" name="actionsList" id="actionsList" required><ui-select-match placeholder="(None)" ng-bind="$select.selected.value.name"></ui-select-match><ui-select-choices repeat="aAction in edit.data.actionsToBeSelected"><div ng-value="aAction" ng-bind="aAction.value.name"></div></ui-select-choices></ui-select><div class="help-block" ng-show="edit.form.actionsList.$dirty && edit.form.actionsList.$invalid || !edit.numberOfSelectedActionsValid"><small class="error" ng-show="edit.form.actionsList.$error.required || !edit.numberOfSelectedActionsValid" data-translate="moon.policy.rules.edit.action.add.check.action.required" data-translate-values="{ number: edit.selectedMetaRules.action_categories.length }">Some action are required</small></div></div><div class="col-sm-2 text-center"><a href="" ng-if="edit.selectedAction && !edit.isNumberSelectedDataAtMaximum(edit.data.actionCST)" ng-click="edit.addDataToRules(edit.data.actionCST)"><span style="font-size:1.5em; line-height: 1.5em;" class="glyphicon glyphicon-plus-sign"></span></a></div></div><div ng-if="edit.data.loadingActions"><moon-loader></moon-loader></div></div><div class="row" ng-if="!edit.data.loadingActions"><div class="form-group"><label class="col-sm-3 control-label" data-translate="moon.policy.rules.edit.action.add.selectedActions">Selected Action(s)</label><div class="col-sm-6"><ul><li ng-repeat="(key, value) in edit.data.selectedActionsList"><span ng-bind="value.value.name"></span> <a href="" ng-click="edit.removeSelectedDataFromRules(value, edit.data.actionCST)"><span style="font-size:1.5em; line-height: 1.5em" class="glyphicon glyphicon-remove"></span></a></li></ul></div></div></div></div><div ng-if="edit.selectedMetaRules.action_categories.length === 0"></div></div></div><div class="form-group" ng-class="{'has-error': edit.form.instructions.$invalid && edit.form.instructions.$dirty || !edit.instructionsValid}"><label for="instructions" class="col-sm-3 control-label" data-translate="moon.policy.rules.edit.action.add.instructions">Instruction</label><div class="col-sm-6"><textarea id="instructions" name="instructions" class="form-control" ng-model="edit.rules.instructions" rows="6" required></textarea><div class="help-block" ng-show="edit.form.instructions.$dirty && edit.form.instructions.$invalid || !edit.instructionsValid "><small class="error" data-translate="moon.policy.rules.edit.action.add.check.instructions.required">An instructions is required</small></div></div></div><div class="form-group"><div class="pull-right"><a href="" ng-disabled="edit.loading" ng-click="edit.create()" class="btn btn-warning"><span class="glyphicon glyphicon-save"></span> <span data-translate="moon.policy.rules.edit.action.create">Create</span></a><moon-loader ng-if="edit.loading"></moon-loader></div></div></div></form></div></div> \ No newline at end of file
diff --git a/moon_gui/delivery/html/policy/edit/parameter/rules/rules-list.tpl.html b/moon_gui/delivery/html/policy/edit/parameter/rules/rules-list.tpl.html
index 98669f6f..25cfe6f1 100644
--- a/moon_gui/delivery/html/policy/edit/parameter/rules/rules-list.tpl.html
+++ b/moon_gui/delivery/html/policy/edit/parameter/rules/rules-list.tpl.html
@@ -1 +1 @@
-<div><div class="panel panel-default"><div class="panel-heading"><h4 data-translate="moon.policy.rules.edit.title">List of associated Subjects</h4></div><div class="panel-body"><div class="table-responsive" data-role="table"><table class="table table-striped table-hover" ng-table="list.table"><thead><tr><th class="customTables sortable" ng-class="{ 'sort-asc': list.table.isSortBy('description', 'asc'), 'sort-desc': list.table.isSortBy('description', 'desc') }" ng-click="list.table.sorting('description', list.table.isSortBy('description', 'asc') ? 'desc' : 'asc')"><div data-translate="moon.policy.rules.list.table.metaRule">Meta Rule</div></th><th class="customTables sortable"><div data-translate="moon.policy.rules.list.table.rule">Rule</div></th><th class="customTables sortable"><div data-translate="moon.policy.rules.list.table.instructions">Instruction</div></th><th class="customTables sortable"><div data-translate="moon.policy.rules.list.table.action.title">Actions</div></th></tr></thead><moon-loader ng-if="list.loadingRules"></moon-loader><tbody ng-if="!list.loadingRules && !list.hasRules()"><tr><td colspan="4"><span data-translate="moon.policy.rules.list.table.notFound">There is no Rules</span></td></tr></tbody><tbody ng-if="!list.loadingRules && list.hasRules()"><tr ng-repeat="aRule in $data | filter:list.search.find | orderBy:sort:reverse"><td><span ng-if="!list.getMetaRuleFromRule(aRule)"><moon-loader ng-if="!list.getMetaRuleFromRule(aRule)"></moon-loader><em data-translate="moon.policy.rules.list.table.loading.metaRule">Loading </em></span><span ng-if="list.getMetaRuleFromRule(aRule)"><span ng-bind="aRule.meta_rule.name"></span></span></td><td><span ng-if="!list.getMetaRuleFromRule(aRule)"><moon-loader ng-if="!list.getMetaRuleFromRule(aRule)"></moon-loader><em data-translate="moon.policy.rules.list.table.loading.metaRule">Loading </em></span><span ng-if="list.getMetaRuleFromRule(aRule)" ng-repeat="(key, value) in aRule.rule"><span ng-if="!list.getCategoryFromRuleIndex(key, aRule)"><moon-loader ng-if="!list.getCategoryFromRuleIndex(key, aRule)"></moon-loader></span><span ng-if="list.getCategoryFromRuleIndex(key, aRule)"><span ng-if="aRule.rule_value[key].category.name" ng-bind="aRule.rule_value[key].category.name"></span> <span ng-if="aRule.rule_value[key].category.value.name" ng-bind="aRule.rule_value[key].category.value.name"></span> <span ng-if="key < aRule.rule.length-1">,</span></span></span></td><td><pre ng-bind="aRule.instructions | json "></pre></td><td><a href="" ng-if="!aRule.loader" ng-click="list.deleteRules(aRule)"><span class="glyphicon glyphicon-transfer"></span> <span class="control-label" data-translate="moon.policy.rules.list.table.action.delete">Delete</span></a><div ng-if="aRule.loader"><moon-loader></moon-loader></div></td></tr></tbody></table></div></div></div><div ng-if="list.editMode" class="panel panel-default"><div class="panel-heading"><h4 data-translate="moon.policy.rules.edit.action.add.title">Add a Rules</h4></div><div class="panel-body">.<moon-rules-edit policy="list.policy"></moon-rules-edit></div></div></div> \ No newline at end of file
+<div><div class="panel panel-default"><div class="panel-heading"><h4 data-translate="moon.policy.rules.edit.title">List of associated Subjects</h4></div><div class="panel-body"><div class="table-responsive" data-role="table"><table class="table table-striped table-hover" ng-table="list.table"><thead><tr><th class="customTables sortable" ng-class="{ 'sort-asc': list.table.isSortBy('description', 'asc'), 'sort-desc': list.table.isSortBy('description', 'desc') }" ng-click="list.table.sorting('description', list.table.isSortBy('description', 'asc') ? 'desc' : 'asc')"><div data-translate="moon.policy.rules.list.table.metaRule">Meta Rule</div></th><th class="customTables sortable"><div data-translate="moon.policy.rules.list.table.rule">Rule</div></th><th class="customTables sortable"><div data-translate="moon.policy.rules.list.table.instructions">Instruction</div></th><th class="customTables sortable"><div data-translate="moon.policy.rules.list.table.action.title">Actions</div></th></tr></thead><moon-loader ng-if="list.loadingRules"></moon-loader><tbody ng-if="!list.loadingRules && !list.hasRules()"><tr><td colspan="4"><span data-translate="moon.policy.rules.list.table.notFound">There is no Rules</span></td></tr></tbody><tbody ng-if="!list.loadingRules && list.hasRules()"><tr ng-repeat="aRule in $data | filter:list.search.find | orderBy:sort:reverse"><td><span ng-if="!list.getMetaRuleFromRule(aRule)"><moon-loader ng-if="!list.getMetaRuleFromRule(aRule)"></moon-loader><em data-translate="moon.policy.rules.list.table.loading.metaRule">Loading </em></span><span ng-if="list.getMetaRuleFromRule(aRule)"><span ng-bind="aRule.meta_rule.name"></span></span></td><td><span ng-if="!list.getMetaRuleFromRule(aRule)"><moon-loader ng-if="!list.getMetaRuleFromRule(aRule)"></moon-loader><em data-translate="moon.policy.rules.list.table.loading.metaRule">Loading </em></span><span ng-if="list.getMetaRuleFromRule(aRule)" ng-repeat="(key, value) in aRule.rule"><span ng-if="!list.getCategoryFromRuleIndex(key, aRule)"><moon-loader ng-if="!list.getCategoryFromRuleIndex(key, aRule)"></moon-loader></span><span ng-if="list.getCategoryFromRuleIndex(key, aRule)"><span ng-if="aRule.rule_value[key].category.name" ng-bind="aRule.rule_value[key].category.name"></span> <span ng-if="aRule.rule_value[key].category.value.name" ng-bind="aRule.rule_value[key].category.value.name"></span> <span ng-if="key < aRule.rule.length-1">,</span></span></span></td><td><pre ng-bind="aRule.instructions | json "></pre></td><td><a href="" ng-if="!aRule.loader" ng-click="list.deleteRules(aRule)"><span class="glyphicon glyphicon-transfer"></span> <span class="control-label" data-translate="moon.policy.rules.list.table.action.delete">Delete</span></a><div ng-if="aRule.loader"><moon-loader></moon-loader></div></td></tr></tbody></table></div></div></div><div ng-if="list.editMode" class="panel panel-default"><div class="panel-heading"><h4 data-translate="moon.policy.rules.edit.action.add.title">Add a Rule</h4></div><div class="panel-body">.<moon-rules-edit policy="list.policy"></moon-rules-edit></div></div></div> \ No newline at end of file
diff --git a/moon_gui/delivery/html/policy/edit/policy-edit.tpl.html b/moon_gui/delivery/html/policy/edit/policy-edit.tpl.html
index 0e4525f7..f32497a2 100644
--- a/moon_gui/delivery/html/policy/edit/policy-edit.tpl.html
+++ b/moon_gui/delivery/html/policy/edit/policy-edit.tpl.html
@@ -1,13 +1,13 @@
-<div class="container"><div class="row"><h3 class="pull-left" data-translate="moon.policy.edit.title" data-translate-values="{ policyName: edit.policy.name }">Edit</h3></div><div class="panel panel-default"><div class="panel-heading"><span data-translate="moon.policy.edit.basic.title">Basic Information</span> <a href="" ng-click="edit.editBasic = !edit.editBasic"><span data-translate="moon.policy.edit.update">Update</span> <span class="glyphicon glyphicon-cog"></span></a></div><div class="panel-body"><div ng-if="edit.editBasic"><moon-policy-edit-basic policy="edit.policy"></moon-policy-edit-basic></div><div ng-if="!edit.editBasic"><dl class="dl-horizontal"><dt data-translate="moon.policy.edit.basic.form.id">Id</dt><dd ng-bind="edit.policy.id"></dd><dt data-translate="moon.policy.edit.basic.form.name">Name</dt><dd ng-bind="edit.policy.name"></dd><dt data-translate="moon.policy.edit.basic.form.genre">Genre</dt><dd ng-bind="edit.policy.genre"></dd><dt data-translate="moon.policy.edit.basic.form.model">Model</dt><dd><span ng-if="edit.loadingModel"><moon-loader ng-if="edit.loadingModel"></moon-loader></span><span ng-if="!edit.loadingModel"><span ng-bind="edit.policy.model.name"></span></span></dd><dt data-translate="moon.policy.edit.basic.form.description">Description</dt><dd ng-bind="edit.policy.description"></dd></dl></div></div></div><div class="panel panel-default"><div class="panel-heading"><span data-translate="moon.policy.edit.perimeter.title">Perimeters</span> <a href="" ng-click="edit.showPerimeters = !edit.showPerimeters"><span ng-if="!edit.showPerimeters"><span data-translate="moon.policy.edit.show.open">Show</span> <span class="glyphicon glyphicon-eye-open"></span> </span><span ng-if="edit.showPerimeters"><span data-translate="moon.policy.edit.show.close">Show</span> <span class="glyphicon glyphicon-eye-close"></span> </span></a><!--<a href="" ng-if="edit.showPerimeters">
+<div class="container"><div class="row"><h3 class="pull-left" data-translate="moon.policy.edit.title" data-translate-values="{ policyName: edit.policy.name }">Edit</h3></div><div class="panel panel-default"><div class="panel-heading"><span data-translate="moon.policy.edit.basic.title">Basic Information</span> <a href="" ng-click="edit.editBasic = !edit.editBasic"><span data-translate="moon.policy.edit.update">Update</span> <span class="glyphicon glyphicon-cog"></span></a></div><div class="panel-body"><div ng-if="edit.editBasic"><moon-policy-edit-basic policy="edit.policy"></moon-policy-edit-basic></div><div ng-if="!edit.editBasic"><dl class="dl-horizontal"><dt data-translate="moon.policy.edit.basic.form.id">Id</dt><dd ng-bind="edit.policy.id"></dd><dt data-translate="moon.policy.edit.basic.form.name">Name</dt><dd ng-bind="edit.policy.name"></dd><dt data-translate="moon.policy.edit.basic.form.genre">Genre</dt><dd ng-bind="edit.policy.genre"></dd><dt data-translate="moon.policy.edit.basic.form.model">Model</dt><dd><span ng-if="edit.loadingModel"><moon-loader ng-if="edit.loadingModel"></moon-loader></span><span ng-if="!edit.loadingModel"><span ng-bind="edit.policy.model.name"></span></span></dd><dt data-translate="moon.policy.edit.basic.form.description">Description</dt><dd ng-bind="edit.policy.description"></dd></dl></div></div></div><div class="panel panel-default"><div class="panel-heading"><span data-translate="moon.policy.edit.perimeter.title">Perimeters</span> <a href="" ng-click="edit.showPart('showPerimeters')"><span ng-if="!edit.showPerimeters"><span data-translate="moon.policy.edit.show.open">Show</span> <span class="glyphicon glyphicon-eye-open"></span> </span><span ng-if="edit.showPerimeters"><span data-translate="moon.policy.edit.show.close">Show</span> <span class="glyphicon glyphicon-eye-close"></span> </span></a><!--<a href="" ng-if="edit.showPerimeters">
<span data-translate="moon.policy.edit.update">Update</span>
<span class="glyphicon glyphicon-cog"></span>
- </a>--></div><div class="panel-body" ng-if="edit.showPerimeters"><moon-perimeter-list edit-mode="true" policy="edit.policy"></moon-perimeter-list></div></div><div class="panel panel-default"><div class="panel-heading"><span data-translate="moon.policy.edit.data.title">Data</span> <a href="" ng-click="edit.showData = !edit.showData"><span ng-if="!edit.showData"><span data-translate="moon.policy.edit.show.open">Show</span> <span class="glyphicon glyphicon-eye-open"></span> </span><span ng-if="edit.showData"><span data-translate="moon.policy.edit.show.close">Show</span> <span class="glyphicon glyphicon-eye-close"></span> </span></a><!--<a href="" ng-if="edit.showData">
+ </a>--></div><div class="panel-body" ng-if="edit.showPerimeters"><moon-perimeter-list edit-mode="true" policy="edit.policy"></moon-perimeter-list></div></div><div class="panel panel-default"><div class="panel-heading"><span data-translate="moon.policy.edit.data.title">Data</span> <a href="" ng-click="edit.showPart('showData')"><span ng-if="!edit.showData"><span data-translate="moon.policy.edit.show.open">Show</span> <span class="glyphicon glyphicon-eye-open"></span> </span><span ng-if="edit.showData"><span data-translate="moon.policy.edit.show.close">Show</span> <span class="glyphicon glyphicon-eye-close"></span> </span></a><!--<a href="" ng-if="edit.showData">
<span data-translate="moon.policy.edit.update">Update</span>
<span class="glyphicon glyphicon-cog"></span>
- </a>--></div><div class="panel-body" ng-if="edit.showData"><!-- --><moon-data-list edit-mode="true" policy="edit.policy"></moon-data-list></div></div><div class="panel panel-default"><div class="panel-heading"><span data-translate="moon.policy.edit.rules.title">Rules</span> <a href="" ng-click="edit.showRules = !edit.showRules"><span ng-if="!edit.showRules"><span data-translate="moon.policy.edit.show.open">Show</span> <span class="glyphicon glyphicon-eye-open"></span> </span><span ng-if="edit.showRules"><span data-showrules="moon.policy.edit.show.close">Close</span> <span class="glyphicon glyphicon-eye-close"></span> </span></a><!--<a href="" ng-if="edit.showRules">
+ </a>--></div><div class="panel-body" ng-if="edit.showData"><!-- --><moon-data-list edit-mode="true" policy="edit.policy"></moon-data-list></div></div><div class="panel panel-default"><div class="panel-heading"><span data-translate="moon.policy.edit.rules.title">Rules</span> <a href="" ng-click="edit.showPart('showRules')"><span ng-if="!edit.showRules"><span data-translate="moon.policy.edit.show.open">Show</span> <span class="glyphicon glyphicon-eye-open"></span> </span><span ng-if="edit.showRules"><span data-showrules="moon.policy.edit.show.close">Close</span> <span class="glyphicon glyphicon-eye-close"></span> </span></a><!--<a href="" ng-if="edit.showRules">
<span data-translate="moon.policy.edit.update">Update</span>
<span class="glyphicon glyphicon-cog"></span>
- </a>--></div><div class="panel-body" ng-if="edit.showRules"><moon-rules-list edit-mode="true" policy="edit.policy"></moon-rules-list></div></div><div class="panel panel-default"><div class="panel-heading"><span data-translate="moon.policy.edit.assignments.title">Assignments</span> <a href="" ng-click="edit.showAssignments = !edit.showAssignments"><span ng-if="!edit.showAssignments"><span data-translate="moon.policy.edit.show.open">Show</span> <span class="glyphicon glyphicon-eye-open"></span> </span><span ng-if="edit.showAssignments"><span data-showrules="moon.policy.edit.show.close">Close</span> <span class="glyphicon glyphicon-eye-close"></span> </span></a><!--<a href="" ng-if="edit.showRules">
+ </a>--></div><div class="panel-body" ng-if="edit.showRules"><moon-rules-list edit-mode="true" policy="edit.policy"></moon-rules-list></div></div><div class="panel panel-default"><div class="panel-heading"><span data-translate="moon.policy.edit.assignments.title">Assignments</span> <a href="" ng-click="edit.showPart('showAssignments')"><span ng-if="!edit.showAssignments"><span data-translate="moon.policy.edit.show.open">Show</span> <span class="glyphicon glyphicon-eye-open"></span> </span><span ng-if="edit.showAssignments"><span data-showrules="moon.policy.edit.show.close">Close</span> <span class="glyphicon glyphicon-eye-close"></span> </span></a><!--<a href="" ng-if="edit.showRules">
<span data-translate="moon.policy.edit.update">Update</span>
<span class="glyphicon glyphicon-cog"></span>
</a>--></div><div class="panel-body" ng-if="edit.showAssignments"><moon-assignments-list edit-mode="true" policy="edit.policy"></moon-assignments-list></div></div></div> \ No newline at end of file
diff --git a/moon_gui/delivery/html/project/action/mapping/project-map.tpl.html b/moon_gui/delivery/html/project/action/mapping/project-map.tpl.html
index dd47853f..13cef98b 100644
--- a/moon_gui/delivery/html/project/action/mapping/project-map.tpl.html
+++ b/moon_gui/delivery/html/project/action/mapping/project-map.tpl.html
@@ -1 +1 @@
-<div ng-controller="ProjectMapController as map" class="modal" tabindex="-1" data-role="modalMappingProject"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.project.map.title" data-translate-values="{projectName: map.project.name}"></h4></div><div class="modal-body"><form class="form-horizontal" role="form" name="map.form"><div class="form-group" ng-class="{'has-error': map.form.pdp.$dirty && (map.form.pdp.$invalid || !map.selectedPDP)}"><label class="col-sm-3 control-label" data-translate="moon.project.map.form.pdp">PDP</label><div class="col-sm-6"><ui-select ng-model="map.selectedPDP" name="pdp" required><ui-select-match placeholder="(None)" ng-bind="$select.selected.name"></ui-select-match><ui-select-choices repeat="pdp in map.pdps"><div ng-bind="pdp.name" ng-value="pdp"></div></ui-select-choices></ui-select><img ng-if="map.pdpsLoading" src="assets/img/ajax-loader.gif"><div class="help-block" ng-show="map.form.pdp.$dirty && (map.form.pdp.$invalid || !map.selectedPDP)"><small class="error" ng-show="map.form.pdp.$error.required" data-translate="moon.project.map.check.pdp.required">PDP is required</small></div></div></div></form></div><div class="modal-footer"><div class="btn-toolbar" style="float: right"><a href="" ng-click="$hide()" class="btn btn-default"><span data-translate="moon.project.map.action.cancel">Cancel</span> </a><a href="" ng-disabled="map.mappingLoading" ng-click="map.map()" class="btn btn-warning"><span class="glyphicon glyphicon-link"></span> <span data-translate="moon.project.map.action.map">Map</span> </a><img ng-if="map.mappingLoading" src="assets/img/ajax-loader.gif"></div></div></div></div></div> \ No newline at end of file
+<div ng-controller="ProjectMapController as map" class="modal" tabindex="-1" data-role="modalMappingProject"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.project.map.title" data-translate-values="{projectName: map.project.name}"></h4></div><div class="modal-body"><form class="form-horizontal" role="form" name="map.form"><div class="form-group" ng-class="{'has-error': map.form.pdp.$dirty && (map.form.pdp.$invalid || !map.selectedPDP)}"><label class="col-sm-3 control-label" data-translate="moon.project.map.form.pdp">PDP</label><div class="col-sm-6"><ui-select ng-model="map.selectedPDP" name="pdp" required><ui-select-match placeholder="(None)" ng-bind="$select.selected.name"></ui-select-match><ui-select-choices repeat="pdp in map.pdps"><div ng-bind="pdp.name" ng-value="pdp"></div></ui-select-choices></ui-select><img ng-if="map.pdpsLoading" src="assets/img/ajax-loader.gif"><div class="help-block" ng-show="map.form.pdp.$dirty && (map.form.pdp.$invalid || !map.selectedPDP)"><small class="error" ng-show="map.form.pdp.$error.required" data-translate="moon.project.map.check.pdp.required">PDP is required</small></div></div></div></form></div><div class="modal-footer"><div class="btn-toolbar" style="float: right;"><a href="" ng-click="$hide()" class="btn btn-default"><span data-translate="moon.project.map.action.cancel">Cancel</span> </a><a href="" ng-disabled="map.mappingLoading" ng-click="map.map()" class="btn btn-warning"><span class="glyphicon glyphicon-link"></span> <span data-translate="moon.project.map.action.map">Map</span> </a><img ng-if="map.mappingLoading" src="assets/img/ajax-loader.gif"></div></div></div></div></div> \ No newline at end of file
diff --git a/moon_gui/delivery/html/project/action/mapping/project-unmap.tpl.html b/moon_gui/delivery/html/project/action/mapping/project-unmap.tpl.html
index bde6982e..735011a9 100644
--- a/moon_gui/delivery/html/project/action/mapping/project-unmap.tpl.html
+++ b/moon_gui/delivery/html/project/action/mapping/project-unmap.tpl.html
@@ -1 +1 @@
-<div ng-controller="ProjectUnMapController as unmap" class="modal" tabindex="-1" data-role="modalUnmapProject"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.project.unmap.title"></h4></div><div class="modal-body"><span data-translate="moon.project.unmap.content" data-translate-values="{ projectName: unmap.project.name, pdpName: unmap.project.mapping.authz.pdp.name }"></span></div><div class="modal-footer"><div class="btn-toolbar" style="float: right"><a href="" ng-click="$hide()" class="btn btn-default"><span data-translate="moon.project.unmap.action.cancel">Cancel</span> </a><a href="" ng-disabled="unmap.unMappingLoading" ng-click="unmap.unmap()" class="btn btn-warning"><span class="glyphicon glyphicon-transfer"></span> <span data-translate="moon.project.unmap.action.unmap">Unmap</span> </a><img ng-if="unmap.unMappingLoading" src="assets/img/ajax-loader.gif"></div></div></div></div></div> \ No newline at end of file
+<div ng-controller="ProjectUnMapController as unmap" class="modal" tabindex="-1" data-role="modalUnmapProject"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.project.unmap.title"></h4></div><div class="modal-body"><span data-translate="moon.project.unmap.content" data-translate-values="{ projectName: unmap.project.name, pdpName: unmap.project.mapping.authz.pdp.name }"></span></div><div class="modal-footer"><div class="btn-toolbar" style="float: right;"><a href="" ng-click="$hide()" class="btn btn-default"><span data-translate="moon.project.unmap.action.cancel">Cancel</span> </a><a href="" ng-disabled="unmap.unMappingLoading" ng-click="unmap.unmap()" class="btn btn-warning"><span class="glyphicon glyphicon-transfer"></span> <span data-translate="moon.project.unmap.action.unmap">Unmap</span> </a><img ng-if="unmap.unMappingLoading" src="assets/img/ajax-loader.gif"></div></div></div></div></div> \ No newline at end of file
diff --git a/moon_gui/delivery/html/project/action/project-add.tpl.html b/moon_gui/delivery/html/project/action/project-add.tpl.html
index 612aa9b5..4db03982 100644
--- a/moon_gui/delivery/html/project/action/project-add.tpl.html
+++ b/moon_gui/delivery/html/project/action/project-add.tpl.html
@@ -1 +1 @@
-<div ng-controller="ProjectAddController as add" class="modal" tabindex="-1" data-role="modalAddProject"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.project.add.title"></h4></div><div class="modal-body"><form class="form-horizontal" role="form" name="add.form"><div class="form-group" ng-class="{'has-error': add.form.name.$invalid && add.form.name.$dirty}"><label for="name" class="col-sm-3 control-label" data-translate="moon.project.add.form.name">Name</label><div class="col-sm-6"><input name="name" id="name" class="form-control" type="text" data-ng-model="add.project.project.name" required><div class="help-block" ng-show="add.form.name.$dirty && add.form.name.$invalid"><small class="error" ng-show="add.form.name.$error.required" data-translate="moon.project.add.check.name.required">Name is required</small></div></div></div><div class="form-group"><label for="description" class="col-sm-3 control-label" data-translate="moon.project.add.form.description">Description</label><div class="col-sm-6"><textarea id="description" name="description" class="form-control" data-ng-model="add.project.project.description"></textarea></div></div><div class="form-group"><label for="enabled" class="col-sm-3 control-label" data-translate="moon.project.add.form.enabled">Enabled</label><div class="col-sm-6"><div class="radio"><input type="checkbox" id="enabled" name="enabled" class="js-switch" data-ng-model="add.project.project.enabled" ui-switch></div></div></div><div class="form-group" ng-class="{'has-error': add.form.domain.$invalid && add.form.domain.$dirty}"><label for="domain" class="col-sm-3 control-label" data-translate="moon.project.add.form.domain">Domain</label><div class="col-sm-6"><input name="domain" id="domain" type="text" class="form-control" data-ng-model="add.project.project.domain" required><div class="help-block" ng-show="add.form.domain.$dirty && add.form.domain.$invalid"><small class="error" ng-show="add.form.domain.$error.required" data-translate="moon.project.add.check.domain.required">Domain is required</small></div></div></div></form></div><div class="modal-footer"><div class="btn-toolbar" style="float: right"><a href="" ng-click="$hide()" class="btn btn-default"><span data-translate="moon.project.add.action.cancel">Cancel</span> </a><a href="" ng-disabled="add.loading" ng-click="add.create()" class="btn btn-warning"><span class="glyphicon glyphicon-save"></span> <span data-translate="moon.project.add.action.create">Create</span> </a><img ng-if="add.loading" src="assets/img/ajax-loader.gif"></div></div></div></div></div> \ No newline at end of file
+<div ng-controller="ProjectAddController as add" class="modal" tabindex="-1" data-role="modalAddProject"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.project.add.title"></h4></div><div class="modal-body"><form class="form-horizontal" role="form" name="add.form"><div class="form-group" ng-class="{'has-error': add.form.name.$invalid && add.form.name.$dirty}"><label for="name" class="col-sm-3 control-label" data-translate="moon.project.add.form.name">Name</label><div class="col-sm-6"><input name="name" id="name" class="form-control" type="text" data-ng-model="add.project.project.name" required><div class="help-block" ng-show="add.form.name.$dirty && add.form.name.$invalid"><small class="error" ng-show="add.form.name.$error.required" data-translate="moon.project.add.check.name.required">Name is required</small></div></div></div><div class="form-group"><label for="description" class="col-sm-3 control-label" data-translate="moon.project.add.form.description">Description</label><div class="col-sm-6"><textarea id="description" name="description" class="form-control" data-ng-model="add.project.project.description"></textarea></div></div><div class="form-group"><label for="enabled" class="col-sm-3 control-label" data-translate="moon.project.add.form.enabled">Enabled</label><div class="col-sm-6"><div class="radio"><input type="checkbox" id="enabled" name="enabled" class="js-switch" data-ng-model="add.project.project.enabled" ui-switch></div></div></div><div class="form-group" ng-class="{'has-error': add.form.domain.$invalid && add.form.domain.$dirty}"><label for="domain" class="col-sm-3 control-label" data-translate="moon.project.add.form.domain">Domain</label><div class="col-sm-6"><input name="domain" id="domain" type="text" class="form-control" data-ng-model="add.project.project.domain" required><div class="help-block" ng-show="add.form.domain.$dirty && add.form.domain.$invalid"><small class="error" ng-show="add.form.domain.$error.required" data-translate="moon.project.add.check.domain.required">Domain is required</small></div></div></div></form></div><div class="modal-footer"><div class="btn-toolbar" style="float: right;"><a href="" ng-click="$hide()" class="btn btn-default"><span data-translate="moon.project.add.action.cancel">Cancel</span> </a><a href="" ng-disabled="add.loading" ng-click="add.create()" class="btn btn-warning"><span class="glyphicon glyphicon-save"></span> <span data-translate="moon.project.add.action.create">Create</span> </a><img ng-if="add.loading" src="assets/img/ajax-loader.gif"></div></div></div></div></div> \ No newline at end of file
diff --git a/moon_gui/delivery/html/project/action/project-delete.tpl.html b/moon_gui/delivery/html/project/action/project-delete.tpl.html
index a3a2d3e4..867a6674 100644
--- a/moon_gui/delivery/html/project/action/project-delete.tpl.html
+++ b/moon_gui/delivery/html/project/action/project-delete.tpl.html
@@ -1 +1 @@
-<div ng-controller="ProjectDeleteController as del" class="modal" tabindex="-1" data-role="modalDeleteProject"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.project.remove.title"></h4></div><div class="modal-body"><p><span data-translate="moon.project.remove.content.query" data-translate-values="{ projectName: del.project.name }"></span></p><p ng-if="del.loadingPDP"><img src="assets/img/ajax-loader.gif"></p><div ng-if="!del.loadingPDP"><p ng-if="!del.isProjectMapped()"><span data-translate="moon.project.remove.content.isNotMapped">This Project is not map with any PDP</span></p><p ng-if="del.isProjectMapped()"><span data-translate="moon.project.remove.content.isMapped" data-translate-values="{ pdpName: del.project.pdp.name }"></span></p></div></div><div class="modal-footer"><div class="btn-toolbar" style="float: right"><a href="" ng-click="$hide()" class="btn btn-default"><span data-translate="moon.project.remove.action.cancel">Cancel</span> </a><a href="" ng-disabled="del.loading || del.loadingPDP" ng-click="del.remove()" class="btn btn-warning"><span class="glyphicon glyphicon-trash"></span> <span data-translate="moon.project.remove.action.delete">Delete</span> </a><img ng-if="del.loading" src="assets/img/ajax-loader.gif"></div></div></div></div></div> \ No newline at end of file
+<div ng-controller="ProjectDeleteController as del" class="modal" tabindex="-1" data-role="modalDeleteProject"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.project.remove.title"></h4></div><div class="modal-body"><p><span data-translate="moon.project.remove.content.query" data-translate-values="{ projectName: del.project.name }"></span></p><p ng-if="del.loadingPDP"><img src="assets/img/ajax-loader.gif"></p><div ng-if="!del.loadingPDP"><p ng-if="!del.isProjectMapped()"><span data-translate="moon.project.remove.content.isNotMapped">This Project is not map with any PDP</span></p><p ng-if="del.isProjectMapped()"><span data-translate="moon.project.remove.content.isMapped" data-translate-values="{ pdpName: del.project.pdp.name }"></span></p></div></div><div class="modal-footer"><div class="btn-toolbar" style="float: right;"><a href="" ng-click="$hide()" class="btn btn-default"><span data-translate="moon.project.remove.action.cancel">Cancel</span> </a><a href="" ng-disabled="del.loading || del.loadingPDP" ng-click="del.remove()" class="btn btn-warning"><span class="glyphicon glyphicon-trash"></span> <span data-translate="moon.project.remove.action.delete">Delete</span> </a><img ng-if="del.loading" src="assets/img/ajax-loader.gif"></div></div></div></div></div> \ No newline at end of file
diff --git a/moon_gui/delivery/html/project/action/project-view.tpl.html b/moon_gui/delivery/html/project/action/project-view.tpl.html
index b2bd975b..157eec80 100644
--- a/moon_gui/delivery/html/project/action/project-view.tpl.html
+++ b/moon_gui/delivery/html/project/action/project-view.tpl.html
@@ -1 +1 @@
-<div ng-controller="ProjectViewController as view" class="modal" tabindex="-1" data-role="modalViewProject"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.project.view.title" data-translate-values="{projectName: view.project.name}"></h4></div><div class="modal-body"><dl class="dl-horizontal"><dt>Id</dt><dd ng-bind="view.project.id"></dd><dt>Name</dt><dd ng-bind="view.project.name"></dd><dt>Is_domain</dt><dd ng-bind="view.project.is_domain"></dd><dt>Link</dt><dd ng-bind="view.project.links.self"></dd><dt>enabled</dt><dd ng-bind="view.project.enabled"></dd><dt>Parent id</dt><dd ng-bind="view.project.parent_id"></dd><dt>Domain id</dt><dd ng-bind="view.project.domain_id"></dd><dt>Description</dt><dd ng-bind="view.project.description"></dd></dl></div><!--<div class="modal-body">--><!----><!--&lt;!&ndash; objects &ndash;&gt;--><!----><!--<div class="row">--><!--<div class="col-md-12">--><!--<h1 class="pull-left" data-translate="moon.project.view.object.title">Objects</h1>--><!--</div>--><!--</div>--><!----><!--<div class="row top05">--><!--<div class="col-md-3"><label data-translate="moon.project.view.object.name">Name</label></div>--><!--<div class="col-md-7"><label data-translate="moon.project.view.object.description">Description</label></div>--><!--<div class="col-md-2"><label data-translate="moon.project.view.object.enabled">Enabled</label></div>--><!--</div>--><!----><!--<div class="row" ng-if="view.objectsLoading">--><!--<div class="col-md-12"><img src="assets/img/ajax-loader.gif" /> <em data-translate="moon.project.view.object.loading">Loading Objects</em></div>--><!--</div>--><!----><!--<div class="row" ng-if="!view.objectsLoading && !view.hasObjects()">--><!--<div class="col-md-12" data-translate="moon.project.view.object.notFound">Objects not found</div>--><!--</div>--><!----><!--<div class="row" ng-if="!view.objectsLoading && view.hasObjects()" ng-repeat="object in view.objects">--><!--<div class="col-md-3">{{object.name}}</div> --><!--<div class="col-md-7">{{object.description}}</div>--><!--<div class="col-md-2">--><!--<span ng-if="object.enabled" class="glyphicon glyphicon-ok"></span>--><!--</div>--><!--</div>--><!----><!--&lt;!&ndash; subjects &ndash;&gt;--><!----><!--<div class="row top10">--><!--<div class="col-md-12">--><!--<h1 class="pull-left" data-translate="moon.project.view.subject.title">Subjects</h1>--><!--</div>--><!--</div>--><!----><!--<div class="row top05">--><!--<div class="col-md-3"><label data-translate="moon.project.view.subject.name">Name</label></div>--><!--<div class="col-md-3"><label data-translate="moon.project.view.subject.domain">Domain</label></div>--><!--<div class="col-md-4"><label data-translate="moon.project.view.subject.mail">Mail</label></div>--><!--<div class="col-md-2"><label data-translate="moon.project.view.subject.enabled">Enabled</label></div>--><!--</div>--><!----><!--<div class="row">--><!--<div class="col-md-3">--><!--<ui-select ng-model="view.selectedSubject" on-select="view.resolveRoles($item); view.resolveGroups($item)">--><!--<ui-select-match placeholder="(None)">{{$select.selected.name}}</ui-select-match>--><!--<ui-select-choices repeat="subject in view.subjects">--><!--<div ng-value="subject">{{subject.name}}</div>--><!--</ui-select-choices>--><!--</ui-select>--><!--<img ng-if="view.subjectsLoading" src="assets/img/ajax-loader.gif" />--><!--</div> --><!--<div class="col-md-3">{{view.selectedSubject.domain}}</div>--><!--<div class="col-md-4">{{view.selectedSubject.mail}}</div>--><!--<div class="col-md-2">--><!--<div ng-if="view.selectedSubject != null">--><!--<span ng-if="view.selectedSubject.enabled" class="glyphicon glyphicon-ok"></span>--><!--</div>--><!--</div>--><!--</div>--><!----><!--&lt;!&ndash; roles &ndash;&gt;--><!----><!--<div ng-if="view.hasSelectedSubject()">--><!----><!--<div class="row top10">--><!--<div class="col-md-12">--><!--<h1 class="pull-left" data-translate="moon.project.view.role.title">Roles</h1>--><!--</div>--><!--</div>--><!----><!--<div class="row top05">--><!----><!--<div class="col-md-3"><label data-translate="moon.project.view.role.value">Value</label></div>--><!--<div class="col-md-5"><label data-translate="moon.project.view.role.description">Description</label></div>--><!--<div class="col-md-2"><label data-translate="moon.project.view.role.assigned">Assigned</label></div>--><!--<div class="col-md-2"><label data-translate="moon.project.view.role.enabled">Enabled</label></div>--><!----><!--</div>--><!----><!--<div class="row" ng-if="view.rolesLoading">--><!--<div class="col-md-12"><img src="assets/img/ajax-loader.gif" /> <em data-translate="moon.project.view.role.loading">Loading Roles</em></div>--><!--</div>--><!----><!--<div class="row" ng-if="!view.rolesLoading && !view.hasRoles()">--><!--<div class="col-md-12" data-translate="moon.project.view.role.notFound">Roles not found</div>--><!--</div>--><!----><!--<div class="row" ng-if="!view.rolesLoading && view.hasRoles()" ng-repeat="role in view.roles">--><!----><!--<div class="col-md-3" ng-bind="role.value"></div>--><!--<div class="col-md-5" ng-bind="role.description"></div>--><!--<div class="col-md-2">--><!--<span ng-if="view.isRoleAssigned(role)" class="glyphicon glyphicon-ok"></span>--><!--</div>--><!--<div class="col-md-2">--><!--<span ng-if="role.enabled" class="glyphicon glyphicon-ok"></span>--><!--</div>--><!----><!--</div>--><!----><!--</div>--><!----><!--&lt;!&ndash; groups &ndash;&gt;--><!----><!--<div ng-if="view.hasSelectedSubject()">--><!----><!--<div class="row top10">--><!--<div class="col-md-12">--><!--<h1 class="pull-left" data-translate="moon.project.view.group.title">Groups</h1>--><!--</div>--><!--</div>--><!----><!--<div class="row top05">--><!----><!--<div class="col-md-3"><label data-translate="moon.project.view.group.value">Value</label></div>--><!--<div class="col-md-5"><label data-translate="moon.project.view.group.description">Description</label></div>--><!--<div class="col-md-2"><label data-translate="moon.project.view.group.assigned">Assigned</label></div>--><!--<div class="col-md-2"><label data-translate="moon.project.view.group.enabled">Enabled</label></div>--><!----><!--</div>--><!----><!--<div class="row" ng-if="view.groupsLoading">--><!--<div class="col-md-12"><img src="assets/img/ajax-loader.gif" /> <em data-translate="moon.project.view.group.loading">Loading Groups</em></div>--><!--</div>--><!----><!--<div class="row" ng-if="!view.groupsLoading && !view.hasGroups()">--><!--<div class="col-md-12" data-translate="moon.project.view.group.notFound">Groups not found</div>--><!--</div>--><!----><!--<div class="row" ng-if="!view.groupsLoading && view.hasGroups()" ng-repeat="group in view.groups">--><!----><!--<div class="col-md-3">{{group.value}}</div>--><!--<div class="col-md-5">{{group.description}}</div>--><!--<div class="col-md-2">--><!--<span ng-if="view.isGroupAssigned(group)" class="glyphicon glyphicon-ok"></span>--><!--</div>--><!--<div class="col-md-2">--><!--<span ng-if="group.enabled" class="glyphicon glyphicon-ok"></span>--><!--</div>--><!----><!--</div>--><!----><!--</div>--><!----><!--</div>--><!----><div class="modal-footer top10"><div class="btn-toolbar" style="float: right"><button ng-click="$hide()" class="btn btn-default" data-translate="moon.project.view.action.close">Close</button></div></div></div></div></div> \ No newline at end of file
+<div ng-controller="ProjectViewController as view" class="modal" tabindex="-1" data-role="modalViewProject"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" data-translate="moon.project.view.title" data-translate-values="{projectName: view.project.name}"></h4></div><div class="modal-body"><dl class="dl-horizontal"><dt>Id</dt><dd ng-bind="view.project.id"></dd><dt>Name</dt><dd ng-bind="view.project.name"></dd><dt>Is_domain</dt><dd ng-bind="view.project.is_domain"></dd><dt>Link</dt><dd ng-bind="view.project.links.self"></dd><dt>enabled</dt><dd ng-bind="view.project.enabled"></dd><dt>Parent id</dt><dd ng-bind="view.project.parent_id"></dd><dt>Domain id</dt><dd ng-bind="view.project.domain_id"></dd><dt>Description</dt><dd ng-bind="view.project.description"></dd></dl></div><!--<div class="modal-body">--><!----><!--&lt;!&ndash; objects &ndash;&gt;--><!----><!--<div class="row">--><!--<div class="col-md-12">--><!--<h1 class="pull-left" data-translate="moon.project.view.object.title">Objects</h1>--><!--</div>--><!--</div>--><!----><!--<div class="row top05">--><!--<div class="col-md-3"><label data-translate="moon.project.view.object.name">Name</label></div>--><!--<div class="col-md-7"><label data-translate="moon.project.view.object.description">Description</label></div>--><!--<div class="col-md-2"><label data-translate="moon.project.view.object.enabled">Enabled</label></div>--><!--</div>--><!----><!--<div class="row" ng-if="view.objectsLoading">--><!--<div class="col-md-12"><img src="assets/img/ajax-loader.gif" /> <em data-translate="moon.project.view.object.loading">Loading Objects</em></div>--><!--</div>--><!----><!--<div class="row" ng-if="!view.objectsLoading && !view.hasObjects()">--><!--<div class="col-md-12" data-translate="moon.project.view.object.notFound">Objects not found</div>--><!--</div>--><!----><!--<div class="row" ng-if="!view.objectsLoading && view.hasObjects()" ng-repeat="object in view.objects">--><!--<div class="col-md-3">{{object.name}}</div> --><!--<div class="col-md-7">{{object.description}}</div>--><!--<div class="col-md-2">--><!--<span ng-if="object.enabled" class="glyphicon glyphicon-ok"></span>--><!--</div>--><!--</div>--><!----><!--&lt;!&ndash; subjects &ndash;&gt;--><!----><!--<div class="row top10">--><!--<div class="col-md-12">--><!--<h1 class="pull-left" data-translate="moon.project.view.subject.title">Subjects</h1>--><!--</div>--><!--</div>--><!----><!--<div class="row top05">--><!--<div class="col-md-3"><label data-translate="moon.project.view.subject.name">Name</label></div>--><!--<div class="col-md-3"><label data-translate="moon.project.view.subject.domain">Domain</label></div>--><!--<div class="col-md-4"><label data-translate="moon.project.view.subject.mail">Mail</label></div>--><!--<div class="col-md-2"><label data-translate="moon.project.view.subject.enabled">Enabled</label></div>--><!--</div>--><!----><!--<div class="row">--><!--<div class="col-md-3">--><!--<ui-select ng-model="view.selectedSubject" on-select="view.resolveRoles($item); view.resolveGroups($item)">--><!--<ui-select-match placeholder="(None)">{{$select.selected.name}}</ui-select-match>--><!--<ui-select-choices repeat="subject in view.subjects">--><!--<div ng-value="subject">{{subject.name}}</div>--><!--</ui-select-choices>--><!--</ui-select>--><!--<img ng-if="view.subjectsLoading" src="assets/img/ajax-loader.gif" />--><!--</div> --><!--<div class="col-md-3">{{view.selectedSubject.domain}}</div>--><!--<div class="col-md-4">{{view.selectedSubject.mail}}</div>--><!--<div class="col-md-2">--><!--<div ng-if="view.selectedSubject != null">--><!--<span ng-if="view.selectedSubject.enabled" class="glyphicon glyphicon-ok"></span>--><!--</div>--><!--</div>--><!--</div>--><!----><!--&lt;!&ndash; roles &ndash;&gt;--><!----><!--<div ng-if="view.hasSelectedSubject()">--><!----><!--<div class="row top10">--><!--<div class="col-md-12">--><!--<h1 class="pull-left" data-translate="moon.project.view.role.title">Roles</h1>--><!--</div>--><!--</div>--><!----><!--<div class="row top05">--><!----><!--<div class="col-md-3"><label data-translate="moon.project.view.role.value">Value</label></div>--><!--<div class="col-md-5"><label data-translate="moon.project.view.role.description">Description</label></div>--><!--<div class="col-md-2"><label data-translate="moon.project.view.role.assigned">Assigned</label></div>--><!--<div class="col-md-2"><label data-translate="moon.project.view.role.enabled">Enabled</label></div>--><!----><!--</div>--><!----><!--<div class="row" ng-if="view.rolesLoading">--><!--<div class="col-md-12"><img src="assets/img/ajax-loader.gif" /> <em data-translate="moon.project.view.role.loading">Loading Roles</em></div>--><!--</div>--><!----><!--<div class="row" ng-if="!view.rolesLoading && !view.hasRoles()">--><!--<div class="col-md-12" data-translate="moon.project.view.role.notFound">Roles not found</div>--><!--</div>--><!----><!--<div class="row" ng-if="!view.rolesLoading && view.hasRoles()" ng-repeat="role in view.roles">--><!----><!--<div class="col-md-3" ng-bind="role.value"></div>--><!--<div class="col-md-5" ng-bind="role.description"></div>--><!--<div class="col-md-2">--><!--<span ng-if="view.isRoleAssigned(role)" class="glyphicon glyphicon-ok"></span>--><!--</div>--><!--<div class="col-md-2">--><!--<span ng-if="role.enabled" class="glyphicon glyphicon-ok"></span>--><!--</div>--><!----><!--</div>--><!----><!--</div>--><!----><!--&lt;!&ndash; groups &ndash;&gt;--><!----><!--<div ng-if="view.hasSelectedSubject()">--><!----><!--<div class="row top10">--><!--<div class="col-md-12">--><!--<h1 class="pull-left" data-translate="moon.project.view.group.title">Groups</h1>--><!--</div>--><!--</div>--><!----><!--<div class="row top05">--><!----><!--<div class="col-md-3"><label data-translate="moon.project.view.group.value">Value</label></div>--><!--<div class="col-md-5"><label data-translate="moon.project.view.group.description">Description</label></div>--><!--<div class="col-md-2"><label data-translate="moon.project.view.group.assigned">Assigned</label></div>--><!--<div class="col-md-2"><label data-translate="moon.project.view.group.enabled">Enabled</label></div>--><!----><!--</div>--><!----><!--<div class="row" ng-if="view.groupsLoading">--><!--<div class="col-md-12"><img src="assets/img/ajax-loader.gif" /> <em data-translate="moon.project.view.group.loading">Loading Groups</em></div>--><!--</div>--><!----><!--<div class="row" ng-if="!view.groupsLoading && !view.hasGroups()">--><!--<div class="col-md-12" data-translate="moon.project.view.group.notFound">Groups not found</div>--><!--</div>--><!----><!--<div class="row" ng-if="!view.groupsLoading && view.hasGroups()" ng-repeat="group in view.groups">--><!----><!--<div class="col-md-3">{{group.value}}</div>--><!--<div class="col-md-5">{{group.description}}</div>--><!--<div class="col-md-2">--><!--<span ng-if="view.isGroupAssigned(group)" class="glyphicon glyphicon-ok"></span>--><!--</div>--><!--<div class="col-md-2">--><!--<span ng-if="group.enabled" class="glyphicon glyphicon-ok"></span>--><!--</div>--><!----><!--</div>--><!----><!--</div>--><!----><!--</div>--><!----><div class="modal-footer top10"><div class="btn-toolbar" style="float: right;"><button ng-click="$hide()" class="btn btn-default" data-translate="moon.project.view.action.close">Close</button></div></div></div></div></div> \ No newline at end of file
diff --git a/moon_gui/delivery/js/app.js b/moon_gui/delivery/js/app.js
index ef98d469..96bb1f6a 100644
--- a/moon_gui/delivery/js/app.js
+++ b/moon_gui/delivery/js/app.js
@@ -1,4 +1,4 @@
-!function(){"use strict";function e(e,s,d,u){s.useStaticFilesLoader({prefix:"assets/i18n/",suffix:".json"}).preferredLanguage("en").useCookieStorage(),u.theme="selectize",e.when("","/project"),e.when("/","/project"),e.otherwise("/404"),t(d),o(d),n(d),c(d),i(d),a(d),r(d),l(d)}function t(e){return e.state("moon",{abstract:!0,template:"<div ui-view></div>"}).state("moon.404",{url:"/404",templateUrl:"html/common/404/404.tpl.html"}),e}function o(e){return e.state("moon.dashboard",{url:"/dashboard",templateUrl:"html/dashboard/dashboard.tpl.html"}),e}function n(e){return e.state("moon.auth",{abstract:!0,template:"<div ui-view></div>"}).state("moon.auth.login",{url:"/login",templateUrl:"html/authentication/authentication.tpl.html",controller:"AuthenticationController",controllerAs:"auth"}),e}function i(e){return e.state("moon.model",{abstract:!0,template:"<div ui-view></div>"}).state("moon.model.list",{url:"/model",templateUrl:"html/model/model-list.tpl.html",controller:"ModelListController",controllerAs:"list",resolve:{models:["modelService",function(e){return e.findAll()}]}}).state("moon.model.edit",{url:"/model/:id",templateUrl:"html/model/edit/model-edit.tpl.html",controller:"ModelEditController",controllerAs:"edit",resolve:{model:["$stateParams","modelService",function(e,t){return t.findOneWithMetaRules(e.id)}]}}),e}function c(e){return e.state("moon.project",{abstract:!0,template:"<div ui-view></div>"}).state("moon.project.list",{url:"/project",templateUrl:"html/project/project-list.tpl.html",controller:"ProjectListController",controllerAs:"list",resolve:{projects:["projectService",function(e){return e.findAll()}]}}),e}function a(e){return e.state("moon.pdp",{abstract:!0,template:"<div ui-view></div>"}).state("moon.pdp.list",{url:"/pdp",templateUrl:"html/pdp/pdp-list.tpl.html",controller:"PDPListController",controllerAs:"list",resolve:{pdps:["pdpService",function(e){return e.findAll()}]}}).state("moon.pdp.edit",{url:"/pdp/:id",templateUrl:"html/pdp/edit/pdp-edit.tpl.html",controller:"PDPEditController",controllerAs:"edit",resolve:{pdp:["$stateParams","pdpService",function(e,t){return t.findOne(e.id)}]}}),e}function r(e){return e.state("moon.policy",{abstract:!0,template:"<div ui-view></div>"}).state("moon.policy.list",{url:"/policy",templateUrl:"html/policy/policy-list.tpl.html",controller:"PolicyListController",controllerAs:"list",resolve:{policies:["policyService",function(e){return e.findAll()}]}}).state("moon.policy.edit",{url:"/policy/:id",templateUrl:"html/policy/edit/policy-edit.tpl.html",controller:"PolicyEditController",controllerAs:"edit",resolve:{policy:["$stateParams","policyService",function(e,t){return t.findOne(e.id)}]}}),e}function l(e){return e.state("moon.logs",{url:"/logs",templateUrl:"html/logs/logs.tpl.html",controller:"LogsController",controllerAs:"logs"}),e}function s(e,t,o,n,i,c,a){function r(e,t,o){-1===["/login"].indexOf(a.path())&&!c.currentUser&&a.path("/login")}function l(){e.connected=i.IsConnected(),e.transitionModal.$promise.then(e.transitionModal.show)}function s(){e.transitionModal.hide()}function d(t,i,c,a,r,l){var s=u(t,i,c,a,r,l);o("moon.global.error",{stacktrace:s}).then(function(e){n.alertError(e)}),e.transitionModal.hide()}function u(e,t,o,n,i,c){var a={};return a.status=c.status,a.message=c.statusText,a.state=t,a.params=o,a}e.connected=i.IsConnected(),e.transitionModal=t({scope:e,template:"html/common/waiting/waiting.tpl.html",backdrop:"static",show:!1}),e.$on("$stateChangeStart",l),e.$on("$stateChangeSuccess",s),e.$on("$stateChangeError",d),e.$on("$locationChangeStart",r),i.IsConnected()&&i.SetTokenHeader(i.GetTokenHeader())}angular.module("moon",["ngResource","ngRoute","ui.router","ngMessages","ui.bootstrap","ngTable","ngCookies","ngStorage","pascalprecht.translate","ngAnimate","mgcrea.ngStrap","NgSwitchery","ui.select","toaster"]).config(e).run(s);e.$inject=["$urlRouterProvider","$translateProvider","$stateProvider","uiSelectConfig"],s.$inject=["$rootScope","$modal","$translate","alertService","authenticationService","$sessionStorage","$location"]}(),function(){"use strict";angular.module("moon").constant("DEFAULT_CST",{DOMAIN:{DEFAULT:"Default"}}).constant("SECURITY_PIPELINE_CST",{TYPE:{POLICY:"policy"}}).constant("META_DATA_CST",{TYPE:{SUBJECT:"SUBJECT",OBJECT:"OBJECT",ACTION:"ACTION"}}).constant("PERIMETER_CST",{TYPE:{SUBJECT:"SUBJECT",OBJECT:"OBJECT",ACTION:"ACTION"}}).constant("DATA_CST",{TYPE:{SUBJECT:"SUBJECT",OBJECT:"OBJECT",ACTION:"ACTION"}}).constant("ASSIGNMENTS_CST",{TYPE:{SUBJECT:"SUBJECT",OBJECT:"OBJECT",ACTION:"ACTION"}}).constant("REST_URI",{PDP:"http://192.168.102.118:38001/pdp/",MODELS:"http://192.168.102.118:38001/models/",METARULES:"http://192.168.102.118:38001/meta_rules/",RULES:"http://192.168.102.118:38001/rules/",POLICIES:"http://192.168.102.118:38001/policies/",METADATA:{subject:"http://192.168.102.118:38001/subject_categories/",object:"http://192.168.102.118:38001/object_categories/",action:"http://192.168.102.118:38001/action_categories/"},PERIMETERS:{subject:"http://192.168.102.118:38001/subjects/",object:"http://192.168.102.118:38001/objects/",action:"http://192.168.102.118:38001/actions/"},KEYSTONE:"http://192.168.102.118:5000/v3/"})}(),function(){"use strict";function e(e,t,o,n,i){function c(){l.loading=!0,e.Login(l.credentials,a,r)}function a(){t("moon.login.success").then(function(e){o.alertSuccess(e),n.go("moon.dashboard"),l.loading=!1})}function r(e){t("moon.login.error",{errorCode:e.status}).then(function(e){o.alertError(e),l.loading=!1})}var l=this;l.login=c,l.loading=!1,l.credentials={username:"",password:""},function(){i.connected&&n.go("moon.dashboard")}()}angular.module("moon").controller("AuthenticationController",e),e.$inject=["authenticationService","$translate","alertService","$state","$rootScope"]}(),function(){"use strict";function e(){}angular.module("moon").controller("LogsController",e)}(),function(){"use strict";function e(e,t,o,n,i,c){function a(){return S.table=new n({page:1,count:10,sorting:{name:"asc"}},{total:function(){return S.getModels().length},getData:function(e,t){var o=t.sorting()?i("orderBy")(S.getModels(),t.orderBy()):S.getModels();e.resolve(o.slice((t.page()-1)*t.count(),t.page()*t.count()))},$scope:{$data:{}}}),S.table}function r(){return S.models?S.models:[]}function l(){return S.getModels().length>0}function s(){S.search.query=""}function d(e){return-1!==e.name.indexOf(S.search.query)||-1!==e.description.indexOf(S.search.query)}function u(){S.add.modal.$promise.then(S.add.modal.show)}function m(e){S.models.push(e)}function p(){S.table.total(S.models.length),S.table.reload()}function f(e,t){m(t),p(),S.add.modal.hide()}function h(e){S.add.modal.hide()}function g(e){S.view.modal.$scope.model=e,S.view.modal.$promise.then(S.view.modal.show)}function y(e){S.del.modal.$scope.model=e,S.del.modal.$promise.then(S.del.modal.show)}function v(e){S.models=_.chain(S.models).reject({id:e.id}).value()}function b(e,t){S.deleteModel(t),S.refreshModels(),S.del.modal.hide()}function j(e,t){S.del.modal.hide()}var S=this;S.models=o,S.table={},S.search={query:"",find:d,reset:s},S.getModels=r,S.hasModels=l,S.deleteModel=v,S.refreshModels=p,S.add={modal:c({template:"html/model/action/model-add.tpl.html",show:!1}),showModal:u},S.view={modal:c({template:"html/model/action/model-view.tpl.html",show:!1}),showModal:g},S.del={modal:c({template:"html/model/action/model-delete.tpl.html",show:!1}),showModal:y},function(){a()}();var T={"event:modelCreatedSuccess":t.$on("event:modelCreatedSuccess",f),"event:modelCreatedError":t.$on("event:modelCreatedError",h),"event:modelDeletedSuccess":t.$on("event:modelDeletedSuccess",b),"event:modelDeletedError":t.$on("event:modelDeletedError",j)};for(var P in T)e.$on("$destroy",T[P])}angular.module("moon").controller("ModelListController",e),e.$inject=["$scope","$rootScope","models","NgTableParams","$filter","$modal"]}(),function(){"use strict";function e(e,t,o,n,i,c,a){function r(){return A.pdps?A.pdps:[]}function l(){return A.getPDPs().length>0}function s(e){A.pdps.push(e)}function d(e){A.pdps=_.chain(A.pdps).reject({id:e.id}).value()}function u(){A.table.total(A.pdps.length),A.table.reload()}function m(e){return _(_.values(A.getPDPs())).each(function(t){t.id===e.id&&(t=_.clone(e))}),A.pdps}function p(e){return e.id}function f(e){return e.tenant.name}function h(e){return e?e.name:""}function g(e){return!_.isNull(e.keystone_project_id)}function y(e){return _.has(e,"project")?e.project:(_.has(e,"callPdpInProgress")||(e.callPdpInProgress=!0,a.findOne(e.keystone_project_id,function(t){return e.callPdpInProgress=!1,e.project=t,e.project})),!1)}function v(){return A.table=new i({page:1,count:10},{total:function(){return A.getPDPs().length},getData:function(e,t){var n=t.sorting()?o("orderBy")(A.getPDPs(),t.orderBy()):A.getPDPs();e.resolve(n.slice((t.page()-1)*t.count(),t.page()*t.count()))},$scope:{$data:{}}}),A.table}function b(e){return-1!==A.getPDPName(e).indexOf(A.search.query)||-1!==A.getSecPipelineFromPdp(e).indexOf(A.search.query)}function j(e){return e.security_pipeline?e.security_pipeline:[]}function S(){A.search.query=""}function T(){A.add.modal.$promise.then(A.add.modal.show)}function P(e,t){A.addPDP(t),A.refreshPDPs(),A.add.modal.hide()}function E(e,t){A.add.modal.hide()}function $(e){A.del.modal.$scope.pdp=e,A.del.modal.$promise.then(A.del.modal.show)}function C(e,t){A.deletePDP(t),A.refreshPDPs(),A.del.modal.hide()}function O(){A.del.modal.hide()}var A=this;A.pdps=c,A.mappings=[],A.getPDPs=r,A.hasPDPs=l,A.getPDPName=h,A.isMapped=g,A.getProjectFromPDP=y,A.getidFromPDP=p,A.table={},A.addPDP=s,A.deletePDP=d,A.refreshPDPs=u,A.updatePDPs=m,A.getMappedProjectName=f,A.getSecPipelineFromPdp=j,A.search={query:"",find:b,reset:S},A.add={modal:n({template:"html/pdp/action/pdp-add.tpl.html",show:!1}),showModal:T},A.del={modal:n({template:"html/pdp/action/pdp-delete.tpl.html",show:!1}),showModal:$},function(){v()}();var M={"event:pdpCreatedSuccess":e.$on("event:pdpCreatedSuccess",P),"event:pdpCreatedError":e.$on("event:pdpCreatedError",E),"event:pdpDeletedSuccess":e.$on("event:pdpDeletedSuccess",C),"event:pdpDeletedError":e.$on("event:pdpDeletedError",O)};_.each(M,function(e){t.$on("$destroy",M[e])})}angular.module("moon").controller("PDPListController",e),e.$inject=["$rootScope","$scope","$filter","$modal","NgTableParams","pdps","projectService"]}(),function(){"use strict";function e(e,t,o,n,i,c){function a(){return j.policies?j.policies:[]}function r(){return j.getPolicies().length>0}function l(){return j.table=new o({page:1,count:10,sorting:{name:"asc",genre:"asc"}},{total:function(){return j.getPolicies().length},getData:function(e,t){var o=t.sorting()?n("orderBy")(j.getPolicies(),t.orderBy()):j.getPolicies();e.resolve(o.slice((t.page()-1)*t.count(),t.page()*t.count()))},$scope:{$data:{}}}),j.table}function s(e){return-1!==e.name.indexOf(j.search.query)||-1!==e.genre.indexOf(j.search.query)||-1!==e.description.indexOf(j.search.query)}function d(){j.search.query=""}function u(){j.add.modal.$promise.then(j.add.modal.show)}function m(e,t){j.addPolicy(t),j.refreshPolicies(),j.add.modal.hide()}function p(e,t){j.add.modal.hide()}function f(e){j.policies.push(e)}function h(){j.table.total(j.policies.length),j.table.reload()}function g(e){j.del.modal.$scope.policy=e,j.del.modal.$promise.then(j.del.modal.show)}function y(e){j.policies=_.chain(j.policies).reject({id:e.id}).value()}function v(e,t){j.deletePolicy(t),j.refreshPolicies(),j.del.modal.hide()}function b(e,t){j.del.modal.hide()}var j=this;j.policies=t,j.getPolicies=a,j.hasPolicies=r,j.addPolicy=f,j.refreshPolicies=h,j.deletePolicy=y,j.table={},j.search={query:"",find:s,reset:d},j.add={modal:i({template:"html/policy/action/policy-add.tpl.html",show:!1}),showModal:u},j.del={modal:i({template:"html/policy/action/policy-delete.tpl.html",show:!1}),showModal:g},function(){l()}();var S={"event:policyCreatedSuccess":c.$on("event:policyCreatedSuccess",m),"event:policyCreatedError":c.$on("event:policyCreatedError",p),"event:policyDeletedSuccess":c.$on("event:policyDeletedSuccess",v),"event:policyDeletedError":c.$on("event:policyDeletedError",b)};for(var T in S)e.$on("$destroy",S[T])}angular.module("moon").controller("PolicyListController",e),e.$inject=["$scope","policies","NgTableParams","$filter","$modal","$rootScope"]}(),function(){"use strict";function e(){return{templateUrl:"html/policy/policy-mapped-list.tpl.html",bindToController:!0,controller:t,controllerAs:"list",scope:{pdp:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c){function a(e){_.isUndefined(y.pdp.security_pipeline)||(y.policiesId=y.pdp.security_pipeline,c.findSomeWithCallback(y.policiesId,function(t){y.policies=t,y.loadingPolicies=!1,e?d():r()}))}function r(){return y.table=new o({page:1,count:10},{total:function(){return y.getPolicies().length},getData:function(e,t){var o=t.sorting()?i("orderBy")(y.getPolicies(),t.orderBy()):y.getPolicies();e.resolve(o.slice((t.page()-1)*t.count(),t.page()*t.count()))},$scope:{$data:{}}}),y.table}function l(){return y.policies?y.policies:[]}function s(){return y.getPolicies().length>0}function d(){y.table.total(y.getPolicies().length),y.table.reload()}function u(){y.map.modal.$scope.pdp=y.pdp,y.map.modal.$promise.then(y.map.modal.show)}function m(e){y.unmap.modal.$scope.pdp=y.pdp,y.unmap.modal.$scope.policy=e,y.unmap.modal.$promise.then(y.unmap.modal.show)}function p(e,t){y.pdp=t,a(!0),y.map.modal.hide()}function f(e){y.map.modal.hide()}function h(e,t){y.pdp=t,a(!0),y.unmap.modal.hide()}function g(e){y.unmap.modal.hide()}var y=this;y.table={},y.pdp=e.list.pdp,y.getPolicies=l,y.hasPolicies=s,y.refreshPolicies=d,y.loadingPolicies=!0,y.policies=[],function(){a(!1)}(),y.map={modal:n({template:"html/policy/action/mapping/policy-map.tpl.html",show:!1}),showModal:u},y.unmap={modal:n({template:"html/policy/action/mapping/policy-unmap.tpl.html",show:!1}),showModal:m};var v={"event:policyMapToPdpSuccess":t.$on("event:policyMapToPdpSuccess",p),"event:policyMapToPdpError":t.$on("event:policyMapToPdpError",f),"event:policyUnMappedToPdpSuccess":t.$on("event:policyUnMappedToPdpSuccess",h),"event:policyUnMappedToPdpError":t.$on("event:policyUnMappedToPdpError",g)};for(var b in v)e.$on("$destroy",v[b])}angular.module("moon").directive("moonPolicyMappedList",e),e.$inject=[],angular.module("moon").controller("moonPolicyMappedListController",t),t.$inject=["$scope","$rootScope","NgTableParams","$modal","$filter","policyService"]}(),function(){"use strict";function e(e,t,o,n,i,c,a){function r(){k.loadingPDPs=!0,h(),c.findAllWithCallBack(function(e){k.pdps=e,c.mapPdpsToProjects(k.projects,k.pdps),k.loadingPDPs=!1})}function l(){return k.projects?k.projects:[]}function s(){return k.getProjects().length>0}function d(e){return _.has(e,"pdp")}function u(e){return e.pdp}function m(e){k.projects.push(e)}function p(e){k.projects=_.chain(k.projects).reject({id:e.id}).value()}function f(){k.table.total(k.projects.length),k.table.reload()}function h(){return k.table=new i({page:1,count:10,sorting:{name:"asc"}},{total:function(){return k.getProjects().length},getData:function(e,t){var n=t.sorting()?o("orderBy")(k.getProjects(),t.orderBy()):k.getProjects();e.resolve(n.slice((t.page()-1)*t.count(),t.page()*t.count()))},$scope:{$data:{}}}),k.table}function g(e){return _.has(e,"pdp")?e.pdp.name:"error"}function y(e){return-1!==e.name.indexOf(k.search.query)||-1!==e.description.indexOf(k.search.query)}function v(){k.search.query=""}function b(){k.add.modal.$promise.then(k.add.modal.show)}function j(e,t){k.addProject(t),k.refreshProjects(),k.add.modal.hide()}function S(e,t){k.add.modal.hide()}function T(e){k.del.modal.$scope.project=e,k.del.modal.$promise.then(k.del.modal.show)}function P(e,t){k.deleteProject(t),k.refreshProjects(),k.del.modal.hide()}function E(e,t){k.del.modal.hide()}function $(e){k.map.modal.$scope.project=e,k.map.modal.$promise.then(k.map.modal.show)}function C(e,t){r(),k.map.modal.hide()}function O(e,t){k.map.modal.hide()}function A(e){k.unmap.modal.$scope.project=e,k.unmap.modal.$promise.then(k.unmap.modal.show)}function M(e,t){var o=_.findIndex(k.projects,function(e){return t.id===e.id});if(-1===o)return k.unmap.modal.hide(),!1;k.projects[o]=t,k.refreshProjects(),k.unmap.modal.hide()}function R(e,t){k.unmap.modal.hide()}function D(e){k.view.modal.$scope.project=e,k.view.modal.$promise.then(k.view.modal.show)}var k=this;k.projects=a,k.pdps=[],k.getProjects=l,k.hasProjects=s,k.isProjectMapped=d,k.table={},k.addProject=m,k.deleteProject=p,k.refreshProjects=f,k.getMappedPDPName=g,k.getPdpFromProject=u,k.search={query:"",find:y,reset:v},k.add={modal:n({template:"html/project/action/project-add.tpl.html",show:!1}),showModal:b},k.del={modal:n({template:"html/project/action/project-delete.tpl.html",show:!1}),showModal:T},k.map={modal:n({template:"html/project/action/mapping/project-map.tpl.html",show:!1}),showModal:$},k.unmap={modal:n({template:"html/project/action/mapping/project-unmap.tpl.html",show:!1}),showModal:A},k.view={modal:n({template:"html/project/action/project-view.tpl.html",show:!1}),showModal:D},r();var L={"event:projectCreatedSuccess":e.$on("event:projectCreatedSuccess",j),"event:projectCreatedError":e.$on("event:projectCreatedError",S),"event:projectDeletedSuccess":e.$on("event:projectDeletedSuccess",P),"event:projectDeletedError":e.$on("event:projectDeletedError",E),"event:projectMappedSuccess":e.$on("event:projectMappedSuccess",C),"event:projectMappedError":e.$on("event:projectMappedError",O),"event:projectUnmappedSuccess":e.$on("event:projectUnmappedSuccess",M),"event:projectUnmappedError":e.$on("event:projectUnmappedError",R)};for(var w in L)t.$on("$destroy",L[w])}angular.module("moon").controller("ProjectListController",e),e.$inject=["$rootScope","$scope","$filter","$modal","ngTableParams","pdpService","projects"]}(),function(){"use strict";function e(e,t){function o(){n.browsersModal.$promise.then(n.browsersModal.show)}var n=this;n.version=null,n.browsersModal=null,n.showBrowsersCompliance=o,function(){n.browsersModal=e({template:"html/common/compatibility/compatibility.tpl.html",show:!1}),n.browsersModal}(),function(){var e=n;t.version.get().$promise.then(function(t){return e.version=t.version?t.version:"SNAPSHOT",e.version})}()}angular.module("moon").controller("FooterController",e),e.$inject=["$modal","versionService"]}(),function(){"use strict";function e(e,t,o,n){function i(t,o){o.preventDefault(),e.use(t),e.preferredLanguage(t),a.currentLanguage=t}function c(){o.Logout(),e("moon.logout.success").then(function(e){n.alertSuccess(e)})}var a=this;a.isProjectTabActive=t.isProjectTabActive,a.isPDPTabActive=t.isPDPTabActive,a.isLogsTabActive=t.isLogsTabActive,a.isPolicyTabActive=t.isPolicyTabActive,a.isModelTabActive=t.isModelTabActive,a.changeLocale=i,a.logout=c,a.currentLanguage=e.use(),a.getUser=o.GetUser}angular.module("moon").controller("HeaderController",e),e.$inject=["$translate","menuService","authenticationService","alertService"]}(),function(){"use strict";function e(){return{templateUrl:"html/common/loader/loader.tpl.html",restrict:"E"}}angular.module("moon").directive("moonLoader",e),e.$inject=[]}(),function(){"use strict";function e(e,t,o,n,i,c){function a(){function a(t){var i=c.transformOne(t,"models");n("moon.model.add.success",{modelName:i.name}).then(function(e){o.alertSuccess(e)}),r.loading=!1,e.$emit("event:modelCreatedSuccess",i)}function l(t){n("moon.model.add.error",{modelName:r.model.name}).then(function(e){o.alertError(e)}),r.loading=!1,e.$emit("event:modelCreatedError",r.project)}i.isInvalid(r.form)?i.checkFieldsValidity(r.form):(r.loading=!0,t.data.create({},r.model,a,l))}var r=this;r.form={},r.loading=!1,r.model={name:null,description:null,meta_rules:[]},r.create=a}angular.module("moon").controller("ModelAddController",e),e.$inject=["$scope","modelService","alertService","$translate","formService","utilService"]}(),function(){"use strict";function e(e,t,o,n){function i(){function i(n){t("moon.model.remove.success",{modelName:c.model.name}).then(function(e){o.alertSuccess(e)}),c.loading=!1,e.$emit("event:modelDeletedSuccess",c.model)}function a(n){t("moon.model.remove.error",{modelName:c.model.name,errorCode:n.data.error.code,message:n.data.error.message}).then(function(e){o.alertError(e)}),c.loading=!1,e.$emit("event:modelDeletedError",c.model)}c.loading=!0,n.delete(c.model,i,a)}var c=this;c.model=e.model,c.loading=!1,c.remove=i}angular.module("moon").controller("ModelDeleteController",e),e.$inject=["$scope","$translate","alertService","modelService"]}(),function(){"use strict";function e(e,t){function o(){t.findSomeWithMetaData(n.model.meta_rules).then(function(e){n.meta_rules_values=e,n.model.meta_rules_values=e})}var n=this;n.model=e.model,n.meta_rules_values=!1,function(){n.model.meta_rules.length>0?o():n.meta_rules_values=[]}()}angular.module("moon").controller("ModelViewController",e),e.$inject=["$scope","metaRuleService"]}(),function(){"use strict";function e(e,t,o,n){function i(e,t){c.model=t,n.findSomeWithCallback(t.meta_rules,function(e){c.model.meta_rules_values=e})}var c=this;c.model=o,c.editBasic=!1,c.editMetaRules=!0;var a={"event:modelUpdatedSuccess":t.$on("event:modelUpdatedSuccess",i),"event:updateModelFromMetaRuleAddSuccess":t.$on("event:updateModelFromMetaRuleAddSuccess",i)};for(var r in a)e.$on("$destroy",a[r])}angular.module("moon").controller("ModelEditController",e),e.$inject=["$scope","$rootScope","model","metaRuleService"]}(),function(){"use strict";function e(){return{templateUrl:"html/model/edit/model-edit-basic.tpl.html",bindToController:!0,controller:t,controllerAs:"edit",scope:{model:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c){function a(){function a(t){var o=c.transformOne(t,"models");i("moon.model.edit.basic.success",{modelName:o.name}).then(function(e){n.alertSuccess(e)}),l.loading=!1,e.$emit("event:modelUpdatedSuccess",o)}function r(e){i("moon.model.edit.basic.error",{modelName:l.model.name}).then(function(e){n.alertError(e)}),l.loading=!1}o.isInvalid(l.form)?o.checkFieldsValidity(l.form):(l.loading=!0,t.update(l.modelToEdit,a,r))}function r(){l.modelToEdit=angular.copy(l.model)}var l=this;l.editModel=a,l.init=r,l.form={},function(){l.model=e.edit.model,l.modelToEdit=angular.copy(l.model)}()}angular.module("moon").directive("moonModelEditBasic",e),e.$inject=[],angular.module("moon").controller("moonModelEditBasicController",t),t.$inject=["$scope","modelService","formService","alertService","$translate","utilService"]}(),function(){"use strict";function e(e,t,o,n,i,c,a){function r(c){function r(n){t("moon.pdp.add.success",{pdpName:c.name}).then(function(e){o.alertSuccess(e)});var i=a.transformOne(n,"pdps");l.loading=!1,e.$emit("event:pdpCreatedSuccess",i)}function s(n){t("moon.pdp.add.error",{pdpName:c.name}).then(function(e){o.alertError(e)}),l.loading=!1,e.$emit("event:pdpCreatedError")}n.isInvalid(l.form)?n.checkFieldsValidity(l.form):(l.loading=!0,i.data.pdp.create({},{name:l.pdp.name,description:l.pdp.description,security_pipeline:[l.selectedPolicy.id],keystone_project_id:null},r,s))}var l=this;l.form={},l.pdp={},l.policies=[],l.selectedPolicy=null,l.loading=!1,l.loadingPolicies=!0,l.create=r,function(){c.findAllWithCallback(function(e){l.policies=e,l.loadingPolicies=!1})}()}angular.module("moon").controller("PDPAddController",e),e.$inject=["$scope","$translate","alertService","formService","pdpService","policyService","utilService"]}(),function(){"use strict";function e(e,t,o,n){function i(){function i(n){t("moon.pdp.remove.success",{pdpName:c.pdp.name}).then(function(e){o.alertSuccess(e)}),c.loading=!1,e.$emit("event:pdpDeletedSuccess",c.pdp)}function a(n){t("moon.pdp.remove.error",{pdpName:c.pdp.name}).then(function(e){o.alertError(e)}),c.loading=!1,e.$emit("event:pdpDeletedError",c.pdp)}c.loading=!0,n.data.pdp.remove({pdp_id:c.pdp.id},i,a)}var c=this;c.pdp=e.pdp,c.loading=!1,c.remove=i}angular.module("moon").controller("PDPDeleteController",e),e.$inject=["$scope","$translate","alertService","pdpService"]}(),function(){"use strict";function e(e,t,o,n){function i(e,t){c.pdp=t}var c=this;c.pdp=o,c.editBasic=!1;var a={"event:pdpUpdatedSuccess":t.$on("event:pdpUpdatedSuccess",i)};for(var r in a)e.$on("$destroy",a[r])}angular.module("moon").controller("PDPEditController",e),e.$inject=["$scope","$rootScope","pdp","$stateParams"]}(),function(){"use strict";function e(){return{templateUrl:"html/pdp/edit/pdp-edit-basic.tpl.html",bindToController:!0,controller:t,controllerAs:"edit",scope:{pdp:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c){function a(){function a(t){var o=c.transformOne(t,"pdps");i("moon.pdp.edit.basic.success",{pdpName:o.name}).then(function(e){n.alertSuccess(e)}),l.loading=!1,e.$emit("event:pdpUpdatedSuccess",o)}function r(e){i("moon.pdp.edit.basic.error",{pdpName:l.pdp.name}).then(function(e){n.alertError(e)}),l.loading=!1}o.isInvalid(l.form)?o.checkFieldsValidity(l.form):(l.loading=!0,t.update(l.pdpToEdit,a,r))}function r(){l.pdpToEdit=angular.copy(l.pdp)}var l=this;l.editPdp=a,l.init=r,l.form={},function(){l.pdp=e.edit.pdp,l.pdpToEdit=angular.copy(l.pdp)}()}angular.module("moon").directive("moonPDPEditBasic",e),e.$inject=[],angular.module("moon").controller("moonPDPEditBasicController",t),t.$inject=["$scope","pdpService","formService","alertService","$translate","utilService"]}(),function(){"use strict";function e(e,t,o,n,i,c,a){function r(){a.findAllWithCallBack(l)}function l(e){d.models=e,d.modelsLoading=!1}function s(){function a(n){var i=c.transformOne(n,"policies");t("moon.policy.add.success",{policyName:i.name}).then(function(e){o.alertSuccess(e)}),d.loading=!1,e.$emit("event:policyCreatedSuccess",i)}function r(n){t("moon.policy.add.error",{policyName:d.model.name}).then(function(e){o.alertError(e)}),d.loading=!1,e.$emit("event:policyCreatedError",d.project)}n.isInvalid(d.form)?n.checkFieldsValidity(d.form):(d.loading=!0,i.data.policy.create({},{name:d.policy.name,description:d.policy.description,genre:[d.selectedGenre],model_id:d.selectedModel.id},a,r))}var d=this;d.loading=!1,d.form={},d.policy={name:null,genre:null,description:null,model_id:null},d.genres=["admin","authz"],d.models=[],d.modelsLoading=!0,d.create=s,function(){r()}()}angular.module("moon").controller("PolicyAddController",e),e.$inject=["$scope","$translate","alertService","formService","policyService","utilService","modelService"]}(),function(){"use strict";function e(e,t,o,n){function i(){function i(n){t("moon.policy.remove.success",{policyName:c.policy.name}).then(function(e){o.alertSuccess(e)}),c.loading=!1,e.$emit("event:policyDeletedSuccess",c.policy)}function a(n){t("moon.policy.remove.error",{policyName:c.policy.name,errorCode:n.data.error.code,message:n.data.error.message}).then(function(e){o.alertError(e)}),c.loading=!1,e.$emit("event:policyDeletedError",c.policy)}c.loading=!0,n.delete(c.policy,i,a)}var c=this;c.policy=e.policy,c.loading=!1,c.remove=i}angular.module("moon").controller("PolicyDeleteController",e),e.$inject=["$scope","$translate","alertService","policyService"]}(),function(){"use strict";function e(e,t,o,n){function i(){a.loadingModel=!0,n.findOneWithCallback(a.policy.model_id,function(e){a.loadingModel=!1,a.policy.model=e})}function c(e,t){a.policy=t,i()}var a=this;a.policy=o,a.editBasic=!1,a.showPerimeters=!1,a.showData=!1,a.showRules=!1,a.showAssignments=!1,function(){i()}();var r={"event:policyUpdatedSuccess":t.$on("event:policyUpdatedSuccess",c)};for(var l in r)e.$on("$destroy",r[l])}angular.module("moon").controller("PolicyEditController",e),e.$inject=["$scope","$rootScope","policy","modelService"]}(),function(){"use strict";function e(){return{templateUrl:"html/policy/edit/policy-edit-basic.tpl.html",bindToController:!0,controller:t,controllerAs:"edit",scope:{policy:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c,a){function r(){a.findAllWithCallBack(l)}function l(e){u.models=e,_.each(e,function(e){e.id===u.policy.model_id&&(u.selectedModel=e)}),u.modelsLoading=!1}function s(){function a(t){var o=c.transformOne(t,"policies");i("moon.policy.edit.basic.success",{policyName:o.name}).then(function(e){n.alertSuccess(e)}),u.loading=!1,e.$emit("event:policyUpdatedSuccess",o)}function r(e){i("moon.policy.edit.basic.error",{policyName:u.policy.name}).then(function(e){n.alertError(e)}),u.loading=!1}o.isInvalid(u.form)?o.checkFieldsValidity(u.form):(u.loading=!0,delete u.policyToEdit.model,u.policyToEdit.model_id=u.selectedModel.id,t.update(u.policyToEdit,a,r))}function d(){u.policyToEdit=angular.copy(u.policy)}var u=this;u.editPolicy=s,u.init=d,u.form={},u.modelsLoading=!0,function(){u.policy=e.edit.policy,u.policyToEdit=angular.copy(u.policy),console.log(u.policyToEdit),r()}()}angular.module("moon").directive("moonPolicyEditBasic",e),e.$inject=[],angular.module("moon").controller("moonPolicyEditBasicController",t),t.$inject=["$scope","policyService","formService","alertService","$translate","utilService","modelService"]}(),function(){"use strict";function e(e){function t(t){e.pop("error",null,t,5e3)}function o(t){e.pop("success",null,t,5e3)}function n(t){e.pop("note",null,t,5e3)}var i={};return i.alertError=t,i.alertSuccess=o,i.alertInfo=n,i}angular.module("moon").factory("alertService",e),e.$inject=["toaster"]}(),function(){"use strict";function e(){function e(){var e,t=navigator.userAgent,o=t.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(o[1])?(e=/\brv[ :]+(\d+)/g.exec(t)||[],"IE "+(e[1]||"")):"Chrome"===o[1]&&null!=(e=t.match(/\bOPR\/(\d+)/))?"Opera "+e[1]:(o=o[2]?[o[1],o[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(e=t.match(/version\/(\d+)/i))&&o.splice(1,1,e[1]),o.join(" "))}var t={};return t.sayWho=e,t}angular.module("moon").factory("browserService",e)}(),function(){"use strict";function e(){function e(e){return e.$invalid}function t(e){var t=_.keys(e.$error);_(t).each(function(t){var o=_.values(e.$error[t]);_(o).each(function(e){e.$dirty=!0,e.$setValidity(t,!1)})})}var o={};return o.isInvalid=e,o.checkFieldsValidity=t,o}angular.module("moon").factory("formService",e)}(),function(){"use strict";function e(e){function t(){return e.includes("moon.project")}function o(){return e.includes("moon.pdp")}function n(){return e.includes("moon.policy")}function i(){return e.includes("moon.logs")}function c(){return e.includes("moon.model")}var a={};return a.isProjectTabActive=t,a.isPDPTabActive=o,a.isPolicyTabActive=n,a.isLogsTabActive=i,a.isModelTabActive=c,a}angular.module("moon").factory("menuService",e),e.$inject=["$state"]}(),function(){"use strict";function e(e,t){function o(o){switch(o){case e.TYPE.POLICY:default:return t.findAll()}}var n={};return n.findAll=o,n}angular.module("moon").factory("securityPipelineService",e),e.$inject=["SECURITY_PIPELINE_CST","policyService"]}(),function(){"use strict";function e(){return{transform:function(e,t){var o=[];return _.each(e[t],function(e,t){e.id=t,o.push(e)}),o},transformOne:function(e,t){var o=[];return _.each(e[t],function(e,t){e.id=t,o.push(e)}),o[0]}}}angular.module("moon").factory("utilService",e),e.$inject=[]}(),function(){"use strict";function e(e){return{version:e("version.json",{},{get:{method:"GET",isArray:!1}})}}angular.module("moon").factory("versionService",e),e.$inject=["$resource"]}(),function(){"use strict";function e(e,t,o,n){function i(e,t){_.each(e,function(e){return c(e,t)})}function c(e,t){if(_.isNull(e.keystone_project_id))return!1;var o=_.findIndex(t,function(t){return e.id===t.keystone_project_id});return-1!==o&&(e.pdp=t[o],!0)}return{data:{pdp:t(o.PDP+":pdp_id",{},{query:{method:"GET",isArray:!1},get:{method:"GET",isArray:!1},create:{method:"POST"},update:{method:"PATCH"},remove:{method:"DELETE"}})},findAll:function(){return this.data.pdp.query().$promise.then(function(e){return n.transform(e,"pdps")})},findAllWithCallBack:function(e){return this.data.pdp.query().$promise.then(function(t){e(n.transform(t,"pdps"))})},findOne:function(e){return this.data.pdp.get({pdp_id:e}).$promise.then(function(e){
-return n.transformOne(e,"pdps")})},unMap:function(e,t,o){e.keystone_project_id=null,_.has(e,"project")&&delete e.project,this.data.pdp.update({pdp_id:e.id},e,t,o)},map:function(e,t,o,n){e.keystone_project_id=t,this.data.pdp.update({pdp_id:e.id},e,o,n)},update:function(e,t,o){this.data.pdp.update({pdp_id:e.id},e,t,o)},mapPdpsToProjects:i,mapPdpsToProject:c}}angular.module("moon").factory("pdpService",e),e.$inject=["$q","$resource","REST_URI","utilService"]}(),function(){"use strict";function e(e,t,o,n,i){function c(){return _.has(o,"currentUser")}function a(){delete o.currentUser,n.defaults.headers.common["X-Auth-Token"]="",i.path("/")}function r(){return o.currentUser}function l(){return o.currentUser.connectionToken}function s(e){n.defaults.headers.common["X-Auth-Token"]=e}return{data:e(t.KEYSTONE+"auth/tokens",{},{login:{method:"POST",transformResponse:function(e,t){var o={};return o.data=angular.fromJson(e),o.headers=t(),o}},logout:{method:"DELETE"}}),Login:function(e,t,n){var i={auth:{identity:{methods:["password"],password:{user:{name:e.username,domain:{name:"Default"},password:e.password}}},scope:{project:{name:"admin",domain:{name:"Default"}}}}};this.data.login({},i,function(e){o.currentUser=e.data,o.currentUser.connectionToken=e.headers["x-subject-token"],s(e.headers["x-subject-token"]),t()},n)},IsConnected:c,SetTokenHeader:s,GetTokenHeader:l,GetUser:r,Logout:a}}angular.module("moon").factory("authenticationService",e),e.$inject=["$resource","REST_URI","$sessionStorage","$http","$location"]}(),function(){"use strict";function e(e){return{data:{image:e("./pip/nova/images",{},{query:{method:"GET",isArray:!1}}),flavor:e("./pip/nova/flavors",{},{query:{method:"GET",isArray:!1}})}}}angular.module("moon").factory("novaService",e),e.$inject=["$resource"]}(),function(){"use strict";function e(e,t){return{data:{projects:e(t.KEYSTONE+"projects/:project_id",{},{query:{method:"GET",isArray:!1},get:{method:"GET",isArray:!1},create:{method:"POST"},remove:{method:"DELETE"}})},findOne:function(e,t){return this.data.projects.get({project_id:e}).$promise.then(function(e){t(e.project)})},findAll:function(){return this.data.projects.query().$promise.then(function(e){var t=[];return _.each(e.projects,function(e){t.push(e)}),t})}}}angular.module("moon").factory("projectService",e),e.$inject=["$resource","REST_URI"]}(),function(){"use strict";function e(e,t,o,n,i,c){function a(){function c(n){var i=n.project;t("moon.project.add.success",{projectName:i.name}).then(function(e){o.alertSuccess(e)}),r.loading=!1,e.$emit("event:projectCreatedSuccess",i)}function a(n){t("moon.project.add.error",{projectName:r.project.project.name}).then(function(e){o.alertError(e)}),r.loading=!1,e.$emit("event:projectCreatedError",r.project)}n.isInvalid(r.form)?n.checkFieldsValidity(r.form):(r.loading=!0,i.data.projects.create({},r.project,c,a))}var r=this;r.form={},r.loading=!1,r.project={project:{name:null,description:null,enabled:!0,domain:c.DOMAIN.DEFAULT}},r.create=a}angular.module("moon").controller("ProjectAddController",e),e.$inject=["$scope","$translate","alertService","formService","projectService","DEFAULT_CST"]}(),function(){"use strict";function e(e,t,o,n,i){function c(){i.findAllWithCallBack(function(e){d.pdps=e,i.mapPdpsToProject(d.project,d.pdps),d.loadingPDP=!1})}function a(){return _.has(d.project,"pdp")}function r(){d.loading=!0,a()?l(s):s()}function l(n){function c(n){t("moon.project.remove.mapping.remove.error",{pdpName:a}).then(function(e){o.alertError(e)}),d.loading=!1,e.$emit("event:projectDeletedError",d.project)}var a=unmap.project.pdp.name;i.unMap(unmap.project,n,c)}function s(){function i(n){t("moon.project.remove.success",{projectName:d.project.name}).then(function(e){o.alertSuccess(e)}),d.loading=!1,e.$emit("event:projectDeletedSuccess",d.project)}function c(n){t("moon.project.remove.error",{projectName:d.project.name,errorCode:n.data.error.code,message:n.data.error.message}).then(function(e){o.alertError(e)}),d.loading=!1,e.$emit("event:projectDeletedError",d.project)}n.data.projects.remove({project_id:d.project.id},i,c)}var d=this;d.project=e.project,d.loading=!1,d.loadingPDP=!0,d.remove=r,d.isProjectMapped=a,d.pdps=[],function(){c()}()}angular.module("moon").controller("ProjectDeleteController",e),e.$inject=["$scope","$translate","alertService","projectService","pdpService"]}(),function(){"use strict";function e(e,t,o,n,i){this.project=t.project}angular.module("moon").controller("ProjectViewController",e),e.$inject=["$q","$scope","$translate","alertService","projectService"]}(),function(){"use strict";function e(){return{templateUrl:"html/model/edit/metadata/metadata-edit.tpl.html",bindToController:!0,controller:t,controllerAs:"edit",scope:{metaDataType:"=",metaRule:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c,a,r){function l(){function e(e){g.list=e}switch(g.metaDataType){case o.TYPE.SUBJECT:t.subject.findAllWithCallback(e);break;case o.TYPE.OBJECT:t.object.findAllWithCallback(e);break;case o.TYPE.ACTION:t.action.findAllWithCallback(e);break;default:g.list=[]}}function s(){function t(t){i("moon.model.metarules.update.success",{metaRuleName:l.name}).then(function(e){n.alertSuccess(e)}),l=r.transformOne(t,"meta_rules"),e.$emit("event:updateMetaRuleFromMetaDataAddSuccess",l),f()}function c(e){i("moon.model.metarules.update.error",{metaRuleName:l.name,reason:e.message}).then(function(e){n.alertError(e)}),f()}if(g.selectedMetaData){var l=g.metaRule;switch(g.metaDataType){case o.TYPE.SUBJECT:l.subject_categories.push(g.selectedMetaData.id);break;case o.TYPE.OBJECT:l.object_categories.push(g.selectedMetaData.id);break;case o.TYPE.ACTION:l.action_categories.push(g.selectedMetaData.id)}a.update(l,t,c)}}function d(){function e(e){var t={};switch(g.metaDataType){case o.TYPE.SUBJECT:t=r.transformOne(e,"subject_categories");break;case o.TYPE.OBJECT:t=r.transformOne(e,"object_categories");break;case o.TYPE.ACTION:t=r.transformOne(e,"action_categories")}i("moon.model.metadata.edit.create.success",{name:t.name}).then(function(e){n.alertSuccess(e)}),f(),g.list.push(t),h()}function a(e){i("moon.model.metadata.edit.create.error",{name:l.name}).then(function(e){n.alertError(e)}),f()}if(c.isInvalid(g.form))c.checkFieldsValidity(g.form);else{p();var l=angular.copy(g.metaData);switch(g.metaDataType){case o.TYPE.SUBJECT:t.subject.add(l,e,a);break;case o.TYPE.OBJECT:t.object.add(l,e,a);break;case o.TYPE.ACTION:t.action.add(l,e,a)}}}function u(){function c(t){i("moon.model.metadata.edit.delete.success",{name:s.name}).then(function(e){n.alertSuccess(e)}),a.findOneWithMetaData(g.metaRule.id).then(function(t){g.metaRule=t,m(),l(),f(),e.$emit("event:deleteMetaDataFromMetaDataAddSuccess",g.metaRule)})}function r(e){i("moon.model.metadata.edit.delete.error",{name:s.name}).then(function(e){n.alertError(e)}),f()}if(g.selectedMetaData){p();var s=angular.copy(g.selectedMetaData);switch(g.metaDataType){case o.TYPE.SUBJECT:t.subject.delete(s,c,r);break;case o.TYPE.OBJECT:t.object.delete(s,c,r);break;case o.TYPE.ACTION:t.action.delete(s,c,r)}}}function m(){delete g.selectedMetaData}function p(){g.loading=!0}function f(){g.loading=!1}function h(){g.fromList=!0}var g=this;g.metaDataType=e.edit.metaDataType,g.metaRule=e.edit.metaRule,g.fromList=!0,g.laoading=!1,g.form={},g.metaData={name:null,description:null},g.list=[],g.create=d,g.addToMetaRule=s,g.deleteMetaData=u,l()}angular.module("moon").directive("moonMetaDataEdit",e),e.$inject=[],angular.module("moon").controller("moonMetaDataEditController",t),t.$inject=["$scope","metaDataService","META_DATA_CST","alertService","$translate","formService","metaRuleService","utilService"]}(),function(){"use strict";function e(){return{templateUrl:"html/model/edit/metadata/metadata-list.tpl.html",bindToController:!0,controller:t,controllerAs:"list",scope:{metaRule:"=",editMode:"=",shortDisplay:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c,a,r){function l(){s(),d(),u()}function s(){j.loadingCatSub=!0,o.subject.findSomeWithCallback(j.metaRule.subject_categories,function(e){j.catSub=e,j.loadingCatSub=!1})}function d(){j.loadingCatObj=!0,o.object.findSomeWithCallback(j.metaRule.object_categories,function(e){j.catObj=e,j.loadingCatObj=!1})}function u(){j.loadingCatAct=!0,o.action.findSomeWithCallback(j.metaRule.action_categories,function(e){j.catAct=e,j.loadingCatAct=!1})}function m(e){function t(t){n("moon.model.metarules.update.success",{metaRuleName:j.metaRule.name}).then(function(e){i.alertSuccess(e)}),j.metaRule=c.findMetaDataFromMetaRule(r.transformOne(t,"meta_rules")),l(),e.loader=!1}function o(t){n("moon.model.metarules.update.error",{metaRuleName:j.metaRule.name,reason:t.message}).then(function(e){i.alertError(e)}),e.loader=!1}e.loader=!0;var a=angular.copy(j.metaRule);a.subject_categories=_.without(a.subject_categories,e.id),c.update(a,t,o)}function p(e){function t(t){n("moon.model.metarules.update.success",{metaRuleName:j.metaRule.name}).then(function(e){i.alertSuccess(e)}),j.metaRule=c.findMetaDataFromMetaRule(r.transformOne(t,"meta_rules")),l(),e.loader=!1}function o(t){n("moon.model.metarules.update.error",{metaRuleName:j.metaRule.name,reason:t.message}).then(function(e){i.alertError(e)}),e.loader=!1}e.loader=!0;var a=angular.copy(j.metaRule);a.object_categories=_.without(a.object_categories,e.id),c.update(a,t,o)}function f(e){function t(t){n("moon.model.metarules.update.success",{metaRuleName:j.metaRule.name}).then(function(e){i.alertSuccess(e)}),j.metaRule=c.findMetaDataFromMetaRule(r.transformOne(t,"meta_rules")),l(),e.loader=!1}function o(t){n("moon.model.metarules.update.error",{metaRuleName:j.metaRule.name,reason:t.message}).then(function(e){i.alertError(e)}),e.loader=!1}e.loader=!0;var a=angular.copy(j.metaRule);a.action_categories=_.without(a.action_categories,e.id),c.update(a,t,o)}function h(){return j.catSub?j.catSub:[]}function g(){return j.catObj?j.catObj:[]}function y(){return j.catAct?j.catAct:[]}function v(e,t){j.metaRule=t,l()}function b(e,t){j.metaRule=t,l()}var j=this;j.metaRule=e.list.metaRule,j.editMode=e.list.editMode,j.shortDisplay=e.list.shortDisplay,j.typeOfSubject=a.TYPE.SUBJECT,j.typeOfObject=a.TYPE.OBJECT,j.typeOfAction=a.TYPE.ACTION,j.unMapSub=m,j.unMapObj=p,j.unMapAct=f,j.getSubjectCategories=h,j.getObjectCategories=g,j.getActionCategories=y,l();var S={"event:updateMetaRuleFromMetaDataAddSuccess":t.$on("event:updateMetaRuleFromMetaDataAddSuccess",v),"event:deleteMetaDataFromMetaDataAddSuccess":t.$on("event:deleteMetaDataFromMetaDataAddSuccess",b)};for(var T in S)e.$on("$destroy",S[T])}angular.module("moon").directive("moonMetaDataList",e),e.$inject=[],angular.module("moon").controller("moonMetaDataListController",t),t.$inject=["$scope","$rootScope","metaDataService","$translate","alertService","metaRuleService","META_DATA_CST","utilService"]}(),function(){"use strict";function e(){return{templateUrl:"html/model/edit/metarules/metarules-list.tpl.html",bindToController:!0,controller:t,controllerAs:"list",scope:{editMode:"=",mappedModel:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c){function a(){return _.table=new o({page:1,count:10,sorting:{name:"asc"}},{total:function(){return _.getMetaRules().length},getData:function(e,t){var o=t.sorting()?n("orderBy")(_.getMetaRules(),t.orderBy()):_.getMetaRules();e.resolve(o.slice((t.page()-1)*t.count(),t.page()*t.count()))},$scope:{$data:{}}}),_.table}function r(){return _.metaRules?_.metaRules:[]}function l(){return _.getMetaRules().length>0}function s(e){e.id===u().id?(_.showDetailValue=!1,_.subject_list=[],_.object_list=[],_.action_list=[]):(_.subject_list=e.subject_categories_values,_.object_list=e.object_categories_values,_.action_list=e.action_categories_values,_.showDetailValue=e)}function d(e){_.edit.modal.$scope.metaRule=e,_.edit.modal.$promise.then(_.edit.modal.show)}function u(){return _.showDetailValue}function m(){return _.subject_list}function p(){return _.object_list}function f(){return _.action_list}function h(){_.map.modal.$scope.model=_.model,_.map.modal.$promise.then(_.map.modal.show)}function g(){_.metaRules=_.model.meta_rules_values,_.table.total(_.getMetaRules().length),_.table.reload()}function y(e,t){_.model=t,g(),_.map.modal.hide()}function v(e){_.unmap.modal.$scope.model=_.model,_.unmap.modal.$scope.metaRule=e,_.unmap.modal.$promise.then(_.unmap.modal.show)}function b(e,t){_.model=t,c.findSomeWithCallback(_.model.meta_rules,function(e){_.model.meta_rules_values=e,g(),_.unmap.modal.hide()})}function j(e){_.unmap.modal.hide()}var _=this;_.table={},_.editMode=e.list.editMode,_.model=e.list.mappedModel,_.metaRules=_.model.meta_rules_values,_.getMetaRules=r,_.hasMetaRules=l,_.showDetail=s,_.getSubjectList=m,_.getObjectList=p,_.getActionlist=f,_.getShowDetailValue=u,_.showDetailValue=!1,_.subject_list=[],_.object_list=[],_.action_list=[],_.edit={modal:i({template:"html/model/edit/metarules/action/metarules-edit.tpl.html",show:!1}),showModal:d},_.map={modal:i({template:"html/model/edit/metarules/action/mapping/metarules-map.tpl.html",show:!1}),showModal:h},_.unmap={modal:i({template:"html/model/edit/metarules/action/mapping/metarules-unmap.tpl.html",show:!1}),showModal:v},function(){a()}();var S={"event:metaRuleMapToModelSuccess":t.$on("event:metaRuleMapToModelSuccess",y),"event:metaRuleUnMappedToModelSuccess":t.$on("event:metaRuleUnMappedToModelSuccess",b),"event:metaRuleUnMappedToModelError":t.$on("event:metaRuleUnMappedToModelError",j)};for(var T in S)e.$on("$destroy",S[T]);e.$watch("list.editMode",function(e,t){_.showDetailValue=!1})}angular.module("moon").directive("moonMetaRulesList",e),e.$inject=[],angular.module("moon").controller("moonMetaRulesListController",t),t.$inject=["$scope","$rootScope","NgTableParams","$filter","$modal","metaRuleService"]}(),function(){"use strict";function e(e,t,o,n,i,c,a){function r(){s.policiesLoading=!0,i.findAllWithCallback(function(e){s.policies=e,s.policiesLoading=!1})}function l(){function i(n){var i=a.transformOne(n,"pdps");o("moon.policy.map.success",{pdpName:i.name,policyName:s.selectedPolicy.name}).then(function(e){t.alertSuccess(e)}),s.mappingLoading=!1,e.$emit("event:policyMapToPdpSuccess",i)}function r(n){o("moon.policy.map.error",{pdpName:s.pdp.name,policyName:s.selectedPolicy.name}).then(function(e){t.alertError(e)}),s.mappingLoading=!1,e.$emit("event:policyMapToPdpError")}if(n.isInvalid(s.form))n.checkFieldsValidity(s.form);else{s.mappingLoading=!0;var l=angular.copy(s.pdp);l.security_pipeline.push(s.selectedPolicy.id),c.update(l,i,r)}}var s=this;s.pdps=[],s.pdp=e.pdp,s.addPolicyToList=!1,s.map=l,function(){r()}()}angular.module("moon").controller("PolicyMapController",e),e.$inject=["$scope","alertService","$translate","formService","policyService","pdpService","utilService"]}(),function(){"use strict";function e(e,t,o,n,i){function c(){function c(n){t("moon.policy.unmap.success",{pdpName:a.pdp.name,policyName:a.policy.name}).then(function(e){o.alertSuccess(e)}),a.unMappingLoading=!1,e.$emit("event:policyUnMappedToPdpSuccess",i.transformOne(n,"pdps"))}function r(n){t("moon.policy.unmap.error",{pdpName:a.pdp.name,policyName:a.policy.name}).then(function(e){o.alertError(e)}),a.unMappingLoading=!1,e.$emit("event:policyUnMappedToPdpError")}a.unMappingLoading=!0;var l=angular.copy(a.pdp);l.security_pipeline=_.without(l.security_pipeline,a.policy.id),n.update(l,c,r)}var a=this;a.pdp=e.pdp,a.policy=e.policy,a.unMappingLoading=!1,a.unmap=c}angular.module("moon").controller("PolicyUnMapController",e),e.$inject=["$scope","$translate","alertService","pdpService","utilService"]}(),function(){"use strict";function e(e,t,o,n){return{data:e(t.MODELS+":model_id",{},{get:{method:"GET"},query:{method:"GET"},create:{method:"POST"},remove:{method:"DELETE"},update:{method:"PATCH"}}),findAll:function(){return this.data.query().$promise.then(function(e){return n.transform(e,"models")})},findAllWithCallBack:function(e){return this.data.query().$promise.then(function(t){e(n.transform(t,"models"))})},findOneWithCallback:function(e,t){return this.data.get({model_id:e}).$promise.then(function(e){t(n.transformOne(e,"models"))})},findOneWithMetaRules:function(e){return this.data.get({model_id:e}).$promise.then(function(t){var i=n.transformOne(t,"models");return i.meta_rules.length>0?o.findSomeWithMetaData(i.meta_rules).then(function(t){return i.meta_rules_values=t,i.id=e,i}):(i.meta_rules_values=[],i.id=e),i})},delete:function(e,t,o){delete e.meta_rules_values,this.data.remove({model_id:e.id},e,t,o)},update:function(e,t,o){delete e.meta_rules_values,this.data.update({model_id:e.id},e,t,o)}}}angular.module("moon").factory("modelService",e),e.$inject=["$resource","REST_URI","metaRuleService","utilService"]}(),function(){"use strict";function e(e,t,o,n){return{data:{policy:e(t.POLICIES+":policy_id",{},{query:{method:"GET"},create:{method:"POST"},update:{method:"PATCH"},remove:{method:"DELETE"}})},findAll:function(){return this.data.policy.query().$promise.then(function(e){return o.transform(e,"policies")})},findAllWithCallback:function(e){return this.data.policy.query().$promise.then(function(t){e(o.transform(t,"policies"))})},findOneReturningPromise:function(e){return this.data.policy.get({policy_id:e}).$promise},findSomeWithCallback:function(e,t){var i=this;0===e.length&&t([]);var c=_(e).map(function(e){return i.findOneReturningPromise(e)});n.all(c).then(function(e){t(_(e).map(function(e){return o.transformOne(e,"policies")}))})},findOne:function(e){return this.data.policy.get({policy_id:e}).$promise.then(function(e){return o.transformOne(e,"policies")})},update:function(e,t,o){this.data.policy.update({policy_id:e.id},e,t,o)},delete:function(e,t,o){this.data.policy.remove({policy_id:e.id},e,t,o)}}}angular.module("moon").factory("policyService",e),e.$inject=["$resource","REST_URI","utilService","$q"]}(),function(){"use strict";function e(e,t,o,n){var i={subject:e(t.METADATA.subject+":subject_id",{},{get:{method:"GET",isArray:!1},create:{method:"POST"},remove:{method:"DELETE"}}),object:e(t.METADATA.object+":object_id",{},{get:{method:"GET",isArray:!1},create:{method:"POST"},remove:{method:"DELETE"}}),action:e(t.METADATA.action+":action_id",{},{get:{method:"GET",isArray:!1},create:{method:"POST"},remove:{method:"DELETE"}})};return{subject:{findOne:function(e,t){i.subject.get({subject_id:e}).$promise.then(function(e){t(n.transformOne(e,"subject_categories"))})},findOneReturningPromise:function(e){return i.subject.get({subject_id:e}).$promise},findSome:function(e){var t=this;if(0===e.length)return[];var i=_(e).map(function(e){return t.findOneReturningPromise(e)});return o.all(i).then(function(e){return _(e).map(function(e){return n.transformOne(e,"subject_categories")})})},findSomeWithCallback:function(e,t){var i=this;0===e.length&&t([]);var c=_(e).map(function(e){return i.findOneReturningPromise(e)});o.all(c).then(function(e){t(_(e).map(function(e){return n.transformOne(e,"subject_categories")}))})},findAll:function(){return i.subject.get().$promise.then(function(e){return n.transform(e,"subject_categories")})},findAllWithCallback:function(e){return i.subject.get().$promise.then(function(t){e(n.transform(t,"subject_categories"))})},delete:function(e,t,o){i.subject.remove({subject_id:e.id},e,t,o)},add:function(e,t,o){i.subject.create({},e,t,o)}},object:{findOne:function(e,t){i.object.get({object_id:e}).$promise.then(function(e){t(n.transformOne(e,"object_categories"))})},findOneReturningPromise:function(e){return i.object.get({object_id:e}).$promise},findSome:function(e){var t=this;if(0===e.length)return[];var i=_(e).map(function(e){return t.findOneReturningPromise(e)});return o.all(i).then(function(e){return _(e).map(function(e){return n.transformOne(e,"object_categories")})})},findSomeWithCallback:function(e,t){var i=this;0===e.length&&t([]);var c=_(e).map(function(e){return i.findOneReturningPromise(e)});o.all(c).then(function(e){t(_(e).map(function(e){return n.transformOne(e,"object_categories")}))})},findAll:function(){return i.object.get().$promise.then(function(e){return n.transform(e,"object_categories")})},findAllWithCallback:function(e){return i.object.get().$promise.then(function(t){e(n.transform(t,"object_categories"))})},delete:function(e,t,o){i.object.remove({object_id:e.id},e,t,o)},add:function(e,t,o){i.object.create({},e,t,o)}},action:{findOne:function(e,t){i.action.get({action_id:e}).$promise.then(function(e){t(n.transformOne(e,"action_categories"))})},findOneReturningPromise:function(e){return i.action.get({action_id:e}).$promise},findSome:function(e){var t=this;if(0===e.length)return[];var i=_(e).map(function(e){return t.findOneReturningPromise(e)});return o.all(i).then(function(e){return _(e).map(function(e){return n.transformOne(e,"action_categories")})})},findSomeWithCallback:function(e,t){var i=this;0===e.length&&t([]);var c=_(e).map(function(e){return i.findOneReturningPromise(e)});o.all(c).then(function(e){t(_(e).map(function(e){return n.transformOne(e,"action_categories")}))})},findAll:function(){return i.action.get().$promise.then(function(e){return n.transform(e,"action_categories")})},findAllWithCallback:function(e){return i.action.get().$promise.then(function(t){e(n.transform(t,"action_categories"))})},delete:function(e,t,o){i.action.remove({action_id:e.id},e,t,o)},add:function(e,t,o){i.action.create({},e,t,o)}}}}angular.module("moon").factory("metaDataService",e),e.$inject=["$resource","REST_URI","$q","utilService"]}(),function(){"use strict";function e(e,t,o,n,i){return{data:e(t.METARULES+":metarule_id",{},{query:{method:"GET"},get:{method:"GET",isArray:!1},update:{method:"PATCH"},create:{method:"POST"},remove:{method:"DELETE"}}),findAll:function(){return this.data.query().$promise.then(function(e){return i.transform(e,"meta_rules")})},findAllWithCallback:function(e){this.data.query().$promise.then(function(t){e(i.transform(t,"meta_rules"))})},findSomeWithMetaData:function(e){var t=this;if(0===e.length)return[];var o=_(e).map(function(e){return t.findOneReturningPromise(e)});return n.all(o).then(function(e){return _(e).map(function(e){var o=i.transformOne(e,"meta_rules");return o=t.findMetaDataFromMetaRule(o)})})},findSomeWithCallback:function(e,t){var o=this;if(0===e.length)return[];var c=_(e).map(function(e){return o.findOneReturningPromise(e)});return n.all(c).then(function(e){t(_(e).map(function(e){return i.transformOne(e,"meta_rules")}))})},findOneReturningPromise:function(e){return this.data.get({metarule_id:e}).$promise},findOne:function(e){return this.data.get({metarule_id:e}).$promise.then(function(e){return i.transformOne(e,"meta_rules")})},findOneWithCallback:function(e,t){this.data.get({metarule_id:e}).$promise.then(function(e){t(i.transformOne(e,"meta_rules"))})},findOneWithMetaData:function(e){var t=this;return this.data.get({metarule_id:e}).$promise.then(function(e){var o=i.transformOne(e,"meta_rules");return o=t.findMetaDataFromMetaRule(o)})},findMetaDataFromMetaRule:function(e){return e.subject_categories.length>0?o.subject.findSome(e.subject_categories).then(function(t){e.subject_categories_values=t}):e.subject_categories_values=[],e.object_categories.length>0?o.object.findSome(e.object_categories).then(function(t){e.object_categories_values=t}):e.object_categories_values=[],e.action_categories.length>0?o.action.findSome(e.action_categories).then(function(t){e.action_categories_values=t}):e.action_categories_values=[],e},delete:function(e,t,o){this.data.remove({metarule_id:e.id},e,t,o)},update:function(e,t,o){delete e.subject_categories_values,delete e.object_categories_values,delete e.action_categories_values,this.data.update({metarule_id:e.id},e,t,o)}}}angular.module("moon").factory("metaRuleService",e),e.$inject=["$resource","REST_URI","metaDataService","$q","utilService"]}(),function(){"use strict";function e(e,t,o,n,i){function c(){i.findAllWithCallBack(a)}function a(e){l.pdps=_.filter(e,function(e){return _.isNull(e.keystone_project_id)}),l.pdpsLoading=!1}function r(){function c(n){l.project.pdp=l.selectedPDP,t("moon.project.map.success",{projectName:l.project.name,pdpName:l.selectedPDP.name}).then(function(e){o.alertSuccess(e)}),l.mappingLoading=!1,e.$emit("event:projectMappedSuccess",l.project)}function a(n){t("moon.project.map.error",{projectName:l.project.name,pdpName:l.selectedPDP.name}).then(function(e){o.alertError(e)}),l.mappingLoading=!1,e.$emit("event:projectMappedError",l.project)}n.isInvalid(l.form)?n.checkFieldsValidity(l.form):(l.mappingLoading=!0,i.map(l.selectedPDP,l.project.id,c,a))}var l=this;l.form={},l.project=e.project,l.pdps=[],l.pdpsLoading=!0,l.selectedPDP=null,l.map=r,function(){c()}()}angular.module("moon").controller("ProjectMapController",e),e.$inject=["$scope","$translate","alertService","formService","pdpService"]}(),function(){"use strict";function e(e,t,o,n){function i(){function i(n){t("moon.project.unmap.success",{projectName:c.project.name,pdpName:r}).then(function(e){o.alertSuccess(e)}),c.unMappingLoading=!1,delete c.project.mapping,delete c.project.pdp,e.$emit("event:projectUnmappedSuccess",c.project)}function a(n){t("moon.project.unmap.error",{projectName:c.project.name,pdpName:r}).then(function(e){o.alertError(e)}),c.unMappingLoading=!1,e.$emit("event:projectUnmappedError",c.project)}c.unMappingLoading=!0;var r=c.project.pdp.name;n.unMap(c.project.pdp,i,a)}var c=this;c.project=e.project,c.unMappingLoading=!1,c.unmap=i}angular.module("moon").controller("ProjectUnMapController",e),e.$inject=["$scope","$translate","alertService","pdpService"]}(),function(){"use strict";function e(e,t){function o(e,t){n.metaRule=t}var n=this;n.metaRule=e.metaRule;var i={"event:metaRuleBasicUpdatedSuccess":t.$on("event:metaRuleBasicUpdatedSuccess",o)};for(var c in i)e.$on("$destroy",i[c])}angular.module("moon").controller("MetaRulesEditController",e),e.$inject=["$scope","$rootScope"]}(),function(){"use strict";function e(){return{templateUrl:"html/model/edit/metarules/action/metarules-edit-basic.tpl.html",bindToController:!0,controller:t,controllerAs:"edit",scope:{metaRule:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c){function a(){function a(t){var o=c.transformOne(t,"meta_rules");i("moon.model.metarules.edit.basic.success",{metaRuleName:o.name}).then(function(e){n.alertSuccess(e)}),l.loading=!1,e.$emit("event:metaRuleBasicUpdatedSuccess",o)}function r(e){i("moon.model.edit.basic.error",{metaRuleName:l.metaRule.name}).then(function(e){n.alertError(e)}),l.loading=!1}o.isInvalid(l.form)?o.checkFieldsValidity(l.form):(l.loading=!0,t.update(l.metaRuleToEdit,a,r))}function r(){l.metaRuleToEdit=angular.copy(l.metaRule)}var l=this;l.editMetaRule=a,l.init=r,l.form={},function(){l.metaRule=e.edit.metaRule,l.metaRuleToEdit=angular.copy(l.metaRule)}()}angular.module("moon").directive("moonMetaRulesEditBasic",e),e.$inject=[],angular.module("moon").controller("moonMetaRulesEditBasicController",t),t.$inject=["$scope","metaRuleService","formService","alertService","$translate","utilService"]}(),function(){"use strict";function e(){return{templateUrl:"html/policy/edit/parameter/assignments/assignments-edit.tpl.html",bindToController:!0,controller:t,controllerAs:"edit",scope:{assignmentsType:"=",policy:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c,a,r,l,s,d){function u(){E.assignments={id:null,category_id:null,data_id:null,policy_id:null},p(),h()}function m(){function c(t){var i={};switch(E.assignmentsType){case l.TYPE.SUBJECT:i=a.transformOne(t,"subject_assignments");break;case l.TYPE.OBJECT:i=a.transformOne(t,"object_assignments");break;case l.TYPE.ACTION:i=a.transformOne(t,"action_assignments")}n("moon.policy.assignments.edit.create.success").then(function(e){o.alertSuccess(e)}),s&&i.policy_id===E.policy.id?(e.$emit("event:createAssignmentsFromAssignmentsEditSuccess",E.assignmentsType),u(),P()):s&&(u(),P())}function r(e){n("moon.policy.rules.edit.action.add.create.error").then(function(e){o.alertError(e)}),P()}if(E.assignementsAttributeValid=!0,S(),i.isInvalid(E.form))i.checkFieldsValidity(E.form);else if(E.assignementsAttributeValid){T();var s=!1;E.assignments.id=E.selectedPerimeter.id,E.assignments.category_id=E.selectedCategory.id,E.assignments.policy_id=E.selectedPolicy.id;var d=angular.copy(E.selectedDataList);_.each(d,function(e){E.assignments.data_id=e.id;var o=angular.copy(E.assignments);switch(E.assignmentsType){case l.TYPE.SUBJECT:t.subject.add(o,E.policy.id,c,r);break;case l.TYPE.OBJECT:t.object.add(o,E.policy.id,c,r);break;case l.TYPE.ACTION:t.action.add(o,E.policy.id,c,r)}}),s=!0}}function p(){E.policyList=[],E.loadingPolicies=!0,c.findAllWithCallback(function(e){_.each(e,function(e){e.id===E.policy.id&&(E.selectedPolicy=e)}),E.policyList=e,E.loadingPolicies=!1})}function f(){function e(e){E.perimeterList=e,E.loadingPerimeters=!1}switch(E.perimeterList=[],E.loadingPerimeters=!0,E.assignmentsType){case l.TYPE.SUBJECT:r.subject.findAllFromPolicyWithCallback(E.selectedPolicy.id,e);break;case l.TYPE.OBJECT:r.object.findAllFromPolicyWithCallback(E.selectedPolicy.id,e);break;case l.TYPE.ACTION:r.action.findAllFromPolicyWithCallback(E.selectedPolicy.id,e);break;default:E.perimeterList=[],E.loadingPerimeters=!1}}function h(){function e(e){E.categoryList=e,E.loadingCategories=!1}switch(E.categoryList=[],E.loadingCategories=!0,E.assignmentsType){case l.TYPE.SUBJECT:s.subject.findAllWithCallback(e);break;case l.TYPE.OBJECT:s.object.findAllWithCallback(e);break;case l.TYPE.ACTION:s.action.findAllWithCallback(e);break;default:E.categoryList=[],E.loadingCategories=!1}}function g(e){function t(e){E.dataList=e,E.dataToBeSelected=angular.copy(E.dataList),E.selectedDataList=[],E.loadingData=!1}switch(E.dataList=[],E.dataToBeSelected=[],E.selectedDataList=[],E.loadingData=!0,E.assignmentsType){case l.TYPE.SUBJECT:d.subject.findAllFromCategoriesWithCallback(E.selectedPolicy.id,e,t);break;case l.TYPE.OBJECT:d.object.findAllFromCategoriesWithCallback(E.selectedPolicy.id,e,t);break;case l.TYPE.ACTION:d.action.findAllFromCategoriesWithCallback(E.selectedPolicy.id,e,t);break;default:E.loadingData=!1}}function y(){E.dataToBeSelected=_.without(E.dataToBeSelected,E.selectedData),E.selectedDataList.push(E.selectedData),b()}function v(e){E.dataToBeSelected.push(e),E.selectedDataList=_.without(E.selectedDataList,e)}function b(){E.selectedData=void 0}function j(e){if(_.isUndefined(e))return"(None)";switch(E.assignmentsType){case l.TYPE.SUBJECT:return e.name;case l.TYPE.OBJECT:case l.TYPE.ACTION:return e.value.name;default:return e.name}}function S(){E.selectedDataList.length>=1?E.assignementsAttributeValid=!0:E.assignementsAttributeValid=!1}function T(){E.loading=!0}function P(){E.loading=!1}var E=this;E.assignmentsType=e.edit.assignmentsType,E.policy=e.edit.policy,E.laoading=!1,E.form={},E.policyList=[],E.loadingPolicies=!0,E.categoryList=[],E.loadingCategories=!0,E.perimeterList=[],E.loadingPerimeters=!0,E.dataList=[],E.dataToBeSelected=[],E.selectedDataList=[],E.loadingData=!0,E.assignementsAttributeValid=!0,E.addSelectedData=y,E.removeSelectedData=v,E.getName=j,E.create=m,u(),e.$watch("edit.selectedPolicy",function(e){_.isUndefined(e)||f()}),e.$watch("edit.selectedCategory",function(e){b(),_.isUndefined(e)||g(e.id)})}angular.module("moon").directive("moonAssignmentsEdit",e),e.$inject=[],angular.module("moon").controller("moonAssignmentsEditController",t),t.$inject=["$scope","assignmentsService","alertService","$translate","formService","policyService","utilService","perimeterService","ASSIGNMENTS_CST","metaDataService","dataService"]}(),function(){"use strict";function e(){return{templateUrl:"html/policy/edit/parameter/assignments/assignments-list.tpl.html",bindToController:!0,controller:t,controllerAs:"list",scope:{policy:"=",editMode:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c,a,r,l,s,d){function u(){m(),p(),f()}function m(){$.loadingSub=!0,o.subject.findAllFromPolicyWithCallback($.policy.id,function(e){$.subjects=e,$.loadingSub=!1})}function p(){$.loadingObj=!0,o.object.findAllFromPolicyWithCallback($.policy.id,function(e){$.objects=e,$.loadingObj=!1})}function f(){$.loadingAct=!0,
-o.action.findAllFromPolicyWithCallback($.policy.id,function(e){$.actions=e,$.loadingAct=!1})}function h(e,t){function o(t){e.callPerimeterInProgress=!1,e.perimeter=t}if(_.has(e,"perimeter"))return e.perimeter;if(!_.has(e,"callPerimeterInProgress"))switch(e.callPerimeterInProgress=!0,t){case a.TYPE.SUBJECT:s.subject.findOneFromPolicyWithCallback($.policy.id,e.subject_id,o);break;case a.TYPE.OBJECT:s.object.findOneFromPolicyWithCallback($.policy.id,e.object_id,o);break;case a.TYPE.ACTION:s.action.findOneFromPolicyWithCallback($.policy.id,e.action_id,o)}return!1}function g(e,t){function o(t){e.callCategoryInProgress=!1,e.category=t}if(_.has(e,"category"))return e.category;if(!_.has(e,"callCategoryInProgress"))switch(e.callCategoryInProgress=!0,t){case a.TYPE.SUBJECT:l.subject.findOne(e.subject_cat_id,o);break;case a.TYPE.OBJECT:l.object.findOne(e.object_cat_id,o);break;case a.TYPE.ACTION:l.action.findOne(e.action_cat_id,o)}return!1}function y(e,t,o){function n(o){t.assignments_value[e].callDataInProgress=!1,t.assignments_value[e].data=o}if(_.has(t,"assignments_value")||(t.assignments_value=Array.apply(null,new Array(t.assignments.length)).map(function(){return{data:{}}})),_.has(t.assignments_value[e],"callDataInProgress")&&!t.assignments_value[e].callDataInProgress)return t.assignments_value[e].data;if(!_.has(t.assignments_value[e],"callDataInProgress"))switch(t.assignments_value[e].callDataInProgress=!0,o){case a.TYPE.SUBJECT:d.subject.data.findOne($.policy.id,t.category_id,t.assignments[e],n);break;case a.TYPE.OBJECT:d.object.data.findOne($.policy.id,t.category_id,t.assignments[e],n);break;case a.TYPE.ACTION:d.action.data.findOne($.policy.id,t.category_id,t.assignments[e],n)}return!1}function v(e,t){function c(t){n("moon.policy.assignments.subject.delete.success").then(function(e){i.alertSuccess(e)}),m(),e.loader=!1}function a(t){n("moon.policy.assignments.subject.delete.error",{subjectName:e.name,reason:t.message}).then(function(e){i.alertError(e)}),e.loader=!1}e.loader=!0,o.subject.delete($.policy.id,e.subject_id,e.subject_cat_id,t,c,a)}function b(e,t){function c(t){n("moon.policy.assignments.object.delete.success").then(function(e){i.alertSuccess(e)}),p(),e.loader=!1}function a(t){n("moon.policy.assignments.object.delete.error",{objectName:e.name,reason:t.message}).then(function(e){i.alertError(e)}),e.loader=!1}e.loader=!0,o.object.delete($.policy.id,e.object_id,e.object_cat_id,t,c,a)}function j(e,t){function c(t){n("moon.policy.assignments.action.delete.success").then(function(e){i.alertSuccess(e)}),f(),e.loader=!1}function a(t){n("moon.policy.assignments.action.delete.error",{actionName:e.name,reason:t.message}).then(function(e){i.alertError(e)}),e.loader=!1}e.loader=!0,o.action.delete($.policy.id,e.action_id,e.action_cat_id,t,c,a)}function S(){return $.subjects?$.subjects:[]}function T(){return $.objects?$.objects:[]}function P(){return $.actions?$.actions:[]}function E(e,t){switch(t){case a.TYPE.SUBJECT:m();break;case a.TYPE.OBJECT:p();break;case a.TYPE.ACTION:f();break;default:u()}}var $=this;$.policy=e.list.policy,$.editMode=e.list.editMode,$.typeOfSubject=a.TYPE.SUBJECT,$.typeOfObject=a.TYPE.OBJECT,$.typeOfAction=a.TYPE.ACTION,$.deleteSub=v,$.deleteObj=b,$.deleteAct=j,$.getSubjects=S,$.getObjects=T,$.getActions=P,$.getCategoryFromAssignment=g,$.getPerimeterFromAssignment=h,$.getDataFromAssignmentsIndex=y,u();var C={"event:createAssignmentsFromAssignmentsEditSuccess":t.$on("event:createAssignmentsFromAssignmentsEditSuccess",E)};_.each(C,function(t){e.$on("$destroy",C[t])})}angular.module("moon").directive("moonAssignmentsList",e),e.$inject=[],angular.module("moon").controller("moonAssignmentsListController",t),t.$inject=["$scope","$rootScope","assignmentsService","$translate","alertService","policyService","ASSIGNMENTS_CST","utilService","metaDataService","perimeterService","dataService"]}(),function(){"use strict";function e(){return{templateUrl:"html/policy/edit/parameter/data/data-edit.tpl.html",bindToController:!0,controller:t,controllerAs:"edit",scope:{mnDataType:"=",policy:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c,a,r,l){function s(){function e(e){f.categoriesToBeSelected=e}switch(f.dataType){case o.TYPE.SUBJECT:l.subject.findAllWithCallback(e);break;case o.TYPE.OBJECT:l.object.findAllWithCallback(e);break;case o.TYPE.ACTION:l.action.findAllWithCallback(e);break;default:f.categoriesToBeSelected=[]}}function d(){f.policyList=[],a.findAllWithCallback(function(e){_.each(e,function(e){e.id===f.policy.id&&(f.selectedPolicy=e)}),f.policyList=e})}function u(){function a(t){var c={};switch(f.dataType){case o.TYPE.SUBJECT:c=r.transformOne(t.subject_data,"data");break;case o.TYPE.OBJECT:c=r.transformOne(t.object_data,"data");break;case o.TYPE.ACTION:c=r.transformOne(t.action_data,"data")}i("moon.policy.data.edit.create.success",{name:c.name}).then(function(e){n.alertSuccess(e)}),e.$emit("event:createDataFromDataEditSuccess",c,f.dataType),p(),f.list.push(c)}function l(e){i("moon.policy.data.edit.create.error",{name:s.name}).then(function(e){n.alertError(e)}),p()}if(c.isInvalid(f.form))c.checkFieldsValidity(f.form);else{m();var s=angular.copy(f.data);switch(f.dataType){case o.TYPE.SUBJECT:t.subject.add(s,f.policy.id,f.selectedCategory.id,a,l);break;case o.TYPE.OBJECT:t.object.add(s,f.policy.id,f.selectedCategory.id,a,l);break;case o.TYPE.ACTION:t.action.add(s,f.policy.id,f.selectedCategory.id,a,l)}}}function m(){f.loading=!0}function p(){f.loading=!1}var f=this;f.dataType=e.edit.mnDataType,f.policy=e.edit.policy,f.fromList=!1,f.loading=!1,f.form={},f.data={name:null,description:null},f.list=[],f.policyList=[],f.categoriesToBeSelected=[],f.create=u,function(){function e(e){_.each(e,function(e){e.policy_id!==f.policy.id&&f.list.push(e)})}switch(s(),d(),f.dataType){case o.TYPE.SUBJECT:t.subject.findAllFromPolicyWithCallback(f.policy.id,e);break;case o.TYPE.OBJECT:t.object.findAllFromPolicyWithCallback(f.policy.id,e);break;case o.TYPE.ACTION:t.action.findAllFromPolicyWithCallback(f.policy.id,e);break;default:f.list=[]}}()}angular.module("moon").directive("moonDataEdit",e),e.$inject=[],angular.module("moon").controller("moonDataEditController",t),t.$inject=["$scope","dataService","DATA_CST","alertService","$translate","formService","policyService","utilService","metaDataService"]}(),function(){"use strict";function e(){return{templateUrl:"html/policy/edit/parameter/data/data-list.tpl.html",bindToController:!0,controller:t,controllerAs:"list",scope:{policy:"=",editMode:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c,a){function r(){S.loadingSub=!0,o.subject.findAllFromPolicyWithCallback(S.policy.id,function(e){S.subjects=e,S.loadingSub=!1})}function l(){S.loadingObj=!0,o.object.findAllFromPolicyWithCallback(S.policy.id,function(e){S.objects=e,S.loadingObj=!1})}function s(){S.loadingAct=!0,o.action.findAllFromPolicyWithCallback(S.policy.id,function(e){S.actions=e,S.loadingAct=!1})}function d(e,t){function o(t){e.callCategoryInProgress=!1,e.category=t}if(_.has(e,"category"))return e.category;if(!_.has(e,"callCategoryInProgress"))switch(e.callCategoryInProgress=!0,t){case c.TYPE.SUBJECT:a.subject.findOne(e.category_id,o);break;case c.TYPE.OBJECT:a.object.findOne(e.category_id,o);break;case c.TYPE.ACTION:a.action.findOne(e.category_id,o)}return!1}function u(e){function t(t){n("moon.policy.data.subject.delete.success",{subjectName:e.name}).then(function(e){i.alertSuccess(e)}),y(e),e.loader=!1}function c(t){n("moon.policy.data.subject.delete.error",{subjectName:e.name,reason:t.message}).then(function(e){i.alertError(e)}),e.loader=!1}e.loader=!0,o.subject.delete(e,S.policy.id,e.category_id,t,c)}function m(e){function t(t){n("moon.policy.data.object.delete.success",{objectName:e.name}).then(function(e){i.alertSuccess(e)}),v(e),e.loader=!1}function c(t){n("moon.policy.data.object.delete.error",{objectName:e.name,reason:t.message}).then(function(e){i.alertError(e)}),e.loader=!1}e.loader=!0,o.object.delete(e,S.policy.id,e.category_id,t,c)}function p(e){function t(t){n("moon.policy.data.action.delete.success",{actionName:e.name}).then(function(e){i.alertSuccess(e)}),b(e),e.loader=!1}function c(t){n("moon.policy.data.action.delete.error",{actionName:e.name,reason:t.message}).then(function(e){i.alertError(e)}),e.loader=!1}e.loader=!0,o.action.delete(e,S.policy.id,e.category_id,t,c)}function f(){return S.subjects?S.subjects:[]}function h(){return S.objects?S.objects:[]}function g(){return S.actions?S.actions:[]}function y(e){S.subjects=_.without(S.subjects,e)}function v(e){S.objects=_.without(S.objects,e)}function b(e){S.actions=_.without(S.actions,e)}function j(e,t,o){switch(o){case c.TYPE.SUBJECT:S.subjects.push(t);break;case c.TYPE.OBJECT:S.objects.push(t);break;case c.TYPE.ACTION:S.actions.push(t)}}var S=this;S.policy=e.list.policy,S.editMode=e.list.editMode,S.typeOfSubject=c.TYPE.SUBJECT,S.typeOfObject=c.TYPE.OBJECT,S.typeOfAction=c.TYPE.ACTION,S.deleteSub=u,S.deleteObj=m,S.deleteAct=p,S.getSubjects=f,S.getObjects=h,S.getActions=g,S.getCategoryFromData=d,function(){r(),l(),s()}();var T={"event:createDataFromDataEditSuccess":t.$on("event:createDataFromDataEditSuccess",j)};_.each(T,function(t){e.$on("$destroy",T[t])})}angular.module("moon").directive("moonDataList",e),e.$inject=[],angular.module("moon").controller("moonDataListController",t),t.$inject=["$scope","$rootScope","dataService","$translate","alertService","DATA_CST","metaDataService"]}(),function(){"use strict";function e(){return{templateUrl:"html/policy/edit/parameter/perimeter/perimeter-edit.tpl.html",bindToController:!0,controller:t,controllerAs:"edit",scope:{perimeterType:"=",policy:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c,a,r,l){function s(){function e(e){_.each(e,function(e){-1===_.indexOf(e.policy_list,T.policy.id)&&T.list.push(e)})}switch(d(),T.perimeterType){case n.TYPE.SUBJECT:o.subject.findAllWithCallback(e);break;case n.TYPE.OBJECT:o.object.findAllWithCallback(e);break;case n.TYPE.ACTION:o.action.findAllWithCallback(e);break;default:T.list=[]}}function d(){T.policyList=[],r.findAllWithCallback(function(e){T.policyList=e,T.policiesToBeSelected=angular.copy(T.policyList)})}function u(){T.selectedPolicy&&!_.contains(T.perimeter.policy_list,T.selectedPolicy.id)&&(T.perimeter.policy_list.push(T.selectedPolicy.id),T.selectedPolicyList.push(T.selectedPolicy),T.policiesToBeSelected=_.without(T.policiesToBeSelected,T.selectedPolicy))}function m(){T.perimeter.policy_list=[],T.selectedPolicyList=[],T.policiesToBeSelected=angular.copy(T.policyList)}function p(e){T.policiesToBeSelected.push(e),T.perimeter.policy_list=_.without(T.perimeter.policy_list,e.id),T.selectedPolicyList=_.without(T.selectedPolicyList,e)}function f(){function e(e){c("moon.perimeter.update.success",{policyName:a.name}).then(function(e){i.alertSuccess(e)}),b()}function t(e){c("moon.policy.update.error",{policyName:a.name,reason:e.message}).then(function(e){i.alertError(e)}),b()}if(T.selectedPerimeter){v();var a=T.selectedPerimeter;switch(a.policy_list.push(T.policy.id),T.perimeterType){case n.TYPE.SUBJECT:o.subject.update(a,e,t);break;case n.TYPE.OBJECT:o.object.update(a,e,t);break;case n.TYPE.ACTION:o.action.update(a,e,t)}}}function h(){function t(t){var o={};switch(T.perimeterType){case n.TYPE.SUBJECT:o=l.transformOne(t,"subjects");break;case n.TYPE.OBJECT:o=l.transformOne(t,"objects");break;case n.TYPE.ACTION:o=l.transformOne(t,"actions")}c("moon.policy.perimeter.edit.create.success",{name:o.name}).then(function(e){i.alertSuccess(e)}),b(),-1===_.indexOf(o.policy_list,T.policy.id)?T.list.push(o):e.$emit("event:createAssignmentsFromAssignmentsEditSuccess",o,T.perimeterType),j(),m()}function r(e){c("moon.policy.perimeter.edit.create.error",{name:s.name}).then(function(e){i.alertError(e)}),b()}if(a.isInvalid(T.form))a.checkFieldsValidity(T.form);else{v();var s=angular.copy(T.perimeter);switch(T.perimeterType){case n.TYPE.SUBJECT:o.subject.add(s,t,r);break;case n.TYPE.OBJECT:o.object.add(s,t,r);break;case n.TYPE.ACTION:o.action.add(s,t,r)}}}function g(){function t(t){c("moon.policy.perimeter.edit.delete.success",{name:d.name}).then(function(e){i.alertSuccess(e)}),r.findOneReturningPromise(T.policy.id).then(function(t){T.policy=l.transformOne(t,"policies"),y(),s(),b(),e.$emit("event:deletePerimeterFromPerimeterAddSuccess",T.policy)})}function a(e){c("moon.policy.perimeter.edit.delete.error",{name:d.name}).then(function(e){i.alertError(e)}),b()}if(T.selectedPerimeter){v();var d=angular.copy(T.selectedPerimeter);switch(T.perimeterType){case n.TYPE.SUBJECT:o.subject.delete(d,t,a);break;case n.TYPE.OBJECT:o.object.delete(d,t,a);break;case n.TYPE.ACTION:o.action.delete(d,t,a)}}}function y(){delete T.selectedPerimeter}function v(){T.loading=!0}function b(){T.loading=!1}function j(){T.fromList=!0}function S(e,t,o){o===T.perimeterType&&-1===_.indexOf(t.policy_list,T.policy.id)&&T.list.push(t)}var T=this;T.perimeterType=e.edit.perimeterType,T.subjectType=n.TYPE.SUBJECT,T.policy=e.edit.policy,T.fromList=!0,T.loading=!1,T.form={},T.perimeter={name:null,description:null,partner_id:null,policy_list:[],email:null},T.list=[],T.policyList=[],T.policiesToBeSelected=[],T.selectedPolicyList=[],T.create=h,T.addToPolicy=f,T.addPolicyToPerimeter=u,T.clearSelectedPolicies=m,T.removeSelectedPolicy=p,T.deletePerimeter=g,s();var P={"event:unMapPerimeterFromPerimeterList":t.$on("event:unMapPerimeterFromPerimeterList",S)};_.each(P,function(t){e.$on("$destroy",P[t])})}angular.module("moon").directive("moonPerimeterEdit",e),e.$inject=[],angular.module("moon").controller("moonPerimeterEditController",t),t.$inject=["$scope","$rootScope","perimeterService","PERIMETER_CST","alertService","$translate","formService","policyService","utilService"]}(),function(){"use strict";function e(){return{templateUrl:"html/policy/edit/parameter/perimeter/perimeter-list.tpl.html",bindToController:!0,controller:t,controllerAs:"list",scope:{policy:"=",editMode:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c){function a(){r(),l(),s()}function r(){v.loadingSub=!0,o.subject.findAllFromPolicyWithCallback(v.policy.id,function(e){v.subjects=e,v.loadingSub=!1})}function l(){v.loadingObj=!0,o.object.findAllFromPolicyWithCallback(v.policy.id,function(e){v.objects=e,v.loadingObj=!1})}function s(){v.loadingAct=!0,o.action.findAllFromPolicyWithCallback(v.policy.id,function(e){v.actions=e,v.loadingAct=!1})}function d(t){function r(o){n("moon.policy.perimeter.update.success",{perimeterName:s.name}).then(function(e){i.alertSuccess(e)}),e.$emit("event:unMapPerimeterFromPerimeterList",t,c.TYPE.SUBJECT),a(),t.loader=!1}function l(e){n("moon.policy.perimeter.update.error",{perimeterName:t.name,reason:e.message}).then(function(e){i.alertError(e)}),t.loader=!1}t.policy_list=_.without(t.policy_list,v.policy.id),t.loader=!0;var s=angular.copy(t);o.subject.unMapPerimeterFromPolicy(v.policy.id,t.id,r,l)}function u(t){function r(o){n("moon.policy.perimeter.update.success",{perimeterName:s.name}).then(function(e){i.alertSuccess(e)}),e.$emit("event:unMapPerimeterFromPerimeterList",t,c.TYPE.OBJECT),a(),t.loader=!1}function l(e){n("moon.policy.perimeter.update.error",{perimeterName:t.name,reason:e.message}).then(function(e){i.alertError(e)}),t.loader=!1}t.policy_list=_.without(t.policy_list,v.policy.id),t.loader=!0;var s=angular.copy(t);o.object.unMapPerimeterFromPolicy(v.policy.id,t.id,r,l)}function m(t){function r(o){n("moon.policy.perimeter.update.success",{perimeterName:s.name}).then(function(e){i.alertSuccess(e)}),e.$emit("event:unMapPerimeterFromPerimeterList",t,c.TYPE.ACTION),a(),t.loader=!1}function l(e){n("moon.policy.perimeter.update.error",{perimeterName:t.name,reason:e.message}).then(function(e){i.alertError(e)}),t.loader=!1}t.policy_list=_.without(t.policy_list,v.policy.id),t.loader=!0;var s=angular.copy(t);o.action.unMapPerimeterFromPolicy(v.policy.id,t.id,r,l)}function p(){return v.subjects?v.subjects:[]}function f(){return v.objects?v.objects:[]}function h(){return v.actions?v.actions:[]}function g(e,t){v.policy=t,a()}function y(e,t,o){switch(o){case c.TYPE.SUBJECT:v.subjects.push(t);break;case c.TYPE.OBJECT:v.objects.push(t);break;case c.TYPE.ACTION:v.actions.push(t)}}var v=this;v.policy=e.list.policy,v.editMode=e.list.editMode,v.typeOfSubject=c.TYPE.SUBJECT,v.typeOfObject=c.TYPE.OBJECT,v.typeOfAction=c.TYPE.ACTION,v.unMapSub=d,v.unMapObj=u,v.unMapAct=m,v.getSubjects=p,v.getObjects=f,v.getActions=h,a();var b={"event:deletePerimeterFromPerimeterAddSuccess":t.$on("event:deletePerimeterFromPerimeterAddSuccess",g),"event:createAssignmentsFromAssignmentsEditSuccess":t.$on("event:createAssignmentsFromAssignmentsEditSuccess",y)};_.each(b,function(t){e.$on("$destroy",b[t])})}angular.module("moon").directive("moonPerimeterList",e),e.$inject=[],angular.module("moon").controller("moonPerimeterListController",t),t.$inject=["$scope","$rootScope","perimeterService","$translate","alertService","PERIMETER_CST"]}(),function(){"use strict";function e(){return{templateUrl:"html/policy/edit/parameter/rules/rules-edit.tpl.html",bindToController:!0,controller:t,controllerAs:"edit",scope:{policy:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c,a,r,l,s,d,u){function m(){R.rules={meta_rule_id:null,rule:[],policy_id:null,instructions:'[{"decision": "grant"}]',enabled:!0},M(),p(),P()}function p(){R.policyList=[],c.findAllWithCallback(function(e){_.each(e,function(e){e.id===R.policy.id&&(R.selectedPolicy=e)}),R.policyList=e})}function f(){R.selectedPolicy.meta_rules_values=void 0,s.findOneWithCallback(R.selectedPolicy.model_id,function(e){r.findSomeWithCallback(e.meta_rules,function(e){R.selectedPolicy.meta_rules_values=e})})}function h(e,t,o){l.subject.findSomeWithCallback(e,function(e){R.categories.subject=e,R.categories.loadingSubjects=!1,_.each(R.categories.subject,function(e){d.subject.findAllFromCategoriesWithCallback(R.selectedPolicy.id,e.id,function(e){R.data.subject=e,R.data.loadingSubjects=!1,R.data.subjectsToBeSelected=angular.copy(R.data.subject)})})}),l.object.findSomeWithCallback(t,function(e){R.categories.object=e,R.categories.loadingObjects=!1,_.each(R.categories.object,function(e){d.object.findAllFromCategoriesWithCallback(R.selectedPolicy.id,e.id,function(e){R.data.object=e,R.data.loadingObjects=!1,R.data.objectsToBeSelected=angular.copy(R.data.object)})})}),l.action.findSomeWithCallback(o,function(e){R.categories.action=e,R.categories.loadingActions=!1,_.each(R.categories.action,function(e){d.action.findAllFromCategoriesWithCallback(R.selectedPolicy.id,e.id,function(e){R.data.action=e,R.data.loadingActions=!1,R.data.actionsToBeSelected=angular.copy(R.data.action)})})})}function g(){function c(t){var i=a.transformOne(t,"rules");n("moon.policy.rules.edit.action.add.create.success").then(function(e){o.alertSuccess(e)}),e.$emit("event:createRulesFromDataRulesSuccess",i),m(),T()}function r(e){n("moon.policy.rules.edit.action.add.create.error").then(function(e){o.alertError(e)}),T()}if(R.instructionsValid=!0,R.numberOfSelectedSubjectValid=!0,R.numberOfSelectedObjecttValid=!0,R.numberOfSelectedActionsValid=!0,y(),v(),i.isInvalid(R.form))i.checkFieldsValidity(R.form);else if(R.instructionsValid&&v()){S(),A(),R.rules.meta_rule_id=R.selectedMetaRules.id,R.rules.policy_id=R.selectedPolicy.id;var l=angular.copy(R.rules);l.instructions=JSON.parse(R.rules.instructions),t.add(l,R.policy.id,c,r)}}function y(){b(R.rules.instructions)?R.instructionsValid=!0:R.instructionsValid=!1}function v(){return $(u.TYPE.SUBJECT)?R.numberOfSelectedSubjectValid=!0:R.numberOfSelectedSubjectValid=!1,$(u.TYPE.OBJECT)?R.numberOfSelectedObjecttValid=!0:R.numberOfSelectedObjecttValid=!1,$(u.TYPE.ACTION)?R.numberOfSelectedActionsValid=!0:R.numberOfSelectedActionsValid=!1,R.numberOfSelectedSubjectValid&&R.numberOfSelectedObjecttValid&&R.numberOfSelectedActionsValid}function b(e){return!_.isUndefined(e)&&j(e)}function j(e){var t=null;try{t=JSON.parse(e)}catch(e){return!1}return"object"==typeof t&&null!==t}function S(){R.loading=!0}function T(){R.loading=!1}function P(){R.selectedMetaRules=void 0,E()}function E(){R.selectedSubject=void 0,R.selectedObject=void 0,R.selectedAction=void 0}function $(e){if(!R.selectedMetaRules)return!1;switch(e){case u.TYPE.SUBJECT:return R.data.selectedSubjectsList.length===R.selectedMetaRules.subject_categories.length;case u.TYPE.OBJECT:return R.data.selectedObjectsList.length===R.selectedMetaRules.object_categories.length;case u.TYPE.ACTION:return R.data.selectedActionsList.length===R.selectedMetaRules.action_categories.length}}function C(e){switch(e){case u.TYPE.SUBJECT:if(!R.selectedSubject||$(e)||_.contains(R.data.selectedSubjectsList,R.selectedSubject))return;R.data.selectedSubjectsList.push(R.selectedSubject),R.data.subjectsToBeSelected=_.without(R.data.subjectsToBeSelected,R.selectedSubject);break;case u.TYPE.OBJECT:if(!R.selectedObject||$(e)||_.contains(R.data.selectedObjectsList,R.selectedObject))return;R.data.selectedObjectsList.push(R.selectedObject),R.data.objectsToBeSelected=_.without(R.data.objectsToBeSelected,R.selectedObject);break;case u.TYPE.ACTION:if(!R.selectedAction||$(e)||_.contains(R.data.selectedActionsList,R.selectedAction))return;R.data.selectedActionsList.push(R.selectedAction),R.data.actionsToBeSelected=_.without(R.data.actionsToBeSelected,R.selectedAction)}}function O(e,t){switch(t){case u.TYPE.SUBJECT:R.data.subjectsToBeSelected.push(e),R.data.selectedSubjectsList=_.without(R.data.selectedSubjectsList,e);break;case u.TYPE.OBJECT:R.data.objectsToBeSelected.push(e),R.data.selectedObjectsList=_.without(R.data.selectedObjectsList,e);break;case u.TYPE.ACTION:R.data.actionsToBeSelected.push(e),R.data.selectedActionsList=_.without(R.data.selectedActionsList,e)}}function A(){function e(e){R.rules.rule.push(e.id)}_.each(R.data.selectedSubjectsList,e),_.each(R.data.selectedObjectsList,e),_.each(R.data.selectedActionsList,e)}function M(){R.data={subject:[],loadingSubjects:!0,subjectsToBeSelected:[],selectedSubjectsList:[],subjectCST:u.TYPE.SUBJECT,object:[],loadingObjects:!0,objectsToBeSelected:[],selectedObjectsList:[],objectCST:u.TYPE.OBJECT,action:[],loadingActions:!0,actionsToBeSelected:[],selectedActionsList:[],actionCST:u.TYPE.ACTION}}var R=this;R.policy=e.edit.policy,R.editMode=!0,R.fromList=!1,R.loading=!1,R.form={},R.showDetailselectedMetaRules=!1,R.list=[],R.policyList=[],R.categories={subject:[],loadingSubjects:!0,object:[],loadingObjects:!0,action:[],loadingActions:!0},R.data={},R.create=g,R.addDataToRules=C,R.removeSelectedDataFromRules=O,R.isNumberSelectedDataAtMaximum=$,R.instructionsValid=!0,R.numberOfSelectedSubjectValid=!0,R.numberOfSelectedObjecttValid=!0,R.numberOfSelectedActionsValid=!0,m(),e.$watch("edit.selectedPolicy",function(e){P(),_.isUndefined(e)||f()}),e.$watch("edit.selectedMetaRules",function(e){E(),R.categories={subject:[],loadingSubjects:!0,object:[],loadingObjects:!0,action:[],loadingActions:!0},M(),_.isUndefined(e)||h(e.subject_categories,e.object_categories,e.action_categories)})}angular.module("moon").directive("moonRulesEdit",e),e.$inject=[],angular.module("moon").controller("moonRulesEditController",t),t.$inject=["$scope","rulesService","alertService","$translate","formService","policyService","utilService","metaRuleService","metaDataService","modelService","dataService","DATA_CST"]}(),function(){"use strict";function e(){return{templateUrl:"html/policy/edit/parameter/rules/rules-list.tpl.html",bindToController:!0,controller:t,controllerAs:"list",scope:{policy:"=",editMode:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c,a,r,l){function s(){c.findAllFromPolicyWithCallback(T.policy.id,function(e){T.rules=e,T.loadingRules=!1,v()})}function d(){return T.table=new o({page:1,count:10},{total:function(){return T.getRules().length},getData:function(e,t){var o=t.sorting()?n("orderBy")(T.getRules(),t.orderBy()):T.getRules();e.resolve(o.slice((t.page()-1)*t.count(),t.page()*t.count()))},$scope:{$data:{}}}),T.table}function u(e){return _.has(e,"meta_rule")?e.meta_rule:(_.has(e,"callMetaRuleInProgress")||(e.callMetaRuleInProgress=!0,i.findOneWithCallback(e.meta_rule_id,function(t){e.callMetaRuleInProgress=!1,e.meta_rule=t})),!1)}function m(e,t){if(_.has(t,"rule_value")||(t.rule_value=Array.apply(null,new Array(t.rule.length)).map(function(){return{category:{}}})),_.has(t.rule_value[e],"callCategoryInProgress")&&!t.rule_value[e].callCategoryInProgress)return t.rule_value[e].category;if(!_.has(t.rule_value[e],"callCategoryInProgress")){t.rule_value[e].callCategoryInProgress=!0;var o=0;T.isRuleIndexSubjectCategory(e,t)?(o=t.meta_rule.subject_categories[e],a.subject.data.findOne(T.policy.id,o,t.rule[e],function(o){t.rule_value[e].callCategoryInProgress=!1,t.rule_value[e].category=o})):T.isRuleIndexObjectCategory(e,t)?(o=t.meta_rule.object_categories[e-t.meta_rule.subject_categories.length],a.object.data.findOne(T.policy.id,o,t.rule[e],function(o){t.rule_value[e].callCategoryInProgress=!1,t.rule_value[e].category=o})):T.isRuleIndexActionCategory(e,t)?(o=t.meta_rule.action_categories[e-t.meta_rule.subject_categories.length-t.meta_rule.object_categories.length],a.action.data.findOne(T.policy.id,o,t.rule[e],function(o){t.rule_value[e].callCategoryInProgress=!1,t.rule_value[e].category=o})):(t.rule_value[e].callCategoryInProgress=!1,t.rule_value[e].category={name:"ERROR"})}return!1}function p(e,t){return e+1<=t.meta_rule.subject_categories.length}function f(e,t){var o=e+1;return t.meta_rule.subject_categories.length<o&&o<=t.meta_rule.object_categories.length+t.meta_rule.subject_categories.length}function h(e,t){var o=e+1;return t.meta_rule.object_categories.length+t.meta_rule.subject_categories.length<o&&o<=t.meta_rule.object_categories.length+t.meta_rule.subject_categories.length+t.meta_rule.action_categories.length}function g(){return T.rules?T.rules:[]}function y(){return T.getRules().length>0}function v(){T.table.total(T.rules.length),T.table.reload()}function b(e,t){T.rules.push(t),v()}function j(e){function t(){r("moon.policy.rules.edit.action.add.delete.success").then(function(e){l.alertSuccess(e)}),S(e),v(),e.loader=!1}function o(t){r("moon.policy.rules.edit.action.add.delete.success",{reason:t.message}).then(function(e){l.alertError(e)}),e.loader=!1}e.loader=!0,c.delete(e.id,T.policy.id,t,o)}function S(e){T.rules=_.without(T.rules,e)}var T=this;T.rules=[],T.editMode=e.list.editMode,T.loadingRules=!0,T.table={},T.getRules=g,T.hasRules=y,T.refreshRules=v,T.deleteRules=j,T.getMetaRuleFromRule=u,T.getCategoryFromRuleIndex=m,T.isRuleIndexSubjectCategory=p,T.isRuleIndexObjectCategory=f,T.isRuleIndexActionCategory=h,function(){d(),s()}();var P={"event:createRulesFromDataRulesSuccess":t.$on("event:createRulesFromDataRulesSuccess",b)};_.each(P,function(t){e.$on("$destroy",P[t])})}angular.module("moon").directive("moonRulesList",e),e.$inject=[],angular.module("moon").controller("moonRulesListController",t),t.$inject=["$scope","$rootScope","NgTableParams","$filter","metaRuleService","rulesService","dataService","$translate","alertService"]}(),function(){"use strict";function e(e,t,o){var n={subject:{policy:e(t.POLICIES+":policy_id/subject_assignments/:perimeter_id/:category_id/:data_id",{},{get:{method:"GET"},create:{method:"POST"},remove:{method:"DELETE"}})},object:{policy:e(t.POLICIES+":policy_id/object_assignments/:perimeter_id/:category_id/:data_id",{},{get:{method:"GET"},create:{method:"POST"},remove:{method:"DELETE"}})},action:{policy:e(t.POLICIES+":policy_id/action_assignments/:perimeter_id/:category_id/:data_id",{},{get:{method:"GET"},create:{method:"POST"},remove:{method:"DELETE"}})}};return{subject:{delete:function(e,t,o,i,c,a){n.subject.policy.remove({policy_id:e,perimeter_id:t,category_id:o,data_id:i},{},c,a)},add:function(e,t,o,i){n.subject.policy.create({policy_id:t},e,o,i)},findAllFromPolicyWithCallback:function(e,t){n.subject.policy.get({policy_id:e}).$promise.then(function(e){t(o.transform(e,"subject_assignments"))})}},object:{delete:function(e,t,o,i,c,a){n.object.policy.remove({policy_id:e,perimeter_id:t,category_id:o,data_id:i},{},c,a)},add:function(e,t,o,i){n.object.policy.create({policy_id:t},e,o,i)},findAllFromPolicyWithCallback:function(e,t){n.object.policy.get({policy_id:e}).$promise.then(function(e){t(o.transform(e,"object_assignments"))})}},action:{delete:function(e,t,o,i,c,a){n.action.policy.remove({policy_id:e,perimeter_id:t,category_id:o,data_id:i},{},c,a)},add:function(e,t,o,i){n.action.policy.create({policy_id:t},e,o,i)},findAllFromPolicyWithCallback:function(e,t){n.action.policy.get({policy_id:e}).$promise.then(function(e){t(o.transform(e,"action_assignments"))})}}}}angular.module("moon").factory("assignmentsService",e),e.$inject=["$resource","REST_URI","utilService"]}(),function(){"use strict";function e(e,t,o){var n={subject:{policy:e(t.POLICIES+":policy_id/subject_data/:subject_id/:category_id/:data_id",{},{get:{method:"GET"},create:{method:"POST"},remove:{method:"DELETE"}})},object:{policy:e(t.POLICIES+":policy_id/object_data/:object_id/:category_id/:data_id",{},{get:{method:"GET",isArray:!1},create:{method:"POST"},remove:{method:"DELETE"}})},action:{policy:e(t.POLICIES+":policy_id/action_data/:action_id/:category_id/:data_id",{},{get:{method:"GET",isArray:!1},create:{method:"POST"},remove:{method:"DELETE"}})}};return{subject:{findAllFromPolicyWithCallback:function(e,t){n.subject.policy.get({policy_id:e}).$promise.then(function(e){t(o.transform(e.subject_data[0],"data"))})},findAllFromCategoriesWithCallback:function(e,t,i){n.subject.policy.get({policy_id:e,category_id:t}).$promise.then(function(e){i(e.subject_data[0]?o.transform(e.subject_data[0],"data"):[])})},delete:function(e,t,o,i,c){n.subject.policy.remove({policy_id:t,category_id:o,data_id:e.id},e,i,c)},add:function(e,t,o,i,c){n.subject.policy.create({policy_id:t,category_id:o},e,i,c)},data:{findOne:function(e,t,i,c){n.subject.policy.get({policy_id:e,subject_id:t,data_id:i}).$promise.then(function(e){c(e.subject_data[0]?o.transformOne(e.subject_data[0],"data"):{})})}}},object:{findAllFromPolicyWithCallback:function(e,t){n.object.policy.get({policy_id:e}).$promise.then(function(e){t(o.transform(e.object_data[0],"data"))})},findAllFromCategoriesWithCallback:function(e,t,i){n.object.policy.get({policy_id:e,category_id:t}).$promise.then(function(e){i(e.object_data[0]?o.transform(e.object_data[0],"data"):[])})},delete:function(e,t,o,i,c){n.object.policy.remove({policy_id:t,category_id:o,data_id:e.id},e,i,c)},add:function(e,t,o,i,c){n.object.policy.create({policy_id:t,category_id:o},e,i,c)},data:{findOne:function(e,t,i,c){n.object.policy.get({policy_id:e,object_id:t,data_id:i}).$promise.then(function(e){c(e.object_data[0]?o.transformOne(e.object_data[0],"data"):{})})}}},action:{findAllFromPolicyWithCallback:function(e,t){n.action.policy.get({policy_id:e}).$promise.then(function(e){t(o.transform(e.action_data[0],"data"))})},findAllFromCategoriesWithCallback:function(e,t,i){n.action.policy.get({policy_id:e,category_id:t}).$promise.then(function(e){i(e.action_data[0]?o.transform(e.action_data[0],"data"):[])})},delete:function(e,t,o,i,c){n.action.policy.remove({policy_id:t,category_id:o,data_id:e.id},e,i,c)},add:function(e,t,o,i,c){n.action.policy.create({policy_id:t,category_id:o},e,i,c)},data:{findOne:function(e,t,i,c){n.action.policy.get({policy_id:e,action_id:t,data_id:i}).$promise.then(function(e){c(e.action_data[0]?o.transformOne(e.action_data[0],"data"):{})})}}}}}angular.module("moon").factory("dataService",e),e.$inject=["$resource","REST_URI","utilService"]}(),function(){"use strict";function e(e,t,o,n){var i={subject:{perimeter:e(t.PERIMETERS.subject+":subject_id",{},{get:{method:"GET",isArray:!1},create:{method:"POST"},remove:{method:"DELETE"},update:{method:"PATCH"}}),policy:e(t.POLICIES+":policy_id/subjects/:subject_id",{},{get:{method:"GET"},create:{method:"POST"},remove:{method:"DELETE"},update:{method:"PATCH"}})},object:{perimeter:e(t.PERIMETERS.object+":object_id",{},{get:{method:"GET",isArray:!1},create:{method:"POST"},remove:{method:"DELETE"},update:{method:"PATCH"}}),
-policy:e(t.POLICIES+":policy_id/objects/:object_id",{},{get:{method:"GET",isArray:!1},create:{method:"POST"},remove:{method:"DELETE"},update:{method:"PATCH"}})},action:{perimeter:e(t.PERIMETERS.action+":action_id",{},{get:{method:"GET",isArray:!1},create:{method:"POST"},remove:{method:"DELETE"},update:{method:"PATCH"}}),policy:e(t.POLICIES+":policy_id/actions/:action_id",{},{get:{method:"GET",isArray:!1},create:{method:"POST"},remove:{method:"DELETE"},update:{method:"PATCH"}})}};return{subject:{findOne:function(e,t){i.subject.perimeter.get({subject_id:e}).$promise.then(function(e){t(n.transformOne(e,"subjects"))})},findOneReturningPromise:function(e){return i.subject.perimeter.get({subject_id:e}).$promise},findSome:function(e){var t=this;if(0===e.length)return[];var i=_(e).map(function(e){return t.findOneReturningPromise(e)});return o.all(i).then(function(e){return _(e).map(function(e){return n.transformOne(e,"subjects")})})},unMapPerimeterFromPolicy:function(e,t,o,n){i.subject.policy.remove({policy_id:e,subject_id:t},{},o,n)},findAllFromPolicyWithCallback:function(e,t){i.subject.policy.get({policy_id:e}).$promise.then(function(e){t(n.transform(e,"subjects"))})},findOneFromPolicyWithCallback:function(e,t,o){i.subject.policy.get({policy_id:e,subject_id:t}).$promise.then(function(e){o(n.transformOne(e,"subjects"))})},findAll:function(){return i.subject.perimeter.get().$promise.then(function(e){return n.transform(e,"subjects")})},findAllWithCallback:function(e){return i.subject.perimeter.get().$promise.then(function(t){e(n.transform(t,"subjects"))})},delete:function(e,t,o){i.subject.perimeter.remove({subject_id:e.id},e,t,o)},add:function(e,t,o){i.subject.perimeter.create({},e,t,o)},update:function(e,t,o){i.subject.perimeter.update({subject_id:e.id},e,t,o)}},object:{findOne:function(e,t){i.object.perimeter.get({object_id:e}).$promise.then(function(e){t(n.transformOne(e,"objects"))})},findOneReturningPromise:function(e){return i.object.perimeter.get({object_id:e}).$promise},findSome:function(e){var t=this;if(0===e.length)return[];var i=_(e).map(function(e){return t.findOneReturningPromise(e)});return o.all(i).then(function(e){return _(e).map(function(e){return n.transformOne(e,"objects")})})},unMapPerimeterFromPolicy:function(e,t,o,n){i.object.policy.remove({policy_id:e,object_id:t},{},o,n)},findSomeWithCallback:function(e,t){var i=this;0===e.length&&t([]);var c=_(e).map(function(e){return i.findOneReturningPromise(e)});o.all(c).then(function(e){t(_(e).map(function(e){return n.transformOne(e,"objects")}))})},findAll:function(){return i.object.perimeter.get().$promise.then(function(e){return n.transform(e,"objects")})},findAllFromPolicyWithCallback:function(e,t){i.object.policy.get({policy_id:e}).$promise.then(function(e){t(n.transform(e,"objects"))})},findOneFromPolicyWithCallback:function(e,t,o){i.object.policy.get({policy_id:e,object_id:t}).$promise.then(function(e){o(n.transformOne(e,"objects"))})},findAllWithCallback:function(e){return i.object.perimeter.get().$promise.then(function(t){e(n.transform(t,"objects"))})},delete:function(e,t,o){i.object.perimeter.remove({object_id:e.id},e,t,o)},add:function(e,t,o){i.object.perimeter.create({},e,t,o)},update:function(e,t,o){i.object.perimeter.update({object_id:e.id},e,t,o)}},action:{findOne:function(e,t){i.action.perimeter.get({actionId:e}).$promise.then(function(e){t(n.transformOne(e,"actions"))})},findOneReturningPromise:function(e){return i.action.perimeter.get({actionId:e}).$promise},findSome:function(e){var t=this;if(0===e.length)return[];var i=_(e).map(function(e){return t.findOneReturningPromise(e)});return o.all(i).then(function(e){return _(e).map(function(e){return n.transformOne(e,"actions")})})},unMapPerimeterFromPolicy:function(e,t,o,n){i.action.policy.remove({policy_id:e,action_id:t},{},o,n)},findSomeWithCallback:function(e,t){var i=this;0===e.length&&t([]);var c=_(e).map(function(e){return i.findOneReturningPromise(e)});o.all(c).then(function(e){t(_(e).map(function(e){return n.transformOne(e,"actions")}))})},findAll:function(){return i.action.perimeter.get().$promise.then(function(e){return n.transform(e,"actions")})},findAllFromPolicyWithCallback:function(e,t){i.action.policy.get({policy_id:e}).$promise.then(function(e){t(n.transform(e,"actions"))})},findOneFromPolicyWithCallback:function(e,t,o){i.action.policy.get({policy_id:e,action_id:t}).$promise.then(function(e){o(n.transformOne(e,"actions"))})},findAllWithCallback:function(e){return i.action.perimeter.get().$promise.then(function(t){e(n.transform(t,"actions"))})},delete:function(e,t,o){i.action.perimeter.remove({action_id:e.id},e,t,o)},add:function(e,t,o){i.action.perimeter.create({},e,t,o)},update:function(e,t,o){i.action.perimeter.update({action_id:e.id},e,t,o)}}}}angular.module("moon").factory("perimeterService",e),e.$inject=["$resource","REST_URI","$q","utilService"]}(),function(){"use strict";function e(e,t,o){return{data:{policy:e(t.POLICIES+":policy_id/rules/:rule_id",{},{get:{method:"GET"},create:{method:"POST"},remove:{method:"DELETE"}})},add:function(e,t,o,n){this.data.policy.create({policy_id:t},e,o,n)},delete:function(e,t,o,n){this.data.policy.remove({policy_id:t,rule_id:e},{},o,n)},findAllFromPolicyWithCallback:function(e,t){this.data.policy.get({policy_id:e}).$promise.then(function(e){t(e.rules.rules)})}}}angular.module("moon").factory("rulesService",e),e.$inject=["$resource","REST_URI","utilService"]}(),function(){"use strict";function e(){return{templateUrl:"html/model/edit/metarules/action/mapping/metarules-add.tpl.html",bindToController:!0,controller:t,controllerAs:"add",scope:{metaRules:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c){function a(){function a(t){var i=c.transformOne(t,"meta_rules");n("moon.model.metarules.add.success",{metaRuleName:i.name}).then(function(e){o.alertSuccess(e)}),r.loading=!1,e.$emit("event:metaRuleCreatedSuccess",i)}function l(t){n("moon.model.metarules.add.error",{metaRuleName:r.metaRule.name}).then(function(e){o.alertError(e)}),r.loading=!1,e.$emit("event:metaRuleCreatedError",r.project)}i.isInvalid(r.form)?i.checkFieldsValidity(r.form):(r.loading=!0,t.data.create({},r.metaRule,a,l))}var r=this;r.laoading=!1,r.form={},r.metaRule={name:null,description:null,subject_categories:[],object_categories:[],action_categories:[]},r.create=a}angular.module("moon").directive("moonMetaRulesAdd",e),e.$inject=[],angular.module("moon").controller("moonMetaRulesAddController",t),t.$inject=["$scope","metaRuleService","alertService","$translate","formService","utilService"]}(),function(){"use strict";function e(e,t,o,n,i,c,a,r){function l(){h.metaRulesLoading=!0,c.findAllWithCallback(function(e){h.metaRules=e,h.metaRulesLoading=!1})}function s(){function t(t){var i=r.transformOne(t,"models");c.findSomeWithMetaData(i.meta_rules).then(function(t){i.meta_rules_values=t,n("moon.model.metarules.map.success",{modelName:i.name,metaRuleName:h.selectedMetaRule.name}).then(function(e){o.alertSuccess(e)}),h.mappingLoading=!1,e.$emit("event:metaRuleMapToModelSuccess",i)})}function l(e){n("moon.model.metarules.map.error",{modelName:h.model.name,metaRuleName:h.selectedMetaRule.name}).then(function(e){o.alertError(e)}),h.mappingLoading=!1}if(i.isInvalid(h.form))i.checkFieldsValidity(h.form);else{h.mappingLoading=!0;var s=angular.copy(h.model);s.meta_rules.push(h.selectedMetaRule.id),a.update(s,t,l)}}function d(){delete h.selectedMetaRule}function u(){function t(t){n("moon.model.metarules.delete.success",{metaRuleName:a.name}).then(function(e){o.alertSuccess(e)}),d(),h.mappingLoading=!1,l(),e.$emit("event:deleteMetaRule",a)}function i(e){n("moon.model.metarules.delete.error",{metaRuleName:a.name}).then(function(e){o.alertError(e)}),h.mappingLoading=!1}if(h.selectedMetaRule){h.mappingLoading=!0;var a=angular.copy(h.selectedMetaRule);c.delete(a,t,i)}}function m(e,t){h.metaRules.push(t),f()}function p(e){}function f(){h.addMetaRuleToList=!1}var h=this;h.metaRules=[],h.model=e.model,h.addMetaRuleToList=!1,h.mapToModel=s,h.deleteMetaRule=u,function(){l()}();var g={"event:metaRuleCreatedSuccess":t.$on("event:metaRuleCreatedSuccess",m),"event:metaRuleCreatedError":t.$on("event:metaRuleCreatedError",p)};for(var y in g)e.$on("$destroy",g[y])}angular.module("moon").controller("moonMetaRulesMapController",e),e.$inject=["$scope","$rootScope","alertService","$translate","formService","metaRuleService","modelService","utilService"]}(),function(){"use strict";function e(e,t,o,n){function i(){function i(n){t("moon.model.metarules.unmap.success",{modelName:c.model.name,metaRuleName:c.metaRule.name}).then(function(e){o.alertSuccess(e)}),c.unMappingLoading=!1,e.$emit("event:metaRuleUnMappedToModelSuccess",r)}function a(n){t("moon.model.metarules.unmap.error",{modelName:c.model.name,metaRuleName:c.metaRule.name}).then(function(e){o.alertError(e)}),c.unMappingLoading=!1,e.$emit("event:metaRuleUnMappedToModelError")}c.unMappingLoading=!0;var r=angular.copy(c.model);r.meta_rules=_.without(r.meta_rules,c.metaRule.id),n.update(r,i,a)}var c=this;c.model=e.model,c.metaRule=e.metaRule,c.unMappingLoading=!1,c.unmap=i}angular.module("moon").controller("MetaRulesUnMapController",e),e.$inject=["$scope","$translate","alertService","modelService"]}(); \ No newline at end of file
+!function(){"use strict";function e(e,s,d,u){s.useStaticFilesLoader({prefix:"assets/i18n/",suffix:".json"}).preferredLanguage("en").useCookieStorage(),u.theme="selectize",e.when("","/model"),e.when("/","/model"),e.otherwise("/404"),t(d),o(d),n(d),c(d),i(d),r(d),a(d),l(d)}function t(e){return e.state("moon",{abstract:!0,template:"<div ui-view></div>"}).state("moon.404",{url:"/404",templateUrl:"html/common/404/404.tpl.html"}),e}function o(e){return e.state("moon.dashboard",{url:"/dashboard",templateUrl:"html/dashboard/dashboard.tpl.html"}),e}function n(e){return e.state("moon.auth",{abstract:!0,template:"<div ui-view></div>"}).state("moon.auth.login",{url:"/login",templateUrl:"html/authentication/authentication.tpl.html",controller:"AuthenticationController",controllerAs:"auth"}),e}function i(e){return e.state("moon.model",{abstract:!0,template:"<div ui-view></div>"}).state("moon.model.list",{url:"/model",templateUrl:"html/model/model-list.tpl.html",controller:"ModelListController",controllerAs:"list",resolve:{models:["modelService",function(e){return e.findAll()}]}}).state("moon.model.edit",{url:"/model/:id",templateUrl:"html/model/edit/model-edit.tpl.html",controller:"ModelEditController",controllerAs:"edit",resolve:{model:["$stateParams","modelService",function(e,t){return t.findOneWithMetaRules(e.id)}]}}),e}function c(e){return e.state("moon.project",{abstract:!0,template:"<div ui-view></div>"}).state("moon.project.list",{url:"/project",templateUrl:"html/project/project-list.tpl.html",controller:"ProjectListController",controllerAs:"list",resolve:{projects:["projectService",function(e){return e.findAll()}]}}),e}function r(e){return e.state("moon.pdp",{abstract:!0,template:"<div ui-view></div>"}).state("moon.pdp.list",{url:"/pdp",templateUrl:"html/pdp/pdp-list.tpl.html",controller:"PDPListController",controllerAs:"list",resolve:{pdps:["pdpService",function(e){return e.findAll()}]}}).state("moon.pdp.edit",{url:"/pdp/:id",templateUrl:"html/pdp/edit/pdp-edit.tpl.html",controller:"PDPEditController",controllerAs:"edit",resolve:{pdp:["$stateParams","pdpService",function(e,t){return t.findOne(e.id)}]}}),e}function a(e){return e.state("moon.policy",{abstract:!0,template:"<div ui-view></div>"}).state("moon.policy.list",{url:"/policy",templateUrl:"html/policy/policy-list.tpl.html",controller:"PolicyListController",controllerAs:"list",resolve:{policies:["policyService",function(e){return e.findAll()}]}}).state("moon.policy.edit",{url:"/policy/:id",templateUrl:"html/policy/edit/policy-edit.tpl.html",controller:"PolicyEditController",controllerAs:"edit",resolve:{policy:["$stateParams","policyService",function(e,t){return t.findOne(e.id)}]}}),e}function l(e){return e.state("moon.logs",{url:"/logs",templateUrl:"html/logs/logs.tpl.html",controller:"LogsController",controllerAs:"logs"}),e}function s(e,t,o,n,i,c,r){function a(e,t,o){-1===["/login"].indexOf(r.path())&&!c.currentUser&&r.path("/login")}function l(){e.connected=i.IsConnected(),e.transitionModal.$promise.then(e.transitionModal.show)}function s(){e.transitionModal.hide()}function d(t,i,c,r,a,l){var s=u(t,i,c,r,a,l);o("moon.global.error",{stacktrace:s}).then(function(e){n.alertError(e)}),e.transitionModal.hide()}function u(e,t,o,n,i,c){var r={};return r.status=c.status,r.message=c.statusText,r.state=t,r.params=o,r}e.connected=i.IsConnected(),e.transitionModal=t({scope:e,template:"html/common/waiting/waiting.tpl.html",backdrop:"static",show:!1}),e.$on("$stateChangeStart",l),e.$on("$stateChangeSuccess",s),e.$on("$stateChangeError",d),e.$on("$locationChangeStart",a),i.IsConnected()&&i.SetTokenHeader(i.GetTokenHeader())}angular.module("moon",["ngResource","ngRoute","ui.router","ngMessages","ui.bootstrap","ngTable","ngCookies","ngStorage","pascalprecht.translate","ngAnimate","mgcrea.ngStrap","NgSwitchery","ui.select","toaster"]).config(e).run(s);e.$inject=["$urlRouterProvider","$translateProvider","$stateProvider","uiSelectConfig"],s.$inject=["$rootScope","$modal","$translate","alertService","authenticationService","$sessionStorage","$location"]}(),function(){"use strict";angular.module("moon").constant("DEFAULT_CST",{DOMAIN:{DEFAULT:"Default"}}).constant("SECURITY_PIPELINE_CST",{TYPE:{POLICY:"policy"}}).constant("META_DATA_CST",{TYPE:{SUBJECT:"SUBJECT",OBJECT:"OBJECT",ACTION:"ACTION"}}).constant("PERIMETER_CST",{TYPE:{SUBJECT:"SUBJECT",OBJECT:"OBJECT",ACTION:"ACTION"}}).constant("DATA_CST",{TYPE:{SUBJECT:"SUBJECT",OBJECT:"OBJECT",ACTION:"ACTION"}}).constant("ASSIGNMENTS_CST",{TYPE:{SUBJECT:"SUBJECT",OBJECT:"OBJECT",ACTION:"ACTION"}}).constant("REST_URI",{PDP:"http://{{MANAGER_HOST}}:{{MANAGER_PORT}}/pdp/",MODELS:"http://{{MANAGER_HOST}}:{{MANAGER_PORT}}/models/",METARULES:"http://{{MANAGER_HOST}}:{{MANAGER_PORT}}/meta_rules/",RULES:"http://{{MANAGER_HOST}}:{{MANAGER_PORT}}/rules/",POLICIES:"http://{{MANAGER_HOST}}:{{MANAGER_PORT}}/policies/",METADATA:{subject:"http://{{MANAGER_HOST}}:{{MANAGER_PORT}}/subject_categories/",object:"http://{{MANAGER_HOST}}:{{MANAGER_PORT}}/object_categories/",action:"http://{{MANAGER_HOST}}:{{MANAGER_PORT}}/action_categories/"},PERIMETERS:{subject:"http://{{MANAGER_HOST}}:{{MANAGER_PORT}}/subjects/",object:"http://{{MANAGER_HOST}}:{{MANAGER_PORT}}/objects/",action:"http://{{MANAGER_HOST}}:{{MANAGER_PORT}}/actions/"},KEYSTONE:"http://{{KEYSTONE_HOST}}:{{KEYSTONE_PORT}}/v3/"})}(),function(){"use strict";function e(e,t,o,n,i){function c(){l.loading=!0,e.Login(l.credentials,r,a)}function r(){t("moon.login.success").then(function(e){o.alertSuccess(e),n.go("moon.dashboard"),l.loading=!1})}function a(e){t("moon.login.error",{errorCode:e.status}).then(function(e){o.alertError(e),l.loading=!1})}var l=this;l.login=c,l.loading=!1,l.credentials={username:"",password:""},function(){i.connected&&n.go("moon.dashboard")}()}angular.module("moon").controller("AuthenticationController",e),e.$inject=["authenticationService","$translate","alertService","$state","$rootScope"]}(),function(){"use strict";function e(){}angular.module("moon").controller("LogsController",e)}(),function(){"use strict";function e(e,t,o,n,i,c){function r(){return S.table=new n({page:1,count:10,sorting:{name:"asc"}},{total:function(){return S.getModels().length},getData:function(e,t){var o=t.sorting()?i("orderBy")(S.getModels(),t.orderBy()):S.getModels();e.resolve(o.slice((t.page()-1)*t.count(),t.page()*t.count()))},$scope:{$data:{}}}),S.table}function a(){return S.models?S.models:[]}function l(){return S.getModels().length>0}function s(){S.search.query=""}function d(e){return-1!==e.name.indexOf(S.search.query)||-1!==e.description.indexOf(S.search.query)}function u(){S.add.modal.$promise.then(S.add.modal.show)}function m(e){S.models.push(e)}function p(){S.table.total(S.models.length),S.table.reload()}function f(e,t){m(t),p(),S.add.modal.hide()}function h(e){S.add.modal.hide()}function g(e){S.view.modal.$scope.model=e,S.view.modal.$promise.then(S.view.modal.show)}function y(e){S.del.modal.$scope.model=e,S.del.modal.$promise.then(S.del.modal.show)}function v(e){S.models=_.chain(S.models).reject({id:e.id}).value()}function b(e,t){S.deleteModel(t),S.refreshModels(),S.del.modal.hide()}function j(e,t){S.del.modal.hide()}var S=this;S.models=o,S.table={},S.search={query:"",find:d,reset:s},S.getModels=a,S.hasModels=l,S.deleteModel=v,S.refreshModels=p,S.add={modal:c({template:"html/model/action/model-add.tpl.html",show:!1}),showModal:u},S.view={modal:c({template:"html/model/action/model-view.tpl.html",show:!1}),showModal:g},S.del={modal:c({template:"html/model/action/model-delete.tpl.html",show:!1}),showModal:y},function(){r()}();var T={"event:modelCreatedSuccess":t.$on("event:modelCreatedSuccess",f),"event:modelCreatedError":t.$on("event:modelCreatedError",h),"event:modelDeletedSuccess":t.$on("event:modelDeletedSuccess",b),"event:modelDeletedError":t.$on("event:modelDeletedError",j)};for(var E in T)e.$on("$destroy",T[E])}angular.module("moon").controller("ModelListController",e),e.$inject=["$scope","$rootScope","models","NgTableParams","$filter","$modal"]}(),function(){"use strict";function e(e,t,o,n,i,c,r){function a(){return A.pdps?A.pdps:[]}function l(){return A.getPDPs().length>0}function s(e){A.pdps.push(e)}function d(e){A.pdps=_.chain(A.pdps).reject({id:e.id}).value()}function u(){A.table.total(A.pdps.length),A.table.reload()}function m(e){return _(_.values(A.getPDPs())).each(function(t){t.id===e.id&&(t=_.clone(e))}),A.pdps}function p(e){return e.id}function f(e){return e.tenant.name}function h(e){return e?e.name:""}function g(e){return!_.isNull(e.keystone_project_id)}function y(e){return _.has(e,"project")?e.project:(_.has(e,"callPdpInProgress")||(e.callPdpInProgress=!0,r.findOne(e.keystone_project_id,function(t){return e.callPdpInProgress=!1,e.project=t,e.project})),!1)}function v(){return A.table=new i({page:1,count:10},{total:function(){return A.getPDPs().length},getData:function(e,t){var n=t.sorting()?o("orderBy")(A.getPDPs(),t.orderBy()):A.getPDPs();e.resolve(n.slice((t.page()-1)*t.count(),t.page()*t.count()))},$scope:{$data:{}}}),A.table}function b(e){return-1!==A.getPDPName(e).indexOf(A.search.query)||-1!==A.getSecPipelineFromPdp(e).indexOf(A.search.query)}function j(e){return e.security_pipeline?e.security_pipeline:[]}function S(){A.search.query=""}function T(){A.add.modal.$promise.then(A.add.modal.show)}function E(e,t){A.addPDP(t),A.refreshPDPs(),A.add.modal.hide()}function P(e,t){A.add.modal.hide()}function $(e){A.del.modal.$scope.pdp=e,A.del.modal.$promise.then(A.del.modal.show)}function C(e,t){A.deletePDP(t),A.refreshPDPs(),A.del.modal.hide()}function O(){A.del.modal.hide()}var A=this;A.pdps=c,A.mappings=[],A.getPDPs=a,A.hasPDPs=l,A.getPDPName=h,A.isMapped=g,A.getProjectFromPDP=y,A.getidFromPDP=p,A.table={},A.addPDP=s,A.deletePDP=d,A.refreshPDPs=u,A.updatePDPs=m,A.getMappedProjectName=f,A.getSecPipelineFromPdp=j,A.search={query:"",find:b,reset:S},A.add={modal:n({template:"html/pdp/action/pdp-add.tpl.html",show:!1}),showModal:T},A.del={modal:n({template:"html/pdp/action/pdp-delete.tpl.html",show:!1}),showModal:$},function(){v()}();var R={"event:pdpCreatedSuccess":e.$on("event:pdpCreatedSuccess",E),"event:pdpCreatedError":e.$on("event:pdpCreatedError",P),"event:pdpDeletedSuccess":e.$on("event:pdpDeletedSuccess",C),"event:pdpDeletedError":e.$on("event:pdpDeletedError",O)};_.each(R,function(e){t.$on("$destroy",R[e])})}angular.module("moon").controller("PDPListController",e),e.$inject=["$rootScope","$scope","$filter","$modal","NgTableParams","pdps","projectService"]}(),function(){"use strict";function e(e,t,o,n,i,c){function r(){return j.policies?j.policies:[]}function a(){return j.getPolicies().length>0}function l(){return j.table=new o({page:1,count:10,sorting:{name:"asc",genre:"asc"}},{total:function(){return j.getPolicies().length},getData:function(e,t){var o=t.sorting()?n("orderBy")(j.getPolicies(),t.orderBy()):j.getPolicies();e.resolve(o.slice((t.page()-1)*t.count(),t.page()*t.count()))},$scope:{$data:{}}}),j.table}function s(e){return-1!==e.name.indexOf(j.search.query)||-1!==e.genre.indexOf(j.search.query)||-1!==e.description.indexOf(j.search.query)}function d(){j.search.query=""}function u(){j.add.modal.$promise.then(j.add.modal.show)}function m(e,t){j.addPolicy(t),j.refreshPolicies(),j.add.modal.hide()}function p(e,t){j.add.modal.hide()}function f(e){j.policies.push(e)}function h(){j.table.total(j.policies.length),j.table.reload()}function g(e){j.del.modal.$scope.policy=e,j.del.modal.$promise.then(j.del.modal.show)}function y(e){j.policies=_.chain(j.policies).reject({id:e.id}).value()}function v(e,t){j.deletePolicy(t),j.refreshPolicies(),j.del.modal.hide()}function b(e,t){j.del.modal.hide()}var j=this;j.policies=t,j.getPolicies=r,j.hasPolicies=a,j.addPolicy=f,j.refreshPolicies=h,j.deletePolicy=y,j.table={},j.search={query:"",find:s,reset:d},j.add={modal:i({template:"html/policy/action/policy-add.tpl.html",show:!1}),showModal:u},j.del={modal:i({template:"html/policy/action/policy-delete.tpl.html",show:!1}),showModal:g},function(){l()}();var S={"event:policyCreatedSuccess":c.$on("event:policyCreatedSuccess",m),"event:policyCreatedError":c.$on("event:policyCreatedError",p),"event:policyDeletedSuccess":c.$on("event:policyDeletedSuccess",v),"event:policyDeletedError":c.$on("event:policyDeletedError",b)};for(var T in S)e.$on("$destroy",S[T])}angular.module("moon").controller("PolicyListController",e),e.$inject=["$scope","policies","NgTableParams","$filter","$modal","$rootScope"]}(),function(){"use strict";function e(){return{templateUrl:"html/policy/policy-mapped-list.tpl.html",bindToController:!0,controller:t,controllerAs:"list",scope:{pdp:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c){function r(e){_.isUndefined(y.pdp.security_pipeline)||(y.policiesId=y.pdp.security_pipeline,c.findSomeWithCallback(y.policiesId,function(t){y.policies=t,y.loadingPolicies=!1,e?d():a()}))}function a(){return y.table=new o({page:1,count:10},{total:function(){return y.getPolicies().length},getData:function(e,t){var o=t.sorting()?i("orderBy")(y.getPolicies(),t.orderBy()):y.getPolicies();e.resolve(o.slice((t.page()-1)*t.count(),t.page()*t.count()))},$scope:{$data:{}}}),y.table}function l(){return y.policies?y.policies:[]}function s(){return y.getPolicies().length>0}function d(){y.table.total(y.getPolicies().length),y.table.reload()}function u(){y.map.modal.$scope.pdp=y.pdp,y.map.modal.$promise.then(y.map.modal.show)}function m(e){y.unmap.modal.$scope.pdp=y.pdp,y.unmap.modal.$scope.policy=e,y.unmap.modal.$promise.then(y.unmap.modal.show)}function p(e,t){y.pdp=t,r(!0),y.map.modal.hide()}function f(e){y.map.modal.hide()}function h(e,t){y.pdp=t,r(!0),y.unmap.modal.hide()}function g(e){y.unmap.modal.hide()}var y=this;y.table={},y.pdp=e.list.pdp,y.getPolicies=l,y.hasPolicies=s,y.refreshPolicies=d,y.loadingPolicies=!0,y.policies=[],function(){r(!1)}(),y.map={modal:n({template:"html/policy/action/mapping/policy-map.tpl.html",show:!1}),showModal:u},y.unmap={modal:n({template:"html/policy/action/mapping/policy-unmap.tpl.html",show:!1}),showModal:m};var v={"event:policyMapToPdpSuccess":t.$on("event:policyMapToPdpSuccess",p),"event:policyMapToPdpError":t.$on("event:policyMapToPdpError",f),"event:policyUnMappedToPdpSuccess":t.$on("event:policyUnMappedToPdpSuccess",h),"event:policyUnMappedToPdpError":t.$on("event:policyUnMappedToPdpError",g)};for(var b in v)e.$on("$destroy",v[b])}angular.module("moon").directive("moonPolicyMappedList",e),e.$inject=[],angular.module("moon").controller("moonPolicyMappedListController",t),t.$inject=["$scope","$rootScope","NgTableParams","$modal","$filter","policyService"]}(),function(){"use strict";function e(e,t,o,n,i,c,r){function a(){k.loadingPDPs=!0,h(),c.findAllWithCallBack(function(e){k.pdps=e,c.mapPdpsToProjects(k.projects,k.pdps),k.loadingPDPs=!1})}function l(){return k.projects?k.projects:[]}function s(){return k.getProjects().length>0}function d(e){return _.has(e,"pdp")}function u(e){return e.pdp}function m(e){k.projects.push(e)}function p(e){k.projects=_.chain(k.projects).reject({id:e.id}).value()}function f(){k.table.total(k.projects.length),k.table.reload()}function h(){return k.table=new i({page:1,count:10,sorting:{name:"asc"}},{total:function(){return k.getProjects().length},getData:function(e,t){var n=t.sorting()?o("orderBy")(k.getProjects(),t.orderBy()):k.getProjects();e.resolve(n.slice((t.page()-1)*t.count(),t.page()*t.count()))},$scope:{$data:{}}}),k.table}function g(e){return _.has(e,"pdp")?e.pdp.name:"error"}function y(e){return-1!==e.name.indexOf(k.search.query)||-1!==e.description.indexOf(k.search.query)}function v(){k.search.query=""}function b(){k.add.modal.$promise.then(k.add.modal.show)}function j(e,t){k.addProject(t),k.refreshProjects(),k.add.modal.hide()}function S(e,t){k.add.modal.hide()}function T(e){k.del.modal.$scope.project=e,k.del.modal.$promise.then(k.del.modal.show)}function E(e,t){k.deleteProject(t),k.refreshProjects(),k.del.modal.hide()}function P(e,t){k.del.modal.hide()}function $(e){k.map.modal.$scope.project=e,k.map.modal.$promise.then(k.map.modal.show)}function C(e,t){a(),k.map.modal.hide()}function O(e,t){k.map.modal.hide()}function A(e){k.unmap.modal.$scope.project=e,k.unmap.modal.$promise.then(k.unmap.modal.show)}function R(e,t){var o=_.findIndex(k.projects,function(e){return t.id===e.id});if(-1===o)return k.unmap.modal.hide(),!1;k.projects[o]=t,k.refreshProjects(),k.unmap.modal.hide()}function M(e,t){k.unmap.modal.hide()}function D(e){k.view.modal.$scope.project=e,k.view.modal.$promise.then(k.view.modal.show)}var k=this;k.projects=r,k.pdps=[],k.getProjects=l,k.hasProjects=s,k.isProjectMapped=d,k.table={},k.addProject=m,k.deleteProject=p,k.refreshProjects=f,k.getMappedPDPName=g,k.getPdpFromProject=u,k.search={query:"",find:y,reset:v},k.add={modal:n({template:"html/project/action/project-add.tpl.html",show:!1}),showModal:b},k.del={modal:n({template:"html/project/action/project-delete.tpl.html",show:!1}),showModal:T},k.map={modal:n({template:"html/project/action/mapping/project-map.tpl.html",show:!1}),showModal:$},k.unmap={modal:n({template:"html/project/action/mapping/project-unmap.tpl.html",show:!1}),showModal:A},k.view={modal:n({template:"html/project/action/project-view.tpl.html",show:!1}),showModal:D},a();var L={"event:projectCreatedSuccess":e.$on("event:projectCreatedSuccess",j),"event:projectCreatedError":e.$on("event:projectCreatedError",S),"event:projectDeletedSuccess":e.$on("event:projectDeletedSuccess",E),"event:projectDeletedError":e.$on("event:projectDeletedError",P),"event:projectMappedSuccess":e.$on("event:projectMappedSuccess",C),"event:projectMappedError":e.$on("event:projectMappedError",O),"event:projectUnmappedSuccess":e.$on("event:projectUnmappedSuccess",R),"event:projectUnmappedError":e.$on("event:projectUnmappedError",M)};for(var N in L)t.$on("$destroy",L[N])}angular.module("moon").controller("ProjectListController",e),e.$inject=["$rootScope","$scope","$filter","$modal","ngTableParams","pdpService","projects"]}(),function(){"use strict";function e(e,t){function o(){n.browsersModal.$promise.then(n.browsersModal.show)}var n=this;n.version=null,n.browsersModal=null,n.showBrowsersCompliance=o,function(){n.browsersModal=e({template:"html/common/compatibility/compatibility.tpl.html",show:!1}),n.browsersModal}(),function(){var e=n;t.version.get().$promise.then(function(t){return e.version=t.version?t.version:"SNAPSHOT",e.version})}()}angular.module("moon").controller("FooterController",e),e.$inject=["$modal","versionService"]}(),function(){"use strict";function e(e,t,o,n){function i(t,o){o.preventDefault(),e.use(t),e.preferredLanguage(t),r.currentLanguage=t}function c(){o.Logout(),e("moon.logout.success").then(function(e){n.alertSuccess(e)})}var r=this;r.isProjectTabActive=t.isProjectTabActive,r.isPDPTabActive=t.isPDPTabActive,r.isLogsTabActive=t.isLogsTabActive,r.isPolicyTabActive=t.isPolicyTabActive,r.isModelTabActive=t.isModelTabActive,r.changeLocale=i,r.logout=c,r.currentLanguage=e.use(),r.getUser=o.GetUser}angular.module("moon").controller("HeaderController",e),e.$inject=["$translate","menuService","authenticationService","alertService"]}(),function(){"use strict";function e(){return{templateUrl:"html/common/loader/loader.tpl.html",restrict:"E"}}angular.module("moon").directive("moonLoader",e),e.$inject=[]}(),function(){"use strict";function e(e,t,o,n,i,c){function r(){function r(t){var i=c.transformOne(t,"models");n("moon.model.add.success",{modelName:i.name}).then(function(e){o.alertSuccess(e)}),a.loading=!1,e.$emit("event:modelCreatedSuccess",i)}function l(t){n("moon.model.add.error",{modelName:a.model.name}).then(function(e){o.alertError(e)}),a.loading=!1,e.$emit("event:modelCreatedError",a.project)}i.isInvalid(a.form)?i.checkFieldsValidity(a.form):(a.loading=!0,t.data.create({},a.model,r,l))}var a=this;a.form={},a.loading=!1,a.model={name:null,description:null,meta_rules:[]},a.create=r}angular.module("moon").controller("ModelAddController",e),e.$inject=["$scope","modelService","alertService","$translate","formService","utilService"]}(),function(){"use strict";function e(e,t,o,n){function i(){function i(n){t("moon.model.remove.success",{modelName:c.model.name}).then(function(e){o.alertSuccess(e)}),c.loading=!1,e.$emit("event:modelDeletedSuccess",c.model)}function r(n){t("moon.model.remove.error",{modelName:c.model.name,errorCode:n.data.error.code,message:n.data.error.message}).then(function(e){o.alertError(e)}),c.loading=!1,e.$emit("event:modelDeletedError",c.model)}c.loading=!0,n.delete(c.model,i,r)}var c=this;c.model=e.model,c.loading=!1,c.remove=i}angular.module("moon").controller("ModelDeleteController",e),e.$inject=["$scope","$translate","alertService","modelService"]}(),function(){"use strict";function e(e,t){function o(){t.findSomeWithMetaData(n.model.meta_rules).then(function(e){n.meta_rules_values=e,n.model.meta_rules_values=e})}var n=this;n.model=e.model,n.meta_rules_values=!1,function(){n.model.meta_rules.length>0?o():n.meta_rules_values=[]}()}angular.module("moon").controller("ModelViewController",e),e.$inject=["$scope","metaRuleService"]}(),function(){"use strict";function e(e,t,o,n){function i(e,t){c.model=t,n.findSomeWithCallback(t.meta_rules,function(e){c.model.meta_rules_values=e})}var c=this;c.model=o,c.editBasic=!1,c.editMetaRules=!0;var r={"event:modelUpdatedSuccess":t.$on("event:modelUpdatedSuccess",i),"event:updateModelFromMetaRuleAddSuccess":t.$on("event:updateModelFromMetaRuleAddSuccess",i)};for(var a in r)e.$on("$destroy",r[a])}angular.module("moon").controller("ModelEditController",e),e.$inject=["$scope","$rootScope","model","metaRuleService"]}(),function(){"use strict";function e(){return{templateUrl:"html/model/edit/model-edit-basic.tpl.html",bindToController:!0,controller:t,controllerAs:"edit",scope:{model:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c){function r(){function r(t){var o=c.transformOne(t,"models");i("moon.model.edit.basic.success",{modelName:o.name}).then(function(e){n.alertSuccess(e)}),l.loading=!1,e.$emit("event:modelUpdatedSuccess",o)}function a(e){i("moon.model.edit.basic.error",{modelName:l.model.name}).then(function(e){n.alertError(e)}),l.loading=!1}o.isInvalid(l.form)?o.checkFieldsValidity(l.form):(l.loading=!0,t.update(l.modelToEdit,r,a))}function a(){l.modelToEdit=angular.copy(l.model)}var l=this;l.editModel=r,l.init=a,l.form={},function(){l.model=e.edit.model,l.modelToEdit=angular.copy(l.model)}()}angular.module("moon").directive("moonModelEditBasic",e),e.$inject=[],angular.module("moon").controller("moonModelEditBasicController",t),t.$inject=["$scope","modelService","formService","alertService","$translate","utilService"]}(),function(){"use strict";function e(e,t,o,n,i,c,r){function a(c){function a(n){t("moon.pdp.add.success",{pdpName:c.name}).then(function(e){o.alertSuccess(e)});var i=r.transformOne(n,"pdps");l.loading=!1,e.$emit("event:pdpCreatedSuccess",i)}function s(n){t("moon.pdp.add.error",{pdpName:c.name}).then(function(e){o.alertError(e)}),l.loading=!1,e.$emit("event:pdpCreatedError")}n.isInvalid(l.form)?n.checkFieldsValidity(l.form):(l.loading=!0,i.data.pdp.create({},{name:l.pdp.name,description:l.pdp.description,security_pipeline:[l.selectedPolicy.id],keystone_project_id:null},a,s))}var l=this;l.form={},l.pdp={},l.policies=[],l.selectedPolicy=null,l.loading=!1,l.loadingPolicies=!0,l.create=a,function(){c.findAllWithCallback(function(e){l.policies=e,l.loadingPolicies=!1})}()}angular.module("moon").controller("PDPAddController",e),e.$inject=["$scope","$translate","alertService","formService","pdpService","policyService","utilService"]}(),function(){"use strict";function e(e,t,o,n){function i(){function i(n){t("moon.pdp.remove.success",{pdpName:c.pdp.name}).then(function(e){o.alertSuccess(e)}),c.loading=!1,e.$emit("event:pdpDeletedSuccess",c.pdp)}function r(n){t("moon.pdp.remove.error",{pdpName:c.pdp.name}).then(function(e){o.alertError(e)}),c.loading=!1,e.$emit("event:pdpDeletedError",c.pdp)}c.loading=!0,n.data.pdp.remove({pdp_id:c.pdp.id},i,r)}var c=this;c.pdp=e.pdp,c.loading=!1,c.remove=i}angular.module("moon").controller("PDPDeleteController",e),e.$inject=["$scope","$translate","alertService","pdpService"]}(),function(){"use strict";function e(e,t,o,n){function i(e,t){c.pdp=t}var c=this;c.pdp=o,c.editBasic=!1;var r={"event:pdpUpdatedSuccess":t.$on("event:pdpUpdatedSuccess",i)};for(var a in r)e.$on("$destroy",r[a])}angular.module("moon").controller("PDPEditController",e),e.$inject=["$scope","$rootScope","pdp","$stateParams"]}(),function(){"use strict";function e(){return{templateUrl:"html/pdp/edit/pdp-edit-basic.tpl.html",bindToController:!0,controller:t,controllerAs:"edit",scope:{pdp:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c){function r(){function r(t){var o=c.transformOne(t,"pdps");i("moon.pdp.edit.basic.success",{pdpName:o.name}).then(function(e){n.alertSuccess(e)}),l.loading=!1,e.$emit("event:pdpUpdatedSuccess",o)}function a(e){i("moon.pdp.edit.basic.error",{pdpName:l.pdp.name}).then(function(e){n.alertError(e)}),l.loading=!1}o.isInvalid(l.form)?o.checkFieldsValidity(l.form):(l.loading=!0,t.update(l.pdpToEdit,r,a))}function a(){l.pdpToEdit=angular.copy(l.pdp)}var l=this;l.editPdp=r,l.init=a,l.form={},function(){l.pdp=e.edit.pdp,l.pdpToEdit=angular.copy(l.pdp)}()}angular.module("moon").directive("moonPDPEditBasic",e),e.$inject=[],angular.module("moon").controller("moonPDPEditBasicController",t),t.$inject=["$scope","pdpService","formService","alertService","$translate","utilService"]}(),function(){"use strict";function e(e,t,o,n,i,c,r){function a(){r.findAllWithCallBack(l)}function l(e){d.models=e,d.modelsLoading=!1}function s(){function r(n){var i=c.transformOne(n,"policies");t("moon.policy.add.success",{policyName:i.name}).then(function(e){o.alertSuccess(e)}),d.loading=!1,e.$emit("event:policyCreatedSuccess",i)}function a(n){t("moon.policy.add.error",{policyName:d.model.name}).then(function(e){o.alertError(e)}),d.loading=!1,e.$emit("event:policyCreatedError",d.project)}n.isInvalid(d.form)?n.checkFieldsValidity(d.form):(d.loading=!0,i.data.policy.create({},{name:d.policy.name,description:d.policy.description,genre:[d.selectedGenre],model_id:d.selectedModel.id},r,a))}var d=this;d.loading=!1,d.form={},d.policy={name:null,genre:null,description:null,model_id:null},d.genres=["admin","authz"],d.models=[],d.modelsLoading=!0,d.create=s,function(){a()}()}angular.module("moon").controller("PolicyAddController",e),e.$inject=["$scope","$translate","alertService","formService","policyService","utilService","modelService"]}(),function(){"use strict";function e(e,t,o,n){function i(){function i(n){t("moon.policy.remove.success",{policyName:c.policy.name}).then(function(e){o.alertSuccess(e)}),c.loading=!1,e.$emit("event:policyDeletedSuccess",c.policy)}function r(n){t("moon.policy.remove.error",{policyName:c.policy.name,errorCode:n.data.error.code,message:n.data.error.message}).then(function(e){o.alertError(e)}),c.loading=!1,e.$emit("event:policyDeletedError",c.policy)}c.loading=!0,n.delete(c.policy,i,r)}var c=this;c.policy=e.policy,c.loading=!1,c.remove=i}angular.module("moon").controller("PolicyDeleteController",e),e.$inject=["$scope","$translate","alertService","policyService"]}(),function(){"use strict";function e(e,t,o,n){function i(e){var t=a[e];a.showPerimeters=!1,a.showData=!1,a.showRules=!1,a.showAssignments=!1,a[e]=!t}function c(){a.loadingModel=!0,n.findOneWithCallback(a.policy.model_id,function(e){a.loadingModel=!1,a.policy.model=e})}function r(e,t){a.policy=t,c()}var a=this;a.policy=o,a.editBasic=!1,a.showPerimeters=!1,a.showData=!1,a.showRules=!1,a.showAssignments=!1,a.showPart=i,function(){c()}();var l={"event:policyUpdatedSuccess":t.$on("event:policyUpdatedSuccess",r)};for(var s in l)e.$on("$destroy",l[s])}angular.module("moon").controller("PolicyEditController",e),e.$inject=["$scope","$rootScope","policy","modelService"]}(),function(){"use strict";function e(){return{templateUrl:"html/policy/edit/policy-edit-basic.tpl.html",bindToController:!0,controller:t,controllerAs:"edit",scope:{policy:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c,r){function a(){r.findAllWithCallBack(l)}function l(e){u.models=e,_.each(e,function(e){e.id===u.policy.model_id&&(u.selectedModel=e)}),u.modelsLoading=!1}function s(){function r(t){var o=c.transformOne(t,"policies");i("moon.policy.edit.basic.success",{policyName:o.name}).then(function(e){n.alertSuccess(e)}),u.loading=!1,e.$emit("event:policyUpdatedSuccess",o)}function a(e){i("moon.policy.edit.basic.error",{policyName:u.policy.name}).then(function(e){n.alertError(e)}),u.loading=!1}o.isInvalid(u.form)?o.checkFieldsValidity(u.form):(u.loading=!0,delete u.policyToEdit.model,u.policyToEdit.model_id=u.selectedModel.id,t.update(u.policyToEdit,r,a))}function d(){u.policyToEdit=angular.copy(u.policy)}var u=this;u.editPolicy=s,u.init=d,u.form={},u.modelsLoading=!0,function(){u.policy=e.edit.policy,u.policyToEdit=angular.copy(u.policy),console.log(u.policyToEdit),a()}()}angular.module("moon").directive("moonPolicyEditBasic",e),e.$inject=[],angular.module("moon").controller("moonPolicyEditBasicController",t),t.$inject=["$scope","policyService","formService","alertService","$translate","utilService","modelService"]}(),function(){"use strict";function e(e,t,o,n,i,c){function r(){function c(n){var i=n.project;t("moon.project.add.success",{projectName:i.name}).then(function(e){o.alertSuccess(e)}),a.loading=!1,e.$emit("event:projectCreatedSuccess",i)}function r(n){t("moon.project.add.error",{projectName:a.project.project.name}).then(function(e){o.alertError(e)}),a.loading=!1,e.$emit("event:projectCreatedError",a.project)}n.isInvalid(a.form)?n.checkFieldsValidity(a.form):(a.loading=!0,i.data.projects.create({},a.project,c,r))}var a=this;a.form={},a.loading=!1,a.project={project:{name:null,description:null,enabled:!0,domain:c.DOMAIN.DEFAULT}},a.create=r}angular.module("moon").controller("ProjectAddController",e),e.$inject=["$scope","$translate","alertService","formService","projectService","DEFAULT_CST"]}(),function(){"use strict";function e(e,t,o,n,i){function c(){i.findAllWithCallBack(function(e){d.pdps=e,i.mapPdpsToProject(d.project,d.pdps),d.loadingPDP=!1})}function r(){return _.has(d.project,"pdp")}function a(){d.loading=!0,r()?l(s):s()}function l(n){function c(n){t("moon.project.remove.mapping.remove.error",{pdpName:r}).then(function(e){o.alertError(e)}),d.loading=!1,e.$emit("event:projectDeletedError",d.project)}var r=unmap.project.pdp.name;i.unMap(unmap.project,n,c)}function s(){function i(n){t("moon.project.remove.success",{projectName:d.project.name}).then(function(e){o.alertSuccess(e)}),d.loading=!1,e.$emit("event:projectDeletedSuccess",d.project)}function c(n){t("moon.project.remove.error",{projectName:d.project.name,errorCode:n.data.error.code,message:n.data.error.message}).then(function(e){o.alertError(e)}),d.loading=!1,e.$emit("event:projectDeletedError",d.project)}n.data.projects.remove({project_id:d.project.id},i,c)}var d=this;d.project=e.project,d.loading=!1,d.loadingPDP=!0,d.remove=a,d.isProjectMapped=r,d.pdps=[],function(){c()}()}angular.module("moon").controller("ProjectDeleteController",e),e.$inject=["$scope","$translate","alertService","projectService","pdpService"]}(),function(){"use strict";function e(e,t,o,n,i){this.project=t.project}angular.module("moon").controller("ProjectViewController",e),e.$inject=["$q","$scope","$translate","alertService","projectService"]}(),function(){"use strict";function e(e){function t(t){e.pop("error",null,t,5e3)}function o(t){e.pop("success",null,t,5e3)}function n(t){e.pop("note",null,t,5e3)}var i={};return i.alertError=t,i.alertSuccess=o,i.alertInfo=n,i}angular.module("moon").factory("alertService",e),e.$inject=["toaster"]}(),function(){"use strict";function e(){function e(){var e,t=navigator.userAgent,o=t.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(o[1])?(e=/\brv[ :]+(\d+)/g.exec(t)||[],
+"IE "+(e[1]||"")):"Chrome"===o[1]&&null!=(e=t.match(/\bOPR\/(\d+)/))?"Opera "+e[1]:(o=o[2]?[o[1],o[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(e=t.match(/version\/(\d+)/i))&&o.splice(1,1,e[1]),o.join(" "))}var t={};return t.sayWho=e,t}angular.module("moon").factory("browserService",e)}(),function(){"use strict";function e(){function e(e){return e.$invalid}function t(e){var t=_.keys(e.$error);_(t).each(function(t){var o=_.values(e.$error[t]);_(o).each(function(e){e.$dirty=!0,e.$setValidity(t,!1)})})}var o={};return o.isInvalid=e,o.checkFieldsValidity=t,o}angular.module("moon").factory("formService",e)}(),function(){"use strict";function e(e){function t(){return e.includes("moon.project")}function o(){return e.includes("moon.pdp")}function n(){return e.includes("moon.policy")}function i(){return e.includes("moon.logs")}function c(){return e.includes("moon.model")}var r={};return r.isProjectTabActive=t,r.isPDPTabActive=o,r.isPolicyTabActive=n,r.isLogsTabActive=i,r.isModelTabActive=c,r}angular.module("moon").factory("menuService",e),e.$inject=["$state"]}(),function(){"use strict";function e(e,t){function o(o){switch(o){case e.TYPE.POLICY:default:return t.findAll()}}var n={};return n.findAll=o,n}angular.module("moon").factory("securityPipelineService",e),e.$inject=["SECURITY_PIPELINE_CST","policyService"]}(),function(){"use strict";function e(){return{transform:function(e,t){var o=[];return _.each(e[t],function(e,t){e.id=t,o.push(e)}),o},transformOne:function(e,t){var o=[];return _.each(e[t],function(e,t){e.id=t,o.push(e)}),o[0]}}}angular.module("moon").factory("utilService",e),e.$inject=[]}(),function(){"use strict";function e(e){return{version:e("version.json",{},{get:{method:"GET",isArray:!1}})}}angular.module("moon").factory("versionService",e),e.$inject=["$resource"]}(),function(){"use strict";function e(e,t,o,n){function i(e,t){_.each(e,function(e){return c(e,t)})}function c(e,t){if(_.isNull(e.keystone_project_id))return!1;var o=_.findIndex(t,function(t){return e.id===t.keystone_project_id});return-1!==o&&(e.pdp=t[o],!0)}return{data:{pdp:t(o.PDP+":pdp_id",{},{query:{method:"GET",isArray:!1},get:{method:"GET",isArray:!1},create:{method:"POST"},update:{method:"PATCH"},remove:{method:"DELETE"}})},findAll:function(){return this.data.pdp.query().$promise.then(function(e){return n.transform(e,"pdps")})},findAllWithCallBack:function(e){return this.data.pdp.query().$promise.then(function(t){e(n.transform(t,"pdps"))})},findOne:function(e){return this.data.pdp.get({pdp_id:e}).$promise.then(function(e){return n.transformOne(e,"pdps")})},unMap:function(e,t,o){e.keystone_project_id=null,_.has(e,"project")&&delete e.project,this.data.pdp.update({pdp_id:e.id},e,t,o)},map:function(e,t,o,n){e.keystone_project_id=t,this.data.pdp.update({pdp_id:e.id},e,o,n)},update:function(e,t,o){this.data.pdp.update({pdp_id:e.id},e,t,o)},mapPdpsToProjects:i,mapPdpsToProject:c}}angular.module("moon").factory("pdpService",e),e.$inject=["$q","$resource","REST_URI","utilService"]}(),function(){"use strict";function e(e,t,o,n,i){function c(){return _.has(o,"currentUser")}function r(){delete o.currentUser,n.defaults.headers.common["X-Auth-Token"]="",i.path("/")}function a(){return o.currentUser}function l(){return o.currentUser.connectionToken}function s(e){n.defaults.headers.common["X-Auth-Token"]=e}return{data:e(t.KEYSTONE+"auth/tokens",{},{login:{method:"POST",transformResponse:function(e,t){var o={};return o.data=angular.fromJson(e),o.headers=t(),o}},logout:{method:"DELETE"}}),Login:function(e,t,n){var i={auth:{identity:{methods:["password"],password:{user:{name:e.username,domain:{name:"Default"},password:e.password}}},scope:{project:{name:"admin",domain:{name:"Default"}}}}};this.data.login({},i,function(e){o.currentUser=e.data,o.currentUser.connectionToken=e.headers["x-subject-token"],s(e.headers["x-subject-token"]),t()},n)},IsConnected:c,SetTokenHeader:s,GetTokenHeader:l,GetUser:a,Logout:r}}angular.module("moon").factory("authenticationService",e),e.$inject=["$resource","REST_URI","$sessionStorage","$http","$location"]}(),function(){"use strict";function e(e){return{data:{image:e("./pip/nova/images",{},{query:{method:"GET",isArray:!1}}),flavor:e("./pip/nova/flavors",{},{query:{method:"GET",isArray:!1}})}}}angular.module("moon").factory("novaService",e),e.$inject=["$resource"]}(),function(){"use strict";function e(e,t){return{data:{projects:e(t.KEYSTONE+"projects/:project_id",{},{query:{method:"GET",isArray:!1},get:{method:"GET",isArray:!1},create:{method:"POST"},remove:{method:"DELETE"}})},findOne:function(e,t){return this.data.projects.get({project_id:e}).$promise.then(function(e){t(e.project)})},findAll:function(){return this.data.projects.query().$promise.then(function(e){var t=[];return _.each(e.projects,function(e){t.push(e)}),t})}}}angular.module("moon").factory("projectService",e),e.$inject=["$resource","REST_URI"]}(),function(){"use strict";function e(){return{templateUrl:"html/model/edit/metadata/metadata-edit.tpl.html",bindToController:!0,controller:t,controllerAs:"edit",scope:{metaDataType:"=",metaRule:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c,r,a){function l(){function e(e){g.list=e}switch(g.metaDataType){case o.TYPE.SUBJECT:t.subject.findAllWithCallback(e);break;case o.TYPE.OBJECT:t.object.findAllWithCallback(e);break;case o.TYPE.ACTION:t.action.findAllWithCallback(e);break;default:g.list=[]}}function s(){function t(t){i("moon.model.metarules.update.success",{metaRuleName:l.name}).then(function(e){n.alertSuccess(e)}),l=a.transformOne(t,"meta_rules"),angular.copy(l,g.metaRule),e.$emit("event:updateMetaRuleFromMetaDataAddSuccess",g.metaRule),f()}function c(e){i("moon.model.metarules.update.error",{metaRuleName:l.name,reason:e.message}).then(function(e){n.alertError(e)}),f()}if(g.selectedMetaData){var l=angular.copy(g.metaRule);switch(g.metaDataType){case o.TYPE.SUBJECT:l.subject_categories.push(g.selectedMetaData.id);break;case o.TYPE.OBJECT:l.object_categories.push(g.selectedMetaData.id);break;case o.TYPE.ACTION:l.action_categories.push(g.selectedMetaData.id)}r.update(l,t,c)}}function d(){function e(e){var t={};switch(g.metaDataType){case o.TYPE.SUBJECT:t=a.transformOne(e,"subject_categories");break;case o.TYPE.OBJECT:t=a.transformOne(e,"object_categories");break;case o.TYPE.ACTION:t=a.transformOne(e,"action_categories")}i("moon.model.metadata.edit.create.success",{name:t.name}).then(function(e){n.alertSuccess(e)}),f(),g.list.push(t),h()}function r(e){i("moon.model.metadata.edit.create.error",{name:l.name}).then(function(e){n.alertError(e)}),f()}if(c.isInvalid(g.form))c.checkFieldsValidity(g.form);else{p();var l=angular.copy(g.metaData);switch(g.metaDataType){case o.TYPE.SUBJECT:t.subject.add(l,e,r);break;case o.TYPE.OBJECT:t.object.add(l,e,r);break;case o.TYPE.ACTION:t.action.add(l,e,r)}}}function u(){function c(t){i("moon.model.metadata.edit.delete.success",{name:s.name}).then(function(e){n.alertSuccess(e)}),r.findOneWithMetaData(g.metaRule.id).then(function(t){angular.copy(t,g.metaRule),m(),l(),f(),e.$emit("event:deleteMetaDataFromMetaDataAddSuccess",g.metaRule)})}function a(e){i("moon.model.metadata.edit.delete.error",{name:s.name}).then(function(e){n.alertError(e)}),f()}if(g.selectedMetaData){p();var s=angular.copy(g.selectedMetaData);switch(g.metaDataType){case o.TYPE.SUBJECT:t.subject.delete(s,c,a);break;case o.TYPE.OBJECT:t.object.delete(s,c,a);break;case o.TYPE.ACTION:t.action.delete(s,c,a)}}}function m(){delete g.selectedMetaData}function p(){g.loading=!0}function f(){g.loading=!1}function h(){g.fromList=!0}var g=this;g.metaDataType=e.edit.metaDataType,g.metaRule=e.edit.metaRule,g.fromList=!0,g.form={},g.metaData={name:null,description:null},g.list=[],g.create=d,g.addToMetaRule=s,g.deleteMetaData=u,l()}angular.module("moon").directive("moonMetaDataEdit",e),e.$inject=[],angular.module("moon").controller("moonMetaDataEditController",t),t.$inject=["$scope","metaDataService","META_DATA_CST","alertService","$translate","formService","metaRuleService","utilService"]}(),function(){"use strict";function e(){return{templateUrl:"html/model/edit/metadata/metadata-list.tpl.html",bindToController:!0,controller:t,controllerAs:"list",scope:{metaRule:"=",editMode:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c,r,a){function l(){s(),d(),u()}function s(){j.loadingCatSub=!0,o.subject.findSomeWithCallback(j.metaRule.subject_categories,function(e){j.catSub=e,j.loadingCatSub=!1})}function d(){j.loadingCatObj=!0,o.object.findSomeWithCallback(j.metaRule.object_categories,function(e){j.catObj=e,j.loadingCatObj=!1})}function u(){j.loadingCatAct=!0,o.action.findSomeWithCallback(j.metaRule.action_categories,function(e){j.catAct=e,j.loadingCatAct=!1})}function m(e){function t(t){n("moon.model.metarules.update.success",{metaRuleName:j.metaRule.name}).then(function(e){i.alertSuccess(e)}),r=c.findMetaDataFromMetaRule(a.transformOne(t,"meta_rules")),angular.copy(r,j.metaRule),l(),e.loader=!1}function o(t){n("moon.model.metarules.update.error",{metaRuleName:j.metaRule.name,reason:t.message}).then(function(e){i.alertError(e)}),e.loader=!1}e.loader=!0;var r=angular.copy(j.metaRule);r.subject_categories=_.without(r.subject_categories,e.id),c.update(r,t,o)}function p(e){function t(t){n("moon.model.metarules.update.success",{metaRuleName:j.metaRule.name}).then(function(e){i.alertSuccess(e)}),r=c.findMetaDataFromMetaRule(a.transformOne(t,"meta_rules")),angular.copy(r,j.metaRule),l(),e.loader=!1}function o(t){n("moon.model.metarules.update.error",{metaRuleName:j.metaRule.name,reason:t.message}).then(function(e){i.alertError(e)}),e.loader=!1}e.loader=!0;var r=angular.copy(j.metaRule);r.object_categories=_.without(r.object_categories,e.id),c.update(r,t,o)}function f(e){function t(t){n("moon.model.metarules.update.success",{metaRuleName:j.metaRule.name}).then(function(e){i.alertSuccess(e)}),r=c.findMetaDataFromMetaRule(a.transformOne(t,"meta_rules")),angular.copy(r,j.metaRule),l(),e.loader=!1}function o(t){n("moon.model.metarules.update.error",{metaRuleName:j.metaRule.name,reason:t.message}).then(function(e){i.alertError(e)}),e.loader=!1}e.loader=!0;var r=angular.copy(j.metaRule);r.action_categories=_.without(r.action_categories,e.id),c.update(r,t,o)}function h(){return j.catSub?j.catSub:[]}function g(){return j.catObj?j.catObj:[]}function y(){return j.catAct?j.catAct:[]}function v(e,t){j.metaRule=t,l()}function b(e,t){j.metaRule=t,l()}var j=this;j.metaRule=e.list.metaRule,j.editMode=e.list.editMode,j.shortDisplay=e.list.shortDisplay,j.typeOfSubject=r.TYPE.SUBJECT,j.typeOfObject=r.TYPE.OBJECT,j.typeOfAction=r.TYPE.ACTION,j.unMapSub=m,j.unMapObj=p,j.unMapAct=f,j.getSubjectCategories=h,j.getObjectCategories=g,j.getActionCategories=y,l();var S={"event:updateMetaRuleFromMetaDataAddSuccess":t.$on("event:updateMetaRuleFromMetaDataAddSuccess",v),"event:deleteMetaDataFromMetaDataAddSuccess":t.$on("event:deleteMetaDataFromMetaDataAddSuccess",b)};for(var T in S)e.$on("$destroy",S[T])}angular.module("moon").directive("moonMetaDataList",e),e.$inject=[],angular.module("moon").controller("moonMetaDataListController",t),t.$inject=["$scope","$rootScope","metaDataService","$translate","alertService","metaRuleService","META_DATA_CST","utilService"]}(),function(){"use strict";function e(){return{templateUrl:"html/model/edit/metarules/metarules-list.tpl.html",bindToController:!0,controller:t,controllerAs:"list",scope:{editMode:"=",mappedModel:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c){function r(){return _.table=new o({page:1,count:10,sorting:{name:"asc"}},{total:function(){return _.getMetaRules().length},getData:function(e,t){var o=t.sorting()?n("orderBy")(_.getMetaRules(),t.orderBy()):_.getMetaRules();e.resolve(o.slice((t.page()-1)*t.count(),t.page()*t.count()))},$scope:{$data:{}}}),_.table}function a(){return _.metaRules?_.metaRules:[]}function l(){return _.getMetaRules().length>0}function s(e){e.id===u().id?(_.showDetailValue=!1,_.subject_list=[],_.object_list=[],_.action_list=[]):(_.subject_list=e.subject_categories_values,_.object_list=e.object_categories_values,_.action_list=e.action_categories_values,_.showDetailValue=e)}function d(e){_.edit.modal.$scope.metaRule=e,_.edit.modal.$promise.then(_.edit.modal.show)}function u(){return _.showDetailValue}function m(){return _.subject_list}function p(){return _.object_list}function f(){return _.action_list}function h(){_.map.modal.$scope.model=_.model,_.map.modal.$promise.then(_.map.modal.show)}function g(){_.metaRules=_.model.meta_rules_values,_.table.total(_.getMetaRules().length),_.table.reload()}function y(e,t){_.model=t,g(),_.map.modal.hide()}function v(e){_.unmap.modal.$scope.model=_.model,_.unmap.modal.$scope.metaRule=e,_.unmap.modal.$promise.then(_.unmap.modal.show)}function b(e,t){_.model=t,c.findSomeWithCallback(_.model.meta_rules,function(e){_.model.meta_rules_values=e,g(),_.unmap.modal.hide()})}function j(e){_.unmap.modal.hide()}var _=this;_.table={},_.editMode=e.list.editMode,_.model=e.list.mappedModel,_.metaRules=_.model.meta_rules_values,_.getMetaRules=a,_.hasMetaRules=l,_.showDetail=s,_.getSubjectList=m,_.getObjectList=p,_.getActionlist=f,_.getShowDetailValue=u,_.showDetailValue=!1,_.subject_list=[],_.object_list=[],_.action_list=[],_.edit={modal:i({template:"html/model/edit/metarules/action/metarules-edit.tpl.html",show:!1}),showModal:d},_.map={modal:i({template:"html/model/edit/metarules/action/mapping/metarules-map.tpl.html",show:!1}),showModal:h},_.unmap={modal:i({template:"html/model/edit/metarules/action/mapping/metarules-unmap.tpl.html",show:!1}),showModal:v},function(){r()}();var S={"event:metaRuleMapToModelSuccess":t.$on("event:metaRuleMapToModelSuccess",y),"event:metaRuleUnMappedToModelSuccess":t.$on("event:metaRuleUnMappedToModelSuccess",b),"event:metaRuleUnMappedToModelError":t.$on("event:metaRuleUnMappedToModelError",j)};for(var T in S)e.$on("$destroy",S[T]);e.$watch("list.editMode",function(e,t){_.showDetailValue=!1})}angular.module("moon").directive("moonMetaRulesList",e),e.$inject=[],angular.module("moon").controller("moonMetaRulesListController",t),t.$inject=["$scope","$rootScope","NgTableParams","$filter","$modal","metaRuleService"]}(),function(){"use strict";function e(e,t,o,n,i,c,r){function a(){s.policiesLoading=!0,i.findAllWithCallback(function(e){s.policies=e,s.policiesLoading=!1})}function l(){function i(n){var i=r.transformOne(n,"pdps");o("moon.policy.map.success",{pdpName:i.name,policyName:s.selectedPolicy.name}).then(function(e){t.alertSuccess(e)}),s.mappingLoading=!1,e.$emit("event:policyMapToPdpSuccess",i)}function a(n){o("moon.policy.map.error",{pdpName:s.pdp.name,policyName:s.selectedPolicy.name}).then(function(e){t.alertError(e)}),s.mappingLoading=!1,e.$emit("event:policyMapToPdpError")}if(n.isInvalid(s.form))n.checkFieldsValidity(s.form);else{s.mappingLoading=!0;var l=angular.copy(s.pdp);l.security_pipeline.push(s.selectedPolicy.id),c.update(l,i,a)}}var s=this;s.pdps=[],s.pdp=e.pdp,s.addPolicyToList=!1,s.map=l,function(){a()}()}angular.module("moon").controller("PolicyMapController",e),e.$inject=["$scope","alertService","$translate","formService","policyService","pdpService","utilService"]}(),function(){"use strict";function e(e,t,o,n,i){function c(){function c(n){t("moon.policy.unmap.success",{pdpName:r.pdp.name,policyName:r.policy.name}).then(function(e){o.alertSuccess(e)}),r.unMappingLoading=!1,e.$emit("event:policyUnMappedToPdpSuccess",i.transformOne(n,"pdps"))}function a(n){t("moon.policy.unmap.error",{pdpName:r.pdp.name,policyName:r.policy.name}).then(function(e){o.alertError(e)}),r.unMappingLoading=!1,e.$emit("event:policyUnMappedToPdpError")}r.unMappingLoading=!0;var l=angular.copy(r.pdp);l.security_pipeline=_.without(l.security_pipeline,r.policy.id),n.update(l,c,a)}var r=this;r.pdp=e.pdp,r.policy=e.policy,r.unMappingLoading=!1,r.unmap=c}angular.module("moon").controller("PolicyUnMapController",e),e.$inject=["$scope","$translate","alertService","pdpService","utilService"]}(),function(){"use strict";function e(e,t,o,n,i){function c(){i.findAllWithCallBack(r)}function r(e){l.pdps=_.filter(e,function(e){return _.isNull(e.keystone_project_id)}),l.pdpsLoading=!1}function a(){function c(n){l.project.pdp=l.selectedPDP,t("moon.project.map.success",{projectName:l.project.name,pdpName:l.selectedPDP.name}).then(function(e){o.alertSuccess(e)}),l.mappingLoading=!1,e.$emit("event:projectMappedSuccess",l.project)}function r(n){t("moon.project.map.error",{projectName:l.project.name,pdpName:l.selectedPDP.name}).then(function(e){o.alertError(e)}),l.mappingLoading=!1,e.$emit("event:projectMappedError",l.project)}n.isInvalid(l.form)?n.checkFieldsValidity(l.form):(l.mappingLoading=!0,i.map(l.selectedPDP,l.project.id,c,r))}var l=this;l.form={},l.project=e.project,l.pdps=[],l.pdpsLoading=!0,l.selectedPDP=null,l.map=a,function(){c()}()}angular.module("moon").controller("ProjectMapController",e),e.$inject=["$scope","$translate","alertService","formService","pdpService"]}(),function(){"use strict";function e(e,t,o,n){function i(){function i(n){t("moon.project.unmap.success",{projectName:c.project.name,pdpName:a}).then(function(e){o.alertSuccess(e)}),c.unMappingLoading=!1,delete c.project.mapping,delete c.project.pdp,e.$emit("event:projectUnmappedSuccess",c.project)}function r(n){t("moon.project.unmap.error",{projectName:c.project.name,pdpName:a}).then(function(e){o.alertError(e)}),c.unMappingLoading=!1,e.$emit("event:projectUnmappedError",c.project)}c.unMappingLoading=!0;var a=c.project.pdp.name;n.unMap(c.project.pdp,i,r)}var c=this;c.project=e.project,c.unMappingLoading=!1,c.unmap=i}angular.module("moon").controller("ProjectUnMapController",e),e.$inject=["$scope","$translate","alertService","pdpService"]}(),function(){"use strict";function e(e,t,o,n){return{data:e(t.MODELS+":model_id",{},{get:{method:"GET"},query:{method:"GET"},create:{method:"POST"},remove:{method:"DELETE"},update:{method:"PATCH"}}),findAll:function(){return this.data.query().$promise.then(function(e){return n.transform(e,"models")})},findAllWithCallBack:function(e){return this.data.query().$promise.then(function(t){e(n.transform(t,"models"))})},findOneWithCallback:function(e,t){return this.data.get({model_id:e}).$promise.then(function(e){t(n.transformOne(e,"models"))})},findOneWithMetaRules:function(e){return this.data.get({model_id:e}).$promise.then(function(t){var i=n.transformOne(t,"models");return i.meta_rules.length>0?o.findSomeWithMetaData(i.meta_rules).then(function(t){return i.meta_rules_values=t,i.id=e,i}):(i.meta_rules_values=[],i.id=e),i})},delete:function(e,t,o){delete e.meta_rules_values,this.data.remove({model_id:e.id},e,t,o)},update:function(e,t,o){delete e.meta_rules_values,this.data.update({model_id:e.id},e,t,o)}}}angular.module("moon").factory("modelService",e),e.$inject=["$resource","REST_URI","metaRuleService","utilService"]}(),function(){"use strict";function e(e,t,o,n){var i={subject:e(t.METADATA.subject+":subject_id",{},{get:{method:"GET",isArray:!1},create:{method:"POST"},remove:{method:"DELETE"}}),object:e(t.METADATA.object+":object_id",{},{get:{method:"GET",isArray:!1},create:{method:"POST"},remove:{method:"DELETE"}}),action:e(t.METADATA.action+":action_id",{},{get:{method:"GET",isArray:!1},create:{method:"POST"},remove:{method:"DELETE"}})};return{subject:{findOne:function(e,t){i.subject.get({subject_id:e}).$promise.then(function(e){t(n.transformOne(e,"subject_categories"))})},findOneReturningPromise:function(e){return i.subject.get({subject_id:e}).$promise},findSome:function(e){var t=this;if(0===e.length)return[];var i=_(e).map(function(e){return t.findOneReturningPromise(e)});return o.all(i).then(function(e){return _(e).map(function(e){return n.transformOne(e,"subject_categories")})})},findSomeWithCallback:function(e,t){var i=this;0===e.length&&t([]);var c=_(e).map(function(e){return i.findOneReturningPromise(e)});o.all(c).then(function(e){t(_(e).map(function(e){return n.transformOne(e,"subject_categories")}))})},findAll:function(){return i.subject.get().$promise.then(function(e){return n.transform(e,"subject_categories")})},findAllWithCallback:function(e){return i.subject.get().$promise.then(function(t){e(n.transform(t,"subject_categories"))})},delete:function(e,t,o){i.subject.remove({subject_id:e.id},e,t,o)},add:function(e,t,o){i.subject.create({},e,t,o)}},object:{findOne:function(e,t){i.object.get({object_id:e}).$promise.then(function(e){t(n.transformOne(e,"object_categories"))})},findOneReturningPromise:function(e){return i.object.get({object_id:e}).$promise},findSome:function(e){var t=this;if(0===e.length)return[];var i=_(e).map(function(e){return t.findOneReturningPromise(e)});return o.all(i).then(function(e){return _(e).map(function(e){return n.transformOne(e,"object_categories")})})},findSomeWithCallback:function(e,t){var i=this;0===e.length&&t([]);var c=_(e).map(function(e){return i.findOneReturningPromise(e)});o.all(c).then(function(e){t(_(e).map(function(e){return n.transformOne(e,"object_categories")}))})},findAll:function(){return i.object.get().$promise.then(function(e){return n.transform(e,"object_categories")})},findAllWithCallback:function(e){return i.object.get().$promise.then(function(t){e(n.transform(t,"object_categories"))})},delete:function(e,t,o){i.object.remove({object_id:e.id},e,t,o)},add:function(e,t,o){i.object.create({},e,t,o)}},action:{findOne:function(e,t){i.action.get({action_id:e}).$promise.then(function(e){t(n.transformOne(e,"action_categories"))})},findOneReturningPromise:function(e){return i.action.get({action_id:e}).$promise},findSome:function(e){var t=this;if(0===e.length)return[];var i=_(e).map(function(e){return t.findOneReturningPromise(e)});return o.all(i).then(function(e){return _(e).map(function(e){return n.transformOne(e,"action_categories")})})},findSomeWithCallback:function(e,t){var i=this;0===e.length&&t([]);var c=_(e).map(function(e){return i.findOneReturningPromise(e)});o.all(c).then(function(e){t(_(e).map(function(e){return n.transformOne(e,"action_categories")}))})},findAll:function(){return i.action.get().$promise.then(function(e){return n.transform(e,"action_categories")})},findAllWithCallback:function(e){return i.action.get().$promise.then(function(t){e(n.transform(t,"action_categories"))})},delete:function(e,t,o){i.action.remove({action_id:e.id},e,t,o)},add:function(e,t,o){i.action.create({},e,t,o)}}}}angular.module("moon").factory("metaDataService",e),e.$inject=["$resource","REST_URI","$q","utilService"]}(),function(){"use strict";function e(e,t,o,n,i){return{data:e(t.METARULES+":metarule_id",{},{query:{method:"GET"},get:{method:"GET",isArray:!1},update:{method:"PATCH"},create:{method:"POST"},remove:{method:"DELETE"}}),findAll:function(){return this.data.query().$promise.then(function(e){return i.transform(e,"meta_rules")})},findAllWithCallback:function(e){this.data.query().$promise.then(function(t){e(i.transform(t,"meta_rules"))})},findSomeWithMetaData:function(e){var t=this;if(0===e.length)return[];var o=_(e).map(function(e){return t.findOneReturningPromise(e)});return n.all(o).then(function(e){return _(e).map(function(e){var o=i.transformOne(e,"meta_rules");return o=t.findMetaDataFromMetaRule(o)})})},findSomeWithCallback:function(e,t){var o=this;if(0===e.length)return t([]);var c=_(e).map(function(e){return o.findOneReturningPromise(e)});return n.all(c).then(function(e){t(_(e).map(function(e){return i.transformOne(e,"meta_rules")}))})},findOneReturningPromise:function(e){return this.data.get({metarule_id:e}).$promise},findOne:function(e){return this.data.get({metarule_id:e}).$promise.then(function(e){return i.transformOne(e,"meta_rules")})},findOneWithCallback:function(e,t){this.data.get({metarule_id:e}).$promise.then(function(e){t(i.transformOne(e,"meta_rules"))})},findOneWithMetaData:function(e){var t=this;return this.data.get({metarule_id:e}).$promise.then(function(e){var o=i.transformOne(e,"meta_rules");return o=t.findMetaDataFromMetaRule(o)})},findMetaDataFromMetaRule:function(e){return e.subject_categories.length>0?o.subject.findSome(e.subject_categories).then(function(t){e.subject_categories_values=t}):e.subject_categories_values=[],e.object_categories.length>0?o.object.findSome(e.object_categories).then(function(t){e.object_categories_values=t}):e.object_categories_values=[],e.action_categories.length>0?o.action.findSome(e.action_categories).then(function(t){e.action_categories_values=t}):e.action_categories_values=[],e},delete:function(e,t,o){this.data.remove({metarule_id:e.id},e,t,o)},update:function(e,t,o){delete e.subject_categories_values,delete e.object_categories_values,delete e.action_categories_values,this.data.update({metarule_id:e.id},e,t,o)}}}angular.module("moon").factory("metaRuleService",e),e.$inject=["$resource","REST_URI","metaDataService","$q","utilService"]}(),function(){"use strict";function e(e,t,o,n){return{data:{policy:e(t.POLICIES+":policy_id",{},{query:{method:"GET"},create:{method:"POST"},update:{method:"PATCH"},remove:{method:"DELETE"}})},findAll:function(){return this.data.policy.query().$promise.then(function(e){return o.transform(e,"policies")})},findAllWithCallback:function(e){return this.data.policy.query().$promise.then(function(t){e(o.transform(t,"policies"))})},findOneReturningPromise:function(e){return this.data.policy.get({policy_id:e}).$promise},findSomeWithCallback:function(e,t){var i=this;0===e.length&&t([]);var c=_(e).map(function(e){return i.findOneReturningPromise(e)});n.all(c).then(function(e){t(_(e).map(function(e){return o.transformOne(e,"policies")}))})},findOne:function(e){return this.data.policy.get({policy_id:e}).$promise.then(function(e){return o.transformOne(e,"policies")})},update:function(e,t,o){this.data.policy.update({policy_id:e.id},e,t,o)},delete:function(e,t,o){this.data.policy.remove({policy_id:e.id},e,t,o)}}}angular.module("moon").factory("policyService",e),e.$inject=["$resource","REST_URI","utilService","$q"]}(),function(){"use strict";function e(e,t){function o(e,t){angular.copy(t,n.metaRule)}var n=this;n.metaRule=e.metaRule;var i={"event:metaRuleBasicUpdatedSuccess":t.$on("event:metaRuleBasicUpdatedSuccess",o)};for(var c in i)e.$on("$destroy",i[c])}angular.module("moon").controller("MetaRulesEditController",e),e.$inject=["$scope","$rootScope"]}(),function(){"use strict";function e(){return{templateUrl:"html/model/edit/metarules/action/metarules-edit-basic.tpl.html",bindToController:!0,controller:t,controllerAs:"edit",scope:{metaRule:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c){function r(){function r(t){var o=c.transformOne(t,"meta_rules");angular.copy(o,l.metaRule),i("moon.model.metarules.edit.basic.success",{metaRuleName:o.name}).then(function(e){n.alertSuccess(e)}),l.loading=!1,e.$emit("event:metaRuleBasicUpdatedSuccess",l.metaRule)}function a(e){i("moon.model.edit.basic.error",{metaRuleName:l.metaRule.name}).then(function(e){n.alertError(e)}),l.loading=!1}o.isInvalid(l.form)?o.checkFieldsValidity(l.form):(l.loading=!0,t.update(l.metaRuleToEdit,r,a))}function a(){l.metaRuleToEdit=angular.copy(l.metaRule)}var l=this;l.editMetaRule=r,l.init=a,l.form={},function(){l.metaRule=e.edit.metaRule,l.metaRuleToEdit=angular.copy(l.metaRule)}()}angular.module("moon").directive("moonMetaRulesEditBasic",e),e.$inject=[],angular.module("moon").controller("moonMetaRulesEditBasicController",t),t.$inject=["$scope","metaRuleService","formService","alertService","$translate","utilService"]}(),function(){"use strict";function e(){return{templateUrl:"html/policy/edit/parameter/assignments/assignments-edit.tpl.html",bindToController:!0,controller:t,controllerAs:"edit",scope:{assignmentsType:"=",policy:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c,r,a,l,s,d){function u(){P.assignments={id:null,category_id:null,data_id:null,policy_id:null},p(),h()}function m(){function c(t){var i={};switch(P.assignmentsType){case l.TYPE.SUBJECT:i=r.transformOne(t,"subject_assignments");break;case l.TYPE.OBJECT:i=r.transformOne(t,"object_assignments");break;case l.TYPE.ACTION:i=r.transformOne(t,"action_assignments")}n("moon.policy.assignments.edit.create.success").then(function(e){o.alertSuccess(e)}),s&&i.policy_id===P.policy.id?(e.$emit("event:createAssignmentsFromAssignmentsEditSuccess",P.assignmentsType),u(),E()):s&&(u(),E())}function a(e){n("moon.policy.rules.edit.action.add.create.error").then(function(e){o.alertError(e)}),E()}if(P.assignementsAttributeValid=!0,S(),i.isInvalid(P.form))i.checkFieldsValidity(P.form);else if(P.assignementsAttributeValid){T();var s=!1;P.assignments.id=P.selectedPerimeter.id,P.assignments.category_id=P.selectedCategory.id,P.assignments.policy_id=P.selectedPolicy.id;var d=angular.copy(P.selectedDataList);_.each(d,function(e){P.assignments.data_id=e.id;var o=angular.copy(P.assignments);switch(P.assignmentsType){case l.TYPE.SUBJECT:t.subject.add(o,P.policy.id,c,a);break;case l.TYPE.OBJECT:t.object.add(o,P.policy.id,c,a);break;case l.TYPE.ACTION:t.action.add(o,P.policy.id,c,a)}}),s=!0}}function p(){P.policyList=[],P.loadingPolicies=!0,c.findAllWithCallback(function(e){_.each(e,function(e){e.id===P.policy.id&&(P.selectedPolicy=e)}),P.policyList=e,P.loadingPolicies=!1})}function f(){function e(e){P.perimeterList=e,P.loadingPerimeters=!1}switch(P.perimeterList=[],P.loadingPerimeters=!0,P.assignmentsType){case l.TYPE.SUBJECT:a.subject.findAllFromPolicyWithCallback(P.selectedPolicy.id,e);break;case l.TYPE.OBJECT:a.object.findAllFromPolicyWithCallback(P.selectedPolicy.id,e);break;case l.TYPE.ACTION:a.action.findAllFromPolicyWithCallback(P.selectedPolicy.id,e);break;default:P.perimeterList=[],P.loadingPerimeters=!1}}function h(){function e(e){P.categoryList=e,P.loadingCategories=!1}switch(P.categoryList=[],P.loadingCategories=!0,P.assignmentsType){case l.TYPE.SUBJECT:s.subject.findAllWithCallback(e);break;case l.TYPE.OBJECT:s.object.findAllWithCallback(e);break;case l.TYPE.ACTION:s.action.findAllWithCallback(e);break;default:P.categoryList=[],P.loadingCategories=!1}}function g(e){function t(e){P.dataList=e,P.dataToBeSelected=angular.copy(P.dataList),P.selectedDataList=[],P.loadingData=!1}switch(P.dataList=[],P.dataToBeSelected=[],P.selectedDataList=[],P.loadingData=!0,P.assignmentsType){case l.TYPE.SUBJECT:d.subject.findAllFromCategoriesWithCallback(P.selectedPolicy.id,e,t);break;case l.TYPE.OBJECT:d.object.findAllFromCategoriesWithCallback(P.selectedPolicy.id,e,t);break;case l.TYPE.ACTION:d.action.findAllFromCategoriesWithCallback(P.selectedPolicy.id,e,t);break;default:P.loadingData=!1}}function y(){P.dataToBeSelected=_.without(P.dataToBeSelected,P.selectedData),P.selectedDataList.push(P.selectedData),b()}function v(e){P.dataToBeSelected.push(e),P.selectedDataList=_.without(P.selectedDataList,e)}function b(){P.selectedData=void 0}function j(e){if(_.isUndefined(e))return"(None)";switch(P.assignmentsType){case l.TYPE.SUBJECT:return e.name;case l.TYPE.OBJECT:case l.TYPE.ACTION:return e.value.name;default:return e.name}}function S(){P.selectedDataList.length>=1?P.assignementsAttributeValid=!0:P.assignementsAttributeValid=!1}function T(){P.loading=!0}function E(){P.loading=!1}var P=this;P.assignmentsType=e.edit.assignmentsType,P.policy=e.edit.policy,P.laoading=!1,P.form={},P.policyList=[],P.loadingPolicies=!0,P.categoryList=[],P.loadingCategories=!0,P.perimeterList=[],P.loadingPerimeters=!0,P.dataList=[],P.dataToBeSelected=[],P.selectedDataList=[],P.loadingData=!0,P.assignementsAttributeValid=!0,P.addSelectedData=y,P.removeSelectedData=v,P.getName=j,P.create=m,u(),e.$watch("edit.selectedPolicy",function(e){_.isUndefined(e)||f()}),e.$watch("edit.selectedCategory",function(e){b(),_.isUndefined(e)||g(e.id)})}angular.module("moon").directive("moonAssignmentsEdit",e),e.$inject=[],angular.module("moon").controller("moonAssignmentsEditController",t),t.$inject=["$scope","assignmentsService","alertService","$translate","formService","policyService","utilService","perimeterService","ASSIGNMENTS_CST","metaDataService","dataService"]}(),function(){"use strict";function e(){return{
+templateUrl:"html/policy/edit/parameter/assignments/assignments-list.tpl.html",bindToController:!0,controller:t,controllerAs:"list",scope:{policy:"=",editMode:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c,r,a,l,s,d){function u(){m(),p(),f()}function m(){$.loadingSub=!0,o.subject.findAllFromPolicyWithCallback($.policy.id,function(e){$.subjects=e,$.loadingSub=!1})}function p(){$.loadingObj=!0,o.object.findAllFromPolicyWithCallback($.policy.id,function(e){$.objects=e,$.loadingObj=!1})}function f(){$.loadingAct=!0,o.action.findAllFromPolicyWithCallback($.policy.id,function(e){$.actions=e,$.loadingAct=!1})}function h(e,t){function o(t){e.callPerimeterInProgress=!1,e.perimeter=t}if(_.has(e,"perimeter"))return e.perimeter;if(!_.has(e,"callPerimeterInProgress"))switch(e.callPerimeterInProgress=!0,t){case r.TYPE.SUBJECT:s.subject.findOneFromPolicyWithCallback($.policy.id,e.subject_id,o);break;case r.TYPE.OBJECT:s.object.findOneFromPolicyWithCallback($.policy.id,e.object_id,o);break;case r.TYPE.ACTION:s.action.findOneFromPolicyWithCallback($.policy.id,e.action_id,o)}return!1}function g(e,t){function o(t){e.callCategoryInProgress=!1,e.category=t}if(_.has(e,"category"))return e.category;if(!_.has(e,"callCategoryInProgress"))switch(e.callCategoryInProgress=!0,t){case r.TYPE.SUBJECT:l.subject.findOne(e.subject_cat_id,o);break;case r.TYPE.OBJECT:l.object.findOne(e.object_cat_id,o);break;case r.TYPE.ACTION:l.action.findOne(e.action_cat_id,o)}return!1}function y(e,t,o){function n(o){t.assignments_value[e].callDataInProgress=!1,t.assignments_value[e].data=o}if(_.has(t,"assignments_value")||(t.assignments_value=Array.apply(null,new Array(t.assignments.length)).map(function(){return{data:{}}})),_.has(t.assignments_value[e],"callDataInProgress")&&!t.assignments_value[e].callDataInProgress)return t.assignments_value[e].data;if(!_.has(t.assignments_value[e],"callDataInProgress"))switch(t.assignments_value[e].callDataInProgress=!0,o){case r.TYPE.SUBJECT:d.subject.data.findOne($.policy.id,t.category_id,t.assignments[e],n);break;case r.TYPE.OBJECT:d.object.data.findOne($.policy.id,t.category_id,t.assignments[e],n);break;case r.TYPE.ACTION:d.action.data.findOne($.policy.id,t.category_id,t.assignments[e],n)}return!1}function v(e,t){function c(t){n("moon.policy.assignments.subject.delete.success").then(function(e){i.alertSuccess(e)}),m(),e.loader=!1}function r(t){n("moon.policy.assignments.subject.delete.error",{subjectName:e.name,reason:t.message}).then(function(e){i.alertError(e)}),e.loader=!1}e.loader=!0,o.subject.delete($.policy.id,e.subject_id,e.subject_cat_id,t,c,r)}function b(e,t){function c(t){n("moon.policy.assignments.object.delete.success").then(function(e){i.alertSuccess(e)}),p(),e.loader=!1}function r(t){n("moon.policy.assignments.object.delete.error",{objectName:e.name,reason:t.message}).then(function(e){i.alertError(e)}),e.loader=!1}e.loader=!0,o.object.delete($.policy.id,e.object_id,e.object_cat_id,t,c,r)}function j(e,t){function c(t){n("moon.policy.assignments.action.delete.success").then(function(e){i.alertSuccess(e)}),f(),e.loader=!1}function r(t){n("moon.policy.assignments.action.delete.error",{actionName:e.name,reason:t.message}).then(function(e){i.alertError(e)}),e.loader=!1}e.loader=!0,o.action.delete($.policy.id,e.action_id,e.action_cat_id,t,c,r)}function S(){return $.subjects?$.subjects:[]}function T(){return $.objects?$.objects:[]}function E(){return $.actions?$.actions:[]}function P(e,t){switch(t){case r.TYPE.SUBJECT:m();break;case r.TYPE.OBJECT:p();break;case r.TYPE.ACTION:f();break;default:u()}}var $=this;$.policy=e.list.policy,$.editMode=e.list.editMode,$.typeOfSubject=r.TYPE.SUBJECT,$.typeOfObject=r.TYPE.OBJECT,$.typeOfAction=r.TYPE.ACTION,$.deleteSub=v,$.deleteObj=b,$.deleteAct=j,$.getSubjects=S,$.getObjects=T,$.getActions=E,$.getCategoryFromAssignment=g,$.getPerimeterFromAssignment=h,$.getDataFromAssignmentsIndex=y,u();var C={"event:createAssignmentsFromAssignmentsEditSuccess":t.$on("event:createAssignmentsFromAssignmentsEditSuccess",P)};_.each(C,function(t){e.$on("$destroy",C[t])})}angular.module("moon").directive("moonAssignmentsList",e),e.$inject=[],angular.module("moon").controller("moonAssignmentsListController",t),t.$inject=["$scope","$rootScope","assignmentsService","$translate","alertService","policyService","ASSIGNMENTS_CST","utilService","metaDataService","perimeterService","dataService"]}(),function(){"use strict";function e(){return{templateUrl:"html/policy/edit/parameter/data/data-edit.tpl.html",bindToController:!0,controller:t,controllerAs:"edit",scope:{mnDataType:"=",policy:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c,r,a,l,s,d){function u(){s.findOneWithCallback(h.policy.model_id,function(e){d.findSomeWithCallback(e.meta_rules,function(e){function t(e){h.categoriesToBeSelected=e}switch(h.dataType){case o.TYPE.SUBJECT:var n=_.reduce(e,function(e,t){return e.concat(t.subject_categories)},[]);l.subject.findSomeWithCallback(n,t);break;case o.TYPE.OBJECT:var i=_.reduce(e,function(e,t){return e.concat(t.object_categories)},[]);l.object.findSomeWithCallback(i,t);break;case o.TYPE.ACTION:var c=_.reduce(e,function(e,t){return e.concat(t.action_categories)},[]);l.action.findSomeWithCallback(c,t);break;default:h.categoriesToBeSelected=[]}})})}function m(){function r(t){var c={},r="";switch(h.dataType){case o.TYPE.SUBJECT:c=a.transformOne(t.subject_data,"data"),r=c.name;break;case o.TYPE.OBJECT:c=a.transformOne(t.object_data,"data"),r=c.value.name;break;case o.TYPE.ACTION:c=a.transformOne(t.action_data,"data"),r=c.value.name}i("moon.policy.data.edit.create.success",{name:r}).then(function(e){n.alertSuccess(e)}),e.$emit("event:createDataFromDataEditSuccess",c,h.dataType),f(),h.list.push(c)}function l(e){i("moon.policy.data.edit.create.error",{name:s.name}).then(function(e){n.alertError(e)}),f()}if(c.isInvalid(h.form))c.checkFieldsValidity(h.form);else{p();var s=angular.copy(h.data);switch(h.dataType){case o.TYPE.SUBJECT:t.subject.add(s,h.policy.id,h.selectedCategory.id,r,l);break;case o.TYPE.OBJECT:t.object.add(s,h.policy.id,h.selectedCategory.id,r,l);break;case o.TYPE.ACTION:t.action.add(s,h.policy.id,h.selectedCategory.id,r,l)}}}function p(){h.loading=!0}function f(){h.loading=!1}var h=this;h.dataType=e.edit.mnDataType,h.policy=e.edit.policy,h.fromList=!1,h.loading=!1,h.form={},h.data={name:null,description:null},h.list=[],h.categoriesToBeSelected=[],h.create=m,function(){function e(e){_.each(e,function(e){e.policy_id!==h.policy.id&&h.list.push(e)})}switch(u(),h.dataType){case o.TYPE.SUBJECT:t.subject.findAllFromPolicyWithCallback(h.policy.id,e);break;case o.TYPE.OBJECT:t.object.findAllFromPolicyWithCallback(h.policy.id,e);break;case o.TYPE.ACTION:t.action.findAllFromPolicyWithCallback(h.policy.id,e);break;default:h.list=[]}}()}angular.module("moon").directive("moonDataEdit",e),e.$inject=[],angular.module("moon").controller("moonDataEditController",t),t.$inject=["$scope","dataService","DATA_CST","alertService","$translate","formService","policyService","utilService","metaDataService","modelService","metaRuleService"]}(),function(){"use strict";function e(){return{templateUrl:"html/policy/edit/parameter/data/data-list.tpl.html",bindToController:!0,controller:t,controllerAs:"list",scope:{policy:"=",editMode:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c,r){function a(){S.loadingSub=!0,o.subject.findAllFromPolicyWithCallback(S.policy.id,function(e){S.subjects=e,S.loadingSub=!1})}function l(){S.loadingObj=!0,o.object.findAllFromPolicyWithCallback(S.policy.id,function(e){S.objects=e,S.loadingObj=!1})}function s(){S.loadingAct=!0,o.action.findAllFromPolicyWithCallback(S.policy.id,function(e){S.actions=e,S.loadingAct=!1})}function d(e,t){function o(t){e.callCategoryInProgress=!1,e.category=t}if(_.has(e,"category"))return e.category;if(!_.has(e,"callCategoryInProgress"))switch(e.callCategoryInProgress=!0,t){case c.TYPE.SUBJECT:r.subject.findOne(e.category_id,o);break;case c.TYPE.OBJECT:r.object.findOne(e.category_id,o);break;case c.TYPE.ACTION:r.action.findOne(e.category_id,o)}return!1}function u(e){function t(t){n("moon.policy.data.subject.delete.success",{subjectName:e.name}).then(function(e){i.alertSuccess(e)}),y(e),e.loader=!1}function c(t){n("moon.policy.data.subject.delete.error",{subjectName:e.name,reason:t.message}).then(function(e){i.alertError(e)}),e.loader=!1}e.loader=!0,o.subject.delete(e,S.policy.id,e.category_id,t,c)}function m(e){function t(t){n("moon.policy.data.object.delete.success",{objectName:e.name}).then(function(e){i.alertSuccess(e)}),v(e),e.loader=!1}function c(t){n("moon.policy.data.object.delete.error",{objectName:e.name,reason:t.message}).then(function(e){i.alertError(e)}),e.loader=!1}e.loader=!0,o.object.delete(e,S.policy.id,e.category_id,t,c)}function p(e){function t(t){n("moon.policy.data.action.delete.success",{actionName:e.name}).then(function(e){i.alertSuccess(e)}),b(e),e.loader=!1}function c(t){n("moon.policy.data.action.delete.error",{actionName:e.name,reason:t.message}).then(function(e){i.alertError(e)}),e.loader=!1}e.loader=!0,o.action.delete(e,S.policy.id,e.category_id,t,c)}function f(){return S.subjects?S.subjects:[]}function h(){return S.objects?S.objects:[]}function g(){return S.actions?S.actions:[]}function y(e){S.subjects=_.without(S.subjects,e)}function v(e){S.objects=_.without(S.objects,e)}function b(e){S.actions=_.without(S.actions,e)}function j(e,t,o){switch(o){case c.TYPE.SUBJECT:S.subjects.push(t);break;case c.TYPE.OBJECT:S.objects.push(t);break;case c.TYPE.ACTION:S.actions.push(t)}}var S=this;S.policy=e.list.policy,S.editMode=e.list.editMode,S.typeOfSubject=c.TYPE.SUBJECT,S.typeOfObject=c.TYPE.OBJECT,S.typeOfAction=c.TYPE.ACTION,S.deleteSub=u,S.deleteObj=m,S.deleteAct=p,S.getSubjects=f,S.getObjects=h,S.getActions=g,S.getCategoryFromData=d,function(){a(),l(),s()}();var T={"event:createDataFromDataEditSuccess":t.$on("event:createDataFromDataEditSuccess",j)};_.each(T,function(t){e.$on("$destroy",T[t])})}angular.module("moon").directive("moonDataList",e),e.$inject=[],angular.module("moon").controller("moonDataListController",t),t.$inject=["$scope","$rootScope","dataService","$translate","alertService","DATA_CST","metaDataService"]}(),function(){"use strict";function e(){return{templateUrl:"html/policy/edit/parameter/perimeter/perimeter-edit.tpl.html",bindToController:!0,controller:t,controllerAs:"edit",scope:{perimeterType:"=",policy:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c,r,a,l){function s(){function e(e){_.each(e,function(e){-1===_.indexOf(e.policy_list,T.policy.id)&&T.list.push(e)})}switch(d(),T.perimeterType){case n.TYPE.SUBJECT:o.subject.findAllWithCallback(e);break;case n.TYPE.OBJECT:o.object.findAllWithCallback(e);break;case n.TYPE.ACTION:o.action.findAllWithCallback(e);break;default:T.list=[]}}function d(){T.policyList=[],a.findAllWithCallback(function(e){T.policyList=e,T.policiesToBeSelected=angular.copy(T.policyList)})}function u(){T.selectedPolicy&&!_.contains(T.perimeter.policy_list,T.selectedPolicy.id)&&(T.perimeter.policy_list.push(T.selectedPolicy.id),T.selectedPolicyList.push(T.selectedPolicy),T.policiesToBeSelected=_.without(T.policiesToBeSelected,T.selectedPolicy))}function m(){T.perimeter.policy_list=[],T.selectedPolicyList=[],T.policiesToBeSelected=angular.copy(T.policyList)}function p(e){T.policiesToBeSelected.push(e),T.perimeter.policy_list=_.without(T.perimeter.policy_list,e.id),T.selectedPolicyList=_.without(T.selectedPolicyList,e)}function f(){function e(e){c("moon.perimeter.update.success",{policyName:r.name}).then(function(e){i.alertSuccess(e)}),b()}function t(e){c("moon.policy.update.error",{policyName:r.name,reason:e.message}).then(function(e){i.alertError(e)}),b()}if(T.selectedPerimeter){v();var r=T.selectedPerimeter;switch(r.policy_list.push(T.policy.id),T.perimeterType){case n.TYPE.SUBJECT:o.subject.update(r,e,t);break;case n.TYPE.OBJECT:o.object.update(r,e,t);break;case n.TYPE.ACTION:o.action.update(r,e,t)}}}function h(){function t(t){var o={};switch(T.perimeterType){case n.TYPE.SUBJECT:o=l.transformOne(t,"subjects");break;case n.TYPE.OBJECT:o=l.transformOne(t,"objects");break;case n.TYPE.ACTION:o=l.transformOne(t,"actions")}c("moon.policy.perimeter.edit.create.success",{name:o.name}).then(function(e){i.alertSuccess(e)}),b(),-1===_.indexOf(o.policy_list,T.policy.id)?T.list.push(o):e.$emit("event:createAssignmentsFromAssignmentsEditSuccess",o,T.perimeterType),j(),m()}function a(e){c("moon.policy.perimeter.edit.create.error",{name:s.name}).then(function(e){i.alertError(e)}),b()}if(r.isInvalid(T.form))r.checkFieldsValidity(T.form);else{v();var s=angular.copy(T.perimeter);switch(T.perimeterType){case n.TYPE.SUBJECT:o.subject.add(s,t,a);break;case n.TYPE.OBJECT:o.object.add(s,t,a);break;case n.TYPE.ACTION:o.action.add(s,t,a)}}}function g(){function t(t){c("moon.policy.perimeter.edit.delete.success",{name:d.name}).then(function(e){i.alertSuccess(e)}),a.findOneReturningPromise(T.policy.id).then(function(t){T.policy=l.transformOne(t,"policies"),y(),s(),b(),e.$emit("event:deletePerimeterFromPerimeterAddSuccess",T.policy)})}function r(e){c("moon.policy.perimeter.edit.delete.error",{name:d.name}).then(function(e){i.alertError(e)}),b()}if(T.selectedPerimeter){v();var d=angular.copy(T.selectedPerimeter);switch(T.perimeterType){case n.TYPE.SUBJECT:o.subject.delete(d,t,r);break;case n.TYPE.OBJECT:o.object.delete(d,t,r);break;case n.TYPE.ACTION:o.action.delete(d,t,r)}}}function y(){T.list=_.without(T.list,T.selectedPerimeter),delete T.selectedPerimeter}function v(){T.loading=!0}function b(){T.loading=!1}function j(){T.fromList=!0}function S(e,t,o){o===T.perimeterType&&-1===_.indexOf(t.policy_list,T.policy.id)&&T.list.push(t)}var T=this;T.perimeterType=e.edit.perimeterType,T.subjectType=n.TYPE.SUBJECT,T.policy=e.edit.policy,T.fromList=!0,T.loading=!1,T.form={},T.perimeter={name:null,description:null,partner_id:null,policy_list:[],email:null},T.list=[],T.policyList=[],T.policiesToBeSelected=[],T.selectedPolicyList=[],T.create=h,T.addToPolicy=f,T.addPolicyToPerimeter=u,T.clearSelectedPolicies=m,T.removeSelectedPolicy=p,T.deletePerimeter=g,s();var E={"event:unMapPerimeterFromPerimeterList":t.$on("event:unMapPerimeterFromPerimeterList",S)};_.each(E,function(t){e.$on("$destroy",E[t])})}angular.module("moon").directive("moonPerimeterEdit",e),e.$inject=[],angular.module("moon").controller("moonPerimeterEditController",t),t.$inject=["$scope","$rootScope","perimeterService","PERIMETER_CST","alertService","$translate","formService","policyService","utilService"]}(),function(){"use strict";function e(){return{templateUrl:"html/policy/edit/parameter/perimeter/perimeter-list.tpl.html",bindToController:!0,controller:t,controllerAs:"list",scope:{policy:"=",editMode:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c){function r(){a(),l(),s()}function a(){v.loadingSub=!0,o.subject.findAllFromPolicyWithCallback(v.policy.id,function(e){v.subjects=e,v.loadingSub=!1})}function l(){v.loadingObj=!0,o.object.findAllFromPolicyWithCallback(v.policy.id,function(e){v.objects=e,v.loadingObj=!1})}function s(){v.loadingAct=!0,o.action.findAllFromPolicyWithCallback(v.policy.id,function(e){v.actions=e,v.loadingAct=!1})}function d(t){function a(o){n("moon.policy.perimeter.update.success",{perimeterName:s.name}).then(function(e){i.alertSuccess(e)}),e.$emit("event:unMapPerimeterFromPerimeterList",t,c.TYPE.SUBJECT),r(),t.loader=!1}function l(e){n("moon.policy.perimeter.update.error",{perimeterName:t.name,reason:e.message}).then(function(e){i.alertError(e)}),t.loader=!1}t.policy_list=_.without(t.policy_list,v.policy.id),t.loader=!0;var s=angular.copy(t);o.subject.unMapPerimeterFromPolicy(v.policy.id,t.id,a,l)}function u(t){function a(o){n("moon.policy.perimeter.update.success",{perimeterName:s.name}).then(function(e){i.alertSuccess(e)}),e.$emit("event:unMapPerimeterFromPerimeterList",t,c.TYPE.OBJECT),r(),t.loader=!1}function l(e){n("moon.policy.perimeter.update.error",{perimeterName:t.name,reason:e.message}).then(function(e){i.alertError(e)}),t.loader=!1}t.policy_list=_.without(t.policy_list,v.policy.id),t.loader=!0;var s=angular.copy(t);o.object.unMapPerimeterFromPolicy(v.policy.id,t.id,a,l)}function m(t){function a(o){n("moon.policy.perimeter.update.success",{perimeterName:s.name}).then(function(e){i.alertSuccess(e)}),e.$emit("event:unMapPerimeterFromPerimeterList",t,c.TYPE.ACTION),r(),t.loader=!1}function l(e){n("moon.policy.perimeter.update.error",{perimeterName:t.name,reason:e.message}).then(function(e){i.alertError(e)}),t.loader=!1}t.policy_list=_.without(t.policy_list,v.policy.id),t.loader=!0;var s=angular.copy(t);o.action.unMapPerimeterFromPolicy(v.policy.id,t.id,a,l)}function p(){return v.subjects?v.subjects:[]}function f(){return v.objects?v.objects:[]}function h(){return v.actions?v.actions:[]}function g(e,t){v.policy=t,r()}function y(e,t,o){switch(o){case c.TYPE.SUBJECT:v.subjects.push(t);break;case c.TYPE.OBJECT:v.objects.push(t);break;case c.TYPE.ACTION:v.actions.push(t)}}var v=this;v.policy=e.list.policy,v.editMode=e.list.editMode,v.typeOfSubject=c.TYPE.SUBJECT,v.typeOfObject=c.TYPE.OBJECT,v.typeOfAction=c.TYPE.ACTION,v.unMapSub=d,v.unMapObj=u,v.unMapAct=m,v.getSubjects=p,v.getObjects=f,v.getActions=h,r();var b={"event:deletePerimeterFromPerimeterAddSuccess":t.$on("event:deletePerimeterFromPerimeterAddSuccess",g),"event:createAssignmentsFromAssignmentsEditSuccess":t.$on("event:createAssignmentsFromAssignmentsEditSuccess",y)};_.each(b,function(t){e.$on("$destroy",b[t])})}angular.module("moon").directive("moonPerimeterList",e),e.$inject=[],angular.module("moon").controller("moonPerimeterListController",t),t.$inject=["$scope","$rootScope","perimeterService","$translate","alertService","PERIMETER_CST"]}(),function(){"use strict";function e(){return{templateUrl:"html/policy/edit/parameter/rules/rules-edit.tpl.html",bindToController:!0,controller:t,controllerAs:"edit",scope:{policy:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c,r,a,l,s,d,u){function m(){M.rules={meta_rule_id:null,rule:[],policy_id:null,instructions:'[{"decision": "grant"}]',enabled:!0},R(),p(),E()}function p(){M.policyList=[],c.findAllWithCallback(function(e){_.each(e,function(e){e.id===M.policy.id&&(M.selectedPolicy=e)}),M.policyList=e})}function f(){M.selectedPolicy.meta_rules_values=void 0,s.findOneWithCallback(M.selectedPolicy.model_id,function(e){a.findSomeWithCallback(e.meta_rules,function(e){M.selectedPolicy.meta_rules_values=e})})}function h(e,t,o){l.subject.findSomeWithCallback(e,function(e){M.categories.subject=e,M.categories.loadingSubjects=!1,_.each(M.categories.subject,function(e){d.subject.findAllFromCategoriesWithCallback(M.selectedPolicy.id,e.id,function(e){M.data.subject=e,M.data.loadingSubjects=!1,M.data.subjectsToBeSelected=angular.copy(M.data.subject)})})}),l.object.findSomeWithCallback(t,function(e){M.categories.object=e,M.categories.loadingObjects=!1,_.each(M.categories.object,function(e){d.object.findAllFromCategoriesWithCallback(M.selectedPolicy.id,e.id,function(e){M.data.object=e,M.data.loadingObjects=!1,M.data.objectsToBeSelected=angular.copy(M.data.object)})})}),l.action.findSomeWithCallback(o,function(e){M.categories.action=e,M.categories.loadingActions=!1,_.each(M.categories.action,function(e){d.action.findAllFromCategoriesWithCallback(M.selectedPolicy.id,e.id,function(e){M.data.action=e,M.data.loadingActions=!1,M.data.actionsToBeSelected=angular.copy(M.data.action)})})})}function g(){function c(t){var i=r.transformOne(t,"rules");n("moon.policy.rules.edit.action.add.create.success").then(function(e){o.alertSuccess(e)}),e.$emit("event:createRulesFromDataRulesSuccess",i),m(),T()}function a(e){n("moon.policy.rules.edit.action.add.create.error").then(function(e){o.alertError(e)}),T()}if(M.instructionsValid=!0,M.numberOfSelectedSubjectValid=!0,M.numberOfSelectedObjecttValid=!0,M.numberOfSelectedActionsValid=!0,y(),v(),i.isInvalid(M.form))i.checkFieldsValidity(M.form);else if(M.instructionsValid&&v()){S(),A(),M.rules.meta_rule_id=M.selectedMetaRules.id,M.rules.policy_id=M.selectedPolicy.id;var l=angular.copy(M.rules);l.instructions=JSON.parse(M.rules.instructions),t.add(l,M.policy.id,c,a)}}function y(){b(M.rules.instructions)?M.instructionsValid=!0:M.instructionsValid=!1}function v(){return $(u.TYPE.SUBJECT)?M.numberOfSelectedSubjectValid=!0:M.numberOfSelectedSubjectValid=!1,$(u.TYPE.OBJECT)?M.numberOfSelectedObjecttValid=!0:M.numberOfSelectedObjecttValid=!1,$(u.TYPE.ACTION)?M.numberOfSelectedActionsValid=!0:M.numberOfSelectedActionsValid=!1,M.numberOfSelectedSubjectValid&&M.numberOfSelectedObjecttValid&&M.numberOfSelectedActionsValid}function b(e){return!_.isUndefined(e)&&j(e)}function j(e){var t=null;try{t=JSON.parse(e)}catch(e){return!1}return"object"==typeof t&&null!==t}function S(){M.loading=!0}function T(){M.loading=!1}function E(){M.selectedMetaRules=void 0,P()}function P(){M.selectedSubject=void 0,M.selectedObject=void 0,M.selectedAction=void 0}function $(e){if(!M.selectedMetaRules)return!1;switch(e){case u.TYPE.SUBJECT:return M.data.selectedSubjectsList.length===M.selectedMetaRules.subject_categories.length;case u.TYPE.OBJECT:return M.data.selectedObjectsList.length===M.selectedMetaRules.object_categories.length;case u.TYPE.ACTION:return M.data.selectedActionsList.length===M.selectedMetaRules.action_categories.length}}function C(e){switch(e){case u.TYPE.SUBJECT:if(!M.selectedSubject||$(e)||_.contains(M.data.selectedSubjectsList,M.selectedSubject))return;M.data.selectedSubjectsList.push(M.selectedSubject),M.data.subjectsToBeSelected=_.without(M.data.subjectsToBeSelected,M.selectedSubject);break;case u.TYPE.OBJECT:if(!M.selectedObject||$(e)||_.contains(M.data.selectedObjectsList,M.selectedObject))return;M.data.selectedObjectsList.push(M.selectedObject),M.data.objectsToBeSelected=_.without(M.data.objectsToBeSelected,M.selectedObject);break;case u.TYPE.ACTION:if(!M.selectedAction||$(e)||_.contains(M.data.selectedActionsList,M.selectedAction))return;M.data.selectedActionsList.push(M.selectedAction),M.data.actionsToBeSelected=_.without(M.data.actionsToBeSelected,M.selectedAction)}}function O(e,t){switch(t){case u.TYPE.SUBJECT:M.data.subjectsToBeSelected.push(e),M.data.selectedSubjectsList=_.without(M.data.selectedSubjectsList,e);break;case u.TYPE.OBJECT:M.data.objectsToBeSelected.push(e),M.data.selectedObjectsList=_.without(M.data.selectedObjectsList,e);break;case u.TYPE.ACTION:M.data.actionsToBeSelected.push(e),M.data.selectedActionsList=_.without(M.data.selectedActionsList,e)}}function A(){function e(e){M.rules.rule.push(e.id)}_.each(M.data.selectedSubjectsList,e),_.each(M.data.selectedObjectsList,e),_.each(M.data.selectedActionsList,e)}function R(){M.data={subject:[],loadingSubjects:!0,subjectsToBeSelected:[],selectedSubjectsList:[],subjectCST:u.TYPE.SUBJECT,object:[],loadingObjects:!0,objectsToBeSelected:[],selectedObjectsList:[],objectCST:u.TYPE.OBJECT,action:[],loadingActions:!0,actionsToBeSelected:[],selectedActionsList:[],actionCST:u.TYPE.ACTION}}var M=this;M.policy=e.edit.policy,M.editMode=!0,M.fromList=!1,M.loading=!1,M.form={},M.showDetailselectedMetaRules=!1,M.list=[],M.policyList=[],M.categories={subject:[],loadingSubjects:!0,object:[],loadingObjects:!0,action:[],loadingActions:!0},M.data={},M.create=g,M.addDataToRules=C,M.removeSelectedDataFromRules=O,M.isNumberSelectedDataAtMaximum=$,M.instructionsValid=!0,M.numberOfSelectedSubjectValid=!0,M.numberOfSelectedObjecttValid=!0,M.numberOfSelectedActionsValid=!0,m(),e.$watch("edit.selectedPolicy",function(e){E(),_.isUndefined(e)||f()}),e.$watch("edit.selectedMetaRules",function(e){P(),M.categories={subject:[],loadingSubjects:!0,object:[],loadingObjects:!0,action:[],loadingActions:!0},R(),_.isUndefined(e)||h(e.subject_categories,e.object_categories,e.action_categories)})}angular.module("moon").directive("moonRulesEdit",e),e.$inject=[],angular.module("moon").controller("moonRulesEditController",t),t.$inject=["$scope","rulesService","alertService","$translate","formService","policyService","utilService","metaRuleService","metaDataService","modelService","dataService","DATA_CST"]}(),function(){"use strict";function e(){return{templateUrl:"html/policy/edit/parameter/rules/rules-list.tpl.html",bindToController:!0,controller:t,controllerAs:"list",scope:{policy:"=",editMode:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c,r,a,l){function s(){c.findAllFromPolicyWithCallback(T.policy.id,function(e){T.rules=e,T.loadingRules=!1,v()})}function d(){return T.table=new o({page:1,count:10},{total:function(){return T.getRules().length},getData:function(e,t){var o=t.sorting()?n("orderBy")(T.getRules(),t.orderBy()):T.getRules();e.resolve(o.slice((t.page()-1)*t.count(),t.page()*t.count()))},$scope:{$data:{}}}),T.table}function u(e){return _.has(e,"meta_rule")?e.meta_rule:(_.has(e,"callMetaRuleInProgress")||(e.callMetaRuleInProgress=!0,i.findOneWithCallback(e.meta_rule_id,function(t){e.callMetaRuleInProgress=!1,e.meta_rule=t})),!1)}function m(e,t){if(_.has(t,"rule_value")||(t.rule_value=Array.apply(null,new Array(t.rule.length)).map(function(){return{category:{}}})),_.has(t.rule_value[e],"callCategoryInProgress")&&!t.rule_value[e].callCategoryInProgress)return t.rule_value[e].category;if(!_.has(t.rule_value[e],"callCategoryInProgress")){t.rule_value[e].callCategoryInProgress=!0;var o=0;T.isRuleIndexSubjectCategory(e,t)?(o=t.meta_rule.subject_categories[e],r.subject.data.findOne(T.policy.id,o,t.rule[e],function(o){t.rule_value[e].callCategoryInProgress=!1,t.rule_value[e].category=o})):T.isRuleIndexObjectCategory(e,t)?(o=t.meta_rule.object_categories[e-t.meta_rule.subject_categories.length],r.object.data.findOne(T.policy.id,o,t.rule[e],function(o){t.rule_value[e].callCategoryInProgress=!1,t.rule_value[e].category=o})):T.isRuleIndexActionCategory(e,t)?(o=t.meta_rule.action_categories[e-t.meta_rule.subject_categories.length-t.meta_rule.object_categories.length],r.action.data.findOne(T.policy.id,o,t.rule[e],function(o){t.rule_value[e].callCategoryInProgress=!1,t.rule_value[e].category=o})):(t.rule_value[e].callCategoryInProgress=!1,t.rule_value[e].category={name:"ERROR"})}return!1}function p(e,t){return e+1<=t.meta_rule.subject_categories.length}function f(e,t){var o=e+1;return t.meta_rule.subject_categories.length<o&&o<=t.meta_rule.object_categories.length+t.meta_rule.subject_categories.length}function h(e,t){var o=e+1;return t.meta_rule.object_categories.length+t.meta_rule.subject_categories.length<o&&o<=t.meta_rule.object_categories.length+t.meta_rule.subject_categories.length+t.meta_rule.action_categories.length}function g(){return T.rules?T.rules:[]}function y(){return T.getRules().length>0}function v(){T.table.total(T.rules.length),T.table.reload()}function b(e,t){T.rules.push(t),v()}function j(e){function t(){a("moon.policy.rules.edit.action.add.delete.success").then(function(e){l.alertSuccess(e)}),S(e),v(),e.loader=!1}function o(t){a("moon.policy.rules.edit.action.add.delete.success",{reason:t.message}).then(function(e){l.alertError(e)}),e.loader=!1}e.loader=!0,c.delete(e.id,T.policy.id,t,o)}function S(e){T.rules=_.without(T.rules,e)}var T=this;T.rules=[],T.editMode=e.list.editMode,T.loadingRules=!0,T.table={},T.getRules=g,T.hasRules=y,T.refreshRules=v,T.deleteRules=j,T.getMetaRuleFromRule=u,T.getCategoryFromRuleIndex=m,T.isRuleIndexSubjectCategory=p,T.isRuleIndexObjectCategory=f,T.isRuleIndexActionCategory=h,function(){d(),s()}();var E={"event:createRulesFromDataRulesSuccess":t.$on("event:createRulesFromDataRulesSuccess",b)};_.each(E,function(t){e.$on("$destroy",E[t])})}angular.module("moon").directive("moonRulesList",e),e.$inject=[],angular.module("moon").controller("moonRulesListController",t),t.$inject=["$scope","$rootScope","NgTableParams","$filter","metaRuleService","rulesService","dataService","$translate","alertService"]}(),function(){"use strict";function e(e,t,o){var n={subject:{policy:e(t.POLICIES+":policy_id/subject_assignments/:perimeter_id/:category_id/:data_id",{},{get:{method:"GET"},create:{method:"POST"},remove:{method:"DELETE"}})},object:{policy:e(t.POLICIES+":policy_id/object_assignments/:perimeter_id/:category_id/:data_id",{},{get:{method:"GET"},create:{method:"POST"},remove:{method:"DELETE"}})},action:{policy:e(t.POLICIES+":policy_id/action_assignments/:perimeter_id/:category_id/:data_id",{},{get:{method:"GET"},create:{method:"POST"},remove:{method:"DELETE"}})}};return{subject:{delete:function(e,t,o,i,c,r){n.subject.policy.remove({policy_id:e,perimeter_id:t,category_id:o,data_id:i},{},c,r)},add:function(e,t,o,i){n.subject.policy.create({policy_id:t},e,o,i)},findAllFromPolicyWithCallback:function(e,t){n.subject.policy.get({policy_id:e}).$promise.then(function(e){t(o.transform(e,"subject_assignments"))})}},object:{delete:function(e,t,o,i,c,r){n.object.policy.remove({policy_id:e,perimeter_id:t,category_id:o,data_id:i},{},c,r)},add:function(e,t,o,i){n.object.policy.create({policy_id:t},e,o,i)},findAllFromPolicyWithCallback:function(e,t){n.object.policy.get({policy_id:e}).$promise.then(function(e){t(o.transform(e,"object_assignments"))})}},action:{delete:function(e,t,o,i,c,r){n.action.policy.remove({policy_id:e,perimeter_id:t,category_id:o,data_id:i},{},c,r)},add:function(e,t,o,i){n.action.policy.create({policy_id:t},e,o,i)},findAllFromPolicyWithCallback:function(e,t){n.action.policy.get({policy_id:e}).$promise.then(function(e){t(o.transform(e,"action_assignments"))})}}}}angular.module("moon").factory("assignmentsService",e),e.$inject=["$resource","REST_URI","utilService"]}(),function(){"use strict";function e(e,t,o){var n={subject:{policy:e(t.POLICIES+":policy_id/subject_data/:subject_id/:category_id/:data_id",{},{get:{method:"GET"},create:{method:"POST"},remove:{method:"DELETE"}})},object:{policy:e(t.POLICIES+":policy_id/object_data/:object_id/:category_id/:data_id",{},{get:{method:"GET",isArray:!1},create:{method:"POST"},remove:{method:"DELETE"}})},action:{policy:e(t.POLICIES+":policy_id/action_data/:action_id/:category_id/:data_id",{},{get:{method:"GET",isArray:!1},create:{method:"POST"},remove:{method:"DELETE"}})}};return{subject:{findAllFromPolicyWithCallback:function(e,t){n.subject.policy.get({policy_id:e}).$promise.then(function(e){t(o.transform(e.subject_data[0],"data"))})},findAllFromCategoriesWithCallback:function(e,t,i){n.subject.policy.get({policy_id:e,category_id:t}).$promise.then(function(e){i(e.subject_data[0]?o.transform(e.subject_data[0],"data"):[])})},delete:function(e,t,o,i,c){n.subject.policy.remove({policy_id:t,category_id:o,data_id:e.id},e,i,c)},add:function(e,t,o,i,c){n.subject.policy.create({policy_id:t,category_id:o},e,i,c)},data:{findOne:function(e,t,i,c){n.subject.policy.get({policy_id:e,subject_id:t,data_id:i}).$promise.then(function(e){c(e.subject_data[0]?o.transformOne(e.subject_data[0],"data"):{})})}}},object:{findAllFromPolicyWithCallback:function(e,t){n.object.policy.get({policy_id:e}).$promise.then(function(e){t(o.transform(e.object_data[0],"data"))})},findAllFromCategoriesWithCallback:function(e,t,i){n.object.policy.get({policy_id:e,category_id:t}).$promise.then(function(e){i(e.object_data[0]?o.transform(e.object_data[0],"data"):[])})},delete:function(e,t,o,i,c){n.object.policy.remove({policy_id:t,category_id:o,data_id:e.id},e,i,c)},add:function(e,t,o,i,c){n.object.policy.create({policy_id:t,category_id:o},e,i,c)},data:{findOne:function(e,t,i,c){n.object.policy.get({policy_id:e,object_id:t,data_id:i}).$promise.then(function(e){c(e.object_data[0]?o.transformOne(e.object_data[0],"data"):{})})}}},action:{findAllFromPolicyWithCallback:function(e,t){n.action.policy.get({policy_id:e}).$promise.then(function(e){t(o.transform(e.action_data[0],"data"))})},findAllFromCategoriesWithCallback:function(e,t,i){n.action.policy.get({policy_id:e,category_id:t}).$promise.then(function(e){i(e.action_data[0]?o.transform(e.action_data[0],"data"):[])})},delete:function(e,t,o,i,c){n.action.policy.remove({policy_id:t,category_id:o,data_id:e.id},e,i,c)},add:function(e,t,o,i,c){n.action.policy.create({policy_id:t,category_id:o},e,i,c)},data:{
+findOne:function(e,t,i,c){n.action.policy.get({policy_id:e,action_id:t,data_id:i}).$promise.then(function(e){c(e.action_data[0]?o.transformOne(e.action_data[0],"data"):{})})}}}}}angular.module("moon").factory("dataService",e),e.$inject=["$resource","REST_URI","utilService"]}(),function(){"use strict";function e(e,t,o,n){var i={subject:{perimeter:e(t.PERIMETERS.subject+":subject_id",{},{get:{method:"GET",isArray:!1},create:{method:"POST"},remove:{method:"DELETE"},update:{method:"PATCH"}}),policy:e(t.POLICIES+":policy_id/subjects/:subject_id",{},{get:{method:"GET"},create:{method:"POST"},remove:{method:"DELETE"},update:{method:"PATCH"}})},object:{perimeter:e(t.PERIMETERS.object+":object_id",{},{get:{method:"GET",isArray:!1},create:{method:"POST"},remove:{method:"DELETE"},update:{method:"PATCH"}}),policy:e(t.POLICIES+":policy_id/objects/:object_id",{},{get:{method:"GET",isArray:!1},create:{method:"POST"},remove:{method:"DELETE"},update:{method:"PATCH"}})},action:{perimeter:e(t.PERIMETERS.action+":action_id",{},{get:{method:"GET",isArray:!1},create:{method:"POST"},remove:{method:"DELETE"},update:{method:"PATCH"}}),policy:e(t.POLICIES+":policy_id/actions/:action_id",{},{get:{method:"GET",isArray:!1},create:{method:"POST"},remove:{method:"DELETE"},update:{method:"PATCH"}})}};return{subject:{findOne:function(e,t){i.subject.perimeter.get({subject_id:e}).$promise.then(function(e){t(n.transformOne(e,"subjects"))})},findOneReturningPromise:function(e){return i.subject.perimeter.get({subject_id:e}).$promise},findSome:function(e){var t=this;if(0===e.length)return[];var i=_(e).map(function(e){return t.findOneReturningPromise(e)});return o.all(i).then(function(e){return _(e).map(function(e){return n.transformOne(e,"subjects")})})},unMapPerimeterFromPolicy:function(e,t,o,n){i.subject.policy.remove({policy_id:e,subject_id:t},{},o,n)},findAllFromPolicyWithCallback:function(e,t){i.subject.policy.get({policy_id:e}).$promise.then(function(e){t(n.transform(e,"subjects"))})},findOneFromPolicyWithCallback:function(e,t,o){i.subject.policy.get({policy_id:e,subject_id:t}).$promise.then(function(e){o(n.transformOne(e,"subjects"))})},findAll:function(){return i.subject.perimeter.get().$promise.then(function(e){return n.transform(e,"subjects")})},findAllWithCallback:function(e){return i.subject.perimeter.get().$promise.then(function(t){e(n.transform(t,"subjects"))})},delete:function(e,t,o){i.subject.perimeter.remove({subject_id:e.id},e,t,o)},add:function(e,t,o){i.subject.perimeter.create({},e,t,o)},update:function(e,t,o){i.subject.perimeter.update({subject_id:e.id},e,t,o)}},object:{findOne:function(e,t){i.object.perimeter.get({object_id:e}).$promise.then(function(e){t(n.transformOne(e,"objects"))})},findOneReturningPromise:function(e){return i.object.perimeter.get({object_id:e}).$promise},findSome:function(e){var t=this;if(0===e.length)return[];var i=_(e).map(function(e){return t.findOneReturningPromise(e)});return o.all(i).then(function(e){return _(e).map(function(e){return n.transformOne(e,"objects")})})},unMapPerimeterFromPolicy:function(e,t,o,n){i.object.policy.remove({policy_id:e,object_id:t},{},o,n)},findSomeWithCallback:function(e,t){var i=this;0===e.length&&t([]);var c=_(e).map(function(e){return i.findOneReturningPromise(e)});o.all(c).then(function(e){t(_(e).map(function(e){return n.transformOne(e,"objects")}))})},findAll:function(){return i.object.perimeter.get().$promise.then(function(e){return n.transform(e,"objects")})},findAllFromPolicyWithCallback:function(e,t){i.object.policy.get({policy_id:e}).$promise.then(function(e){t(n.transform(e,"objects"))})},findOneFromPolicyWithCallback:function(e,t,o){i.object.policy.get({policy_id:e,object_id:t}).$promise.then(function(e){o(n.transformOne(e,"objects"))})},findAllWithCallback:function(e){return i.object.perimeter.get().$promise.then(function(t){e(n.transform(t,"objects"))})},delete:function(e,t,o){i.object.perimeter.remove({object_id:e.id},e,t,o)},add:function(e,t,o){i.object.perimeter.create({},e,t,o)},update:function(e,t,o){i.object.perimeter.update({object_id:e.id},e,t,o)}},action:{findOne:function(e,t){i.action.perimeter.get({actionId:e}).$promise.then(function(e){t(n.transformOne(e,"actions"))})},findOneReturningPromise:function(e){return i.action.perimeter.get({actionId:e}).$promise},findSome:function(e){var t=this;if(0===e.length)return[];var i=_(e).map(function(e){return t.findOneReturningPromise(e)});return o.all(i).then(function(e){return _(e).map(function(e){return n.transformOne(e,"actions")})})},unMapPerimeterFromPolicy:function(e,t,o,n){i.action.policy.remove({policy_id:e,action_id:t},{},o,n)},findSomeWithCallback:function(e,t){var i=this;0===e.length&&t([]);var c=_(e).map(function(e){return i.findOneReturningPromise(e)});o.all(c).then(function(e){t(_(e).map(function(e){return n.transformOne(e,"actions")}))})},findAll:function(){return i.action.perimeter.get().$promise.then(function(e){return n.transform(e,"actions")})},findAllFromPolicyWithCallback:function(e,t){i.action.policy.get({policy_id:e}).$promise.then(function(e){t(n.transform(e,"actions"))})},findOneFromPolicyWithCallback:function(e,t,o){i.action.policy.get({policy_id:e,action_id:t}).$promise.then(function(e){o(n.transformOne(e,"actions"))})},findAllWithCallback:function(e){return i.action.perimeter.get().$promise.then(function(t){e(n.transform(t,"actions"))})},delete:function(e,t,o){i.action.perimeter.remove({action_id:e.id},e,t,o)},add:function(e,t,o){i.action.perimeter.create({},e,t,o)},update:function(e,t,o){i.action.perimeter.update({action_id:e.id},e,t,o)}}}}angular.module("moon").factory("perimeterService",e),e.$inject=["$resource","REST_URI","$q","utilService"]}(),function(){"use strict";function e(e,t,o){return{data:{policy:e(t.POLICIES+":policy_id/rules/:rule_id",{},{get:{method:"GET"},create:{method:"POST"},remove:{method:"DELETE"}})},findAllFromPolicyWithCallback:function(e,t){this.data.policy.get({policy_id:e}).$promise.then(function(e){console.log("ruleService - findAllFromPolicyWithCallback()"),console.log(e);var n=e.rules;console.log(JSON.stringify(n)),t(o.transform(n,"rules"))})}}}angular.module("moon").factory("ruleService",e),e.$inject=["$resource","REST_URI","utilService"]}(),function(){"use strict";function e(e,t,o){return{data:{policy:e(t.POLICIES+":policy_id/rules/:rule_id",{},{get:{method:"GET"},create:{method:"POST"},remove:{method:"DELETE"}})},add:function(e,t,o,n){this.data.policy.create({policy_id:t},e,o,n)},delete:function(e,t,o,n){this.data.policy.remove({policy_id:t,rule_id:e},{},o,n)},findAllFromPolicyWithCallback:function(e,t){this.data.policy.get({policy_id:e}).$promise.then(function(e){t(e.rules.rules)})}}}angular.module("moon").factory("rulesService",e),e.$inject=["$resource","REST_URI","utilService"]}(),function(){"use strict";function e(){return{templateUrl:"html/model/edit/metarules/action/mapping/metarules-add.tpl.html",bindToController:!0,controller:t,controllerAs:"add",scope:{metaRules:"="},restrict:"E",replace:!0}}function t(e,t,o,n,i,c){function r(){function r(t){var i=c.transformOne(t,"meta_rules");n("moon.model.metarules.add.success",{metaRuleName:i.name}).then(function(e){o.alertSuccess(e)}),a.loading=!1,e.$emit("event:metaRuleCreatedSuccess",i)}function l(t){n("moon.model.metarules.add.error",{metaRuleName:a.metaRule.name}).then(function(e){o.alertError(e)}),a.loading=!1,e.$emit("event:metaRuleCreatedError",a.project)}i.isInvalid(a.form)?i.checkFieldsValidity(a.form):(a.loading=!0,t.data.create({},a.metaRule,r,l))}var a=this;a.laoading=!1,a.form={},a.metaRule={name:null,description:null,subject_categories:[],object_categories:[],action_categories:[]},a.create=r}angular.module("moon").directive("moonMetaRulesAdd",e),e.$inject=[],angular.module("moon").controller("moonMetaRulesAddController",t),t.$inject=["$scope","metaRuleService","alertService","$translate","formService","utilService"]}(),function(){"use strict";function e(e,t,o,n,i,c,r,a){function l(){h.metaRulesLoading=!0,c.findAllWithCallback(function(e){h.metaRules=e,h.metaRulesLoading=!1})}function s(){function t(t){var i=a.transformOne(t,"models");c.findSomeWithMetaData(i.meta_rules).then(function(t){i.meta_rules_values=t,n("moon.model.metarules.map.success",{modelName:i.name,metaRuleName:h.selectedMetaRule.name}).then(function(e){o.alertSuccess(e)}),h.mappingLoading=!1,e.$emit("event:metaRuleMapToModelSuccess",i)})}function l(e){n("moon.model.metarules.map.error",{modelName:h.model.name,metaRuleName:h.selectedMetaRule.name}).then(function(e){o.alertError(e)}),h.mappingLoading=!1}if(i.isInvalid(h.form))i.checkFieldsValidity(h.form);else{h.mappingLoading=!0;var s=angular.copy(h.model);s.meta_rules.push(h.selectedMetaRule.id),r.update(s,t,l)}}function d(){delete h.selectedMetaRule}function u(){function t(t){n("moon.model.metarules.delete.success",{metaRuleName:r.name}).then(function(e){o.alertSuccess(e)}),d(),h.mappingLoading=!1,l(),e.$emit("event:deleteMetaRule",r)}function i(e){n("moon.model.metarules.delete.error",{metaRuleName:r.name}).then(function(e){o.alertError(e)}),h.mappingLoading=!1}if(h.selectedMetaRule){h.mappingLoading=!0;var r=angular.copy(h.selectedMetaRule);c.delete(r,t,i)}}function m(e,t){h.metaRules.push(t),f()}function p(e){}function f(){h.addMetaRuleToList=!1}var h=this;h.metaRules=[],h.model=e.model,h.addMetaRuleToList=!1,h.mapToModel=s,h.deleteMetaRule=u,function(){l()}();var g={"event:metaRuleCreatedSuccess":t.$on("event:metaRuleCreatedSuccess",m),"event:metaRuleCreatedError":t.$on("event:metaRuleCreatedError",p)};for(var y in g)e.$on("$destroy",g[y])}angular.module("moon").controller("moonMetaRulesMapController",e),e.$inject=["$scope","$rootScope","alertService","$translate","formService","metaRuleService","modelService","utilService"]}(),function(){"use strict";function e(e,t,o,n){function i(){function i(n){t("moon.model.metarules.unmap.success",{modelName:c.model.name,metaRuleName:c.metaRule.name}).then(function(e){o.alertSuccess(e)}),c.unMappingLoading=!1,e.$emit("event:metaRuleUnMappedToModelSuccess",a)}function r(n){t("moon.model.metarules.unmap.error",{modelName:c.model.name,metaRuleName:c.metaRule.name}).then(function(e){o.alertError(e)}),c.unMappingLoading=!1,e.$emit("event:metaRuleUnMappedToModelError")}c.unMappingLoading=!0;var a=angular.copy(c.model);a.meta_rules=_.without(a.meta_rules,c.metaRule.id),n.update(a,i,r)}var c=this;c.model=e.model,c.metaRule=e.metaRule,c.unMappingLoading=!1,c.unmap=i}angular.module("moon").controller("MetaRulesUnMapController",e),e.$inject=["$scope","$translate","alertService","modelService"]}(); \ No newline at end of file
diff --git a/moon_gui/delivery/js/modules.js b/moon_gui/delivery/js/modules.js
index 834d4eb8..ec3b37a3 100644
--- a/moon_gui/delivery/js/modules.js
+++ b/moon_gui/delivery/js/modules.js
@@ -1,19 +1,20 @@
-function require(e,t,n){var i=require.resolve(e);if(null==i){n=n||e,t=t||"root";var r=new Error('Failed to require "'+n+'" from "'+t+'"');throw r.path=n,r.parent=t,r.require=!0,r}var o=require.modules[i];if(!o._resolving&&!o.exports){var a={};a.exports={},a.client=a.component=!0,o._resolving=!0,o.call(this,a.exports,require.relative(i),a),delete o._resolving,o.exports=a.exports}return o.exports}if(function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=e.length,n=J.type(e);return"function"!==n&&!J.isWindow(e)&&(!(1!==e.nodeType||!t)||("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e))}function i(e,t,n){if(J.isFunction(t))return J.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return J.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(ae.test(t))return J.filter(t,e,n);t=J.filter(t,e)}return J.grep(e,function(e){return z.call(t,e)>=0!==n})}function r(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function o(e){var t=fe[e]={};return J.each(e.match(de)||[],function(e,n){t[n]=!0}),t}function a(){Z.removeEventListener("DOMContentLoaded",a,!1),e.removeEventListener("load",a,!1),J.ready()}function s(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=J.expando+Math.random()}function l(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace($e,"-$1").toLowerCase(),"string"==typeof(n=e.getAttribute(i))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:ve.test(n)?J.parseJSON(n):n)}catch(e){}me.set(e,t,n)}else n=void 0;return n}function c(){return!0}function u(){return!1}function d(){try{return Z.activeElement}catch(e){}}function f(e,t){return J.nodeName(e,"table")&&J.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function h(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function p(e){var t=Pe.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function g(e,t){for(var n=0,i=e.length;n<i;n++)ge.set(e[n],"globalEval",!t||ge.get(t[n],"globalEval"))}function m(e,t){var n,i,r,o,a,s,l,c;if(1===t.nodeType){if(ge.hasData(e)&&(o=ge.access(e),a=ge.set(t,o),c=o.events)){delete a.handle,a.events={};for(r in c)for(n=0,i=c[r].length;n<i;n++)J.event.add(t,r,c[r][n])}me.hasData(e)&&(s=me.access(e),l=J.extend({},s),me.set(t,l))}}function v(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&J.nodeName(e,t)?J.merge([e],n):n}function $(e,t){var n=t.nodeName.toLowerCase();"input"===n&&xe.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function y(t,n){var i,r=J(n.createElement(t)).appendTo(n.body),o=e.getDefaultComputedStyle&&(i=e.getDefaultComputedStyle(r[0]))?i.display:J.css(r[0],"display");return r.detach(),o}function b(e){var t=Z,n=Le[e];return n||(n=y(e,t),"none"!==n&&n||(Fe=(Fe||J("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=Fe[0].contentDocument,t.write(),t.close(),n=y(e,t),Fe.detach()),Le[e]=n),n}function w(e,t,n){var i,r,o,a,s=e.style;return n=n||He(e),n&&(a=n.getPropertyValue(t)||n[t]),n&&(""!==a||J.contains(e.ownerDocument,e)||(a=J.style(e,t)),Ve.test(a)&&Re.test(t)&&(i=s.width,r=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=i,s.minWidth=r,s.maxWidth=o)),void 0!==a?a+"":a}function x(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function C(e,t){if(t in e)return t;for(var n=t[0].toUpperCase()+t.slice(1),i=t,r=ze.length;r--;)if((t=ze[r]+n)in e)return t;return i}function k(e,t,n){var i=Ue.exec(t);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):t}function S(e,t,n,i,r){for(var o=n===(i?"border":"content")?4:"width"===t?1:0,a=0;o<4;o+=2)"margin"===n&&(a+=J.css(e,n+be[o],!0,r)),i?("content"===n&&(a-=J.css(e,"padding"+be[o],!0,r)),"margin"!==n&&(a-=J.css(e,"border"+be[o]+"Width",!0,r))):(a+=J.css(e,"padding"+be[o],!0,r),"padding"!==n&&(a+=J.css(e,"border"+be[o]+"Width",!0,r)));return a}function E(e,t,n){var i=!0,r="width"===t?e.offsetWidth:e.offsetHeight,o=He(e),a="border-box"===J.css(e,"boxSizing",!1,o);if(r<=0||null==r){if(r=w(e,t,o),(r<0||null==r)&&(r=e.style[t]),Ve.test(r))return r;i=a&&(X.boxSizingReliable()||r===e.style[t]),r=parseFloat(r)||0}return r+S(e,t,n||(a?"border":"content"),i,o)+"px"}function T(e,t){for(var n,i,r,o=[],a=0,s=e.length;a<s;a++)i=e[a],i.style&&(o[a]=ge.get(i,"olddisplay"),n=i.style.display,t?(o[a]||"none"!==n||(i.style.display=""),""===i.style.display&&we(i)&&(o[a]=ge.access(i,"olddisplay",b(i.nodeName)))):(r=we(i),"none"===n&&r||ge.set(i,"olddisplay",r?n:J.css(i,"display"))));for(a=0;a<s;a++)i=e[a],i.style&&(t&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=t?o[a]||"":"none"));return e}function D(e,t,n,i,r){return new D.prototype.init(e,t,n,i,r)}function A(){return setTimeout(function(){Ye=void 0}),Ye=J.now()}function M(e,t){var n,i=0,r={height:e};for(t=t?1:0;i<4;i+=2-t)n=be[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function O(e,t,n){for(var i,r=(Qe[t]||[]).concat(Qe["*"]),o=0,a=r.length;o<a;o++)if(i=r[o].call(n,t,e))return i}function I(e,t,n){var i,r,o,a,s,l,c,u=this,d={},f=e.style,h=e.nodeType&&we(e),p=ge.get(e,"fxshow");n.queue||(s=J._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,J.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],c=J.css(e,"display"),"inline"===("none"===c?ge.get(e,"olddisplay")||b(e.nodeName):c)&&"none"===J.css(e,"float")&&(f.display="inline-block")),n.overflow&&(f.overflow="hidden",u.always(function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}));for(i in t)if(r=t[i],Ge.exec(r)){if(delete t[i],o=o||"toggle"===r,r===(h?"hide":"show")){if("show"!==r||!p||void 0===p[i])continue;h=!0}d[i]=p&&p[i]||J.style(e,i)}else c=void 0;if(J.isEmptyObject(d))"inline"===("none"===c?b(e.nodeName):c)&&(f.display=c);else{p?"hidden"in p&&(h=p.hidden):p=ge.access(e,"fxshow",{}),o&&(p.hidden=!h),h?J(e).show():u.done(function(){J(e).hide()}),u.done(function(){var t;ge.remove(e,"fxshow");for(t in d)J.style(e,t,d[t])});for(i in d)a=O(h?p[i]:0,i,u),i in p||(p[i]=a.start,h&&(a.end=a.start,a.start="width"===i||"height"===i?1:0))}}function P(e,t){var n,i,r,o,a;for(n in e)if(i=J.camelCase(n),r=t[i],o=e[n],J.isArray(o)&&(r=o[1],o=e[n]=o[0]),n!==i&&(e[i]=o,delete e[n]),(a=J.cssHooks[i])&&"expand"in a){o=a.expand(o),delete e[i];for(n in o)n in e||(e[n]=o[n],t[n]=r)}else t[i]=r}function N(e,t,n){var i,r,o=0,a=Je.length,s=J.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var t=Ye||A(),n=Math.max(0,c.startTime+c.duration-t),i=n/c.duration||0,o=1-i,a=0,l=c.tweens.length;a<l;a++)c.tweens[a].run(o);return s.notifyWith(e,[c,o,n]),o<1&&l?n:(s.resolveWith(e,[c]),!1)},c=s.promise({elem:e,props:J.extend({},t),opts:J.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Ye||A(),duration:n.duration,tweens:[],createTween:function(t,n){var i=J.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(i),i},stop:function(t){var n=0,i=t?c.tweens.length:0;if(r)return this;for(r=!0;n<i;n++)c.tweens[n].run(1);return t?s.resolveWith(e,[c,t]):s.rejectWith(e,[c,t]),this}}),u=c.props;for(P(u,c.opts.specialEasing);o<a;o++)if(i=Je[o].call(c,e,u,c.opts))return i;return J.map(u,O,c),J.isFunction(c.opts.start)&&c.opts.start.call(e,c),J.fx.timer(J.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function j(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,o=t.toLowerCase().match(de)||[];if(J.isFunction(n))for(;i=o[r++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function F(e,t,n,i){function r(s){var l;return o[s]=!0,J.each(e[s]||[],function(e,s){var c=s(t,n,i);return"string"!=typeof c||a||o[c]?a?!(l=c):void 0:(t.dataTypes.unshift(c),r(c),!1)}),l}var o={},a=e===vt;return r(t.dataTypes[0])||!o["*"]&&r("*")}function L(e,t){var n,i,r=J.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:i||(i={}))[n]=t[n]);return i&&J.extend(!0,e,i),e}function R(e,t,n){for(var i,r,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(r in s)if(s[r]&&s[r].test(i)){l.unshift(r);break}if(l[0]in n)o=l[0];else{for(r in n){if(!l[0]||e.converters[r+" "+l[0]]){o=r;break}a||(a=r)}o=o||a}if(o)return o!==l[0]&&l.unshift(o),n[o]}function V(e,t,n,i){var r,o,a,s,l,c={},u=e.dataTypes.slice();if(u[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(o=u.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=u.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(a=c[l+" "+o]||c["* "+o]))for(r in c)if(s=r.split(" "),s[1]===o&&(a=c[l+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[r]:!0!==c[r]&&(o=s[0],u.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}function H(e,t,n,i){var r;if(J.isArray(t))J.each(t,function(t,r){n||bt.test(e)?i(e,r):H(e+"["+("object"==typeof r?t:"")+"]",r,n,i)});else if(n||"object"!==J.type(t))i(e,t);else for(r in t)H(e+"["+r+"]",t[r],n,i)}function q(e){return J.isWindow(e)?e:9===e.nodeType&&e.defaultView}var U=[],_=U.slice,B=U.concat,W=U.push,z=U.indexOf,Y={},K=Y.toString,G=Y.hasOwnProperty,X={},Z=e.document,J=function(e,t){return new J.fn.init(e,t)},Q=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ee=/^-ms-/,te=/-([\da-z])/gi,ne=function(e,t){return t.toUpperCase()};J.fn=J.prototype={jquery:"2.1.1",constructor:J,selector:"",length:0,toArray:function(){return _.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:_.call(this)},pushStack:function(e){var t=J.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return J.each(this,e,t)},map:function(e){return this.pushStack(J.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(_.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:W,sort:U.sort,splice:U.splice},J.extend=J.fn.extend=function(){var e,t,n,i,r,o,a=arguments[0]||{},s=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||J.isFunction(a)||(a={}),s===l&&(a=this,s--);s<l;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],i=e[t],a!==i&&(c&&i&&(J.isPlainObject(i)||(r=J.isArray(i)))?(r?(r=!1,o=n&&J.isArray(n)?n:[]):o=n&&J.isPlainObject(n)?n:{},a[t]=J.extend(c,o,i)):void 0!==i&&(a[t]=i));return a},J.extend({expando:"jQuery"+("2.1.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===J.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return!J.isArray(e)&&e-parseFloat(e)>=0},isPlainObject:function(e){return"object"===J.type(e)&&!e.nodeType&&!J.isWindow(e)&&!(e.constructor&&!G.call(e.constructor.prototype,"isPrototypeOf"))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?Y[K.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;(e=J.trim(e))&&(1===e.indexOf("use strict")?(t=Z.createElement("script"),t.text=e,Z.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(ee,"ms-").replace(te,ne)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,i){var r=0,o=e.length,a=n(e);if(i){if(a)for(;r<o&&!1!==t.apply(e[r],i);r++);else for(r in e)if(!1===t.apply(e[r],i))break}else if(a)for(;r<o&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(Q,"")},makeArray:function(e,t){var i=t||[];return null!=e&&(n(Object(e))?J.merge(i,"string"==typeof e?[e]:e):W.call(i,e)),i},inArray:function(e,t,n){return null==t?-1:z.call(t,e,n)},merge:function(e,t){for(var n=+t.length,i=0,r=e.length;i<n;i++)e[r++]=t[i];return e.length=r,e},grep:function(e,t,n){for(var i=[],r=0,o=e.length,a=!n;r<o;r++)!t(e[r],r)!==a&&i.push(e[r]);return i},map:function(e,t,i){var r,o=0,a=e.length,s=n(e),l=[];if(s)for(;o<a;o++)null!=(r=t(e[o],o,i))&&l.push(r);else for(o in e)null!=(r=t(e[o],o,i))&&l.push(r);return B.apply([],l)},guid:1,proxy:function(e,t){var n,i,r;if("string"==typeof t&&(n=e[t],t=e,e=n),J.isFunction(e))return i=_.call(arguments,2),r=function(){return e.apply(t||this,i.concat(_.call(arguments)))},r.guid=e.guid=e.guid||J.guid++,r},now:Date.now,support:X}),J.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){Y["[object "+t+"]"]=t.toLowerCase()});var ie=function(e){function t(e,t,n,i){var r,o,a,s,c,d,f,h,p,g;if((t?t.ownerDocument||t:R)!==M&&A(t),t=t||M,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(I&&!i){if(r=me.exec(e))if(a=r[1]){if(9===s){if(!(o=t.getElementById(a))||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&F(t,o)&&o.id===a)return n.push(o),n}else{if(r[2])return Z.apply(n,t.getElementsByTagName(e)),n;if((a=r[3])&&y.getElementsByClassName&&t.getElementsByClassName)return Z.apply(n,t.getElementsByClassName(a)),n}if(y.qsa&&(!P||!P.test(e))){if(h=f=L,p=t,g=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(d=C(e),(f=t.getAttribute("id"))?h=f.replace($e,"\\$&"):t.setAttribute("id",h),h="[id='"+h+"'] ",c=d.length;c--;)d[c]=h+u(d[c]);p=ve.test(e)&&l(t.parentNode)||t,g=d.join(",")}if(g)try{return Z.apply(n,p.querySelectorAll(g)),n}catch(e){}finally{f||t.removeAttribute("id")}}}return S(e.replace(ae,"$1"),t,n,i)}function n(){function e(n,i){return t.push(n+" ")>b.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[L]=!0,e}function r(e){var t=M.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),i=e.length;i--;)b.attrHandle[n[i]]=t}function a(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||z)-(~e.sourceIndex||z);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return i(function(t){return t=+t,i(function(n,i){for(var r,o=e([],n.length,t),a=o.length;a--;)n[r=o[a]]&&(n[r]=!(i[r]=n[r]))})})}function l(e){return e&&typeof e.getElementsByTagName!==W&&e}function c(){}function u(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function d(e,t,n){var i=t.dir,r=n&&"parentNode"===i,o=H++;return t.first?function(t,n,o){for(;t=t[i];)if(1===t.nodeType||r)return e(t,n,o)}:function(t,n,a){var s,l,c=[V,o];if(a){for(;t=t[i];)if((1===t.nodeType||r)&&e(t,n,a))return!0}else for(;t=t[i];)if(1===t.nodeType||r){if(l=t[L]||(t[L]={}),(s=l[i])&&s[0]===V&&s[1]===o)return c[2]=s[2];if(l[i]=c,c[2]=e(t,n,a))return!0}}}function f(e){return e.length>1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function h(e,n,i){for(var r=0,o=n.length;r<o;r++)t(e,n[r],i);return i}function p(e,t,n,i,r){for(var o,a=[],s=0,l=e.length,c=null!=t;s<l;s++)(o=e[s])&&(n&&!n(o,i,r)||(a.push(o),c&&t.push(s)));return a}function g(e,t,n,r,o,a){return r&&!r[L]&&(r=g(r)),o&&!o[L]&&(o=g(o,a)),i(function(i,a,s,l){var c,u,d,f=[],g=[],m=a.length,v=i||h(t||"*",s.nodeType?[s]:s,[]),$=!e||!i&&t?v:p(v,f,e,s,l),y=n?o||(i?e:m||r)?[]:a:$;if(n&&n($,y,s,l),r)for(c=p(y,g),r(c,[],s,l),u=c.length;u--;)(d=c[u])&&(y[g[u]]=!($[g[u]]=d));if(i){if(o||e){if(o){for(c=[],u=y.length;u--;)(d=y[u])&&c.push($[u]=d);o(null,y=[],c,l)}for(u=y.length;u--;)(d=y[u])&&(c=o?Q.call(i,d):f[u])>-1&&(i[c]=!(a[c]=d))}}else y=p(y===a?y.splice(m,y.length):y),o?o(null,a,y,l):Z.apply(a,y)})}function m(e){for(var t,n,i,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,l=d(function(e){return e===t},a,!0),c=d(function(e){return Q.call(t,e)>-1},a,!0),h=[function(e,n,i){return!o&&(i||n!==E)||((t=n).nodeType?l(e,n,i):c(e,n,i))}];s<r;s++)if(n=b.relative[e[s].type])h=[d(f(h),n)];else{if(n=b.filter[e[s].type].apply(null,e[s].matches),n[L]){for(i=++s;i<r&&!b.relative[e[i].type];i++);return g(s>1&&f(h),s>1&&u(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ae,"$1"),n,s<i&&m(e.slice(s,i)),i<r&&m(e=e.slice(i)),i<r&&u(e))}h.push(n)}return f(h)}function v(e,n){var r=n.length>0,o=e.length>0,a=function(i,a,s,l,c){var u,d,f,h=0,g="0",m=i&&[],v=[],$=E,y=i||o&&b.find.TAG("*",c),w=V+=null==$?1:Math.random()||.1,x=y.length;for(c&&(E=a!==M&&a);g!==x&&null!=(u=y[g]);g++){if(o&&u){for(d=0;f=e[d++];)if(f(u,a,s)){l.push(u);break}c&&(V=w)}r&&((u=!f&&u)&&h--,i&&m.push(u))}if(h+=g,r&&g!==h){for(d=0;f=n[d++];)f(m,v,a,s);if(i){if(h>0)for(;g--;)m[g]||v[g]||(v[g]=G.call(l));v=p(v)}Z.apply(l,v),c&&!i&&v.length>0&&h+n.length>1&&t.uniqueSort(l)}return c&&(V=w,E=$),m};return r?i(a):a}var $,y,b,w,x,C,k,S,E,T,D,A,M,O,I,P,N,j,F,L="sizzle"+-new Date,R=e.document,V=0,H=0,q=n(),U=n(),_=n(),B=function(e,t){return e===t&&(D=!0),0},W="undefined",z=1<<31,Y={}.hasOwnProperty,K=[],G=K.pop,X=K.push,Z=K.push,J=K.slice,Q=K.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1},ee="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",te="[\\x20\\t\\r\\n\\f]",ne="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ie=ne.replace("w","w#"),re="\\["+te+"*("+ne+")(?:"+te+"*([*^$|!~]?=)"+te+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ie+"))|)"+te+"*\\]",oe=":("+ne+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+re+")*)|.*)\\)|)",ae=new RegExp("^"+te+"+|((?:^|[^\\\\])(?:\\\\.)*)"+te+"+$","g"),se=new RegExp("^"+te+"*,"+te+"*"),le=new RegExp("^"+te+"*([>+~]|"+te+")"+te+"*"),ce=new RegExp("="+te+"*([^\\]'\"]*?)"+te+"*\\]","g"),ue=new RegExp(oe),de=new RegExp("^"+ie+"$"),fe={ID:new RegExp("^#("+ne+")"),CLASS:new RegExp("^\\.("+ne+")"),TAG:new RegExp("^("+ne.replace("w","w*")+")"),ATTR:new RegExp("^"+re),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+te+"*(even|odd|(([+-]|)(\\d*)n|)"+te+"*(?:([+-]|)"+te+"*(\\d+)|))"+te+"*\\)|)","i"),bool:new RegExp("^(?:"+ee+")$","i"),needsContext:new RegExp("^"+te+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+te+"*((?:-\\d)?\\d*)"+te+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,pe=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,me=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,$e=/'|\\/g,ye=new RegExp("\\\\([\\da-f]{1,6}"+te+"?|("+te+")|.)","ig"),be=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)};try{Z.apply(K=J.call(R.childNodes),R.childNodes),K[R.childNodes.length].nodeType}catch(e){Z={apply:K.length?function(e,t){X.apply(e,J.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}y=t.support={},x=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},A=t.setDocument=function(e){var t,n=e?e.ownerDocument||e:R,i=n.defaultView;return n!==M&&9===n.nodeType&&n.documentElement?(M=n,O=n.documentElement,I=!x(n),i&&i!==i.top&&(i.addEventListener?i.addEventListener("unload",function(){A()},!1):i.attachEvent&&i.attachEvent("onunload",function(){A()})),y.attributes=r(function(e){return e.className="i",!e.getAttribute("className")}),y.getElementsByTagName=r(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),y.getElementsByClassName=ge.test(n.getElementsByClassName)&&r(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),y.getById=r(function(e){return O.appendChild(e).id=L,!n.getElementsByName||!n.getElementsByName(L).length}),y.getById?(b.find.ID=function(e,t){if(typeof t.getElementById!==W&&I){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},b.filter.ID=function(e){var t=e.replace(ye,be);return function(e){return e.getAttribute("id")===t}}):(delete b.find.ID,b.filter.ID=function(e){var t=e.replace(ye,be);return function(e){var n=typeof e.getAttributeNode!==W&&e.getAttributeNode("id");return n&&n.value===t}}),b.find.TAG=y.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==W)return t.getElementsByTagName(e)}:function(e,t){var n,i=[],r=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},b.find.CLASS=y.getElementsByClassName&&function(e,t){if(typeof t.getElementsByClassName!==W&&I)return t.getElementsByClassName(e)},N=[],P=[],(y.qsa=ge.test(n.querySelectorAll))&&(r(function(e){e.innerHTML="<select msallowclip=''><option selected=''></option></select>",e.querySelectorAll("[msallowclip^='']").length&&P.push("[*^$]="+te+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||P.push("\\["+te+"*(?:value|"+ee+")"),e.querySelectorAll(":checked").length||P.push(":checked")}),r(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&P.push("name"+te+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||P.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),P.push(",.*:")})),(y.matchesSelector=ge.test(j=O.matches||O.webkitMatchesSelector||O.mozMatchesSelector||O.oMatchesSelector||O.msMatchesSelector))&&r(function(e){y.disconnectedMatch=j.call(e,"div"),j.call(e,"[s!='']:x"),N.push("!=",oe)}),P=P.length&&new RegExp(P.join("|")),N=N.length&&new RegExp(N.join("|")),t=ge.test(O.compareDocumentPosition),F=t||ge.test(O.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},B=t?function(e,t){if(e===t)return D=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i||(i=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&i||!y.sortDetached&&t.compareDocumentPosition(e)===i?e===n||e.ownerDocument===R&&F(R,e)?-1:t===n||t.ownerDocument===R&&F(R,t)?1:T?Q.call(T,e)-Q.call(T,t):0:4&i?-1:1)}:function(e,t){if(e===t)return D=!0,0;var i,r=0,o=e.parentNode,s=t.parentNode,l=[e],c=[t];if(!o||!s)return e===n?-1:t===n?1:o?-1:s?1:T?Q.call(T,e)-Q.call(T,t):0;if(o===s)return a(e,t);for(i=e;i=i.parentNode;)l.unshift(i);for(i=t;i=i.parentNode;)c.unshift(i);for(;l[r]===c[r];)r++;return r?a(l[r],c[r]):l[r]===R?-1:c[r]===R?1:0},n):M},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==M&&A(e),n=n.replace(ce,"='$1']"),y.matchesSelector&&I&&(!N||!N.test(n))&&(!P||!P.test(n)))try{var i=j.call(e,n);if(i||y.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){}return t(n,M,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==M&&A(e),F(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==M&&A(e);var n=b.attrHandle[t.toLowerCase()],i=n&&Y.call(b.attrHandle,t.toLowerCase())?n(e,t,!I):void 0;return void 0!==i?i:y.attributes||!I?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,r=0;if(D=!y.detectDuplicates,T=!y.sortStable&&e.slice(0),e.sort(B),D){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return T=null,e},w=t.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=w(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=w(t);return n},b=t.selectors={cacheLength:50,createPseudo:i,match:fe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ye,be),e[3]=(e[3]||e[4]||e[5]||"").replace(ye,be),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return fe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ue.test(n)&&(t=C(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ye,be).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=q[e+" "];return t||(t=new RegExp("(^|"+te+")"+e+"("+te+"|$)"))&&q(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==W&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(r){var o=t.attr(r,e);return null==o?"!="===n:!n||(o+="","="===n?o===i:"!="===n?o!==i:"^="===n?i&&0===o.indexOf(i):"*="===n?i&&o.indexOf(i)>-1:"$="===n?i&&o.slice(-i.length)===i:"~="===n?(" "+o+" ").indexOf(i)>-1:"|="===n&&(o===i||o.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,n,i,r){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,f,h,p,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),$=!l&&!s;if(m){if(o){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;p=g="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?m.firstChild:m.lastChild],a&&$){for(u=m[L]||(m[L]={}),c=u[e]||[],h=c[0]===V&&c[1],f=c[0]===V&&c[2],d=h&&m.childNodes[h];d=++h&&d&&d[g]||(f=h=0)||p.pop();)if(1===d.nodeType&&++f&&d===t){u[e]=[V,h,f];break}}else if($&&(c=(t[L]||(t[L]={}))[e])&&c[0]===V)f=c[1];else for(;(d=++h&&d&&d[g]||(f=h=0)||p.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++f||($&&((d[L]||(d[L]={}))[e]=[V,f]),d!==t)););return(f-=r)===i||f%i==0&&f/i>=0}}},PSEUDO:function(e,n){var r,o=b.pseudos[e]||b.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[L]?o(n):o.length>1?(r=[e,e,"",n],b.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,r=o(e,n),a=r.length;a--;)i=Q.call(e,r[a]),e[i]=!(t[i]=r[a])}):function(e){return o(e,0,r)}):o}},pseudos:{not:i(function(e){var t=[],n=[],r=k(e.replace(ae,"$1"));return r[L]?i(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return function(t){return(t.textContent||t.innerText||w(t)).indexOf(e)>-1}}),lang:i(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ye,be).toLowerCase(),function(t){var n;do{if(n=I?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===O},focus:function(e){return e===M.activeElement&&(!M.hasFocus||M.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return pe.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:s(function(){return[0]}),last:s(function(e,t){return[t-1]}),eq:s(function(e,t,n){return[n<0?n+t:n]}),even:s(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:s(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:s(function(e,t,n){for(var i=n<0?n+t:n;--i>=0;)e.push(i);return e}),gt:s(function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e})}},b.pseudos.nth=b.pseudos.eq;for($ in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[$]=function(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}($);for($ in{submit:!0,reset:!0})b.pseudos[$]=function(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}($);return c.prototype=b.filters=b.pseudos,b.setFilters=new c,C=t.tokenize=function(e,n){var i,r,o,a,s,l,c,u=U[e+" "];if(u)return n?0:u.slice(0);for(s=e,l=[],c=b.preFilter;s;){i&&!(r=se.exec(s))||(r&&(s=s.slice(r[0].length)||s),l.push(o=[])),i=!1,(r=le.exec(s))&&(i=r.shift(),o.push({value:i,type:r[0].replace(ae," ")}),s=s.slice(i.length));for(a in b.filter)!(r=fe[a].exec(s))||c[a]&&!(r=c[a](r))||(i=r.shift(),o.push({value:i,type:a,matches:r}),s=s.slice(i.length));if(!i)break}return n?s.length:s?t.error(e):U(e,l).slice(0)},k=t.compile=function(e,t){var n,i=[],r=[],o=_[e+" "];if(!o){for(t||(t=C(e)),n=t.length;n--;)o=m(t[n]),o[L]?i.push(o):r.push(o);o=_(e,v(r,i)),o.selector=e}return o},S=t.select=function(e,t,n,i){var r,o,a,s,c,d="function"==typeof e&&e,f=!i&&C(e=d.selector||e);if(n=n||[],1===f.length){if(o=f[0]=f[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&y.getById&&9===t.nodeType&&I&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(ye,be),t)||[])[0]))return n;d&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(r=fe.needsContext.test(e)?0:o.length;r--&&(a=o[r],!b.relative[s=a.type]);)if((c=b.find[s])&&(i=c(a.matches[0].replace(ye,be),ve.test(o[0].type)&&l(t.parentNode)||t))){if(o.splice(r,1),!(e=i.length&&u(o)))return Z.apply(n,i),n;break}}return(d||k(e,f))(i,t,!I,n,ve.test(e)&&l(t.parentNode)||t),n},y.sortStable=L.split("").sort(B).join("")===L,y.detectDuplicates=!!D,A(),y.sortDetached=r(function(e){return 1&e.compareDocumentPosition(M.createElement("div"))}),r(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),y.attributes&&r(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),r(function(e){return null==e.getAttribute("disabled")})||o(ee,function(e,t,n){var i;if(!n)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(e);J.find=ie,J.expr=ie.selectors,J.expr[":"]=J.expr.pseudos,J.unique=ie.uniqueSort,J.text=ie.getText,J.isXMLDoc=ie.isXML,J.contains=ie.contains;var re=J.expr.match.needsContext,oe=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ae=/^.[^:#\[\.,]*$/
-;J.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?J.find.matchesSelector(i,e)?[i]:[]:J.find.matches(e,J.grep(t,function(e){return 1===e.nodeType}))},J.fn.extend({find:function(e){var t,n=this.length,i=[],r=this;if("string"!=typeof e)return this.pushStack(J(e).filter(function(){for(t=0;t<n;t++)if(J.contains(r[t],this))return!0}));for(t=0;t<n;t++)J.find(e,r[t],i);return i=this.pushStack(n>1?J.unique(i):i),i.selector=this.selector?this.selector+" "+e:e,i},filter:function(e){return this.pushStack(i(this,e||[],!1))},not:function(e){return this.pushStack(i(this,e||[],!0))},is:function(e){return!!i(this,"string"==typeof e&&re.test(e)?J(e):e||[],!1).length}});var se,le=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(J.fn.init=function(e,t){var n,i;if(!e)return this;if("string"==typeof e){if(!(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:le.exec(e))||!n[1]&&t)return!t||t.jquery?(t||se).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof J?t[0]:t,J.merge(this,J.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:Z,!0)),oe.test(n[1])&&J.isPlainObject(t))for(n in t)J.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return i=Z.getElementById(n[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=Z,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):J.isFunction(e)?void 0!==se.ready?se.ready(e):e(J):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),J.makeArray(e,this))}).prototype=J.fn,se=J(Z);var ce=/^(?:parents|prev(?:Until|All))/,ue={children:!0,contents:!0,next:!0,prev:!0};J.extend({dir:function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&J(e).is(n))break;i.push(e)}return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),J.fn.extend({has:function(e){var t=J(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(J.contains(this,t[e]))return!0})},closest:function(e,t){for(var n,i=0,r=this.length,o=[],a=re.test(e)||"string"!=typeof e?J(e,t||this.context):0;i<r;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&J.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?J.unique(o):o)},index:function(e){return e?"string"==typeof e?z.call(J(e),this[0]):z.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(J.unique(J.merge(this.get(),J(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),J.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return J.dir(e,"parentNode")},parentsUntil:function(e,t,n){return J.dir(e,"parentNode",n)},next:function(e){return r(e,"nextSibling")},prev:function(e){return r(e,"previousSibling")},nextAll:function(e){return J.dir(e,"nextSibling")},prevAll:function(e){return J.dir(e,"previousSibling")},nextUntil:function(e,t,n){return J.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return J.dir(e,"previousSibling",n)},siblings:function(e){return J.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return J.sibling(e.firstChild)},contents:function(e){return e.contentDocument||J.merge([],e.childNodes)}},function(e,t){J.fn[e]=function(n,i){var r=J.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=J.filter(i,r)),this.length>1&&(ue[e]||J.unique(r),ce.test(e)&&r.reverse()),this.pushStack(r)}});var de=/\S+/g,fe={};J.Callbacks=function(e){e="string"==typeof e?fe[e]||o(e):J.extend({},e);var t,n,i,r,a,s,l=[],c=!e.once&&[],u=function(o){for(t=e.memory&&o,n=!0,s=r||0,r=0,a=l.length,i=!0;l&&s<a;s++)if(!1===l[s].apply(o[0],o[1])&&e.stopOnFalse){t=!1;break}i=!1,l&&(c?c.length&&u(c.shift()):t?l=[]:d.disable())},d={add:function(){if(l){var n=l.length;!function t(n){J.each(n,function(n,i){var r=J.type(i);"function"===r?e.unique&&d.has(i)||l.push(i):i&&i.length&&"string"!==r&&t(i)})}(arguments),i?a=l.length:t&&(r=n,u(t))}return this},remove:function(){return l&&J.each(arguments,function(e,t){for(var n;(n=J.inArray(t,l,n))>-1;)l.splice(n,1),i&&(n<=a&&a--,n<=s&&s--)}),this},has:function(e){return e?J.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],a=0,this},disable:function(){return l=c=t=void 0,this},disabled:function(){return!l},lock:function(){return c=void 0,t||d.disable(),this},locked:function(){return!c},fireWith:function(e,t){return!l||n&&!c||(t=t||[],t=[e,t.slice?t.slice():t],i?c.push(t):u(t)),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!n}};return d},J.extend({Deferred:function(e){var t=[["resolve","done",J.Callbacks("once memory"),"resolved"],["reject","fail",J.Callbacks("once memory"),"rejected"],["notify","progress",J.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var e=arguments;return J.Deferred(function(n){J.each(t,function(t,o){var a=J.isFunction(e[t])&&e[t];r[o[1]](function(){var e=a&&a.apply(this,arguments);e&&J.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+"With"](this===i?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?J.extend(e,i):i}},r={};return i.pipe=i.then,J.each(t,function(e,o){var a=o[2],s=o[3];i[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),r[o[0]]=function(){return r[o[0]+"With"](this===r?i:this,arguments),this},r[o[0]+"With"]=a.fireWith}),i.promise(r),e&&e.call(r,r),r},when:function(e){var t,n,i,r=0,o=_.call(arguments),a=o.length,s=1!==a||e&&J.isFunction(e.promise)?a:0,l=1===s?e:J.Deferred(),c=function(e,n,i){return function(r){n[e]=this,i[e]=arguments.length>1?_.call(arguments):r,i===t?l.notifyWith(n,i):--s||l.resolveWith(n,i)}};if(a>1)for(t=new Array(a),n=new Array(a),i=new Array(a);r<a;r++)o[r]&&J.isFunction(o[r].promise)?o[r].promise().done(c(r,i,o)).fail(l.reject).progress(c(r,n,t)):--s;return s||l.resolveWith(i,o),l.promise()}});var he;J.fn.ready=function(e){return J.ready.promise().done(e),this},J.extend({isReady:!1,readyWait:1,holdReady:function(e){e?J.readyWait++:J.ready(!0)},ready:function(e){(!0===e?--J.readyWait:J.isReady)||(J.isReady=!0,!0!==e&&--J.readyWait>0||(he.resolveWith(Z,[J]),J.fn.triggerHandler&&(J(Z).triggerHandler("ready"),J(Z).off("ready"))))}}),J.ready.promise=function(t){return he||(he=J.Deferred(),"complete"===Z.readyState?setTimeout(J.ready):(Z.addEventListener("DOMContentLoaded",a,!1),e.addEventListener("load",a,!1))),he.promise(t)},J.ready.promise();var pe=J.access=function(e,t,n,i,r,o,a){var s=0,l=e.length,c=null==n;if("object"===J.type(n)){r=!0;for(s in n)J.access(e,t,s,n[s],!0,o,a)}else if(void 0!==i&&(r=!0,J.isFunction(i)||(a=!0),c&&(a?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(J(e),n)})),t))for(;s<l;s++)t(e[s],n,a?i:i.call(e[s],s,t(e[s],n)));return r?e:c?t.call(e):l?t(e[0],n):o};J.acceptData=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType},s.uid=1,s.accepts=J.acceptData,s.prototype={key:function(e){if(!s.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=s.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(i){t[this.expando]=n,J.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var i,r=this.key(e),o=this.cache[r];if("string"==typeof t)o[t]=n;else if(J.isEmptyObject(o))J.extend(this.cache[r],t);else for(i in t)o[i]=t[i];return o},get:function(e,t){var n=this.cache[this.key(e)];return void 0===t?n:n[t]},access:function(e,t,n){var i;return void 0===t||t&&"string"==typeof t&&void 0===n?(i=this.get(e,t),void 0!==i?i:this.get(e,J.camelCase(t))):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i,r,o=this.key(e),a=this.cache[o];if(void 0===t)this.cache[o]={};else{J.isArray(t)?i=t.concat(t.map(J.camelCase)):(r=J.camelCase(t),t in a?i=[t,r]:(i=r,i=i in a?[i]:i.match(de)||[])),n=i.length;for(;n--;)delete a[i[n]]}},hasData:function(e){return!J.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}};var ge=new s,me=new s,ve=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,$e=/([A-Z])/g;J.extend({hasData:function(e){return me.hasData(e)||ge.hasData(e)},data:function(e,t,n){return me.access(e,t,n)},removeData:function(e,t){me.remove(e,t)},_data:function(e,t,n){return ge.access(e,t,n)},_removeData:function(e,t){ge.remove(e,t)}}),J.fn.extend({data:function(e,t){var n,i,r,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(r=me.get(o),1===o.nodeType&&!ge.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&(i=a[n].name,0===i.indexOf("data-")&&(i=J.camelCase(i.slice(5)),l(o,i,r[i])));ge.set(o,"hasDataAttrs",!0)}return r}return"object"==typeof e?this.each(function(){me.set(this,e)}):pe(this,function(t){var n,i=J.camelCase(e);if(o&&void 0===t){if(void 0!==(n=me.get(o,e)))return n;if(void 0!==(n=me.get(o,i)))return n;if(void 0!==(n=l(o,i,void 0)))return n}else this.each(function(){var n=me.get(this,i);me.set(this,i,t),-1!==e.indexOf("-")&&void 0!==n&&me.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){me.remove(this,e)})}}),J.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=ge.get(e,t),n&&(!i||J.isArray(n)?i=ge.access(e,t,J.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=J.queue(e,t),i=n.length,r=n.shift(),o=J._queueHooks(e,t),a=function(){J.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete o.stop,r.call(e,a,o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ge.get(e,n)||ge.access(e,n,{empty:J.Callbacks("once memory").add(function(){ge.remove(e,[t+"queue",n])})})}}),J.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?J.queue(this[0],e):void 0===t?this:this.each(function(){var n=J.queue(this,e,t);J._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&J.dequeue(this,e)})},dequeue:function(e){return this.each(function(){J.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,r=J.Deferred(),o=this,a=this.length,s=function(){--i||r.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=ge.get(o[a],e+"queueHooks"))&&n.empty&&(i++,n.empty.add(s));return s(),r.promise(t)}});var ye=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,be=["Top","Right","Bottom","Left"],we=function(e,t){return e=t||e,"none"===J.css(e,"display")||!J.contains(e.ownerDocument,e)},xe=/^(?:checkbox|radio)$/i;!function(){var e=Z.createDocumentFragment(),t=e.appendChild(Z.createElement("div")),n=Z.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),X.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",X.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();X.focusinBubbles="onfocusin"in e;var Ce=/^key/,ke=/^(?:mouse|pointer|contextmenu)|click/,Se=/^(?:focusinfocus|focusoutblur)$/,Ee=/^([^.]*)(?:\.(.+)|)$/;J.event={global:{},add:function(e,t,n,i,r){var o,a,s,l,c,u,d,f,h,p,g,m=ge.get(e);if(m)for(n.handler&&(o=n,n=o.handler,r=o.selector),n.guid||(n.guid=J.guid++),(l=m.events)||(l=m.events={}),(a=m.handle)||(a=m.handle=function(t){return void 0!==J&&J.event.triggered!==t.type?J.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(de)||[""],c=t.length;c--;)s=Ee.exec(t[c])||[],h=g=s[1],p=(s[2]||"").split(".").sort(),h&&(d=J.event.special[h]||{},h=(r?d.delegateType:d.bindType)||h,d=J.event.special[h]||{},u=J.extend({type:h,origType:g,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&J.expr.match.needsContext.test(r),namespace:p.join(".")},o),(f=l[h])||(f=l[h]=[],f.delegateCount=0,d.setup&&!1!==d.setup.call(e,i,p,a)||e.addEventListener&&e.addEventListener(h,a,!1)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),r?f.splice(f.delegateCount++,0,u):f.push(u),J.event.global[h]=!0)},remove:function(e,t,n,i,r){var o,a,s,l,c,u,d,f,h,p,g,m=ge.hasData(e)&&ge.get(e);if(m&&(l=m.events)){for(t=(t||"").match(de)||[""],c=t.length;c--;)if(s=Ee.exec(t[c])||[],h=g=s[1],p=(s[2]||"").split(".").sort(),h){for(d=J.event.special[h]||{},h=(i?d.delegateType:d.bindType)||h,f=l[h]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=f.length;o--;)u=f[o],!r&&g!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(f.splice(o,1),u.selector&&f.delegateCount--,d.remove&&d.remove.call(e,u));a&&!f.length&&(d.teardown&&!1!==d.teardown.call(e,p,m.handle)||J.removeEvent(e,h,m.handle),delete l[h])}else for(h in l)J.event.remove(e,h+t[c],n,i,!0);J.isEmptyObject(l)&&(delete m.handle,ge.remove(e,"events"))}},trigger:function(t,n,i,r){var o,a,s,l,c,u,d,f=[i||Z],h=G.call(t,"type")?t.type:t,p=G.call(t,"namespace")?t.namespace.split("."):[];if(a=s=i=i||Z,3!==i.nodeType&&8!==i.nodeType&&!Se.test(h+J.event.triggered)&&(h.indexOf(".")>=0&&(p=h.split("."),h=p.shift(),p.sort()),c=h.indexOf(":")<0&&"on"+h,t=t[J.expando]?t:new J.Event(h,"object"==typeof t&&t),t.isTrigger=r?2:3,t.namespace=p.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:J.makeArray(n,[t]),d=J.event.special[h]||{},r||!d.trigger||!1!==d.trigger.apply(i,n))){if(!r&&!d.noBubble&&!J.isWindow(i)){for(l=d.delegateType||h,Se.test(l+h)||(a=a.parentNode);a;a=a.parentNode)f.push(a),s=a;s===(i.ownerDocument||Z)&&f.push(s.defaultView||s.parentWindow||e)}for(o=0;(a=f[o++])&&!t.isPropagationStopped();)t.type=o>1?l:d.bindType||h,u=(ge.get(a,"events")||{})[t.type]&&ge.get(a,"handle"),u&&u.apply(a,n),(u=c&&a[c])&&u.apply&&J.acceptData(a)&&(t.result=u.apply(a,n),!1===t.result&&t.preventDefault());return t.type=h,r||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(f.pop(),n)||!J.acceptData(i)||c&&J.isFunction(i[h])&&!J.isWindow(i)&&(s=i[c],s&&(i[c]=null),J.event.triggered=h,i[h](),J.event.triggered=void 0,s&&(i[c]=s)),t.result}},dispatch:function(e){e=J.event.fix(e);var t,n,i,r,o,a=[],s=_.call(arguments),l=(ge.get(this,"events")||{})[e.type]||[],c=J.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,e)){for(a=J.event.handlers.call(this,e,l),t=0;(r=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=r.elem,n=0;(o=r.handlers[n++])&&!e.isImmediatePropagationStopped();)e.namespace_re&&!e.namespace_re.test(o.namespace)||(e.handleObj=o,e.data=o.data,void 0!==(i=((J.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,s))&&!1===(e.result=i)&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,i,r,o,a=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!==this;l=l.parentNode||this)if(!0!==l.disabled||"click"!==e.type){for(i=[],n=0;n<s;n++)o=t[n],r=o.selector+" ",void 0===i[r]&&(i[r]=o.needsContext?J(r,this).index(l)>=0:J.find(r,this,null,[l]).length),i[r]&&i.push(o);i.length&&a.push({elem:l,handlers:i})}return s<t.length&&a.push({elem:this,handlers:t.slice(s)}),a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,i,r,o=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||Z,i=n.documentElement,r=n.body,e.pageX=t.clientX+(i&&i.scrollLeft||r&&r.scrollLeft||0)-(i&&i.clientLeft||r&&r.clientLeft||0),e.pageY=t.clientY+(i&&i.scrollTop||r&&r.scrollTop||0)-(i&&i.clientTop||r&&r.clientTop||0)),e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0),e}},fix:function(e){if(e[J.expando])return e;var t,n,i,r=e.type,o=e,a=this.fixHooks[r];for(a||(this.fixHooks[r]=a=ke.test(r)?this.mouseHooks:Ce.test(r)?this.keyHooks:{}),i=a.props?this.props.concat(a.props):this.props,e=new J.Event(o),t=i.length;t--;)n=i[t],e[n]=o[n];return e.target||(e.target=Z),3===e.target.nodeType&&(e.target=e.target.parentNode),a.filter?a.filter(e,o):e},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==d()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===d()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&J.nodeName(this,"input"))return this.click(),!1},_default:function(e){return J.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,i){var r=J.extend(new J.Event,n,{type:e,isSimulated:!0,originalEvent:{}});i?J.event.trigger(r,null,t):J.event.dispatch.call(t,r),r.isDefaultPrevented()&&n.preventDefault()}},J.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},J.Event=function(e,t){if(!(this instanceof J.Event))return new J.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?c:u):this.type=e,t&&J.extend(this,t),this.timeStamp=e&&e.timeStamp||J.now(),this[J.expando]=!0},J.Event.prototype={isDefaultPrevented:u,isPropagationStopped:u,isImmediatePropagationStopped:u,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=c,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=c,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=c,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},J.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){J.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,r=e.relatedTarget,o=e.handleObj;return r&&(r===i||J.contains(i,r))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),X.focusinBubbles||J.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){J.event.simulate(t,e.target,J.event.fix(e),!0)};J.event.special[t]={setup:function(){var i=this.ownerDocument||this,r=ge.access(i,t);r||i.addEventListener(e,n,!0),ge.access(i,t,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=ge.access(i,t)-1;r?ge.access(i,t,r):(i.removeEventListener(e,n,!0),ge.remove(i,t))}}}),J.fn.extend({on:function(e,t,n,i,r){var o,a;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=void 0);for(a in e)this.on(a,t,n,e[a],r);return this}if(null==n&&null==i?(i=t,n=t=void 0):null==i&&("string"==typeof t?(i=n,n=void 0):(i=n,n=t,t=void 0)),!1===i)i=u;else if(!i)return this;return 1===r&&(o=i,i=function(e){return J().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=J.guid++)),this.each(function(){J.event.add(this,e,i,n,t)})},one:function(e,t,n,i){return this.on(e,t,n,i,1)},off:function(e,t,n){var i,r;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,J(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(r in e)this.off(r,t,e[r]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=u),this.each(function(){J.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){J.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return J.event.trigger(e,t,n,!0)}});var Te=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,De=/<([\w:]+)/,Ae=/<|&#?\w+;/,Me=/<(?:script|style|link)/i,Oe=/checked\s*(?:[^=]|=\s*.checked.)/i,Ie=/^$|\/(?:java|ecma)script/i,Pe=/^true\/(.*)/,Ne=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,je={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};je.optgroup=je.option,je.tbody=je.tfoot=je.colgroup=je.caption=je.thead,je.th=je.td,J.extend({clone:function(e,t,n){var i,r,o,a,s=e.cloneNode(!0),l=J.contains(e.ownerDocument,e);if(!(X.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||J.isXMLDoc(e)))for(a=v(s),o=v(e),i=0,r=o.length;i<r;i++)$(o[i],a[i]);if(t)if(n)for(o=o||v(e),a=a||v(s),i=0,r=o.length;i<r;i++)m(o[i],a[i]);else m(e,s);return a=v(s,"script"),a.length>0&&g(a,!l&&v(e,"script")),s},buildFragment:function(e,t,n,i){for(var r,o,a,s,l,c,u=t.createDocumentFragment(),d=[],f=0,h=e.length;f<h;f++)if((r=e[f])||0===r)if("object"===J.type(r))J.merge(d,r.nodeType?[r]:r);else if(Ae.test(r)){for(o=o||u.appendChild(t.createElement("div")),a=(De.exec(r)||["",""])[1].toLowerCase(),s=je[a]||je._default,o.innerHTML=s[1]+r.replace(Te,"<$1></$2>")+s[2],c=s[0];c--;)o=o.lastChild;J.merge(d,o.childNodes),o=u.firstChild,o.textContent=""}else d.push(t.createTextNode(r));for(u.textContent="",f=0;r=d[f++];)if((!i||-1===J.inArray(r,i))&&(l=J.contains(r.ownerDocument,r),o=v(u.appendChild(r),"script"),l&&g(o),n))for(c=0;r=o[c++];)Ie.test(r.type||"")&&n.push(r);return u},cleanData:function(e){for(var t,n,i,r,o=J.event.special,a=0;void 0!==(n=e[a]);a++){if(J.acceptData(n)&&(r=n[ge.expando])&&(t=ge.cache[r])){if(t.events)for(i in t.events)o[i]?J.event.remove(n,i):J.removeEvent(n,i,t.handle);ge.cache[r]&&delete ge.cache[r]}delete me.cache[n[me.expando]]}}}),J.fn.extend({text:function(e){return pe(this,function(e){return void 0===e?J.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){f(this,e).appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=f(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,i=e?J.filter(e,this):this,r=0;null!=(n=i[r]);r++)t||1!==n.nodeType||J.cleanData(v(n)),n.parentNode&&(t&&J.contains(n.ownerDocument,n)&&g(v(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(J.cleanData(v(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return J.clone(this,e,t)})},html:function(e){return pe(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Me.test(e)&&!je[(De.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(Te,"<$1></$2>");try{for(;n<i;n++)t=this[n]||{},1===t.nodeType&&(J.cleanData(v(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,J.cleanData(v(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=B.apply([],e);var n,i,r,o,a,s,l=0,c=this.length,u=this,d=c-1,f=e[0],g=J.isFunction(f);if(g||c>1&&"string"==typeof f&&!X.checkClone&&Oe.test(f))return this.each(function(n){var i=u.eq(n);g&&(e[0]=f.call(this,n,i.html())),i.domManip(e,t)});if(c&&(n=J.buildFragment(e,this[0].ownerDocument,!1,this),i=n.firstChild,1===n.childNodes.length&&(n=i),i)){for(r=J.map(v(n,"script"),h),o=r.length;l<c;l++)a=n,l!==d&&(a=J.clone(a,!0,!0),o&&J.merge(r,v(a,"script"))),t.call(this[l],a,l);if(o)for(s=r[r.length-1].ownerDocument,J.map(r,p),l=0;l<o;l++)a=r[l],Ie.test(a.type||"")&&!ge.access(a,"globalEval")&&J.contains(s,a)&&(a.src?J._evalUrl&&J._evalUrl(a.src):J.globalEval(a.textContent.replace(Ne,"")))}return this}}),J.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){J.fn[e]=function(e){for(var n,i=[],r=J(e),o=r.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),J(r[a])[t](n),W.apply(i,n.get());return this.pushStack(i)}});var Fe,Le={},Re=/^margin/,Ve=new RegExp("^("+ye+")(?!px)[a-z%]+$","i"),He=function(e){return e.ownerDocument.defaultView.getComputedStyle(e,null)};!function(){function t(){a.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",a.innerHTML="",r.appendChild(o);var t=e.getComputedStyle(a,null);n="1%"!==t.top,i="4px"===t.width,r.removeChild(o)}var n,i,r=Z.documentElement,o=Z.createElement("div"),a=Z.createElement("div");a.style&&(a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",X.clearCloneStyle="content-box"===a.style.backgroundClip,o.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",o.appendChild(a),e.getComputedStyle&&J.extend(X,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return null==i&&t(),i},reliableMarginRight:function(){var t,n=a.appendChild(Z.createElement("div"));return n.style.cssText=a.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",n.style.marginRight=n.style.width="0",a.style.width="1px",r.appendChild(o),t=!parseFloat(e.getComputedStyle(n,null).marginRight),r.removeChild(o),t}}))}(),J.swap=function(e,t,n,i){var r,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];r=n.apply(e,i||[]);for(o in t)e.style[o]=a[o];return r};var qe=/^(none|table(?!-c[ea]).+)/,Ue=new RegExp("^("+ye+")(.*)$","i"),_e=new RegExp("^([+-])=("+ye+")","i"),Be={position:"absolute",visibility:"hidden",display:"block"},We={letterSpacing:"0",fontWeight:"400"},ze=["Webkit","O","Moz","ms"];J.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=w(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,a,s=J.camelCase(t),l=e.style;if(t=J.cssProps[s]||(J.cssProps[s]=C(l,s)),a=J.cssHooks[t]||J.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(r=a.get(e,!1,i))?r:l[t];o=typeof n,"string"===o&&(r=_e.exec(n))&&(n=(r[1]+1)*r[2]+parseFloat(J.css(e,t)),o="number"),null!=n&&n===n&&("number"!==o||J.cssNumber[s]||(n+="px"),X.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,i))||(l[t]=n))}},css:function(e,t,n,i){var r,o,a,s=J.camelCase(t);return t=J.cssProps[s]||(J.cssProps[s]=C(e.style,s)),a=J.cssHooks[t]||J.cssHooks[s],a&&"get"in a&&(r=a.get(e,!0,n)),void 0===r&&(r=w(e,t,i)),"normal"===r&&t in We&&(r=We[t]),""===n||n?(o=parseFloat(r),!0===n||J.isNumeric(o)?o||0:r):r}}),J.each(["height","width"],function(e,t){J.cssHooks[t]={get:function(e,n,i){if(n)return qe.test(J.css(e,"display"))&&0===e.offsetWidth?J.swap(e,Be,function(){return E(e,t,i)}):E(e,t,i)},set:function(e,n,i){var r=i&&He(e);return k(e,n,i?S(e,t,i,"border-box"===J.css(e,"boxSizing",!1,r),r):0)}}}),J.cssHooks.marginRight=x(X.reliableMarginRight,function(e,t){if(t)return J.swap(e,{display:"inline-block"},w,[e,"marginRight"])}),J.each({margin:"",padding:"",border:"Width"},function(e,t){J.cssHooks[e+t]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];i<4;i++)r[e+be[i]+t]=o[i]||o[i-2]||o[0];return r}},Re.test(e)||(J.cssHooks[e+t].set=k)}),J.fn.extend({css:function(e,t){return pe(this,function(e,t,n){var i,r,o={},a=0;if(J.isArray(t)){for(i=He(e),r=t.length;a<r;a++)o[t[a]]=J.css(e,t[a],!1,i);return o}return void 0!==n?J.style(e,t,n):J.css(e,t)},e,t,arguments.length>1)},show:function(){return T(this,!0)},hide:function(){return T(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){we(this)?J(this).show():J(this).hide()})}}),J.Tween=D,D.prototype={constructor:D,init:function(e,t,n,i,r,o){this.elem=e,this.prop=n,this.easing=r||"swing",this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(J.cssNumber[n]?"":"px")},cur:function(){var e=D.propHooks[this.prop];return e&&e.get?e.get(this):D.propHooks._default.get(this)},run:function(e){var t,n=D.propHooks[this.prop];return this.options.duration?this.pos=t=J.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):D.propHooks._default.set(this),this}},D.prototype.init.prototype=D.prototype,D.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=J.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){J.fx.step[e.prop]?J.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[J.cssProps[e.prop]]||J.cssHooks[e.prop])?J.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},D.propHooks.scrollTop=D.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},J.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},J.fx=D.prototype.init,J.fx.step={};var Ye,Ke,Ge=/^(?:toggle|show|hide)$/,Xe=new RegExp("^(?:([+-])=|)("+ye+")([a-z%]*)$","i"),Ze=/queueHooks$/,Je=[I],Qe={"*":[function(e,t){var n=this.createTween(e,t),i=n.cur(),r=Xe.exec(t),o=r&&r[3]||(J.cssNumber[e]?"":"px"),a=(J.cssNumber[e]||"px"!==o&&+i)&&Xe.exec(J.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],r=r||[],a=+i||1;do{s=s||".5",a/=s,J.style(n.elem,e,a+o)}while(s!==(s=n.cur()/i)&&1!==s&&--l)}return r&&(a=n.start=+a||+i||0,n.unit=o,n.end=r[1]?a+(r[1]+1)*r[2]:+r[2]),n}]};J.Animation=J.extend(N,{tweener:function(e,t){J.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,i=0,r=e.length;i<r;i++)n=e[i],Qe[n]=Qe[n]||[],Qe[n].unshift(t)},prefilter:function(e,t){t?Je.unshift(e):Je.push(e)}}),J.speed=function(e,t,n){var i=e&&"object"==typeof e?J.extend({},e):{complete:n||!n&&t||J.isFunction(e)&&e,duration:e,easing:n&&t||t&&!J.isFunction(t)&&t};return i.duration=J.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in J.fx.speeds?J.fx.speeds[i.duration]:J.fx.speeds._default,null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){J.isFunction(i.old)&&i.old.call(this),i.queue&&J.dequeue(this,i.queue)},i},J.fn.extend({fadeTo:function(e,t,n,i){return this.filter(we).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var r=J.isEmptyObject(e),o=J.speed(t,n,i),a=function(){var t=N(this,J.extend({},e),o);(r||ge.get(this,"finish"))&&t.stop(!0)};return a.finish=a,r||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,r=null!=e&&e+"queueHooks",o=J.timers,a=ge.get(this);if(r)a[r]&&a[r].stop&&i(a[r]);else for(r in a)a[r]&&a[r].stop&&Ze.test(r)&&i(a[r]);for(r=o.length;r--;)o[r].elem!==this||null!=e&&o[r].queue!==e||(o[r].anim.stop(n),t=!1,o.splice(r,1));!t&&n||J.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){
-var t,n=ge.get(this),i=n[e+"queue"],r=n[e+"queueHooks"],o=J.timers,a=i?i.length:0;for(n.finish=!0,J.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),J.each(["toggle","show","hide"],function(e,t){var n=J.fn[t];J.fn[t]=function(e,i,r){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(M(t,!0),e,i,r)}}),J.each({slideDown:M("show"),slideUp:M("hide"),slideToggle:M("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){J.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),J.timers=[],J.fx.tick=function(){var e,t=0,n=J.timers;for(Ye=J.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||J.fx.stop(),Ye=void 0},J.fx.timer=function(e){J.timers.push(e),e()?J.fx.start():J.timers.pop()},J.fx.interval=13,J.fx.start=function(){Ke||(Ke=setInterval(J.fx.tick,J.fx.interval))},J.fx.stop=function(){clearInterval(Ke),Ke=null},J.fx.speeds={slow:600,fast:200,_default:400},J.fn.delay=function(e,t){return e=J.fx?J.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var i=setTimeout(t,e);n.stop=function(){clearTimeout(i)}})},function(){var e=Z.createElement("input"),t=Z.createElement("select"),n=t.appendChild(Z.createElement("option"));e.type="checkbox",X.checkOn=""!==e.value,X.optSelected=n.selected,t.disabled=!0,X.optDisabled=!n.disabled,e=Z.createElement("input"),e.value="t",e.type="radio",X.radioValue="t"===e.value}();var et,tt=J.expr.attrHandle;J.fn.extend({attr:function(e,t){return pe(this,J.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){J.removeAttr(this,e)})}}),J.extend({attr:function(e,t,n){var i,r,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?J.prop(e,t,n):(1===o&&J.isXMLDoc(e)||(t=t.toLowerCase(),i=J.attrHooks[t]||(J.expr.match.bool.test(t)?et:void 0)),void 0===n?i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=J.find.attr(e,t),null==r?void 0:r):null!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):void J.removeAttr(e,t))},removeAttr:function(e,t){var n,i,r=0,o=t&&t.match(de);if(o&&1===e.nodeType)for(;n=o[r++];)i=J.propFix[n]||n,J.expr.match.bool.test(n)&&(e[i]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!X.radioValue&&"radio"===t&&J.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),et={set:function(e,t,n){return!1===t?J.removeAttr(e,n):e.setAttribute(n,n),n}},J.each(J.expr.match.bool.source.match(/\w+/g),function(e,t){var n=tt[t]||J.find.attr;tt[t]=function(e,t,i){var r,o;return i||(o=tt[t],tt[t]=r,r=null!=n(e,t,i)?t.toLowerCase():null,tt[t]=o),r}});var nt=/^(?:input|select|textarea|button)$/i;J.fn.extend({prop:function(e,t){return pe(this,J.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[J.propFix[e]||e]})}}),J.extend({propFix:{for:"htmlFor",class:"className"},prop:function(e,t,n){var i,r,o,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return o=1!==a||!J.isXMLDoc(e),o&&(t=J.propFix[t]||t,r=J.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||nt.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),X.optSelected||(J.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),J.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){J.propFix[this.toLowerCase()]=this});var it=/[\t\r\n\f]/g;J.fn.extend({addClass:function(e){var t,n,i,r,o,a,s="string"==typeof e&&e,l=0,c=this.length;if(J.isFunction(e))return this.each(function(t){J(this).addClass(e.call(this,t,this.className))});if(s)for(t=(e||"").match(de)||[];l<c;l++)if(n=this[l],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(it," "):" ")){for(o=0;r=t[o++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");a=J.trim(i),n.className!==a&&(n.className=a)}return this},removeClass:function(e){var t,n,i,r,o,a,s=0===arguments.length||"string"==typeof e&&e,l=0,c=this.length;if(J.isFunction(e))return this.each(function(t){J(this).removeClass(e.call(this,t,this.className))});if(s)for(t=(e||"").match(de)||[];l<c;l++)if(n=this[l],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(it," "):"")){for(o=0;r=t[o++];)for(;i.indexOf(" "+r+" ")>=0;)i=i.replace(" "+r+" "," ");a=e?J.trim(i):"",n.className!==a&&(n.className=a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):J.isFunction(e)?this.each(function(n){J(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var t,i=0,r=J(this),o=e.match(de)||[];t=o[i++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else"undefined"!==n&&"boolean"!==n||(this.className&&ge.set(this,"__className__",this.className),this.className=this.className||!1===e?"":ge.get(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,i=this.length;n<i;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(it," ").indexOf(t)>=0)return!0;return!1}});var rt=/\r/g;J.fn.extend({val:function(e){var t,n,i,r=this[0];{if(arguments.length)return i=J.isFunction(e),this.each(function(n){var r;1===this.nodeType&&(r=i?e.call(this,n,J(this).val()):e,null==r?r="":"number"==typeof r?r+="":J.isArray(r)&&(r=J.map(r,function(e){return null==e?"":e+""})),(t=J.valHooks[this.type]||J.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))});if(r)return(t=J.valHooks[r.type]||J.valHooks[r.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:(n=r.value,"string"==typeof n?n.replace(rt,""):null==n?"":n)}}}),J.extend({valHooks:{option:{get:function(e){var t=J.find.attr(e,"value");return null!=t?t:J.trim(J.text(e))}},select:{get:function(e){for(var t,n,i=e.options,r=e.selectedIndex,o="select-one"===e.type||r<0,a=o?null:[],s=o?r+1:i.length,l=r<0?s:o?r:0;l<s;l++)if(n=i[l],(n.selected||l===r)&&(X.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!J.nodeName(n.parentNode,"optgroup"))){if(t=J(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,i,r=e.options,o=J.makeArray(t),a=r.length;a--;)i=r[a],(i.selected=J.inArray(i.value,o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),J.each(["radio","checkbox"],function(){J.valHooks[this]={set:function(e,t){if(J.isArray(t))return e.checked=J.inArray(J(e).val(),t)>=0}},X.checkOn||(J.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),J.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){J.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),J.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var ot=J.now(),at=/\?/;J.parseJSON=function(e){return JSON.parse(e+"")},J.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||J.error("Invalid XML: "+e),t};var st,lt,ct=/#.*$/,ut=/([?&])_=[^&]*/,dt=/^(.*?):[ \t]*([^\r\n]*)$/gm,ft=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ht=/^(?:GET|HEAD)$/,pt=/^\/\//,gt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,mt={},vt={},$t="*/".concat("*");try{lt=location.href}catch(e){lt=Z.createElement("a"),lt.href="",lt=lt.href}st=gt.exec(lt.toLowerCase())||[],J.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:lt,type:"GET",isLocal:ft.test(st[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$t,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":J.parseJSON,"text xml":J.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?L(L(e,J.ajaxSettings),t):L(J.ajaxSettings,e)},ajaxPrefilter:j(mt),ajaxTransport:j(vt),ajax:function(e,t){function n(e,t,n,a){var l,u,v,$,b,x=t;2!==y&&(y=2,s&&clearTimeout(s),i=void 0,o=a||"",w.readyState=e>0?4:0,l=e>=200&&e<300||304===e,n&&($=R(d,w,n)),$=V(d,$,w,l),l?(d.ifModified&&(b=w.getResponseHeader("Last-Modified"),b&&(J.lastModified[r]=b),(b=w.getResponseHeader("etag"))&&(J.etag[r]=b)),204===e||"HEAD"===d.type?x="nocontent":304===e?x="notmodified":(x=$.state,u=$.data,v=$.error,l=!v)):(v=x,!e&&x||(x="error",e<0&&(e=0))),w.status=e,w.statusText=(t||x)+"",l?p.resolveWith(f,[u,x,w]):p.rejectWith(f,[w,x,v]),w.statusCode(m),m=void 0,c&&h.trigger(l?"ajaxSuccess":"ajaxError",[w,d,l?u:v]),g.fireWith(f,[w,x]),c&&(h.trigger("ajaxComplete",[w,d]),--J.active||J.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,r,o,a,s,l,c,u,d=J.ajaxSetup({},t),f=d.context||d,h=d.context&&(f.nodeType||f.jquery)?J(f):J.event,p=J.Deferred(),g=J.Callbacks("once memory"),m=d.statusCode||{},v={},$={},y=0,b="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(2===y){if(!a)for(a={};t=dt.exec(o);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===y?o:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return y||(e=$[n]=$[n]||e,v[e]=t),this},overrideMimeType:function(e){return y||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(y<2)for(t in e)m[t]=[m[t],e[t]];else w.always(e[w.status]);return this},abort:function(e){var t=e||b;return i&&i.abort(t),n(0,t),this}};if(p.promise(w).complete=g.add,w.success=w.done,w.error=w.fail,d.url=((e||d.url||lt)+"").replace(ct,"").replace(pt,st[1]+"//"),d.type=t.method||t.type||d.method||d.type,d.dataTypes=J.trim(d.dataType||"*").toLowerCase().match(de)||[""],null==d.crossDomain&&(l=gt.exec(d.url.toLowerCase()),d.crossDomain=!(!l||l[1]===st[1]&&l[2]===st[2]&&(l[3]||("http:"===l[1]?"80":"443"))===(st[3]||("http:"===st[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=J.param(d.data,d.traditional)),F(mt,d,t,w),2===y)return w;c=d.global,c&&0==J.active++&&J.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!ht.test(d.type),r=d.url,d.hasContent||(d.data&&(r=d.url+=(at.test(r)?"&":"?")+d.data,delete d.data),!1===d.cache&&(d.url=ut.test(r)?r.replace(ut,"$1_="+ot++):r+(at.test(r)?"&":"?")+"_="+ot++)),d.ifModified&&(J.lastModified[r]&&w.setRequestHeader("If-Modified-Since",J.lastModified[r]),J.etag[r]&&w.setRequestHeader("If-None-Match",J.etag[r])),(d.data&&d.hasContent&&!1!==d.contentType||t.contentType)&&w.setRequestHeader("Content-Type",d.contentType),w.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+$t+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)w.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(!1===d.beforeSend.call(f,w,d)||2===y))return w.abort();b="abort";for(u in{success:1,error:1,complete:1})w[u](d[u]);if(i=F(vt,d,t,w)){w.readyState=1,c&&h.trigger("ajaxSend",[w,d]),d.async&&d.timeout>0&&(s=setTimeout(function(){w.abort("timeout")},d.timeout));try{y=1,i.send(v,n)}catch(e){if(!(y<2))throw e;n(-1,e)}}else n(-1,"No Transport");return w},getJSON:function(e,t,n){return J.get(e,t,n,"json")},getScript:function(e,t){return J.get(e,void 0,t,"script")}}),J.each(["get","post"],function(e,t){J[t]=function(e,n,i,r){return J.isFunction(n)&&(r=r||i,i=n,n=void 0),J.ajax({url:e,type:t,dataType:r,data:n,success:i})}}),J.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){J.fn[t]=function(e){return this.on(t,e)}}),J._evalUrl=function(e){return J.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},J.fn.extend({wrapAll:function(e){var t;return J.isFunction(e)?this.each(function(t){J(this).wrapAll(e.call(this,t))}):(this[0]&&(t=J(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return J.isFunction(e)?this.each(function(t){J(this).wrapInner(e.call(this,t))}):this.each(function(){var t=J(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=J.isFunction(e);return this.each(function(n){J(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){J.nodeName(this,"body")||J(this).replaceWith(this.childNodes)}).end()}}),J.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0},J.expr.filters.visible=function(e){return!J.expr.filters.hidden(e)};var yt=/%20/g,bt=/\[\]$/,wt=/\r?\n/g,xt=/^(?:submit|button|image|reset|file)$/i,Ct=/^(?:input|select|textarea|keygen)/i;J.param=function(e,t){var n,i=[],r=function(e,t){t=J.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=J.ajaxSettings&&J.ajaxSettings.traditional),J.isArray(e)||e.jquery&&!J.isPlainObject(e))J.each(e,function(){r(this.name,this.value)});else for(n in e)H(n,e[n],t,r);return i.join("&").replace(yt,"+")},J.fn.extend({serialize:function(){return J.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=J.prop(this,"elements");return e?J.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!J(this).is(":disabled")&&Ct.test(this.nodeName)&&!xt.test(e)&&(this.checked||!xe.test(e))}).map(function(e,t){var n=J(this).val();return null==n?null:J.isArray(n)?J.map(n,function(e){return{name:t.name,value:e.replace(wt,"\r\n")}}):{name:t.name,value:n.replace(wt,"\r\n")}}).get()}}),J.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var kt=0,St={},Et={0:200,1223:204},Tt=J.ajaxSettings.xhr();e.ActiveXObject&&J(e).on("unload",function(){for(var e in St)St[e]()}),X.cors=!!Tt&&"withCredentials"in Tt,X.ajax=Tt=!!Tt,J.ajaxTransport(function(e){var t;if(X.cors||Tt&&!e.crossDomain)return{send:function(n,i){var r,o=e.xhr(),a=++kt;if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(r in e.xhrFields)o[r]=e.xhrFields[r];e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(r in n)o.setRequestHeader(r,n[r]);t=function(e){return function(){t&&(delete St[a],t=o.onload=o.onerror=null,"abort"===e?o.abort():"error"===e?i(o.status,o.statusText):i(Et[o.status]||o.status,o.statusText,"string"==typeof o.responseText?{text:o.responseText}:void 0,o.getAllResponseHeaders()))}},o.onload=t(),o.onerror=t("error"),t=St[a]=t("abort");try{o.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),J.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return J.globalEval(e),e}}}),J.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),J.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,r){t=J("<script>").prop({async:!0,charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&r("error"===e.type?404:200,e.type)}),Z.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Dt=[],At=/(=)\?(?=&|$)|\?\?/;J.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Dt.pop()||J.expando+"_"+ot++;return this[e]=!0,e}}),J.ajaxPrefilter("json jsonp",function(t,n,i){var r,o,a,s=!1!==t.jsonp&&(At.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&At.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return r=t.jsonpCallback=J.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(At,"$1"+r):!1!==t.jsonp&&(t.url+=(at.test(t.url)?"&":"?")+t.jsonp+"="+r),t.converters["script json"]=function(){return a||J.error(r+" was not called"),a[0]},t.dataTypes[0]="json",o=e[r],e[r]=function(){a=arguments},i.always(function(){e[r]=o,t[r]&&(t.jsonpCallback=n.jsonpCallback,Dt.push(r)),a&&J.isFunction(o)&&o(a[0]),a=o=void 0}),"script"}),J.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||Z;var i=oe.exec(e),r=!n&&[];return i?[t.createElement(i[1])]:(i=J.buildFragment([e],t,r),r&&r.length&&J(r).remove(),J.merge([],i.childNodes))};var Mt=J.fn.load;J.fn.load=function(e,t,n){if("string"!=typeof e&&Mt)return Mt.apply(this,arguments);var i,r,o,a=this,s=e.indexOf(" ");return s>=0&&(i=J.trim(e.slice(s)),e=e.slice(0,s)),J.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(r="POST"),a.length>0&&J.ajax({url:e,type:r,dataType:"html",data:t}).done(function(e){o=arguments,a.html(i?J("<div>").append(J.parseHTML(e)).find(i):e)}).complete(n&&function(e,t){a.each(n,o||[e.responseText,t,e])}),this},J.expr.filters.animated=function(e){return J.grep(J.timers,function(t){return e===t.elem}).length};var Ot=e.document.documentElement;J.offset={setOffset:function(e,t,n){var i,r,o,a,s,l,c,u=J.css(e,"position"),d=J(e),f={};"static"===u&&(e.style.position="relative"),s=d.offset(),o=J.css(e,"top"),l=J.css(e,"left"),c=("absolute"===u||"fixed"===u)&&(o+l).indexOf("auto")>-1,c?(i=d.position(),a=i.top,r=i.left):(a=parseFloat(o)||0,r=parseFloat(l)||0),J.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+r),"using"in t?t.using.call(e,f):d.css(f)}},J.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){J.offset.setOffset(this,e,t)});var t,n,i=this[0],r={top:0,left:0},o=i&&i.ownerDocument;if(o)return t=o.documentElement,J.contains(t,i)?(void 0!==i.getBoundingClientRect&&(r=i.getBoundingClientRect()),n=q(o),{top:r.top+n.pageYOffset-t.clientTop,left:r.left+n.pageXOffset-t.clientLeft}):r},position:function(){if(this[0]){var e,t,n=this[0],i={top:0,left:0};return"fixed"===J.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),J.nodeName(e[0],"html")||(i=e.offset()),i.top+=J.css(e[0],"borderTopWidth",!0),i.left+=J.css(e[0],"borderLeftWidth",!0)),{top:t.top-i.top-J.css(n,"marginTop",!0),left:t.left-i.left-J.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||Ot;e&&!J.nodeName(e,"html")&&"static"===J.css(e,"position");)e=e.offsetParent;return e||Ot})}}),J.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,n){var i="pageYOffset"===n;J.fn[t]=function(r){return pe(this,function(t,r,o){var a=q(t);if(void 0===o)return a?a[n]:t[r];a?a.scrollTo(i?e.pageXOffset:o,i?o:e.pageYOffset):t[r]=o},t,r,arguments.length,null)}}),J.each(["top","left"],function(e,t){J.cssHooks[t]=x(X.pixelPosition,function(e,n){if(n)return n=w(e,t),Ve.test(n)?J(e).position()[t]+"px":n})}),J.each({Height:"height",Width:"width"},function(e,t){J.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){J.fn[i]=function(i,r){var o=arguments.length&&(n||"boolean"!=typeof i),a=n||(!0===i||!0===r?"margin":"border");return pe(this,function(t,n,i){var r;return J.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(r=t.documentElement,Math.max(t.body["scroll"+e],r["scroll"+e],t.body["offset"+e],r["offset"+e],r["client"+e])):void 0===i?J.css(t,n,a):J.style(t,n,i,a)},t,o?i:void 0,o,null)}})}),J.fn.size=function(){return this.length},J.fn.andSelf=J.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return J});var It=e.jQuery,Pt=e.$;return J.noConflict=function(t){return e.$===J&&(e.$=Pt),t&&e.jQuery===J&&(e.jQuery=It),J},void 0===t&&(e.jQuery=e.$=J),J}),function(){function e(e){function t(t,n,i,r,o,a){for(;o>=0&&o<a;o+=e){var s=r?r[o]:o;i=n(i,t[s],s,t)}return i}return function(n,i,r,o){i=y(i,o,4);var a=!E(n)&&$.keys(n),s=(a||n).length,l=e>0?0:s-1;return arguments.length<3&&(r=n[a?a[l]:l],l+=e),t(n,i,r,a,l,s)}}function t(e){return function(t,n,i){n=b(n,i);for(var r=S(t),o=e>0?0:r-1;o>=0&&o<r;o+=e)if(n(t[o],o,t))return o;return-1}}function n(e,t,n){return function(i,r,o){var a=0,s=S(i);if("number"==typeof o)e>0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return o=n(i,r),i[o]===r?o:-1;if(r!==r)return o=t(u.call(i,a,s),$.isNaN),o>=0?o+a:-1;for(o=e>0?a:s-1;o>=0&&o<s;o+=e)if(i[o]===r)return o;return-1}}function i(e,t){var n=O.length,i=e.constructor,r=$.isFunction(i)&&i.prototype||s,o="constructor";for($.has(e,o)&&!$.contains(t,o)&&t.push(o);n--;)(o=O[n])in e&&e[o]!==r[o]&&!$.contains(t,o)&&t.push(o)}var r=this,o=r._,a=Array.prototype,s=Object.prototype,l=Function.prototype,c=a.push,u=a.slice,d=s.toString,f=s.hasOwnProperty,h=Array.isArray,p=Object.keys,g=l.bind,m=Object.create,v=function(){},$=function(e){return e instanceof $?e:this instanceof $?void(this._wrapped=e):new $(e)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=$),exports._=$):r._=$,$.VERSION="1.8.3";var y=function(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,r){return e.call(t,n,i,r)};case 4:return function(n,i,r,o){return e.call(t,n,i,r,o)}}return function(){return e.apply(t,arguments)}},b=function(e,t,n){return null==e?$.identity:$.isFunction(e)?y(e,t,n):$.isObject(e)?$.matcher(e):$.property(e)};$.iteratee=function(e,t){return b(e,t,1/0)};var w=function(e,t){return function(n){var i=arguments.length;if(i<2||null==n)return n;for(var r=1;r<i;r++)for(var o=arguments[r],a=e(o),s=a.length,l=0;l<s;l++){var c=a[l];t&&void 0!==n[c]||(n[c]=o[c])}return n}},x=function(e){if(!$.isObject(e))return{};if(m)return m(e);v.prototype=e;var t=new v;return v.prototype=null,t},C=function(e){return function(t){return null==t?void 0:t[e]}},k=Math.pow(2,53)-1,S=C("length"),E=function(e){var t=S(e);return"number"==typeof t&&t>=0&&t<=k};$.each=$.forEach=function(e,t,n){t=y(t,n);var i,r;if(E(e))for(i=0,r=e.length;i<r;i++)t(e[i],i,e);else{var o=$.keys(e);for(i=0,r=o.length;i<r;i++)t(e[o[i]],o[i],e)}return e},$.map=$.collect=function(e,t,n){t=b(t,n);for(var i=!E(e)&&$.keys(e),r=(i||e).length,o=Array(r),a=0;a<r;a++){var s=i?i[a]:a;o[a]=t(e[s],s,e)}return o},$.reduce=$.foldl=$.inject=e(1),$.reduceRight=$.foldr=e(-1),$.find=$.detect=function(e,t,n){var i;if(void 0!==(i=E(e)?$.findIndex(e,t,n):$.findKey(e,t,n))&&-1!==i)return e[i]},$.filter=$.select=function(e,t,n){var i=[];return t=b(t,n),$.each(e,function(e,n,r){t(e,n,r)&&i.push(e)}),i},$.reject=function(e,t,n){return $.filter(e,$.negate(b(t)),n)},$.every=$.all=function(e,t,n){t=b(t,n);for(var i=!E(e)&&$.keys(e),r=(i||e).length,o=0;o<r;o++){var a=i?i[o]:o;if(!t(e[a],a,e))return!1}return!0},$.some=$.any=function(e,t,n){t=b(t,n);for(var i=!E(e)&&$.keys(e),r=(i||e).length,o=0;o<r;o++){var a=i?i[o]:o;if(t(e[a],a,e))return!0}return!1},$.contains=$.includes=$.include=function(e,t,n,i){return E(e)||(e=$.values(e)),("number"!=typeof n||i)&&(n=0),$.indexOf(e,t,n)>=0},$.invoke=function(e,t){var n=u.call(arguments,2),i=$.isFunction(t);return $.map(e,function(e){var r=i?t:e[t];return null==r?r:r.apply(e,n)})},$.pluck=function(e,t){return $.map(e,$.property(t))},$.where=function(e,t){return $.filter(e,$.matcher(t))},$.findWhere=function(e,t){return $.find(e,$.matcher(t))},$.max=function(e,t,n){var i,r,o=-1/0,a=-1/0;if(null==t&&null!=e){e=E(e)?e:$.values(e);for(var s=0,l=e.length;s<l;s++)(i=e[s])>o&&(o=i)}else t=b(t,n),$.each(e,function(e,n,i){((r=t(e,n,i))>a||r===-1/0&&o===-1/0)&&(o=e,a=r)});return o},$.min=function(e,t,n){var i,r,o=1/0,a=1/0;if(null==t&&null!=e){e=E(e)?e:$.values(e);for(var s=0,l=e.length;s<l;s++)(i=e[s])<o&&(o=i)}else t=b(t,n),$.each(e,function(e,n,i){((r=t(e,n,i))<a||r===1/0&&o===1/0)&&(o=e,a=r)});return o},$.shuffle=function(e){for(var t,n=E(e)?e:$.values(e),i=n.length,r=Array(i),o=0;o<i;o++)t=$.random(0,o),t!==o&&(r[o]=r[t]),r[t]=n[o];return r},$.sample=function(e,t,n){return null==t||n?(E(e)||(e=$.values(e)),e[$.random(e.length-1)]):$.shuffle(e).slice(0,Math.max(0,t))},$.sortBy=function(e,t,n){return t=b(t,n),$.pluck($.map(e,function(e,n,i){return{value:e,index:n,criteria:t(e,n,i)}}).sort(function(e,t){var n=e.criteria,i=t.criteria;if(n!==i){if(n>i||void 0===n)return 1;if(n<i||void 0===i)return-1}return e.index-t.index}),"value")};var T=function(e){return function(t,n,i){var r={};return n=b(n,i),$.each(t,function(i,o){var a=n(i,o,t);e(r,i,a)}),r}};$.groupBy=T(function(e,t,n){$.has(e,n)?e[n].push(t):e[n]=[t]}),$.indexBy=T(function(e,t,n){e[n]=t}),$.countBy=T(function(e,t,n){$.has(e,n)?e[n]++:e[n]=1}),$.toArray=function(e){return e?$.isArray(e)?u.call(e):E(e)?$.map(e,$.identity):$.values(e):[]},$.size=function(e){return null==e?0:E(e)?e.length:$.keys(e).length},$.partition=function(e,t,n){t=b(t,n);var i=[],r=[];return $.each(e,function(e,n,o){(t(e,n,o)?i:r).push(e)}),[i,r]},$.first=$.head=$.take=function(e,t,n){if(null!=e)return null==t||n?e[0]:$.initial(e,e.length-t)},$.initial=function(e,t,n){return u.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))},$.last=function(e,t,n){if(null!=e)return null==t||n?e[e.length-1]:$.rest(e,Math.max(0,e.length-t))},$.rest=$.tail=$.drop=function(e,t,n){return u.call(e,null==t||n?1:t)},$.compact=function(e){return $.filter(e,$.identity)};var D=function(e,t,n,i){for(var r=[],o=0,a=i||0,s=S(e);a<s;a++){var l=e[a];if(E(l)&&($.isArray(l)||$.isArguments(l))){t||(l=D(l,t,n));var c=0,u=l.length;for(r.length+=u;c<u;)r[o++]=l[c++]}else n||(r[o++]=l)}return r};$.flatten=function(e,t){return D(e,t,!1)},$.without=function(e){return $.difference(e,u.call(arguments,1))},$.uniq=$.unique=function(e,t,n,i){$.isBoolean(t)||(i=n,n=t,t=!1),null!=n&&(n=b(n,i));for(var r=[],o=[],a=0,s=S(e);a<s;a++){var l=e[a],c=n?n(l,a,e):l;t?(a&&o===c||r.push(l),o=c):n?$.contains(o,c)||(o.push(c),r.push(l)):$.contains(r,l)||r.push(l)}return r},$.union=function(){return $.uniq(D(arguments,!0,!0))},$.intersection=function(e){for(var t=[],n=arguments.length,i=0,r=S(e);i<r;i++){var o=e[i];if(!$.contains(t,o)){for(var a=1;a<n&&$.contains(arguments[a],o);a++);a===n&&t.push(o)}}return t},$.difference=function(e){var t=D(arguments,!0,!0,1);return $.filter(e,function(e){return!$.contains(t,e)})},$.zip=function(){return $.unzip(arguments)},$.unzip=function(e){for(var t=e&&$.max(e,S).length||0,n=Array(t),i=0;i<t;i++)n[i]=$.pluck(e,i);return n},$.object=function(e,t){for(var n={},i=0,r=S(e);i<r;i++)t?n[e[i]]=t[i]:n[e[i][0]]=e[i][1];return n},$.findIndex=t(1),$.findLastIndex=t(-1),$.sortedIndex=function(e,t,n,i){n=b(n,i,1);for(var r=n(t),o=0,a=S(e);o<a;){var s=Math.floor((o+a)/2);n(e[s])<r?o=s+1:a=s}return o},$.indexOf=n(1,$.findIndex,$.sortedIndex),$.lastIndexOf=n(-1,$.findLastIndex),$.range=function(e,t,n){null==t&&(t=e||0,e=0),n=n||1;for(var i=Math.max(Math.ceil((t-e)/n),0),r=Array(i),o=0;o<i;o++,e+=n)r[o]=e;return r};var A=function(e,t,n,i,r){if(!(i instanceof t))return e.apply(n,r);var o=x(e.prototype),a=e.apply(o,r);return $.isObject(a)?a:o};$.bind=function(e,t){if(g&&e.bind===g)return g.apply(e,u.call(arguments,1));if(!$.isFunction(e))throw new TypeError("Bind must be called on a function");var n=u.call(arguments,2),i=function(){return A(e,i,t,this,n.concat(u.call(arguments)))};return i},$.partial=function(e){var t=u.call(arguments,1),n=function(){for(var i=0,r=t.length,o=Array(r),a=0;a<r;a++)o[a]=t[a]===$?arguments[i++]:t[a];for(;i<arguments.length;)o.push(arguments[i++]);return A(e,n,this,this,o)};return n},$.bindAll=function(e){var t,n,i=arguments.length;if(i<=1)throw new Error("bindAll must be passed function names");for(t=1;t<i;t++)n=arguments[t],e[n]=$.bind(e[n],e);return e},$.memoize=function(e,t){var n=function(i){var r=n.cache,o=""+(t?t.apply(this,arguments):i);return $.has(r,o)||(r[o]=e.apply(this,arguments)),r[o]};return n.cache={},n},$.delay=function(e,t){var n=u.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},$.defer=$.partial($.delay,$,1),$.throttle=function(e,t,n){var i,r,o,a=null,s=0;n||(n={});var l=function(){s=!1===n.leading?0:$.now(),a=null,o=e.apply(i,r),a||(i=r=null)};return function(){var c=$.now();s||!1!==n.leading||(s=c);var u=t-(c-s);return i=this,r=arguments,u<=0||u>t?(a&&(clearTimeout(a),a=null),s=c,o=e.apply(i,r),a||(i=r=null)):a||!1===n.trailing||(a=setTimeout(l,u)),o}},$.debounce=function(e,t,n){var i,r,o,a,s,l=function(){var c=$.now()-a;c<t&&c>=0?i=setTimeout(l,t-c):(i=null,n||(s=e.apply(o,r),i||(o=r=null)))};return function(){o=this,r=arguments,a=$.now();var c=n&&!i;return i||(i=setTimeout(l,t)),c&&(s=e.apply(o,r),o=r=null),s}},$.wrap=function(e,t){return $.partial(t,e)},$.negate=function(e){return function(){return!e.apply(this,arguments)}},$.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,i=e[t].apply(this,arguments);n--;)i=e[n].call(this,i);return i}},$.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},$.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}},$.once=$.partial($.before,2);var M=!{toString:null}.propertyIsEnumerable("toString"),O=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];$.keys=function(e){if(!$.isObject(e))return[];if(p)return p(e);var t=[];for(var n in e)$.has(e,n)&&t.push(n);return M&&i(e,t),t},$.allKeys=function(e){if(!$.isObject(e))return[];var t=[];for(var n in e)t.push(n);return M&&i(e,t),t},$.values=function(e){for(var t=$.keys(e),n=t.length,i=Array(n),r=0;r<n;r++)i[r]=e[t[r]];return i},$.mapObject=function(e,t,n){t=b(t,n);for(var i,r=$.keys(e),o=r.length,a={},s=0;s<o;s++)i=r[s],a[i]=t(e[i],i,e);return a},$.pairs=function(e){for(var t=$.keys(e),n=t.length,i=Array(n),r=0;r<n;r++)i[r]=[t[r],e[t[r]]];return i},$.invert=function(e){for(var t={},n=$.keys(e),i=0,r=n.length;i<r;i++)t[e[n[i]]]=n[i];return t},$.functions=$.methods=function(e){var t=[];for(var n in e)$.isFunction(e[n])&&t.push(n);return t.sort()},$.extend=w($.allKeys),$.extendOwn=$.assign=w($.keys),$.findKey=function(e,t,n){t=b(t,n);for(var i,r=$.keys(e),o=0,a=r.length;o<a;o++)if(i=r[o],t(e[i],i,e))return i},$.pick=function(e,t,n){var i,r,o={},a=e;if(null==a)return o;$.isFunction(t)?(r=$.allKeys(a),i=y(t,n)):(r=D(arguments,!1,!1,1),i=function(e,t,n){return t in n},a=Object(a));for(var s=0,l=r.length;s<l;s++){var c=r[s],u=a[c];i(u,c,a)&&(o[c]=u)}return o},$.omit=function(e,t,n){if($.isFunction(t))t=$.negate(t);else{var i=$.map(D(arguments,!1,!1,1),String);t=function(e,t){return!$.contains(i,t)}}return $.pick(e,t,n)},$.defaults=w($.allKeys,!0),$.create=function(e,t){var n=x(e);return t&&$.extendOwn(n,t),n},$.clone=function(e){return $.isObject(e)?$.isArray(e)?e.slice():$.extend({},e):e},$.tap=function(e,t){return t(e),e},$.isMatch=function(e,t){var n=$.keys(t),i=n.length;if(null==e)return!i;for(var r=Object(e),o=0;o<i;o++){var a=n[o];if(t[a]!==r[a]||!(a in r))return!1}return!0};var I=function(e,t,n,i){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return e===t;e instanceof $&&(e=e._wrapped),t instanceof $&&(t=t._wrapped);var r=d.call(e);if(r!==d.call(t))return!1;switch(r){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t}var o="[object Array]"===r;if(!o){
-if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!($.isFunction(a)&&a instanceof a&&$.isFunction(s)&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}n=n||[],i=i||[];for(var l=n.length;l--;)if(n[l]===e)return i[l]===t;if(n.push(e),i.push(t),o){if((l=e.length)!==t.length)return!1;for(;l--;)if(!I(e[l],t[l],n,i))return!1}else{var c,u=$.keys(e);if(l=u.length,$.keys(t).length!==l)return!1;for(;l--;)if(c=u[l],!$.has(t,c)||!I(e[c],t[c],n,i))return!1}return n.pop(),i.pop(),!0};$.isEqual=function(e,t){return I(e,t)},$.isEmpty=function(e){return null==e||(E(e)&&($.isArray(e)||$.isString(e)||$.isArguments(e))?0===e.length:0===$.keys(e).length)},$.isElement=function(e){return!(!e||1!==e.nodeType)},$.isArray=h||function(e){return"[object Array]"===d.call(e)},$.isObject=function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},$.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(e){$["is"+e]=function(t){return d.call(t)==="[object "+e+"]"}}),$.isArguments(arguments)||($.isArguments=function(e){return $.has(e,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&($.isFunction=function(e){return"function"==typeof e||!1}),$.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},$.isNaN=function(e){return $.isNumber(e)&&e!==+e},$.isBoolean=function(e){return!0===e||!1===e||"[object Boolean]"===d.call(e)},$.isNull=function(e){return null===e},$.isUndefined=function(e){return void 0===e},$.has=function(e,t){return null!=e&&f.call(e,t)},$.noConflict=function(){return r._=o,this},$.identity=function(e){return e},$.constant=function(e){return function(){return e}},$.noop=function(){},$.property=C,$.propertyOf=function(e){return null==e?function(){}:function(t){return e[t]}},$.matcher=$.matches=function(e){return e=$.extendOwn({},e),function(t){return $.isMatch(t,e)}},$.times=function(e,t,n){var i=Array(Math.max(0,e));t=y(t,n,1);for(var r=0;r<e;r++)i[r]=t(r);return i},$.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},$.now=Date.now||function(){return(new Date).getTime()};var P={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},N=$.invert(P),j=function(e){var t=function(t){return e[t]},n="(?:"+$.keys(e).join("|")+")",i=RegExp(n),r=RegExp(n,"g");return function(e){return e=null==e?"":""+e,i.test(e)?e.replace(r,t):e}};$.escape=j(P),$.unescape=j(N),$.result=function(e,t,n){var i=null==e?void 0:e[t];return void 0===i&&(i=n),$.isFunction(i)?i.call(e):i};var F=0;$.uniqueId=function(e){var t=++F+"";return e?e+t:t},$.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var L=/(.)^/,R={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},V=/\\|'|\r|\n|\u2028|\u2029/g,H=function(e){return"\\"+R[e]};$.template=function(e,t,n){!t&&n&&(t=n),t=$.defaults({},t,$.templateSettings);var i=RegExp([(t.escape||L).source,(t.interpolate||L).source,(t.evaluate||L).source].join("|")+"|$","g"),r=0,o="__p+='";e.replace(i,function(t,n,i,a,s){return o+=e.slice(r,s).replace(V,H),r=s+t.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":i?o+="'+\n((__t=("+i+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),t}),o+="';\n",t.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var a=new Function(t.variable||"obj","_",o)}catch(e){throw e.source=o,e}var s=function(e){return a.call(this,e,$)};return s.source="function("+(t.variable||"obj")+"){\n"+o+"}",s},$.chain=function(e){var t=$(e);return t._chain=!0,t};var q=function(e,t){return e._chain?$(t).chain():t};$.mixin=function(e){$.each($.functions(e),function(t){var n=$[t]=e[t];$.prototype[t]=function(){var e=[this._wrapped];return c.apply(e,arguments),q(this,n.apply($,e))}})},$.mixin($),$.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=a[e];$.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],q(this,n)}}),$.each(["concat","join","slice"],function(e){var t=a[e];$.prototype[e]=function(){return q(this,t.apply(this._wrapped,arguments))}}),$.prototype.value=function(){return this._wrapped},$.prototype.valueOf=$.prototype.toJSON=$.prototype.value,$.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return $})}.call(this),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(e){"use strict";function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(void 0!==e.style[n])return{end:t[n]};return!1}e.fn.emulateTransitionEnd=function(t){var n=!1,i=this;e(this).one("bsTransitionEnd",function(){n=!0});var r=function(){n||e(i).trigger(e.support.transition.end)};return setTimeout(r,t),this},e(function(){e.support.transition=t(),e.support.transition&&(e.event.special.bsTransitionEnd={bindType:e.support.transition.end,delegateType:e.support.transition.end,handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var n=e(this),r=n.data("bs.alert");r||n.data("bs.alert",r=new i(this)),"string"==typeof t&&r[t].call(n)})}var n='[data-dismiss="alert"]',i=function(t){e(t).on("click",n,this.close)};i.VERSION="3.2.0",i.prototype.close=function(t){function n(){o.detach().trigger("closed.bs.alert").remove()}var i=e(this),r=i.attr("data-target");r||(r=i.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var o=e(r);t&&t.preventDefault(),o.length||(o=i.hasClass("alert")?i:i.parent()),o.trigger(t=e.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),e.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",n).emulateTransitionEnd(150):n())};var r=e.fn.alert;e.fn.alert=t,e.fn.alert.Constructor=i,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.bs.alert.data-api",n,i.prototype.close)}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.button"),o="object"==typeof t&&t;r||i.data("bs.button",r=new n(this,o)),"toggle"==t?r.toggle():t&&r.setState(t)})}var n=function(t,i){this.$element=e(t),this.options=e.extend({},n.DEFAULTS,i),this.isLoading=!1};n.VERSION="3.2.0",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(t){var n="disabled",i=this.$element,r=i.is("input")?"val":"html",o=i.data();t+="Text",null==o.resetText&&i.data("resetText",i[r]()),i[r](null==o[t]?this.options[t]:o[t]),setTimeout(e.proxy(function(){"loadingText"==t?(this.isLoading=!0,i.addClass(n).attr(n,n)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n))},this),0)},n.prototype.toggle=function(){var e=!0,t=this.$element.closest('[data-toggle="buttons"]');if(t.length){var n=this.$element.find("input");"radio"==n.prop("type")&&(n.prop("checked")&&this.$element.hasClass("active")?e=!1:t.find(".active").removeClass("active")),e&&n.prop("checked",!this.$element.hasClass("active")).trigger("change")}e&&this.$element.toggleClass("active")};var i=e.fn.button;e.fn.button=t,e.fn.button.Constructor=n,e.fn.button.noConflict=function(){return e.fn.button=i,this},e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var i=e(n.target);i.hasClass("btn")||(i=i.closest(".btn")),t.call(i,"toggle"),n.preventDefault()})}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.carousel"),o=e.extend({},n.DEFAULTS,i.data(),"object"==typeof t&&t),a="string"==typeof t?t:o.slide;r||i.data("bs.carousel",r=new n(this,o)),"number"==typeof t?r.to(t):a?r[a]():o.interval&&r.pause().cycle()})}var n=function(t,n){this.$element=e(t).on("keydown.bs.carousel",e.proxy(this.keydown,this)),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter.bs.carousel",e.proxy(this.pause,this)).on("mouseleave.bs.carousel",e.proxy(this.cycle,this))};n.VERSION="3.2.0",n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},n.prototype.keydown=function(e){switch(e.which){case 37:this.prev();break;case 39:this.next();break;default:return}e.preventDefault()},n.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},n.prototype.getItemIndex=function(e){return this.$items=e.parent().children(".item"),this.$items.index(e||this.$active)},n.prototype.to=function(t){var n=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){n.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",e(this.$items[t]))},n.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){if(!this.sliding)return this.slide("next")},n.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},n.prototype.slide=function(t,n){var i=this.$element.find(".item.active"),r=n||i[t](),o=this.interval,a="next"==t?"left":"right",s="next"==t?"first":"last",l=this;if(!r.length){if(!this.options.wrap)return;r=this.$element.find(".item")[s]()}if(r.hasClass("active"))return this.sliding=!1;var c=r[0],u=e.Event("slide.bs.carousel",{relatedTarget:c,direction:a});if(this.$element.trigger(u),!u.isDefaultPrevented()){if(this.sliding=!0,o&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var d=e(this.$indicators.children()[this.getItemIndex(r)]);d&&d.addClass("active")}var f=e.Event("slid.bs.carousel",{relatedTarget:c,direction:a});return e.support.transition&&this.$element.hasClass("slide")?(r.addClass(t),r[0].offsetWidth,i.addClass(a),r.addClass(a),i.one("bsTransitionEnd",function(){r.removeClass([t,a].join(" ")).addClass("active"),i.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(f)},0)}).emulateTransitionEnd(1e3*i.css("transition-duration").slice(0,-1))):(i.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger(f)),o&&this.cycle(),this}};var i=e.fn.carousel;e.fn.carousel=t,e.fn.carousel.Constructor=n,e.fn.carousel.noConflict=function(){return e.fn.carousel=i,this},e(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(n){var i,r=e(this),o=e(r.attr("data-target")||(i=r.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""));if(o.hasClass("carousel")){var a=e.extend({},o.data(),r.data()),s=r.attr("data-slide-to");s&&(a.interval=!1),t.call(o,a),s&&o.data("bs.carousel").to(s),n.preventDefault()}}),e(window).on("load",function(){e('[data-ride="carousel"]').each(function(){var n=e(this);t.call(n,n.data())})})}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.collapse"),o=e.extend({},n.DEFAULTS,i.data(),"object"==typeof t&&t);!r&&o.toggle&&"show"==t&&(t=!t),r||i.data("bs.collapse",r=new n(this,o)),"string"==typeof t&&r[t]()})}var n=function(t,i){this.$element=e(t),this.options=e.extend({},n.DEFAULTS,i),this.transitioning=null,this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};n.VERSION="3.2.0",n.DEFAULTS={toggle:!0},n.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},n.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var n=e.Event("show.bs.collapse");if(this.$element.trigger(n),!n.isDefaultPrevented()){var i=this.$parent&&this.$parent.find("> .panel > .in");if(i&&i.length){var r=i.data("bs.collapse");if(r&&r.transitioning)return;t.call(i,"hide"),r||i.data("bs.collapse",null)}var o=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[o](0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[o](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return a.call(this);var s=e.camelCase(["scroll",o].join("-"));this.$element.one("bsTransitionEnd",e.proxy(a,this)).emulateTransitionEnd(350)[o](this.$element[0][s])}}},n.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=e.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};if(!e.support.transition)return i.call(this);this.$element[n](0).one("bsTransitionEnd",e.proxy(i,this)).emulateTransitionEnd(350)}}},n.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var i=e.fn.collapse;e.fn.collapse=t,e.fn.collapse.Constructor=n,e.fn.collapse.noConflict=function(){return e.fn.collapse=i,this},e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(n){var i,r=e(this),o=r.attr("data-target")||n.preventDefault()||(i=r.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""),a=e(o),s=a.data("bs.collapse"),l=s?"toggle":r.data(),c=r.attr("data-parent"),u=c&&e(c);s&&s.transitioning||(u&&u.find('[data-toggle="collapse"][data-parent="'+c+'"]').not(r).addClass("collapsed"),r[a.hasClass("in")?"addClass":"removeClass"]("collapsed")),t.call(a,l)})}(jQuery),function(e){"use strict";function t(t){t&&3===t.which||(e(r).remove(),e(o).each(function(){var i=n(e(this)),r={relatedTarget:this};i.hasClass("open")&&(i.trigger(t=e.Event("hide.bs.dropdown",r)),t.isDefaultPrevented()||i.removeClass("open").trigger("hidden.bs.dropdown",r))}))}function n(t){var n=t.attr("data-target");n||(n=t.attr("href"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i=n&&e(n);return i&&i.length?i:t.parent()}function i(t){return this.each(function(){var n=e(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new a(this)),"string"==typeof t&&i[t].call(n)})}var r=".dropdown-backdrop",o='[data-toggle="dropdown"]',a=function(t){e(t).on("click.bs.dropdown",this.toggle)};a.VERSION="3.2.0",a.prototype.toggle=function(i){var r=e(this);if(!r.is(".disabled, :disabled")){var o=n(r),a=o.hasClass("open");if(t(),!a){"ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&e('<div class="dropdown-backdrop"/>').insertAfter(e(this)).on("click",t);var s={relatedTarget:this};if(o.trigger(i=e.Event("show.bs.dropdown",s)),i.isDefaultPrevented())return;r.trigger("focus"),o.toggleClass("open").trigger("shown.bs.dropdown",s)}return!1}},a.prototype.keydown=function(t){if(/(38|40|27)/.test(t.keyCode)){var i=e(this);if(t.preventDefault(),t.stopPropagation(),!i.is(".disabled, :disabled")){var r=n(i),a=r.hasClass("open");if(!a||a&&27==t.keyCode)return 27==t.which&&r.find(o).trigger("focus"),i.trigger("click");var s=" li:not(.divider):visible a",l=r.find('[role="menu"]'+s+', [role="listbox"]'+s);if(l.length){var c=l.index(l.filter(":focus"));38==t.keyCode&&c>0&&c--,40==t.keyCode&&c<l.length-1&&c++,~c||(c=0),l.eq(c).trigger("focus")}}}};var s=e.fn.dropdown;e.fn.dropdown=i,e.fn.dropdown.Constructor=a,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=s,this},e(document).on("click.bs.dropdown.data-api",t).on("click.bs.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.bs.dropdown.data-api",o,a.prototype.toggle).on("keydown.bs.dropdown.data-api",o+', [role="menu"], [role="listbox"]',a.prototype.keydown)}(jQuery),function(e){"use strict";function t(t,i){return this.each(function(){var r=e(this),o=r.data("bs.modal"),a=e.extend({},n.DEFAULTS,r.data(),"object"==typeof t&&t);o||r.data("bs.modal",o=new n(this,a)),"string"==typeof t?o[t](i):a.show&&o.show(i)})}var n=function(t,n){this.options=n,this.$body=e(document.body),this.$element=e(t),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,e.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};n.VERSION="3.2.0",n.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},n.prototype.toggle=function(e){return this.isShown?this.hide():this.show(e)},n.prototype.show=function(t){var n=this,i=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(i),this.isShown||i.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.$body.addClass("modal-open"),this.setScrollbar(),this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',e.proxy(this.hide,this)),this.backdrop(function(){var i=e.support.transition&&n.$element.hasClass("fade");n.$element.parent().length||n.$element.appendTo(n.$body),n.$element.show().scrollTop(0),i&&n.$element[0].offsetWidth,n.$element.addClass("in").attr("aria-hidden",!1),n.enforceFocus();var r=e.Event("shown.bs.modal",{relatedTarget:t});i?n.$element.find(".modal-dialog").one("bsTransitionEnd",function(){n.$element.trigger("focus").trigger(r)}).emulateTransitionEnd(300):n.$element.trigger("focus").trigger(r)}))},n.prototype.hide=function(t){t&&t.preventDefault(),t=e.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.$body.removeClass("modal-open"),this.resetScrollbar(),this.escape(),e(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),e.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",e.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},n.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy(function(e){this.$element[0]===e.target||this.$element.has(e.target).length||this.$element.trigger("focus")},this))},n.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",e.proxy(function(e){27==e.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},n.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){e.$element.trigger("hidden.bs.modal")})},n.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},n.prototype.backdrop=function(t){var n=this,i=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var r=e.support.transition&&i;if(this.$backdrop=e('<div class="modal-backdrop '+i+'" />').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",e.proxy(function(e){e.target===e.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;r?this.$backdrop.one("bsTransitionEnd",t).emulateTransitionEnd(150):t()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var o=function(){n.removeBackdrop(),t&&t()};e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",o).emulateTransitionEnd(150):o()}else t&&t()},n.prototype.checkScrollbar=function(){document.body.clientWidth>=window.innerWidth||(this.scrollbarWidth=this.scrollbarWidth||this.measureScrollbar())},n.prototype.setScrollbar=function(){var e=parseInt(this.$body.css("padding-right")||0,10);this.scrollbarWidth&&this.$body.css("padding-right",e+this.scrollbarWidth)},n.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},n.prototype.measureScrollbar=function(){var e=document.createElement("div");e.className="modal-scrollbar-measure",this.$body.append(e);var t=e.offsetWidth-e.clientWidth;return this.$body[0].removeChild(e),t};var i=e.fn.modal;e.fn.modal=t,e.fn.modal.Constructor=n,e.fn.modal.noConflict=function(){return e.fn.modal=i,this},e(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(n){var i=e(this),r=i.attr("href"),o=e(i.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),a=o.data("bs.modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},o.data(),i.data());i.is("a")&&n.preventDefault(),o.one("show.bs.modal",function(e){e.isDefaultPrevented()||o.one("hidden.bs.modal",function(){i.is(":visible")&&i.trigger("focus")})}),t.call(o,a,this)})}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.tooltip"),o="object"==typeof t&&t;(r||"destroy"!=t)&&(r||i.data("bs.tooltip",r=new n(this,o)),"string"==typeof t&&r[t]())})}var n=function(e,t){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",e,t)};n.VERSION="3.2.0",n.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},n.prototype.init=function(t,n,i){this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&e(this.options.viewport.selector||this.options.viewport);for(var r=this.options.trigger.split(" "),o=r.length;o--;){var a=r[o];if("click"==a)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=a){var s="hover"==a?"mouseenter":"focusin",l="hover"==a?"mouseleave":"focusout";this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.getOptions=function(t){return t=e.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},n.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,function(e,i){n[e]!=i&&(t[e]=i)}),t},n.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),clearTimeout(n.timeout),n.hoverState="in",!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)},n.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),clearTimeout(n.timeout),n.hoverState="out",!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)},n.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var n=e.contains(document.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!n)return;var i=this,r=this.tip(),o=this.getUID(this.type);this.setContent(),r.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&r.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,l=s.test(a);l&&(a=a.replace(s,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element);var c=this.getPosition(),u=r[0].offsetWidth,d=r[0].offsetHeight;if(l){var f=a,h=this.$element.parent(),p=this.getPosition(h);a="bottom"==a&&c.top+c.height+d-p.scroll>p.height?"top":"top"==a&&c.top-p.scroll-d<0?"bottom":"right"==a&&c.right+u>p.width?"left":"left"==a&&c.left-u<p.left?"right":a,r.removeClass(f).addClass(a)}var g=this.getCalculatedOffset(a,c,u,d);this.applyPlacement(g,a);var m=function(){i.$element.trigger("shown.bs."+i.type),i.hoverState=null};e.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",m).emulateTransitionEnd(150):m()}},n.prototype.applyPlacement=function(t,n){var i=this.tip(),r=i[0].offsetWidth,o=i[0].offsetHeight,a=parseInt(i.css("margin-top"),10),s=parseInt(i.css("margin-left"),10);isNaN(a)&&(a=0),isNaN(s)&&(s=0),t.top=t.top+a,t.left=t.left+s,e.offset.setOffset(i[0],e.extend({using:function(e){i.css({top:Math.round(e.top),left:Math.round(e.left)})}},t),0),i.addClass("in");var l=i[0].offsetWidth,c=i[0].offsetHeight;"top"==n&&c!=o&&(t.top=t.top+o-c);var u=this.getViewportAdjustedDelta(n,t,l,c);u.left?t.left+=u.left:t.top+=u.top;var d=u.left?2*u.left-r+l:2*u.top-o+c,f=u.left?"left":"top",h=u.left?"offsetWidth":"offsetHeight";i.offset(t),this.replaceArrow(d,i[0][h],f)},n.prototype.replaceArrow=function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},n.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},n.prototype.hide=function(){function t(){"in"!=n.hoverState&&i.detach(),n.$element.trigger("hidden.bs."+n.type)}var n=this,i=this.tip(),r=e.Event("hide.bs."+this.type);if(this.$element.removeAttr("aria-describedby"),this.$element.trigger(r),!r.isDefaultPrevented())return i.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?i.one("bsTransitionEnd",t).emulateTransitionEnd(150):t(),this.hoverState=null,this},n.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||"string"!=typeof e.attr("data-original-title"))&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},n.prototype.hasContent=function(){return this.getTitle()},n.prototype.getPosition=function(t){t=t||this.$element;var n=t[0],i="BODY"==n.tagName;return e.extend({},"function"==typeof n.getBoundingClientRect?n.getBoundingClientRect():null,{scroll:i?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop(),width:i?e(window).width():t.outerWidth(),height:i?e(window).height():t.outerHeight()},i?{top:0,left:0}:t.offset())},n.prototype.getCalculatedOffset=function(e,t,n,i){return"bottom"==e?{top:t.top+t.height,left:t.left+t.width/2-n/2}:"top"==e?{top:t.top-i,left:t.left+t.width/2-n/2}:"left"==e?{top:t.top+t.height/2-i/2,left:t.left-n}:{top:t.top+t.height/2-i/2,left:t.left+t.width}},n.prototype.getViewportAdjustedDelta=function(e,t,n,i){var r={top:0,left:0};if(!this.$viewport)return r;var o=this.options.viewport&&this.options.viewport.padding||0,a=this.getPosition(this.$viewport);if(/right|left/.test(e)){var s=t.top-o-a.scroll,l=t.top+o-a.scroll+i;s<a.top?r.top=a.top-s:l>a.top+a.height&&(r.top=a.top+a.height-l)}else{var c=t.left-o,u=t.left+o+n;c<a.left?r.left=a.left-c:u>a.width&&(r.left=a.left+a.width-u)}return r},n.prototype.getTitle=function(){var e=this.$element,t=this.options;return e.attr("data-original-title")||("function"==typeof t.title?t.title.call(e[0]):t.title)},n.prototype.getUID=function(e){do{e+=~~(1e6*Math.random())}while(document.getElementById(e));return e},n.prototype.tip=function(){return this.$tip=this.$tip||e(this.options.template)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},n.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},n.prototype.enable=function(){this.enabled=!0},n.prototype.disable=function(){this.enabled=!1},n.prototype.toggleEnabled=function(){this.enabled=!this.enabled},n.prototype.toggle=function(t){var n=this;t&&((n=e(t.currentTarget).data("bs."+this.type))||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n))),n.tip().hasClass("in")?n.leave(n):n.enter(n)},n.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var i=e.fn.tooltip;e.fn.tooltip=t,e.fn.tooltip.Constructor=n,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=i,this}}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.popover"),o="object"==typeof t&&t;(r||"destroy"!=t)&&(r||i.data("bs.popover",r=new n(this,o)),"string"==typeof t&&r[t]())})}var n=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");n.VERSION="3.2.0",n.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),n.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),n.prototype.constructor=n,n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content").empty()[this.options.html?"string"==typeof n?"html":"append":"text"](n),e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},n.prototype.tip=function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip};var i=e.fn.popover;e.fn.popover=t,e.fn.popover.Constructor=n,e.fn.popover.noConflict=function(){return e.fn.popover=i,this}}(jQuery),function(e){"use strict";function t(n,i){var r=e.proxy(this.process,this);this.$body=e("body"),this.$scrollElement=e(e(n).is("body")?window:n),this.options=e.extend({},t.DEFAULTS,i),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",r),this.refresh(),this.process()}function n(n){return this.each(function(){var i=e(this),r=i.data("bs.scrollspy"),o="object"==typeof n&&n;r||i.data("bs.scrollspy",r=new t(this,o)),"string"==typeof n&&r[n]()})}t.VERSION="3.2.0",t.DEFAULTS={offset:10},t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},t.prototype.refresh=function(){var t="offset",n=0;e.isWindow(this.$scrollElement[0])||(t="position",n=this.$scrollElement.scrollTop()),this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight();var i=this;this.$body.find(this.selector).map(function(){var i=e(this),r=i.data("target")||i.attr("href"),o=/^#./.test(r)&&e(r);return o&&o.length&&o.is(":visible")&&[[o[t]().top+n,r]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){i.offsets.push(this[0]),i.targets.push(this[1])})},t.prototype.process=function(){var e,t=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),i=this.options.offset+n-this.$scrollElement.height(),r=this.offsets,o=this.targets,a=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),t>=i)return a!=(e=o[o.length-1])&&this.activate(e);if(a&&t<=r[0])return a!=(e=o[0])&&this.activate(e);for(e=r.length;e--;)a!=o[e]&&t>=r[e]&&(!r[e+1]||t<=r[e+1])&&this.activate(o[e])},
-t.prototype.activate=function(t){this.activeTarget=t,e(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var n=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=e(n).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")};var i=e.fn.scrollspy;e.fn.scrollspy=n,e.fn.scrollspy.Constructor=t,e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=i,this},e(window).on("load.bs.scrollspy.data-api",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);n.call(t,t.data())})})}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.tab");r||i.data("bs.tab",r=new n(this)),"string"==typeof t&&r[t]()})}var n=function(t){this.element=e(t)};n.VERSION="3.2.0",n.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),i=t.data("target");if(i||(i=t.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var r=n.find(".active:last a")[0],o=e.Event("show.bs.tab",{relatedTarget:r});if(t.trigger(o),!o.isDefaultPrevented()){var a=e(i);this.activate(t.closest("li"),n),this.activate(a,a.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:r})})}}},n.prototype.activate=function(t,n,i){function r(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),a?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),i&&i()}var o=n.find("> .active"),a=i&&e.support.transition&&o.hasClass("fade");a?o.one("bsTransitionEnd",r).emulateTransitionEnd(150):r(),o.removeClass("in")};var i=e.fn.tab;e.fn.tab=t,e.fn.tab.Constructor=n,e.fn.tab.noConflict=function(){return e.fn.tab=i,this},e(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(n){n.preventDefault(),t.call(e(this),"show")})}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.affix"),o="object"==typeof t&&t;r||i.data("bs.affix",r=new n(this,o)),"string"==typeof t&&r[t]()})}var n=function(t,i){this.options=e.extend({},n.DEFAULTS,i),this.$target=e(this.options.target).on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(t),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.2.0",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var e=this.$target.scrollTop(),t=this.$element.offset();return this.pinnedOffset=t.top-e},n.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t=e(document).height(),i=this.$target.scrollTop(),r=this.$element.offset(),o=this.options.offset,a=o.top,s=o.bottom;"object"!=typeof o&&(s=a=o),"function"==typeof a&&(a=o.top(this.$element)),"function"==typeof s&&(s=o.bottom(this.$element));var l=!(null!=this.unpin&&i+this.unpin<=r.top)&&(null!=s&&r.top+this.$element.height()>=t-s?"bottom":null!=a&&i<=a&&"top");if(this.affixed!==l){null!=this.unpin&&this.$element.css("top","");var c="affix"+(l?"-"+l:""),u=e.Event(c+".bs.affix");this.$element.trigger(u),u.isDefaultPrevented()||(this.affixed=l,this.unpin="bottom"==l?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(c).trigger(e.Event(c.replace("affix","affixed"))),"bottom"==l&&this.$element.offset({top:t-this.$element.height()-s}))}}};var i=e.fn.affix;e.fn.affix=t,e.fn.affix.Constructor=n,e.fn.affix.noConflict=function(){return e.fn.affix=i,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var n=e(this),i=n.data();i.offset=i.offset||{},i.offsetBottom&&(i.offset.bottom=i.offsetBottom),i.offsetTop&&(i.offset.top=i.offsetTop),t.call(n,i)})})}(jQuery),function(e,t,n){"use strict";function i(e,t){return t=t||Error,function(){var n,i,r=arguments[0],o="["+(e?e+":":"")+r+"] ",a=arguments[1],s=arguments;for(n=o+a.replace(/\{\d+\}/g,function(e){var t,n=+e.slice(1,-1);return n+2<s.length?(t=s[n+2],"function"==typeof t?t.toString().replace(/ ?\{[\s\S]*$/,""):void 0===t?"undefined":"string"!=typeof t?U(t):t):e}),n=n+"\nhttp://errors.angularjs.org/1.3.0/"+(e?e+"/":"")+r,i=2;i<arguments.length;i++)n=n+(2==i?"?":"&")+"p"+(i-2)+"="+encodeURIComponent(function(e){return"function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):void 0===e?"undefined":"string"!=typeof e?JSON.stringify(e):e}(arguments[i]));return new t(n)}}function r(e){if(null==e||S(e))return!1;var t=e.length;return!(e.nodeType!==ii||!t)||(b(e)||Zn(e)||0===t||"number"==typeof t&&t>0&&t-1 in e)}function o(e,t,n){var i,a;if(e)if(C(e))for(i in e)"prototype"==i||"length"==i||"name"==i||e.hasOwnProperty&&!e.hasOwnProperty(i)||t.call(n,e[i],i,e);else if(Zn(e)||r(e)){var s="object"!=typeof e;for(i=0,a=e.length;i<a;i++)(s||i in e)&&t.call(n,e[i],i,e)}else if(e.forEach&&e.forEach!==o)e.forEach(t,n,e);else for(i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e);return e}function a(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t.sort()}function s(e,t,n){for(var i=a(e),r=0;r<i.length;r++)t.call(n,e[i[r]],i[r]);return i}function l(e){return function(t,n){e(n,t)}}function c(){return++Gn}function u(e,t){t?e.$$hashKey=t:delete e.$$hashKey}function d(e){for(var t=e.$$hashKey,n=1,i=arguments.length;n<i;n++){var r=arguments[n];if(r)for(var o=Object.keys(r),a=0,s=o.length;a<s;a++){var l=o[a];e[l]=r[l]}}return u(e,t),e}function f(e){return parseInt(e,10)}function h(e,t){return d(new(d(function(){},{prototype:e})),t)}function p(){}function g(e){return e}function m(e){return function(){return e}}function v(e){return void 0===e}function $(e){return void 0!==e}function y(e){return null!==e&&"object"==typeof e}function b(e){return"string"==typeof e}function w(e){return"number"==typeof e}function x(e){return"[object Date]"===zn.call(e)}function C(e){return"function"==typeof e}function k(e){return"[object RegExp]"===zn.call(e)}function S(e){return e&&e.window===e}function E(e){return e&&e.$evalAsync&&e.$watch}function T(e){return"[object File]"===zn.call(e)}function D(e){return"[object Blob]"===zn.call(e)}function A(e){return"boolean"==typeof e}function M(e){return e&&C(e.then)}function O(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function I(e){var t,n={},i=e.split(",");for(t=0;t<i.length;t++)n[i[t]]=!0;return n}function P(e){return Nn(e.nodeName||e[0].nodeName)}function N(e,t){var n=e.indexOf(t);return n>=0&&e.splice(n,1),t}function j(e,t,n,i){if(S(e)||E(e))throw Yn("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");if(t){if(e===t)throw Yn("cpi","Can't copy! Source and destination are identical.");if(n=n||[],i=i||[],y(e)){var r=n.indexOf(e);if(-1!==r)return i[r];n.push(e),i.push(t)}var a;if(Zn(e)){t.length=0;for(var s=0;s<e.length;s++)a=j(e[s],null,n,i),y(e[s])&&(n.push(e[s]),i.push(a)),t.push(a)}else{var l=t.$$hashKey;Zn(t)?t.length=0:o(t,function(e,n){delete t[n]});for(var c in e)e.hasOwnProperty(c)&&(a=j(e[c],null,n,i),y(e[c])&&(n.push(e[c]),i.push(a)),t[c]=a);u(t,l)}}else if(t=e,e)if(Zn(e))t=j(e,[],n,i);else if(x(e))t=new Date(e.getTime());else if(k(e))t=new RegExp(e.source,e.toString().match(/[^\/]*$/)[0]),t.lastIndex=e.lastIndex;else if(y(e)){var d=Object.create(Object.getPrototypeOf(e));t=j(e,d,n,i)}return t}function F(e,t){if(Zn(e)){t=t||[];for(var n=0,i=e.length;n<i;n++)t[n]=e[n]}else if(y(e)){t=t||{};for(var r in e)"$"===r.charAt(0)&&"$"===r.charAt(1)||(t[r]=e[r])}return t||e}function L(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!==e&&t!==t)return!0;var i,r,o,a=typeof e,s=typeof t;if(a==s&&"object"==a){if(!Zn(e)){if(x(e))return!!x(t)&&L(e.getTime(),t.getTime());if(k(e)&&k(t))return e.toString()==t.toString();if(E(e)||E(t)||S(e)||S(t)||Zn(t))return!1;o={};for(r in e)if("$"!==r.charAt(0)&&!C(e[r])){if(!L(e[r],t[r]))return!1;o[r]=!0}for(r in t)if(!o.hasOwnProperty(r)&&"$"!==r.charAt(0)&&t[r]!==n&&!C(t[r]))return!1;return!0}if(!Zn(t))return!1;if((i=e.length)==t.length){for(r=0;r<i;r++)if(!L(e[r],t[r]))return!1;return!0}}return!1}function R(e,t,n){return e.concat(_n.call(t,n))}function V(e,t){return _n.call(e,t||0)}function H(e,t){var n=arguments.length>2?V(arguments,2):[];return!C(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,n.concat(_n.call(arguments,0))):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function q(e,i){var r=i;return"string"==typeof e&&"$"===e.charAt(0)&&"$"===e.charAt(1)?r=n:S(i)?r="$WINDOW":i&&t===i?r="$DOCUMENT":E(i)&&(r="$SCOPE"),r}function U(e,t){return void 0===e?n:JSON.stringify(e,q,t?" ":null)}function _(e){return b(e)?JSON.parse(e):e}function B(e){e=Hn(e).clone();try{e.empty()}catch(e){}var t=Hn("<div>").append(e).html();try{return e[0].nodeType===ri?Nn(t):t.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+Nn(t)})}catch(e){return Nn(t)}}function W(e){try{return decodeURIComponent(e)}catch(e){}}function z(e){var t,n,i={};return o((e||"").split("&"),function(e){if(e&&(t=e.replace(/\+/g,"%20").split("="),n=W(t[0]),$(n))){var r=!$(t[1])||W(t[1]);jn.call(i,n)?Zn(i[n])?i[n].push(r):i[n]=[i[n],r]:i[n]=r}}),i}function Y(e){var t=[];return o(e,function(e,n){Zn(e)?o(e,function(e){t.push(G(n,!0)+(!0===e?"":"="+G(e,!0)))}):t.push(G(n,!0)+(!0===e?"":"="+G(e,!0)))}),t.length?t.join("&"):""}function K(e){return G(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function G(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,t?"%20":"+")}function X(e,t){var n,i,r=ei.length;for(e=Hn(e),i=0;i<r;++i)if(n=ei[i]+t,b(n=e.attr(n)))return n;return null}function Z(e,t){var n,i,r={};o(ei,function(t){var r=t+"app";!n&&e.hasAttribute&&e.hasAttribute(r)&&(n=e,i=e.getAttribute(r))}),o(ei,function(t){var r,o=t+"app";!n&&(r=e.querySelector("["+o.replace(":","\\:")+"]"))&&(n=r,i=r.getAttribute(o))}),n&&(r.strictDi=null!==X(n,"strict-di"),t(n,i?[i]:[],r))}function J(n,i,r){y(r)||(r={}),r=d({strictDi:!1},r);var a=function(){if(n=Hn(n),n.injector()){var e=n[0]===t?"document":B(n);throw Yn("btstrpd","App Already Bootstrapped with this Element '{0}'",e.replace(/</,"&lt;").replace(/>/,"&gt;"))}i=i||[],i.unshift(["$provide",function(e){e.value("$rootElement",n)}]),r.debugInfoEnabled&&i.push(["$compileProvider",function(e){e.debugInfoEnabled(!0)}]),i.unshift("ng");var o=Re(i,r.strictDi);return o.invoke(["$rootScope","$rootElement","$compile","$injector",function(e,t,n,i){e.$apply(function(){t.data("$injector",i),n(t)(e)})}]),o},s=/^NG_ENABLE_DEBUG_INFO!/,l=/^NG_DEFER_BOOTSTRAP!/;if(e&&s.test(e.name)&&(r.debugInfoEnabled=!0,e.name=e.name.replace(s,"")),e&&!l.test(e.name))return a();e.name=e.name.replace(l,""),Kn.resumeBootstrap=function(e){o(e,function(e){i.push(e)}),a()}}function Q(){e.name="NG_ENABLE_DEBUG_INFO!"+e.name,e.location.reload()}function ee(e){return Kn.element(e).injector().get("$$testability")}function te(e,t){return t=t||"_",e.replace(ti,function(e,n){return(n?t:"")+e.toLowerCase()})}function ne(e,t,n){if(!e)throw Yn("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function ie(e,t,n){return n&&Zn(e)&&(e=e[e.length-1]),ne(C(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function re(e,t){if("hasOwnProperty"===e)throw Yn("badname","hasOwnProperty is not a valid {0} name",t)}function oe(e,t,n){if(!t)return e;for(var i,r=t.split("."),o=e,a=r.length,s=0;s<a;s++)i=r[s],e&&(e=(o=e)[i]);return!n&&C(e)?H(o,e):e}function ae(e){var t=e[0],n=e[e.length-1],i=[t];do{if(!(t=t.nextSibling))break;i.push(t)}while(t!==n);return Hn(i)}function se(){return Object.create(null)}function le(e){function t(e,t,n){return e[t]||(e[t]=n())}var n=i("$injector"),r=i("ng"),o=t(e,"angular",Object);return o.$$minErr=o.$$minErr||i,t(o,"module",function(){var e={};return function(i,o,a){return function(e,t){if("hasOwnProperty"===e)throw r("badname","hasOwnProperty is not a valid {0} name",t)}(i,"module"),o&&e.hasOwnProperty(i)&&(e[i]=null),t(e,i,function(){function e(e,n,i,r){return r||(r=t),function(){return r[i||"push"]([e,n,arguments]),c}}if(!o)throw n("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",i);var t=[],r=[],s=[],l=e("$injector","invoke","push",r),c={_invokeQueue:t,_configBlocks:r,_runBlocks:s,requires:o,name:i,provider:e("$provide","provider"),factory:e("$provide","factory"),service:e("$provide","service"),value:e("$provide","value"),constant:e("$provide","constant","unshift"),animation:e("$animateProvider","register"),filter:e("$filterProvider","register"),controller:e("$controllerProvider","register"),directive:e("$compileProvider","directive"),config:l,run:function(e){return s.push(e),this}};return a&&l(a),c})}})}function ce(){return++ui}function ue(e){return e.replace(hi,function(e,t,n,i){return i?n.toUpperCase():n}).replace(pi,"Moz$1")}function de(e){return!$i.test(e)}function fe(e){var t=e.nodeType;return t===ii||!t||t===ai}function he(e,t){var n,i,r,a,s=t.createDocumentFragment(),l=[];if(de(e))l.push(t.createTextNode(e));else{for(n=n||s.appendChild(t.createElement("div")),i=(yi.exec(e)||["",""])[1].toLowerCase(),r=wi[i]||wi._default,n.innerHTML=r[1]+e.replace(bi,"<$1></$2>")+r[2],a=r[0];a--;)n=n.lastChild;l=R(l,n.childNodes),n=s.firstChild,n.textContent=""}return s.textContent="",s.innerHTML="",o(l,function(e){s.appendChild(e)}),s}function pe(e,n){n=n||t;var i;return(i=vi.exec(e))?[n.createElement(i[1])]:(i=he(e,n))?i.childNodes:[]}function ge(e){if(e instanceof ge)return e;var t;if(b(e)&&(e=Jn(e),t=!0),!(this instanceof ge)){if(t&&"<"!=e.charAt(0))throw mi("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new ge(e)}t?Se(this,pe(e)):Se(this,e)}function me(e){return e.cloneNode(!0)}function ve(e,t){if(t||ye(e),e.querySelectorAll)for(var n=e.querySelectorAll("*"),i=0,r=n.length;i<r;i++)ye(n[i])}function $e(e,t,n,i){if($(i))throw mi("offargs","jqLite#off() does not support the `selector` argument");var r=be(e),a=r&&r.events,s=r&&r.handle;if(s)if(t)o(t.split(" "),function(t){if($(n)){var i=a[t];if(N(i||[],n),i&&i.length>0)return}fi(e,t,s),delete a[t]});else for(t in a)"$destroy"!==t&&fi(e,t,s),delete a[t]}function ye(e,t){var i=e.ng339,r=i&&ci[i];if(r){if(t)return void delete r.data[t];r.handle&&(r.events.$destroy&&r.handle({},"$destroy"),$e(e)),delete ci[i],e.ng339=n}}function be(e,t){var i=e.ng339,r=i&&ci[i];return t&&!r&&(e.ng339=i=ce(),r=ci[i]={events:{},data:{},handle:n}),r}function we(e,t,n){if(fe(e)){var i=$(n),r=!i&&t&&!y(t),o=!t,a=be(e,!r),s=a&&a.data;if(i)s[t]=n;else{if(o)return s;if(r)return s&&s[t];d(s,t)}}}function xe(e,t){return!!e.getAttribute&&(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1}function Ce(e,t){t&&e.setAttribute&&o(t.split(" "),function(t){e.setAttribute("class",Jn((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Jn(t)+" "," ")))})}function ke(e,t){if(t&&e.setAttribute){var n=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");o(t.split(" "),function(e){e=Jn(e),-1===n.indexOf(" "+e+" ")&&(n+=e+" ")}),e.setAttribute("class",Jn(n))}}function Se(e,t){if(t)if(t.nodeType)e[e.length++]=t;else{var n=t.length;if("number"==typeof n&&t.window!==t){if(n)for(var i=0;i<n;i++)e[e.length++]=t[i]}else e[e.length++]=t}}function Ee(e,t){return Te(e,"$"+(t||"ngController")+"Controller")}function Te(e,t,i){e.nodeType==ai&&(e=e.documentElement);for(var r=Zn(t)?t:[t];e;){for(var o=0,a=r.length;o<a;o++)if((i=Hn.data(e,r[o]))!==n)return i;e=e.parentNode||e.nodeType===si&&e.host}}function De(e){for(ve(e,!0);e.firstChild;)e.removeChild(e.firstChild)}function Ae(e,t){t||ve(e);var n=e.parentNode;n&&n.removeChild(e)}function Me(t,n){n=n||e,"complete"===n.document.readyState?n.setTimeout(t):Hn(n).on("load",t)}function Oe(e,t){var n=Ci[t.toLowerCase()];return n&&ki[P(e)]&&n}function Ie(e,t){var n=e.nodeName;return("INPUT"===n||"TEXTAREA"===n)&&Si[t]}function Pe(e,t){var n=function(n,i){n.isDefaultPrevented=function(){return n.defaultPrevented};var r=t[i||n.type],o=r?r.length:0;if(o){if(v(n.immediatePropagationStopped)){var a=n.stopImmediatePropagation;n.stopImmediatePropagation=function(){n.immediatePropagationStopped=!0,n.stopPropagation&&n.stopPropagation(),a&&a.call(n)}}n.isImmediatePropagationStopped=function(){return!0===n.immediatePropagationStopped},o>1&&(r=F(r));for(var s=0;s<o;s++)n.isImmediatePropagationStopped()||r[s].call(e,n)}};return n.elem=e,n}function Ne(e,t){var n=e&&e.$$hashKey;if(n)return"function"==typeof n&&(n=e.$$hashKey()),n;var i=typeof e;return n="function"==i||"object"==i&&null!==e?e.$$hashKey=i+":"+(t||c)():i+":"+e}function je(e,t){if(t){var n=0;this.nextUid=function(){return++n}}o(e,this.put,this)}function Fe(e){var t=e.toString().replace(Ai,""),n=t.match(Ei);return n?"function("+(n[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function Le(e,t,n){var i,r,a,s;if("function"==typeof e){if(!(i=e.$inject)){if(i=[],e.length){if(t)throw b(n)&&n||(n=e.name||Fe(e)),Mi("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n);r=e.toString().replace(Ai,""),a=r.match(Ei),o(a[1].split(Ti),function(e){e.replace(Di,function(e,t,n){i.push(n)})})}e.$inject=i}}else Zn(e)?(s=e.length-1,ie(e[s],"fn"),i=e.slice(0,s)):ie(e,"fn",!0);return i}function Re(e,t){function i(e){return function(t,n){if(!y(t))return e(t,n);o(t,l(e))}}function r(e,t){if(re(e,"service"),(C(t)||Zn(t))&&(t=E.instantiate(t)),!t.$get)throw Mi("pget","Provider '{0}' must define $get factory method.",e);return S[e+w]=t}function a(e,t){return function(){var i=D.invoke(t,this,n,e);if(v(i))throw Mi("undef","Provider '{0}' must return a value from $get factory method.",e);return i}}function s(e,t,n){return r(e,{$get:!1!==n?a(e,t):t})}function c(e,t){return s(e,["$injector",function(e){return e.instantiate(t)}])}function u(e,t){return s(e,m(t),!1)}function d(e,t){re(e,"constant"),S[e]=t,T[e]=t}function f(e,t){var n=E.get(e+w),i=n.$get;n.$get=function(){var e=D.invoke(i,n);return D.invoke(t,null,{$delegate:e})}}function h(e){var t,n=[];return o(e,function(e){function i(e){var t,n;for(t=0,n=e.length;t<n;t++){var i=e[t],r=E.get(i[0]);r[i[1]].apply(r,i[2])}}if(!k.get(e)){k.put(e,!0);try{b(e)?(t=Un(e),n=n.concat(h(t.requires)).concat(t._runBlocks),i(t._invokeQueue),i(t._configBlocks)):C(e)?n.push(E.invoke(e)):Zn(e)?n.push(E.invoke(e)):ie(e,"module")}catch(t){throw Zn(e)&&(e=e[e.length-1]),t.message&&t.stack&&-1==t.stack.indexOf(t.message)&&(t=t.message+"\n"+t.stack),Mi("modulerr","Failed to instantiate module {0} due to:\n{1}",e,t.stack||t.message||t)}}}),n}function g(e,n){function i(t){if(e.hasOwnProperty(t)){if(e[t]===$)throw Mi("cdep","Circular dependency found: {0}",t+" <- "+x.join(" <- "));return e[t]}try{return x.unshift(t),e[t]=$,e[t]=n(t)}catch(n){throw e[t]===$&&delete e[t],n}finally{x.shift()}}function r(e,n,r,o){"string"==typeof r&&(o=r,r=null);var a,s,l,c=[],u=Le(e,t,o);for(s=0,a=u.length;s<a;s++){if("string"!=typeof(l=u[s]))throw Mi("itkn","Incorrect injection token! Expected service name as string, got {0}",l);c.push(r&&r.hasOwnProperty(l)?r[l]:i(l))}return Zn(e)&&(e=e[a]),e.apply(n,c)}function o(e,t,n){var i,o,a=function(){};return a.prototype=(Zn(e)?e[e.length-1]:e).prototype,i=new a,o=r(e,i,t,n),y(o)||C(o)?o:i}return{invoke:r,instantiate:o,get:i,annotate:Le,has:function(t){return S.hasOwnProperty(t+w)||e.hasOwnProperty(t)}}}t=!0===t;var $={},w="Provider",x=[],k=new je([],!0),S={$provide:{provider:i(r),factory:i(s),service:i(c),value:i(u),constant:i(d),decorator:f}},E=S.$injector=g(S,function(){throw Mi("unpr","Unknown provider: {0}",x.join(" <- "))}),T={},D=T.$injector=g(T,function(e){var t=E.get(e+w);return D.invoke(t.$get,t,n,e)});return o(h(e),function(e){D.invoke(e||p)}),D}function Ve(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(t,n,i){function r(e){var t=null;return Array.prototype.some.call(e,function(e){if("a"===P(e))return t=e,!0}),t}function o(){var e=s.yOffset;if(C(e))e=e();else if(O(e)){var n=e[0],i=t.getComputedStyle(n);e="fixed"!==i.position?0:n.getBoundingClientRect().bottom}else w(e)||(e=0);return e}function a(e){if(e){e.scrollIntoView();var n=o();if(n){var i=e.getBoundingClientRect().top;t.scrollBy(0,i-n)}}else t.scrollTo(0,0)}function s(){var e,t=n.hash();t?(e=l.getElementById(t))?a(e):(e=r(l.getElementsByName(t)))?a(e):"top"===t&&a(null):a(null)}var l=t.document;return e&&i.$watch(function(){return n.hash()},function(e,t){e===t&&""===e||Me(function(){i.$evalAsync(s)})}),s}]}function He(){this.$get=["$$rAF","$timeout",function(e,t){return e.supported?function(t){return e(t)}:function(e){return t(e,0,!1)}}]}function qe(e,t,i,r){function a(e){try{e.apply(null,V(arguments,1))}finally{if(0===--x)for(;C.length;)try{C.pop()()}catch(e){i.error(e)}}}function s(e,t){!function n(){o(S,function(e){e()}),k=t(n,e)}()}function l(){c(),u()}function c(){E=e.history.state,E=v(E)?null:E,L(E,P)&&(E=P),P=E}function u(){D===f.url()&&T===E||(D=f.url(),T=E,o(O,function(e){e(f.url(),E)}))}function d(e){try{return decodeURIComponent(e)}catch(t){return e}}var f=this,h=t[0],g=e.location,m=e.history,$=e.setTimeout,y=e.clearTimeout,w={};f.isMock=!1;var x=0,C=[];f.$$completeOutstandingRequest=a,f.$$incOutstandingRequestCount=function(){x++},f.notifyWhenNoOutstandingRequests=function(e){o(S,function(e){e()}),0===x?e():C.push(e)};var k,S=[];f.addPollFn=function(e){return v(k)&&s(100,$),S.push(e),e};var E,T,D=g.href,A=t.find("base"),M=null;c(),T=E,f.url=function(t,n,i){if(v(i)&&(i=null),g!==e.location&&(g=e.location),m!==e.history&&(m=e.history),t){var o=T===i;if(D===t&&(!r.history||o))return;var a=D&&ht(D)===ht(t);return D=t,T=i,!r.history||a&&o?(a||(M=t),n?g.replace(t):g.href=t):(m[n?"replaceState":"pushState"](i,"",t),c(),T=E),f}return M||g.href.replace(/%27/g,"'")},f.state=function(){return E};var O=[],I=!1,P=null;f.onUrlChange=function(t){return I||(r.history&&Hn(e).on("popstate",l),Hn(e).on("hashchange",l),I=!0),O.push(t),t},f.$$checkUrlChange=u,f.baseHref=function(){var e=A.attr("href");return e?e.replace(/^(https?\:)?\/\/[^\/]*/,""):""};var N={},j="",F=f.baseHref();f.cookies=function(e,t){var r,o,a,s,l;if(!e){if(h.cookie!==j)for(j=h.cookie,o=j.split("; "),N={},s=0;s<o.length;s++)a=o[s],(l=a.indexOf("="))>0&&(e=d(a.substring(0,l)),N[e]===n&&(N[e]=d(a.substring(l+1))));return N}t===n?h.cookie=encodeURIComponent(e)+"=;path="+F+";expires=Thu, 01 Jan 1970 00:00:00 GMT":b(t)&&(r=(h.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+";path="+F).length+1)>4096&&i.warn("Cookie '"+e+"' possibly not set or overflowed because it was too large ("+r+" > 4096 bytes)!")},f.defer=function(e,t){var n;return x++,n=$(function(){delete w[n],a(e)},t||0),w[n]=!0,n},f.defer.cancel=function(e){return!!w[e]&&(delete w[e],y(e),a(p),!0)}}function Ue(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,i){return new qe(e,i,t,n)}]}function _e(){this.$get=function(){function e(e,n){function r(e){e!=f&&(h?h==e&&(h=e.n):h=e,o(e.n,e.p),o(e,f),f=e,f.n=null)}function o(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}if(e in t)throw i("$cacheFactory")("iid","CacheId '{0}' is already taken!",e);var a=0,s=d({},n,{id:e}),l={},c=n&&n.capacity||Number.MAX_VALUE,u={},f=null,h=null;return t[e]={put:function(e,t){if(c<Number.MAX_VALUE){r(u[e]||(u[e]={key:e}))}if(!v(t))return e in l||a++,l[e]=t,a>c&&this.remove(h.key),t},get:function(e){if(c<Number.MAX_VALUE){var t=u[e];if(!t)return;r(t)}return l[e]},remove:function(e){if(c<Number.MAX_VALUE){var t=u[e];if(!t)return;t==f&&(f=t.p),t==h&&(h=t.n),o(t.n,t.p),delete u[e]}delete l[e],a--},removeAll:function(){l={},a=0,u={},f=h=null},destroy:function(){l=null,s=null,u=null,delete t[e]},info:function(){return d({},s,{size:a})}}}var t={};return e.info=function(){var e={};return o(t,function(t,n){e[n]=t.info()}),e},e.get=function(e){return t[e]},e}}function Be(){this.$get=["$cacheFactory",function(e){return e("templates")}]}function We(e,i){function r(e,t){var n=/^\s*([@=&])(\??)\s*(\w*)\s*$/,i={};return o(e,function(e,r){var o=e.match(n);if(!o)throw Pi("iscp","Invalid isolate scope definition for directive '{0}'. Definition: {... {1}: '{2}' ...}",t,r,e);i[r]={attrName:o[3]||r,mode:o[1],optional:"?"===o[2]}}),i}var a={},s="Directive",c=/^\s*directive\:\s*([\d\w_\-]+)\s+(.*)$/,u=/(([\d\w_\-]+)(?:\:([^;]+))?;?)/,f=I("ngSrc,ngSrcset,src,srcset"),v=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,w=/^(on[a-z]+|formaction)$/;this.directive=function t(n,i){return re(n,"directive"),b(n)?(ne(i,"directiveFactory"),a.hasOwnProperty(n)||(a[n]=[],e.factory(n+s,["$injector","$exceptionHandler",function(e,t){var i=[];return o(a[n],function(o,a){try{var s=e.invoke(o);C(s)?s={compile:m(s)}:!s.compile&&s.link&&(s.compile=m(s.link)),s.priority=s.priority||0,s.index=a,s.name=s.name||n,s.require=s.require||s.controller&&s.name,s.restrict=s.restrict||"EA",y(s.scope)&&(s.$$isolateBindings=r(s.scope,s.name)),i.push(s)}catch(e){t(e)}}),i}])),a[n].push(i)):o(n,l(t)),this},this.aHrefSanitizationWhitelist=function(e){return $(e)?(i.aHrefSanitizationWhitelist(e),this):i.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(e){return $(e)?(i.imgSrcSanitizationWhitelist(e),this):i.imgSrcSanitizationWhitelist()};var x=!0;this.debugInfoEnabled=function(e){return $(e)?(x=e,this):x},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(e,i,r,l,m,$,k,S,T,D,A){function M(e,t){try{e.addClass(t)}catch(e){}}function O(e,t,n,i,r){e instanceof Hn||(e=Hn(e)),o(e,function(t,n){t.nodeType==ri&&t.nodeValue.match(/\S+/)&&(e[n]=Hn(t).wrap("<span></span>").parent()[0])});var a=j(e,t,e,n,i,r);O.$$addScopeClass(e);var s=null;return function(t,n,i,r,o){ne(t,"scope"),s||(s=I(o));var l;if(l="html"!==s?Hn(J(s,Hn("<div>").append(e).html())):n?xi.clone.call(e):e,i)for(var c in i)l.data("$"+c+"Controller",i[c].instance);return O.$$addScopeInfo(l,t),n&&n(l,t),a&&a(t,l,l,r),l}}function I(e){var t=e&&e[0];return t&&"foreignobject"!==P(t)&&t.toString().match(/SVG/)?"svg":"html"}function j(e,t,i,r,o,a){function s(e,i,r,o){var a,s,l,c,u,d,f,h,m;if(p){var v=i.length;for(m=new Array(v),u=0;u<g.length;u+=3)f=g[u],m[f]=i[f]}else m=i;for(u=0,d=g.length;u<d;)l=m[g[u++]],a=g[u++],s=g[u++],a?(a.scope?(c=e.$new(),O.$$addScopeInfo(Hn(l),c)):c=e,h=a.transcludeOnThisElement?F(e,a.transclude,o,a.elementTranscludeOnThisElement):!a.templateOnThisElement&&o?o:!o&&t?F(e,t):null,a(s,c,l,r,h)):s&&s(e,l.childNodes,n,o)}for(var l,c,u,d,f,h,p,g=[],m=0;m<e.length;m++)l=new ae,c=R(e[m],[],l,0===m?r:n,o),u=c.length?U(c,e[m],l,t,i,null,[],[],a):null,u&&u.scope&&O.$$addScopeClass(l.$$element),f=u&&u.terminal||!(d=e[m].childNodes)||!d.length?null:j(d,u?(u.transcludeOnThisElement||!u.templateOnThisElement)&&u.transclude:t),(u||f)&&(g.push(m,u,f),h=!0,p=p||u),a=null;return h?s:null}function F(e,t,n,i){return function(i,r,o,a,s){return i||(i=e.$new(!1,s),i.$$transcluded=!0),t(i,r,o,n,a)}}function R(e,t,n,i,r){var o,a,s=e.nodeType,l=n.$attr;switch(s){case ii:W(t,ze(P(e)),"E",i,r);for(var d,f,h,p,g,m,v=e.attributes,$=0,y=v&&v.length;$<y;$++){var w=!1,x=!1;d=v[$],f=d.name,g=Jn(d.value),p=ze(f),(m=fe.test(p))&&(f=te(p.substr(6),"-"));var C=p.replace(/(Start|End)$/,"");z(C)&&p===C+"Start"&&(w=f,x=f.substr(0,f.length-5)+"end",f=f.substr(0,f.length-6)),h=ze(f.toLowerCase()),l[h]=f,!m&&n.hasOwnProperty(h)||(n[h]=g,Oe(e,h)&&(n[h]=!0)),ee(e,t,g,h,m),W(t,h,"A",i,r,w,x)}if(a=e.className,b(a)&&""!==a)for(;o=u.exec(a);)h=ze(o[2]),W(t,h,"C",i,r)&&(n[h]=Jn(o[3])),a=a.substr(o.index+o[0].length);break;case ri:Z(t,e.nodeValue);break;case oi:try{o=c.exec(e.nodeValue),o&&(h=ze(o[1]),W(t,h,"M",i,r)&&(n[h]=Jn(o[2])))}catch(e){}}return t.sort(G),t}function H(e,t,n){var i=[],r=0;if(t&&e.hasAttribute&&e.hasAttribute(t)){do{if(!e)throw Pi("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",t,n);e.nodeType==ii&&(e.hasAttribute(t)&&r++,e.hasAttribute(n)&&r--),i.push(e),e=e.nextSibling}while(r>0)}else i.push(e);return Hn(i)}function q(e,t,n){return function(i,r,o,a,s){return r=H(r[0],t,n),e(i,r,o,a,s)}}function U(e,a,s,l,c,u,d,f,h){function p(e,t,n,i){e&&(n&&(e=q(e,n,i)),e.require=S.require,e.directiveName=T,(N===S||S.$$isolateScope)&&(e=re(e,{isolateScope:!0})),d.push(e)),t&&(n&&(t=q(t,n,i)),t.require=S.require,t.directiveName=T,(N===S||S.$$isolateScope)&&(t=re(t,{isolateScope:!0})),f.push(t))}function g(e,t,n,i){var r,a,s="data",l=!1,c=n;if(b(t)){if(a=t.match(v),t=t.substring(a[0].length),a[3]&&(a[1]?a[3]=null:a[1]=a[3]),"^"===a[1]?s="inheritedData":"^^"===a[1]&&(s="inheritedData",c=n.parent()),"?"===a[2]&&(l=!0),r=null,i&&"data"===s&&(r=i[t])&&(r=r.instance),!(r=r||c[s]("$"+t+"Controller"))&&!l)throw Pi("ctreq","Controller '{0}', required by directive '{1}', can't be found!",t,e);return r}return Zn(t)&&(r=[],o(t,function(t){r.push(g(e,t,n,i))})),r}function w(e,t,r,l,c){function u(e,t,i){var r;return E(e)||(i=t,t=e,e=n),z&&(r=w),i||(i=z?C.parent():C),c(e,t,r,i,A)}var h,p,v,y,b,w,x,C,S;if(a===r?(S=s,C=s.$$element):(C=Hn(r),S=new ae(C,s)),N&&(b=t.$new(!0)),x=c&&u,P&&(k={},w={},o(P,function(e){var n,i={$scope:e===N||e.$$isolateScope?b:t,$element:C,$attrs:S,$transclude:x};y=e.controller,"@"==y&&(y=S[e.name]),n=$(y,i,!0,e.controllerAs),w[e.name]=n,z||C.data("$"+e.name+"Controller",n.instance),k[e.name]=n})),N){O.$$addScopeInfo(C,b,!0,!(j&&(j===N||j===N.$$originalDirective))),O.$$addScopeClass(C,!0);var T=k&&k[N.name],D=b;T&&T.identifier&&!0===N.bindToController&&(D=T.instance),o(b.$$isolateBindings=N.$$isolateBindings,function(e,n){var r,o,a,s,l=e.attrName,c=e.optional,u=e.mode;switch(u){case"@":S.$observe(l,function(e){D[n]=e}),S.$$observers[l].$$scope=t,S[l]&&(D[n]=i(S[l])(t));break;case"=":if(c&&!S[l])return;o=m(S[l]),s=o.literal?L:function(e,t){return e===t||e!==e&&t!==t},a=o.assign||function(){throw r=D[n]=o(t),Pi("nonassign","Expression '{0}' used with directive '{1}' is non-assignable!",S[l],N.name)},r=D[n]=o(t);var d=function(e){return s(e,D[n])||(s(e,r)?a(t,e=D[n]):D[n]=e),r=e};d.$stateful=!0;var f=t.$watch(m(S[l],d),null,o.literal);b.$on("$destroy",f);break;case"&":o=m(S[l]),D[n]=function(e){return o(t,e)}}})}for(k&&(o(k,function(e){e()}),k=null),h=0,p=d.length;h<p;h++)v=d[h],oe(v,v.isolateScope?b:t,C,S,v.require&&g(v.directiveName,v.require,C,w),x);var A=t;for(N&&(N.template||null===N.templateUrl)&&(A=b),e&&e(A,r.childNodes,n,c),h=f.length-1;h>=0;h--)v=f[h],oe(v,v.isolateScope?b:t,C,S,v.require&&g(v.directiveName,v.require,C,w),x)}h=h||{};for(var x,k,S,T,D,A,M,I=-Number.MAX_VALUE,P=h.controllerDirectives,N=h.newIsolateScopeDirective,j=h.templateDirective,F=h.nonTlbTranscludeDirective,U=!1,W=!1,z=h.hasElementTranscludeDirective,G=s.$$element=Hn(a),Z=u,Q=l,ee=0,te=e.length;ee<te;ee++){S=e[ee];var ne=S.$$start,se=S.$$end;if(ne&&(G=H(a,ne,se)),D=n,I>S.priority)break;if((M=S.scope)&&(S.templateUrl||(y(M)?(X("new/isolated scope",N||x,S,G),N=S):X("new/isolated scope",N,S,G)),x=x||S),T=S.name,!S.templateUrl&&S.controller&&(M=S.controller,P=P||{},X("'"+T+"' controller",P[T],S,G),P[T]=S),(M=S.transclude)&&(U=!0,S.$$tlb||(X("transclusion",F,S,G),F=S),"element"==M?(z=!0,I=S.priority,D=G,G=s.$$element=Hn(t.createComment(" "+T+": "+s[T]+" ")),a=G[0],ie(c,V(D),a),Q=O(D,l,I,Z&&Z.name,{nonTlbTranscludeDirective:F})):(D=Hn(me(a)).contents(),G.empty(),Q=O(D,l))),S.template)if(W=!0,X("template",j,S,G),j=S,M=C(S.template)?S.template(G,s):S.template,M=ue(M),S.replace){if(Z=S,
-D=de(M)?[]:Ke(J(S.templateNamespace,Jn(M))),a=D[0],1!=D.length||a.nodeType!==ii)throw Pi("tplrt","Template for directive '{0}' must have exactly one root element. {1}",T,"");ie(c,G,a);var le={$attr:{}},ce=R(a,[],le),fe=e.splice(ee+1,e.length-(ee+1));N&&_(ce),e=e.concat(ce).concat(fe),Y(s,le),te=e.length}else G.html(M);if(S.templateUrl)W=!0,X("template",j,S,G),j=S,S.replace&&(Z=S),w=K(e.splice(ee,e.length-ee),G,s,c,U&&Q,d,f,{controllerDirectives:P,newIsolateScopeDirective:N,templateDirective:j,nonTlbTranscludeDirective:F}),te=e.length;else if(S.compile)try{A=S.compile(G,s,Q),C(A)?p(null,A,ne,se):A&&p(A.pre,A.post,ne,se)}catch(e){r(e,B(G))}S.terminal&&(w.terminal=!0,I=Math.max(I,S.priority))}return w.scope=x&&!0===x.scope,w.transcludeOnThisElement=U,w.elementTranscludeOnThisElement=z,w.templateOnThisElement=W,w.transclude=Q,h.hasElementTranscludeDirective=z,w}function _(e){for(var t=0,n=e.length;t<n;t++)e[t]=h(e[t],{$$isolateScope:!0})}function W(t,i,o,l,c,u,d){if(i===c)return null;var f=null;if(a.hasOwnProperty(i))for(var p,g=e.get(i+s),m=0,v=g.length;m<v;m++)try{p=g[m],(l===n||l>p.priority)&&-1!=p.restrict.indexOf(o)&&(u&&(p=h(p,{$$start:u,$$end:d})),t.push(p),f=p)}catch(e){r(e)}return f}function z(t){if(a.hasOwnProperty(t))for(var n,i=e.get(t+s),r=0,o=i.length;r<o;r++)if(n=i[r],n.multiElement)return!0;return!1}function Y(e,t){var n=t.$attr,i=e.$attr,r=e.$$element;o(e,function(i,r){"$"!=r.charAt(0)&&(t[r]&&t[r]!==i&&(i+=("style"===r?";":" ")+t[r]),e.$set(r,i,!0,n[r]))}),o(t,function(t,o){"class"==o?(M(r,t),e.class=(e.class?e.class+" ":"")+t):"style"==o?(r.attr("style",r.attr("style")+";"+t),e.style=(e.style?e.style+";":"")+t):"$"==o.charAt(0)||e.hasOwnProperty(o)||(e[o]=t,i[o]=n[o])})}function K(e,t,n,i,r,a,s,c){var u,f,h=[],p=t[0],g=e.shift(),m=d({},g,{templateUrl:null,transclude:null,replace:null,$$originalDirective:g}),v=C(g.templateUrl)?g.templateUrl(t,n):g.templateUrl,$=g.templateNamespace;return t.empty(),l(T.getTrustedResourceUrl(v)).then(function(l){var d,b,w,x;if(l=ue(l),g.replace){if(w=de(l)?[]:Ke(J($,Jn(l))),d=w[0],1!=w.length||d.nodeType!==ii)throw Pi("tplrt","Template for directive '{0}' must have exactly one root element. {1}",g.name,v);b={$attr:{}},ie(i,t,d);var C=R(d,[],b);y(g.scope)&&_(C),e=C.concat(e),Y(n,b)}else d=p,t.html(l);for(e.unshift(m),u=U(e,d,n,r,t,g,a,s,c),o(i,function(e,n){e==d&&(i[n]=t[0])}),f=j(t[0].childNodes,r);h.length;){var k=h.shift(),S=h.shift(),E=h.shift(),T=h.shift(),D=t[0];if(!k.$$destroyed){if(S!==p){var A=S.className;c.hasElementTranscludeDirective&&g.replace||(D=me(d)),ie(E,Hn(S),D),M(Hn(D),A)}x=u.transcludeOnThisElement?F(k,u.transclude,T):T,u(f,k,D,i,x)}}h=null}),function(e,t,n,i,r){var o=r;t.$$destroyed||(h?(h.push(t),h.push(n),h.push(i),h.push(o)):(u.transcludeOnThisElement&&(o=F(t,u.transclude,r)),u(f,t,n,i,o)))}}function G(e,t){var n=t.priority-e.priority;return 0!==n?n:e.name!==t.name?e.name<t.name?-1:1:e.index-t.index}function X(e,t,n,i){if(t)throw Pi("multidir","Multiple directives [{0}, {1}] asking for {2} on: {3}",t.name,n.name,e,B(i))}function Z(e,t){var n=i(t,!0);n&&e.push({priority:0,compile:function(e){var t=e.parent(),i=!!t.length;return i&&O.$$addBindingClass(t),function(e,t){var r=t.parent();i||O.$$addBindingClass(r),O.$$addBindingInfo(r,n.expressions),e.$watch(n,function(e){t[0].nodeValue=e})}}})}function J(e,n){switch(e=Nn(e||"html")){case"svg":case"math":var i=t.createElement("div");return i.innerHTML="<"+e+">"+n+"</"+e+">",i.childNodes[0].childNodes;default:return n}}function Q(e,t){if("srcdoc"==t)return T.HTML;var n=P(e);return"xlinkHref"==t||"form"==n&&"action"==t||"img"!=n&&("src"==t||"ngSrc"==t)?T.RESOURCE_URL:void 0}function ee(e,t,n,r,o){var a=i(n,!0);if(a){if("multiple"===r&&"select"===P(e))throw Pi("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",B(e));t.push({priority:100,compile:function(){return{pre:function(t,n,s){var l=s.$$observers||(s.$$observers={});if(w.test(r))throw Pi("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");s[r]&&(a=i(s[r],!0,Q(e,r),f[r]||o))&&(s[r]=a(t),(l[r]||(l[r]=[])).$$inter=!0,(s.$$observers&&s.$$observers[r].$$scope||t).$watch(a,function(e,t){"class"===r&&e!=t?s.$updateClass(e,t):s.$set(r,e)}))}}}})}}function ie(e,n,i){var r,o,a=n[0],s=n.length,l=a.parentNode;if(e)for(r=0,o=e.length;r<o;r++)if(e[r]==a){e[r++]=i;for(var c=r,u=c+s-1,d=e.length;c<d;c++,u++)u<d?e[c]=e[u]:delete e[c];e.length-=s-1,e.context===a&&(e.context=i);break}l&&l.replaceChild(i,a);var f=t.createDocumentFragment();f.appendChild(a),Hn(i).data(Hn(a).data()),qn?(Xn=!0,qn.cleanData([a])):delete Hn.cache[a[Hn.expando]];for(var h=1,p=n.length;h<p;h++){var g=n[h];Hn(g).remove(),f.appendChild(g),delete n[h]}n[0]=i,n.length=1}function re(e,t){return d(function(){return e.apply(null,arguments)},e,t)}function oe(e,t,n,i,o,a){try{e(t,n,i,o,a)}catch(e){r(e,B(n))}}var ae=function(e,t){if(t){var n,i,r,o=Object.keys(t);for(n=0,i=o.length;n<i;n++)r=o[n],this[r]=t[r]}else this.$attr={};this.$$element=e};ae.prototype={$normalize:ze,$addClass:function(e){e&&e.length>0&&D.addClass(this.$$element,e)},$removeClass:function(e){e&&e.length>0&&D.removeClass(this.$$element,e)},$updateClass:function(e,t){var n=Ye(e,t);n&&n.length&&D.addClass(this.$$element,n);var i=Ye(t,e);i&&i.length&&D.removeClass(this.$$element,i)},$set:function(e,t,i,a){var s,l=this.$$element[0],c=Oe(l,e),u=Ie(l,e),d=e;if(c?(this.$$element.prop(e,t),a=c):u&&(this[u]=t,d=u),this[e]=t,a?this.$attr[e]=a:(a=this.$attr[e])||(this.$attr[e]=a=te(e,"-")),"a"===(s=P(this.$$element))&&"href"===e||"img"===s&&"src"===e)this[e]=t=A(t,"src"===e);else if("img"===s&&"srcset"===e){for(var f="",h=Jn(t),p=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,g=/\s/.test(h)?p:/(,)/,m=h.split(g),v=Math.floor(m.length/2),$=0;$<v;$++){var y=2*$;f+=A(Jn(m[y]),!0),f+=" "+Jn(m[y+1])}var b=Jn(m[2*$]).split(/\s/);f+=A(Jn(b[0]),!0),2===b.length&&(f+=" "+Jn(b[1])),this[e]=t=f}!1!==i&&(null===t||t===n?this.$$element.removeAttr(a):this.$$element.attr(a,t));var w=this.$$observers;w&&o(w[d],function(e){try{e(t)}catch(e){r(e)}})},$observe:function(e,t){var n=this,i=n.$$observers||(n.$$observers=se()),r=i[e]||(i[e]=[]);return r.push(t),k.$evalAsync(function(){r.$$inter||t(n[e])}),function(){N(r,t)}}};var le=i.startSymbol(),ce=i.endSymbol(),ue="{{"==le||"}}"==ce?g:function(e){return e.replace(/\{\{/g,le).replace(/}}/g,ce)},fe=/^ngAttr[A-Z]/;return O.$$addBindingInfo=x?function(e,t){var n=e.data("$binding")||[];Zn(t)?n=n.concat(t):n.push(t),e.data("$binding",n)}:p,O.$$addBindingClass=x?function(e){M(e,"ng-binding")}:p,O.$$addScopeInfo=x?function(e,t,n,i){var r=n?i?"$isolateScopeNoTemplate":"$isolateScope":"$scope";e.data(r,t)}:p,O.$$addScopeClass=x?function(e,t){M(e,t?"ng-isolate-scope":"ng-scope")}:p,O}]}function ze(e){return ue(e.replace(Ni,""))}function Ye(e,t){var n="",i=e.split(/\s+/),r=t.split(/\s+/);e:for(var o=0;o<i.length;o++){for(var a=i[o],s=0;s<r.length;s++)if(a==r[s])continue e;n+=(n.length>0?" ":"")+a}return n}function Ke(e){e=Hn(e);var t=e.length;if(t<=1)return e;for(;t--;){e[t].nodeType===oi&&Bn.call(e,t,1)}return e}function Ge(){var e={},t=!1,r=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(t,n){re(t,"controller"),y(t)?d(e,t):e[t]=n},this.allowGlobals=function(){t=!0},this.$get=["$injector","$window",function(o,a){function s(e,t,n,r){if(!e||!y(e.$scope))throw i("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",r,t);e.$scope[t]=n}return function(i,l,c,u){var f,h,p,g;if(c=!0===c,u&&b(u)&&(g=u),b(i)&&(h=i.match(r),p=h[1],g=g||h[3],i=e.hasOwnProperty(p)?e[p]:oe(l.$scope,p,!0)||(t?oe(a,p,!0):n),ie(i,p,!0)),c){var m=function(){};return m.prototype=(Zn(i)?i[i.length-1]:i).prototype,f=new m,g&&s(l,g,f,p||i.name),d(function(){return o.invoke(i,f,l,p),f},{instance:f,identifier:g})}return f=o.instantiate(i,l,p),g&&s(l,g,f,p||i.name),f}}]}function Xe(){this.$get=["$window",function(e){return Hn(e.document)}]}function Ze(){this.$get=["$log",function(e){return function(t,n){e.error.apply(e,arguments)}}]}function Je(e){var t,n,i,r={};return e?(o(e.split("\n"),function(e){i=e.indexOf(":"),t=Nn(Jn(e.substr(0,i))),n=Jn(e.substr(i+1)),t&&(r[t]=r[t]?r[t]+", "+n:n)}),r):r}function Qe(e){var t=y(e)?e:n;return function(n){return t||(t=Je(e)),n?t[Nn(n)]||null:t}}function et(e,t,n){return C(n)?n(e,t):(o(n,function(n){e=n(e,t)}),e)}function tt(e){return 200<=e&&e<300}function nt(){var e=/^\s*(\[|\{[^\{])/,t=/[\}\]]\s*$/,i=/^\)\]\}',?\n/,r={"Content-Type":"application/json;charset=utf-8"},a=this.defaults={transformResponse:[function(n,r){if(b(n)){n=n.replace(i,"");var o=r("Content-Type");(o&&0===o.indexOf("application/json")||e.test(n)&&t.test(n))&&(n=_(n))}return n}],transformRequest:[function(e){return!y(e)||T(e)||D(e)?e:U(e)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:F(r),put:F(r),patch:F(r)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},l=!1;this.useApplyAsync=function(e){return $(e)?(l=!!e,this):l};var c=this.interceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(e,t,i,r,u,f){function h(e){function t(e){var t=d({},e);return e.data?t.data=et(e.data,e.headers,i.transformResponse):t.data=e.data,tt(e.status)?t:u.reject(t)}var i={method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse},r=function(e){var t,n,i,r=a.headers,s=d({},e.headers);r=d({},r.common,r[Nn(e.method)]);e:for(t in r){n=Nn(t);for(i in s)if(Nn(i)===n)continue e;s[t]=r[t]}return function(e){var t;o(e,function(n,i){C(n)&&(t=n(),null!=t?e[i]=t:delete e[i])})}(s),s}(e);d(i,e),i.headers=r,i.method=Fn(i.method);var s=function(e){r=e.headers;var n=et(e.data,Qe(r),e.transformRequest);return v(n)&&o(r,function(e,t){"content-type"===Nn(t)&&delete r[t]}),v(e.withCredentials)&&!v(a.withCredentials)&&(e.withCredentials=a.withCredentials),p(e,n,r).then(t,t)},l=[s,n],c=u.when(i);for(o(w,function(e){(e.request||e.requestError)&&l.unshift(e.request,e.requestError),(e.response||e.responseError)&&l.push(e.response,e.responseError)});l.length;){var f=l.shift(),h=l.shift();c=c.then(f,h)}return c.success=function(e){return c.then(function(t){e(t.data,t.status,t.headers,i)}),c},c.error=function(e){return c.then(null,function(t){e(t.data,t.status,t.headers,i)}),c},c}function p(i,o,s){function c(e,t,n,i){function o(){d(t,e,n,i)}p&&(tt(e)?p.put(C,[e,t,Je(n),i]):p.remove(C)),l?r.$applyAsync(o):(o(),r.$$phase||r.$apply())}function d(e,t,n,r){t=Math.max(t,0),(tt(t)?w.resolve:w.reject)({data:e,status:t,headers:Qe(n),config:i,statusText:r})}function f(){var e=h.pendingRequests.indexOf(i);-1!==e&&h.pendingRequests.splice(e,1)}var p,b,w=u.defer(),x=w.promise,C=g(i.url,i.params);if(h.pendingRequests.push(i),x.then(f,f),!i.cache&&!a.cache||!1===i.cache||"GET"!==i.method&&"JSONP"!==i.method||(p=y(i.cache)?i.cache:y(a.cache)?a.cache:m),p)if(b=p.get(C),$(b)){if(M(b))return b.then(f,f),b;Zn(b)?d(b[1],b[0],F(b[2]),b[3]):d(b,200,{},"OK")}else p.put(C,x);if(v(b)){var k=Yt(i.url)?t.cookies()[i.xsrfCookieName||a.xsrfCookieName]:n;k&&(s[i.xsrfHeaderName||a.xsrfHeaderName]=k),e(i.method,C,o,c,s,i.timeout,i.withCredentials,i.responseType)}return x}function g(e,t){if(!t)return e;var n=[];return s(t,function(e,t){null===e||v(e)||(Zn(e)||(e=[e]),o(e,function(e){y(e)&&(e=x(e)?e.toISOString():U(e)),n.push(G(t)+"="+G(e))}))}),n.length>0&&(e+=(-1==e.indexOf("?")?"?":"&")+n.join("&")),e}var m=i("$http"),w=[];return o(c,function(e){w.unshift(b(e)?f.get(e):f.invoke(e))}),h.pendingRequests=[],function(e){o(arguments,function(e){h[e]=function(t,n){return h(d(n||{},{method:e,url:t}))}})}("get","delete","head","jsonp"),function(e){o(arguments,function(e){h[e]=function(t,n,i){return h(d(i||{},{method:e,url:t,data:n}))}})}("post","put","patch"),h.defaults=a,h}]}function it(){return new e.XMLHttpRequest}function rt(){this.$get=["$browser","$window","$document",function(e,t,n){return ot(e,it,e.defer,t.angular.callbacks,n[0])}]}function ot(e,t,n,i,r){function a(e,t,n){var o=r.createElement("script"),a=null;return o.type="text/javascript",o.src=e,o.async=!0,a=function(e){fi(o,"load",a),fi(o,"error",a),r.body.removeChild(o),o=null;var s=-1,l="unknown";e&&("load"!==e.type||i[t].called||(e={type:"error"}),l=e.type,s="error"===e.type?404:200),n&&n(s,l)},di(o,"load",a),di(o,"error",a),r.body.appendChild(o),a}return function(r,s,l,c,u,d,f,h){function g(){y&&y(),b&&b.abort()}function m(t,i,r,o,a){x&&n.cancel(x),y=b=null,t(i,r,o,a),e.$$completeOutstandingRequest(p)}if(e.$$incOutstandingRequestCount(),s=s||e.url(),"jsonp"==Nn(r)){var v="_"+(i.counter++).toString(36);i[v]=function(e){i[v].data=e,i[v].called=!0};var y=a(s.replace("JSON_CALLBACK","angular.callbacks."+v),v,function(e,t){m(c,e,i[v].data,"",t),i[v]=p})}else{var b=t();b.open(r,s,!0),o(u,function(e,t){$(e)&&b.setRequestHeader(t,e)}),b.onload=function(){var e=b.statusText||"",t="response"in b?b.response:b.responseText,n=1223===b.status?204:b.status;0===n&&(n=t?200:"file"==zt(s).protocol?404:0),m(c,n,t,b.getAllResponseHeaders(),e)};var w=function(){m(c,-1,null,null,"")};if(b.onerror=w,b.onabort=w,f&&(b.withCredentials=!0),h)try{b.responseType=h}catch(e){if("json"!==h)throw e}b.send(l||null)}if(d>0)var x=n(g,d);else M(d)&&d.then(g)}}function at(){var e="{{",t="}}";this.startSymbol=function(t){return t?(e=t,this):e},this.endSymbol=function(e){return e?(t=e,this):t},this.$get=["$parse","$exceptionHandler","$sce",function(n,i,r){function o(e){return"\\\\\\"+e}function a(o,a,f,h){function p(n){return n.replace(c,e).replace(u,t)}function g(e){try{return A(D(e))}catch(e){var t=ji("interr","Can't interpolate: {0}\n{1}",o,e.toString());i(t)}}h=!!h;for(var m,$,y,b=0,w=[],x=[],k=o.length,S=[],E=[];b<k;){if(-1==(m=o.indexOf(e,b))||-1==($=o.indexOf(t,m+s))){b!==k&&S.push(p(o.substring(b)));break}b!==m&&S.push(p(o.substring(b,m))),y=o.substring(m+s,$),w.push(y),x.push(n(y,g)),b=$+l,E.push(S.length),S.push("")}if(f&&S.length>1)throw ji("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce",o);if(!a||w.length){var T=function(e){for(var t=0,n=w.length;t<n;t++){if(h&&v(e[t]))return;S[E[t]]=e[t]}return S.join("")},D=function(e){return f?r.getTrusted(f,e):r.valueOf(e)},A=function(e){if(null==e)return"";switch(typeof e){case"string":break;case"number":e=""+e;break;default:e=U(e)}return e};return d(function(e){var t=0,n=w.length,r=new Array(n);try{for(;t<n;t++)r[t]=x[t](e);return T(r)}catch(e){var a=ji("interr","Can't interpolate: {0}\n{1}",o,e.toString());i(a)}},{exp:o,expressions:w,$$watchDelegate:function(e,t,n){var i;return e.$watchGroup(x,function(n,r){var o=T(n);C(t)&&t.call(this,o,n!==r?i:o,e),i=o},n)}})}}var s=e.length,l=t.length,c=new RegExp(e.replace(/./g,o),"g"),u=new RegExp(t.replace(/./g,o),"g");return a.startSymbol=function(){return e},a.endSymbol=function(){return t},a}]}function st(){this.$get=["$rootScope","$window","$q","$$q",function(e,t,n,i){function r(r,a,s,l){var c=t.setInterval,u=t.clearInterval,d=0,f=$(l)&&!l,h=(f?i:n).defer(),p=h.promise;return s=$(s)?s:0,p.then(null,null,r),p.$$intervalId=c(function(){h.notify(d++),s>0&&d>=s&&(h.resolve(d),u(p.$$intervalId),delete o[p.$$intervalId]),f||e.$apply()},a),o[p.$$intervalId]=h,p}var o={};return r.cancel=function(e){return!!(e&&e.$$intervalId in o)&&(o[e.$$intervalId].reject("canceled"),t.clearInterval(e.$$intervalId),delete o[e.$$intervalId],!0)},r}]}function lt(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"¤",posSuf:"",negPre:"(¤",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a",short:"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(e){return 1===e?"one":"other"}}}}function ct(e){for(var t=e.split("/"),n=t.length;n--;)t[n]=K(t[n]);return t.join("/")}function ut(e,t,n){var i=zt(e,n);t.$$protocol=i.protocol,t.$$host=i.hostname,t.$$port=f(i.port)||Li[i.protocol]||null}function dt(e,t,n){var i="/"!==e.charAt(0);i&&(e="/"+e);var r=zt(e,n);t.$$path=decodeURIComponent(i&&"/"===r.pathname.charAt(0)?r.pathname.substring(1):r.pathname),t.$$search=z(r.search),t.$$hash=decodeURIComponent(r.hash),t.$$path&&"/"!=t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function ft(e,t){if(0===t.indexOf(e))return t.substr(e.length)}function ht(e){var t=e.indexOf("#");return-1==t?e:e.substr(0,t)}function pt(e){return e.substr(0,ht(e).lastIndexOf("/")+1)}function gt(e){return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function mt(e,t){this.$$html5=!0,t=t||"";var i=pt(e);ut(e,this,e),this.$$parse=function(t){var n=ft(i,t);if(!b(n))throw Ri("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',t,i);dt(n,this,e),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=Y(this.$$search),t=this.$$hash?"#"+K(this.$$hash):"";this.$$url=ct(this.$$path)+(e?"?"+e:"")+t,this.$$absUrl=i+this.$$url.substr(1)},this.$$parseLinkUrl=function(r,o){if(o&&"#"===o[0])return this.hash(o.slice(1)),!0;var a,s,l;return(a=ft(e,r))!==n?(s=a,l=(a=ft(t,a))!==n?i+(ft("/",a)||a):e+s):(a=ft(i,r))!==n?l=i+a:i==r+"/"&&(l=i),l&&this.$$parse(l),!!l}}function vt(e,t){var n=pt(e);ut(e,this,e),this.$$parse=function(i){var r=ft(e,i)||ft(n,i),o="#"==r.charAt(0)?ft(t,r):this.$$html5?r:"";if(!b(o))throw Ri("ihshprfx",'Invalid url "{0}", missing hash prefix "{1}".',i,t);dt(o,this,e),this.$$path=function(e,t,n){var i,r=/^\/[A-Z]:(\/.*)/;return 0===t.indexOf(n)&&(t=t.replace(n,"")),r.exec(t)?e:(i=r.exec(e),i?i[1]:e)}(this.$$path,o,e),this.$$compose()},this.$$compose=function(){var n=Y(this.$$search),i=this.$$hash?"#"+K(this.$$hash):"";this.$$url=ct(this.$$path)+(n?"?"+n:"")+i,this.$$absUrl=e+(this.$$url?t+this.$$url:"")},this.$$parseLinkUrl=function(t,n){return ht(e)==ht(t)&&(this.$$parse(t),!0)}}function $t(e,t){this.$$html5=!0,vt.apply(this,arguments);var n=pt(e);this.$$parseLinkUrl=function(i,r){if(r&&"#"===r[0])return this.hash(r.slice(1)),!0;var o,a;return e==ht(i)?o=i:(a=ft(n,i))?o=e+t+a:n===i+"/"&&(o=n),o&&this.$$parse(o),!!o},this.$$compose=function(){var n=Y(this.$$search),i=this.$$hash?"#"+K(this.$$hash):"";this.$$url=ct(this.$$path)+(n?"?"+n:"")+i,this.$$absUrl=e+t+this.$$url}}function yt(e){return function(){return this[e]}}function bt(e,t){return function(n){return v(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function wt(){var t="",n={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(e){return $(e)?(t=e,this):t},this.html5Mode=function(e){return A(e)?(n.enabled=e,this):y(e)?(A(e.enabled)&&(n.enabled=e.enabled),A(e.requireBase)&&(n.requireBase=e.requireBase),A(e.rewriteLinks)&&(n.rewriteLinks=e.rewriteLinks),this):n},this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(i,r,o,a){function s(e,t,n){var i=c.url(),o=c.$$state;try{r.url(e,t,n),c.$$state=r.state()}catch(e){throw c.url(i),c.$$state=o,e}}function l(e,t){i.$broadcast("$locationChangeSuccess",c.absUrl(),e,c.$$state,t)}var c,u,d,f=r.baseHref(),h=r.url();if(n.enabled){if(!f&&n.requireBase)throw Ri("nobase","$location in HTML5 mode requires a <base> tag to be present!");d=gt(h)+(f||"/"),u=o.history?mt:$t}else d=ht(h),u=vt;c=new u(d,"#"+t),c.$$parseLinkUrl(h,h),c.$$state=r.state();var p=/^\s*(javascript|mailto):/i;a.on("click",function(t){if(n.rewriteLinks&&!t.ctrlKey&&!t.metaKey&&2!=t.which){for(var o=Hn(t.target);"a"!==P(o[0]);)if(o[0]===a[0]||!(o=o.parent())[0])return;var s=o.prop("href"),l=o.attr("href")||o.attr("xlink:href");y(s)&&"[object SVGAnimatedString]"===s.toString()&&(s=zt(s.animVal).href),p.test(s)||!s||o.attr("target")||t.isDefaultPrevented()||c.$$parseLinkUrl(s,l)&&(t.preventDefault(),c.absUrl()!=r.url()&&(i.$apply(),e.angular["ff-684208-preventDefault"]=!0))}}),c.absUrl()!=h&&r.url(c.absUrl(),!0);var g=!0;return r.onUrlChange(function(e,t){i.$evalAsync(function(){var n=c.absUrl(),r=c.$$state;c.$$parse(e),c.$$state=t,i.$broadcast("$locationChangeStart",e,n,t,r).defaultPrevented?(c.$$parse(n),c.$$state=r,s(n,!1,r)):(g=!1,l(n,r))}),i.$$phase||i.$digest()}),i.$watch(function(){var e=r.url(),t=r.state(),n=c.$$replace,a=e!==c.absUrl()||c.$$html5&&o.history&&t!==c.$$state;(g||a)&&(g=!1,i.$evalAsync(function(){i.$broadcast("$locationChangeStart",c.absUrl(),e,c.$$state,t).defaultPrevented?(c.$$parse(e),c.$$state=t):(a&&s(c.absUrl(),n,t===c.$$state?null:c.$$state),l(e,t))})),c.$$replace=!1}),c}]}function xt(){var e=!0,t=this;this.debugEnabled=function(t){return $(t)?(e=t,this):e},this.$get=["$window",function(n){function i(e){return e instanceof Error&&(e.stack?e=e.message&&-1===e.stack.indexOf(e.message)?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}function r(e){var t=n.console||{},r=t[e]||t.log||p,a=!1;try{a=!!r.apply}catch(e){}return a?function(){var e=[];return o(arguments,function(t){e.push(i(t))}),r.apply(t,e)}:function(e,t){r(e,null==t?"":t)}}return{log:r("log"),info:r("info"),warn:r("warn"),error:r("error"),debug:function(){var n=r("debug");return function(){e&&n.apply(t,arguments)}}()}}]}function Ct(e,t){if("__defineGetter__"===e||"__defineSetter__"===e||"__lookupGetter__"===e||"__lookupSetter__"===e||"__proto__"===e)throw Hi("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",t);return e}function kt(e,t){if(e){if(e.constructor===e)throw Hi("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e.window===e)throw Hi("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",t);if(e.children&&(e.nodeName||e.prop&&e.attr&&e.find))throw Hi("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",t);if(e===Object)throw Hi("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",t)}return e}function St(e,t){if(e){if(e.constructor===e)throw Hi("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e===qi||e===Ui||e===_i)throw Hi("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",t)}}function Et(e){return e.constant}function Tt(e,t,n,i){kt(e,i);for(var r,o=t.split("."),a=0;o.length>1;a++){r=Ct(o.shift(),i);var s=kt(e[r],i);s||(s={},e[r]=s),e=s}return r=Ct(o.shift(),i),kt(e[r],i),e[r]=n,n}function Dt(e,t,i,r,o,a){return Ct(e,a),Ct(t,a),Ct(i,a),Ct(r,a),Ct(o,a),function(a,s){var l=s&&s.hasOwnProperty(e)?s:a;return null==l?l:(l=l[e],t?null==l?n:(l=l[t],i?null==l?n:(l=l[i],r?null==l?n:(l=l[r],o?null==l?n:l=l[o]:l):l):l):l)}}function At(e,t,i){var r=Gi[e];if(r)return r;var a=e.split("."),s=a.length;if(t.csp)r=s<6?Dt(a[0],a[1],a[2],a[3],a[4],i):function(e,t){var r,o=0;do{r=Dt(a[o++],a[o++],a[o++],a[o++],a[o++],i)(e,t),t=n,e=r}while(o<s);return r};else{var l="";o(a,function(e,t){Ct(e,i),l+="if(s == null) return undefined;\ns="+(t?"s":'((l&&l.hasOwnProperty("'+e+'"))?l:s)')+"."+e+";\n"}),l+="return s;";var c=new Function("s","l",l);c.toString=m(l),r=c}return r.sharedGetter=!0,r.assign=function(t,n){return Tt(t,e,n,e)},Gi[e]=r,r}function Mt(){var e=se(),t={csp:!1};this.$get=["$filter","$sniffer",function(n,i){function r(e){var t=e;return e.sharedGetter&&(t=function(t,n){return e(t,n)},t.literal=e.literal,t.constant=e.constant,t.assign=e.assign),t}function a(e,t){for(var n=0,i=e.length;n<i;n++){var r=e[n];r.constant||(r.inputs?a(r.inputs,t):-1===t.indexOf(r)&&t.push(r))}return t}function s(e,t){return null==e||null==t?e===t:("object"!=typeof e||"object"!=typeof(e=e.valueOf()))&&(e===t||e!==e&&t!==t)}function l(e,t,n,i){var r,o=i.$$inputs||(i.$$inputs=a(i.inputs,[]));if(1===o.length){var l=s;return o=o[0],e.$watch(function(e){var t=o(e);return s(t,l)||(r=i(e),l=t&&t.valueOf()),r},t,n)}for(var c=[],u=0,d=o.length;u<d;u++)c[u]=s;return e.$watch(function(e){for(var t=!1,n=0,a=o.length;n<a;n++){var l=o[n](e);(t||(t=!s(l,c[n])))&&(c[n]=l&&l.valueOf())}return t&&(r=i(e)),r},t,n)}function c(e,t,n,i){var r,o;return r=e.$watch(function(e){return i(e)},function(e,n,i){o=e,C(t)&&t.apply(this,arguments),$(e)&&i.$$postDigest(function(){$(o)&&r()})},n)}function u(e,t,n,i){function r(e){var t=!0;return o(e,function(e){$(e)||(t=!1)}),t}var a,s;return a=e.$watch(function(e){return i(e)},function(e,n,i){s=e,C(t)&&t.call(this,e,n,i),r(e)&&i.$$postDigest(function(){r(s)&&a()})},n)}function d(e,t,n,i){var r;return r=e.$watch(function(e){return i(e)},function(e,n,i){C(t)&&t.apply(this,arguments),r()},n)}function f(e,t){if(!t)return e;var n=function(n,i){var r=e(n,i),o=t(r,n,i);return $(r)?o:r};return e.$$watchDelegate&&e.$$watchDelegate!==l?n.$$watchDelegate=e.$$watchDelegate:t.$stateful||(n.$$watchDelegate=l,n.inputs=[e]),n}return t.csp=i.csp,function(i,o){var a,s,h;switch(typeof i){case"string":if(h=i=i.trim(),!(a=e[h])){":"===i.charAt(0)&&":"===i.charAt(1)&&(s=!0,i=i.substring(2));var g=new Yi(t);a=new Ki(g,n,t).parse(i),a.constant?a.$$watchDelegate=d:s?(a=r(a),a.$$watchDelegate=a.literal?u:c):a.inputs&&(a.$$watchDelegate=l),e[h]=a}return f(a,o);case"function":return f(i,o);default:return f(p,o)}}}]}function Ot(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return Pt(function(t){e.$evalAsync(t)},t)}]}function It(){this.$get=["$browser","$exceptionHandler",function(e,t){return Pt(function(t){e.defer(t)},t)}]}function Pt(e,t){function r(e,t,n){function i(t){return function(n){r||(r=!0,t.call(e,n))}}var r=!1;return[i(t),i(n)]}function a(){this.$$state={status:0}}function s(e,t){return function(n){t.call(e,n)}}function l(e){var i,r,o;o=e.pending,e.processScheduled=!1,e.pending=n;for(var a=0,s=o.length;a<s;++a){r=o[a][0],i=o[a][e.status];try{C(i)?r.resolve(i(e.value)):1===e.status?r.resolve(e.value):r.reject(e.value)}catch(e){r.reject(e),t(e)}}}function c(t){!t.processScheduled&&t.pending&&(t.processScheduled=!0,e(function(){l(t)}))}function u(){this.promise=new a,this.resolve=s(this,this.resolve),this.reject=s(this,this.reject),this.notify=s(this,this.notify)}function d(e){var t=new u,n=0,i=Zn(e)?[]:{};return o(e,function(e,r){n++,v(e).then(function(e){i.hasOwnProperty(r)||(i[r]=e,--n||t.resolve(i))},function(e){i.hasOwnProperty(r)||t.reject(e)})}),0===n&&t.resolve(i),t.promise}var f=i("$q",TypeError),h=function(){return new u};a.prototype={then:function(e,t,n){var i=new u;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([i,e,t,n]),this.$$state.status>0&&c(this.$$state),i.promise},catch:function(e){return this.then(null,e)},finally:function(e,t){return this.then(function(t){return m(t,!0,e)},function(t){return m(t,!1,e)},t)}},u.prototype={resolve:function(e){this.promise.$$state.status||(e===this.promise?this.$$reject(f("qcycle","Expected promise to be resolved with value other than itself '{0}'",e)):this.$$resolve(e))},$$resolve:function(e){var n,i;i=r(this,this.$$resolve,this.$$reject);try{(y(e)||C(e))&&(n=e&&e.then),C(n)?(this.promise.$$state.status=-1,n.call(e,i[0],i[1],this.notify)):(this.promise.$$state.value=e,this.promise.$$state.status=1,c(this.promise.$$state))}catch(e){i[1](e),t(e)}},reject:function(e){this.promise.$$state.status||this.$$reject(e)},$$reject:function(e){this.promise.$$state.value=e,this.promise.$$state.status=2,c(this.promise.$$state)},notify:function(n){var i=this.promise.$$state.pending;this.promise.$$state.status<=0&&i&&i.length&&e(function(){for(var e,r,o=0,a=i.length;o<a;o++){r=i[o][0],e=i[o][3];try{r.notify(C(e)?e(n):n)}catch(e){t(e)}}})}};var p=function(e){var t=new u;return t.reject(e),t.promise},g=function(e,t){var n=new u;return t?n.resolve(e):n.reject(e),n.promise},m=function(e,t,n){var i=null;try{C(n)&&(i=n())}catch(e){return g(e,!1)}return M(i)?i.then(function(){return g(e,t)},function(e){return g(e,!1)}):g(e,t)},v=function(e,t,n,i){var r=new u;return r.resolve(e),r.promise.then(t,n,i)},$=function e(t){function n(e){r.resolve(e)}function i(e){r.reject(e)}if(!C(t))throw f("norslvr","Expected resolverFn, got '{0}'",t);if(!(this instanceof e))return new e(t);var r=new u;return t(n,i),r.promise};return $.defer=h,$.reject=p,$.when=v,$.all=d,$}function Nt(){this.$get=["$window","$timeout",function(e,t){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame,i=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.mozCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,r=!!n,o=r?function(e){var t=n(e);return function(){i(t)}}:function(e){var n=t(e,16.66,!1);return function(){t.cancel(n)}};return o.supported=r,o}]}function jt(){var e=10,t=i("$rootScope"),n=null,a=null;this.digestTtl=function(t){return arguments.length&&(e=t),e},this.$get=["$injector","$exceptionHandler","$parse","$browser",function(i,s,l,u){function d(){this.$id=c(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$isolateBindings=null}function f(e){if(b.$$phase)throw t("inprog","{0} already in progress",b.$$phase);b.$$phase=e}function h(){b.$$phase=null}function g(e,t,n){do{e.$$listenerCount[n]-=t,0===e.$$listenerCount[n]&&delete e.$$listenerCount[n]}while(e=e.$parent)}function m(){}function v(){for(;k.length;)try{k.shift()()}catch(e){s(e)}a=null}function $(){null===a&&(a=u.defer(function(){b.$apply(v)}))}d.prototype={constructor:d,$new:function(e,t){function n(){i.$$destroyed=!0}var i;return t=t||this,e?(i=new d,i.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=function(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$id=c(),this.$$ChildScope=null},this.$$ChildScope.prototype=this),i=new this.$$ChildScope),i.$parent=t,i.$$prevSibling=t.$$childTail,t.$$childHead?(t.$$childTail.$$nextSibling=i,t.$$childTail=i):t.$$childHead=t.$$childTail=i,(e||t!=this)&&i.$on("$destroy",n),i},$watch:function(e,t,i){var r=l(e);if(r.$$watchDelegate)return r.$$watchDelegate(this,t,i,r);var o=this,a=o.$$watchers,s={fn:t,last:m,get:r,exp:e,eq:!!i};return n=null,C(t)||(s.fn=p),a||(a=o.$$watchers=[]),a.unshift(s),function(){N(a,s),n=null}},$watchGroup:function(e,t){function n(){l=!1,c?(c=!1,t(r,r,s)):t(r,i,s)}var i=new Array(e.length),r=new Array(e.length),a=[],s=this,l=!1,c=!0;if(!e.length){var u=!0;return s.$evalAsync(function(){u&&t(r,r,s)}),function(){u=!1}}return 1===e.length?this.$watch(e[0],function(e,n,o){r[0]=e,i[0]=n,t(r,e===n?r:i,o)}):(o(e,function(e,t){var o=s.$watch(e,function(e,o){r[t]=e,i[t]=o,l||(l=!0,s.$evalAsync(n))});a.push(o)}),function(){for(;a.length;)a.shift()()})},$watchCollection:function(e,t){function n(e){o=e;var t,n,i,s;if(y(o))if(r(o)){a!==h&&(a=h,m=a.length=0,d++),t=o.length,m!==t&&(d++,a.length=m=t);for(var l=0;l<t;l++)s=a[l],i=o[l],s!==s&&i!==i||s===i||(d++,a[l]=i)}else{a!==p&&(a=p={},m=0,d++),t=0;for(n in o)o.hasOwnProperty(n)&&(t++,i=o[n],s=a[n],n in a?s!==s&&i!==i||s===i||(d++,a[n]=i):(m++,a[n]=i,d++));if(m>t){d++;for(n in a)o.hasOwnProperty(n)||(m--,delete a[n])}}else a!==o&&(a=o,d++);return d}function i(){if(g?(g=!1,t(o,o,c)):t(o,s,c),u)if(y(o))if(r(o)){s=new Array(o.length);for(var e=0;e<o.length;e++)s[e]=o[e]}else{s={};for(var n in o)jn.call(o,n)&&(s[n]=o[n])}else s=o}n.$stateful=!0;var o,a,s,c=this,u=t.length>1,d=0,f=l(e,n),h=[],p={},g=!0,m=0;return this.$watch(f,i)},$digest:function(){var i,r,o,l,c,d,p,g,$,y,k,S=e,E=this,T=[];f("$digest"),
-u.$$checkUrlChange(),this===b&&null!==a&&(u.defer.cancel(a),v()),n=null;do{for(d=!1,g=E;w.length;){try{k=w.shift(),k.scope.$eval(k.expression)}catch(e){s(e)}n=null}e:do{if(l=g.$$watchers)for(c=l.length;c--;)try{if(i=l[c])if((r=i.get(g))===(o=i.last)||(i.eq?L(r,o):"number"==typeof r&&"number"==typeof o&&isNaN(r)&&isNaN(o))){if(i===n){d=!1;break e}}else d=!0,n=i,i.last=i.eq?j(r,null):r,i.fn(r,o===m?r:o,g),S<5&&($=4-S,T[$]||(T[$]=[]),y=C(i.exp)?"fn: "+(i.exp.name||i.exp.toString()):i.exp,y+="; newVal: "+U(r)+"; oldVal: "+U(o),T[$].push(y))}catch(e){s(e)}if(!(p=g.$$childHead||g!==E&&g.$$nextSibling))for(;g!==E&&!(p=g.$$nextSibling);)g=g.$parent}while(g=p);if((d||w.length)&&!S--)throw h(),t("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",e,U(T))}while(d||w.length);for(h();x.length;)try{x.shift()()}catch(e){s(e)}},$destroy:function(){if(!this.$$destroyed){var e=this.$parent;if(this.$broadcast("$destroy"),this.$$destroyed=!0,this!==b){for(var t in this.$$listenerCount)g(this,this.$$listenerCount[t],t);e.$$childHead==this&&(e.$$childHead=this.$$nextSibling),e.$$childTail==this&&(e.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=p,this.$on=this.$watch=this.$watchGroup=function(){return p},this.$$listeners={},this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null}}},$eval:function(e,t){return l(e)(this,t)},$evalAsync:function(e){b.$$phase||w.length||u.defer(function(){w.length&&b.$digest()}),w.push({scope:this,expression:e})},$$postDigest:function(e){x.push(e)},$apply:function(e){try{return f("$apply"),this.$eval(e)}catch(e){s(e)}finally{h();try{b.$digest()}catch(e){throw s(e),e}}},$applyAsync:function(e){function t(){n.$eval(e)}var n=this;e&&k.push(t),$()},$on:function(e,t){var n=this.$$listeners[e];n||(this.$$listeners[e]=n=[]),n.push(t);var i=this;do{i.$$listenerCount[e]||(i.$$listenerCount[e]=0),i.$$listenerCount[e]++}while(i=i.$parent);var r=this;return function(){n[n.indexOf(t)]=null,g(r,1,e)}},$emit:function(e,t){var n,i,r,o=[],a=this,l=!1,c={name:e,targetScope:a,stopPropagation:function(){l=!0},preventDefault:function(){c.defaultPrevented=!0},defaultPrevented:!1},u=R([c],arguments,1);do{for(n=a.$$listeners[e]||o,c.currentScope=a,i=0,r=n.length;i<r;i++)if(n[i])try{n[i].apply(null,u)}catch(e){s(e)}else n.splice(i,1),i--,r--;if(l)return c.currentScope=null,c;a=a.$parent}while(a);return c.currentScope=null,c},$broadcast:function(e,t){var n=this,i=n,r=n,o={name:e,targetScope:n,preventDefault:function(){o.defaultPrevented=!0},defaultPrevented:!1};if(!n.$$listenerCount[e])return o;for(var a,l,c,u=R([o],arguments,1);i=r;){for(o.currentScope=i,a=i.$$listeners[e]||[],l=0,c=a.length;l<c;l++)if(a[l])try{a[l].apply(null,u)}catch(e){s(e)}else a.splice(l,1),l--,c--;if(!(r=i.$$listenerCount[e]&&i.$$childHead||i!==n&&i.$$nextSibling))for(;i!==n&&!(r=i.$$nextSibling);)i=i.$parent}return o.currentScope=null,o}};var b=new d,w=b.$$asyncQueue=[],x=b.$$postDigestQueue=[],k=b.$$applyAsyncQueue=[];return b}]}function Ft(){var e=/^\s*(https?|ftp|mailto|tel|file):/,t=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(t){return $(t)?(e=t,this):e},this.imgSrcSanitizationWhitelist=function(e){return $(e)?(t=e,this):t},this.$get=function(){return function(n,i){var r,o=i?t:e;return r=zt(n).href,""===r||r.match(o)?n:"unsafe:"+r}}}function Lt(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")}function Rt(e){if("self"===e)return e;if(b(e)){if(e.indexOf("***")>-1)throw Xi("iwcard","Illegal sequence *** in string matcher. String: {0}",e);return e=Lt(e).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+e+"$")}if(k(e))return new RegExp("^"+e.source+"$");throw Xi("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function Vt(e){var t=[];return $(e)&&o(e,function(e){t.push(Rt(e))}),t}function Ht(){this.SCE_CONTEXTS=Zi;var e=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(e=Vt(t)),e},this.resourceUrlBlacklist=function(e){return arguments.length&&(t=Vt(e)),t},this.$get=["$injector",function(i){function r(e,t){return"self"===e?Yt(t):!!e.exec(t.href)}function o(n){var i,o,a=zt(n.toString()),s=!1;for(i=0,o=e.length;i<o;i++)if(r(e[i],a)){s=!0;break}if(s)for(i=0,o=t.length;i<o;i++)if(r(t[i],a)){s=!1;break}return s}function a(e){var t=function(e){this.$$unwrapTrustedValue=function(){return e}};return e&&(t.prototype=new e),t.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},t.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},t}function s(e,t){var i=f.hasOwnProperty(e)?f[e]:null;if(!i)throw Xi("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",e,t);if(null===t||t===n||""===t)return t;if("string"!=typeof t)throw Xi("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",e);return new i(t)}function l(e){return e instanceof d?e.$$unwrapTrustedValue():e}function c(e,t){if(null===t||t===n||""===t)return t;var i=f.hasOwnProperty(e)?f[e]:null;if(i&&t instanceof i)return t.$$unwrapTrustedValue();if(e===Zi.RESOURCE_URL){if(o(t))return t;throw Xi("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",t.toString())}if(e===Zi.HTML)return u(t);throw Xi("unsafe","Attempting to use an unsafe value in a safe context.")}var u=function(e){throw Xi("unsafe","Attempting to use an unsafe value in a safe context.")};i.has("$sanitize")&&(u=i.get("$sanitize"));var d=a(),f={};return f[Zi.HTML]=a(d),f[Zi.CSS]=a(d),f[Zi.URL]=a(d),f[Zi.JS]=a(d),f[Zi.RESOURCE_URL]=a(f[Zi.URL]),{trustAs:s,getTrusted:c,valueOf:l}}]}function qt(){var e=!0;this.enabled=function(t){return arguments.length&&(e=!!t),e},this.$get=["$document","$parse","$sceDelegate",function(t,n,i){if(e&&t[0].documentMode<8)throw Xi("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var r=F(Zi);r.isEnabled=function(){return e},r.trustAs=i.trustAs,r.getTrusted=i.getTrusted,r.valueOf=i.valueOf,e||(r.trustAs=r.getTrusted=function(e,t){return t},r.valueOf=g),r.parseAs=function(e,t){var i=n(t);return i.literal&&i.constant?i:n(t,function(t){return r.getTrusted(e,t)})};var a=r.parseAs,s=r.getTrusted,l=r.trustAs;return o(Zi,function(e,t){var n=Nn(t);r[ue("parse_as_"+n)]=function(t){return a(e,t)},r[ue("get_trusted_"+n)]=function(t){return s(e,t)},r[ue("trust_as_"+n)]=function(t){return l(e,t)}}),r}]}function Ut(){this.$get=["$window","$document",function(e,t){var n,i,r={},o=f((/android (\d+)/.exec(Nn((e.navigator||{}).userAgent))||[])[1]),a=/Boxee/i.test((e.navigator||{}).userAgent),s=t[0]||{},l=/^(Moz|webkit|O|ms)(?=[A-Z])/,c=s.body&&s.body.style,u=!1,d=!1;if(c){for(var h in c)if(i=l.exec(h)){n=i[0],n=n.substr(0,1).toUpperCase()+n.substr(1);break}n||(n="WebkitOpacity"in c&&"webkit"),u=!!("transition"in c||n+"Transition"in c),d=!!("animation"in c||n+"Animation"in c),!o||u&&d||(u=b(s.body.style.webkitTransition),d=b(s.body.style.webkitAnimation))}return{history:!(!e.history||!e.history.pushState||o<4||a),hasEvent:function(e){if("input"==e&&9==Vn)return!1;if(v(r[e])){var t=s.createElement("div");r[e]="on"+e in t}return r[e]},csp:Qn(),vendorPrefix:n,transitions:u,animations:d,android:o}}]}function _t(){this.$get=["$templateCache","$http","$q",function(e,t,n){function i(r,o){function a(){if(s.totalPendingRequests--,!o)throw Pi("tpload","Failed to load template: {0}",r);return n.reject()}var s=i;return s.totalPendingRequests++,t.get(r,{cache:e}).then(function(t){var n=t.data;return n&&0!==n.length?(s.totalPendingRequests--,e.put(r,n),n):a()},a)}return i.totalPendingRequests=0,i}]}function Bt(){this.$get=["$rootScope","$browser","$location",function(e,t,n){var i={};return i.findBindings=function(e,t,n){var i=e.getElementsByClassName("ng-binding"),r=[];return o(i,function(e){var i=Kn.element(e).data("$binding");i&&o(i,function(i){if(n){new RegExp("(^|\\s)"+t+"(\\s|\\||$)").test(i)&&r.push(e)}else-1!=i.indexOf(t)&&r.push(e)})}),r},i.findModels=function(e,t,n){for(var i=["ng-","data-ng-","ng\\:"],r=0;r<i.length;++r){var o=n?"=":"*=",a="["+i[r]+"model"+o+'"'+t+'"]',s=e.querySelectorAll(a);if(s.length)return s}},i.getLocation=function(){return n.url()},i.setLocation=function(t){t!==n.url()&&(n.url(t),e.$digest())},i.whenStable=function(e){t.notifyWhenNoOutstandingRequests(e)},i}]}function Wt(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(e,t,n,i,r){function o(o,s,l){var c,u=$(l)&&!l,d=(u?i:n).defer(),f=d.promise;return c=t.defer(function(){try{d.resolve(o())}catch(e){d.reject(e),r(e)}finally{delete a[f.$$timeoutId]}u||e.$apply()},s),f.$$timeoutId=c,a[c]=d,f}var a={};return o.cancel=function(e){return!!(e&&e.$$timeoutId in a)&&(a[e.$$timeoutId].reject("canceled"),delete a[e.$$timeoutId],t.defer.cancel(e.$$timeoutId))},o}]}function zt(e,t){var n=e;return Vn&&(Ji.setAttribute("href",n),n=Ji.href),Ji.setAttribute("href",n),{href:Ji.href,protocol:Ji.protocol?Ji.protocol.replace(/:$/,""):"",host:Ji.host,search:Ji.search?Ji.search.replace(/^\?/,""):"",hash:Ji.hash?Ji.hash.replace(/^#/,""):"",hostname:Ji.hostname,port:Ji.port,pathname:"/"===Ji.pathname.charAt(0)?Ji.pathname:"/"+Ji.pathname}}function Yt(e){var t=b(e)?zt(e):e;return t.protocol===Qi.protocol&&t.host===Qi.host}function Kt(){this.$get=m(e)}function Gt(e){function t(i,r){if(y(i)){var a={};return o(i,function(e,n){a[n]=t(n,e)}),a}return e.factory(i+n,r)}var n="Filter";this.register=t,this.$get=["$injector",function(e){return function(t){return e.get(t+n)}}],t("currency",Zt),t("date",cn),t("filter",Xt),t("json",un),t("limitTo",dn),t("lowercase",rr),t("number",Jt),t("orderBy",fn),t("uppercase",or)}function Xt(){return function(e,t,n){if(!Zn(e))return e;var i=typeof n,r=[];r.check=function(e,t){for(var n=0;n<r.length;n++)if(!r[n](e,t))return!1;return!0},"function"!==i&&(n="boolean"===i&&n?function(e,t){return Kn.equals(e,t)}:function(e,t){if(e&&t&&"object"==typeof e&&"object"==typeof t){for(var i in e)if("$"!==i.charAt(0)&&jn.call(e,i)&&n(e[i],t[i]))return!0;return!1}return t=(""+t).toLowerCase(),(""+e).toLowerCase().indexOf(t)>-1});var o=function(e,t){if("string"==typeof t&&"!"===t.charAt(0))return!o(e,t.substr(1));switch(typeof e){case"boolean":case"number":case"string":return n(e,t);case"object":switch(typeof t){case"object":return n(e,t);default:for(var i in e)if("$"!==i.charAt(0)&&o(e[i],t))return!0}return!1;case"array":for(var r=0;r<e.length;r++)if(o(e[r],t))return!0;return!1;default:return!1}};switch(typeof t){case"boolean":case"number":case"string":t={$:t};case"object":for(var a in t)!function(e){void 0!==t[e]&&r.push(function(n){return o("$"==e?n:n&&n[e],t[e])})}(a);break;case"function":r.push(t);break;default:return e}for(var s=[],l=0;l<e.length;l++){var c=e[l];r.check(c,l)&&s.push(c)}return s}}function Zt(e){var t=e.NUMBER_FORMATS;return function(e,n,i){return v(n)&&(n=t.CURRENCY_SYM),v(i)&&(i=2),null==e?e:Qt(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,i).replace(/\u00A4/g,n)}}function Jt(e){var t=e.NUMBER_FORMATS;return function(e,n){return null==e?e:Qt(e,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,n)}}function Qt(e,t,n,i,r){if(!isFinite(e)||y(e))return"";var o=e<0;e=Math.abs(e);var a=e+"",s="",l=[],c=!1;if(-1!==a.indexOf("e")){var u=a.match(/([\d\.]+)e(-?)(\d+)/);u&&"-"==u[2]&&u[3]>r+1?(a="0",e=0):(s=a,c=!0)}if(c)r>0&&e>-1&&e<1&&(s=e.toFixed(r));else{var d=(a.split(er)[1]||"").length;v(r)&&(r=Math.min(Math.max(t.minFrac,d),t.maxFrac)),e=+(Math.round(+(e.toString()+"e"+r)).toString()+"e"+-r),0===e&&(o=!1);var f=(""+e).split(er),h=f[0];f=f[1]||"";var p,g=0,m=t.lgSize,$=t.gSize;if(h.length>=m+$)for(g=h.length-m,p=0;p<g;p++)(g-p)%$==0&&0!==p&&(s+=n),s+=h.charAt(p);for(p=g;p<h.length;p++)(h.length-p)%m==0&&0!==p&&(s+=n),s+=h.charAt(p);for(;f.length<r;)f+="0";r&&"0"!==r&&(s+=i+f.substr(0,r))}return l.push(o?t.negPre:t.posPre),l.push(s),l.push(o?t.negSuf:t.posSuf),l.join("")}function en(e,t,n){var i="";for(e<0&&(i="-",e=-e),e=""+e;e.length<t;)e="0"+e;return n&&(e=e.substr(e.length-t)),i+e}function tn(e,t,n,i){return n=n||0,function(r){var o=r["get"+e]();return(n>0||o>-n)&&(o+=n),0===o&&-12==n&&(o=12),en(o,t,i)}}function nn(e,t){return function(n,i){var r=n["get"+e]();return i[Fn(t?"SHORT"+e:e)][r]}}function rn(e){var t=-1*e.getTimezoneOffset(),n=t>=0?"+":"";return n+=en(Math[t>0?"floor":"ceil"](t/60),2)+en(Math.abs(t%60),2)}function on(e){var t=new Date(e,0,1).getDay();return new Date(e,0,(t<=4?5:12)-t)}function an(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+(4-e.getDay()))}function sn(e){return function(t){var n=on(t.getFullYear()),i=an(t),r=+i-+n;return en(1+Math.round(r/6048e5),e)}}function ln(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]}function cn(e){function t(e){var t;if(t=e.match(n)){var i=new Date(0),r=0,o=0,a=t[8]?i.setUTCFullYear:i.setFullYear,s=t[8]?i.setUTCHours:i.setHours;t[9]&&(r=f(t[9]+t[10]),o=f(t[9]+t[11])),a.call(i,f(t[1]),f(t[2])-1,f(t[3]));var l=f(t[4]||0)-r,c=f(t[5]||0)-o,u=f(t[6]||0),d=Math.round(1e3*parseFloat("0."+(t[7]||0)));return s.call(i,l,c,u,d),i}return e}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,i,r){var a,s,l="",c=[];if(i=i||"mediumDate",i=e.DATETIME_FORMATS[i]||i,b(n)&&(n=ir.test(n)?f(n):t(n)),w(n)&&(n=new Date(n)),!x(n))return n;for(;i;)s=nr.exec(i),s?(c=R(c,s,1),i=c.pop()):(c.push(i),i=null);return r&&"UTC"===r&&(n=new Date(n.getTime()),n.setMinutes(n.getMinutes()+n.getTimezoneOffset())),o(c,function(t){a=tr[t],l+=a?a(n,e.DATETIME_FORMATS):t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}}function un(){return function(e){return U(e,!0)}}function dn(){return function(e,t){if(w(e)&&(e=e.toString()),!Zn(e)&&!b(e))return e;if(t=Math.abs(Number(t))===1/0?Number(t):f(t),b(e))return t?t>=0?e.slice(0,t):e.slice(t,e.length):"";var n,i,r=[];for(t>e.length?t=e.length:t<-e.length&&(t=-e.length),t>0?(n=0,i=t):(n=e.length+t,i=e.length);n<i;n++)r.push(e[n]);return r}}function fn(e){return function(t,n,i){function o(e,t){for(var i=0;i<n.length;i++){var r=n[i](e,t);if(0!==r)return r}return 0}function a(e,t){return t?function(t,n){return e(n,t)}:e}function s(e,t){var n=typeof e,i=typeof t;return n==i?(x(e)&&x(t)&&(e=e.valueOf(),t=t.valueOf()),"string"==n&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t?0:e<t?-1:1):n<i?-1:1}if(!r(t))return t;n=Zn(n)?n:[n],0===n.length&&(n=["+"]),n=n.map(function(t){var n=!1,i=t||g;if(b(t)){if("+"!=t.charAt(0)&&"-"!=t.charAt(0)||(n="-"==t.charAt(0),t=t.substring(1)),""===t)return a(function(e,t){return s(e,t)},n);if(i=e(t),i.constant){var r=i();return a(function(e,t){return s(e[r],t[r])},n)}}return a(function(e,t){return s(i(e),i(t))},n)});for(var l=[],c=0;c<t.length;c++)l.push(t[c]);return l.sort(a(o,i))}}function hn(e){return C(e)&&(e={link:e}),e.restrict=e.restrict||"AC",m(e)}function pn(e,t){e.$name=t}function gn(e,t,i,r,a){var s=this,l=[],c=s.$$parentForm=e.parent().controller("form")||lr;s.$error={},s.$$success={},s.$pending=n,s.$name=a(t.name||t.ngForm||"")(i),s.$dirty=!1,s.$pristine=!0,s.$valid=!0,s.$invalid=!1,s.$submitted=!1,c.$addControl(s),s.$rollbackViewValue=function(){o(l,function(e){e.$rollbackViewValue()})},s.$commitViewValue=function(){o(l,function(e){e.$commitViewValue()})},s.$addControl=function(e){re(e.$name,"input"),l.push(e),e.$name&&(s[e.$name]=e)},s.$$renameControl=function(e,t){var n=e.$name;s[n]===e&&delete s[n],s[t]=e,e.$name=t},s.$removeControl=function(e){e.$name&&s[e.$name]===e&&delete s[e.$name],o(s.$pending,function(t,n){s.$setValidity(n,null,e)}),o(s.$error,function(t,n){s.$setValidity(n,null,e)}),N(l,e)},An({ctrl:this,$element:e,set:function(e,t,n){var i=e[t];if(i){-1===i.indexOf(n)&&i.push(n)}else e[t]=[n]},unset:function(e,t,n){var i=e[t];i&&(N(i,n),0===i.length&&delete e[t])},parentForm:c,$animate:r}),s.$setDirty=function(){r.removeClass(e,Dr),r.addClass(e,Ar),s.$dirty=!0,s.$pristine=!1,c.$setDirty()},s.$setPristine=function(){r.setClass(e,Dr,Ar+" "+cr),s.$dirty=!1,s.$pristine=!0,s.$submitted=!1,o(l,function(e){e.$setPristine()})},s.$setUntouched=function(){o(l,function(e){e.$setUntouched()})},s.$setSubmitted=function(){r.addClass(e,cr),s.$submitted=!0,c.$setSubmitted()}}function mn(e){e.$formatters.push(function(t){return e.$isEmpty(t)?t:t.toString()})}function vn(e,t,n,i,r,o){$n(e,t,n,i,r,o),mn(i)}function $n(e,t,n,i,r,o){var a=(t.prop(Pn),t[0].placeholder),s={},l=Nn(t[0].type);if(!r.android){var c=!1;t.on("compositionstart",function(e){c=!0}),t.on("compositionend",function(){c=!1,u()})}var u=function(e){if(!c){var r=t.val(),o=e&&e.type;if(Vn&&"input"===(e||s).type&&t[0].placeholder!==a)return void(a=t[0].placeholder);"password"===l||n.ngTrim&&"false"===n.ngTrim||(r=Jn(r)),(i.$viewValue!==r||""===r&&i.$$hasNativeValidators)&&i.$setViewValue(r,o)}};if(r.hasEvent("input"))t.on("input",u);else{var d,f=function(e){d||(d=o.defer(function(){u(e),d=null}))};t.on("keydown",function(e){var t=e.keyCode;91===t||15<t&&t<19||37<=t&&t<=40||f(e)}),r.hasEvent("paste")&&t.on("paste cut",f)}t.on("change",u),i.$render=function(){t.val(i.$isEmpty(i.$modelValue)?"":i.$viewValue)}}function yn(e,t){if(x(e))return e;if(b(e)){yr.lastIndex=0;var n=yr.exec(e);if(n){var i=+n[1],r=+n[2],o=0,a=0,s=0,l=0,c=on(i),u=7*(r-1);return t&&(o=t.getHours(),a=t.getMinutes(),s=t.getSeconds(),l=t.getMilliseconds()),new Date(i,0,c.getDate()+u,o,a,s,l)}}return NaN}function bn(e,t){return function(n,i){var r,a;if(x(n))return n;if(b(n)){if('"'==n.charAt(0)&&'"'==n.charAt(n.length-1)&&(n=n.substring(1,n.length-1)),hr.test(n))return new Date(n);if(e.lastIndex=0,r=e.exec(n))return r.shift(),a=i?{yyyy:i.getFullYear(),MM:i.getMonth()+1,dd:i.getDate(),HH:i.getHours(),mm:i.getMinutes(),ss:i.getSeconds(),sss:i.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},o(r,function(e,n){n<t.length&&(a[t[n]]=+e)}),new Date(a.yyyy,a.MM-1,a.dd,a.HH,a.mm,a.ss||0,1e3*a.sss||0)}return NaN}}function wn(e,t,i,r){return function(o,a,s,l,c,u,d){function f(e){return $(e)?x(e)?e:i(e):n}xn(o,a,s,l),$n(o,a,s,l,c,u);var h,p=l&&l.$options&&l.$options.timezone;if(l.$$parserName=e,l.$parsers.push(function(e){if(l.$isEmpty(e))return null;if(t.test(e)){var r=i(e,h);return"UTC"===p&&r.setMinutes(r.getMinutes()-r.getTimezoneOffset()),r}return n}),l.$formatters.push(function(e){if(!l.$isEmpty(e)){if(!x(e))throw Cr("datefmt","Expected `{0}` to be a date",e);if((h=e)&&"UTC"===p){var t=6e4*h.getTimezoneOffset();h=new Date(h.getTime()+t)}return d("date")(e,r,p)}return h=null,""}),$(s.min)||s.ngMin){var g;l.$validators.min=function(e){return l.$isEmpty(e)||v(g)||i(e)>=g},s.$observe("min",function(e){g=f(e),l.$validate()})}if($(s.max)||s.ngMax){var m;l.$validators.max=function(e){return l.$isEmpty(e)||v(m)||i(e)<=m},s.$observe("max",function(e){m=f(e),l.$validate()})}l.$isEmpty=function(e){return!e||e.getTime&&e.getTime()!==e.getTime()}}}function xn(e,t,i,r){var o=t[0];(r.$$hasNativeValidators=y(o.validity))&&r.$parsers.push(function(e){var i=t.prop(Pn)||{};return i.badInput&&!i.typeMismatch?n:e})}function Cn(e,t,i,r,o,a){if(xn(e,t,i,r),$n(e,t,i,r,o,a),r.$$parserName="number",r.$parsers.push(function(e){return r.$isEmpty(e)?null:mr.test(e)?parseFloat(e):n}),r.$formatters.push(function(e){if(!r.$isEmpty(e)){if(!w(e))throw Cr("numfmt","Expected `{0}` to be a number",e);e=e.toString()}return e}),i.min||i.ngMin){var s;r.$validators.min=function(e){return r.$isEmpty(e)||v(s)||e>=s},i.$observe("min",function(e){$(e)&&!w(e)&&(e=parseFloat(e,10)),s=w(e)&&!isNaN(e)?e:n,r.$validate()})}if(i.max||i.ngMax){var l;r.$validators.max=function(e){return r.$isEmpty(e)||v(l)||e<=l},i.$observe("max",function(e){$(e)&&!w(e)&&(e=parseFloat(e,10)),l=w(e)&&!isNaN(e)?e:n,r.$validate()})}}function kn(e,t,n,i,r,o){$n(e,t,n,i,r,o),mn(i),i.$$parserName="url",i.$validators.url=function(e){return i.$isEmpty(e)||pr.test(e)}}function Sn(e,t,n,i,r,o){$n(e,t,n,i,r,o),mn(i),i.$$parserName="email",i.$validators.email=function(e){return i.$isEmpty(e)||gr.test(e)}}function En(e,t,n,i){v(n.name)&&t.attr("name",c());var r=function(e){t[0].checked&&i.$setViewValue(n.value,e&&e.type)};t.on("click",r),i.$render=function(){var e=n.value;t[0].checked=e==i.$viewValue},n.$observe("value",i.$render)}function Tn(e,t,n,r,o){var a;if($(r)){if(a=e(r),!a.constant)throw i("ngModel")("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,r);return a(t)}return o}function Dn(e,t,n,i,r,o,a,s){var l=Tn(s,e,"ngTrueValue",n.ngTrueValue,!0),c=Tn(s,e,"ngFalseValue",n.ngFalseValue,!1),u=function(e){i.$setViewValue(t[0].checked,e&&e.type)};t.on("click",u),i.$render=function(){t[0].checked=i.$viewValue},i.$isEmpty=function(e){return e!==l},i.$formatters.push(function(e){return L(e,l)}),i.$parsers.push(function(e){return e?l:c})}function An(e){function t(e,t,l){t===n?i("$pending",e,l):r("$pending",e,l),A(t)?t?(d(s.$error,e,l),u(s.$$success,e,l)):(u(s.$error,e,l),d(s.$$success,e,l)):(d(s.$error,e,l),d(s.$$success,e,l)),s.$pending?(o(Mr,!0),s.$valid=s.$invalid=n,a("",null)):(o(Mr,!1),s.$valid=Mn(s.$error),s.$invalid=!s.$valid,a("",s.$valid));var c;c=s.$pending&&s.$pending[e]?n:!s.$error[e]&&(!!s.$$success[e]||null),a(e,c),f.$setValidity(e,c,s)}function i(e,t,n){s[e]||(s[e]={}),u(s[e],t,n)}function r(e,t,i){s[e]&&d(s[e],t,i),Mn(s[e])&&(s[e]=n)}function o(e,t){t&&!c[e]?(h.addClass(l,e),c[e]=!0):!t&&c[e]&&(h.removeClass(l,e),c[e]=!1)}function a(e,t){e=e?"-"+te(e,"-"):"",o(Er+e,!0===t),o(Tr+e,!1===t)}var s=e.ctrl,l=e.$element,c={},u=e.set,d=e.unset,f=e.parentForm,h=e.$animate;c[Tr]=!(c[Er]=l.hasClass(Er)),s.$setValidity=t}function Mn(e){if(e)for(var t in e)return!1;return!0}function On(e,t){return e="ngClass"+e,["$animate",function(n){function i(e,t){var n=[];e:for(var i=0;i<e.length;i++){for(var r=e[i],o=0;o<t.length;o++)if(r==t[o])continue e;n.push(r)}return n}function r(e){if(Zn(e))return e;if(b(e))return e.split(" ");if(y(e)){var t=[];return o(e,function(e,n){e&&(t=t.concat(n.split(" ")))}),t}return e}return{restrict:"AC",link:function(a,s,l){function c(e){var t=d(e,1);l.$addClass(t)}function u(e){var t=d(e,-1);l.$removeClass(t)}function d(e,t){var n=s.data("$classCounts")||{},i=[];return o(e,function(e){(t>0||n[e])&&(n[e]=(n[e]||0)+t,n[e]===+(t>0)&&i.push(e))}),s.data("$classCounts",n),i.join(" ")}function f(e,t){var r=i(t,e),o=i(e,t);r=d(r,1),o=d(o,-1),r&&r.length&&n.addClass(s,r),o&&o.length&&n.removeClass(s,o)}function h(e){if(!0===t||a.$index%2===t){var n=r(e||[]);if(p){if(!L(e,p)){var i=r(p);f(i,n)}}else c(n)}p=F(e)}var p;a.$watch(l[e],h,!0),l.$observe("class",function(t){h(a.$eval(l[e]))}),"ngClass"!==e&&a.$watch("$index",function(n,i){var o=1&n;if(o!==(1&i)){var s=r(a.$eval(l[e]));o===t?c(s):u(s)}})}}}]}var In=/^\/(.+)\/([a-z]*)$/,Pn="validity",Nn=function(e){return b(e)?e.toLowerCase():e},jn=Object.prototype.hasOwnProperty,Fn=function(e){return b(e)?e.toUpperCase():e},Ln=function(e){return b(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(32|e.charCodeAt(0))}):e},Rn=function(e){return b(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(-33&e.charCodeAt(0))}):e};"i"!=="I".toLowerCase()&&(Nn=Ln,Fn=Rn);var Vn,Hn,qn,Un,_n=[].slice,Bn=[].splice,Wn=[].push,zn=Object.prototype.toString,Yn=i("ng"),Kn=e.angular||(e.angular={}),Gn=0;Vn=t.documentMode,p.$inject=[],g.$inject=[];var Xn,Zn=Array.isArray,Jn=function(e){return b(e)?e.trim():e},Qn=function(){if($(Qn.isActive_))return Qn.isActive_;var e=!(!t.querySelector("[ng-csp]")&&!t.querySelector("[data-ng-csp]"));if(!e)try{new Function("")}catch(t){e=!0}return Qn.isActive_=e},ei=["ng-","data-ng-","ng:","x-ng-"],ti=/[A-Z]/g,ni=!1,ii=1,ri=3,oi=8,ai=9,si=11,li={full:"1.3.0",major:1,minor:3,dot:0,codeName:"superluminal-nudge"};ge.expando="ng339";var ci=ge.cache={},ui=1,di=function(e,t,n){e.addEventListener(t,n,!1)},fi=function(e,t,n){e.removeEventListener(t,n,!1)};ge._data=function(e){return this.cache[e[this.expando]]||{}};var hi=/([\:\-\_]+(.))/g,pi=/^moz([A-Z])/,gi={mouseleave:"mouseout",mouseenter:"mouseover"},mi=i("jqLite"),vi=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,$i=/<|&#?\w+;/,yi=/<([\w:]+)/,bi=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,wi={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};wi.optgroup=wi.option,wi.tbody=wi.tfoot=wi.colgroup=wi.caption=wi.thead,wi.th=wi.td;var xi=ge.prototype={ready:function(n){function i(){r||(r=!0,n())}var r=!1;"complete"===t.readyState?setTimeout(i):(this.on("DOMContentLoaded",i),ge(e).on("load",i),this.on("DOMContentLoaded",i))},toString:function(){var e=[];return o(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return Hn(e>=0?this[e]:this[this.length+e])},length:0,push:Wn,sort:[].sort,splice:[].splice},Ci={};o("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(e){Ci[Nn(e)]=e});var ki={};o("input,select,option,textarea,button,form,details".split(","),function(e){ki[e]=!0});var Si={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};o({data:we,removeData:ye},function(e,t){ge[t]=e}),o({data:we,inheritedData:Te,scope:function(e){return Hn.data(e,"$scope")||Te(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return Hn.data(e,"$isolateScope")||Hn.data(e,"$isolateScopeNoTemplate")},controller:Ee,injector:function(e){return Te(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:xe,css:function(e,t,n){if(t=ue(t),!$(n))return e.style[t];e.style[t]=n},attr:function(e,t,i){var r=Nn(t);if(Ci[r]){if(!$(i))return e[t]||(e.attributes.getNamedItem(t)||p).specified?r:n;i?(e[t]=!0,e.setAttribute(t,r)):(e[t]=!1,e.removeAttribute(r))}else if($(i))e.setAttribute(t,i);else if(e.getAttribute){var o=e.getAttribute(t,2);return null===o?n:o}},prop:function(e,t,n){if(!$(n))return e[t];e[t]=n},text:function(){function e(e,t){if(v(t)){var n=e.nodeType;return n===ii||n===ri?e.textContent:""}e.textContent=t}return e.$dv="",e}(),val:function(e,t){if(v(t)){if(e.multiple&&"select"===P(e)){var n=[];return o(e.options,function(e){e.selected&&n.push(e.value||e.text)}),0===n.length?null:n}return e.value}e.value=t},html:function(e,t){if(v(t))return e.innerHTML;ve(e,!0),e.innerHTML=t},empty:De},function(e,t){ge.prototype[t]=function(t,i){var r,o,a=this.length;if(e!==De&&(2==e.length&&e!==xe&&e!==Ee?t:i)===n){if(y(t)){for(r=0;r<a;r++)if(e===we)e(this[r],t);else for(o in t)e(this[r],o,t[o]);return this}for(var s=e.$dv,l=s===n?Math.min(a,1):a,c=0;c<l;c++){var u=e(this[c],t,i);s=s?s+u:u}return s}for(r=0;r<a;r++)e(this[r],t,i);return this}}),o({removeData:ye,on:function e(t,n,i,r){if($(r))throw mi("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(fe(t)){var o=be(t,!0),a=o.events,s=o.handle;s||(s=o.handle=Pe(t,a));for(var l=n.indexOf(" ")>=0?n.split(" "):[n],c=l.length;c--;){n=l[c];var u=a[n];u||(a[n]=[],"mouseenter"===n||"mouseleave"===n?e(t,gi[n],function(e){var t=this,i=e.relatedTarget;i&&(i===t||t.contains(i))||s(e,n)}):"$destroy"!==n&&di(t,n,s),u=a[n]),u.push(i)}}},off:$e,one:function(e,t,n){e=Hn(e),e.on(t,function i(){e.off(t,n),e.off(t,i)}),e.on(t,n)},replaceWith:function(e,t){var n,i=e.parentNode;ve(e),o(new ge(t),function(t){n?i.insertBefore(t,n.nextSibling):i.replaceChild(t,e),n=t})},children:function(e){var t=[];return o(e.childNodes,function(e){e.nodeType===ii&&t.push(e)}),t},contents:function(e){return e.contentDocument||e.childNodes||[]},append:function(e,t){var n=e.nodeType;if(n===ii||n===si){t=new ge(t);for(var i=0,r=t.length;i<r;i++){var o=t[i];e.appendChild(o)}}},prepend:function(e,t){if(e.nodeType===ii){var n=e.firstChild;o(new ge(t),function(t){e.insertBefore(t,n)})}},wrap:function(e,t){t=Hn(t).eq(0).clone()[0];var n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)},remove:Ae,detach:function(e){Ae(e,!0)},after:function(e,t){var n=e,i=e.parentNode;t=new ge(t);for(var r=0,o=t.length;r<o;r++){var a=t[r];i.insertBefore(a,n.nextSibling),n=a}},addClass:ke,removeClass:Ce,toggleClass:function(e,t,n){t&&o(t.split(" "),function(t){var i=n;v(i)&&(i=!xe(e,t)),(i?ke:Ce)(e,t)})},parent:function(e){var t=e.parentNode;return t&&t.nodeType!==si?t:null},next:function(e){return e.nextElementSibling},find:function(e,t){return e.getElementsByTagName?e.getElementsByTagName(t):[]},clone:me,triggerHandler:function(e,t,n){var i,r,a,s=t.type||t,l=be(e),c=l&&l.events,u=c&&c[s];u&&(i={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:p,type:s,target:e},t.type&&(i=d(i,t)),r=F(u),a=n?[i].concat(n):[i],o(r,function(t){i.isImmediatePropagationStopped()||t.apply(e,a)}))}},function(e,t){ge.prototype[t]=function(t,n,i){for(var r,o=0,a=this.length;o<a;o++)v(r)?(r=e(this[o],t,n,i),$(r)&&(r=Hn(r))):Se(r,e(this[o],t,n,i));return $(r)?r:this},ge.prototype.bind=ge.prototype.on,ge.prototype.unbind=ge.prototype.off}),je.prototype={put:function(e,t){this[Ne(e,this.nextUid)]=t},get:function(e){return this[Ne(e,this.nextUid)]},remove:function(e){var t=this[e=Ne(e,this.nextUid)];return delete this[e],t}};var Ei=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,Ti=/,/,Di=/^\s*(_?)(\S+?)\1\s*$/,Ai=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Mi=i("$injector");Re.$$annotate=Le;var Oi=i("$animate"),Ii=["$provide",function(e){this.$$selectors={},this.register=function(t,n){var i=t+"-animation";if(t&&"."!=t.charAt(0))throw Oi("notcsel","Expecting class selector starting with '.' got '{0}'.",t);this.$$selectors[t.substr(1)]=i,e.factory(i,n)},this.classNameFilter=function(e){return 1===arguments.length&&(this.$$classNameFilter=e instanceof RegExp?e:null),this.$$classNameFilter},this.$get=["$$q","$$asyncCallback","$rootScope",function(e,t,n){function i(t){var i,r=e.defer();return r.promise.$$cancelFn=function(){i&&i()},n.$$postDigest(function(){i=t(function(){r.resolve()})}),r.promise}function r(e,t){var n=[],i=[],r=se();return o((e.attr("class")||"").split(/\s+/),function(e){r[e]=!0}),o(t,function(e,t){var o=r[t];!1===e&&o?i.push(t):!0!==e||o||n.push(t)}),n.length+i.length>0&&[n.length?n:null,i.length?i:null]}function a(e,t,n){for(var i=0,r=t.length;i<r;++i){e[t[i]]=n}}function s(){return c||(c=e.defer(),t(function(){c.resolve(),c=null})),c.promise}function l(e,t){if(Kn.isObject(t)){var n=d(t.from||{},t.to||{});e.css(n)}}var c;return{animate:function(e,t,n){return l(e,{from:t,to:n}),s()},enter:function(e,t,n,i){return l(e,i),n?n.after(e):t.prepend(e),s()},leave:function(e,t){return e.remove(),s()},move:function(e,t,n,i){return this.enter(e,t,n,i)},addClass:function(e,t,n){return this.setClass(e,t,[],n)},$$addClassImmediately:function(e,t,n){return e=Hn(e),t=b(t)?t:Zn(t)?t.join(" "):"",o(e,function(e){ke(e,t)}),l(e,n),s()},removeClass:function(e,t,n){return this.setClass(e,[],t,n)},$$removeClassImmediately:function(e,t,n){return e=Hn(e),t=b(t)?t:Zn(t)?t.join(" "):"",o(e,function(e){Ce(e,t)}),l(e,n),s()},setClass:function(e,t,n,o){var s=this,l=!1;e=Hn(e);var c=e.data("$$animateClasses");c?o&&c.options&&(c.options=Kn.extend(c.options||{},o)):(c={classes:{},options:o},l=!0);var u=c.classes;return t=Zn(t)?t:t.split(" "),n=Zn(n)?n:n.split(" "),a(u,t,!0),a(u,n,!1),l&&(c.promise=i(function(t){var n=e.data("$$animateClasses");if(e.removeData("$$animateClasses"),n){var i=r(e,n.classes);i&&s.$$setClassImmediately(e,i[0],i[1],n.options)}t()}),
-e.data("$$animateClasses",c)),c.promise},$$setClassImmediately:function(e,t,n,i){return t&&this.$$addClassImmediately(e,t),n&&this.$$removeClassImmediately(e,n),l(e,i),s()},enabled:p,cancel:p}}]}],Pi=i("$compile");We.$inject=["$provide","$$sanitizeUriProvider"];var Ni=/^(x[\:\-_]|data[\:\-_])/i,ji=i("$interpolate"),Fi=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,Li={http:80,https:443,ftp:21},Ri=i("$location"),Vi={$$html5:!1,$$replace:!1,absUrl:yt("$$absUrl"),url:function(e){if(v(e))return this.$$url;var t=Fi.exec(e);return t[1]&&this.path(decodeURIComponent(t[1])),(t[2]||t[1])&&this.search(t[3]||""),this.hash(t[5]||""),this},protocol:yt("$$protocol"),host:yt("$$host"),port:yt("$$port"),path:bt("$$path",function(e){return e=null!==e?e.toString():"","/"==e.charAt(0)?e:"/"+e}),search:function(e,t){switch(arguments.length){case 0:return this.$$search;case 1:if(b(e)||w(e))e=e.toString(),this.$$search=z(e);else{if(!y(e))throw Ri("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");e=j(e,{}),o(e,function(t,n){null==t&&delete e[n]}),this.$$search=e}break;default:v(t)||null===t?delete this.$$search[e]:this.$$search[e]=t}return this.$$compose(),this},hash:bt("$$hash",function(e){return null!==e?e.toString():""}),replace:function(){return this.$$replace=!0,this}};o([$t,vt,mt],function(e){e.prototype=Object.create(Vi),e.prototype.state=function(t){if(!arguments.length)return this.$$state;if(e!==mt||!this.$$html5)throw Ri("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=v(t)?null:t,this}});var Hi=i("$parse"),qi=Function.prototype.call,Ui=Function.prototype.apply,_i=Function.prototype.bind,Bi=se();o({null:function(){return null},true:function(){return!0},false:function(){return!1},undefined:function(){}},function(e,t){e.constant=e.literal=e.sharedGetter=!0,Bi[t]=e}),Bi.this=function(e){return e},Bi.this.sharedGetter=!0;var Wi=d(se(),{"+":function(e,t,i,r){return i=i(e,t),r=r(e,t),$(i)?$(r)?i+r:i:$(r)?r:n},"-":function(e,t,n,i){return n=n(e,t),i=i(e,t),($(n)?n:0)-($(i)?i:0)},"*":function(e,t,n,i){return n(e,t)*i(e,t)},"/":function(e,t,n,i){return n(e,t)/i(e,t)},"%":function(e,t,n,i){return n(e,t)%i(e,t)},"===":function(e,t,n,i){return n(e,t)===i(e,t)},"!==":function(e,t,n,i){return n(e,t)!==i(e,t)},"==":function(e,t,n,i){return n(e,t)==i(e,t)},"!=":function(e,t,n,i){return n(e,t)!=i(e,t)},"<":function(e,t,n,i){return n(e,t)<i(e,t)},">":function(e,t,n,i){return n(e,t)>i(e,t)},"<=":function(e,t,n,i){return n(e,t)<=i(e,t)},">=":function(e,t,n,i){return n(e,t)>=i(e,t)},"&&":function(e,t,n,i){return n(e,t)&&i(e,t)},"||":function(e,t,n,i){return n(e,t)||i(e,t)},"!":function(e,t,n){return!n(e,t)},"=":!0,"|":!0}),zi={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Yi=function(e){this.options=e};Yi.prototype={constructor:Yi,lex:function(e){for(this.text=e,this.index=0,this.ch=n,this.tokens=[];this.index<this.text.length;)if(this.ch=this.text.charAt(this.index),this.is("\"'"))this.readString(this.ch);else if(this.isNumber(this.ch)||this.is(".")&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(this.ch))this.readIdent();else if(this.is("(){}[].,;:?"))this.tokens.push({index:this.index,text:this.ch}),this.index++;else if(this.isWhitespace(this.ch))this.index++;else{var t=this.ch+this.peek(),i=t+this.peek(2),r=Wi[this.ch],o=Wi[t],a=Wi[i];a?(this.tokens.push({index:this.index,text:i,fn:a}),this.index+=3):o?(this.tokens.push({index:this.index,text:t,fn:o}),this.index+=2):r?(this.tokens.push({index:this.index,text:this.ch,fn:r}),this.index+=1):this.throwError("Unexpected next character ",this.index,this.index+1)}return this.tokens},is:function(e){return-1!==e.indexOf(this.ch)},peek:function(e){var t=e||1;return this.index+t<this.text.length&&this.text.charAt(this.index+t)},isNumber:function(e){return"0"<=e&&e<="9"},isWhitespace:function(e){return" "===e||"\r"===e||"\t"===e||"\n"===e||"\v"===e||" "===e},isIdent:function(e){return"a"<=e&&e<="z"||"A"<=e&&e<="Z"||"_"===e||"$"===e},isExpOperator:function(e){return"-"===e||"+"===e||this.isNumber(e)},throwError:function(e,t,n){n=n||this.index;var i=$(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,n)+"]":" "+n;throw Hi("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",e,i,this.text)},readNumber:function(){for(var e="",t=this.index;this.index<this.text.length;){var n=Nn(this.text.charAt(this.index));if("."==n||this.isNumber(n))e+=n;else{var i=this.peek();if("e"==n&&this.isExpOperator(i))e+=n;else if(this.isExpOperator(n)&&i&&this.isNumber(i)&&"e"==e.charAt(e.length-1))e+=n;else{if(!this.isExpOperator(n)||i&&this.isNumber(i)||"e"!=e.charAt(e.length-1))break;this.throwError("Invalid exponent")}}this.index++}e*=1,this.tokens.push({index:t,text:e,constant:!0,fn:function(){return e}})},readIdent:function(){for(var e,t,i,r,o=this.text,a="",s=this.index;this.index<this.text.length&&("."===(r=this.text.charAt(this.index))||this.isIdent(r)||this.isNumber(r));)"."===r&&(e=this.index),a+=r,this.index++;if(e&&"."===a[a.length-1]&&(this.index--,a=a.slice(0,-1),-1===(e=a.lastIndexOf("."))&&(e=n)),e)for(t=this.index;t<this.text.length;){if("("===(r=this.text.charAt(t))){i=a.substr(e-s+1),a=a.substr(0,e-s),this.index=t;break}if(!this.isWhitespace(r))break;t++}this.tokens.push({index:s,text:a,fn:Bi[a]||At(a,this.options,o)}),i&&(this.tokens.push({index:e,text:"."}),this.tokens.push({index:e+1,text:i}))},readString:function(e){var t=this.index;this.index++;for(var n="",i=e,r=!1;this.index<this.text.length;){var o=this.text.charAt(this.index);if(i+=o,r){if("u"===o){var a=this.text.substring(this.index+1,this.index+5);a.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+a+"]"),this.index+=4,n+=String.fromCharCode(parseInt(a,16))}else{n+=zi[o]||o}r=!1}else if("\\"===o)r=!0;else{if(o===e)return this.index++,void this.tokens.push({index:t,text:i,string:n,constant:!0,fn:function(){return n}});n+=o}this.index++}this.throwError("Unterminated quote",t)}};var Ki=function(e,t,n){this.lexer=e,this.$filter=t,this.options=n};Ki.ZERO=d(function(){return 0},{sharedGetter:!0,constant:!0}),Ki.prototype={constructor:Ki,parse:function(e){this.text=e,this.tokens=this.lexer.lex(e);var t=this.statements();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),t.literal=!!t.literal,t.constant=!!t.constant,t},primary:function(){var e;if(this.expect("("))e=this.filterChain(),this.consume(")");else if(this.expect("["))e=this.arrayDeclaration();else if(this.expect("{"))e=this.object();else{var t=this.expect();e=t.fn,e||this.throwError("not a primary expression",t),t.constant&&(e.constant=!0,e.literal=!0)}for(var n,i;n=this.expect("(","[",".");)"("===n.text?(e=this.functionCall(e,i),i=null):"["===n.text?(i=e,e=this.objectIndex(e)):"."===n.text?(i=e,e=this.fieldAccess(e)):this.throwError("IMPOSSIBLE");return e},throwError:function(e,t){throw Hi("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",t.text,e,t.index+1,this.text,this.text.substring(t.index))},peekToken:function(){if(0===this.tokens.length)throw Hi("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(e,t,n,i){if(this.tokens.length>0){var r=this.tokens[0],o=r.text;if(o===e||o===t||o===n||o===i||!e&&!t&&!n&&!i)return r}return!1},expect:function(e,t,n,i){var r=this.peek(e,t,n,i);return!!r&&(this.tokens.shift(),r)},consume:function(e){this.expect(e)||this.throwError("is unexpected, expecting ["+e+"]",this.peek())},unaryFn:function(e,t){return d(function(n,i){return e(n,i,t)},{constant:t.constant,inputs:[t]})},binaryFn:function(e,t,n,i){return d(function(i,r){return t(i,r,e,n)},{constant:e.constant&&n.constant,inputs:!i&&[e,n]})},statements:function(){for(var e=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&e.push(this.filterChain()),!this.expect(";"))return 1===e.length?e[0]:function(t,n){for(var i,r=0,o=e.length;r<o;r++)i=e[r](t,n);return i}},filterChain:function(){for(var e=this.expression();this.expect("|");)e=this.filter(e);return e},filter:function(e){var t,i,r=this.expect(),o=this.$filter(r.text);if(this.peek(":"))for(t=[],i=[];this.expect(":");)t.push(this.expression());var a=[e].concat(t||[]);return d(function(r,a){var s=e(r,a);if(i){i[0]=s;for(var l=t.length;l--;)i[l+1]=t[l](r,a);return o.apply(n,i)}return o(s)},{constant:!o.$stateful&&a.every(Et),inputs:!o.$stateful&&a})},expression:function(){return this.assignment()},assignment:function(){var e,t,n=this.ternary();return(t=this.expect("="))?(n.assign||this.throwError("implies assignment but ["+this.text.substring(0,t.index)+"] can not be assigned to",t),e=this.ternary(),d(function(t,i){return n.assign(t,e(t,i),i)},{inputs:[n,e]})):n},ternary:function(){var e,t,n=this.logicalOR();if(t=this.expect("?")){if(e=this.assignment(),t=this.expect(":")){var i=this.assignment();return d(function(t,r){return n(t,r)?e(t,r):i(t,r)},{constant:n.constant&&e.constant&&i.constant})}this.throwError("expected :",t)}return n},logicalOR:function(){for(var e,t=this.logicalAND();e=this.expect("||");)t=this.binaryFn(t,e.fn,this.logicalAND(),!0);return t},logicalAND:function(){var e,t=this.equality();return(e=this.expect("&&"))&&(t=this.binaryFn(t,e.fn,this.logicalAND(),!0)),t},equality:function(){var e,t=this.relational();return(e=this.expect("==","!=","===","!=="))&&(t=this.binaryFn(t,e.fn,this.equality())),t},relational:function(){var e,t=this.additive();return(e=this.expect("<",">","<=",">="))&&(t=this.binaryFn(t,e.fn,this.relational())),t},additive:function(){for(var e,t=this.multiplicative();e=this.expect("+","-");)t=this.binaryFn(t,e.fn,this.multiplicative());return t},multiplicative:function(){for(var e,t=this.unary();e=this.expect("*","/","%");)t=this.binaryFn(t,e.fn,this.unary());return t},unary:function(){var e;return this.expect("+")?this.primary():(e=this.expect("-"))?this.binaryFn(Ki.ZERO,e.fn,this.unary()):(e=this.expect("!"))?this.unaryFn(e.fn,this.unary()):this.primary()},fieldAccess:function(e){var t=this.text,n=this.expect().text,i=At(n,this.options,t);return d(function(t,n,r){return i(r||e(t,n))},{assign:function(i,r,o){var a=e(i,o);return a||e.assign(i,a={}),Tt(a,n,r,t)}})},objectIndex:function(e){var t=this.text,i=this.expression();return this.consume("]"),d(function(r,o){var a=e(r,o),s=i(r,o);return Ct(s,t),a?kt(a[s],t):n},{assign:function(n,r,o){var a=Ct(i(n,o),t),s=kt(e(n,o),t);return s||e.assign(n,s={}),s[a]=r}})},functionCall:function(e,t){var n=[];if(")"!==this.peekToken().text)do{n.push(this.expression())}while(this.expect(","));this.consume(")");var i=this.text,r=n.length?[]:null;return function(o,a){var s=t?t(o,a):o,l=e(o,a,s)||p;if(r)for(var c=n.length;c--;)r[c]=kt(n[c](o,a),i);return kt(s,i),St(l,i),kt(l.apply?l.apply(s,r):l(r[0],r[1],r[2],r[3],r[4]),i)}},arrayDeclaration:function(){var e=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;var t=this.expression();e.push(t)}while(this.expect(","));return this.consume("]"),d(function(t,n){for(var i=[],r=0,o=e.length;r<o;r++)i.push(e[r](t,n));return i},{literal:!0,constant:e.every(Et),inputs:e})},object:function(){var e=[],t=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;var n=this.expect();e.push(n.string||n.text),this.consume(":");var i=this.expression();t.push(i)}while(this.expect(","));return this.consume("}"),d(function(n,i){for(var r={},o=0,a=t.length;o<a;o++)r[e[o]]=t[o](n,i);return r},{literal:!0,constant:t.every(Et),inputs:t})}};var Gi=se(),Xi=i("$sce"),Zi={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Pi=i("$compile"),Ji=t.createElement("a"),Qi=zt(e.location.href,!0);Gt.$inject=["$provide"],Zt.$inject=["$locale"],Jt.$inject=["$locale"];var er=".",tr={yyyy:tn("FullYear",4),yy:tn("FullYear",2,0,!0),y:tn("FullYear",1),MMMM:nn("Month"),MMM:nn("Month",!0),MM:tn("Month",2,1),M:tn("Month",1,1),dd:tn("Date",2),d:tn("Date",1),HH:tn("Hours",2),H:tn("Hours",1),hh:tn("Hours",2,-12),h:tn("Hours",1,-12),mm:tn("Minutes",2),m:tn("Minutes",1),ss:tn("Seconds",2),s:tn("Seconds",1),sss:tn("Milliseconds",3),EEEE:nn("Day"),EEE:nn("Day",!0),a:ln,Z:rn,ww:sn(2),w:sn(1)},nr=/((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|w+))(.*)/,ir=/^\-?\d+$/;cn.$inject=["$locale"];var rr=m(Nn),or=m(Fn);fn.$inject=["$parse"];var ar=m({restrict:"E",compile:function(e,t){if(!t.href&&!t.xlinkHref&&!t.name)return function(e,t){var n="[object SVGAnimatedString]"===zn.call(t.prop("href"))?"xlink:href":"href";t.on("click",function(e){t.attr(n)||e.preventDefault()})}}}),sr={};o(Ci,function(e,t){if("multiple"!=e){var n=ze("ng-"+t);sr[n]=function(){return{restrict:"A",priority:100,link:function(e,i,r){e.$watch(r[n],function(e){r.$set(t,!!e)})}}}}}),o(Si,function(e,t){sr[t]=function(){return{priority:100,link:function(e,n,i){if("ngPattern"===t&&"/"==i.ngPattern.charAt(0)){var r=i.ngPattern.match(In);if(r)return void i.$set("ngPattern",new RegExp(r[1],r[2]))}e.$watch(i[t],function(e){i.$set(t,e)})}}}}),o(["src","srcset","href"],function(e){var t=ze("ng-"+e);sr[t]=function(){return{priority:99,link:function(n,i,r){var o=e,a=e;"href"===e&&"[object SVGAnimatedString]"===zn.call(i.prop("href"))&&(a="xlinkHref",r.$attr[a]="xlink:href",o=null),r.$observe(t,function(t){if(!t)return void("href"===e&&r.$set(a,null));r.$set(a,t),Vn&&o&&i.prop(o,r[a])})}}}});var lr={$addControl:p,$$renameControl:pn,$removeControl:p,$setValidity:p,$setDirty:p,$setPristine:p,$setSubmitted:p},cr="ng-submitted";gn.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var ur=function(e){return["$timeout",function(t){return{name:"form",restrict:e?"EAC":"E",controller:gn,compile:function(e){return e.addClass(Dr).addClass(Er),{pre:function(e,i,r,o){if(!("action"in r)){var a=function(t){e.$apply(function(){o.$commitViewValue(),o.$setSubmitted()}),t.preventDefault?t.preventDefault():t.returnValue=!1};di(i[0],"submit",a),i.on("$destroy",function(){t(function(){fi(i[0],"submit",a)},0,!1)})}var s=o.$$parentForm,l=o.$name;l&&(Tt(e,l,o,l),r.$observe(r.name?"name":"ngForm",function(t){l!==t&&(Tt(e,l,n,l),l=t,Tt(e,l,o,l),s.$$renameControl(o,l))})),i.on("$destroy",function(){s.$removeControl(o),l&&Tt(e,l,n,l),d(o,lr)})}}}}}]},dr=ur(),fr=ur(!0),hr=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,pr=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,gr=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,mr=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,vr=/^(\d{4})-(\d{2})-(\d{2})$/,$r=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,yr=/^(\d{4})-W(\d\d)$/,br=/^(\d{4})-(\d\d)$/,wr=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,xr=/(\s+|^)default(\s+|$)/,Cr=new i("ngModel"),kr={text:vn,date:wn("date",vr,bn(vr,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":wn("datetimelocal",$r,bn($r,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:wn("time",wr,bn(wr,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:wn("week",yr,yn,"yyyy-Www"),month:wn("month",br,bn(br,["yyyy","MM"]),"yyyy-MM"),number:Cn,url:kn,email:Sn,radio:En,checkbox:Dn,hidden:p,button:p,submit:p,reset:p,file:p},Sr=["$browser","$sniffer","$filter","$parse",function(e,t,n,i){return{restrict:"E",require:["?ngModel"],link:{pre:function(r,o,a,s){s[0]&&(kr[Nn(a.type)]||kr.text)(r,o,a,s[0],t,e,n,i)}}}}],Er="ng-valid",Tr="ng-invalid",Dr="ng-pristine",Ar="ng-dirty",Mr="ng-pending",Or=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(e,t,i,r,a,s,l,c,u,d){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=n,this.$name=d(i.name||"",!1)(e);var f=a(i.ngModel),h=null,g=this,m=function(){var t=f(e);return g.$options&&g.$options.getterSetter&&C(t)&&(t=t()),t},y=function(t){var n;g.$options&&g.$options.getterSetter&&C(n=f(e))?n(g.$modelValue):f.assign(e,g.$modelValue)};this.$$setOptions=function(e){if(g.$options=e,!(f.assign||e&&e.getterSetter))throw Cr("nonassign","Expression '{0}' is non-assignable. Element: {1}",i.ngModel,B(r))},this.$render=p,this.$isEmpty=function(e){return v(e)||""===e||null===e||e!==e};var b=r.inheritedData("$formController")||lr,x=0;An({ctrl:this,$element:r,set:function(e,t){e[t]=!0},unset:function(e,t){delete e[t]},parentForm:b,$animate:s}),this.$setPristine=function(){g.$dirty=!1,g.$pristine=!0,s.removeClass(r,Ar),s.addClass(r,Dr)},this.$setUntouched=function(){g.$touched=!1,g.$untouched=!0,s.setClass(r,"ng-untouched","ng-touched")},this.$setTouched=function(){g.$touched=!0,g.$untouched=!1,s.setClass(r,"ng-touched","ng-untouched")},this.$rollbackViewValue=function(){l.cancel(h),g.$viewValue=g.$$lastCommittedViewValue,g.$render()},this.$validate=function(){w(g.$modelValue)&&isNaN(g.$modelValue)||this.$$parseAndValidate()},this.$$runValidators=function(e,t,i,r){function a(e,t){l===x&&g.$setValidity(e,t)}function s(e){l===x&&r(e)}x++;var l=x;return function(e){var t=g.$$parserName||"parse";if(e===n)a(t,null);else if(a(t,e),!e)return o(g.$validators,function(e,t){a(t,null)}),o(g.$asyncValidators,function(e,t){a(t,null)}),!1;return!0}(e)&&function(){var e=!0;return o(g.$validators,function(n,r){var o=n(t,i);e=e&&o,a(r,o)}),!!e||(o(g.$asyncValidators,function(e,t){a(t,null)}),!1)}()?void function(){var e=[],r=!0;o(g.$asyncValidators,function(o,s){var l=o(t,i);if(!M(l))throw Cr("$asyncValidators","Expected asynchronous validator to return a promise but got '{0}' instead.",l);a(s,n),e.push(l.then(function(){a(s,!0)},function(e){r=!1,a(s,!1)}))}),e.length?u.all(e).then(function(){s(r)},p):s(!0)}():void s(!1)},this.$commitViewValue=function(){var e=g.$viewValue;l.cancel(h),(g.$$lastCommittedViewValue!==e||""===e&&g.$$hasNativeValidators)&&(g.$$lastCommittedViewValue=e,g.$pristine&&(g.$dirty=!0,g.$pristine=!1,s.removeClass(r,Dr),s.addClass(r,Ar),b.$setDirty()),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function e(){g.$modelValue!==a&&g.$$writeModelToScope()}var t=g.$$lastCommittedViewValue,i=t,r=!v(i)||n;if(r)for(var o=0;o<g.$parsers.length;o++)if(i=g.$parsers[o](i),v(i)){r=!1;break}w(g.$modelValue)&&isNaN(g.$modelValue)&&(g.$modelValue=m());var a=g.$modelValue,s=g.$options&&g.$options.allowInvalid;s&&(g.$modelValue=i,e()),g.$$runValidators(r,i,t,function(t){s||(g.$modelValue=t?i:n,e())})},this.$$writeModelToScope=function(){y(g.$modelValue),o(g.$viewChangeListeners,function(e){try{e()}catch(e){t(e)}})},this.$setViewValue=function(e,t){g.$viewValue=e,g.$options&&!g.$options.updateOnDefault||g.$$debounceViewValueCommit(t)},this.$$debounceViewValueCommit=function(t){var n,i=0,r=g.$options;r&&$(r.debounce)&&(n=r.debounce,w(n)?i=n:w(n[t])?i=n[t]:w(n.default)&&(i=n.default)),l.cancel(h),i?h=l(function(){g.$commitViewValue()},i):c.$$phase?g.$commitViewValue():e.$apply(function(){g.$commitViewValue()})},e.$watch(function(){var e=m();if(e!==g.$modelValue){g.$modelValue=e;for(var t=g.$formatters,i=t.length,r=e;i--;)r=t[i](r);g.$viewValue!==r&&(g.$viewValue=g.$$lastCommittedViewValue=r,g.$render(),g.$$runValidators(n,e,r,p))}return e})}],Ir=function(){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:Or,priority:1,compile:function(e){return e.addClass(Dr).addClass("ng-untouched").addClass(Er),{pre:function(e,t,n,i){var r=i[0],o=i[1]||lr;r.$$setOptions(i[2]&&i[2].$options),o.$addControl(r),n.$observe("name",function(e){r.$name!==e&&o.$$renameControl(r,e)}),e.$on("$destroy",function(){o.$removeControl(r)})},post:function(e,t,n,i){var r=i[0];r.$options&&r.$options.updateOn&&t.on(r.$options.updateOn,function(e){r.$$debounceViewValueCommit(e&&e.type)}),t.on("blur",function(t){r.$touched||e.$apply(function(){r.$setTouched()})})}}}}},Pr=m({restrict:"A",require:"ngModel",link:function(e,t,n,i){i.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),Nr=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,i){i&&(n.required=!0,i.$validators.required=function(e){return!n.required||!i.$isEmpty(e)},n.$observe("required",function(){i.$validate()}))}}},jr=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,r,o){if(o){var a,s=r.ngPattern||r.pattern;r.$observe("pattern",function(e){if(b(e)&&e.length>0&&(e=new RegExp(e)),e&&!e.test)throw i("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",s,e,B(t));a=e||n,o.$validate()}),o.$validators.pattern=function(e){return o.$isEmpty(e)||v(a)||a.test(e)}}}}},Fr=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,i){if(i){var r=0;n.$observe("maxlength",function(e){r=f(e)||0,i.$validate()}),i.$validators.maxlength=function(e,t){return i.$isEmpty(e)||t.length<=r}}}}},Lr=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,i){if(i){var r=0;n.$observe("minlength",function(e){r=f(e)||0,i.$validate()}),i.$validators.minlength=function(e,t){return i.$isEmpty(e)||t.length>=r}}}}},Rr=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(e,t,i,r){var a=t.attr(i.$attr.ngList)||", ",s="false"!==i.ngTrim,l=s?Jn(a):a,c=function(e){if(!v(e)){var t=[];return e&&o(e.split(l),function(e){e&&t.push(s?Jn(e):e)}),t}};r.$parsers.push(c),r.$formatters.push(function(e){return Zn(e)?e.join(a):n}),r.$isEmpty=function(e){return!e||!e.length}}}},Vr=/^(true|false|\d+)$/,Hr=function(){return{restrict:"A",priority:100,compile:function(e,t){return Vr.test(t.ngValue)?function(e,t,n){n.$set("value",e.$eval(n.ngValue))}:function(e,t,n){e.$watch(n.ngValue,function(e){n.$set("value",e)})}}}},qr=function(){return{restrict:"A",controller:["$scope","$attrs",function(e,t){var i=this;this.$options=e.$eval(t.ngModelOptions),this.$options.updateOn!==n?(this.$options.updateOnDefault=!1,this.$options.updateOn=Jn(this.$options.updateOn.replace(xr,function(){return i.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},Ur=["$compile",function(e){return{restrict:"AC",compile:function(t){return e.$$addBindingClass(t),function(t,i,r){e.$$addBindingInfo(i,r.ngBind),i=i[0],t.$watch(r.ngBind,function(e){i.textContent=e===n?"":e})}}}}],_r=["$interpolate","$compile",function(e,t){return{compile:function(i){return t.$$addBindingClass(i),function(i,r,o){var a=e(r.attr(o.$attr.ngBindTemplate));t.$$addBindingInfo(r,a.expressions),r=r[0],o.$observe("ngBindTemplate",function(e){r.textContent=e===n?"":e})}}}}],Br=["$sce","$parse","$compile",function(e,t,n){return{restrict:"A",compile:function(i,r){var o=t(r.ngBindHtml),a=t(r.ngBindHtml,function(e){return(e||"").toString()});return n.$$addBindingClass(i),function(t,i,r){n.$$addBindingInfo(i,r.ngBindHtml),t.$watch(a,function(){i.html(e.getTrustedHtml(o(t))||"")})}}}}],Wr=On("",!0),zr=On("Odd",0),Yr=On("Even",1),Kr=hn({compile:function(e,t){t.$set("ngCloak",n),e.removeClass("ng-cloak")}}),Gr=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Xr={},Zr={blur:!0,focus:!0};o("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(e){var t=ze("ng-"+e);Xr[t]=["$parse","$rootScope",function(n,i){return{restrict:"A",compile:function(r,o){var a=n(o[t]);return function(t,n){n.on(e,function(n){var r=function(){a(t,{$event:n})};Zr[e]&&i.$$phase?t.$evalAsync(r):t.$apply(r)})}}}}]});var Jr=["$animate",function(e){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,i,r,o,a){var s,l,c;n.$watch(r.ngIf,function(n){n?l||a(function(n,o){l=o,n[n.length++]=t.createComment(" end ngIf: "+r.ngIf+" "),s={clone:n},e.enter(n,i.parent(),i)}):(c&&(c.remove(),c=null),l&&(l.$destroy(),l=null),s&&(c=ae(s.clone),e.leave(c).then(function(){c=null}),s=null))})}}}],Qr=["$templateRequest","$anchorScroll","$animate","$sce",function(e,t,n,i){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Kn.noop,compile:function(r,o){var a=o.ngInclude||o.src,s=o.onload||"",l=o.autoscroll;return function(r,o,c,u,d){var f,h,p,g=0,m=function(){h&&(h.remove(),h=null),f&&(f.$destroy(),f=null),p&&(n.leave(p).then(function(){h=null}),h=p,p=null)};r.$watch(i.parseAsResourceUrl(a),function(i){var a=function(){!$(l)||l&&!r.$eval(l)||t()},c=++g;i?(e(i,!0).then(function(e){if(c===g){var t=r.$new();u.template=e;var l=d(t,function(e){m(),n.enter(e,null,o).then(a)});f=t,p=l,f.$emit("$includeContentLoaded",i),r.$eval(s)}},function(){c===g&&(m(),r.$emit("$includeContentError",i))}),r.$emit("$includeContentRequested",i)):(m(),u.template=null)})}}}}],eo=["$compile",function(e){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(i,r,o,a){if(/SVG/.test(r[0].toString()))return r.empty(),void e(he(a.template,t).childNodes)(i,function(e){r.append(e)},n,n,r);r.html(a.template),e(r.contents())(i)}}}],to=hn({priority:450,compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),no=hn({terminal:!0,priority:1e3}),io=["$locale","$interpolate",function(e,t){var n=/{}/g;return{restrict:"EA",link:function(i,r,a){var s=a.count,l=a.$attr.when&&r.attr(a.$attr.when),c=a.offset||0,u=i.$eval(l)||{},d={},f=t.startSymbol(),h=t.endSymbol(),p=/^when(Minus)?(.+)$/;o(a,function(e,t){p.test(t)&&(u[Nn(t.replace("when","").replace("Minus","-"))]=r.attr(a.$attr[t]))}),o(u,function(e,i){d[i]=t(e.replace(n,f+s+"-"+c+h))}),i.$watch(function(){var t=parseFloat(i.$eval(s));return isNaN(t)?"":(t in u||(t=e.pluralCat(t-c)),d[t](i))},function(e){r.text(e)})}}}],ro=["$parse","$animate",function(e,a){var s=i("ngRepeat"),l=function(e,t,n,i,r,o,a){e[n]=i,r&&(e[r]=o),e.$index=t,e.$first=0===t,e.$last=t===a-1,e.$middle=!(e.$first||e.$last),e.$odd=!(e.$even=0==(1&t))},c=function(e){return e.clone[0]},u=function(e){return e.clone[e.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(i,d){var f=d.ngRepeat,h=t.createComment(" end ngRepeat: "+f+" "),p=f.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!p)throw s("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",f);var g=p[1],m=p[2],v=p[3],$=p[4];if(!(p=g.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/)))throw s("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",g);var y=p[3]||p[1],b=p[2];if(v&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(v)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent)$/.test(v)))throw s("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",v);var w,x,C,k,S={$id:Ne};return $?w=e($):(C=function(e,t){return Ne(t)},k=function(e){return e}),function(e,t,i,d,p){w&&(x=function(t,n,i){return b&&(S[b]=t),S[y]=n,S.$index=i,w(e,S)});var g=se();e.$watchCollection(m,function(i){var d,m,$,w,S,E,T,D,A,M,O,I,P=t[0],N=se();if(v&&(e[v]=i),r(i))A=i,D=x||C;else{D=x||k,A=[];for(var j in i)i.hasOwnProperty(j)&&"$"!=j.charAt(0)&&A.push(j);A.sort()}for(w=A.length,O=new Array(w),d=0;d<w;d++)if(S=i===A?d:A[d],E=i[S],T=D(S,E,d),g[T])M=g[T],delete g[T],N[T]=M,O[d]=M;else{if(N[T])throw o(O,function(e){e&&e.scope&&(g[e.id]=e)}),s("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",f,T,U(E));O[d]={id:T,scope:n,clone:n},N[T]=!0}for(var F in g){if(M=g[F],I=ae(M.clone),a.leave(I),I[0].parentNode)for(d=0,m=I.length;d<m;d++)I[d].$$NG_REMOVED=!0;M.scope.$destroy()}for(d=0;d<w;d++)if(S=i===A?d:A[d],E=i[S],M=O[d],M.scope){$=P;do{$=$.nextSibling}while($&&$.$$NG_REMOVED);c(M)!=$&&a.move(ae(M.clone),null,Hn(P)),P=u(M),l(M.scope,d,y,E,b,S,w)}else p(function(e,t){M.scope=t;var n=h.cloneNode(!1);e[e.length++]=n,a.enter(e,null,Hn(P)),P=n,M.clone=e,N[M.id]=M,l(M.scope,d,y,E,b,S,w)});g=N})}}}}],oo=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,i){t.$watch(i.ngShow,function(t){e[t?"removeClass":"addClass"](n,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],ao=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,i){t.$watch(i.ngHide,function(t){e[t?"addClass":"removeClass"](n,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],so=hn(function(e,t,n){e.$watch(n.ngStyle,function(e,n){n&&e!==n&&o(n,function(e,n){t.css(n,"")}),e&&t.css(e)},!0)}),lo=["$animate",function(e){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(n,i,r,a){var s=r.ngSwitch||r.on,l=[],c=[],u=[],d=[],f=function(e,t){return function(){e.splice(t,1)}};n.$watch(s,function(n){var i,r;for(i=0,r=u.length;i<r;++i)e.cancel(u[i]);for(u.length=0,i=0,r=d.length;i<r;++i){var s=ae(c[i].clone);d[i].$destroy();(u[i]=e.leave(s)).then(f(u,i))}c.length=0,d.length=0,(l=a.cases["!"+n]||a.cases["?"])&&o(l,function(n){n.transclude(function(i,r){d.push(r);var o=n.element;i[i.length++]=t.createComment(" end ngSwitchWhen: ");var a={clone:i};c.push(a),e.enter(i,o.parent(),o)})})})}}}],co=hn({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,i,r){i.cases["!"+n.ngSwitchWhen]=i.cases["!"+n.ngSwitchWhen]||[],i.cases["!"+n.ngSwitchWhen].push({transclude:r,element:t})}}),uo=hn({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,i,r){i.cases["?"]=i.cases["?"]||[],i.cases["?"].push({transclude:r,element:t})}}),fo=hn({restrict:"EAC",link:function(e,t,n,r,o){if(!o)throw i("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",B(t));o(function(e){t.empty(),t.append(e)})}}),ho=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){if("text/ng-template"==n.type){var i=n.id,r=t[0].text;e.put(i,r)}}}}],po=i("ngOptions"),go=m({restrict:"A",terminal:!0}),mo=["$compile","$parse",function(e,i){var r=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,s={$setViewValue:p};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(e,t,n){var i,r,o=this,a={},l=s;o.databound=n.ngModel,o.init=function(e,t,n){l=e,i=t,r=n},o.addOption=function(t,n){re(t,'"option value"'),a[t]=!0,l.$viewValue==t&&(e.val(t),r.parent()&&r.remove()),n&&n[0].hasAttribute("selected")&&(n[0].selected=!0)},o.removeOption=function(e){this.hasOption(e)&&(delete a[e],l.$viewValue==e&&this.renderUnknownOption(e))},o.renderUnknownOption=function(t){var n="? "+Ne(t)+" ?";r.val(n),e.prepend(r),e.val(n),r.prop("selected",!0)},o.hasOption=function(e){return a.hasOwnProperty(e)},t.$on("$destroy",function(){o.renderUnknownOption=p})}],link:function(s,l,c,u){if(u[1]){for(var d,f=u[0],h=u[1],p=c.multiple,g=c.ngOptions,m=!1,y=!1,b=Hn(t.createElement("option")),w=Hn(t.createElement("optgroup")),x=b.clone(),C=0,k=l.children(),S=k.length;C<S;C++)if(""===k[C].value){d=m=k.eq(C);break}f.init(h,m,x),p&&(h.$isEmpty=function(e){return!e||0===e.length}),g?function(t,s,l){function c(e,n,i){return L[T]=i,M&&(L[M]=n),e(t,L)}function u(){t.$apply(function(){var e,n=P(t)||[];if(p)e=[],o(s.val(),function(t){e.push(d(t,n[t]))});else{var i=s.val();e=d(i,n[i])}l.$setViewValue(e),k()})}function d(e,t){return"?"===e?n:""===e?null:c(A||I,e,t)}function h(){var e,n=P(t);if(n&&Zn(n)){e=new Array(n.length);for(var i=0,r=n.length;i<r;i++)e[i]=c(E,i,n[i]);return e}if(n){e={};for(var o in n)n.hasOwnProperty(o)&&(e[o]=c(E,o,n[o]))}return e}function v(e){var t;if(p)if(j&&Zn(e)){t=new je([]);for(var n=0;n<e.length;n++)t.put(c(j,null,e[n]),!0)
-}else t=new je(e);else j&&(e=c(j,null,e));return function(n,i){var r;return r=j||A||I,p?$(t.remove(c(r,n,i))):e==c(r,n,i)}}function x(){y||(t.$$postDigest(k),y=!0)}function C(e,t,n){e[t]=e[t]||0,e[t]+=n?1:-1}function k(){y=!1;var e,n,i,r,u,d,h,g,x,k,S,T,D,A,I,N,j={"":[]},L=[""],R=l.$viewValue,V=P(t)||[],H=M?a(V):V,q={},U=v(R),_=!1;for(T=0;k=H.length,T<k;T++)h=T,M&&(h=H[T],"$"===h.charAt(0))||(g=V[h],e=c(O,h,g)||"",(n=j[e])||(n=j[e]=[],L.push(e)),D=U(h,g),_=_||D,N=c(E,h,g),N=$(N)?N:"",n.push({id:M?H[T]:T,label:N,selected:D}));for(p||(m||null===R?j[""].unshift({id:"",label:"",selected:!_}):_||j[""].unshift({id:"?",label:"",selected:!0})),S=0,x=L.length;S<x;S++){for(e=L[S],n=j[e],F.length<=S?(r={element:w.clone().attr("label",e),label:n.label},u=[r],F.push(u),s.append(r.element)):(u=F[S],r=u[0],r.label!=e&&r.element.attr("label",r.label=e)),A=null,T=0,k=n.length;T<k;T++)i=n[T],(d=u[T+1])?(A=d.element,d.label!==i.label&&(C(q,d.label,!1),C(q,i.label,!0),A.text(d.label=i.label)),d.id!==i.id&&A.val(d.id=i.id),A[0].selected!==i.selected&&(A.prop("selected",d.selected=i.selected),Vn&&A.prop("selected",d.selected))):(""===i.id&&m?I=m:(I=b.clone()).val(i.id).prop("selected",i.selected).attr("selected",i.selected).text(i.label),u.push(d={element:I,label:i.label,id:i.id,selected:i.selected}),C(q,i.label,!0),A?A.after(I):r.element.append(I),A=I);for(T++;u.length>T;)i=u.pop(),C(q,i.label,!1),i.element.remove();o(q,function(e,t){e>0?f.addOption(t):e<0&&f.removeOption(t)})}for(;F.length>S;)F.pop()[0].element.remove()}var S;if(!(S=g.match(r)))throw po("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",g,B(s));var E=i(S[2]||S[1]),T=S[4]||S[6],D=/ as /.test(S[0])&&S[1],A=D?i(D):null,M=S[5],O=i(S[3]||""),I=i(S[2]?S[1]:T),P=i(S[7]),N=S[8],j=N?i(S[8]):null,F=[[{element:s,label:""}]],L={};m&&(e(m)(t),m.removeClass("ng-scope"),m.remove()),s.empty(),s.on("change",u),l.$render=k,t.$watchCollection(P,x),t.$watchCollection(h,x),p&&t.$watchCollection(function(){return l.$modelValue},x)}(s,l,h):p?function(e,t,n){var i;n.$render=function(){var e=new je(n.$viewValue);o(t.find("option"),function(t){t.selected=$(e.get(t.value))})},e.$watch(function(){L(i,n.$viewValue)||(i=F(n.$viewValue),n.$render())}),t.on("change",function(){e.$apply(function(){var e=[];o(t.find("option"),function(t){t.selected&&e.push(t.value)}),n.$setViewValue(e)})})}(s,l,h):function(e,t,n,i){n.$render=function(){var e=n.$viewValue;i.hasOption(e)?(x.parent()&&x.remove(),t.val(e),""===e&&d.prop("selected",!0)):v(e)&&d?t.val(""):i.renderUnknownOption(e)},t.on("change",function(){e.$apply(function(){x.parent()&&x.remove(),n.$setViewValue(t.val())})})}(s,l,h,f)}}}}],vo=["$interpolate",function(e){var t={addOption:p,removeOption:p};return{restrict:"E",priority:100,compile:function(n,i){if(v(i.value)){var r=e(n.text(),!0);r||i.$set("value",n.text())}return function(e,n,i){var o=n.parent(),a=o.data("$selectController")||o.parent().data("$selectController");a&&a.databound||(a=t),r?e.$watch(r,function(e,t){i.$set("value",e),t!==e&&a.removeOption(t),a.addOption(e,n)}):a.addOption(i.value,n),n.on("$destroy",function(){a.removeOption(i.value)})}}}}],$o=m({restrict:"E",terminal:!1});if(e.angular.bootstrap)return void console.log("WARNING: Tried to load angular more than once.");!function(){var t;ni||(qn=e.jQuery,qn&&qn.fn.on?(Hn=qn,d(qn.fn,{scope:xi.scope,isolateScope:xi.isolateScope,controller:xi.controller,injector:xi.injector,inheritedData:xi.inheritedData}),t=qn.cleanData,qn.cleanData=function(e){var n;if(Xn)Xn=!1;else for(var i,r=0;null!=(i=e[r]);r++)(n=qn._data(i,"events"))&&n.$destroy&&qn(i).triggerHandler("$destroy");t(e)}):Hn=ge,Kn.element=Hn,ni=!0)}(),function(t){d(t,{bootstrap:J,copy:j,extend:d,equals:L,element:Hn,forEach:o,injector:Re,noop:p,bind:H,toJson:U,fromJson:_,identity:g,isUndefined:v,isDefined:$,isString:b,isFunction:C,isObject:y,isNumber:w,isElement:O,isArray:Zn,version:li,isDate:x,lowercase:Nn,uppercase:Fn,callbacks:{counter:0},getTestability:ee,$$minErr:i,$$csp:Qn,reloadWithDebugInfo:Q}),Un=le(e);try{Un("ngLocale")}catch(e){Un("ngLocale",[]).provider("$locale",lt)}Un("ng",["ngLocale"],["$provide",function(e){e.provider({$$sanitizeUri:Ft}),e.provider("$compile",We).directive({a:ar,input:Sr,textarea:Sr,form:dr,script:ho,select:mo,style:$o,option:vo,ngBind:Ur,ngBindHtml:Br,ngBindTemplate:_r,ngClass:Wr,ngClassEven:Yr,ngClassOdd:zr,ngCloak:Kr,ngController:Gr,ngForm:fr,ngHide:ao,ngIf:Jr,ngInclude:Qr,ngInit:to,ngNonBindable:no,ngPluralize:io,ngRepeat:ro,ngShow:oo,ngStyle:so,ngSwitch:lo,ngSwitchWhen:co,ngSwitchDefault:uo,ngOptions:go,ngTransclude:fo,ngModel:Ir,ngList:Rr,ngChange:Pr,pattern:jr,ngPattern:jr,required:Nr,ngRequired:Nr,minlength:Lr,ngMinlength:Lr,maxlength:Fr,ngMaxlength:Fr,ngValue:Hr,ngModelOptions:qr}).directive({ngInclude:eo}).directive(sr).directive(Xr),e.provider({$anchorScroll:Ve,$animate:Ii,$browser:Ue,$cacheFactory:_e,$controller:Ge,$document:Xe,$exceptionHandler:Ze,$filter:Gt,$interpolate:at,$interval:st,$http:nt,$httpBackend:rt,$location:wt,$log:xt,$parse:Mt,$rootScope:jt,$q:Ot,$$q:It,$sce:qt,$sceDelegate:Ht,$sniffer:Ut,$templateCache:Be,$templateRequest:_t,$$testability:Bt,$timeout:Wt,$window:Kt,$$rAF:Nt,$$asyncCallback:He})}])}(Kn),Hn(t).ready(function(){Z(t,J)})}(window,document),!window.angular.$$csp()&&window.angular.element(document).find("head").prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}</style>'),function(e,t,n){"use strict";function i(){function e(e,n){return t.extend(new(t.extend(function(){},{prototype:e})),n)}function n(e,t){var n=t.caseInsensitiveMatch,i={originalPath:e,regexp:e},r=i.keys=[];return e=e.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(e,t,n,i){var o="?"===i?i:null,a="*"===i?i:null;return r.push({name:n,optional:!!o}),t=t||"",(o?"":t)+"(?:"+(o?t:"")+(a&&"(.+?)"||"([^/]+)")+(o||"")+")"+(o||"")}).replace(/([\/$\*])/g,"\\$1"),i.regexp=new RegExp("^"+e+"$",n?"i":""),i}var i={};this.when=function(e,r){if(i[e]=t.extend({reloadOnSearch:!0},r,e&&n(e,r)),e){var o="/"==e[e.length-1]?e.substr(0,e.length-1):e+"/";i[o]=t.extend({redirectTo:e},n(o,r))}return this},this.otherwise=function(e){return"string"==typeof e&&(e={redirectTo:e}),this.when(null,e),this},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce",function(n,r,o,a,s,c,u){function d(e,t){var n=t.keys,i={};if(!t.regexp)return null;var r=t.regexp.exec(e);if(!r)return null;for(var o=1,a=r.length;o<a;++o){var s=n[o-1],l=r[o];s&&l&&(i[s.name]=l)}return i}function f(e){var i=y.current;m=p(),(v=m&&i&&m.$$route===i.$$route&&t.equals(m.pathParams,i.pathParams)&&!m.reloadOnSearch&&!$)||!i&&!m||n.$broadcast("$routeChangeStart",m,i).defaultPrevented&&e&&e.preventDefault()}function h(){var e=y.current,i=m;v?(e.params=i.params,t.copy(e.params,o),n.$broadcast("$routeUpdate",e)):(i||e)&&($=!1,y.current=i,i&&i.redirectTo&&(t.isString(i.redirectTo)?r.path(g(i.redirectTo,i.params)).search(i.params).replace():r.url(i.redirectTo(i.pathParams,r.path(),r.search())).replace()),a.when(i).then(function(){if(i){var e,n,r=t.extend({},i.resolve);return t.forEach(r,function(e,n){r[n]=t.isString(e)?s.get(e):s.invoke(e,null,null,n)}),t.isDefined(e=i.template)?t.isFunction(e)&&(e=e(i.params)):t.isDefined(n=i.templateUrl)&&(t.isFunction(n)&&(n=n(i.params)),n=u.getTrustedResourceUrl(n),t.isDefined(n)&&(i.loadedTemplateUrl=n,e=c(n))),t.isDefined(e)&&(r.$template=e),a.all(r)}}).then(function(r){i==y.current&&(i&&(i.locals=r,t.copy(i.params,o)),n.$broadcast("$routeChangeSuccess",i,e))},function(t){i==y.current&&n.$broadcast("$routeChangeError",i,e,t)}))}function p(){var n,o;return t.forEach(i,function(i,a){!o&&(n=d(r.path(),i))&&(o=e(i,{params:t.extend({},r.search(),n),pathParams:n}),o.$$route=i)}),o||i[null]&&e(i[null],{params:{},pathParams:{}})}function g(e,n){var i=[];return t.forEach((e||"").split(":"),function(e,t){if(0===t)i.push(e);else{var r=e.match(/(\w+)(.*)/),o=r[1];i.push(n[o]),i.push(r[2]||""),delete n[o]}}),i.join("")}var m,v,$=!1,y={routes:i,reload:function(){$=!0,n.$evalAsync(function(){f(),h()})},updateParams:function(e){if(!this.current||!this.current.$$route)throw l("norout","Tried updating route when with no current route");var n={},i=this;t.forEach(Object.keys(e),function(t){i.current.pathParams[t]||(n[t]=e[t])}),e=t.extend({},this.current.params,e),r.path(g(this.current.$$route.originalPath,e)),r.search(t.extend({},r.search(),n))}};return n.$on("$locationChangeStart",f),n.$on("$locationChangeSuccess",h),y}]}function r(){this.$get=function(){return{}}}function o(e,n,i){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(r,o,a,s,l){function c(){h&&(i.cancel(h),h=null),d&&(d.$destroy(),d=null),f&&(h=i.leave(f),h.then(function(){h=null}),f=null)}function u(){var a=e.current&&e.current.locals,s=a&&a.$template;if(t.isDefined(s)){var u=r.$new(),h=e.current,m=l(u,function(e){i.enter(e,null,f||o).then(function(){!t.isDefined(p)||p&&!r.$eval(p)||n()}),c()});f=m,d=h.scope=u,d.$emit("$viewContentLoaded"),d.$eval(g)}else c()}var d,f,h,p=a.autoscroll,g=a.onload||"";r.$on("$routeChangeSuccess",u),u()}}}function a(e,t,n){return{restrict:"ECA",priority:-400,link:function(i,r){var o=n.current,a=o.locals;r.html(a.$template);var s=e(r.contents());if(o.controller){a.$scope=i;var l=t(o.controller,a);o.controllerAs&&(i[o.controllerAs]=l),r.data("$ngControllerController",l),r.children().data("$ngControllerController",l)}s(i)}}}var s=t.module("ngRoute",["ng"]).provider("$route",i),l=t.$$minErr("ngRoute");s.provider("$routeParams",r),s.directive("ngView",o),s.directive("ngView",a),o.$inject=["$route","$anchorScroll","$animate"],a.$inject=["$compile","$controller","$route"]}(window,window.angular),function(e,t,n){"use strict";function i(e){return null!=e&&""!==e&&"hasOwnProperty"!==e&&s.test("."+e)}function r(e,t){if(!i(t))throw a("badmember",'Dotted member path "@{0}" is invalid.',t);for(var r=t.split("."),o=0,s=r.length;o<s&&e!==n;o++){var l=r[o];e=null!==e?e[l]:n}return e}function o(e,n){n=n||{},t.forEach(n,function(e,t){delete n[t]});for(var i in e)!e.hasOwnProperty(i)||"$"===i.charAt(0)&&"$"===i.charAt(1)||(n[i]=e[i]);return n}var a=t.$$minErr("$resource"),s=/^(\.[a-zA-Z_$][0-9a-zA-Z_$]*)+$/;t.module("ngResource",["ng"]).provider("$resource",function(){var e=this;this.defaults={stripTrailingSlashes:!0,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},delete:{method:"DELETE"}}},this.$get=["$http","$q",function(i,s){function l(e){return c(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function c(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,t?"%20":"+")}function u(t,n){this.template=t,this.defaults=p({},e.defaults,n),this.urlParams={}}function d(l,c,v,$){function y(e,t){var n={};return t=p({},c,t),h(t,function(t,i){m(t)&&(t=t()),n[i]=t&&t.charAt&&"@"==t.charAt(0)?r(e,t.substr(1)):t}),n}function b(e){return e.resource}function w(e){o(e||{},this)}var x=new u(l,$);return v=p({},e.defaults.actions,v),w.prototype.toJSON=function(){var e=p({},this);return delete e.$promise,delete e.$resolved,e},h(v,function(e,r){var l=/^(POST|PUT|PATCH)$/i.test(e.method);w[r]=function(c,u,d,v){var $,C,k,S={};switch(arguments.length){case 4:k=v,C=d;case 3:case 2:if(!m(u)){S=c,$=u,C=d;break}if(m(c)){C=c,k=u;break}C=u,k=d;case 1:m(c)?C=c:l?$=c:S=c;break;case 0:break;default:throw a("badargs","Expected up to 4 arguments [params, data, success, error], got {0} arguments",arguments.length)}var E=this instanceof w,T=E?$:e.isArray?[]:new w($),D={},A=e.interceptor&&e.interceptor.response||b,M=e.interceptor&&e.interceptor.responseError||n;h(e,function(e,t){"params"!=t&&"isArray"!=t&&"interceptor"!=t&&(D[t]=g(e))}),l&&(D.data=$),x.setUrlParams(D,p({},y($,e.params||{}),S),e.url);var O=i(D).then(function(n){var i=n.data,s=T.$promise;if(i){if(t.isArray(i)!==!!e.isArray)throw a("badcfg","Error in resource configuration for action `{0}`. Expected response to contain an {1} but got an {2}",r,e.isArray?"array":"object",t.isArray(i)?"array":"object");e.isArray?(T.length=0,h(i,function(e){"object"==typeof e?T.push(new w(e)):T.push(e)})):(o(i,T),T.$promise=s)}return T.$resolved=!0,n.resource=T,n},function(e){return T.$resolved=!0,(k||f)(e),s.reject(e)});return O=O.then(function(e){var t=A(e);return(C||f)(t,e.headers),t},M),E?O:(T.$promise=O,T.$resolved=!1,T)},w.prototype["$"+r]=function(e,t,n){m(e)&&(n=t,t=e,e={});var i=w[r].call(this,e,this,t,n);return i.$promise||i}}),w.bind=function(e){return d(l,p({},c,e),v)},w}var f=t.noop,h=t.forEach,p=t.extend,g=t.copy,m=t.isFunction;return u.prototype={setUrlParams:function(e,n,i){var r,o,s=this,c=i||s.template,u=s.urlParams={};h(c.split(/\W/),function(e){if("hasOwnProperty"===e)throw a("badname","hasOwnProperty is not a valid parameter name.");!new RegExp("^\\d+$").test(e)&&e&&new RegExp("(^|[^\\\\]):"+e+"(\\W|$)").test(c)&&(u[e]=!0)}),c=c.replace(/\\:/g,":"),n=n||{},h(s.urlParams,function(e,i){r=n.hasOwnProperty(i)?n[i]:s.defaults[i],t.isDefined(r)&&null!==r?(o=l(r),c=c.replace(new RegExp(":"+i+"(\\W|$)","g"),function(e,t){return o+t})):c=c.replace(new RegExp("(/?):"+i+"(\\W|$)","g"),function(e,t,n){return"/"==n.charAt(0)?n:t+n})}),s.defaults.stripTrailingSlashes&&(c=c.replace(/\/+$/,"")||"/"),c=c.replace(/\/\.(?=\w+($|\?))/,"."),e.url=c.replace(/\/\\\./,"/."),h(n,function(t,n){s.urlParams[n]||(e.params=e.params||{},e.params[n]=t)})}},d}]})}(window,window.angular),function(e,t,n){"use strict";t.module("ngCookies",["ng"]).factory("$cookies",["$rootScope","$browser",function(e,i){function r(){var e,r,o,l;for(e in s)u(a[e])&&i.cookies(e,n);for(e in a)r=a[e],t.isString(r)||(r=""+r,a[e]=r),r!==s[e]&&(i.cookies(e,r),l=!0);if(l){l=!1,o=i.cookies();for(e in a)a[e]!==o[e]&&(u(o[e])?delete a[e]:a[e]=o[e],l=!0)}}var o,a={},s={},l=!1,c=t.copy,u=t.isUndefined;return i.addPollFn(function(){var t=i.cookies();o!=t&&(o=t,c(t,s),c(t,a),l&&e.$apply())})(),l=!0,e.$watch(r),a}]).factory("$cookieStore",["$cookies",function(e){return{get:function(n){var i=e[n];return i?t.fromJson(i):i},put:function(n,i){e[n]=t.toJson(i)},remove:function(t){delete e[t]}}}])}(window,window.angular),function(e,t,n){"use strict";t.module("ngAnimate",["ng"]).directive("ngAnimateChildren",function(){return function(e,n,i){var r=i.ngAnimateChildren;t.isString(r)&&0===r.length?n.data("$$ngAnimateChildren",!0):e.$watch(r,function(e){n.data("$$ngAnimateChildren",!!e)})}}).factory("$$animateReflow",["$$rAF","$document",function(e,t){var n=t[0].body;return function(t){return e(function(){n.offsetWidth;t()})}}]).config(["$provide","$animateProvider",function(n,i){function r(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.nodeType==p)return n}}function o(e){return e&&t.element(e)}function a(e){return t.element(r(e))}function s(e,t){return r(e)==r(t)}var l=t.noop,c=t.forEach,u=i.$$selectors,d=t.isArray,f=t.isString,h=t.isObject,p=1,g="$$ngAnimateState",m="ng-animate",v={running:!0};n.decorator("$animate",["$delegate","$$q","$injector","$sniffer","$rootElement","$$asyncCallback","$rootScope","$document","$templateRequest",function(e,n,p,$,y,b,w,x,C){function k(e,t){var n=e.data(g)||{};return t&&(n.running=!0,n.structural=!0,e.data(g,n)),n.disabled||n.running&&n.structural}function S(e){var t,i=n.defer();return i.promise.$$cancelFn=function(){t&&t()},w.$$postDigest(function(){t=e(function(){i.resolve()})}),i.promise}function E(e){if(h(e))return e.tempClasses&&f(e.tempClasses)&&(e.tempClasses=e.tempClasses.split(/\s+/)),e}function T(e,t,n){n=n||{};var i={};c(n,function(e,t){c(t.split(" "),function(t){i[t]=e})});var r=Object.create(null);c((e.attr("class")||"").split(/\s+/),function(e){r[e]=!0});var o=[],a=[];return c(t.classes,function(e,t){var n=r[t],s=i[t]||{};!1===e?(n||"addClass"==s.event)&&a.push(t):!0===e&&(n&&"removeClass"!=s.event||o.push(t))}),o.length+a.length>0&&[o.join(" "),a.join(" ")]}function D(e){if(e){var t=[],n={},i=e.substr(1).split(".");($.transitions||$.animations)&&t.push(p.get(u[""]));for(var r=0;r<i.length;r++){var o=i[r],a=u[o];a&&!n[o]&&(t.push(p.get(a)),n[o]=!0)}return t}}function A(e,n,i,r){function o(e,t){var n=e[t],i=e["before"+t.charAt(0).toUpperCase()+t.substr(1)];if(n||i)return"leave"==t&&(i=n,n=null),x.push({event:t,fn:n}),y.push({event:t,fn:i}),!0}function a(t,n,o){function a(e){if(n){if((n[e]||l)(),++d<s.length)return;n=null}o()}var s=[];c(t,function(e){e.fn&&s.push(e)});var d=0;c(s,function(t,o){var s=function(){a(o)};switch(t.event){case"setClass":n.push(t.fn(e,u,f,s,r));break;case"animate":n.push(t.fn(e,i,r.from,r.to,s));break;case"addClass":n.push(t.fn(e,u||i,s,r));break;case"removeClass":n.push(t.fn(e,f||i,s,r));break;default:n.push(t.fn(e,s,r))}}),n&&0===n.length&&o()}var s=e[0];if(s){r&&(r.to=r.to||{},r.from=r.from||{});var u,f;d(i)&&(u=i[0],f=i[1],u?f?i=u+" "+f:(i=u,n="addClass"):(i=f,n="removeClass"));var h="setClass"==n,p=h||"addClass"==n||"removeClass"==n||"animate"==n,g=e.attr("class"),m=g+" "+i;if(L(m)){var v=l,$=[],y=[],b=l,w=[],x=[],C=(" "+m).replace(/\s+/g,".");return c(D(C),function(e){!o(e,n)&&h&&(o(e,"addClass"),o(e,"removeClass"))}),{node:s,event:n,className:i,isClassBased:p,isSetClassOperation:h,applyStyles:function(){r&&e.css(t.extend(r.from||{},r.to||{}))},before:function(e){v=e,a(y,$,function(){v=l,e()})},after:function(e){b=e,a(x,w,function(){b=l,e()})},cancel:function(){$&&(c($,function(e){(e||l)(!0)}),v(!0)),w&&(c(w,function(e){(e||l)(!0)}),b(!0))}}}}}function M(e,n,i,r,o,a,s,u){function d(t){var r="$animate:"+t;x&&x[r]&&x[r].length>0&&b(function(){i.triggerHandler(r,{event:e,className:n})})}function f(){d("before")}function h(){d("after")}function p(){d("close"),u()}function v(){v.hasBeenRun||(v.hasBeenRun=!0,a())}function $(){if(!$.hasBeenRun){w&&w.applyStyles(),$.hasBeenRun=!0,s&&s.tempClasses&&c(s.tempClasses,function(e){i.removeClass(e)});var e=i.data(g);e&&(w&&w.isClassBased?I(i,n):(b(function(){var e=i.data(g)||{};N==e.index&&I(i,n)}),i.data(g,e))),p()}}var y=l,w=A(i,e,n,s);if(!w)return v(),f(),h(),$(),y;e=w.event,n=w.className;var x=t.element._data(w.node);if(x=x&&x.events,r||(r=o?o.parent():i.parent()),P(i,r))return v(),f(),h(),$(),y;var C=i.data(g)||{},k=C.active||{},S=C.totalActive||0,E=C.last,T=!1;if(S>0){var D=[];if(w.isClassBased){if("setClass"==E.event)D.push(E),I(i,n);else if(k[n]){var M=k[n];M.event==e?T=!0:(D.push(M),I(i,n))}}else if("leave"==e&&k["ng-leave"])T=!0;else{for(var O in k)D.push(k[O]);C={},I(i,!0)}D.length>0&&c(D,function(e){e.cancel()})}if(!w.isClassBased||w.isSetClassOperation||"animate"==e||T||(T="addClass"==e==i.hasClass(n)),T)return v(),f(),h(),p(),y;k=C.active||{},S=C.totalActive||0,"leave"==e&&i.one("$destroy",function(e){var n=t.element(this),i=n.data(g);if(i){var r=i.active["ng-leave"];r&&(r.cancel(),I(n,"ng-leave"))}}),i.addClass(m),s&&s.tempClasses&&c(s.tempClasses,function(e){i.addClass(e)});var N=j++;return S++,k[n]=w,i.data(g,{last:w,active:k,index:N,totalActive:S}),f(),w.before(function(t){var r=i.data(g);t=t||!r||!r.active[n]||w.isClassBased&&r.active[n].event!=e,v(),!0===t?$():(h(),w.after($))}),w.cancel}function O(e){var n=r(e);if(n){var i=t.isFunction(n.getElementsByClassName)?n.getElementsByClassName(m):n.querySelectorAll("."+m);c(i,function(e){e=t.element(e);var n=e.data(g);n&&n.active&&c(n.active,function(e){e.cancel()})})}}function I(e,t){if(s(e,y))v.disabled||(v.running=!1,v.structural=!1);else if(t){var n=e.data(g)||{},i=!0===t;!i&&n.active&&n.active[t]&&(n.totalActive--,delete n.active[t]),!i&&n.totalActive||(e.removeClass(m),e.removeData(g))}}function P(e,n){if(v.disabled)return!0;if(s(e,y))return v.running;var i,r,o;do{if(0===n.length)break;var a=s(n,y),l=a?v:n.data(g)||{};if(l.disabled)return!0;if(a&&(o=!0),!1!==i){var c=n.data("$$ngAnimateChildren");t.isDefined(c)&&(i=c)}r=r||l.running||l.last&&!l.last.isClassBased}while(n=n.parent());return!o||!i&&r}y.data(g,v);var N=w.$watch(function(){return C.totalPendingRequests},function(e,t){0===e&&(N(),w.$$postDigest(function(){w.$$postDigest(function(){v.running=!1})}))}),j=0,F=i.classNameFilter(),L=F?function(e){return F.test(e)}:function(){return!0};return{animate:function(e,t,n,i,r){return i=i||"ng-inline-animate",r=E(r)||{},r.from=n?t:null,r.to=n||t,S(function(t){return M("animate",i,a(e),null,null,l,r,t)})},enter:function(n,i,r,s){return s=E(s),n=t.element(n),i=o(i),r=o(r),k(n,!0),e.enter(n,i,r),S(function(e){return M("enter","ng-enter",a(n),i,r,l,s,e)})},leave:function(n,i){return i=E(i),n=t.element(n),O(n),k(n,!0),S(function(t){return M("leave","ng-leave",a(n),null,null,function(){e.leave(n)},i,t)})},move:function(n,i,r,s){return s=E(s),n=t.element(n),i=o(i),r=o(r),O(n),k(n,!0),e.move(n,i,r),S(function(e){return M("move","ng-move",a(n),i,r,l,s,e)})},addClass:function(e,t,n){return this.setClass(e,t,[],n)},removeClass:function(e,t,n){return this.setClass(e,[],t,n)},setClass:function(n,i,o,s){if(s=E(s),n=t.element(n),n=a(n),k(n))return e.$$setClassImmediately(n,i,o,s);var l,u=n.data("$$animateClasses"),f=!!u;return u||(u={},u.classes={}),l=u.classes,i=d(i)?i:i.split(" "),c(i,function(e){e&&e.length&&(l[e]=!0)}),o=d(o)?o:o.split(" "),c(o,function(e){e&&e.length&&(l[e]=!1)}),f?(s&&u.options&&(u.options=t.extend(u.options||{},s)),u.promise):(n.data("$$animateClasses",u={classes:l,options:s}),u.promise=S(function(t){var i=n.parent(),o=r(n),a=o.parentNode;if(!a||a.$$NG_REMOVED||o.$$NG_REMOVED)return void t();var s=n.data("$$animateClasses");n.removeData("$$animateClasses");var l=n.data(g)||{},c=T(n,s,l.active);return c?M("setClass",c,n,i,null,function(){c[0]&&e.$$addClassImmediately(n,c[0]),c[1]&&e.$$removeClassImmediately(n,c[1])},s.options,t):t()}))},cancel:function(e){e.$$cancelFn()},enabled:function(e,t){switch(arguments.length){case 2:if(e)I(t);else{var n=t.data(g)||{};n.disabled=!0,t.data(g,n)}break;case 1:v.disabled=!e;break;default:e=!v.disabled}return!!e}}}]),i.register("",["$window","$sniffer","$timeout","$$animateReflow",function(n,i,o,a){function s(){P||(P=a(function(){z=[],P=null,B={}}))}function u(e,t){P&&P(),z.push(t),P=a(function(){c(z,function(e){e()}),z=[],P=null,B={}})}function h(e,n){var i=r(e);e=t.element(i),G.push(e);var a=Date.now()+n;a<=K||(o.cancel(Y),K=a,Y=o(function(){g(G),G=[]},n,!1))}function g(e){c(e,function(e){var t=e.data(H);t&&c(t.closeAnimationFns,function(e){e()})})}function m(e,t){var i=t?B[t]:null;if(!i){var r=0,o=0,a=0,s=0;c(e,function(e){if(e.nodeType==p){var t=n.getComputedStyle(e)||{},i=t[D+N];r=Math.max(v(i),r);var l=t[D+F];o=Math.max(v(l),o),s=Math.max(v(t[M+F]),s);var c=v(t[M+N]);c>0&&(c*=parseInt(t[M+L],10)||1),a=Math.max(c,a)}}),i={total:0,transitionDelay:o,transitionDuration:r,animationDelay:s,animationDuration:a},t&&(B[t]=i)}return i}function v(e){var t=0,n=f(e)?e.split(/\s*,\s*/):[];return c(n,function(e){t=Math.max(parseFloat(e)||0,t)}),t}function $(e){var t=e.parent(),n=t.data(V);return n||(t.data(V,++W),n=W),n+"-"+r(e).getAttribute("class")}function y(e,t,n,i){var o=["ng-enter","ng-leave","ng-move"].indexOf(n)>=0,a=$(t),s=a+" "+n,l=B[s]?++B[s].total:0,c={};if(l>0){var u=n+"-stagger",d=a+" "+u,f=!B[d];f&&t.addClass(u),c=m(t,d),f&&t.removeClass(u)}t.addClass(n);var h=t.data(H)||{},p=m(t,s),g=p.transitionDuration,v=p.animationDuration;if(o&&0===g&&0===v)return t.removeClass(n),!1;var y=i||o&&g>0,b=v>0&&c.animationDelay>0&&0===c.animationDuration,C=h.closeAnimationFns||[];t.data(H,{stagger:c,cacheKey:s,running:h.running||0,itemIndex:l,blockTransition:y,closeAnimationFns:C});var k=r(t);return y&&(w(k,!0),i&&t.css(i)),b&&x(k,!0),!0}function b(e,t,n,i,a){function s(){t.off(F,l),t.removeClass(f),t.removeClass(p),N&&o.cancel(N),E(t,n);var e=r(t);for(var i in g)e.style.removeProperty(g[i])}function l(e){e.stopPropagation();var t=e.originalEvent||e,n=t.$manualTimeStamp||t.timeStamp||Date.now(),r=parseFloat(t.elapsedTime.toFixed(q));Math.max(n-j,0)>=M&&r>=T&&i()}var u=r(t),d=t.data(H);if(-1==u.getAttribute("class").indexOf(n)||!d)return void i();var f="",p="";c(n.split(" "),function(e,t){var n=(t>0?" ":"")+e;f+=n+"-active",p+=n+"-pending"});var g=[],v=d.itemIndex,$=d.stagger,y=0;if(v>0){var b=0;$.transitionDelay>0&&0===$.transitionDuration&&(b=$.transitionDelay*v);var C=0;$.animationDelay>0&&0===$.animationDuration&&(C=$.animationDelay*v,g.push(I+"animation-play-state")),y=Math.round(100*Math.max(b,C))/100}y||(t.addClass(f),d.blockTransition&&w(u,!1));var k=d.cacheKey+" "+f,S=m(t,k),T=Math.max(S.transitionDuration,S.animationDuration);if(0===T)return t.removeClass(f),E(t,n),void i();!y&&a&&(S.transitionDuration||(t.css("transition",S.animationDuration+"s linear all"),g.push("transition")),t.css(a));var D=Math.max(S.transitionDelay,S.animationDelay),M=D*_;if(g.length>0){var P=u.getAttribute("style")||"";";"!==P.charAt(P.length-1)&&(P+=";"),u.setAttribute("style",P+" ")}var N,j=Date.now(),F=O+" "+A,L=(D+T)*U,R=(y+L)*_;return y>0&&(t.addClass(p),N=o(function(){N=null,S.transitionDuration>0&&w(u,!1),S.animationDuration>0&&x(u,!1),t.addClass(f),t.removeClass(p),a&&(0===S.transitionDuration&&t.css("transition",S.animationDuration+"s linear all"),t.css(a),g.push("transition"))},y*_,!1)),t.on(F,l),d.closeAnimationFns.push(function(){s(),i()}),d.running++,h(t,R),s}function w(e,t){e.style[D+j]=t?"none":""}function x(e,t){e.style[M+R]=t?"paused":""}function C(e,t,n,i){if(y(e,t,n,i))return function(e){e&&E(t,n)}}function k(e,t,n,i,r){if(t.data(H))return b(e,t,n,i,r);E(t,n),i()}function S(e,t,n,i,r){var o=C(e,t,n,r.from);if(!o)return s(),void i();var a=o;return u(t,function(){a=k(e,t,n,i,r.to)}),function(e){(a||l)(e)}}function E(e,t){e.removeClass(t);var n=e.data(H);n&&(n.running&&n.running--,n.running&&0!==n.running||e.removeData(H))}function T(e,t){var n="";return e=d(e)?e:e.split(/\s+/),c(e,function(e,i){e&&e.length>0&&(n+=(i>0?" ":"")+e+t)}),n}var D,A,M,O,I="";void 0===e.ontransitionend&&void 0!==e.onwebkittransitionend?(I="-webkit-",D="WebkitTransition",A="webkitTransitionEnd transitionend"):(D="transition",A="transitionend"),void 0===e.onanimationend&&void 0!==e.onwebkitanimationend?(I="-webkit-",M="WebkitAnimation",O="webkitAnimationEnd animationend"):(M="animation",O="animationend");var P,N="Duration",j="Property",F="Delay",L="IterationCount",R="PlayState",V="$$ngAnimateKey",H="$$ngAnimateCSS3Data",q=3,U=1.5,_=1e3,B={},W=0,z=[],Y=null,K=0,G=[];return{animate:function(e,t,n,i,r,o){return o=o||{},o.from=n,o.to=i,S("animate",e,t,r,o)},enter:function(e,t,n){return n=n||{},S("enter",e,"ng-enter",t,n)},leave:function(e,t,n){return n=n||{},S("leave",e,"ng-leave",t,n)},move:function(e,t,n){return n=n||{},S("move",e,"ng-move",t,n)},beforeSetClass:function(e,t,n,i,r){r=r||{};var o=T(n,"-remove")+" "+T(t,"-add"),a=C("setClass",e,o,r.from);if(a)return u(e,i),a;s(),i()},beforeAddClass:function(e,t,n,i){i=i||{};var r=C("addClass",e,T(t,"-add"),i.from);if(r)return u(e,n),r;s(),n()},beforeRemoveClass:function(e,t,n,i){i=i||{};var r=C("removeClass",e,T(t,"-remove"),i.from);if(r)return u(e,n),r;s(),n()},setClass:function(e,t,n,i,r){return r=r||{},n=T(n,"-remove"),t=T(t,"-add"),k("setClass",e,n+" "+t,i,r.to)},addClass:function(e,t,n,i){return i=i||{},k("addClass",e,T(t,"-add"),n,i.to)},removeClass:function(e,t,n,i){return i=i||{},k("removeClass",e,T(t,"-remove"),n,i.to)}}}])}])}(window,window.angular),function(e,t,n){"use strict";function i(){return["$animate",function(e){return{restrict:"AE",transclude:"element",priority:1,terminal:!0,require:"^^ngMessages",link:function(t,n,i,o,a){var s,l=n[0],c=i.ngMessage||i.when;i=i.ngMessageExp||i.whenExp;var u=function(e){s=e?r(e)?e:e.split(/[\s,]+/):null,o.reRender()};i?(u(t.$eval(i)),t.$watchCollection(i,u)):u(c);var d,f;o.register(l,f={test:function(e){var t=s;return e=t?r(t)?0<=t.indexOf(e):t.hasOwnProperty(e):void 0},attach:function(){d||a(t,function(t){e.enter(t,null,n),d=t;var i=d.$$attachId=o.getAttachId();d.on("$destroy",function(){d&&d.$$attachId===i&&(o.deregister(l),f.detach())})})},detach:function(){if(d){var t=d;d=null,e.leave(t)}}})}}}]}var r=t.isArray,o=t.forEach,a=t.isString,s=t.element;t.module("ngMessages",[]).directive("ngMessages",["$animate",function(e){function t(e,t){return a(t)&&0===t.length||n(e.$eval(t))}function n(e){return a(e)?e.length:!!e}return{require:"ngMessages",restrict:"AE",controller:["$element","$scope","$attrs",function(i,r,a){function s(e,t){for(var n=t,i=[];n&&n!==e;){var r=n.$$ngMessageNode;if(r&&r.length)return h[r];n.childNodes.length&&-1==i.indexOf(n)?(i.push(n),n=n.childNodes[n.childNodes.length-1]):n=n.previousSibling||n.parentNode}}var l=this,c=0,u=0;this.getAttachId=function(){return u++};var d,f,h=this.messages={};this.render=function(s){s=s||{},d=!1,f=s;for(var c=t(r,a.ngMessagesMultiple)||t(r,a.multiple),u=[],h={},p=l.head,g=!1,m=0;null!=p;){m++;var v=p.message,$=!1;g||o(s,function(e,t){!$&&n(e)&&v.test(t)&&!h[t]&&($=h[t]=!0,v.attach())}),$?g=!c:u.push(v),p=p.next}o(u,function(e){e.detach()}),u.length!==m?e.setClass(i,"ng-active","ng-inactive"):e.setClass(i,"ng-inactive","ng-active")},r.$watchCollection(a.ngMessages||a.for,l.render),this.reRender=function(){d||(d=!0,r.$evalAsync(function(){d&&f&&l.render(f)}))},this.register=function(e,t){var n=c.toString();h[n]={message:t};var r=i[0],o=h[n];l.head?(r=s(r,e))?(o.next=r.next,r.next=o):(o.next=l.head,l.head=o):l.head=o,e.$$ngMessageNode=n,c++,l.reRender()},this.deregister=function(e){var t=e.$$ngMessageNode;delete e.$$ngMessageNode;var n=h[t];(e=s(i[0],e))?e.next=n.next:l.head=n.next,delete h[t],l.reRender()}}]}}]).directive("ngMessagesInclude",["$templateRequest","$document","$compile",function(e,t,n){return{restrict:"AE",require:"^^ngMessages",link:function(i,r,o){var a=o.ngMessagesInclude||o.src;e(a).then(function(e){n(e)(i,function(e){r.after(e),e=s(t[0].createComment(" ngMessagesInclude: "+a+" ")),r.after(e),r.remove()})})}}}]).directive("ngMessage",i()).directive("ngMessageExp",i())}(window,window.angular),angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.transition","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.bindHtml","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.dropdown","ui.bootstrap.modal","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["template/accordion/accordion-group.html","template/accordion/accordion.html","template/alert/alert.html","template/carousel/carousel.html","template/carousel/slide.html","template/datepicker/datepicker.html","template/datepicker/day.html","template/datepicker/month.html","template/datepicker/popup.html","template/datepicker/year.html","template/modal/backdrop.html","template/modal/window.html","template/pagination/pager.html","template/pagination/pagination.html","template/tooltip/tooltip-html-unsafe-popup.html","template/tooltip/tooltip-popup.html","template/popover/popover.html","template/progressbar/bar.html","template/progressbar/progress.html","template/progressbar/progressbar.html","template/rating/rating.html","template/tabs/tab.html","template/tabs/tabset.html","template/timepicker/timepicker.html","template/typeahead/typeahead-match.html","template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.transition",[]).factory("$transition",["$q","$timeout","$rootScope",function(e,t,n){function i(e){for(var t in e)if(void 0!==o.style[t])return e[t]}var r=function(i,o,a){a=a||{};var s=e.defer(),l=r[a.animation?"animationEndEventName":"transitionEndEventName"],c=function(e){n.$apply(function(){i.unbind(l,c),s.resolve(i)})};return l&&i.bind(l,c),t(function(){angular.isString(o)?i.addClass(o):angular.isFunction(o)?o(i):angular.isObject(o)&&i.css(o),
-l||s.resolve(i)}),s.promise.cancel=function(){l&&i.unbind(l,c),s.reject("Transition cancelled")},s.promise},o=document.createElement("trans"),a={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"},s={WebkitTransition:"webkitAnimationEnd",MozTransition:"animationend",OTransition:"oAnimationEnd",transition:"animationend"};return r.transitionEndEventName=i(a),r.animationEndEventName=i(s),r}]),angular.module("ui.bootstrap.collapse",["ui.bootstrap.transition"]).directive("collapse",["$transition",function(e){return{link:function(t,n,i){function r(t){function i(){c===r&&(c=void 0)}var r=e(n,t);return c&&c.cancel(),c=r,r.then(i,i),r}function o(){u?(u=!1,a()):(n.removeClass("collapse").addClass("collapsing"),r({height:n[0].scrollHeight+"px"}).then(a))}function a(){n.removeClass("collapsing"),n.addClass("collapse in"),n.css({height:"auto"})}function s(){if(u)u=!1,l(),n.css({height:0});else{n.css({height:n[0].scrollHeight+"px"});n[0].offsetWidth;n.removeClass("collapse in").addClass("collapsing"),r({height:0}).then(l)}}function l(){n.removeClass("collapsing"),n.addClass("collapse")}var c,u=!0;t.$watch(i.collapse,function(e){e?s():o()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("accordionConfig",{closeOthers:!0}).controller("AccordionController",["$scope","$attrs","accordionConfig",function(e,t,n){this.groups=[],this.closeOthers=function(i){(angular.isDefined(t.closeOthers)?e.$eval(t.closeOthers):n.closeOthers)&&angular.forEach(this.groups,function(e){e!==i&&(e.isOpen=!1)})},this.addGroup=function(e){var t=this;this.groups.push(e),e.$on("$destroy",function(n){t.removeGroup(e)})},this.removeGroup=function(e){var t=this.groups.indexOf(e);-1!==t&&this.groups.splice(t,1)}}]).directive("accordion",function(){return{restrict:"EA",controller:"AccordionController",transclude:!0,replace:!1,templateUrl:"template/accordion/accordion.html"}}).directive("accordionGroup",function(){return{require:"^accordion",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/accordion/accordion-group.html",scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(e){this.heading=e}},link:function(e,t,n,i){i.addGroup(e),e.$watch("isOpen",function(t){t&&i.closeOthers(e)}),e.toggleOpen=function(){e.isDisabled||(e.isOpen=!e.isOpen)}}}}).directive("accordionHeading",function(){return{restrict:"EA",transclude:!0,template:"",replace:!0,require:"^accordionGroup",link:function(e,t,n,i,r){i.setHeading(r(e,function(){}))}}}).directive("accordionTransclude",function(){return{require:"^accordionGroup",link:function(e,t,n,i){e.$watch(function(){return i[n.accordionTransclude]},function(e){e&&(t.html(""),t.append(e))})}}}),angular.module("ui.bootstrap.alert",[]).controller("AlertController",["$scope","$attrs",function(e,t){e.closeable="close"in t,this.close=e.close}]).directive("alert",function(){return{restrict:"EA",controller:"AlertController",templateUrl:"template/alert/alert.html",transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}).directive("dismissOnTimeout",["$timeout",function(e){return{require:"alert",link:function(t,n,i,r){e(function(){r.close()},parseInt(i.dismissOnTimeout,10))}}}]),angular.module("ui.bootstrap.bindHtml",[]).directive("bindHtmlUnsafe",function(){return function(e,t,n){t.addClass("ng-binding").data("$binding",n.bindHtmlUnsafe),e.$watch(n.bindHtmlUnsafe,function(e){t.html(e||"")})}}),angular.module("ui.bootstrap.buttons",[]).constant("buttonConfig",{activeClass:"active",toggleEvent:"click"}).controller("ButtonsController",["buttonConfig",function(e){this.activeClass=e.activeClass||"active",this.toggleEvent=e.toggleEvent||"click"}]).directive("btnRadio",function(){return{require:["btnRadio","ngModel"],controller:"ButtonsController",link:function(e,t,n,i){var r=i[0],o=i[1];o.$render=function(){t.toggleClass(r.activeClass,angular.equals(o.$modelValue,e.$eval(n.btnRadio)))},t.bind(r.toggleEvent,function(){var i=t.hasClass(r.activeClass);i&&!angular.isDefined(n.uncheckable)||e.$apply(function(){o.$setViewValue(i?null:e.$eval(n.btnRadio)),o.$render()})})}}}).directive("btnCheckbox",function(){return{require:["btnCheckbox","ngModel"],controller:"ButtonsController",link:function(e,t,n,i){function r(){return a(n.btnCheckboxTrue,!0)}function o(){return a(n.btnCheckboxFalse,!1)}function a(t,n){var i=e.$eval(t);return angular.isDefined(i)?i:n}var s=i[0],l=i[1];l.$render=function(){t.toggleClass(s.activeClass,angular.equals(l.$modelValue,r()))},t.bind(s.toggleEvent,function(){e.$apply(function(){l.$setViewValue(t.hasClass(s.activeClass)?o():r()),l.$render()})})}}}),angular.module("ui.bootstrap.carousel",["ui.bootstrap.transition"]).controller("CarouselController",["$scope","$timeout","$interval","$transition",function(e,t,n,i){function r(){o();var t=+e.interval;!isNaN(t)&&t>0&&(s=n(a,t))}function o(){s&&(n.cancel(s),s=null)}function a(){var t=+e.interval;l&&!isNaN(t)&&t>0?e.next():e.pause()}var s,l,c=this,u=c.slides=e.slides=[],d=-1;c.currentSlide=null;var f=!1;c.select=e.select=function(n,o){function a(){if(!f){if(c.currentSlide&&angular.isString(o)&&!e.noTransition&&n.$element){n.$element.addClass(o);n.$element[0].offsetWidth;angular.forEach(u,function(e){angular.extend(e,{direction:"",entering:!1,leaving:!1,active:!1})}),angular.extend(n,{direction:o,active:!0,entering:!0}),angular.extend(c.currentSlide||{},{direction:o,leaving:!0}),e.$currentTransition=i(n.$element,{}),function(t,n){e.$currentTransition.then(function(){s(t,n)},function(){s(t,n)})}(n,c.currentSlide)}else s(n,c.currentSlide);c.currentSlide=n,d=l,r()}}function s(t,n){angular.extend(t,{direction:"",active:!0,leaving:!1,entering:!1}),angular.extend(n||{},{direction:"",active:!1,leaving:!1,entering:!1}),e.$currentTransition=null}var l=u.indexOf(n);void 0===o&&(o=l>d?"next":"prev"),n&&n!==c.currentSlide&&(e.$currentTransition?(e.$currentTransition.cancel(),t(a)):a())},e.$on("$destroy",function(){f=!0}),c.indexOfSlide=function(e){return u.indexOf(e)},e.next=function(){var t=(d+1)%u.length;if(!e.$currentTransition)return c.select(u[t],"next")},e.prev=function(){var t=d-1<0?u.length-1:d-1;if(!e.$currentTransition)return c.select(u[t],"prev")},e.isActive=function(e){return c.currentSlide===e},e.$watch("interval",r),e.$on("$destroy",o),e.play=function(){l||(l=!0,r())},e.pause=function(){e.noPause||(l=!1,o())},c.addSlide=function(t,n){t.$element=n,u.push(t),1===u.length||t.active?(c.select(u[u.length-1]),1==u.length&&e.play()):t.active=!1},c.removeSlide=function(e){var t=u.indexOf(e);u.splice(t,1),u.length>0&&e.active?t>=u.length?c.select(u[t-1]):c.select(u[t]):d>t&&d--}}]).directive("carousel",[function(){return{restrict:"EA",transclude:!0,replace:!0,controller:"CarouselController",require:"carousel",templateUrl:"template/carousel/carousel.html",scope:{interval:"=",noTransition:"=",noPause:"="}}}]).directive("slide",function(){return{require:"^carousel",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/carousel/slide.html",scope:{active:"=?"},link:function(e,t,n,i){i.addSlide(e,t),e.$on("$destroy",function(){i.removeSlide(e)}),e.$watch("active",function(t){t&&i.select(e)})}}}),angular.module("ui.bootstrap.dateparser",[]).service("dateParser",["$locale","orderByFilter",function(e,t){function n(e){var n=[],i=e.split("");return angular.forEach(r,function(t,r){var o=e.indexOf(r);if(o>-1){e=e.split(""),i[o]="("+t.regex+")",e[o]="$";for(var a=o+1,s=o+r.length;a<s;a++)i[a]="",e[a]="$";e=e.join(""),n.push({index:o,apply:t.apply})}}),{regex:new RegExp("^"+i.join("")+"$"),map:t(n,"index")}}function i(e,t,n){return 1===t&&n>28?29===n&&(e%4==0&&e%100!=0||e%400==0):3!==t&&5!==t&&8!==t&&10!==t||n<31}this.parsers={};var r={yyyy:{regex:"\\d{4}",apply:function(e){this.year=+e}},yy:{regex:"\\d{2}",apply:function(e){this.year=+e+2e3}},y:{regex:"\\d{1,4}",apply:function(e){this.year=+e}},MMMM:{regex:e.DATETIME_FORMATS.MONTH.join("|"),apply:function(t){this.month=e.DATETIME_FORMATS.MONTH.indexOf(t)}},MMM:{regex:e.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(t){this.month=e.DATETIME_FORMATS.SHORTMONTH.indexOf(t)}},MM:{regex:"0[1-9]|1[0-2]",apply:function(e){this.month=e-1}},M:{regex:"[1-9]|1[0-2]",apply:function(e){this.month=e-1}},dd:{regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(e){this.date=+e}},d:{regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(e){this.date=+e}},EEEE:{regex:e.DATETIME_FORMATS.DAY.join("|")},EEE:{regex:e.DATETIME_FORMATS.SHORTDAY.join("|")}};this.parse=function(t,r){if(!angular.isString(t)||!r)return t;r=e.DATETIME_FORMATS[r]||r,this.parsers[r]||(this.parsers[r]=n(r));var o=this.parsers[r],a=o.regex,s=o.map,l=t.match(a);if(l&&l.length){for(var c,u={year:1900,month:0,date:1,hours:0},d=1,f=l.length;d<f;d++){var h=s[d-1];h.apply&&h.apply.call(u,l[d])}return i(u.year,u.month,u.date)&&(c=new Date(u.year,u.month,u.date,u.hours)),c}}}]),angular.module("ui.bootstrap.position",[]).factory("$position",["$document","$window",function(e,t){function n(e,n){return e.currentStyle?e.currentStyle[n]:t.getComputedStyle?t.getComputedStyle(e)[n]:e.style[n]}function i(e){return"static"===(n(e,"position")||"static")}var r=function(t){for(var n=e[0],r=t.offsetParent||n;r&&r!==n&&i(r);)r=r.offsetParent;return r||n};return{position:function(t){var n=this.offset(t),i={top:0,left:0},o=r(t[0]);o!=e[0]&&(i=this.offset(angular.element(o)),i.top+=o.clientTop-o.scrollTop,i.left+=o.clientLeft-o.scrollLeft);var a=t[0].getBoundingClientRect();return{width:a.width||t.prop("offsetWidth"),height:a.height||t.prop("offsetHeight"),top:n.top-i.top,left:n.left-i.left}},offset:function(n){var i=n[0].getBoundingClientRect();return{width:i.width||n.prop("offsetWidth"),height:i.height||n.prop("offsetHeight"),top:i.top+(t.pageYOffset||e[0].documentElement.scrollTop),left:i.left+(t.pageXOffset||e[0].documentElement.scrollLeft)}},positionElements:function(e,t,n,i){var r,o,a,s,l=n.split("-"),c=l[0],u=l[1]||"center";r=i?this.offset(e):this.position(e),o=t.prop("offsetWidth"),a=t.prop("offsetHeight");var d={center:function(){return r.left+r.width/2-o/2},left:function(){return r.left},right:function(){return r.left+r.width}},f={center:function(){return r.top+r.height/2-a/2},top:function(){return r.top},bottom:function(){return r.top+r.height}};switch(c){case"right":s={top:f[u](),left:d[c]()};break;case"left":s={top:f[u](),left:r.left-o};break;case"bottom":s={top:f[c](),left:d[u]()};break;default:s={top:r.top-a,left:d[u]()}}return s}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.position"]).constant("datepickerConfig",{formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",datepickerMode:"day",minMode:"day",maxMode:"year",showWeeks:!0,startingDay:0,yearRange:20,minDate:null,maxDate:null}).controller("DatepickerController",["$scope","$attrs","$parse","$interpolate","$timeout","$log","dateFilter","datepickerConfig",function(e,t,n,i,r,o,a,s){var l=this,c={$setViewValue:angular.noop};this.modes=["day","month","year"],angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","minMode","maxMode","showWeeks","startingDay","yearRange"],function(n,r){l[n]=angular.isDefined(t[n])?r<8?i(t[n])(e.$parent):e.$parent.$eval(t[n]):s[n]}),angular.forEach(["minDate","maxDate"],function(i){t[i]?e.$parent.$watch(n(t[i]),function(e){l[i]=e?new Date(e):null,l.refreshView()}):l[i]=s[i]?new Date(s[i]):null}),e.datepickerMode=e.datepickerMode||s.datepickerMode,e.uniqueId="datepicker-"+e.$id+"-"+Math.floor(1e4*Math.random()),this.activeDate=angular.isDefined(t.initDate)?e.$parent.$eval(t.initDate):new Date,e.isActive=function(t){return 0===l.compare(t.date,l.activeDate)&&(e.activeDateId=t.uid,!0)},this.init=function(e){c=e,c.$render=function(){l.render()}},this.render=function(){if(c.$modelValue){var e=new Date(c.$modelValue),t=!isNaN(e);t?this.activeDate=e:o.error('Datepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.'),c.$setValidity("date",t)}this.refreshView()},this.refreshView=function(){if(this.element){this._refreshView();var e=c.$modelValue?new Date(c.$modelValue):null;c.$setValidity("date-disabled",!e||this.element&&!this.isDisabled(e))}},this.createDateObject=function(e,t){var n=c.$modelValue?new Date(c.$modelValue):null;return{date:e,label:a(e,t),selected:n&&0===this.compare(e,n),disabled:this.isDisabled(e),current:0===this.compare(e,new Date)}},this.isDisabled=function(n){return this.minDate&&this.compare(n,this.minDate)<0||this.maxDate&&this.compare(n,this.maxDate)>0||t.dateDisabled&&e.dateDisabled({date:n,mode:e.datepickerMode})},this.split=function(e,t){for(var n=[];e.length>0;)n.push(e.splice(0,t));return n},e.select=function(t){if(e.datepickerMode===l.minMode){var n=c.$modelValue?new Date(c.$modelValue):new Date(0,0,0,0,0,0,0);n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),c.$setViewValue(n),c.$render()}else l.activeDate=t,e.datepickerMode=l.modes[l.modes.indexOf(e.datepickerMode)-1]},e.move=function(e){var t=l.activeDate.getFullYear()+e*(l.step.years||0),n=l.activeDate.getMonth()+e*(l.step.months||0);l.activeDate.setFullYear(t,n,1),l.refreshView()},e.toggleMode=function(t){t=t||1,e.datepickerMode===l.maxMode&&1===t||e.datepickerMode===l.minMode&&-1===t||(e.datepickerMode=l.modes[l.modes.indexOf(e.datepickerMode)+t])},e.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var u=function(){r(function(){l.element[0].focus()},0,!1)};e.$on("datepicker.focus",u),e.keydown=function(t){var n=e.keys[t.which];if(n&&!t.shiftKey&&!t.altKey)if(t.preventDefault(),t.stopPropagation(),"enter"===n||"space"===n){if(l.isDisabled(l.activeDate))return;e.select(l.activeDate),u()}else!t.ctrlKey||"up"!==n&&"down"!==n?(l.handleKeyDown(n,t),l.refreshView()):(e.toggleMode("up"===n?1:-1),u())}}]).directive("datepicker",function(){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/datepicker.html",scope:{datepickerMode:"=?",dateDisabled:"&"},require:["datepicker","?^ngModel"],controller:"DatepickerController",link:function(e,t,n,i){var r=i[0],o=i[1];o&&r.init(o)}}}).directive("daypicker",["dateFilter",function(e){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/day.html",require:"^datepicker",link:function(t,n,i,r){function o(e,t){return 1!==t||e%4!=0||e%100==0&&e%400!=0?l[t]:29}function a(e,t){var n=new Array(t),i=new Date(e),r=0;for(i.setHours(12);r<t;)n[r++]=new Date(i),i.setDate(i.getDate()+1);return n}function s(e){var t=new Date(e);t.setDate(t.getDate()+4-(t.getDay()||7));var n=t.getTime();return t.setMonth(0),t.setDate(1),Math.floor(Math.round((n-t)/864e5)/7)+1}t.showWeeks=r.showWeeks,r.step={months:1},r.element=n;var l=[31,28,31,30,31,30,31,31,30,31,30,31];r._refreshView=function(){var n=r.activeDate.getFullYear(),i=r.activeDate.getMonth(),o=new Date(n,i,1),l=r.startingDay-o.getDay(),c=l>0?7-l:-l,u=new Date(o);c>0&&u.setDate(1-c);for(var d=a(u,42),f=0;f<42;f++)d[f]=angular.extend(r.createDateObject(d[f],r.formatDay),{secondary:d[f].getMonth()!==i,uid:t.uniqueId+"-"+f});t.labels=new Array(7);for(var h=0;h<7;h++)t.labels[h]={abbr:e(d[h].date,r.formatDayHeader),full:e(d[h].date,"EEEE")};if(t.title=e(r.activeDate,r.formatDayTitle),t.rows=r.split(d,7),t.showWeeks){t.weekNumbers=[];for(var p=s(t.rows[0][0].date),g=t.rows.length;t.weekNumbers.push(p++)<g;);}},r.compare=function(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate())-new Date(t.getFullYear(),t.getMonth(),t.getDate())},r.handleKeyDown=function(e,t){var n=r.activeDate.getDate();if("left"===e)n-=1;else if("up"===e)n-=7;else if("right"===e)n+=1;else if("down"===e)n+=7;else if("pageup"===e||"pagedown"===e){var i=r.activeDate.getMonth()+("pageup"===e?-1:1);r.activeDate.setMonth(i,1),n=Math.min(o(r.activeDate.getFullYear(),r.activeDate.getMonth()),n)}else"home"===e?n=1:"end"===e&&(n=o(r.activeDate.getFullYear(),r.activeDate.getMonth()));r.activeDate.setDate(n)},r.refreshView()}}}]).directive("monthpicker",["dateFilter",function(e){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/month.html",require:"^datepicker",link:function(t,n,i,r){r.step={years:1},r.element=n,r._refreshView=function(){for(var n=new Array(12),i=r.activeDate.getFullYear(),o=0;o<12;o++)n[o]=angular.extend(r.createDateObject(new Date(i,o,1),r.formatMonth),{uid:t.uniqueId+"-"+o});t.title=e(r.activeDate,r.formatMonthTitle),t.rows=r.split(n,3)},r.compare=function(e,t){return new Date(e.getFullYear(),e.getMonth())-new Date(t.getFullYear(),t.getMonth())},r.handleKeyDown=function(e,t){var n=r.activeDate.getMonth();if("left"===e)n-=1;else if("up"===e)n-=3;else if("right"===e)n+=1;else if("down"===e)n+=3;else if("pageup"===e||"pagedown"===e){var i=r.activeDate.getFullYear()+("pageup"===e?-1:1);r.activeDate.setFullYear(i)}else"home"===e?n=0:"end"===e&&(n=11);r.activeDate.setMonth(n)},r.refreshView()}}}]).directive("yearpicker",["dateFilter",function(e){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/year.html",require:"^datepicker",link:function(e,t,n,i){function r(e){return parseInt((e-1)/o,10)*o+1}var o=i.yearRange;i.step={years:o},i.element=t,i._refreshView=function(){for(var t=new Array(o),n=0,a=r(i.activeDate.getFullYear());n<o;n++)t[n]=angular.extend(i.createDateObject(new Date(a+n,0,1),i.formatYear),{uid:e.uniqueId+"-"+n});e.title=[t[0].label,t[o-1].label].join(" - "),e.rows=i.split(t,5)},i.compare=function(e,t){return e.getFullYear()-t.getFullYear()},i.handleKeyDown=function(e,t){var n=i.activeDate.getFullYear();"left"===e?n-=1:"up"===e?n-=5:"right"===e?n+=1:"down"===e?n+=5:"pageup"===e||"pagedown"===e?n+=("pageup"===e?-1:1)*i.step.years:"home"===e?n=r(i.activeDate.getFullYear()):"end"===e&&(n=r(i.activeDate.getFullYear())+o-1),i.activeDate.setFullYear(n)},i.refreshView()}}}]).constant("datepickerPopupConfig",{datepickerPopup:"yyyy-MM-dd",currentText:"Today",clearText:"Clear",closeText:"Done",closeOnDateSelection:!0,appendToBody:!1,showButtonBar:!0}).directive("datepickerPopup",["$compile","$parse","$document","$position","dateFilter","dateParser","datepickerPopupConfig",function(e,t,n,i,r,o,a){return{restrict:"EA",require:"ngModel",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&"},link:function(s,l,c,u){function d(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}function f(e){if(e){if(angular.isDate(e)&&!isNaN(e))return u.$setValidity("date",!0),e;if(angular.isString(e)){var t=o.parse(e,h)||new Date(e);return isNaN(t)?void u.$setValidity("date",!1):(u.$setValidity("date",!0),t)}return void u.$setValidity("date",!1)}return u.$setValidity("date",!0),null}var h,p=angular.isDefined(c.closeOnDateSelection)?s.$parent.$eval(c.closeOnDateSelection):a.closeOnDateSelection,g=angular.isDefined(c.datepickerAppendToBody)?s.$parent.$eval(c.datepickerAppendToBody):a.appendToBody;s.showButtonBar=angular.isDefined(c.showButtonBar)?s.$parent.$eval(c.showButtonBar):a.showButtonBar,s.getText=function(e){return s[e+"Text"]||a[e+"Text"]},c.$observe("datepickerPopup",function(e){h=e||a.datepickerPopup,u.$render()});var m=angular.element("<div datepicker-popup-wrap><div datepicker></div></div>");m.attr({"ng-model":"date","ng-change":"dateSelection()"});var v=angular.element(m.children()[0]);c.datepickerOptions&&angular.forEach(s.$parent.$eval(c.datepickerOptions),function(e,t){v.attr(d(t),e)}),s.watchData={},angular.forEach(["minDate","maxDate","datepickerMode"],function(e){if(c[e]){var n=t(c[e]);if(s.$parent.$watch(n,function(t){s.watchData[e]=t}),v.attr(d(e),"watchData."+e),"datepickerMode"===e){var i=n.assign;s.$watch("watchData."+e,function(e,t){e!==t&&i(s.$parent,e)})}}}),c.dateDisabled&&v.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),u.$parsers.unshift(f),s.dateSelection=function(e){angular.isDefined(e)&&(s.date=e),u.$setViewValue(s.date),u.$render(),p&&(s.isOpen=!1,l[0].focus())},l.bind("input change keyup",function(){s.$apply(function(){s.date=u.$modelValue})}),u.$render=function(){var e=u.$viewValue?r(u.$viewValue,h):"";l.val(e),s.date=f(u.$modelValue)};var $=function(e){s.isOpen&&e.target!==l[0]&&s.$apply(function(){s.isOpen=!1})},y=function(e,t){s.keydown(e)};l.bind("keydown",y),s.keydown=function(e){27===e.which?(e.preventDefault(),e.stopPropagation(),s.close()):40!==e.which||s.isOpen||(s.isOpen=!0)},s.$watch("isOpen",function(e){e?(s.$broadcast("datepicker.focus"),s.position=g?i.offset(l):i.position(l),s.position.top=s.position.top+l.prop("offsetHeight"),n.bind("click",$)):n.unbind("click",$)}),s.select=function(e){if("today"===e){var t=new Date;angular.isDate(u.$modelValue)?(e=new Date(u.$modelValue),e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate())):e=new Date(t.setHours(0,0,0,0))}s.dateSelection(e)},s.close=function(){s.isOpen=!1,l[0].focus()};var b=e(m)(s);m.remove(),g?n.find("body").append(b):l.after(b),s.$on("$destroy",function(){b.remove(),l.unbind("keydown",y),n.unbind("click",$)})}}}]).directive("datepickerPopupWrap",function(){return{restrict:"EA",replace:!0,transclude:!0,templateUrl:"template/datepicker/popup.html",link:function(e,t,n){t.bind("click",function(e){e.preventDefault(),e.stopPropagation()})}}}),angular.module("ui.bootstrap.dropdown",[]).constant("dropdownConfig",{openClass:"open"}).service("dropdownService",["$document",function(e){var t=null;this.open=function(r){t||(e.bind("click",n),e.bind("keydown",i)),t&&t!==r&&(t.isOpen=!1),t=r},this.close=function(r){t===r&&(t=null,e.unbind("click",n),e.unbind("keydown",i))};var n=function(e){if(t){var n=t.getToggleElement();e&&n&&n[0].contains(e.target)||t.$apply(function(){t.isOpen=!1})}},i=function(e){27===e.which&&(t.focusToggleElement(),n())}}]).controller("DropdownController",["$scope","$attrs","$parse","dropdownConfig","dropdownService","$animate",function(e,t,n,i,r,o){var a,s=this,l=e.$new(),c=i.openClass,u=angular.noop,d=t.onToggle?n(t.onToggle):angular.noop;this.init=function(i){s.$element=i,t.isOpen&&(a=n(t.isOpen),u=a.assign,e.$watch(a,function(e){l.isOpen=!!e}))},this.toggle=function(e){return l.isOpen=arguments.length?!!e:!l.isOpen},this.isOpen=function(){return l.isOpen},l.getToggleElement=function(){return s.toggleElement},l.focusToggleElement=function(){s.toggleElement&&s.toggleElement[0].focus()},l.$watch("isOpen",function(t,n){o[t?"addClass":"removeClass"](s.$element,c),t?(l.focusToggleElement(),r.open(l)):r.close(l),u(e,t),angular.isDefined(t)&&t!==n&&d(e,{open:!!t})}),e.$on("$locationChangeSuccess",function(){l.isOpen=!1}),e.$on("$destroy",function(){l.$destroy()})}]).directive("dropdown",function(){return{controller:"DropdownController",link:function(e,t,n,i){i.init(t)}}}).directive("dropdownToggle",function(){return{require:"?^dropdown",link:function(e,t,n,i){if(i){i.toggleElement=t;var r=function(r){r.preventDefault(),t.hasClass("disabled")||n.disabled||e.$apply(function(){i.toggle()})};t.bind("click",r),t.attr({"aria-haspopup":!0,"aria-expanded":!1}),e.$watch(i.isOpen,function(e){t.attr("aria-expanded",!!e)}),e.$on("$destroy",function(){t.unbind("click",r)})}}}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.transition"]).factory("$$stackedMap",function(){return{createNew:function(){var e=[];return{add:function(t,n){e.push({key:t,value:n})},get:function(t){for(var n=0;n<e.length;n++)if(t==e[n].key)return e[n]},keys:function(){for(var t=[],n=0;n<e.length;n++)t.push(e[n].key);return t},top:function(){return e[e.length-1]},remove:function(t){for(var n=-1,i=0;i<e.length;i++)if(t==e[i].key){n=i;break}return e.splice(n,1)[0]},removeTop:function(){return e.splice(e.length-1,1)[0]},length:function(){return e.length}}}}}).directive("modalBackdrop",["$timeout",function(e){return{restrict:"EA",replace:!0,templateUrl:"template/modal/backdrop.html",link:function(t,n,i){t.backdropClass=i.backdropClass||"",t.animate=!1,e(function(){t.animate=!0})}}}]).directive("modalWindow",["$modalStack","$timeout",function(e,t){return{restrict:"EA",scope:{index:"@",animate:"="},replace:!0,transclude:!0,templateUrl:function(e,t){return t.templateUrl||"template/modal/window.html"},link:function(n,i,r){i.addClass(r.windowClass||""),n.size=r.size,t(function(){n.animate=!0,i[0].querySelectorAll("[autofocus]").length||i[0].focus()}),n.close=function(t){var n=e.getTop();n&&n.value.backdrop&&"static"!=n.value.backdrop&&t.target===t.currentTarget&&(t.preventDefault(),t.stopPropagation(),e.dismiss(n.key,"backdrop click"))}}}}]).directive("modalTransclude",function(){return{link:function(e,t,n,i,r){r(e.$parent,function(e){t.empty(),t.append(e)})}}}).factory("$modalStack",["$transition","$timeout","$document","$compile","$rootScope","$$stackedMap",function(e,t,n,i,r,o){function a(){for(var e=-1,t=h.keys(),n=0;n<t.length;n++)h.get(t[n]).value.backdrop&&(e=n);return e}function s(e){var t=n.find("body").eq(0),i=h.get(e).value;h.remove(e),c(i.modalDomEl,i.modalScope,300,function(){i.modalScope.$destroy(),t.toggleClass(f,h.length()>0),l()})}function l(){if(u&&-1==a()){var e=d;c(u,d,150,function(){e.$destroy(),e=null}),u=void 0,d=void 0}}function c(n,i,r,o){function a(){a.done||(a.done=!0,n.remove(),o&&o())}i.animate=!1;var s=e.transitionEndEventName;if(s){var l=t(a,r);n.bind(s,function(){t.cancel(l),a(),i.$apply()})}else t(a)}var u,d,f="modal-open",h=o.createNew(),p={};return r.$watch(a,function(e){d&&(d.index=e)}),n.bind("keydown",function(e){var t;27===e.which&&(t=h.top())&&t.value.keyboard&&(e.preventDefault(),r.$apply(function(){p.dismiss(t.key,"escape key press")}))}),p.open=function(e,t){h.add(e,{deferred:t.deferred,modalScope:t.scope,backdrop:t.backdrop,keyboard:t.keyboard});var o=n.find("body").eq(0),s=a();if(s>=0&&!u){d=r.$new(!0),d.index=s;var l=angular.element("<div modal-backdrop></div>");l.attr("backdrop-class",t.backdropClass),u=i(l)(d),o.append(u)}var c=angular.element("<div modal-window></div>");c.attr({"template-url":t.windowTemplateUrl,"window-class":t.windowClass,size:t.size,index:h.length()-1,animate:"animate"}).html(t.content);var p=i(c)(t.scope);h.top().value.modalDomEl=p,o.append(p),o.addClass(f)},p.close=function(e,t){var n=h.get(e);n&&(n.value.deferred.resolve(t),s(e))},p.dismiss=function(e,t){var n=h.get(e);n&&(n.value.deferred.reject(t),s(e))},p.dismissAll=function(e){for(var t=this.getTop();t;)this.dismiss(t.key,e),t=this.getTop()},p.getTop=function(){return h.top()},p}]).provider("$modal",function(){var e={options:{backdrop:!0,keyboard:!0},$get:["$injector","$rootScope","$q","$http","$templateCache","$controller","$modalStack",function(t,n,i,r,o,a,s){function l(e){return e.template?i.when(e.template):r.get(angular.isFunction(e.templateUrl)?e.templateUrl():e.templateUrl,{cache:o}).then(function(e){return e.data})}function c(e){var n=[];return angular.forEach(e,function(e){(angular.isFunction(e)||angular.isArray(e))&&n.push(i.when(t.invoke(e)))}),n}var u={};return u.open=function(t){var r=i.defer(),o=i.defer(),u={result:r.promise,opened:o.promise,close:function(e){s.close(u,e)},dismiss:function(e){s.dismiss(u,e)}};if(t=angular.extend({},e.options,t),t.resolve=t.resolve||{},!t.template&&!t.templateUrl)throw new Error("One of template or templateUrl options is required.");var d=i.all([l(t)].concat(c(t.resolve)));return d.then(function(e){var i=(t.scope||n).$new();i.$close=u.close,i.$dismiss=u.dismiss;var o,l={},c=1;t.controller&&(l.$scope=i,l.$modalInstance=u,angular.forEach(t.resolve,function(t,n){l[n]=e[c++]}),o=a(t.controller,l),t.controllerAs&&(i[t.controllerAs]=o)),s.open(u,{scope:i,deferred:r,content:e[0],backdrop:t.backdrop,keyboard:t.keyboard,backdropClass:t.backdropClass,windowClass:t.windowClass,windowTemplateUrl:t.windowTemplateUrl,size:t.size})},function(e){r.reject(e)}),d.then(function(){o.resolve(!0)},function(){o.reject(!1)}),u},u}]};return e}),angular.module("ui.bootstrap.pagination",[]).controller("PaginationController",["$scope","$attrs","$parse",function(e,t,n){var i=this,r={$setViewValue:angular.noop},o=t.numPages?n(t.numPages).assign:angular.noop;this.init=function(o,a){r=o,this.config=a,r.$render=function(){i.render()},t.itemsPerPage?e.$parent.$watch(n(t.itemsPerPage),function(t){i.itemsPerPage=parseInt(t,10),e.totalPages=i.calculateTotalPages()}):this.itemsPerPage=a.itemsPerPage},this.calculateTotalPages=function(){var t=this.itemsPerPage<1?1:Math.ceil(e.totalItems/this.itemsPerPage);return Math.max(t||0,1)},this.render=function(){e.page=parseInt(r.$viewValue,10)||1},e.selectPage=function(t){e.page!==t&&t>0&&t<=e.totalPages&&(r.$setViewValue(t),r.$render())},e.getText=function(t){return e[t+"Text"]||i.config[t+"Text"]},e.noPrevious=function(){return 1===e.page},e.noNext=function(){return e.page===e.totalPages},e.$watch("totalItems",function(){e.totalPages=i.calculateTotalPages()}),e.$watch("totalPages",function(t){o(e.$parent,t),e.page>t?e.selectPage(t):r.$render()})}]).constant("paginationConfig",{itemsPerPage:10,boundaryLinks:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0}).directive("pagination",["$parse","paginationConfig",function(e,t){return{restrict:"EA",scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@"},require:["pagination","?ngModel"],controller:"PaginationController",templateUrl:"template/pagination/pagination.html",replace:!0,link:function(n,i,r,o){function a(e,t,n){return{number:e,text:t,active:n}}function s(e,t){var n=[],i=1,r=t,o=angular.isDefined(u)&&u<t;o&&(d?(i=Math.max(e-Math.floor(u/2),1),(r=i+u-1)>t&&(r=t,i=r-u+1)):(i=(Math.ceil(e/u)-1)*u+1,r=Math.min(i+u-1,t)));for(var s=i;s<=r;s++){var l=a(s,s,s===e);n.push(l)}if(o&&!d){if(i>1){var c=a(i-1,"...",!1);n.unshift(c)}if(r<t){var f=a(r+1,"...",!1);n.push(f)}}return n}var l=o[0],c=o[1];if(c){var u=angular.isDefined(r.maxSize)?n.$parent.$eval(r.maxSize):t.maxSize,d=angular.isDefined(r.rotate)?n.$parent.$eval(r.rotate):t.rotate;n.boundaryLinks=angular.isDefined(r.boundaryLinks)?n.$parent.$eval(r.boundaryLinks):t.boundaryLinks,n.directionLinks=angular.isDefined(r.directionLinks)?n.$parent.$eval(r.directionLinks):t.directionLinks,l.init(c,t),r.maxSize&&n.$parent.$watch(e(r.maxSize),function(e){u=parseInt(e,10),l.render()});var f=l.render;l.render=function(){f(),n.page>0&&n.page<=n.totalPages&&(n.pages=s(n.page,n.totalPages))}}}}}]).constant("pagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("pager",["pagerConfig",function(e){return{restrict:"EA",scope:{totalItems:"=",previousText:"@",nextText:"@"},require:["pager","?ngModel"],controller:"PaginationController",templateUrl:"template/pagination/pager.html",replace:!0,link:function(t,n,i,r){var o=r[0],a=r[1];a&&(t.align=angular.isDefined(i.align)?t.$parent.$eval(i.align):e.align,o.init(a,e))}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).provider("$tooltip",function(){function e(e){var t=/[A-Z]/g;return e.replace(t,function(e,t){return(t?"-":"")+e.toLowerCase()})}var t={placement:"top",animation:!0,popupDelay:0},n={mouseenter:"mouseleave",click:"click",focus:"blur"},i={};this.options=function(e){angular.extend(i,e)},this.setTriggers=function(e){angular.extend(n,e)},this.$get=["$window","$compile","$timeout","$document","$position","$interpolate",function(r,o,a,s,l,c){return function(r,u,d){function f(e){var t=e||h.trigger||d;return{show:t,hide:n[t]||t}}var h=angular.extend({},t,i),p=e(r),g=c.startSymbol(),m=c.endSymbol(),v="<div "+p+'-popup title="'+g+"title"+m+'" content="'+g+"content"+m+'" placement="'+g+"placement"+m+'" animation="animation" is-open="isOpen"></div>';return{restrict:"EA",compile:function(e,t){var n=o(v);return function(e,t,i){function o(){D.isOpen?d():c()}function c(){T&&!e.$eval(i[u+"Enable"])||($(),D.popupDelay?k||(k=a(p,D.popupDelay,!1),k.then(function(e){e()})):p()())}function d(){e.$apply(function(){g()})}function p(){return k=null,C&&(a.cancel(C),C=null),D.content?(m(),w.css({top:0,
-left:0,display:"block"}),D.$digest(),A(),D.isOpen=!0,D.$digest(),A):angular.noop}function g(){D.isOpen=!1,a.cancel(k),k=null,D.animation?C||(C=a(v,500)):v()}function m(){w&&v(),x=D.$new(),w=n(x,function(e){S?s.find("body").append(e):t.after(e)})}function v(){C=null,w&&(w.remove(),w=null),x&&(x.$destroy(),x=null)}function $(){y(),b()}function y(){var e=i[u+"Placement"];D.placement=angular.isDefined(e)?e:h.placement}function b(){var e=i[u+"PopupDelay"],t=parseInt(e,10);D.popupDelay=isNaN(t)?h.popupDelay:t}var w,x,C,k,S=!!angular.isDefined(h.appendToBody)&&h.appendToBody,E=f(void 0),T=angular.isDefined(i[u+"Enable"]),D=e.$new(!0),A=function(){var e=l.positionElements(t,w,D.placement,S);e.top+="px",e.left+="px",w.css(e)};D.isOpen=!1,i.$observe(r,function(e){D.content=e,!e&&D.isOpen&&g()}),i.$observe(u+"Title",function(e){D.title=e});var M=function(){t.unbind(E.show,c),t.unbind(E.hide,d)};!function(){var e=i[u+"Trigger"];M(),E=f(e),E.show===E.hide?t.bind(E.show,o):(t.bind(E.show,c),t.bind(E.hide,d))}();var O=e.$eval(i[u+"Animation"]);D.animation=angular.isDefined(O)?!!O:h.animation;var I=e.$eval(i[u+"AppendToBody"]);S=angular.isDefined(I)?I:S,S&&e.$on("$locationChangeSuccess",function(){D.isOpen&&g()}),e.$on("$destroy",function(){a.cancel(C),a.cancel(k),M(),v(),D=null})}}}}}]}).directive("tooltipPopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-popup.html"}}).directive("tooltip",["$tooltip",function(e){return e("tooltip","tooltip","mouseenter")}]).directive("tooltipHtmlUnsafePopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-unsafe-popup.html"}}).directive("tooltipHtmlUnsafe",["$tooltip",function(e){return e("tooltipHtmlUnsafe","tooltip","mouseenter")}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("popoverPopup",function(){return{restrict:"EA",replace:!0,scope:{title:"@",content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover.html"}}).directive("popover",["$tooltip",function(e){return e("popover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("progressConfig",{animate:!0,max:100}).controller("ProgressController",["$scope","$attrs","progressConfig",function(e,t,n){var i=this,r=angular.isDefined(t.animate)?e.$parent.$eval(t.animate):n.animate;this.bars=[],e.max=angular.isDefined(t.max)?e.$parent.$eval(t.max):n.max,this.addBar=function(t,n){r||n.css({transition:"none"}),this.bars.push(t),t.$watch("value",function(n){t.percent=+(100*n/e.max).toFixed(2)}),t.$on("$destroy",function(){n=null,i.removeBar(t)})},this.removeBar=function(e){this.bars.splice(this.bars.indexOf(e),1)}}]).directive("progress",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",require:"progress",scope:{},templateUrl:"template/progressbar/progress.html"}}).directive("bar",function(){return{restrict:"EA",replace:!0,transclude:!0,require:"^progress",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/bar.html",link:function(e,t,n,i){i.addBar(e,t)}}}).directive("progressbar",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/progressbar.html",link:function(e,t,n,i){i.addBar(e,angular.element(t.children()[0]))}}}),angular.module("ui.bootstrap.rating",[]).constant("ratingConfig",{max:5,stateOn:null,stateOff:null}).controller("RatingController",["$scope","$attrs","ratingConfig",function(e,t,n){var i={$setViewValue:angular.noop};this.init=function(r){i=r,i.$render=this.render,this.stateOn=angular.isDefined(t.stateOn)?e.$parent.$eval(t.stateOn):n.stateOn,this.stateOff=angular.isDefined(t.stateOff)?e.$parent.$eval(t.stateOff):n.stateOff;var o=angular.isDefined(t.ratingStates)?e.$parent.$eval(t.ratingStates):new Array(angular.isDefined(t.max)?e.$parent.$eval(t.max):n.max);e.range=this.buildTemplateObjects(o)},this.buildTemplateObjects=function(e){for(var t=0,n=e.length;t<n;t++)e[t]=angular.extend({index:t},{stateOn:this.stateOn,stateOff:this.stateOff},e[t]);return e},e.rate=function(t){!e.readonly&&t>=0&&t<=e.range.length&&(i.$setViewValue(t),i.$render())},e.enter=function(t){e.readonly||(e.value=t),e.onHover({value:t})},e.reset=function(){e.value=i.$viewValue,e.onLeave()},e.onKeydown=function(t){/(37|38|39|40)/.test(t.which)&&(t.preventDefault(),t.stopPropagation(),e.rate(e.value+(38===t.which||39===t.which?1:-1)))},this.render=function(){e.value=i.$viewValue}}]).directive("rating",function(){return{restrict:"EA",require:["rating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"RatingController",templateUrl:"template/rating/rating.html",replace:!0,link:function(e,t,n,i){var r=i[0],o=i[1];o&&r.init(o)}}}),angular.module("ui.bootstrap.tabs",[]).controller("TabsetController",["$scope",function(e){var t=this,n=t.tabs=e.tabs=[];t.select=function(e){angular.forEach(n,function(t){t.active&&t!==e&&(t.active=!1,t.onDeselect())}),e.active=!0,e.onSelect()},t.addTab=function(e){n.push(e),1===n.length?e.active=!0:e.active&&t.select(e)},t.removeTab=function(e){var r=n.indexOf(e);if(e.active&&n.length>1&&!i){var o=r==n.length-1?r-1:r+1;t.select(n[o])}n.splice(r,1)};var i;e.$on("$destroy",function(){i=!0})}]).directive("tabset",function(){return{restrict:"EA",transclude:!0,replace:!0,scope:{type:"@"},controller:"TabsetController",templateUrl:"template/tabs/tabset.html",link:function(e,t,n){e.vertical=!!angular.isDefined(n.vertical)&&e.$parent.$eval(n.vertical),e.justified=!!angular.isDefined(n.justified)&&e.$parent.$eval(n.justified)}}}).directive("tab",["$parse",function(e){return{require:"^tabset",restrict:"EA",replace:!0,templateUrl:"template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},compile:function(t,n,i){return function(t,n,r,o){t.$watch("active",function(e){e&&o.select(t)}),t.disabled=!1,r.disabled&&t.$parent.$watch(e(r.disabled),function(e){t.disabled=!!e}),t.select=function(){t.disabled||(t.active=!0)},o.addTab(t),t.$on("$destroy",function(){o.removeTab(t)}),t.$transcludeFn=i}}}}]).directive("tabHeadingTransclude",[function(){return{restrict:"A",require:"^tab",link:function(e,t,n,i){e.$watch("headingElement",function(e){e&&(t.html(""),t.append(e))})}}}]).directive("tabContentTransclude",function(){function e(e){return e.tagName&&(e.hasAttribute("tab-heading")||e.hasAttribute("data-tab-heading")||"tab-heading"===e.tagName.toLowerCase()||"data-tab-heading"===e.tagName.toLowerCase())}return{restrict:"A",require:"^tabset",link:function(t,n,i){var r=t.$eval(i.tabContentTransclude);r.$transcludeFn(r.$parent,function(t){angular.forEach(t,function(t){e(t)?r.headingElement=t:n.append(t)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("timepickerConfig",{hourStep:1,minuteStep:1,showMeridian:!0,meridians:null,readonlyInput:!1,mousewheel:!0}).controller("TimepickerController",["$scope","$attrs","$parse","$log","$locale","timepickerConfig",function(e,t,n,i,r,o){function a(){var t=parseInt(e.hours,10);if(e.showMeridian?t>0&&t<13:t>=0&&t<24)return e.showMeridian&&(12===t&&(t=0),e.meridian===g[1]&&(t+=12)),t}function s(){var t=parseInt(e.minutes,10);return t>=0&&t<60?t:void 0}function l(e){return angular.isDefined(e)&&e.toString().length<2?"0"+e:e}function c(e){u(),p.$setViewValue(new Date(h)),d(e)}function u(){p.$setValidity("time",!0),e.invalidHours=!1,e.invalidMinutes=!1}function d(t){var n=h.getHours(),i=h.getMinutes();e.showMeridian&&(n=0===n||12===n?12:n%12),e.hours="h"===t?n:l(n),e.minutes="m"===t?i:l(i),e.meridian=h.getHours()<12?g[0]:g[1]}function f(e){var t=new Date(h.getTime()+6e4*e);h.setHours(t.getHours(),t.getMinutes()),c()}var h=new Date,p={$setViewValue:angular.noop},g=angular.isDefined(t.meridians)?e.$parent.$eval(t.meridians):o.meridians||r.DATETIME_FORMATS.AMPMS;this.init=function(n,i){p=n,p.$render=this.render;var r=i.eq(0),a=i.eq(1);(angular.isDefined(t.mousewheel)?e.$parent.$eval(t.mousewheel):o.mousewheel)&&this.setupMousewheelEvents(r,a),e.readonlyInput=angular.isDefined(t.readonlyInput)?e.$parent.$eval(t.readonlyInput):o.readonlyInput,this.setupInputEvents(r,a)};var m=o.hourStep;t.hourStep&&e.$parent.$watch(n(t.hourStep),function(e){m=parseInt(e,10)});var v=o.minuteStep;t.minuteStep&&e.$parent.$watch(n(t.minuteStep),function(e){v=parseInt(e,10)}),e.showMeridian=o.showMeridian,t.showMeridian&&e.$parent.$watch(n(t.showMeridian),function(t){if(e.showMeridian=!!t,p.$error.time){var n=a(),i=s();angular.isDefined(n)&&angular.isDefined(i)&&(h.setHours(n),c())}else d()}),this.setupMousewheelEvents=function(t,n){var i=function(e){e.originalEvent&&(e=e.originalEvent);var t=e.wheelDelta?e.wheelDelta:-e.deltaY;return e.detail||t>0};t.bind("mousewheel wheel",function(t){e.$apply(i(t)?e.incrementHours():e.decrementHours()),t.preventDefault()}),n.bind("mousewheel wheel",function(t){e.$apply(i(t)?e.incrementMinutes():e.decrementMinutes()),t.preventDefault()})},this.setupInputEvents=function(t,n){if(e.readonlyInput)return e.updateHours=angular.noop,void(e.updateMinutes=angular.noop);var i=function(t,n){p.$setViewValue(null),p.$setValidity("time",!1),angular.isDefined(t)&&(e.invalidHours=t),angular.isDefined(n)&&(e.invalidMinutes=n)};e.updateHours=function(){var e=a();angular.isDefined(e)?(h.setHours(e),c("h")):i(!0)},t.bind("blur",function(t){!e.invalidHours&&e.hours<10&&e.$apply(function(){e.hours=l(e.hours)})}),e.updateMinutes=function(){var e=s();angular.isDefined(e)?(h.setMinutes(e),c("m")):i(void 0,!0)},n.bind("blur",function(t){!e.invalidMinutes&&e.minutes<10&&e.$apply(function(){e.minutes=l(e.minutes)})})},this.render=function(){var e=p.$modelValue?new Date(p.$modelValue):null;isNaN(e)?(p.$setValidity("time",!1),i.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(e&&(h=e),u(),d())},e.incrementHours=function(){f(60*m)},e.decrementHours=function(){f(60*-m)},e.incrementMinutes=function(){f(v)},e.decrementMinutes=function(){f(-v)},e.toggleMeridian=function(){f(720*(h.getHours()<12?1:-1))}}]).directive("timepicker",function(){return{restrict:"EA",require:["timepicker","?^ngModel"],controller:"TimepickerController",replace:!0,scope:{},templateUrl:"template/timepicker/timepicker.html",link:function(e,t,n,i){var r=i[0],o=i[1];o&&r.init(o,t.find("input"))}}}),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).factory("typeaheadParser",["$parse",function(e){var t=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(n){var i=n.match(t);if(!i)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+n+'".');return{itemName:i[3],source:e(i[4]),viewMapper:e(i[2]||i[1]),modelMapper:e(i[1])}}}}]).directive("typeahead",["$compile","$parse","$q","$timeout","$document","$position","typeaheadParser",function(e,t,n,i,r,o,a){var s=[9,13,27,38,40];return{require:"ngModel",link:function(l,c,u,d){var f,h=l.$eval(u.typeaheadMinLength)||1,p=l.$eval(u.typeaheadWaitMs)||0,g=!1!==l.$eval(u.typeaheadEditable),m=t(u.typeaheadLoading).assign||angular.noop,v=t(u.typeaheadOnSelect),$=u.typeaheadInputFormatter?t(u.typeaheadInputFormatter):void 0,y=!!u.typeaheadAppendToBody&&l.$eval(u.typeaheadAppendToBody),b=!1!==l.$eval(u.typeaheadFocusFirst),w=t(u.ngModel).assign,x=a.parse(u.typeahead),C=l.$new();l.$on("$destroy",function(){C.$destroy()});var k="typeahead-"+C.$id+"-"+Math.floor(1e4*Math.random());c.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":k});var S=angular.element("<div typeahead-popup></div>");S.attr({id:k,matches:"matches",active:"activeIdx",select:"select(activeIdx)",query:"query",position:"position"}),angular.isDefined(u.typeaheadTemplateUrl)&&S.attr("template-url",u.typeaheadTemplateUrl);var E=function(){C.matches=[],C.activeIdx=-1,c.attr("aria-expanded",!1)},T=function(e){return k+"-option-"+e};C.$watch("activeIdx",function(e){e<0?c.removeAttr("aria-activedescendant"):c.attr("aria-activedescendant",T(e))});var D=function(e){var t={$viewValue:e};m(l,!0),n.when(x.source(l,t)).then(function(n){var i=e===d.$viewValue;if(i&&f)if(n.length>0){C.activeIdx=b?0:-1,C.matches.length=0;for(var r=0;r<n.length;r++)t[x.itemName]=n[r],C.matches.push({id:T(r),label:x.viewMapper(C,t),model:n[r]});C.query=e,C.position=y?o.offset(c):o.position(c),C.position.top=C.position.top+c.prop("offsetHeight"),c.attr("aria-expanded",!0)}else E();i&&m(l,!1)},function(){E(),m(l,!1)})};E(),C.query=void 0;var A,M=function(e){A=i(function(){D(e)},p)},O=function(){A&&i.cancel(A)};d.$parsers.unshift(function(e){return f=!0,e&&e.length>=h?p>0?(O(),M(e)):D(e):(m(l,!1),O(),E()),g?e:e?void d.$setValidity("editable",!1):(d.$setValidity("editable",!0),e)}),d.$formatters.push(function(e){var t,n,i={};return $?(i.$model=e,$(l,i)):(i[x.itemName]=e,t=x.viewMapper(l,i),i[x.itemName]=void 0,n=x.viewMapper(l,i),t!==n?t:e)}),C.select=function(e){var t,n,r={};r[x.itemName]=n=C.matches[e].model,t=x.modelMapper(l,r),w(l,t),d.$setValidity("editable",!0),v(l,{$item:n,$model:t,$label:x.viewMapper(l,r)}),E(),i(function(){c[0].focus()},0,!1)},c.bind("keydown",function(e){0!==C.matches.length&&-1!==s.indexOf(e.which)&&(-1!=C.activeIdx||13!==e.which&&9!==e.which)&&(e.preventDefault(),40===e.which?(C.activeIdx=(C.activeIdx+1)%C.matches.length,C.$digest()):38===e.which?(C.activeIdx=(C.activeIdx>0?C.activeIdx:C.matches.length)-1,C.$digest()):13===e.which||9===e.which?C.$apply(function(){C.select(C.activeIdx)}):27===e.which&&(e.stopPropagation(),E(),C.$digest()))}),c.bind("blur",function(e){f=!1});var I=function(e){c[0]!==e.target&&(E(),C.$digest())};r.bind("click",I),l.$on("$destroy",function(){r.unbind("click",I),y&&P.remove()});var P=e(S)(C);y?r.find("body").append(P):c.after(P)}}}]).directive("typeaheadPopup",function(){return{restrict:"EA",scope:{matches:"=",query:"=",active:"=",position:"=",select:"&"},replace:!0,templateUrl:"template/typeahead/typeahead-popup.html",link:function(e,t,n){e.templateUrl=n.templateUrl,e.isOpen=function(){return e.matches.length>0},e.isActive=function(t){return e.active==t},e.selectActive=function(t){e.active=t},e.selectMatch=function(t){e.select({activeIdx:t})}}}}).directive("typeaheadMatch",["$http","$templateCache","$compile","$parse",function(e,t,n,i){return{restrict:"EA",scope:{index:"=",match:"=",query:"="},link:function(r,o,a){var s=i(a.templateUrl)(r.$parent)||"template/typeahead/typeahead-match.html";e.get(s,{cache:t}).success(function(e){o.replaceWith(n(e.trim())(r))})}}}]).filter("typeaheadHighlight",function(){function e(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(t,n){return n?(""+t).replace(new RegExp(e(n),"gi"),"<strong>$&</strong>"):t}}),angular.module("template/accordion/accordion-group.html",[]).run(["$templateCache",function(e){e.put("template/accordion/accordion-group.html",'<div class="panel panel-default">\n <div class="panel-heading">\n <h4 class="panel-title">\n <a href class="accordion-toggle" ng-click="toggleOpen()" accordion-transclude="heading"><span ng-class="{\'text-muted\': isDisabled}">{{heading}}</span></a>\n </h4>\n </div>\n <div class="panel-collapse" collapse="!isOpen">\n\t <div class="panel-body" ng-transclude></div>\n </div>\n</div>\n')}]),angular.module("template/accordion/accordion.html",[]).run(["$templateCache",function(e){e.put("template/accordion/accordion.html",'<div class="panel-group" ng-transclude></div>')}]),angular.module("template/alert/alert.html",[]).run(["$templateCache",function(e){e.put("template/alert/alert.html",'<div class="alert" ng-class="[\'alert-\' + (type || \'warning\'), closeable ? \'alert-dismissable\' : null]" role="alert">\n <button ng-show="closeable" type="button" class="close" ng-click="close()">\n <span aria-hidden="true">&times;</span>\n <span class="sr-only">Close</span>\n </button>\n <div ng-transclude></div>\n</div>\n')}]),angular.module("template/carousel/carousel.html",[]).run(["$templateCache",function(e){e.put("template/carousel/carousel.html",'<div ng-mouseenter="pause()" ng-mouseleave="play()" class="carousel" ng-swipe-right="prev()" ng-swipe-left="next()">\n <ol class="carousel-indicators" ng-show="slides.length > 1">\n <li ng-repeat="slide in slides track by $index" ng-class="{active: isActive(slide)}" ng-click="select(slide)"></li>\n </ol>\n <div class="carousel-inner" ng-transclude></div>\n <a class="left carousel-control" ng-click="prev()" ng-show="slides.length > 1"><span class="glyphicon glyphicon-chevron-left"></span></a>\n <a class="right carousel-control" ng-click="next()" ng-show="slides.length > 1"><span class="glyphicon glyphicon-chevron-right"></span></a>\n</div>\n')}]),angular.module("template/carousel/slide.html",[]).run(["$templateCache",function(e){e.put("template/carousel/slide.html","<div ng-class=\"{\n 'active': leaving || (active && !entering),\n 'prev': (next || active) && direction=='prev',\n 'next': (next || active) && direction=='next',\n 'right': direction=='prev',\n 'left': direction=='next'\n }\" class=\"item text-center\" ng-transclude></div>\n")}]),angular.module("template/datepicker/datepicker.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/datepicker.html",'<div ng-switch="datepickerMode" role="application" ng-keydown="keydown($event)">\n <daypicker ng-switch-when="day" tabindex="0"></daypicker>\n <monthpicker ng-switch-when="month" tabindex="0"></monthpicker>\n <yearpicker ng-switch-when="year" tabindex="0"></yearpicker>\n</div>')}]),angular.module("template/datepicker/day.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/day.html",'<table role="grid" aria-labelledby="{{uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="{{5 + showWeeks}}"><button id="{{uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n <tr>\n <th ng-show="showWeeks" class="text-center"></th>\n <th ng-repeat="label in labels track by $index" class="text-center"><small aria-label="{{label.full}}">{{label.abbr}}</small></th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="row in rows track by $index">\n <td ng-show="showWeeks" class="text-center h6"><em>{{ weekNumbers[$index] }}</em></td>\n <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{dt.uid}}" aria-disabled="{{!!dt.disabled}}">\n <button type="button" style="width:100%;" class="btn btn-default btn-sm" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="{\'text-muted\': dt.secondary, \'text-info\': dt.current}">{{dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/datepicker/month.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/month.html",'<table role="grid" aria-labelledby="{{uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th><button id="{{uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{dt.uid}}" aria-disabled="{{!!dt.disabled}}">\n <button type="button" style="width:100%;" class="btn btn-default" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="{\'text-info\': dt.current}">{{dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/datepicker/popup.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/popup.html",'<ul class="dropdown-menu" ng-style="{display: (isOpen && \'block\') || \'none\', top: position.top+\'px\', left: position.left+\'px\'}" ng-keydown="keydown($event)">\n\t<li ng-transclude></li>\n\t<li ng-if="showButtonBar" style="padding:10px 9px 2px">\n\t\t<span class="btn-group pull-left">\n\t\t\t<button type="button" class="btn btn-sm btn-info" ng-click="select(\'today\')">{{ getText(\'current\') }}</button>\n\t\t\t<button type="button" class="btn btn-sm btn-danger" ng-click="select(null)">{{ getText(\'clear\') }}</button>\n\t\t</span>\n\t\t<button type="button" class="btn btn-sm btn-success pull-right" ng-click="close()">{{ getText(\'close\') }}</button>\n\t</li>\n</ul>\n')}]),angular.module("template/datepicker/year.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/year.html",'<table role="grid" aria-labelledby="{{uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="3"><button id="{{uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{dt.uid}}" aria-disabled="{{!!dt.disabled}}">\n <button type="button" style="width:100%;" class="btn btn-default" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="{\'text-info\': dt.current}">{{dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/modal/backdrop.html",[]).run(["$templateCache",function(e){e.put("template/modal/backdrop.html",'<div class="modal-backdrop fade {{ backdropClass }}"\n ng-class="{in: animate}"\n ng-style="{\'z-index\': 1040 + (index && 1 || 0) + index*10}"\n></div>\n')}]),angular.module("template/modal/window.html",[]).run(["$templateCache",function(e){e.put("template/modal/window.html",'<div tabindex="-1" role="dialog" class="modal fade" ng-class="{in: animate}" ng-style="{\'z-index\': 1050 + index*10, display: \'block\'}" ng-click="close($event)">\n <div class="modal-dialog" ng-class="{\'modal-sm\': size == \'sm\', \'modal-lg\': size == \'lg\'}"><div class="modal-content" modal-transclude></div></div>\n</div>')}]),angular.module("template/pagination/pager.html",[]).run(["$templateCache",function(e){e.put("template/pagination/pager.html",'<ul class="pager">\n <li ng-class="{disabled: noPrevious(), previous: align}"><a href ng-click="selectPage(page - 1)">{{getText(\'previous\')}}</a></li>\n <li ng-class="{disabled: noNext(), next: align}"><a href ng-click="selectPage(page + 1)">{{getText(\'next\')}}</a></li>\n</ul>')}]),angular.module("template/pagination/pagination.html",[]).run(["$templateCache",function(e){e.put("template/pagination/pagination.html",'<ul class="pagination">\n <li ng-if="boundaryLinks" ng-class="{disabled: noPrevious()}"><a href ng-click="selectPage(1)">{{getText(\'first\')}}</a></li>\n <li ng-if="directionLinks" ng-class="{disabled: noPrevious()}"><a href ng-click="selectPage(page - 1)">{{getText(\'previous\')}}</a></li>\n <li ng-repeat="page in pages track by $index" ng-class="{active: page.active}"><a href ng-click="selectPage(page.number)">{{page.text}}</a></li>\n <li ng-if="directionLinks" ng-class="{disabled: noNext()}"><a href ng-click="selectPage(page + 1)">{{getText(\'next\')}}</a></li>\n <li ng-if="boundaryLinks" ng-class="{disabled: noNext()}"><a href ng-click="selectPage(totalPages)">{{getText(\'last\')}}</a></li>\n</ul>')}]),angular.module("template/tooltip/tooltip-html-unsafe-popup.html",[]).run(["$templateCache",function(e){e.put("template/tooltip/tooltip-html-unsafe-popup.html",'<div class="tooltip {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" bind-html-unsafe="content"></div>\n</div>\n')}]),angular.module("template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(e){e.put("template/tooltip/tooltip-popup.html",'<div class="tooltip {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" ng-bind="content"></div>\n</div>\n')}]),angular.module("template/popover/popover.html",[]).run(["$templateCache",function(e){e.put("template/popover/popover.html",'<div class="popover {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="title" ng-show="title"></h3>\n <div class="popover-content" ng-bind="content"></div>\n </div>\n</div>\n')}]),angular.module("template/progressbar/bar.html",[]).run(["$templateCache",function(e){e.put("template/progressbar/bar.html",'<div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: percent + \'%\'}" aria-valuetext="{{percent | number:0}}%" ng-transclude></div>')}]),angular.module("template/progressbar/progress.html",[]).run(["$templateCache",function(e){e.put("template/progressbar/progress.html",'<div class="progress" ng-transclude></div>')}]),angular.module("template/progressbar/progressbar.html",[]).run(["$templateCache",function(e){e.put("template/progressbar/progressbar.html",'<div class="progress">\n <div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: percent + \'%\'}" aria-valuetext="{{percent | number:0}}%" ng-transclude></div>\n</div>')}]),angular.module("template/rating/rating.html",[]).run(["$templateCache",function(e){e.put("template/rating/rating.html",'<span ng-mouseleave="reset()" ng-keydown="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="{{range.length}}" aria-valuenow="{{value}}">\n <i ng-repeat="r in range track by $index" ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || \'glyphicon-star\') || (r.stateOff || \'glyphicon-star-empty\')">\n <span class="sr-only">({{ $index < value ? \'*\' : \' \' }})</span>\n </i>\n</span>')}]),angular.module("template/tabs/tab.html",[]).run(["$templateCache",function(e){e.put("template/tabs/tab.html",'<li ng-class="{active: active, disabled: disabled}">\n <a href ng-click="select()" tab-heading-transclude>{{heading}}</a>\n</li>\n')}]),angular.module("template/tabs/tabset.html",[]).run(["$templateCache",function(e){e.put("template/tabs/tabset.html",'<div>\n <ul class="nav nav-{{type || \'tabs\'}}" ng-class="{\'nav-stacked\': vertical, \'nav-justified\': justified}" ng-transclude></ul>\n <div class="tab-content">\n <div class="tab-pane" \n ng-repeat="tab in tabs" \n ng-class="{active: tab.active}"\n tab-content-transclude="tab">\n </div>\n </div>\n</div>\n')}]),angular.module("template/timepicker/timepicker.html",[]).run(["$templateCache",function(e){e.put("template/timepicker/timepicker.html",'<table>\n\t<tbody>\n\t\t<tr class="text-center">\n\t\t\t<td><a ng-click="incrementHours()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td><a ng-click="incrementMinutes()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n\t\t\t<td ng-show="showMeridian"></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td style="width:50px;" class="form-group" ng-class="{\'has-error\': invalidHours}">\n\t\t\t\t<input type="text" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-mousewheel="incrementHours()" ng-readonly="readonlyInput" maxlength="2">\n\t\t\t</td>\n\t\t\t<td>:</td>\n\t\t\t<td style="width:50px;" class="form-group" ng-class="{\'has-error\': invalidMinutes}">\n\t\t\t\t<input type="text" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="readonlyInput" maxlength="2">\n\t\t\t</td>\n\t\t\t<td ng-show="showMeridian"><button type="button" class="btn btn-default text-center" ng-click="toggleMeridian()">{{meridian}}</button></td>\n\t\t</tr>\n\t\t<tr class="text-center">\n\t\t\t<td><a ng-click="decrementHours()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td><a ng-click="decrementMinutes()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n\t\t\t<td ng-show="showMeridian"></td>\n\t\t</tr>\n\t</tbody>\n</table>\n')}]),angular.module("template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(e){e.put("template/typeahead/typeahead-match.html",'<a tabindex="-1" bind-html-unsafe="match.label | typeaheadHighlight:query"></a>')}]),angular.module("template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(e){e.put("template/typeahead/typeahead-popup.html",'<ul class="dropdown-menu" ng-show="isOpen()" ng-style="{top: position.top+\'px\', left: position.left+\'px\'}" style="display: block;" role="listbox" aria-hidden="{{!isOpen()}}">\n <li ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index)" role="option" id="{{match.id}}">\n <div typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></div>\n </li>\n</ul>\n')}]),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(e,t,n){"use strict";function i(e,t){return j(new(j(function(){},{prototype:e})),t)}function r(e){return N(arguments,function(t){t!==e&&N(t,function(t,n){e.hasOwnProperty(n)||(e[n]=t)})}),e}function o(e,t){var n=[];for(var i in e.path){if(e.path[i]!==t.path[i])break;n.push(e.path[i])}return n}function a(e){if(Object.keys)return Object.keys(e);var n=[];return t.forEach(e,function(e,t){n.push(t)}),n}function s(e,t){if(Array.prototype.indexOf)return e.indexOf(t,Number(arguments[2])||0);var n=e.length>>>0,i=Number(arguments[2])||0;for(i=i<0?Math.ceil(i):Math.floor(i),i<0&&(i+=n);i<n;i++)if(i in e&&e[i]===t)return i;return-1}function l(e,t,n,i){var r,l=o(n,i),c={},u=[]
-;for(var d in l)if(l[d].params&&(r=a(l[d].params),r.length))for(var f in r)s(u,r[f])>=0||(u.push(r[f]),c[r[f]]=e[r[f]]);return j({},c,t)}function c(e,t,n){if(!n){n=[];for(var i in e)n.push(i)}for(var r=0;r<n.length;r++){var o=n[r];if(e[o]!=t[o])return!1}return!0}function u(e,t){var n={};return N(e,function(e){n[e]=t[e]}),n}function d(e,t){var i=1,o=2,a={},s=[],l=a,c=j(e.when(a),{$$promises:a,$$values:a});this.study=function(a){function u(e,n){if(p[n]!==o){if(h.push(n),p[n]===i)throw h.splice(0,h.indexOf(n)),new Error("Cyclic dependency: "+h.join(" -> "));if(p[n]=i,O(e))f.push(n,[function(){return t.get(e)}],s);else{var r=t.annotate(e);N(r,function(e){e!==n&&a.hasOwnProperty(e)&&u(a[e],e)}),f.push(n,e,r)}h.pop(),p[n]=o}}function d(e){return I(e)&&e.then&&e.$$promises}if(!I(a))throw new Error("'invocables' must be an object");var f=[],h=[],p={};return N(a,u),a=h=p=null,function(i,o,a){function s(){--v||($||r(m,o.$$values),p.$$values=m,p.$$promises=!0,delete p.$$inheritedValues,h.resolve(m))}function u(e){p.$$failure=e,h.reject(e)}if(d(i)&&a===n&&(a=o,o=i,i=null),i){if(!I(i))throw new Error("'locals' must be an object")}else i=l;if(o){if(!d(o))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else o=c;var h=e.defer(),p=h.promise,g=p.$$promises={},m=j({},i),v=1+f.length/3,$=!1;if(A(o.$$failure))return u(o.$$failure),p;o.$$inheritedValues&&r(m,o.$$inheritedValues),o.$$values?($=r(m,o.$$values),p.$$inheritedValues=o.$$values,s()):(o.$$inheritedValues&&(p.$$inheritedValues=o.$$inheritedValues),j(g,o.$$promises),o.then(s,u));for(var y=0,b=f.length;y<b;y+=3)i.hasOwnProperty(f[y])?s():function(n,r,o){function l(e){d.reject(e),u(e)}function c(){if(!A(p.$$failure))try{d.resolve(t.invoke(r,a,m)),d.promise.then(function(e){m[n]=e,s()},l)}catch(e){l(e)}}var d=e.defer(),f=0;N(o,function(e){g.hasOwnProperty(e)&&!i.hasOwnProperty(e)&&(f++,g[e].then(function(t){m[e]=t,--f||c()},l))}),f||c(),g[n]=d.promise}(f[y],f[y+1],f[y+2]);return p}},this.resolve=function(e,t,n,i){return this.study(e)(t,n,i)}}function f(e,t,n){this.fromConfig=function(e,t,n){return A(e.template)?this.fromString(e.template,t):A(e.templateUrl)?this.fromUrl(e.templateUrl,t):A(e.templateProvider)?this.fromProvider(e.templateProvider,t,n):null},this.fromString=function(e,t){return M(e)?e(t):e},this.fromUrl=function(n,i){return M(n)&&(n=n(i)),null==n?null:e.get(n,{cache:t}).then(function(e){return e.data})},this.fromProvider=function(e,t,i){return n.invoke(e,null,i||{params:t})}}function h(e,i){function r(e){return A(e)?this.type.decode(e):g.$$getDefaultValue(this)}function o(t,n,i){if(!/^\w+(-+\w+)*$/.test(t))throw new Error("Invalid parameter name '"+t+"' in pattern '"+e+"'");if(h[t])throw new Error("Duplicate parameter name '"+t+"' in pattern '"+e+"'");h[t]=j({type:n||new p,$value:r},i)}function a(e,t,n){var i=e.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!t)return i;var r=n?"?":"";return i+r+"("+t+")"+r}function s(e){if(!i.params||!i.params[e])return{};var t=i.params[e];return I(t)?t:{value:t}}i=t.isObject(i)?i:{};var l,c=/([:*])(\w+)|\{(\w+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,u="^",d=0,f=this.segments=[],h=this.params={};this.source=e;for(var m,v,$,y,b;(l=c.exec(e))&&(m=l[2]||l[3],v=l[4]||("*"==l[1]?".*":"[^/]*"),$=e.substring(d,l.index),y=this.$types[v]||new p({pattern:new RegExp(v)}),b=s(m),!($.indexOf("?")>=0));)u+=a($,y.$subPattern(),A(b.value)),o(m,y,b),f.push($),d=c.lastIndex;$=e.substring(d);var w=$.indexOf("?");if(w>=0){var x=this.sourceSearch=$.substring(w);$=$.substring(0,w),this.sourcePath=e.substring(0,d+w),N(x.substring(1).split(/[&?]/),function(e){o(e,null,s(e))})}else this.sourcePath=e,this.sourceSearch="";u+=a($)+(!1===i.strict?"/?":"")+"$",f.push($),this.regexp=new RegExp(u,i.caseInsensitive?"i":n),this.prefix=f[0]}function p(e){j(this,e)}function g(){function e(){return{strict:o,caseInsensitive:r}}function t(e){return M(e)||P(e)&&M(e[e.length-1])}function n(){N(s,function(e){if(h.prototype.$types[e.name])throw new Error("A type named '"+e.name+"' has already been defined.");var n=new p(t(e.def)?i.invoke(e.def):e.def);h.prototype.$types[e.name]=n})}var i,r=!1,o=!0,a=!0,s=[],l={int:{decode:function(e){return parseInt(e,10)},is:function(e){return!!A(e)&&this.decode(e.toString())===e},pattern:/\d+/},bool:{encode:function(e){return e?1:0},decode:function(e){return 0!==parseInt(e,10)},is:function(e){return!0===e||!1===e},pattern:/0|1/},string:{pattern:/[^\/]*/},date:{equals:function(e,t){return e.toISOString()===t.toISOString()},decode:function(e){return new Date(e)},encode:function(e){return[e.getFullYear(),("0"+(e.getMonth()+1)).slice(-2),("0"+e.getDate()).slice(-2)].join("-")},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/}};g.$$getDefaultValue=function(e){if(!t(e.value))return e.value;if(!i)throw new Error("Injectable functions cannot be called at configuration time");return i.invoke(e.value)},this.caseInsensitive=function(e){r=e},this.strictMode=function(e){o=e},this.compile=function(t,n){return new h(t,j(e(),n))},this.isMatcher=function(e){if(!I(e))return!1;var t=!0;return N(h.prototype,function(n,i){M(n)&&(t=t&&A(e[i])&&M(e[i]))}),t},this.type=function(e,t){return A(t)?(s.push({name:e,def:t}),a||n(),this):h.prototype.$types[e]},this.$get=["$injector",function(e){return i=e,a=!1,h.prototype.$types={},n(),N(l,function(e,t){h.prototype.$types[t]||(h.prototype.$types[t]=new p(e))}),this}]}function m(e,t){function i(e){var t=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(e.source);return null!=t?t[1].replace(/\\(.)/g,"$1"):""}function r(e,t){return e.replace(/\$(\$|\d{1,2})/,function(e,n){return t["$"===n?0:Number(n)]})}function o(e,t,n){if(!n)return!1;var i=e.invoke(t,t,{$match:n});return!A(i)||i}function a(t,n,i,r){function o(e,t,n){return"/"===f?e:t?f.slice(0,-1)+e:n?f.slice(1)+e:e}function a(e){function n(e){var n=e(i,t);return!!n&&(O(n)&&t.replace().url(n),!0)}if(!e||!e.defaultPrevented){var r,o=l.length;for(r=0;r<o;r++)if(n(l[r]))return;c&&n(c)}}function d(){return s=s||n.$on("$locationChangeSuccess",a)}var f=r.baseHref(),h=t.url();return u||d(),{sync:function(){a()},listen:function(){return d()},update:function(e){if(e)return void(h=t.url());t.url()!==h&&(t.url(h),t.replace())},push:function(e,n,i){t.url(e.format(n||{})),i&&i.replace&&t.replace()},href:function(n,i,r){if(!n.validates(i))return null;var a=e.html5Mode(),s=n.format(i);if(r=r||{},a||null===s||(s="#"+e.hashPrefix()+s),s=o(s,a,r.absolute),!r.absolute||!s)return s;var l=!a&&s?"/":"",c=t.port();return c=80===c||443===c?"":":"+c,[t.protocol(),"://",t.host(),c,l,s].join("")}}}var s,l=[],c=null,u=!1;this.rule=function(e){if(!M(e))throw new Error("'rule' must be a function");return l.push(e),this},this.otherwise=function(e){if(O(e)){var t=e;e=function(){return t}}else if(!M(e))throw new Error("'rule' must be a function");return c=e,this},this.when=function(e,n){var a,s=O(n);if(O(e)&&(e=t.compile(e)),!s&&!M(n)&&!P(n))throw new Error("invalid 'handler' in when()");var l={matcher:function(e,n){return s&&(a=t.compile(n),n=["$match",function(e){return a.format(e)}]),j(function(t,i){return o(t,n,e.exec(i.path(),i.search()))},{prefix:O(e.prefix)?e.prefix:""})},regex:function(e,t){if(e.global||e.sticky)throw new Error("when() RegExp must not be global or sticky");return s&&(a=t,t=["$match",function(e){return r(a,e)}]),j(function(n,i){return o(n,t,e.exec(i.path()))},{prefix:i(e)})}},c={matcher:t.isMatcher(e),regex:e instanceof RegExp};for(var u in c)if(c[u])return this.rule(l[u](e,n));throw new Error("invalid 'what' in when()")},this.deferIntercept=function(e){e===n&&(e=!0),u=e},this.$get=a,a.$inject=["$location","$rootScope","$injector","$browser"]}function v(e,r){function o(e){return 0===e.indexOf(".")||0===e.indexOf("^")}function s(e,t){if(!e)return n;var i=O(e),r=i?e:e.name;if(o(r)){if(!t)throw new Error("No reference point given for path '"+r+"'");for(var a=r.split("."),s=0,l=a.length,c=t;s<l;s++)if(""!==a[s]||0!==s){if("^"!==a[s])break;if(!c.parent)throw new Error("Path '"+r+"' not valid for state '"+t.name+"'");c=c.parent}else c=t;a=a.slice(s).join("."),r=c.name+(c.name&&a?".":"")+a}var u=w[r];return!u||!i&&(i||u!==e&&u.self!==e)?n:u}function d(e,t){x[e]||(x[e]=[]),x[e].push(t)}function f(t){t=i(t,{self:t,resolve:t.resolve||{},toString:function(){return this.name}});var n=t.name;if(!O(n)||n.indexOf("@")>=0)throw new Error("State must have a valid name");if(w.hasOwnProperty(n))throw new Error("State '"+n+"'' is already defined");var r=-1!==n.indexOf(".")?n.substring(0,n.lastIndexOf(".")):O(t.parent)?t.parent:"";if(r&&!w[r])return d(r,t.self);for(var o in k)M(k[o])&&(t[o]=k[o](t,k.$delegates[o]));if(w[n]=t,!t[C]&&t.url&&e.when(t.url,["$match","$stateParams",function(e,n){b.$current.navigable==t&&c(e,n)||b.transitionTo(t,e,{location:!1})}]),x[n])for(var a=0;a<x[n].length;a++)f(x[n][a]);return t}function h(e){return e.indexOf("*")>-1}function p(e){var t=e.split("."),n=b.$current.name.split(".");if("**"===t[0]&&(n=n.slice(n.indexOf(t[1])),n.unshift("**")),"**"===t[t.length-1]&&(n.splice(n.indexOf(t[t.length-2])+1,Number.MAX_VALUE),n.push("**")),t.length!=n.length)return!1;for(var i=0,r=t.length;i<r;i++)"*"===t[i]&&(n[i]="*");return n.join("")===t.join("")}function g(e,t){return O(e)&&!A(t)?k[e]:M(t)&&O(e)?(k[e]&&!k.$delegates[e]&&(k.$delegates[e]=k[e]),k[e]=t,this):this}function m(e,t){return I(e)?t=e:t.name=e,f(t),this}function v(e,r,o,d,f,g,m){function v(t,n,i,o){var a=e.$broadcast("$stateNotFound",t,n,i);if(a.defaultPrevented)return m.update(),E;if(!a.retry)return null;if(o.$retry)return m.update(),T;var s=b.transition=r.when(a.retry);return s.then(function(){return s!==b.transition?k:(t.options.$retry=!0,b.transitionTo(t.to,t.toParams,t.options))},function(){return E}),m.update(),s}function x(e,n,i,s,l){var c=i?n:u(a(e.params),n),h={$stateParams:c};l.resolve=f.resolve(e.resolve,h,l.resolve,e);var p=[l.resolve.then(function(e){l.globals=e})];return s&&p.push(s),N(e.views,function(n,i){var r=n.resolve&&n.resolve!==e.resolve?n.resolve:{};r.$template=[function(){return o.load(i,{view:n,locals:h,params:c})||""}],p.push(f.resolve(r,h,l.resolve,e).then(function(o){if(M(n.controllerProvider)||P(n.controllerProvider)){var a=t.extend({},r,h);o.$$controller=d.invoke(n.controllerProvider,null,a)}else o.$$controller=n.controller;o.$$state=e,o.$$controllerAs=n.controllerAs,l[i]=o}))}),r.all(p).then(function(e){return l})}var k=r.reject(new Error("transition superseded")),S=r.reject(new Error("transition prevented")),E=r.reject(new Error("transition aborted")),T=r.reject(new Error("transition failed"));return y.locals={resolve:null,globals:{$stateParams:{}}},b={params:{},current:y.self,$current:y,transition:null},b.reload=function(){b.transitionTo(b.current,g,{reload:!0,inherit:!1,notify:!1})},b.go=function(e,t,n){return b.transitionTo(e,t,j({inherit:!0,relative:b.$current},n))},b.transitionTo=function(t,n,o){n=n||{},o=j({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},o||{});var f,h=b.$current,p=b.params,w=h.path,E=s(t,o.relative);if(!A(E)){var T={to:t,toParams:n,options:o},D=v(T,h.self,p,o);if(D)return D;if(t=T.to,n=T.toParams,o=T.options,E=s(t,o.relative),!A(E)){if(!o.relative)throw new Error("No such state '"+t+"'");throw new Error("Could not resolve '"+t+"' from state '"+o.relative+"'")}}if(E[C])throw new Error("Cannot transition to abstract state '"+t+"'");o.inherit&&(n=l(g,n||{},b.$current,E)),t=E;var M=t.path,O=0,I=M[O],P=y.locals,N=[];if(!o.reload)for(;I&&I===w[O]&&c(n,p,I.ownParams);)P=N[O]=I.locals,O++,I=M[O];if($(t,h,P,o))return!1!==t.self.reloadOnSearch&&m.update(),b.transition=null,r.when(b.current);if(n=u(a(t.params),n||{}),o.notify&&e.$broadcast("$stateChangeStart",t.self,n,h.self,p).defaultPrevented)return m.update(),S;for(var L=r.when(P),R=O;R<M.length;R++,I=M[R])P=N[R]=i(P),L=x(I,n,I===t,L,P);var V=b.transition=L.then(function(){var i,r,a;if(b.transition!==V)return k;for(i=w.length-1;i>=O;i--)a=w[i],a.self.onExit&&d.invoke(a.self.onExit,a.self,a.locals.globals),a.locals=null;for(i=O;i<M.length;i++)r=M[i],r.locals=N[i],r.self.onEnter&&d.invoke(r.self.onEnter,r.self,r.locals.globals);return b.transition!==V?k:(b.$current=t,b.current=t.self,b.params=n,F(b.params,g),b.transition=null,o.location&&t.navigable&&m.push(t.navigable.url,t.navigable.locals.globals.$stateParams,{replace:"replace"===o.location}),o.notify&&e.$broadcast("$stateChangeSuccess",t.self,n,h.self,p),m.update(!0),b.current)},function(i){return b.transition!==V?k:(b.transition=null,f=e.$broadcast("$stateChangeError",t.self,n,h.self,p,i),f.defaultPrevented||m.update(),r.reject(i))});return V},b.is=function(e,i){var r=s(e);return A(r)?b.$current===r&&(!A(i)||null===i||t.equals(g,i)):n},b.includes=function(e,t){if(O(e)&&h(e)){if(!p(e))return!1;e=b.$current.name}var i=s(e);return A(i)?!!A(b.$current.includes[i.name])&&c(t,g):n},b.href=function(e,t,n){n=j({lossy:!0,inherit:!0,absolute:!1,relative:b.$current},n||{});var i=s(e,n.relative);if(!A(i))return null;n.inherit&&(t=l(g,t||{},b.$current,i));var r=i&&n.lossy?i.navigable:i;return r&&r.url?m.href(r.url,u(a(i.params),t||{}),{absolute:n.absolute}):null},b.get=function(e,t){if(0===arguments.length)return a(w).map(function(e){return w[e].self});var n=s(e,t);return n&&n.self?n.self:null},b}function $(e,t,n,i){if(e===t&&(n===t.locals&&!i.reload||!1===e.self.reloadOnSearch))return!0}var y,b,w={},x={},C="abstract",k={parent:function(e){if(A(e.parent)&&e.parent)return s(e.parent);var t=/^(.+)\.[^.]+$/.exec(e.name);return t?s(t[1]):y},data:function(e){return e.parent&&e.parent.data&&(e.data=e.self.data=j({},e.parent.data,e.data)),e.data},url:function(e){var t=e.url,n={params:e.params||{}};if(O(t))return"^"==t.charAt(0)?r.compile(t.substring(1),n):(e.parent.navigable||y).url.concat(t,n);if(!t||r.isMatcher(t))return t;throw new Error("Invalid url '"+t+"' in state '"+e+"'")},navigable:function(e){return e.url?e:e.parent?e.parent.navigable:null},params:function(e){return e.params?e.params:e.url?e.url.params:e.parent.params},views:function(e){var t={};return N(A(e.views)?e.views:{"":e},function(n,i){i.indexOf("@")<0&&(i+="@"+e.parent.name),t[i]=n}),t},ownParams:function(e){if(e.params=e.params||{},!e.parent)return a(e.params);var t={};N(e.params,function(e,n){t[n]=!0}),N(e.parent.params,function(n,i){if(!t[i])throw new Error("Missing required parameter '"+i+"' in state '"+e.name+"'");t[i]=!1});var n=[];return N(t,function(e,t){e&&n.push(t)}),n},path:function(e){return e.parent?e.parent.path.concat(e):[]},includes:function(e){var t=e.parent?j({},e.parent.includes):{};return t[e.name]=!0,t},$delegates:{}};y=f({name:"",url:"^",views:null,abstract:!0}),y.navigable=null,this.decorator=g,this.state=m,this.$get=v,v.$inject=["$rootScope","$q","$view","$injector","$resolve","$stateParams","$urlRouter"]}function $(){function e(e,t){return{load:function(n,i){var r;return i=j({template:null,controller:null,view:null,locals:null,notify:!0,async:!0,params:{}},i),i.view&&(r=t.fromConfig(i.view,i.params,i.locals)),r&&i.notify&&e.$broadcast("$viewContentLoading",i),r}}}this.$get=e,e.$inject=["$rootScope","$templateFactory"]}function y(){var e=!1;this.useAnchorScroll=function(){e=!0},this.$get=["$anchorScroll","$timeout",function(t,n){return e?t:function(e){n(function(){e[0].scrollIntoView()},0,!1)}}]}function b(e,n,i){function r(e,t){if(s)return{enter:function(e,t,n){s.enter(e,null,t,n)},leave:function(e,t){s.leave(e,t)}};if(a){var n=a&&a(t,e);return{enter:function(e,t,i){n.enter(e,null,t),i()},leave:function(e,t){n.leave(e),t()}}}return function(){return{enter:function(e,t,n){t.after(e),n()},leave:function(e,t){e.remove(),t()}}}()}var o=function(){return n.has?function(e){return n.has(e)?n.get(e):null}:function(e){try{return n.get(e)}catch(e){return null}}}(),a=o("$animator"),s=o("$animate");return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(n,o,a){return function(n,o,s){function l(){u&&(u.remove(),u=null),f&&(f.$destroy(),f=null),d&&(m.leave(d,function(){u=null}),u=d,d=null)}function c(r){var c,u=x(s,o.inheritedData("$uiView")),v=u&&e.$current&&e.$current.locals[u];if(r||v!==h){c=n.$new(),h=e.$current.locals[u];var $=a(c,function(e){m.enter(e,o,function(){(t.isDefined(g)&&!g||n.$eval(g))&&i(e)}),l()});d=$,f=c,f.$emit("$viewContentLoaded"),f.$eval(p)}}var u,d,f,h,p=s.onload||"",g=s.autoscroll,m=r(s,n);n.$on("$stateChangeSuccess",function(){c(!1)}),n.$on("$viewContentLoading",function(){c(!1)}),c(!0)}}}}function w(e,t,n){return{restrict:"ECA",priority:-400,compile:function(i){var r=i.html();return function(i,o,a){var s=n.$current,l=x(a,o.inheritedData("$uiView")),c=s&&s.locals[l];if(c){o.data("$uiView",{name:l,state:c.$$state}),o.html(c.$template?c.$template:r);var u=e(o.contents());if(c.$$controller){c.$scope=i;var d=t(c.$$controller,c);c.$$controllerAs&&(i[c.$$controllerAs]=d),o.data("$ngControllerController",d),o.children().data("$ngControllerController",d)}u(i)}}}}}function x(e,t){var n=e.uiView||e.name||"";return n.indexOf("@")>=0?n:n+"@"+(t?t.state.name:"")}function C(e,t){var n,i=e.match(/^\s*({[^}]*})\s*$/);if(i&&(e=t+"("+i[1]+")"),!(n=e.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/))||4!==n.length)throw new Error("Invalid state ref '"+e+"'");return{state:n[1],paramExpr:n[3]||null}}function k(e){var t=e.parent().inheritedData("$uiView");if(t&&t.state&&t.state.name)return t.state}function S(e,n){var i=["location","inherit","reload"];return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(r,o,a,s){var l=C(a.uiSref,e.current.name),c=null,u=k(o)||e.$current,d="FORM"===o[0].nodeName,f=d?"action":"href",h=!0,p={relative:u,inherit:!0},g=r.$eval(a.uiSrefOpts)||{};t.forEach(i,function(e){e in g&&(p[e]=g[e])});var m=function(t){if(t&&(c=t),h){var n=e.href(l.state,c,p),i=s[1]||s[0];if(i&&i.$$setStateInfo(l.state,c),null===n)return h=!1,!1;o[0][f]=n}};l.paramExpr&&(r.$watch(l.paramExpr,function(e,t){e!==c&&m(e)},!0),c=r.$eval(l.paramExpr)),m(),d||o.bind("click",function(t){if(!((t.which||t.button)>1||t.ctrlKey||t.metaKey||t.shiftKey||o.attr("target"))){var i=n(function(){e.go(l.state,c,p)});t.preventDefault(),t.preventDefault=function(){n.cancel(i)}}})}}}function E(e,t,n){return{restrict:"A",controller:["$scope","$element","$attrs",function(i,r,o){function a(){s()?r.addClass(f):r.removeClass(f)}function s(){return void 0!==o.uiSrefActiveEq?e.$current.self===u&&l():e.includes(u.name)&&l()}function l(){return!d||c(d,t)}var u,d,f;f=n(o.uiSrefActiveEq||o.uiSrefActive||"",!1)(i),this.$$setStateInfo=function(t,n){u=e.get(t,k(r)),d=n,a()},i.$on("$stateChangeSuccess",a)}]}}function T(e){return function(t){return e.is(t)}}function D(e){return function(t){return e.includes(t)}}var A=t.isDefined,M=t.isFunction,O=t.isString,I=t.isObject,P=t.isArray,N=t.forEach,j=t.extend,F=t.copy;t.module("ui.router.util",["ng"]),t.module("ui.router.router",["ui.router.util"]),t.module("ui.router.state",["ui.router.router","ui.router.util"]),t.module("ui.router",["ui.router.state"]),t.module("ui.router.compat",["ui.router"]),d.$inject=["$q","$injector"],t.module("ui.router.util").service("$resolve",d),f.$inject=["$http","$templateCache","$injector"],t.module("ui.router.util").service("$templateFactory",f),h.prototype.concat=function(e,t){return new h(this.sourcePath+e+this.sourceSearch,t)},h.prototype.toString=function(){return this.source},h.prototype.exec=function(e,t){var n=this.regexp.exec(e);if(!n)return null;t=t||{};var i,r,o,a=this.parameters(),s=a.length,l=this.segments.length-1,c={};if(l!==n.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");for(i=0;i<l;i++)o=a[i],r=this.params[o],c[o]=r.$value(n[i+1]);for(;i<s;i++)o=a[i],r=this.params[o],c[o]=r.$value(t[o]);return c},h.prototype.parameters=function(e){return A(e)?this.params[e]||null:a(this.params)},h.prototype.validates=function(e){var t,n,i=!0,r=this;return N(e,function(e,o){r.params[o]&&(n=r.params[o],t=!e&&A(n.value),i=i&&(t||n.type.is(e)))}),i},h.prototype.format=function(e){var t=this.segments,n=this.parameters();if(!e)return t.join("").replace("//","/");var i,r,o,a,s,l,c=t.length-1,u=n.length,d=t[0];if(!this.validates(e))return null;for(i=0;i<c;i++)a=n[i],o=e[a],s=this.params[a],(A(o)||"/"!==t[i]&&"/"!==t[i+1])&&(null!=o&&(d+=encodeURIComponent(s.type.encode(o))),d+=t[i+1]);for(;i<u;i++)a=n[i],null!=(o=e[a])&&(l=P(o),l&&(o=o.map(encodeURIComponent).join("&"+a+"=")),d+=(r?"&":"?")+a+"="+(l?o:encodeURIComponent(o)),r=!0);return d},h.prototype.$types={},p.prototype.is=function(e,t){return!0},p.prototype.encode=function(e,t){return e},p.prototype.decode=function(e,t){return e},p.prototype.equals=function(e,t){return e==t},p.prototype.$subPattern=function(){var e=this.pattern.toString();return e.substr(1,e.length-2)},p.prototype.pattern=/.*/,t.module("ui.router.util").provider("$urlMatcherFactory",g),m.$inject=["$locationProvider","$urlMatcherFactoryProvider"],t.module("ui.router.router").provider("$urlRouter",m),v.$inject=["$urlRouterProvider","$urlMatcherFactoryProvider"],t.module("ui.router.state").value("$stateParams",{}).provider("$state",v),$.$inject=[],t.module("ui.router.state").provider("$view",$),t.module("ui.router.state").provider("$uiViewScroll",y),b.$inject=["$state","$injector","$uiViewScroll"],w.$inject=["$compile","$controller","$state"],t.module("ui.router.state").directive("uiView",b),t.module("ui.router.state").directive("uiView",w),S.$inject=["$state","$timeout"],E.$inject=["$state","$stateParams","$interpolate"],t.module("ui.router.state").directive("uiSref",S).directive("uiSrefActive",E).directive("uiSrefActiveEq",E),T.$inject=["$state"],D.$inject=["$state"],t.module("ui.router.state").filter("isState",T).filter("includedByState",D)}(window,window.angular),angular.module("pascalprecht.translate",["ng"]).run(["$translate",function(e){var t=e.storageKey(),n=e.storage();n?n.get(t)?e.use(n.get(t)):angular.isString(e.preferredLanguage())?e.use(e.preferredLanguage()):n.set(t,e.use()):angular.isString(e.preferredLanguage())&&e.use(e.preferredLanguage())}]),angular.module("pascalprecht.translate").provider("$translate",["$STORAGE_KEY",function(e){var t,n,i,r,o,a,s,l,c,u,d,f,h,p,g,m={},v=[],$=e,y=[],b=!1,w="translate-cloak",x=!1,C=function(){var e=window.navigator;return((angular.isArray(e.languages)?e.languages[0]:e.language||e.browserLanguage||e.systemLanguage||e.userLanguage)||"").split("-").join("_")},k=function(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},S=function(){return this.replace(/^\s+|\s+$/g,"")},E=function(e){for(var t=[],i=angular.lowercase(e),r=0,o=v.length;r<o;r++)t.push(angular.lowercase(v[r]));if(k(t,i)>-1)return e;if(n){var a;for(var s in n){var l=!1,c=Object.prototype.hasOwnProperty.call(n,s)&&angular.lowercase(s)===angular.lowercase(e);if("*"===s.slice(-1)&&(l=s.slice(0,-1)===e.slice(0,s.length-1)),(c||l)&&(a=n[s],k(t,angular.lowercase(a))>-1))return a}}var u=e.split("_");return u.length>1&&k(t,angular.lowercase(u[0]))>-1?u[0]:e},T=function(e,t){if(!e&&!t)return m;if(e&&!t){if(angular.isString(e))return m[e]}else angular.isObject(m[e])||(m[e]={}),angular.extend(m[e],D(t));return this};this.translations=T,this.cloakClassName=function(e){return e?(w=e,this):w};var D=function(e,t,n,i){var r,o,a,s;t||(t=[]),n||(n={});for(r in e)Object.prototype.hasOwnProperty.call(e,r)&&(s=e[r],angular.isObject(s)?D(s,t.concat(r),n,r):(o=t.length?t.join(".")+"."+r:r,t.length&&r===i&&(a=""+t.join("."),n[a]="@:"+o),n[o]=s));return n};this.addInterpolation=function(e){return y.push(e),this},this.useMessageFormatInterpolation=function(){return this.useInterpolation("$translateMessageFormatInterpolation")},this.useInterpolation=function(e){return u=e,this},this.useSanitizeValueStrategy=function(e){return b=e,this},this.preferredLanguage=function(e){return A(e),this};var A=function(e){return e&&(t=e),t};this.translationNotFoundIndicator=function(e){return this.translationNotFoundIndicatorLeft(e),this.translationNotFoundIndicatorRight(e),this},this.translationNotFoundIndicatorLeft=function(e){return e?(h=e,this):h},this.translationNotFoundIndicatorRight=function(e){return e?(p=e,this):p},this.fallbackLanguage=function(e){return M(e),this};var M=function(e){return e?(angular.isString(e)?(r=!0,i=[e]):angular.isArray(e)&&(r=!1,i=e),angular.isString(t)&&k(i,t)<0&&i.push(t),this):r?i[0]:i};this.use=function(e){if(e){if(!m[e]&&!d)throw new Error("$translateProvider couldn't find translationTable for langKey: '"+e+"'");return o=e,this}return o};var O=function(e){if(!e)return l?l+$:$;$=e};this.storageKey=O,this.useUrlLoader=function(e,t){return this.useLoader("$translateUrlLoader",angular.extend({url:e},t))},this.useStaticFilesLoader=function(e){return this.useLoader("$translateStaticFilesLoader",e)},this.useLoader=function(e,t){return d=e,f=t||{},this},this.useLocalStorage=function(){return this.useStorage("$translateLocalStorage")},this.useCookieStorage=function(){return this.useStorage("$translateCookieStorage")},this.useStorage=function(e){return s=e,this},this.storagePrefix=function(e){return e?(l=e,this):e},this.useMissingTranslationHandlerLog=function(){return this.useMissingTranslationHandler("$translateMissingTranslationHandlerLog")},this.useMissingTranslationHandler=function(e){return c=e,this},this.usePostCompiling=function(e){return x=!!e,this},this.determinePreferredLanguage=function(e){var n=e&&angular.isFunction(e)?e():C();return t=v.length?E(n):n,this},this.registerAvailableLanguageKeys=function(e,t){return e?(v=e,t&&(n=t),this):v},this.useLoaderCache=function(e){return!1===e?g=void 0:!0===e?g=!0:void 0===e?g="$translationCache":e&&(g=e),this},this.$get=["$log","$injector","$rootScope","$q",function(e,n,l,v){var C,I,P,N=n.get(u||"$translateDefaultInterpolation"),j=!1,F={},L={},R=function(e,n,r){if(angular.isArray(e)){return function(e){for(var t={},i=[],o=0,a=e.length;o<a;o++)i.push(function(e){var i=v.defer(),o=function(n){t[e]=n,i.resolve([e,n])};return R(e,n,r).then(o,o),i.promise}(e[o]));return v.all(i).then(function(){return t})}(e)}var a=v.defer();e&&(e=S.apply(e));var l=function(){var e=t?L[t]:L[o];if(I=0,s&&!e){var n=C.get($);if(e=L[n],i&&i.length){var r=k(i,n);I=0===r?1:0,k(i,t)<0&&i.push(t)}}return e}();return l?l.then(function(){X(e,n,r).then(a.resolve,a.reject)},a.reject):X(e,n,r).then(a.resolve,a.reject),a.promise},V=function(e){return h&&(e=[h,e].join(" ")),p&&(e=[e,p].join(" ")),e},H=function(e){o=e,l.$emit("$translateChangeSuccess",{language:e}),s&&C.set(R.storageKey(),o),N.setLocale(o),angular.forEach(F,function(e,t){F[t].setLocale(o)}),l.$emit("$translateChangeEnd",{language:e})},q=function(e){if(!e)throw"No language key specified for loading.";var t=v.defer();l.$emit("$translateLoadingStart",{language:e}),j=!0;var i=g;"string"==typeof i&&(i=n.get(i));var r=angular.extend({},f,{key:e,$http:angular.extend({},{cache:i},f.$http)});return n.get(d)(r).then(function(n){var i={};l.$emit("$translateLoadingSuccess",{language:e}),angular.isArray(n)?angular.forEach(n,function(e){angular.extend(i,D(e))}):angular.extend(i,D(n)),j=!1,t.resolve({key:e,table:i}),l.$emit("$translateLoadingEnd",{language:e})},function(e){l.$emit("$translateLoadingError",{language:e}),t.reject(e),l.$emit("$translateLoadingEnd",{language:e})}),t.promise};if(s&&(C=n.get(s),!C.get||!C.set))throw new Error("Couldn't use storage '"+s+"', missing get() or set() method!");angular.isFunction(N.useSanitizeValueStrategy)&&N.useSanitizeValueStrategy(b),y.length&&angular.forEach(y,function(e){var i=n.get(e);i.setLocale(t||o),angular.isFunction(i.useSanitizeValueStrategy)&&i.useSanitizeValueStrategy(b),F[i.getInterpolationIdentifier()]=i});var U=function(e){var t=v.defer();return Object.prototype.hasOwnProperty.call(m,e)?t.resolve(m[e]):L[e]?L[e].then(function(e){T(e.key,e.table),t.resolve(e.table)},t.reject):t.reject(),t.promise},_=function(e,t,n,i){var r=v.defer();return U(e).then(function(a){Object.prototype.hasOwnProperty.call(a,t)?(i.setLocale(e),r.resolve(i.interpolate(a[t],n)),i.setLocale(o)):r.reject()},r.reject),r.promise},B=function(e,t,n,i){var r,a=m[e];return Object.prototype.hasOwnProperty.call(a,t)&&(i.setLocale(e),r=i.interpolate(a[t],n),i.setLocale(o)),r},W=function(e){if(c){var t=n.get(c)(e,o);return void 0!==t?t:e}return e},z=function(e,t,n,r){var o=v.defer();if(e<i.length){var a=i[e];_(a,t,n,r).then(o.resolve,function(){z(e+1,t,n,r).then(o.resolve)})}else o.resolve(W(t));return o.promise},Y=function(e,t,n,r){var o;if(e<i.length){var a=i[e];o=B(a,t,n,r),o||(o=Y(e+1,t,n,r))}return o},K=function(e,t,n){return z(P>0?P:I,e,t,n)},G=function(e,t,n){return Y(P>0?P:I,e,t,n)},X=function(e,t,n){var r=v.defer(),a=o?m[o]:m,s=n?F[n]:N;if(a&&Object.prototype.hasOwnProperty.call(a,e)){var l=a[e];"@:"===l.substr(0,2)?R(l.substr(2),t,n).then(r.resolve,r.reject):r.resolve(s.interpolate(l,t))}else{var u;c&&!j&&(u=W(e)),o&&i&&i.length?K(e,t,s).then(function(e){r.resolve(e)},function(e){r.reject(V(e))}):c&&!j&&u?r.resolve(u):r.reject(V(e))}return r.promise},Z=function(e,t,n){var r,a=o?m[o]:m,s=n?F[n]:N;if(a&&Object.prototype.hasOwnProperty.call(a,e)){var l=a[e];r="@:"===l.substr(0,2)?Z(l.substr(2),t,n):s.interpolate(l,t)}else{var u;c&&!j&&(u=W(e)),o&&i&&i.length?(I=0,r=G(e,t,s)):r=c&&!j&&u?u:V(e)}return r};if(R.preferredLanguage=function(e){return e&&A(e),t},R.cloakClassName=function(){return w},R.fallbackLanguage=function(e){if(void 0!==e&&null!==e){if(M(e),d&&i&&i.length)for(var t=0,n=i.length;t<n;t++)L[i[t]]||(L[i[t]]=q(i[t]));R.use(R.use())}return r?i[0]:i},R.useFallbackLanguage=function(e){if(void 0!==e&&null!==e)if(e){var t=k(i,e);t>-1&&(P=t)}else P=0},R.proposedLanguage=function(){return a},R.storage=function(){return C},R.use=function(e){if(!e)return o;var t=v.defer();l.$emit("$translateChangeStart",{language:e});var n=E(e);return n&&(e=n),m[e]||!d||L[e]?(t.resolve(e),H(e)):(a=e,L[e]=q(e).then(function(n){T(n.key,n.table),t.resolve(n.key),H(n.key),a===e&&(a=void 0)},function(e){a===e&&(a=void 0),l.$emit("$translateChangeError",{language:e}),t.reject(e),l.$emit("$translateChangeEnd",{language:e})})),t.promise},R.storageKey=function(){return O()},R.isPostCompilingEnabled=function(){return x},R.refresh=function(e){function t(){r.resolve(),l.$emit("$translateRefreshEnd",{language:e})}function n(){r.reject(),l.$emit("$translateRefreshEnd",{language:e})}if(!d)throw new Error("Couldn't refresh translation table, no loader registered!");var r=v.defer();if(l.$emit("$translateRefreshStart",{language:e}),e)m[e]?q(e).then(function(n){T(n.key,n.table),e===o&&H(o),t()},n):n();else{var a=[],s={};if(i&&i.length)for(var c=0,u=i.length;c<u;c++)a.push(q(i[c])),s[i[c]]=!0;o&&!s[o]&&a.push(q(o)),v.all(a).then(function(e){angular.forEach(e,function(e){m[e.key]&&delete m[e.key],T(e.key,e.table)}),o&&H(o),t()})}return r.promise},R.instant=function(e,n,r){if(null===e||angular.isUndefined(e))return e;if(angular.isArray(e)){for(var a={},s=0,l=e.length;s<l;s++)a[e[s]]=R.instant(e[s],n,r);return a}if(angular.isString(e)&&e.length<1)return e;e&&(e=S.apply(e));var u,d=[];t&&d.push(t),o&&d.push(o),i&&i.length&&(d=d.concat(i));for(var f=0,h=d.length;f<h;f++){var p=d[f];if(m[p]&&void 0!==m[p][e]&&(u=Z(e,n,r)),void 0!==u)break}return u||""===u||(u=N.interpolate(e,n),c&&!j&&(u=W(e))),u},R.versionInfo=function(){return"2.4.1"},R.loaderCache=function(){return g},d&&(angular.equals(m,{})&&R.use(R.use()),i&&i.length))for(var J=function(e){T(e.key,e.table),l.$emit("$translateChangeEnd",{language:e.key})},Q=0,ee=i.length;Q<ee;Q++)L[i[Q]]=q(i[Q]).then(J);return R}]}]),angular.module("pascalprecht.translate").factory("$translateDefaultInterpolation",["$interpolate",function(e){var t,n={},i=null,r={escaped:function(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=angular.element("<div></div>").text(e[n]).html());return t}},o=function(e){return angular.isFunction(r[i])?r[i](e):e};return n.setLocale=function(e){t=e},n.getInterpolationIdentifier=function(){return"default"},n.useSanitizeValueStrategy=function(e){return i=e,this},n.interpolate=function(t,n){
-return i&&(n=o(n)),e(t)(n||{})},n}]),angular.module("pascalprecht.translate").constant("$STORAGE_KEY","NG_TRANSLATE_LANG_KEY"),angular.module("pascalprecht.translate").directive("translate",["$translate","$q","$interpolate","$compile","$parse","$rootScope",function(e,t,n,i,r,o){return{restrict:"AE",scope:!0,compile:function(t,a){var s=a.translateValues?a.translateValues:void 0,l=a.translateInterpolation?a.translateInterpolation:void 0,c=t[0].outerHTML.match(/translate-value-+/i),u="^(.*)("+n.startSymbol()+".*"+n.endSymbol()+")(.*)";return function(t,d,f){if(t.interpolateParams={},t.preText="",t.postText="",f.$observe("translate",function(e){if(angular.equals(e,"")||!angular.isDefined(e)){var i=d.text().match(u);angular.isArray(i)?(t.preText=i[1],t.postText=i[3],t.translationId=n(i[2])(t.$parent)):t.translationId=d.text().replace(/^\s+|\s+$/g,"")}else t.translationId=e}),f.$observe("translateDefault",function(e){t.defaultText=e}),s&&f.$observe("translateValues",function(e){e&&t.$parent.$watch(function(){angular.extend(t.interpolateParams,r(e)(t.$parent))})}),c){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&"translateValue"===h.substr(0,14)&&"translateValues"!==h&&function(e){f.$observe(e,function(n){t.interpolateParams[angular.lowercase(e.substr(14,1))+e.substr(15)]=n})}(h)}var p=function(t,n,r){r||void 0===n.defaultText||(t=n.defaultText),d.html(n.preText+t+n.postText);var o=e.isPostCompilingEnabled(),s=void 0!==a.translateCompile,l=s&&"false"!==a.translateCompile;(o&&!s||l)&&i(d.contents())(n)},g=function(){return s||c?function(){var n=function(){t.translationId&&t.interpolateParams&&e(t.translationId,t.interpolateParams,l).then(function(e){p(e,t,!0)},function(e){p(e,t,!1)})};t.$watch("interpolateParams",n,!0),t.$watch("translationId",n)}:function(){var n=t.$watch("translationId",function(i){t.translationId&&i&&e(i,{},l).then(function(e){p(e,t,!0),n()},function(e){p(e,t,!1),n()})},!0)}}(),m=o.$on("$translateChangeSuccess",g);g(),t.$on("$destroy",m)}}}}]),angular.module("pascalprecht.translate").directive("translateCloak",["$rootScope","$translate",function(e,t){return{compile:function(n){var i=e.$on("$translateChangeEnd",function(){n.removeClass(t.cloakClassName()),i(),i=null});n.addClass(t.cloakClassName())}}}]),angular.module("pascalprecht.translate").filter("translate",["$parse","$translate",function(e,t){var n=function(n,i,r){return angular.isObject(i)||(i=e(i)(this)),t.instant(n,i,r)};return n.$stateful=!0,n}]),function(e,t){"function"==typeof define&&define.amd?define([],function(){return t()}):"object"==typeof exports?module.exports=t():t()}(0,function(){function e(e,t){"use strict";return function(n){if(!(n&&(angular.isArray(n.files)||angular.isString(n.prefix)&&angular.isString(n.suffix))))throw new Error("Couldn't load static files, no files and prefix or suffix specified!");n.files||(n.files=[{prefix:n.prefix,suffix:n.suffix}]);for(var i=e.defer(),r=[],o=n.files.length,a=0;a<o;a++)r.push(function(i){if(!i||!angular.isString(i.prefix)||!angular.isString(i.suffix))throw new Error("Couldn't load static file, no prefix or suffix specified!");var r=e.defer();return t(angular.extend({url:[i.prefix,n.key,i.suffix].join(""),method:"GET",params:""},n.$http)).success(function(e){r.resolve(e)}).error(function(){r.reject(n.key)}),r.promise}({prefix:n.files[a].prefix,key:n.key,suffix:n.files[a].suffix}));return e.all(r).then(function(e){for(var t=e.length,n={},r=0;r<t;r++)for(var o in e[r])n[o]=e[r][o];i.resolve(n)},function(e){i.reject(e)}),i.promise}}return angular.module("pascalprecht.translate").factory("$translateStaticFilesLoader",e),e.$inject=["$q","$http"],e.displayName="$translateStaticFilesLoader","pascalprecht.translate"}),function(e,t){"function"==typeof define&&define.amd?define([],function(){return t()}):"object"==typeof exports?module.exports=t():t()}(0,function(){function e(e){"use strict";return{get:function(t){return e.get(t)},set:function(t,n){e.put(t,n)},put:function(t,n){e.put(t,n)}}}return angular.module("pascalprecht.translate").factory("$translateCookieStorage",e),e.$inject=["$cookieStore"],e.displayName="$translateCookieStorage","pascalprecht.translate"}),function(e,t,n){"use strict";angular.module("mgcrea.ngStrap",["mgcrea.ngStrap.modal","mgcrea.ngStrap.aside","mgcrea.ngStrap.alert","mgcrea.ngStrap.button","mgcrea.ngStrap.select","mgcrea.ngStrap.datepicker","mgcrea.ngStrap.timepicker","mgcrea.ngStrap.navbar","mgcrea.ngStrap.tooltip","mgcrea.ngStrap.popover","mgcrea.ngStrap.dropdown","mgcrea.ngStrap.typeahead","mgcrea.ngStrap.scrollspy","mgcrea.ngStrap.affix","mgcrea.ngStrap.tab","mgcrea.ngStrap.collapse"]),angular.module("mgcrea.ngStrap.alert",["mgcrea.ngStrap.modal"]).provider("$alert",function(){var e=this.defaults={animation:"am-fade",prefixClass:"alert",prefixEvent:"alert",placement:null,template:"alert/alert.tpl.html",container:!1,element:null,backdrop:!1,keyboard:!0,show:!0,duration:!1,type:!1,dismissable:!0};this.$get=["$modal","$timeout",function(t,n){function i(i){var r={},o=angular.extend({},e,i);r=t(o),r.$scope.dismissable=!!o.dismissable,o.type&&(r.$scope.type=o.type);var a=r.show;return o.duration&&(r.show=function(){a(),n(function(){r.hide()},1e3*o.duration)}),r}return i}]}).directive("bsAlert",["$window","$sce","$alert",function(e,t,n){e.requestAnimationFrame||e.setTimeout;return{restrict:"EAC",scope:!0,link:function(e,i,r,o){var a={scope:e,element:i,show:!1};angular.forEach(["template","placement","keyboard","html","container","animation","duration","dismissable"],function(e){angular.isDefined(r[e])&&(a[e]=r[e])}),angular.forEach(["title","content","type"],function(n){r[n]&&r.$observe(n,function(i,r){e[n]=t.trustAsHtml(i)})}),r.bsAlert&&e.$watch(r.bsAlert,function(t,n){angular.isObject(t)?angular.extend(e,t):e.content=t},!0);var s=n(a);i.on(r.trigger||"click",s.toggle),e.$on("$destroy",function(){s&&s.destroy(),a=null,s=null})}}}]),angular.module("mgcrea.ngStrap.affix",["mgcrea.ngStrap.helpers.dimensions","mgcrea.ngStrap.helpers.debounce"]).provider("$affix",function(){var e=this.defaults={offsetTop:"auto"};this.$get=["$window","debounce","dimensions",function(t,n,i){function r(r,s){function l(e,t,n){var i=c(),r=u();return i<=m?"top":null!==e&&i+e<=t.top?"middle":null!==v&&t.top+n+p>=r-v?"bottom":"middle"}function c(){return h[0]===t?t.pageYOffset:h[0].scrollTop}function u(){return h[0]===t?t.document.body.scrollHeight:h[0].scrollHeight}var d={},f=angular.extend({},e,s),h=f.target,p=0,g=0,m=0,v=0,$=null,y=null,b=r.parent();if(f.offsetParent)if(f.offsetParent.match(/^\d+$/))for(var w=0;w<1*f.offsetParent-1;w++)b=b.parent();else b=angular.element(f.offsetParent);return d.init=function(){d.$parseOffsets(),g=i.offset(r[0]).top+p,h.on("scroll",d.checkPosition),h.on("click",d.checkPositionWithEventLoop),a.on("resize",d.$debouncedOnResize),d.checkPosition(),d.checkPositionWithEventLoop()},d.destroy=function(){h.off("scroll",d.checkPosition),h.off("click",d.checkPositionWithEventLoop),a.off("resize",d.$debouncedOnResize)},d.checkPositionWithEventLoop=function(){setTimeout(d.checkPosition,1)},d.checkPosition=function(){var e=c(),t=i.offset(r[0]),n=i.height(r[0]),a=l(y,t,n);$!==a&&($=a,r.removeClass("affix affix-top affix-bottom").addClass("affix"+("middle"!==a?"-"+a:"")),"top"===a?(y=null,r.css("position",f.offsetParent?"":"relative"),r.css("top","")):"bottom"===a?(y=f.offsetUnpin?-1*f.offsetUnpin:t.top-e,r.css("position",f.offsetParent?"":"relative"),r.css("top",f.offsetParent?"":o[0].offsetHeight-v-n-g+"px")):(y=null,r.css("position","fixed"),r.css("top",p+"px")))},d.$onResize=function(){d.$parseOffsets(),d.checkPosition()},d.$debouncedOnResize=n(d.$onResize,50),d.$parseOffsets=function(){var e=r.css("position");r.css("position",f.offsetParent?"":"relative"),f.offsetTop&&("auto"===f.offsetTop&&(f.offsetTop="+0"),f.offsetTop.match(/^[-+]\d+$/)?(p=1*-f.offsetTop,m=f.offsetParent?i.offset(b[0]).top+1*f.offsetTop:i.offset(r[0]).top-i.css(r[0],"marginTop",!0)+1*f.offsetTop):m=1*f.offsetTop),f.offsetBottom&&(v=f.offsetParent&&f.offsetBottom.match(/^[-+]\d+$/)?u()-(i.offset(b[0]).top+i.height(b[0]))+1*f.offsetBottom+1:1*f.offsetBottom),r.css("position",e)},d.init(),d}var o=angular.element(t.document.body),a=angular.element(t);return r}]}).directive("bsAffix",["$affix","$window",function(e,t){return{restrict:"EAC",require:"^?bsAffixTarget",link:function(n,i,r,o){var a={scope:n,offsetTop:"auto",target:o?o.$element:angular.element(t)};angular.forEach(["offsetTop","offsetBottom","offsetParent","offsetUnpin"],function(e){angular.isDefined(r[e])&&(a[e]=r[e])});var s=e(i,a);n.$on("$destroy",function(){s&&s.destroy(),a=null,s=null})}}}]).directive("bsAffixTarget",function(){return{controller:["$element",function(e){this.$element=e}]}}),angular.module("mgcrea.ngStrap.aside",["mgcrea.ngStrap.modal"]).provider("$aside",function(){var e=this.defaults={animation:"am-fade-and-slide-right",prefixClass:"aside",prefixEvent:"aside",placement:"right",template:"aside/aside.tpl.html",contentTemplate:!1,container:!1,element:null,backdrop:!0,keyboard:!0,html:!1,show:!0};this.$get=["$modal",function(t){function n(n){var i=angular.extend({},e,n);return t(i)}return n}]}).directive("bsAside",["$window","$sce","$aside",function(e,t,n){e.requestAnimationFrame||e.setTimeout;return{restrict:"EAC",scope:!0,link:function(e,i,r,o){var a={scope:e,element:i,show:!1};angular.forEach(["template","contentTemplate","placement","backdrop","keyboard","html","container","animation"],function(e){angular.isDefined(r[e])&&(a[e]=r[e])}),angular.forEach(["title","content"],function(n){r[n]&&r.$observe(n,function(i,r){e[n]=t.trustAsHtml(i)})}),r.bsAside&&e.$watch(r.bsAside,function(t,n){angular.isObject(t)?angular.extend(e,t):e.content=t},!0);var s=n(a);i.on(r.trigger||"click",s.toggle),e.$on("$destroy",function(){s&&s.destroy(),a=null,s=null})}}}]),angular.module("mgcrea.ngStrap.button",[]).provider("$button",function(){var e=this.defaults={activeClass:"active",toggleEvent:"click"};this.$get=function(){return{defaults:e}}}).directive("bsCheckboxGroup",function(){return{restrict:"A",require:"ngModel",compile:function(e,t){e.attr("data-toggle","buttons"),e.removeAttr("ng-model");var n=e[0].querySelectorAll('input[type="checkbox"]');angular.forEach(n,function(e){var n=angular.element(e);n.attr("bs-checkbox",""),n.attr("ng-model",t.ngModel+"."+n.attr("value"))})}}}).directive("bsCheckbox",["$button","$$rAF",function(e,t){var n=e.defaults,i=/^(true|false|\d+)$/;return{restrict:"A",require:"ngModel",link:function(e,r,o,a){var s=n,l="INPUT"===r[0].nodeName,c=l?r.parent():r,u=!angular.isDefined(o.trueValue)||o.trueValue;i.test(o.trueValue)&&(u=e.$eval(o.trueValue));var d=!!angular.isDefined(o.falseValue)&&o.falseValue;i.test(o.falseValue)&&(d=e.$eval(o.falseValue));var f="boolean"!=typeof u||"boolean"!=typeof d;f&&(a.$parsers.push(function(e){return e?u:d}),a.$formatters.push(function(e){return angular.equals(e,u)}),e.$watch(o.ngModel,function(e,t){a.$render()})),a.$render=function(){var e=angular.equals(a.$modelValue,u);t(function(){l&&(r[0].checked=e),c.toggleClass(s.activeClass,e)})},r.bind(s.toggleEvent,function(){e.$apply(function(){l||a.$setViewValue(!c.hasClass("active")),f||a.$render()})})}}}]).directive("bsRadioGroup",function(){return{restrict:"A",require:"ngModel",compile:function(e,t){e.attr("data-toggle","buttons"),e.removeAttr("ng-model");var n=e[0].querySelectorAll('input[type="radio"]');angular.forEach(n,function(e){angular.element(e).attr("bs-radio",""),angular.element(e).attr("ng-model",t.ngModel)})}}}).directive("bsRadio",["$button","$$rAF",function(e,t){var n=e.defaults,i=/^(true|false|\d+)$/;return{restrict:"A",require:"ngModel",link:function(e,r,o,a){var s=n,l="INPUT"===r[0].nodeName,c=l?r.parent():r,u=i.test(o.value)?e.$eval(o.value):o.value;a.$render=function(){var e=angular.equals(a.$modelValue,u);t(function(){l&&(r[0].checked=e),c.toggleClass(s.activeClass,e)})},r.bind(s.toggleEvent,function(){e.$apply(function(){a.$setViewValue(u),a.$render()})})}}}]),angular.module("mgcrea.ngStrap.collapse",[]).provider("$collapse",function(){var e=this.defaults={animation:"am-collapse",disallowToggle:!1,activeClass:"in",startCollapsed:!1},t=this.controller=function(t,n,i){var r=this;r.$options=angular.copy(e),angular.forEach(["animation","disallowToggle","activeClass","startCollapsed"],function(e){angular.isDefined(i[e])&&(r.$options[e]=i[e])}),r.$toggles=[],r.$targets=[],r.$viewChangeListeners=[],r.$registerToggle=function(e){r.$toggles.push(e)},r.$registerTarget=function(e){r.$targets.push(e)},r.$targets.$active=r.$options.startCollapsed?-1:0,r.$setActive=t.$setActive=function(e){r.$options.disallowToggle?r.$targets.$active=e:r.$targets.$active=r.$targets.$active===e?-1:e,r.$viewChangeListeners.forEach(function(e){e()})}};this.$get=function(){var n={};return n.defaults=e,n.controller=t,n}}).directive("bsCollapse",["$window","$animate","$collapse",function(e,t,n){n.defaults;return{require:["?ngModel","bsCollapse"],controller:["$scope","$element","$attrs",n.controller],link:function(e,t,n,i){var r=i[0],o=i[1];r&&(o.$viewChangeListeners.push(function(){r.$setViewValue(o.$targets.$active)}),r.$formatters.push(function(e){return o.$targets.$active!==1*e&&o.$setActive(1*e),e}))}}}]).directive("bsCollapseToggle",function(){return{require:["^?ngModel","^bsCollapse"],link:function(e,t,n,i){var r=(i[0],i[1]);t.attr("data-toggle","collapse"),r.$registerToggle(t),t.on("click",function(){var i=n.bsCollapseToggle||r.$toggles.indexOf(t);r.$setActive(1*i),e.$apply()})}}}).directive("bsCollapseTarget",["$animate",function(e){return{require:["^?ngModel","^bsCollapse"],link:function(t,n,i,r){function o(){var t=a.$targets.indexOf(n),i=a.$targets.$active;e[t===i?"addClass":"removeClass"](n,a.$options.activeClass)}var a=(r[0],r[1]);n.addClass("collapse"),a.$options.animation&&n.addClass(a.$options.animation),a.$registerTarget(n),a.$viewChangeListeners.push(function(){o()}),o()}}}]),angular.module("mgcrea.ngStrap.datepicker",["mgcrea.ngStrap.helpers.dateParser","mgcrea.ngStrap.tooltip"]).provider("$datepicker",function(){var e=this.defaults={animation:"am-fade",prefixClass:"datepicker",placement:"bottom-left",template:"datepicker/datepicker.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,useNative:!1,dateType:"date",dateFormat:"shortDate",modelDateFormat:null,dayFormat:"dd",strictFormat:!1,autoclose:!1,minDate:-1/0,maxDate:1/0,startView:0,minView:0,startWeek:0,daysOfWeekDisabled:"",iconLeft:"glyphicon glyphicon-chevron-left",iconRight:"glyphicon glyphicon-chevron-right"};this.$get=["$window","$document","$rootScope","$sce","$locale","dateFilter","datepickerViews","$tooltip",function(t,n,i,r,o,a,s,l){function c(t,n,i){function r(e){e.selected=a.$isSelected(e.date)}function o(){t[0].focus()}var a=l(t,angular.extend({},e,i)),c=i.scope,f=a.$options,h=a.$scope;f.startView&&(f.startView-=f.minView);var p=s(a);a.$views=p.views;var g=p.viewDate;h.$mode=f.startView,h.$iconLeft=f.iconLeft,h.$iconRight=f.iconRight;var m=a.$views[h.$mode];h.$select=function(e){a.select(e)},h.$selectPane=function(e){a.$selectPane(e)},h.$toggleMode=function(){a.setMode((h.$mode+1)%a.$views.length)},a.update=function(e){angular.isDate(e)&&!isNaN(e.getTime())&&(a.$date=e,m.update.call(m,e)),a.$build(!0)},a.updateDisabledDates=function(e){f.disabledDateRanges=e;for(var t=0,n=h.rows.length;t<n;t++)angular.forEach(h.rows[t],a.$setDisabledEl)},a.select=function(e,t){angular.isDate(n.$dateValue)||(n.$dateValue=new Date(e)),!h.$mode||t?(n.$setViewValue(angular.copy(e)),n.$render(),f.autoclose&&!t&&a.hide(!0)):(angular.extend(g,{year:e.getFullYear(),month:e.getMonth(),date:e.getDate()}),a.setMode(h.$mode-1),a.$build())},a.setMode=function(e){h.$mode=e,m=a.$views[h.$mode],a.$build()},a.$build=function(e){!0===e&&m.built||(!1!==e||m.built)&&m.build.call(m)},a.$updateSelected=function(){for(var e=0,t=h.rows.length;e<t;e++)angular.forEach(h.rows[e],r)},a.$isSelected=function(e){return m.isSelected(e)},a.$setDisabledEl=function(e){e.disabled=m.isDisabled(e.date)},a.$selectPane=function(e){var t=m.steps,n=new Date(Date.UTC(g.year+(t.year||0)*e,g.month+(t.month||0)*e,g.date+(t.day||0)*e));angular.extend(g,{year:n.getUTCFullYear(),month:n.getUTCMonth(),date:n.getUTCDate()}),a.$build()},a.$onMouseDown=function(e){if(e.preventDefault(),e.stopPropagation(),d){var t=angular.element(e.target);"button"!==t[0].nodeName.toLowerCase()&&(t=t.parent()),t.triggerHandler("click")}},a.$onKeyDown=function(e){if(/(38|37|39|40|13)/.test(e.keyCode)&&!e.shiftKey&&!e.altKey){if(e.preventDefault(),e.stopPropagation(),13===e.keyCode)return h.$mode?h.$apply(function(){a.setMode(h.$mode-1)}):a.hide(!0);m.onKeyDown(e),c.$digest()}};var v=a.init;a.init=function(){if(u&&f.useNative)return t.prop("type","date"),void t.css("-webkit-appearance","textfield");d&&(t.prop("type","text"),t.attr("readonly","true"),t.on("click",o)),v()};var $=a.destroy;a.destroy=function(){u&&f.useNative&&t.off("click",o),$()};var y=a.show;a.show=function(){y(),setTimeout(function(){a.$element.on(d?"touchstart":"mousedown",a.$onMouseDown),f.keyboard&&t.on("keydown",a.$onKeyDown)})};var b=a.hide;return a.hide=function(e){a.$isShown&&(a.$element.off(d?"touchstart":"mousedown",a.$onMouseDown),f.keyboard&&t.off("keydown",a.$onKeyDown),b(e))},a}var u=(angular.element(t.document.body),/(ip(a|o)d|iphone|android)/gi.test(t.navigator.userAgent)),d="createTouch"in t.document&&u;return e.lang||(e.lang=o.id),c.defaults=e,c}]}).directive("bsDatepicker",["$window","$parse","$q","$locale","dateFilter","$datepicker","$dateParser","$timeout",function(e,t,n,i,r,o,a,s){var l=(o.defaults,/(ip(a|o)d|iphone|android)/gi.test(e.navigator.userAgent));return{restrict:"EAC",require:"ngModel",link:function(e,t,n,i){function s(e){return e&&e.length?e:null}function c(e){if(angular.isDate(e)){var t=isNaN(d.$options.minDate)||e.getTime()>=d.$options.minDate,n=isNaN(d.$options.maxDate)||e.getTime()<=d.$options.maxDate,r=t&&n;i.$setValidity("date",r),i.$setValidity("min",t),i.$setValidity("max",n),r&&(i.$dateValue=e)}}var u={scope:e,controller:i};angular.forEach(["placement","container","delay","trigger","keyboard","html","animation","template","autoclose","dateType","dateFormat","modelDateFormat","dayFormat","strictFormat","startWeek","startDate","useNative","lang","startView","minView","iconLeft","iconRight","daysOfWeekDisabled"],function(e){angular.isDefined(n[e])&&(u[e]=n[e])}),n.bsShow&&e.$watch(n.bsShow,function(e,t){d&&angular.isDefined(e)&&(angular.isString(e)&&(e=!!e.match(/true|,?(datepicker),?/i)),!0===e?d.show():d.hide())});var d=o(t,i,u);u=d.$options,l&&u.useNative&&(u.dateFormat="yyyy-MM-dd");var f=a({format:u.dateFormat,lang:u.lang,strict:u.strictFormat});angular.forEach(["minDate","maxDate"],function(e){angular.isDefined(n[e])&&n.$observe(e,function(t){d.$options[e]=f.getDateForAttribute(e,t),!isNaN(d.$options[e])&&d.$build(!1),c(i.$dateValue)})}),e.$watch(n.ngModel,function(e,t){d.update(i.$dateValue)},!0),angular.isDefined(n.disabledDates)&&e.$watch(n.disabledDates,function(e,t){e=s(e),t=s(t),e&&d.updateDisabledDates(e)}),i.$parsers.unshift(function(e){if(!e)return void i.$setValidity("date",!0);var t=f.parse(e,i.$dateValue);return!t||isNaN(t.getTime())?void i.$setValidity("date",!1):(c(t),"string"===u.dateType?r(t,u.modelDateFormat||u.dateFormat):"number"===u.dateType?i.$dateValue.getTime():"iso"===u.dateType?i.$dateValue.toISOString():new Date(i.$dateValue))}),i.$formatters.push(function(e){var t;return t=angular.isUndefined(e)||null===e?NaN:angular.isDate(e)?e:"string"===u.dateType?f.parse(e,null,u.modelDateFormat):new Date(e),i.$dateValue=t,i.$dateValue}),i.$render=function(){t.val(!i.$dateValue||isNaN(i.$dateValue.getTime())?"":r(i.$dateValue,u.dateFormat))},e.$on("$destroy",function(){d&&d.destroy(),u=null,d=null})}}}]).provider("datepickerViews",function(){function e(e,t){for(var n=[];e.length>0;)n.push(e.splice(0,t));return n}function t(e,t){return(e%t+t)%t}this.defaults={dayFormat:"dd",daySplit:7};this.$get=["$locale","$sce","dateFilter","$dateParser",function(n,i,r,o){return function(a){var s=a.$scope,l=a.$options,c=o(),u=n.DATETIME_FORMATS.SHORTDAY,d=u.slice(l.startWeek).concat(u.slice(0,l.startWeek)),f=i.trustAsHtml('<th class="dow text-center">'+d.join('</th><th class="dow text-center">')+"</th>"),h=a.$date||(l.startDate?c.getDateForAttribute("startDate",l.startDate):new Date),p={year:h.getFullYear(),month:h.getMonth(),date:h.getDate()},g=(h.getTimezoneOffset(),[{format:l.dayFormat,split:7,steps:{month:1},update:function(e,t){!this.built||t||e.getFullYear()!==p.year||e.getMonth()!==p.month?(angular.extend(p,{year:a.$date.getFullYear(),month:a.$date.getMonth(),date:a.$date.getDate()}),a.$build()):e.getDate()!==p.date&&(p.date=a.$date.getDate(),a.$updateSelected())},build:function(){var n=new Date(p.year,p.month,1),i=n.getTimezoneOffset(),o=new Date(+n-864e5*t(n.getDay()-l.startWeek,7)),c=o.getTimezoneOffset(),u=(new Date).toDateString();c!==i&&(o=new Date(+o+6e4*(c-i)));for(var d,h=[],g=0;g<42;g++)d=new Date(o.getFullYear(),o.getMonth(),o.getDate()+g),h.push({date:d,isToday:d.toDateString()===u,label:r(d,this.format),selected:a.$date&&this.isSelected(d),muted:d.getMonth()!==p.month,disabled:this.isDisabled(d)});s.title=r(n,"MMMM yyyy"),s.showLabels=!0,s.labels=f,s.rows=e(h,this.split),this.built=!0},isSelected:function(e){return a.$date&&e.getFullYear()===a.$date.getFullYear()&&e.getMonth()===a.$date.getMonth()&&e.getDate()===a.$date.getDate()},isDisabled:function(e){var t=e.getTime();if(t<l.minDate||t>l.maxDate)return!0;if(-1!==l.daysOfWeekDisabled.indexOf(e.getDay()))return!0;if(l.disabledDateRanges)for(var n=0;n<l.disabledDateRanges.length;n++)if(t>=l.disabledDateRanges[n].start&&t<=l.disabledDateRanges[n].end)return!0;return!1},onKeyDown:function(e){var t,n=a.$date.getTime();37===e.keyCode?t=new Date(n-864e5):38===e.keyCode?t=new Date(n-6048e5):39===e.keyCode?t=new Date(n+864e5):40===e.keyCode&&(t=new Date(n+6048e5)),this.isDisabled(t)||a.select(t,!0)}},{name:"month",format:"MMM",split:4,steps:{year:1},update:function(e,t){this.built&&e.getFullYear()===p.year?e.getMonth()!==p.month&&(angular.extend(p,{month:a.$date.getMonth(),date:a.$date.getDate()}),a.$updateSelected()):(angular.extend(p,{year:a.$date.getFullYear(),month:a.$date.getMonth(),date:a.$date.getDate()}),a.$build())},build:function(){for(var t,n=(new Date(p.year,0,1),[]),i=0;i<12;i++)t=new Date(p.year,i,1),n.push({date:t,label:r(t,this.format),selected:a.$isSelected(t),disabled:this.isDisabled(t)});s.title=r(t,"yyyy"),s.showLabels=!1,s.rows=e(n,this.split),this.built=!0},isSelected:function(e){return a.$date&&e.getFullYear()===a.$date.getFullYear()&&e.getMonth()===a.$date.getMonth()},isDisabled:function(e){return+new Date(e.getFullYear(),e.getMonth()+1,0)<l.minDate||e.getTime()>l.maxDate},onKeyDown:function(e){var t=a.$date.getMonth(),n=new Date(a.$date);37===e.keyCode?n.setMonth(t-1):38===e.keyCode?n.setMonth(t-4):39===e.keyCode?n.setMonth(t+1):40===e.keyCode&&n.setMonth(t+4),this.isDisabled(n)||a.select(n,!0)}},{name:"year",format:"yyyy",split:4,steps:{year:12},update:function(e,t){!this.built||t||parseInt(e.getFullYear()/20,10)!==parseInt(p.year/20,10)?(angular.extend(p,{year:a.$date.getFullYear(),month:a.$date.getMonth(),date:a.$date.getDate()}),a.$build()):e.getFullYear()!==p.year&&(angular.extend(p,{year:a.$date.getFullYear(),month:a.$date.getMonth(),date:a.$date.getDate()}),a.$updateSelected())},build:function(){for(var t,n=p.year-p.year%(3*this.split),i=[],o=0;o<12;o++)t=new Date(n+o,0,1),i.push({date:t,label:r(t,this.format),selected:a.$isSelected(t),disabled:this.isDisabled(t)});s.title=i[0].label+"-"+i[i.length-1].label,s.showLabels=!1,s.rows=e(i,this.split),this.built=!0},isSelected:function(e){return a.$date&&e.getFullYear()===a.$date.getFullYear()},isDisabled:function(e){return+new Date(e.getFullYear()+1,0,0)<l.minDate||e.getTime()>l.maxDate},onKeyDown:function(e){var t=a.$date.getFullYear(),n=new Date(a.$date);37===e.keyCode?n.setYear(t-1):38===e.keyCode?n.setYear(t-4):39===e.keyCode?n.setYear(t+1):40===e.keyCode&&n.setYear(t+4),this.isDisabled(n)||a.select(n,!0)}}]);return{views:l.minView?Array.prototype.slice.call(g,l.minView):g,viewDate:p}}}]}),angular.module("mgcrea.ngStrap.helpers.dateParser",[]).provider("$dateParser",["$localeProvider",function(e){function t(){this.year=1970,this.month=0,this.day=1,this.hours=0,this.minutes=0,this.seconds=0,this.milliseconds=0}function n(){}function i(e){return!isNaN(parseFloat(e))&&isFinite(e)}function r(e,t){for(var n=e.length,i=t.toString().toLowerCase(),r=0;r<n;r++)if(e[r].toLowerCase()===i)return r;return-1}t.prototype.setMilliseconds=function(e){this.milliseconds=e},t.prototype.setSeconds=function(e){this.seconds=e},t.prototype.setMinutes=function(e){this.minutes=e},t.prototype.setHours=function(e){this.hours=e},t.prototype.getHours=function(){return this.hours},t.prototype.setDate=function(e){this.day=e},t.prototype.setMonth=function(e){this.month=e},t.prototype.setFullYear=function(e){this.year=e},t.prototype.fromDate=function(e){return this.year=e.getFullYear(),this.month=e.getMonth(),this.day=e.getDate(),this.hours=e.getHours(),this.minutes=e.getMinutes(),this.seconds=e.getSeconds(),this.milliseconds=e.getMilliseconds(),this},t.prototype.toDate=function(){return new Date(this.year,this.month,this.day,this.hours,this.minutes,this.seconds,this.milliseconds)};var o=t.prototype,a=this.defaults={format:"shortDate",strict:!1};this.$get=["$locale","dateFilter",function(e,s){return function(l){function c(e){var t,n=Object.keys(v),i=[],r=[],o=e;for(t=0;t<n.length;t++)if(e.split(n[t]).length>1){var a=o.search(n[t]);e=e.split(n[t]).join(""),v[n[t]]&&(i[a]=v[n[t]])}return angular.forEach(i,function(e){e&&r.push(e)}),r}function u(e){return e.replace(/\//g,"[\\/]").replace("/-/g","[-]").replace(/\./g,"[.]").replace(/\\s/g,"[\\s]")}function d(e){var t,n=Object.keys(m),i=e;for(t=0;t<n.length;t++)i=i.split(n[t]).join("${"+t+"}");for(t=0;t<n.length;t++)i=i.split("${"+t+"}").join("("+m[n[t]]+")");return e=u(e),new RegExp("^"+i+"$",["i"])}var f,h,p=angular.extend({},a,l),g={},m={sss:"[0-9]{3}",ss:"[0-5][0-9]",s:p.strict?"[1-5]?[0-9]":"[0-9]|[0-5][0-9]",mm:"[0-5][0-9]",m:p.strict?"[1-5]?[0-9]":"[0-9]|[0-5][0-9]",HH:"[01][0-9]|2[0-3]",H:p.strict?"1?[0-9]|2[0-3]":"[01]?[0-9]|2[0-3]",hh:"[0][1-9]|[1][012]",h:p.strict?"[1-9]|1[012]":"0?[1-9]|1[012]",a:"AM|PM",EEEE:e.DATETIME_FORMATS.DAY.join("|"),EEE:e.DATETIME_FORMATS.SHORTDAY.join("|"),dd:"0[1-9]|[12][0-9]|3[01]",d:p.strict?"[1-9]|[1-2][0-9]|3[01]":"0?[1-9]|[1-2][0-9]|3[01]",MMMM:e.DATETIME_FORMATS.MONTH.join("|"),MMM:e.DATETIME_FORMATS.SHORTMONTH.join("|"),MM:"0[1-9]|1[012]",M:p.strict?"[1-9]|1[012]":"0?[1-9]|1[012]",yyyy:"[1]{1}[0-9]{3}|[2]{1}[0-9]{3}",yy:"[0-9]{2}",y:p.strict?"-?(0|[1-9][0-9]{0,3})":"-?0*[0-9]{1,4}"},v={sss:o.setMilliseconds,ss:o.setSeconds,s:o.setSeconds,mm:o.setMinutes,m:o.setMinutes,HH:o.setHours,H:o.setHours,hh:o.setHours,h:o.setHours,EEEE:n,EEE:n,dd:o.setDate,d:o.setDate,a:function(e){var t=this.getHours()%12;return this.setHours(e.match(/pm/i)?t+12:t)},MMMM:function(t){return this.setMonth(r(e.DATETIME_FORMATS.MONTH,t))},MMM:function(t){return this.setMonth(r(e.DATETIME_FORMATS.SHORTMONTH,t))},MM:function(e){return this.setMonth(1*e-1)},M:function(e){return this.setMonth(1*e-1)},yyyy:o.setFullYear,yy:function(e){return this.setFullYear(2e3+1*e)},y:o.setFullYear};return g.init=function(){g.$format=e.DATETIME_FORMATS[p.format]||p.format,f=d(g.$format),h=c(g.$format)},g.isValid=function(e){return angular.isDate(e)?!isNaN(e.getTime()):f.test(e)},g.parse=function(e,n,i){angular.isDate(e)&&(e=s(e,i||g.$format));var r=i?d(i):f,o=i?c(i):h,a=r.exec(e);if(!a)return!1;for(var l=n&&!isNaN(n.getTime())?(new t).fromDate(n):(new t).fromDate(new Date(1970,0,1,0)),u=0;u<a.length-1;u++)o[u]&&o[u].call(l,a[u+1]);return l.toDate()},g.getDateForAttribute=function(e,t){var n;if("today"===t){var r=new Date;n=new Date(r.getFullYear(),r.getMonth(),r.getDate()+("maxDate"===e?1:0),0,0,0,"minDate"===e?0:-1)}else n=angular.isString(t)&&t.match(/^".+"$/)?new Date(t.substr(1,t.length-2)):i(t)?new Date(parseInt(t,10)):angular.isString(t)&&0===t.length?"minDate"===e?-1/0:1/0:new Date(t);return n},g.getTimeForAttribute=function(e,t){return"now"===t?(new Date).setFullYear(1970,0,1):angular.isString(t)&&t.match(/^".+"$/)?new Date(t.substr(1,t.length-2)).setFullYear(1970,0,1):i(t)?new Date(parseInt(t,10)).setFullYear(1970,0,1):angular.isString(t)&&0===t.length?"minTime"===e?-1/0:1/0:g.parse(t,new Date(1970,0,1,0))},g.init(),g}}]}]),angular.module("mgcrea.ngStrap.helpers.debounce",[]).factory("debounce",["$timeout",function(e){return function(t,n,i){var r=null;return function(){var o=this,a=arguments,s=i&&!r;return r&&e.cancel(r),r=e(function(){r=null,i||t.apply(o,a)},n,!1),s&&t.apply(o,a),r}}}]).factory("throttle",["$timeout",function(e){return function(t,n,i){var r=null;return i||(i={}),function(){var o=this,a=arguments;r||(!1!==i.leading&&t.apply(o,a),r=e(function(){r=null,!1!==i.trailing&&t.apply(o,a)},n,!1))}}}]),angular.module("mgcrea.ngStrap.helpers.dimensions",[]).factory("dimensions",["$document","$window",function(t,n){var i=(angular.element,{}),r=i.nodeName=function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()};i.css=function(t,n,i){var r;return r=t.currentStyle?t.currentStyle[n]:e.getComputedStyle?e.getComputedStyle(t)[n]:t.style[n],!0===i?parseFloat(r)||0:r},i.offset=function(t){var n=t.getBoundingClientRect(),i=t.ownerDocument;return{width:n.width||t.offsetWidth,height:n.height||t.offsetHeight,top:n.top+(e.pageYOffset||i.documentElement.scrollTop)-(i.documentElement.clientTop||0),left:n.left+(e.pageXOffset||i.documentElement.scrollLeft)-(i.documentElement.clientLeft||0)}},i.position=function(e){var t,n,a={top:0,left:0};return"fixed"===i.css(e,"position")?n=e.getBoundingClientRect():(t=o(e),n=i.offset(e),n=i.offset(e),r(t,"html")||(a=i.offset(t)),a.top+=i.css(t,"borderTopWidth",!0),a.left+=i.css(t,"borderLeftWidth",!0)),{width:e.offsetWidth,height:e.offsetHeight,top:n.top-a.top-i.css(e,"marginTop",!0),left:n.left-a.left-i.css(e,"marginLeft",!0)}};var o=function(e){var t=e.ownerDocument,n=e.offsetParent||t;if(r(n,"#document"))return t.documentElement;for(;n&&!r(n,"html")&&"static"===i.css(n,"position");)n=n.offsetParent;return n||t.documentElement};return i.height=function(e,t){var n=e.offsetHeight;return t?n+=i.css(e,"marginTop",!0)+i.css(e,"marginBottom",!0):n-=i.css(e,"paddingTop",!0)+i.css(e,"paddingBottom",!0)+i.css(e,"borderTopWidth",!0)+i.css(e,"borderBottomWidth",!0),n},i.width=function(e,t){var n=e.offsetWidth;return t?n+=i.css(e,"marginLeft",!0)+i.css(e,"marginRight",!0):n-=i.css(e,"paddingLeft",!0)+i.css(e,"paddingRight",!0)+i.css(e,"borderLeftWidth",!0)+i.css(e,"borderRightWidth",!0),n},i}]),angular.module("mgcrea.ngStrap.helpers.parseOptions",[]).provider("$parseOptions",function(){var e=this.defaults={regexp:/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/};this.$get=["$parse","$q",function(t,n){function i(i,r){function o(e,t){return e.map(function(e,n){var i,r,o={};return o[u]=e,i=c(t,o),r=h(t,o),{label:i,value:r,index:n}})}var a={},s=angular.extend({},e,r);a.$values=[];var l,c,u,d,f,h,p;return a.init=function(){a.$match=l=i.match(s.regexp),c=t(l[2]||l[1]),u=l[4]||l[6],d=l[5],f=t(l[3]||""),h=t(l[2]?l[1]:u),p=t(l[7])},a.valuesFn=function(e,t){return n.when(p(e,t)).then(function(t){return a.$values=t?o(t,e):{},a.$values})},a.displayValue=function(e){var t={};return t[u]=e,c(t)},a.init(),a}return i}]}),angular.version.minor<3&&angular.version.dot<14&&angular.module("ng").factory("$$rAF",["$window","$timeout",function(e,t){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame,i=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.mozCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,r=!!n,o=r?function(e){var t=n(e)
-;return function(){i(t)}}:function(e){var n=t(e,16.66,!1);return function(){t.cancel(n)}};return o.supported=r,o}]),angular.module("mgcrea.ngStrap.dropdown",["mgcrea.ngStrap.tooltip"]).provider("$dropdown",function(){var e=this.defaults={animation:"am-fade",prefixClass:"dropdown",placement:"bottom-left",template:"dropdown/dropdown.tpl.html",trigger:"click",container:!1,keyboard:!0,html:!1,delay:0};this.$get=["$window","$rootScope","$tooltip",function(t,n,i){function r(t,r){function s(e){if(e.target!==t[0])return e.target!==t[0]&&l.hide()}var l={},c=angular.extend({},e,r);l.$scope=c.scope&&c.scope.$new()||n.$new();l=i(t,c);var u=t.parent();l.$onKeyDown=function(e){if(/(38|40)/.test(e.keyCode)){e.preventDefault(),e.stopPropagation();var t=angular.element(l.$element[0].querySelectorAll("li:not(.divider) a"));if(t.length){var n;angular.forEach(t,function(e,t){a&&a.call(e,":focus")&&(n=t)}),38===e.keyCode&&n>0?n--:40===e.keyCode&&n<t.length-1?n++:angular.isUndefined(n)&&(n=0),t.eq(n)[0].focus()}}};var d=l.show;l.show=function(){d(),setTimeout(function(){c.keyboard&&l.$element.on("keydown",l.$onKeyDown),o.on("click",s)}),u.hasClass("dropdown")&&u.addClass("open")};var f=l.hide;return l.hide=function(){l.$isShown&&(c.keyboard&&l.$element.off("keydown",l.$onKeyDown),o.off("click",s),u.hasClass("dropdown")&&u.removeClass("open"),f())},l}var o=angular.element(t.document.body),a=Element.prototype.matchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector;return r}]}).directive("bsDropdown",["$window","$sce","$dropdown",function(e,t,n){return{restrict:"EAC",scope:!0,link:function(e,t,i,r){var o={scope:e};angular.forEach(["placement","container","delay","trigger","keyboard","html","animation","template"],function(e){angular.isDefined(i[e])&&(o[e]=i[e])}),i.bsDropdown&&e.$watch(i.bsDropdown,function(t,n){e.content=t},!0),i.bsShow&&e.$watch(i.bsShow,function(e,t){a&&angular.isDefined(e)&&(angular.isString(e)&&(e=!!e.match(/true|,?(dropdown),?/i)),!0===e?a.show():a.hide())});var a=n(t,o);e.$on("$destroy",function(){a&&a.destroy(),o=null,a=null})}}}]),angular.module("mgcrea.ngStrap.modal",["mgcrea.ngStrap.helpers.dimensions"]).provider("$modal",function(){var e=this.defaults={animation:"am-fade",backdropAnimation:"am-fade",prefixClass:"modal",prefixEvent:"modal",placement:"top",template:"modal/modal.tpl.html",contentTemplate:!1,container:!1,element:null,backdrop:!0,keyboard:!0,html:!1,show:!0};this.$get=["$window","$rootScope","$compile","$q","$templateCache","$http","$animate","$timeout","$sce","dimensions",function(n,i,r,o,a,s,l,c,u,d){function f(t){function n(){d.$emit(c.prefixEvent+".show",s)}function o(){d.$emit(c.prefixEvent+".hide",s),$.removeClass(c.prefixClass+"-open"),c.animation&&$.removeClass(c.prefixClass+"-with-"+c.animation)}function a(e){e.target===e.currentTarget&&("static"===c.backdrop?s.focus():s.hide())}var s={},c=s.$options=angular.extend({},e,t);s.$promise=p(c.template);var d=s.$scope=c.scope&&c.scope.$new()||i.$new();c.element||c.container||(c.container="body"),g(["title","content"],function(e){c[e]&&(d[e]=u.trustAsHtml(c[e]))}),d.$hide=function(){d.$$postDigest(function(){s.hide()})},d.$show=function(){d.$$postDigest(function(){s.show()})},d.$toggle=function(){d.$$postDigest(function(){s.toggle()})},c.contentTemplate&&(s.$promise=s.$promise.then(function(e){var n=angular.element(e);return p(c.contentTemplate).then(function(e){var i=h('[ng-bind="content"]',n[0]).removeAttr("ng-bind").html(e);return t.template||i.next().remove(),n[0].outerHTML})}));var f,b,w=angular.element('<div class="'+c.prefixClass+'-backdrop"/>');return s.$promise.then(function(e){angular.isObject(e)&&(e=e.data),c.html&&(e=e.replace(y,'ng-bind-html="')),e=m.apply(e),f=r(e),s.init()}),s.init=function(){c.show&&d.$$postDigest(function(){s.show()})},s.destroy=function(){b&&(b.remove(),b=null),w&&(w.remove(),w=null),d.$destroy()},s.show=function(){if(!d.$isShown&&!d.$emit(c.prefixEvent+".show.before",s).defaultPrevented){var e;e=angular.isElement(c.container)?c.container:c.container?h(c.container):null;var t=c.container?null:c.element;b=s.$element=f(d,function(e,t){}),b.css({display:"block"}).addClass(c.placement),c.animation&&(c.backdrop&&w.addClass(c.backdropAnimation),b.addClass(c.animation)),c.backdrop&&l.enter(w,$,null);var i=l.enter(b,e,t,n);i&&i.then&&i.then(n),d.$isShown=!0,d.$$phase||d.$root&&d.$root.$$phase||d.$digest();var r=b[0];v(function(){r.focus()}),$.addClass(c.prefixClass+"-open"),c.animation&&$.addClass(c.prefixClass+"-with-"+c.animation),c.backdrop&&(b.on("click",a),w.on("click",a)),c.keyboard&&b.on("keyup",s.$onKeyUp)}},s.hide=function(){if(d.$isShown&&!d.$emit(c.prefixEvent+".hide.before",s).defaultPrevented){var e=l.leave(b,o);e&&e.then&&e.then(o),c.backdrop&&l.leave(w),d.$isShown=!1,d.$$phase||d.$root&&d.$root.$$phase||d.$digest(),c.backdrop&&(b.off("click",a),w.off("click",a)),c.keyboard&&b.off("keyup",s.$onKeyUp)}},s.toggle=function(){d.$isShown?s.hide():s.show()},s.focus=function(){b[0].focus()},s.$onKeyUp=function(e){27===e.which&&d.$isShown&&(s.hide(),e.stopPropagation())},s}function h(e,n){return angular.element((n||t).querySelectorAll(e))}function p(e){return o.when(a.get(e)||s.get(e)).then(function(t){return angular.isObject(t)?(a.put(e,t.data),t.data):t})}var g=angular.forEach,m=String.prototype.trim,v=n.requestAnimationFrame||n.setTimeout,$=angular.element(n.document.body),y=/ng-bind="/gi;return f}]}).directive("bsModal",["$window","$sce","$modal",function(e,t,n){return{restrict:"EAC",scope:!0,link:function(e,i,r,o){var a={scope:e,element:i,show:!1};angular.forEach(["template","contentTemplate","placement","backdrop","keyboard","html","container","animation"],function(e){angular.isDefined(r[e])&&(a[e]=r[e])}),angular.forEach(["title","content"],function(n){r[n]&&r.$observe(n,function(i,r){e[n]=t.trustAsHtml(i)})}),r.bsModal&&e.$watch(r.bsModal,function(t,n){angular.isObject(t)?angular.extend(e,t):e.content=t},!0);var s=n(a);i.on(r.trigger||"click",s.toggle),e.$on("$destroy",function(){s&&s.destroy(),a=null,s=null})}}}]),angular.module("mgcrea.ngStrap.navbar",[]).provider("$navbar",function(){var e=this.defaults={activeClass:"active",routeAttr:"data-match-route",strict:!1};this.$get=function(){return{defaults:e}}}).directive("bsNavbar",["$window","$location","$navbar",function(e,t,n){var i=n.defaults;return{restrict:"A",link:function(e,n,r,o){var a=angular.copy(i);angular.forEach(Object.keys(i),function(e){angular.isDefined(r[e])&&(a[e]=r[e])}),e.$watch(function(){return t.path()},function(e,t){var i=n[0].querySelectorAll("li["+a.routeAttr+"]");angular.forEach(i,function(t){var n=angular.element(t),i=n.attr(a.routeAttr).replace("/","\\/");a.strict&&(i="^"+i+"$"),new RegExp(i,["i"]).test(e)?n.addClass(a.activeClass):n.removeClass(a.activeClass)})})}}}]),angular.module("mgcrea.ngStrap.popover",["mgcrea.ngStrap.tooltip"]).provider("$popover",function(){var e=this.defaults={animation:"am-fade",customClass:"",container:!1,target:!1,placement:"right",template:"popover/popover.tpl.html",contentTemplate:!1,trigger:"click",keyboard:!0,html:!1,title:"",content:"",delay:0};this.$get=["$tooltip",function(t){function n(n,i){var r=angular.extend({},e,i),o=t(n,r);return r.content&&(o.$scope.content=r.content),o}return n}]}).directive("bsPopover",["$window","$sce","$popover",function(e,t,n){var i=e.requestAnimationFrame||e.setTimeout;return{restrict:"EAC",scope:!0,link:function(e,r,o){var a={scope:e};angular.forEach(["template","contentTemplate","placement","container","target","delay","trigger","keyboard","html","animation","customClass"],function(e){angular.isDefined(o[e])&&(a[e]=o[e])}),angular.forEach(["title","content"],function(n){o[n]&&o.$observe(n,function(r,o){e[n]=t.trustAsHtml(r),angular.isDefined(o)&&i(function(){s&&s.$applyPlacement()})})}),o.bsPopover&&e.$watch(o.bsPopover,function(t,n){angular.isObject(t)?angular.extend(e,t):e.content=t,angular.isDefined(n)&&i(function(){s&&s.$applyPlacement()})},!0),o.bsShow&&e.$watch(o.bsShow,function(e,t){s&&angular.isDefined(e)&&(angular.isString(e)&&(e=!!e.match(/true|,?(popover),?/i)),!0===e?s.show():s.hide())});var s=n(r,a);e.$on("$destroy",function(){s&&s.destroy(),a=null,s=null})}}}]),angular.module("mgcrea.ngStrap.scrollspy",["mgcrea.ngStrap.helpers.debounce","mgcrea.ngStrap.helpers.dimensions"]).provider("$scrollspy",function(){var e=this.$$spies={},n=this.defaults={debounce:150,throttle:100,offset:100};this.$get=["$window","$document","$rootScope","dimensions","debounce","throttle",function(i,r,o,a,s,l){function c(e,t){return e[0].nodeName&&e[0].nodeName.toLowerCase()===t.toLowerCase()}function u(r){var u=angular.extend({},n,r);u.element||(u.element=h);var p=c(u.element,"body"),g=p?d:u.element,m=p?"window":u.id;if(e[m])return e[m].$$count++,e[m];var v,$,y,b,w,x,C,k,S={},E=S.$trackedElements=[],T=[];return S.init=function(){this.$$count=1,b=s(this.checkPosition,u.debounce),w=l(this.checkPosition,u.throttle),g.on("click",this.checkPositionWithEventLoop),d.on("resize",b),g.on("scroll",w),x=s(this.checkOffsets,u.debounce),v=o.$on("$viewContentLoaded",x),$=o.$on("$includeContentLoaded",x),x(),m&&(e[m]=S)},S.destroy=function(){--this.$$count>0||(g.off("click",this.checkPositionWithEventLoop),d.off("resize",b),g.off("scroll",b),v(),$(),m&&delete e[m])},S.checkPosition=function(){if(T.length){if(k=(p?i.pageYOffset:g.prop("scrollTop"))||0,C=Math.max(i.innerHeight,f.prop("clientHeight")),k<T[0].offsetTop&&y!==T[0].target)return S.$activateElement(T[0]);for(var e=T.length;e--;)if(!angular.isUndefined(T[e].offsetTop)&&null!==T[e].offsetTop&&y!==T[e].target&&!(k<T[e].offsetTop||T[e+1]&&k>T[e+1].offsetTop))return S.$activateElement(T[e])}},S.checkPositionWithEventLoop=function(){setTimeout(this.checkPosition,1)},S.$activateElement=function(e){if(y){var t=S.$getTrackedElement(y);t&&(t.source.removeClass("active"),c(t.source,"li")&&c(t.source.parent().parent(),"li")&&t.source.parent().parent().removeClass("active"))}y=e.target,e.source.addClass("active"),c(e.source,"li")&&c(e.source.parent().parent(),"li")&&e.source.parent().parent().addClass("active")},S.$getTrackedElement=function(e){return E.filter(function(t){return t.target===e})[0]},S.checkOffsets=function(){angular.forEach(E,function(e){var n=t.querySelector(e.target);e.offsetTop=n?a.offset(n).top:null,u.offset&&null!==e.offsetTop&&(e.offsetTop-=1*u.offset)}),T=E.filter(function(e){return null!==e.offsetTop}).sort(function(e,t){return e.offsetTop-t.offsetTop}),b()},S.trackElement=function(e,t){E.push({target:e,source:t})},S.untrackElement=function(e,t){for(var n,i=E.length;i--;)if(E[i].target===e&&E[i].source===t){n=i;break}E=E.splice(n,1)},S.activate=function(e){E[e].addClass("active")},S.init(),S}var d=angular.element(i),f=angular.element(r.prop("documentElement")),h=angular.element(i.document.body);return u}]}).directive("bsScrollspy",["$rootScope","debounce","dimensions","$scrollspy",function(e,t,n,i){return{restrict:"EAC",link:function(e,t,n){var r={scope:e};angular.forEach(["offset","target"],function(e){angular.isDefined(n[e])&&(r[e]=n[e])});var o=i(r);o.trackElement(r.target,t),e.$on("$destroy",function(){o&&(o.untrackElement(r.target,t),o.destroy()),r=null,o=null})}}}]).directive("bsScrollspyList",["$rootScope","debounce","dimensions","$scrollspy",function(e,t,n,i){return{restrict:"A",compile:function(e,t){var n=e[0].querySelectorAll("li > a[href]");angular.forEach(n,function(e){var t=angular.element(e);t.parent().attr("bs-scrollspy","").attr("data-target",t.attr("href"))})}}}]),angular.module("mgcrea.ngStrap.select",["mgcrea.ngStrap.tooltip","mgcrea.ngStrap.helpers.parseOptions"]).provider("$select",function(){var e=this.defaults={animation:"am-fade",prefixClass:"select",prefixEvent:"$select",placement:"bottom-left",template:"select/select.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,multiple:!1,allNoneButtons:!1,sort:!0,caretHtml:'&nbsp;<span class="caret"></span>',placeholder:"Choose among the following...",maxLength:3,maxLengthHtml:"selected",iconCheckmark:"glyphicon glyphicon-ok"};this.$get=["$window","$document","$rootScope","$tooltip",function(t,n,i,r){function o(t,n,i){var o={},a=angular.extend({},e,i);o=r(t,a);var l=o.$scope;l.$matches=[],l.$activeIndex=0,l.$isMultiple=a.multiple,l.$showAllNoneButtons=a.allNoneButtons&&a.multiple,l.$iconCheckmark=a.iconCheckmark,l.$activate=function(e){l.$$postDigest(function(){o.activate(e)})},l.$select=function(e,t){l.$$postDigest(function(){o.select(e)})},l.$isVisible=function(){return o.$isVisible()},l.$isActive=function(e){return o.$isActive(e)},l.$selectAll=function(){for(var e=0;e<l.$matches.length;e++)l.$isActive(e)||l.$select(e)},l.$selectNone=function(){for(var e=0;e<l.$matches.length;e++)l.$isActive(e)&&l.$select(e)},o.update=function(e){l.$matches=e,o.$updateActiveIndex()},o.activate=function(e){return a.multiple?(l.$activeIndex.sort(),o.$isActive(e)?l.$activeIndex.splice(l.$activeIndex.indexOf(e),1):l.$activeIndex.push(e),a.sort&&l.$activeIndex.sort()):l.$activeIndex=e,l.$activeIndex},o.select=function(e){var t=l.$matches[e].value;l.$apply(function(){o.activate(e),a.multiple?n.$setViewValue(l.$activeIndex.map(function(e){return l.$matches[e].value})):(n.$setViewValue(t),o.hide())}),l.$emit(a.prefixEvent+".select",t,e)},o.$updateActiveIndex=function(){n.$modelValue&&l.$matches.length?a.multiple&&angular.isArray(n.$modelValue)?l.$activeIndex=n.$modelValue.map(function(e){return o.$getIndex(e)}):l.$activeIndex=o.$getIndex(n.$modelValue):l.$activeIndex>=l.$matches.length&&(l.$activeIndex=a.multiple?[]:0)},o.$isVisible=function(){return a.minLength&&n?l.$matches.length&&n.$viewValue.length>=a.minLength:l.$matches.length},o.$isActive=function(e){return a.multiple?-1!==l.$activeIndex.indexOf(e):l.$activeIndex===e},o.$getIndex=function(e){var t=l.$matches.length,n=t;if(t){for(n=t;n--&&l.$matches[n].value!==e;);if(!(n<0))return n}},o.$onMouseDown=function(e){if(e.preventDefault(),e.stopPropagation(),s){angular.element(e.target).triggerHandler("click")}},o.$onKeyDown=function(e){if(/(9|13|38|40)/.test(e.keyCode)){if(e.preventDefault(),e.stopPropagation(),!a.multiple&&(13===e.keyCode||9===e.keyCode))return o.select(l.$activeIndex);38===e.keyCode&&l.$activeIndex>0?l.$activeIndex--:40===e.keyCode&&l.$activeIndex<l.$matches.length-1?l.$activeIndex++:angular.isUndefined(l.$activeIndex)&&(l.$activeIndex=0),l.$digest()}};var c=o.show;o.show=function(){c(),a.multiple&&o.$element.addClass("select-multiple"),setTimeout(function(){o.$element.on(s?"touchstart":"mousedown",o.$onMouseDown),a.keyboard&&t.on("keydown",o.$onKeyDown)})};var u=o.hide;return o.hide=function(){o.$element.off(s?"touchstart":"mousedown",o.$onMouseDown),a.keyboard&&t.off("keydown",o.$onKeyDown),u(!0)},o}var a=(angular.element(t.document.body),/(ip(a|o)d|iphone|android)/gi.test(t.navigator.userAgent)),s="createTouch"in t.document&&a;return o.defaults=e,o}]}).directive("bsSelect",["$window","$parse","$q","$select","$parseOptions",function(e,t,n,i,r){var o=i.defaults;return{restrict:"EAC",require:"ngModel",link:function(e,t,n,a){var s={scope:e,placeholder:o.placeholder};if(angular.forEach(["placement","container","delay","trigger","keyboard","html","animation","template","placeholder","multiple","allNoneButtons","maxLength","maxLengthHtml"],function(e){angular.isDefined(n[e])&&(s[e]=n[e])}),"select"===t[0].nodeName.toLowerCase()){var l=t;l.css("display","none"),t=angular.element('<button type="button" class="btn btn-default"></button>'),l.after(t)}var c=r(n.ngOptions),u=i(t,a,s),d=c.$match[7].replace(/\|.+/,"").trim();e.$watch(d,function(t,n){c.valuesFn(e,a).then(function(e){u.update(e),a.$render()})},!0),e.$watch(n.ngModel,function(e,t){u.$updateActiveIndex(),a.$render()},!0),a.$render=function(){var e,n;s.multiple&&angular.isArray(a.$modelValue)?(e=a.$modelValue.map(function(e){return n=u.$getIndex(e),!!angular.isDefined(n)&&u.$scope.$matches[n].label}).filter(angular.isDefined),e=e.length>(s.maxLength||o.maxLength)?e.length+" "+(s.maxLengthHtml||o.maxLengthHtml):e.join(", ")):(n=u.$getIndex(a.$modelValue),e=!!angular.isDefined(n)&&u.$scope.$matches[n].label),t.html((e||s.placeholder)+o.caretHtml)},e.$on("$destroy",function(){u&&u.destroy(),s=null,u=null})}}}]),angular.module("mgcrea.ngStrap.tab",[]).provider("$tab",function(){var e=this.defaults={animation:"am-fade",template:"tab/tab.tpl.html",navClass:"nav-tabs",activeClass:"active"},t=this.controller=function(t,n,i){var r=this;r.$options=angular.copy(e),angular.forEach(["animation","navClass","activeClass"],function(e){angular.isDefined(i[e])&&(r.$options[e]=i[e])}),t.$navClass=r.$options.navClass,t.$activeClass=r.$options.activeClass,r.$panes=t.$panes=[],r.$viewChangeListeners=[],r.$push=function(e){r.$panes.push(e)},r.$remove=function(e){var t=r.$panes.indexOf(e),n=r.$panes.$active;r.$panes.splice(t,1),t<n?n--:t===n&&n===r.$panes.length&&n--,r.$setActive(n)},r.$panes.$active=0,r.$setActive=t.$setActive=function(e){r.$panes.$active=e,r.$viewChangeListeners.forEach(function(e){e()})}};this.$get=function(){var n={};return n.defaults=e,n.controller=t,n}}).directive("bsTabs",["$window","$animate","$tab",function(e,t,n){var i=n.defaults;return{require:["?ngModel","bsTabs"],transclude:!0,scope:!0,controller:["$scope","$element","$attrs",n.controller],templateUrl:function(e,t){return t.template||i.template},link:function(e,t,n,i){var r=i[0],o=i[1];r&&(o.$viewChangeListeners.push(function(){r.$setViewValue(o.$panes.$active)}),r.$formatters.push(function(e){return o.$setActive(1*e),e}))}}}]).directive("bsPane",["$window","$animate","$sce",function(e,t,n){return{require:["^?ngModel","^bsTabs"],scope:!0,link:function(e,i,r,o){function a(){var n=s.$panes.indexOf(e),r=s.$panes.$active;t[n===r?"addClass":"removeClass"](i,s.$options.activeClass)}var s=(o[0],o[1]);i.addClass("tab-pane"),r.$observe("title",function(t,i){e.title=n.trustAsHtml(t)}),s.$options.animation&&i.addClass(s.$options.animation),s.$push(e),e.$on("$destroy",function(){s.$remove(e)}),s.$viewChangeListeners.push(function(){a()}),a()}}}]),angular.module("mgcrea.ngStrap.timepicker",["mgcrea.ngStrap.helpers.dateParser","mgcrea.ngStrap.tooltip"]).provider("$timepicker",function(){var e=this.defaults={animation:"am-fade",prefixClass:"timepicker",placement:"bottom-left",template:"timepicker/timepicker.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,useNative:!0,timeType:"date",timeFormat:"shortTime",modelTimeFormat:null,autoclose:!1,minTime:-1/0,maxTime:1/0,length:5,hourStep:1,minuteStep:5,iconUp:"glyphicon glyphicon-chevron-up",iconDown:"glyphicon glyphicon-chevron-down",arrowBehavior:"pager"};this.$get=["$window","$document","$rootScope","$sce","$locale","dateFilter","$tooltip","$timeout",function(t,n,i,r,o,a,s,l){function c(t,n,i){function r(e,n){if(t[0].createTextRange){var i=t[0].createTextRange();i.collapse(!0),i.moveStart("character",e),i.moveEnd("character",n),i.select()}else t[0].setSelectionRange?t[0].setSelectionRange(e,n):angular.isUndefined(t[0].selectionStart)&&(t[0].selectionStart=e,t[0].selectionEnd=n)}function c(){t[0].focus()}var f=s(t,angular.extend({},e,i)),h=i.scope,p=f.$options,g=f.$scope,m=0,v=n.$dateValue||new Date,$={hour:v.getHours(),meridian:v.getHours()<12,minute:v.getMinutes(),second:v.getSeconds(),millisecond:v.getMilliseconds()},y=o.DATETIME_FORMATS[p.timeFormat]||p.timeFormat,b=/(h+)([:\.])?(m+)[ ]?(a?)/i.exec(y).slice(1);g.$iconUp=p.iconUp,g.$iconDown=p.iconDown,g.$select=function(e,t){f.select(e,t)},g.$moveIndex=function(e,t){f.$moveIndex(e,t)},g.$switchMeridian=function(e){f.switchMeridian(e)},f.update=function(e){angular.isDate(e)&&!isNaN(e.getTime())?(f.$date=e,angular.extend($,{hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds(),millisecond:e.getMilliseconds()}),f.$build()):f.$isBuilt||f.$build()},f.select=function(e,t,i){n.$dateValue&&!isNaN(n.$dateValue.getTime())||(n.$dateValue=new Date(1970,0,1)),angular.isDate(e)||(e=new Date(e)),0===t?n.$dateValue.setHours(e.getHours()):1===t&&n.$dateValue.setMinutes(e.getMinutes()),n.$setViewValue(n.$dateValue),n.$render(),p.autoclose&&!i&&l(function(){f.hide(!0)})},f.switchMeridian=function(e){if(n.$dateValue&&!isNaN(n.$dateValue.getTime())){var t=(e||n.$dateValue).getHours();n.$dateValue.setHours(t<12?t+12:t-12),n.$setViewValue(n.$dateValue),n.$render()}},f.$build=function(){var e,t,n=g.midIndex=parseInt(p.length/2,10),i=[];for(e=0;e<p.length;e++)t=new Date(1970,0,1,$.hour-(n-e)*p.hourStep),i.push({date:t,label:a(t,b[0]),selected:f.$date&&f.$isSelected(t,0),disabled:f.$isDisabled(t,0)});var r,o=[];for(e=0;e<p.length;e++)r=new Date(1970,0,1,0,$.minute-(n-e)*p.minuteStep),o.push({date:r,label:a(r,b[2]),selected:f.$date&&f.$isSelected(r,1),disabled:f.$isDisabled(r,1)});var s=[];for(e=0;e<p.length;e++)s.push([i[e],o[e]]);g.rows=s,g.showAM=!!b[3],g.isAM=(f.$date||i[n].date).getHours()<12,g.timeSeparator=b[1],f.$isBuilt=!0},f.$isSelected=function(e,t){return!!f.$date&&(0===t?e.getHours()===f.$date.getHours():1===t?e.getMinutes()===f.$date.getMinutes():void 0)},f.$isDisabled=function(e,t){var n;return 0===t?n=e.getTime()+6e4*$.minute:1===t&&(n=e.getTime()+36e5*$.hour),n<1*p.minTime||n>1*p.maxTime},g.$arrowAction=function(e,t){"picker"===p.arrowBehavior?f.$setTimeByStep(e,t):f.$moveIndex(e,t)},f.$setTimeByStep=function(e,t){var n=new Date(f.$date),i=n.getHours(),r=(a(n,"h").length,n.getMinutes());a(n,"mm").length;0===t?n.setHours(i-parseInt(p.hourStep,10)*e):n.setMinutes(r-parseInt(p.minuteStep,10)*e),f.select(n,t,!0),h.$digest()},f.$moveIndex=function(e,t){var n;0===t?(n=new Date(1970,0,1,$.hour+e*p.length,$.minute),angular.extend($,{hour:n.getHours()})):1===t&&(n=new Date(1970,0,1,$.hour,$.minute+e*p.length*p.minuteStep),angular.extend($,{minute:n.getMinutes()})),f.$build()},f.$onMouseDown=function(e){if("input"!==e.target.nodeName.toLowerCase()&&e.preventDefault(),e.stopPropagation(),d){var t=angular.element(e.target);"button"!==t[0].nodeName.toLowerCase()&&(t=t.parent()),t.triggerHandler("click")}},f.$onKeyDown=function(e){if(/(38|37|39|40|13)/.test(e.keyCode)&&!e.shiftKey&&!e.altKey){if(e.preventDefault(),e.stopPropagation(),13===e.keyCode)return f.hide(!0);var t=new Date(f.$date),n=t.getHours(),i=a(t,"h").length,o=t.getMinutes(),s=a(t,"mm").length,l=/(37|39)/.test(e.keyCode),c=2+1*!!b[3];l&&(37===e.keyCode?m=m<1?c-1:m-1:39===e.keyCode&&(m=m<c-1?m+1:0));var u=[0,i];0===m?(38===e.keyCode?t.setHours(n-parseInt(p.hourStep,10)):40===e.keyCode&&t.setHours(n+parseInt(p.hourStep,10)),u=[0,i]):1===m?(38===e.keyCode?t.setMinutes(o-parseInt(p.minuteStep,10)):40===e.keyCode&&t.setMinutes(o+parseInt(p.minuteStep,10)),u=[i+1,i+1+s]):2===m&&(l||f.switchMeridian(),u=[i+1+s+1,i+1+s+3]),f.select(t,m,!0),r(u[0],u[1]),h.$digest()}};var w=f.init;f.init=function(){if(u&&p.useNative)return t.prop("type","time"),void t.css("-webkit-appearance","textfield");d&&(t.prop("type","text"),t.attr("readonly","true"),t.on("click",c)),w()};var x=f.destroy;f.destroy=function(){u&&p.useNative&&t.off("click",c),x()};var C=f.show;f.show=function(){C(),setTimeout(function(){f.$element.on(d?"touchstart":"mousedown",f.$onMouseDown),p.keyboard&&t.on("keydown",f.$onKeyDown)})};var k=f.hide;return f.hide=function(e){f.$isShown&&(f.$element.off(d?"touchstart":"mousedown",f.$onMouseDown),p.keyboard&&t.off("keydown",f.$onKeyDown),k(e))},f}var u=(angular.element(t.document.body),/(ip(a|o)d|iphone|android)/gi.test(t.navigator.userAgent)),d="createTouch"in t.document&&u;return e.lang||(e.lang=o.id),c.defaults=e,c}]}).directive("bsTimepicker",["$window","$parse","$q","$locale","dateFilter","$timepicker","$dateParser","$timeout",function(e,t,n,i,r,o,a,s){var l=o.defaults,c=/(ip(a|o)d|iphone|android)/gi.test(e.navigator.userAgent);e.requestAnimationFrame||e.setTimeout;return{restrict:"EAC",require:"ngModel",link:function(e,t,n,i){var s={scope:e,controller:i};angular.forEach(["placement","container","delay","trigger","keyboard","html","animation","template","autoclose","timeType","timeFormat","modelTimeFormat","useNative","hourStep","minuteStep","length","arrowBehavior","iconUp","iconDown"],function(e){angular.isDefined(n[e])&&(s[e]=n[e])}),n.bsShow&&e.$watch(n.bsShow,function(e,t){u&&angular.isDefined(e)&&(angular.isString(e)&&(e=!!e.match(/true|,?(timepicker),?/i)),!0===e?u.show():u.hide())}),c&&(s.useNative||l.useNative)&&(s.timeFormat="HH:mm");var u=o(t,i,s);s=u.$options;var d=a({format:s.timeFormat,lang:s.lang});angular.forEach(["minTime","maxTime"],function(e){angular.isDefined(n[e])&&n.$observe(e,function(t){u.$options[e]=d.getTimeForAttribute(e,t),!isNaN(u.$options[e])&&u.$build()})}),e.$watch(n.ngModel,function(e,t){u.update(i.$dateValue)},!0),i.$parsers.unshift(function(e){if(!e)return void i.$setValidity("date",!0);var t=angular.isDate(e)?e:d.parse(e,i.$dateValue);if(!t||isNaN(t.getTime()))return void i.$setValidity("date",!1);var n=isNaN(s.minTime)||t.getTime()>=s.minTime,o=isNaN(s.maxTime)||t.getTime()<=s.maxTime,a=n&&o;if(i.$setValidity("date",a),i.$setValidity("min",n),i.$setValidity("max",o),a)return i.$dateValue=t,"string"===s.timeType?r(t,s.modelTimeFormat||s.timeFormat):"number"===s.timeType?i.$dateValue.getTime():"iso"===s.timeType?i.$dateValue.toISOString():new Date(i.$dateValue)}),i.$formatters.push(function(e){var t;return t=angular.isUndefined(e)||null===e?NaN:angular.isDate(e)?e:"string"===s.timeType?d.parse(e,null,s.modelTimeFormat):new Date(e),i.$dateValue=t,i.$dateValue}),i.$render=function(){t.val(!i.$dateValue||isNaN(i.$dateValue.getTime())?"":r(i.$dateValue,s.timeFormat))},e.$on("$destroy",function(){u&&u.destroy(),s=null,u=null})}}}]),angular.module("mgcrea.ngStrap.tooltip",["mgcrea.ngStrap.helpers.dimensions"]).provider("$tooltip",function(){var e=this.defaults={animation:"am-fade",customClass:"",prefixClass:"tooltip",prefixEvent:"tooltip",container:!1,target:!1,placement:"top",template:"tooltip/tooltip.tpl.html",contentTemplate:!1,trigger:"hover focus",keyboard:!1,html:!1,show:!1,title:"",type:"",delay:0};this.$get=["$window","$rootScope","$compile","$q","$templateCache","$http","$animate","dimensions","$$rAF",function(n,i,r,o,a,s,l,c,u){function d(t,n){function o(){b.$emit(y.prefixEvent+".show",v)}function a(){if(b.$emit(y.prefixEvent+".hide",v),blur&&"focus"===y.trigger)return t[0].blur()}function s(){return"body"===y.container?c.offset(y.target[0]||t[0]):c.position(y.target[0]||t[0])}function d(e,t,n,i){var r,o=e.split("-");switch(o[0]){case"right":r={top:t.top+t.height/2-i/2,left:t.left+t.width};break;case"bottom":r={top:t.top+t.height,left:t.left+t.width/2-n/2};break;case"left":r={top:t.top+t.height/2-i/2,left:t.left-n};break;default:r={top:t.top-i,left:t.left+t.width/2-n/2}}if(!o[1])return r;if("top"===o[0]||"bottom"===o[0])switch(o[1]){case"left":r.left=t.left;break;case"right":r.left=t.left+t.width-n}else if("left"===o[0]||"right"===o[0])switch(o[1]){case"top":r.top=t.top-i;break;case"bottom":r.top=t.top+t.height}return r}var v={},$=t[0].nodeName.toLowerCase(),y=v.$options=angular.extend({},e,n);v.$promise=h(y.template);var b=v.$scope=y.scope&&y.scope.$new()||i.$new();if(y.delay&&angular.isString(y.delay)){var w=y.delay.split(",").map(parseFloat);y.delay=w.length>1?{show:w[0],hide:w[1]}:w[0]}y.title&&(v.$scope.title=y.title),b.$hide=function(){b.$$postDigest(function(){v.hide()})},b.$show=function(){b.$$postDigest(function(){v.show()})},b.$toggle=function(){b.$$postDigest(function(){v.toggle()})},v.$isShown=b.$isShown=!1;var x,C;y.contentTemplate&&(v.$promise=v.$promise.then(function(e){var t=angular.element(e);return h(y.contentTemplate).then(function(e){var n=f('[ng-bind="content"]',t[0]);return n.length||(n=f('[ng-bind="title"]',t[0])),n.removeAttr("ng-bind").html(e),t[0].outerHTML})}));var k,S,E,T;return v.$promise.then(function(e){angular.isObject(e)&&(e=e.data),y.html&&(e=e.replace(m,'ng-bind-html="')),e=p.apply(e),E=e,k=r(e),v.init()}),v.init=function(){y.delay&&angular.isNumber(y.delay)&&(y.delay={show:y.delay,hide:y.delay}),"self"===y.container?T=t:angular.isElement(y.container)?T=y.container:y.container&&(T=f(y.container));var e=y.trigger.split(" ");angular.forEach(e,function(e){"click"===e?t.on("click",v.toggle):"manual"!==e&&(t.on("hover"===e?"mouseenter":"focus",v.enter),t.on("hover"===e?"mouseleave":"blur",v.leave),"button"===$&&"hover"!==e&&t.on(g?"touchstart":"mousedown",v.$onFocusElementMouseDown))}),y.target&&(y.target=angular.isElement(y.target)?y.target:f(y.target)),y.show&&b.$$postDigest(function(){"focus"===y.trigger?t[0].focus():v.show()})},v.destroy=function(){for(var e=y.trigger.split(" "),n=e.length;n--;){var i=e[n];"click"===i?t.off("click",v.toggle):"manual"!==i&&(t.off("hover"===i?"mouseenter":"focus",v.enter),t.off("hover"===i?"mouseleave":"blur",v.leave),"button"===$&&"hover"!==i&&t.off(g?"touchstart":"mousedown",v.$onFocusElementMouseDown))}S&&(S.remove(),S=null),clearTimeout(x),b.$destroy()},v.enter=function(){if(clearTimeout(x),C="in",!y.delay||!y.delay.show)return v.show();x=setTimeout(function(){"in"===C&&v.show()},y.delay.show)},v.show=function(){b.$emit(y.prefixEvent+".show.before",v);var e=y.container?T:null,n=y.container?null:t;S&&S.remove(),S=v.$element=k(b,function(e,t){}),S.css({top:"-9999px",left:"-9999px",display:"block",visibility:"hidden"}).addClass(y.placement),y.animation&&S.addClass(y.animation),y.type&&S.addClass(y.prefixClass+"-"+y.type),y.customClass&&S.addClass(y.customClass);var i=l.enter(S,e,n,o);i&&i.then&&i.then(o),v.$isShown=b.$isShown=!0,b.$$phase||b.$root&&b.$root.$$phase||b.$digest(),u(function(){v.$applyPlacement(),S.css({visibility:"visible"})}),y.keyboard&&("focus"!==y.trigger?(v.focus(),S.on("keyup",v.$onKeyUp)):t.on("keyup",v.$onFocusKeyUp))},v.leave=function(){if(clearTimeout(x),C="out",!y.delay||!y.delay.hide)return v.hide();x=setTimeout(function(){"out"===C&&v.hide()},y.delay.hide)},v.hide=function(e){if(v.$isShown){b.$emit(y.prefixEvent+".hide.before",v);var t=l.leave(S,a);t&&t.then&&t.then(a),v.$isShown=b.$isShown=!1,b.$$phase||b.$root&&b.$root.$$phase||b.$digest(),y.keyboard&&null!==S&&S.off("keyup",v.$onKeyUp)}},v.toggle=function(){v.$isShown?v.leave():v.enter()},v.focus=function(){S[0].focus()},v.$applyPlacement=function(){if(S){var e=s(),t=S.prop("offsetWidth"),n=S.prop("offsetHeight"),i=d(y.placement,e,t,n);i.top+="px",i.left+="px",S.css(i)}},v.$onKeyUp=function(e){27===e.which&&v.$isShown&&(v.hide(),e.stopPropagation())},v.$onFocusKeyUp=function(e){27===e.which&&(t[0].blur(),e.stopPropagation())},v.$onFocusElementMouseDown=function(e){e.preventDefault(),e.stopPropagation(),v.$isShown?t[0].blur():t[0].focus()},v}function f(e,n){return angular.element((n||t).querySelectorAll(e))}function h(e){return o.when(a.get(e)||s.get(e)).then(function(t){return angular.isObject(t)?(a.put(e,t.data),t.data):t})}var p=String.prototype.trim,g="createTouch"in n.document,m=/ng-bind="/gi;return d}]}).directive("bsTooltip",["$window","$location","$sce","$tooltip","$$rAF",function(e,t,n,i,r){return{restrict:"EAC",scope:!0,link:function(e,t,o,a){var s={scope:e};angular.forEach(["template","contentTemplate","placement","container","target","delay","trigger","keyboard","html","animation","type","customClass"],function(e){angular.isDefined(o[e])&&(s[e]=o[e])}),o.$observe("title",function(t){if(angular.isDefined(t)||!e.hasOwnProperty("title")){var i=e.title;e.title=n.trustAsHtml(t),angular.isDefined(i)&&r(function(){l&&l.$applyPlacement()})}}),o.bsTooltip&&e.$watch(o.bsTooltip,function(t,n){angular.isObject(t)?angular.extend(e,t):e.title=t,angular.isDefined(n)&&r(function(){l&&l.$applyPlacement()})},!0),o.bsShow&&e.$watch(o.bsShow,function(e,t){l&&angular.isDefined(e)&&(angular.isString(e)&&(e=!!e.match(/true|,?(tooltip),?/i)),!0===e?l.show():l.hide())});var l=i(t,s);e.$on("$destroy",function(){l&&l.destroy(),s=null,l=null})}}}]),angular.module("mgcrea.ngStrap.typeahead",["mgcrea.ngStrap.tooltip","mgcrea.ngStrap.helpers.parseOptions"]).provider("$typeahead",function(){var e=this.defaults={
-animation:"am-fade",prefixClass:"typeahead",prefixEvent:"$typeahead",placement:"bottom-left",template:"typeahead/typeahead.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,minLength:1,filter:"filter",limit:6};this.$get=["$window","$rootScope","$tooltip",function(t,n,i){function r(t,n,r){var o={},a=angular.extend({},e,r);o=i(t,a);var s=r.scope,l=o.$scope;l.$resetMatches=function(){l.$matches=[],l.$activeIndex=0},l.$resetMatches(),l.$activate=function(e){l.$$postDigest(function(){o.activate(e)})},l.$select=function(e,t){l.$$postDigest(function(){o.select(e)})},l.$isVisible=function(){return o.$isVisible()},o.update=function(e){l.$matches=e,l.$activeIndex>=e.length&&(l.$activeIndex=0)},o.activate=function(e){l.$activeIndex=e},o.select=function(e){var t=l.$matches[e].value;n.$setViewValue(t),n.$render(),l.$resetMatches(),s&&s.$digest(),l.$emit(a.prefixEvent+".select",t,e)},o.$isVisible=function(){return a.minLength&&n?l.$matches.length&&angular.isString(n.$viewValue)&&n.$viewValue.length>=a.minLength:!!l.$matches.length},o.$getIndex=function(e){var t=l.$matches.length,n=t;if(t){for(n=t;n--&&l.$matches[n].value!==e;);if(!(n<0))return n}},o.$onMouseDown=function(e){e.preventDefault(),e.stopPropagation()},o.$onKeyDown=function(e){/(38|40|13)/.test(e.keyCode)&&(o.$isVisible()&&(e.preventDefault(),e.stopPropagation()),13===e.keyCode&&l.$matches.length?o.select(l.$activeIndex):38===e.keyCode&&l.$activeIndex>0?l.$activeIndex--:40===e.keyCode&&l.$activeIndex<l.$matches.length-1?l.$activeIndex++:angular.isUndefined(l.$activeIndex)&&(l.$activeIndex=0),l.$digest())};var c=o.show;o.show=function(){c(),setTimeout(function(){o.$element.on("mousedown",o.$onMouseDown),a.keyboard&&t.on("keydown",o.$onKeyDown)})};var u=o.hide;return o.hide=function(){o.$element.off("mousedown",o.$onMouseDown),a.keyboard&&t.off("keydown",o.$onKeyDown),u()},o}angular.element(t.document.body);return r.defaults=e,r}]}).directive("bsTypeahead",["$window","$parse","$q","$typeahead","$parseOptions",function(e,t,n,i,r){var o=i.defaults;return{restrict:"EAC",require:"ngModel",link:function(e,t,n,a){var s={scope:e};angular.forEach(["placement","container","delay","trigger","keyboard","html","animation","template","filter","limit","minLength","watchOptions","selectMode"],function(e){angular.isDefined(n[e])&&(s[e]=n[e])});var l=s.filter||o.filter,c=s.limit||o.limit,u=n.ngOptions;l&&(u+=" | "+l+":$viewValue"),c&&(u+=" | limitTo:"+c);var d=r(u),f=i(t,a,s);if(s.watchOptions){var h=d.$match[7].replace(/\|.+/,"").replace(/\(.*\)/g,"").trim();e.$watch(h,function(t,n){d.valuesFn(e,a).then(function(e){f.update(e),a.$render()})},!0)}e.$watch(n.ngModel,function(t,n){e.$modelValue=t,d.valuesFn(e,a).then(function(e){if(s.selectMode&&!e.length&&t.length>0)return void a.$setViewValue(a.$viewValue.substring(0,a.$viewValue.length-1));e.length>c&&(e=e.slice(0,c));var n=f.$isVisible();n&&f.update(e),1===e.length&&e[0].value===t||(!n&&f.update(e),a.$render())})}),a.$formatters.push(function(e){return d.displayValue(e)}),a.$render=function(){if(a.$isEmpty(a.$viewValue))return t.val("");var e=f.$getIndex(a.$modelValue),n=angular.isDefined(e)?f.$scope.$matches[e].label:a.$viewValue;n=angular.isObject(n)?n.label:n,t.val(n?n.replace(/<(?:.|\n)*?>/gm,"").trim():"")},e.$on("$destroy",function(){f&&f.destroy(),s=null,f=null})}}}])}(window,document),function(e,t,n){"use strict";angular.module("mgcrea.ngStrap.alert").run(["$templateCache",function(e){e.put("alert/alert.tpl.html",'<div class="alert" ng-class="[type ? \'alert-\' + type : null]"><button type="button" class="close" ng-if="dismissable" ng-click="$hide()">&times;</button> <strong ng-bind="title"></strong>&nbsp;<span ng-bind-html="content"></span></div>')}]),angular.module("mgcrea.ngStrap.aside").run(["$templateCache",function(e){e.put("aside/aside.tpl.html",'<div class="aside" tabindex="-1" role="dialog"><div class="aside-dialog"><div class="aside-content"><div class="aside-header" ng-show="title"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="aside-title" ng-bind="title"></h4></div><div class="aside-body" ng-bind="content"></div><div class="aside-footer"><button type="button" class="btn btn-default" ng-click="$hide()">Close</button></div></div></div></div>')}]),angular.module("mgcrea.ngStrap.dropdown").run(["$templateCache",function(e){e.put("dropdown/dropdown.tpl.html",'<ul tabindex="-1" class="dropdown-menu" role="menu"><li role="presentation" ng-class="{divider: item.divider}" ng-repeat="item in content"><a role="menuitem" tabindex="-1" ng-href="{{item.href}}" ng-if="!item.divider && item.href" target="{{item.target || \'\'}}" ng-bind="item.text"></a> <a role="menuitem" tabindex="-1" href="javascript:void(0)" ng-if="!item.divider && item.click" ng-click="$eval(item.click);$hide()" ng-bind="item.text"></a></li></ul>')}]),angular.module("mgcrea.ngStrap.datepicker").run(["$templateCache",function(e){e.put("datepicker/datepicker.tpl.html",'<div class="dropdown-menu datepicker" ng-class="\'datepicker-mode-\' + $mode" style="max-width: 320px"><table style="table-layout: fixed; height: 100%; width: 100%"><thead><tr class="text-center"><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$selectPane(-1)"><i class="{{$iconLeft}}"></i></button></th><th colspan="{{ rows[0].length - 2 }}"><button tabindex="-1" type="button" class="btn btn-default btn-block text-strong" ng-click="$toggleMode()"><strong style="text-transform: capitalize" ng-bind="title"></strong></button></th><th><button tabindex="-1" type="button" class="btn btn-default pull-right" ng-click="$selectPane(+1)"><i class="{{$iconRight}}"></i></button></th></tr><tr ng-show="showLabels" ng-bind-html="labels"></tr></thead><tbody><tr ng-repeat="(i, row) in rows" height="{{ 100 / rows.length }}%"><td class="text-center" ng-repeat="(j, el) in row"><button tabindex="-1" type="button" class="btn btn-default" style="width: 100%" ng-class="{\'btn-primary\': el.selected, \'btn-info btn-today\': el.isToday && !el.selected}" ng-click="$select(el.date)" ng-disabled="el.disabled"><span ng-class="{\'text-muted\': el.muted}" ng-bind="el.label"></span></button></td></tr></tbody></table></div>')}]),angular.module("mgcrea.ngStrap.modal").run(["$templateCache",function(e){e.put("modal/modal.tpl.html",'<div class="modal" tabindex="-1" role="dialog"><div class="modal-dialog"><div class="modal-content"><div class="modal-header" ng-show="title"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" ng-bind="title"></h4></div><div class="modal-body" ng-bind="content"></div><div class="modal-footer"><button type="button" class="btn btn-default" ng-click="$hide()">Close</button></div></div></div></div>')}]),angular.module("mgcrea.ngStrap.popover").run(["$templateCache",function(e){e.put("popover/popover.tpl.html",'<div class="popover"><div class="arrow"></div><h3 class="popover-title" ng-bind="title" ng-show="title"></h3><div class="popover-content" ng-bind="content"></div></div>')}]),angular.module("mgcrea.ngStrap.select").run(["$templateCache",function(e){e.put("select/select.tpl.html",'<ul tabindex="-1" class="select dropdown-menu" ng-show="$isVisible()" role="select"><li ng-if="$showAllNoneButtons"><div class="btn-group" style="margin-bottom: 5px; margin-left: 5px"><button class="btn btn-default btn-xs" ng-click="$selectAll()">All</button> <button class="btn btn-default btn-xs" ng-click="$selectNone()">None</button></div></li><li role="presentation" ng-repeat="match in $matches" ng-class="{active: $isActive($index)}"><a style="cursor: default" role="menuitem" tabindex="-1" ng-click="$select($index, $event)"><span ng-bind="match.label"></span> <i class="{{$iconCheckmark}} pull-right" ng-if="$isMultiple && $isActive($index)"></i></a></li></ul>')}]),angular.module("mgcrea.ngStrap.tab").run(["$templateCache",function(e){e.put("tab/tab.tpl.html",'<ul class="nav" ng-class="$navClass" role="tablist"><li ng-repeat="$pane in $panes" ng-class="$index == $panes.$active ? $activeClass : \'\'"><a role="tab" data-toggle="tab" ng-click="$setActive($index)" data-index="{{ $index }}" ng-bind-html="$pane.title"></a></li></ul><div ng-transclude class="tab-content"></div>')}]),angular.module("mgcrea.ngStrap.timepicker").run(["$templateCache",function(e){e.put("timepicker/timepicker.tpl.html",'<div class="dropdown-menu timepicker" style="min-width: 0px;width: auto"><table height="100%"><thead><tr class="text-center"><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(-1, 0)"><i class="{{ $iconUp }}"></i></button></th><th>&nbsp;</th><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(-1, 1)"><i class="{{ $iconUp }}"></i></button></th></tr></thead><tbody><tr ng-repeat="(i, row) in rows"><td class="text-center"><button tabindex="-1" style="width: 100%" type="button" class="btn btn-default" ng-class="{\'btn-primary\': row[0].selected}" ng-click="$select(row[0].date, 0)" ng-disabled="row[0].disabled"><span ng-class="{\'text-muted\': row[0].muted}" ng-bind="row[0].label"></span></button></td><td><span ng-bind="i == midIndex ? timeSeparator : \' \'"></span></td><td class="text-center"><button tabindex="-1" ng-if="row[1].date" style="width: 100%" type="button" class="btn btn-default" ng-class="{\'btn-primary\': row[1].selected}" ng-click="$select(row[1].date, 1)" ng-disabled="row[1].disabled"><span ng-class="{\'text-muted\': row[1].muted}" ng-bind="row[1].label"></span></button></td><td ng-if="showAM">&nbsp;</td><td ng-if="showAM"><button tabindex="-1" ng-show="i == midIndex - !isAM * 1" style="width: 100%" type="button" ng-class="{\'btn-primary\': !!isAM}" class="btn btn-default" ng-click="$switchMeridian()" ng-disabled="el.disabled">AM</button> <button tabindex="-1" ng-show="i == midIndex + 1 - !isAM * 1" style="width: 100%" type="button" ng-class="{\'btn-primary\': !isAM}" class="btn btn-default" ng-click="$switchMeridian()" ng-disabled="el.disabled">PM</button></td></tr></tbody><tfoot><tr class="text-center"><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(1, 0)"><i class="{{ $iconDown }}"></i></button></th><th>&nbsp;</th><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(1, 1)"><i class="{{ $iconDown }}"></i></button></th></tr></tfoot></table></div>')}]),angular.module("mgcrea.ngStrap.tooltip").run(["$templateCache",function(e){e.put("tooltip/tooltip.tpl.html",'<div class="tooltip in" ng-show="title"><div class="tooltip-arrow"></div><div class="tooltip-inner" ng-bind="title"></div></div>')}]),angular.module("mgcrea.ngStrap.typeahead").run(["$templateCache",function(e){e.put("typeahead/typeahead.tpl.html",'<ul tabindex="-1" class="typeahead dropdown-menu" ng-show="$isVisible()" role="select"><li role="presentation" ng-repeat="match in $matches" ng-class="{active: $index == $activeIndex}"><a role="menuitem" tabindex="-1" ng-click="$select($index, $event)" ng-bind="match.label"></a></li></ul>')}])}(window,document),function(){"use strict";angular.module("toaster",["ngAnimate"]).constant("toasterConfig",{limit:0,"tap-to-dismiss":!0,"close-button":!1,"newest-on-top":!0,"time-out":5e3,"icon-classes":{error:"toast-error",info:"toast-info",wait:"toast-wait",success:"toast-success",warning:"toast-warning"},"body-output-type":"","body-template":"toasterBodyTmpl.html","icon-class":"toast-info","position-class":"toast-top-right","title-class":"toast-title","message-class":"toast-message","prevent-duplicates":!1,"mouseover-timer-stop":!0}).service("toaster",["$rootScope","toasterConfig",function(e,t){this.pop=function(t,n,i,r,o,a,s,l){if(angular.isObject(t)){var c=t;this.toast={type:c.type,title:c.title,body:c.body,timeout:c.timeout,bodyOutputType:c.bodyOutputType,clickHandler:c.clickHandler,showCloseButton:c.showCloseButton},s=c.toasterId}else this.toast={type:t,title:n,body:i,timeout:r,bodyOutputType:o,clickHandler:a,showCloseButton:l};e.$emit("toaster-newToast",s)},this.clear=function(){e.$emit("toaster-clearToasts")};for(var n in t["icon-classes"])this[n]=function(e){return function(t,n,i,r,o,a,s){angular.isString(t)?this.pop(e,t,n,i,r,o,a,s):this.pop(angular.extend(t,{type:e}))}}(n)}]).factory("toasterEventRegistry",["$rootScope",function(e){var t,n=null,i=null,r=[],o=[];return t={setup:function(){n||(n=e.$on("toaster-newToast",function(e,t){for(var n=0,i=r.length;n<i;n++)r[n](e,t)})),i||(i=e.$on("toaster-clearToasts",function(e){for(var t=0,n=o.length;t<n;t++)o[t](e)}))},subscribeToNewToastEvent:function(e){r.push(e)},subscribeToClearToastsEvent:function(e){o.push(e)},unsubscribeToNewToastEvent:function(e){var t=r.indexOf(e);t>=0&&r.splice(t,1),0===r.length&&(n(),n=null)},unsubscribeToClearToastsEvent:function(e){var t=o.indexOf(e);t>=0&&o.splice(t,1),0===o.length&&(i(),i=null)}},{setup:t.setup,subscribeToNewToastEvent:t.subscribeToNewToastEvent,subscribeToClearToastsEvent:t.subscribeToClearToastsEvent,unsubscribeToNewToastEvent:t.unsubscribeToNewToastEvent,unsubscribeToClearToastsEvent:t.unsubscribeToClearToastsEvent}}]).directive("toasterContainer",["$parse","$rootScope","$interval","$sce","toasterConfig","toaster","toasterEventRegistry",function(e,t,n,i,r,o,a){return{replace:!0,restrict:"EA",scope:!0,link:function(t,s,l){function c(e,i){e.timeoutPromise=n(function(){t.removeToast(e.id)},i,1)}function u(n){if(n.type=h["icon-classes"][n.type],n.type||(n.type=h["icon-class"]),!(!0===h["prevent-duplicates"]&&t.toasters.length>0&&t.toasters[t.toasters.length-1].body===n.body)){n.id=++p;var r=h["close-button"];if("boolean"==typeof n.showCloseButton);else if("boolean"==typeof r)n.showCloseButton=r;else if("object"==typeof r){var o=r[n.type];void 0!==o&&null!==o&&(n.showCloseButton=o)}else n.showCloseButton=!1;switch(n.bodyOutputType=n.bodyOutputType||h["body-output-type"],n.bodyOutputType){case"trustedHtml":n.html=i.trustAsHtml(n.body);break;case"template":n.bodyTemplate=n.body||h["body-template"];break;case"templateWithData":var a=e(n.body||h["body-template"]),s=a(t);n.bodyTemplate=s.template,n.data=s.data}t.configureTimer(n),!0===h["newest-on-top"]?(t.toasters.unshift(n),h.limit>0&&t.toasters.length>h.limit&&t.toasters.pop()):(t.toasters.push(n),h.limit>0&&t.toasters.length>h.limit&&t.toasters.shift())}}function d(e){var i=t.toasters[e];i&&(i.timeoutPromise&&n.cancel(i.timeoutPromise),t.toasters.splice(e,1))}function f(){for(var e=t.toasters.length;e>=0;e--)d(e)}var h,p=0;h=angular.extend({},r,t.$eval(l.toasterOptions)),t.config={toasterId:h["toaster-id"],position:h["position-class"],title:h["title-class"],message:h["message-class"],tap:h["tap-to-dismiss"],closeButton:h["close-button"],animation:h["animation-class"],mouseoverTimer:h["mouseover-timer-stop"]},t.$on("$destroy",function(){a.unsubscribeToNewToastEvent(t._onNewToast),a.unsubscribeToClearToastsEvent(t._onClearToasts)}),t.configureTimer=function(e){var t=angular.isNumber(e.timeout)?e.timeout:h["time-out"];t>0&&c(e,t)},t.removeToast=function(e){var n,i;for(n=0,i=t.toasters.length;n<i;n++)if(t.toasters[n].id===e){d(n);break}},t.toasters=[],t._onNewToast=function(e,n){(void 0===t.config.toasterId&&void 0===n||void 0!==n&&n===t.config.toasterId)&&u(o.toast)},t._onClearToasts=function(e){f()},a.setup(),a.subscribeToNewToastEvent(t._onNewToast),a.subscribeToClearToastsEvent(t._onClearToasts)},controller:["$scope","$element","$attrs",function(e,t,i){e.stopTimer=function(t){!0===e.config.mouseoverTimer&&t.timeoutPromise&&(n.cancel(t.timeoutPromise),t.timeoutPromise=null)},e.restartTimer=function(t){!0===e.config.mouseoverTimer?t.timeoutPromise||e.configureTimer(t):null===t.timeoutPromise&&e.removeToast(t.id)},e.click=function(t){if(!0===e.config.tap||!0===t.showCloseButton){var n=!0;t.clickHandler&&(angular.isFunction(t.clickHandler)?n=t.clickHandler(t,t.showCloseButton):angular.isFunction(e.$parent.$eval(t.clickHandler))?n=e.$parent.$eval(t.clickHandler)(t,t.showCloseButton):console.log("TOAST-NOTE: Your click handler is not inside a parent scope of toaster-container.")),n&&e.removeToast(t.id)}}}],template:'<div id="toast-container" ng-class="[config.position, config.animation]"><div ng-repeat="toaster in toasters" class="toast" ng-class="toaster.type" ng-click="click(toaster)" ng-mouseover="stopTimer(toaster)" ng-mouseout="restartTimer(toaster)"><button type="button" class="toast-close-button" ng-show="toaster.showCloseButton" ng-click="click(toaster)">&times;</button><div ng-class="config.title">{{toaster.title}}</div><div ng-class="config.message" ng-switch on="toaster.bodyOutputType"><div ng-switch-when="trustedHtml" ng-bind-html="toaster.html"></div><div ng-switch-when="template"><div ng-include="toaster.bodyTemplate"></div></div><div ng-switch-when="templateWithData"><div ng-include="toaster.bodyTemplate"></div></div><div ng-switch-default >{{toaster.body}}</div></div></div></div>'}}])}(window,document),function(e,t){"use strict";if("function"!=typeof define||!define.amd)return t(e);define(["angular"],function(e){return t(e)})}(window.angular||null,function(e){"use strict";var t=e.module("ngTable",[]);return t.value("ngTableDefaults",{params:{},settings:{}}),t.factory("NgTableParams",["$q","$log","ngTableDefaults",function(t,n,i){var r=function(e){return!isNaN(parseFloat(e))&&isFinite(e)};return function(o,a){var s=this,l=function(){u.debugMode&&n.debug&&n.debug.apply(this,arguments)};this.data=[],this.parameters=function(t,n){if(n=n||!1,e.isDefined(t)){for(var i in t){var o=t[i];if(n&&i.indexOf("[")>=0){for(var a=i.split(/\[(.*)\]/).reverse(),s="",u=0,d=a.length;u<d;u++){var f=a[u];if(""!==f){var h=o;o={},o[s=f]=r(h)?parseFloat(h):h}}"sorting"===s&&(c[s]={}),c[s]=e.extend(c[s]||{},o[s])}else c[i]=r(t[i])?parseFloat(t[i]):t[i]}return l("ngTable: set parameters",c),this}return c},this.settings=function(t){return e.isDefined(t)?(e.isArray(t.data)&&(t.total=t.data.length),u=e.extend(u,t),l("ngTable: set settings",u),this):u},this.page=function(t){return e.isDefined(t)?this.parameters({page:t}):c.page},this.total=function(t){return e.isDefined(t)?this.settings({total:t}):u.total},this.count=function(t){return e.isDefined(t)?this.parameters({count:t,page:1}):c.count},this.filter=function(t){return e.isDefined(t)?this.parameters({filter:t,page:1}):c.filter},this.sorting=function(t){if(2==arguments.length){var n={};return n[t]=arguments[1],this.parameters({sorting:n}),this}return e.isDefined(t)?this.parameters({sorting:t}):c.sorting},this.isSortBy=function(t,n){return e.isDefined(c.sorting[t])&&e.equals(c.sorting[t],n)},this.orderBy=function(){var e=[];for(var t in c.sorting)e.push(("asc"===c.sorting[t]?"+":"-")+t);return e},this.getData=function(t,n){return e.isArray(this.data)&&e.isObject(n)?t.resolve(this.data.slice((n.page()-1)*n.count(),n.page()*n.count())):t.resolve([]),t.promise},this.getGroups=function(n,i){var r=t.defer();return r.promise.then(function(t){var r={};e.forEach(t,function(t){var n=e.isFunction(i)?i(t):t[i];r[n]=r[n]||{data:[]},r[n].value=n,r[n].data.push(t)});var o=[];for(var a in r)o.push(r[a]);l("ngTable: refresh groups",o),n.resolve(o)}),this.getData(r,s)},this.generatePagesArray=function(e,t,n){var i,r,o,a,s,l;if(i=11,l=[],(s=Math.ceil(t/n))>1){l.push({type:"prev",number:Math.max(1,e-1),active:e>1}),l.push({type:"first",number:1,active:e>1,current:1===e}),o=Math.round((i-5)/2),a=Math.max(2,e-o),r=Math.min(s-1,e+2*o-(e-a)),a=Math.max(2,a-(2*o-(r-a)));for(var c=a;c<=r;)c===a&&2!==c||c===r&&c!==s-1?l.push({type:"more",active:!1}):l.push({type:"page",number:c,active:e!==c,current:e===c}),c++;l.push({type:"last",number:s,active:e!==s,current:e===s}),l.push({type:"next",number:Math.min(s,e+1),active:e<s})}return l},this.url=function(t){t=t||!1;var n=t?[]:{};for(var i in c)if(c.hasOwnProperty(i)){var r=c[i],o=encodeURIComponent(i);if("object"==typeof r){for(var a in r)if(!e.isUndefined(r[a])&&""!==r[a]){var s=o+"["+encodeURIComponent(a)+"]";t?n.push(s+"="+r[a]):n[s]=r[a]}}else e.isFunction(r)||e.isUndefined(r)||""===r||(t?n.push(o+"="+encodeURIComponent(r)):n[o]=encodeURIComponent(r))}return n},this.reload=function(){var e=t.defer(),n=this,i=null;if(u.$scope)return u.$loading=!0,i=u.groupBy?u.getGroups(e,u.groupBy,this):u.getData(e,this),l("ngTable: reload data"),i||(i=e.promise),i.then(function(e){return u.$loading=!1,l("ngTable: current scope",u.$scope),u.groupBy?(n.data=e,u.$scope&&(u.$scope.$groups=e)):(n.data=e,u.$scope&&(u.$scope.$data=e)),u.$scope&&(u.$scope.pages=n.generatePagesArray(n.page(),n.total(),n.count())),u.$scope.$emit("ngTableAfterReloadData"),e})},this.reloadPages=function(){var e=this;u.$scope.pages=e.generatePagesArray(e.page(),e.total(),e.count())};var c=this.$params={page:1,count:1,filter:{},sorting:{},group:{},groupBy:null};e.extend(c,i.params);var u={$scope:null,$loading:!1,data:null,total:0,defaultSort:"desc",filterDelay:750,counts:[10,25,50,100],sortingIndicator:"span",getGroups:this.getGroups,getData:this.getData};return e.extend(u,i.settings),this.settings(a),this.parameters(o,!0),this}}]),t.factory("ngTableParams",["NgTableParams",function(e){return e}]),t.controller("ngTableController",["$scope","NgTableParams","$timeout","$parse","$compile","$attrs","$element","ngTableColumn",function(t,n,i,r,o,a,s,l){function c(){t.params.$params.page=1}var u=!0;t.$filterRow={},t.$loading=!1,t.hasOwnProperty("params")||(t.params=new n,t.params.isNullInstance=!0),t.params.settings().$scope=t;var d=function(){var e=0;return function(t,n){i.cancel(e),e=i(t,n)}}();t.$watch("params.$params",function(n,i){if(n!==i){if(t.params.settings().$scope=t,e.equals(n.filter,i.filter))t.params.reload();else{var r=u?e.noop:c;d(function(){r(),t.params.reload()},t.params.settings().filterDelay)}t.params.isNullInstance||(u=!1)}},!0),this.compileDirectiveTemplates=function(){if(!s.hasClass("ng-table")){t.templates={header:a.templateHeader?a.templateHeader:"ng-table/header.html",pagination:a.templatePagination?a.templatePagination:"ng-table/pager.html"},s.addClass("ng-table");var n=null;0===s.find("> thead").length&&(n=e.element(document.createElement("thead")).attr("ng-include","templates.header"),s.prepend(n));var i=e.element(document.createElement("div")).attr({"ng-table-pagination":"params","template-url":"templates.pagination"});s.after(i),n&&o(n)(t),o(i)(t)}},this.loadFilterData=function(n){e.forEach(n,function(n){var i;return i=n.filterData(t,{$column:n}),i?e.isObject(i)&&e.isObject(i.promise)?(delete n.filterData,i.promise.then(function(t){e.isArray(t)||e.isFunction(t)||e.isObject(t)?e.isArray(t)&&t.unshift({title:"-",id:""}):t=[],n.data=t})):n.data=i:void delete n.filterData})},this.buildColumns=function(e){return e.map(function(e){return l.buildColumn(e,t)})},this.setupBindingsToInternalScope=function(n){var i=r(n);t.$watch(i,function(n){e.isUndefined(n)||(t.paramsModel=i,t.params=n)},!1),a.showFilter&&t.$parent.$watch(a.showFilter,function(e){t.show_filter=e}),a.disableFilter&&t.$parent.$watch(a.disableFilter,function(e){t.$filterRow.disabled=e})},t.sortBy=function(e,n){var i=e.sortable&&e.sortable();if(i){var r=t.params.settings().defaultSort,o="asc"===r?"desc":"asc",a=t.params.sorting()&&t.params.sorting()[i]&&t.params.sorting()[i]===r,s=n.ctrlKey||n.metaKey?t.params.sorting():{};s[i]=a?o:r,t.params.parameters({sorting:s})}}}]),t.factory("ngTableColumn",[function(){function t(t,i){var r=Object.create(t);for(var o in n)void 0===r[o]&&(r[o]=n[o]),e.isFunction(r[o])||function(e){r[e]=function(){return t[e]}}(o),function(e){var n=r[e];r[e]=function(){return 0===arguments.length?n.call(t,i):n.apply(t,arguments)}}(o);return r}var n={class:function(){return""},filter:function(){return!1},filterData:e.noop,headerTemplateURL:function(){return!1},headerTitle:function(){return""},sortable:function(){return!1},show:function(){return!0},title:function(){return""},titleAlt:function(){return""}};return{buildColumn:t}}]),t.directive("ngTable",["$q","$parse",function(t,n){return{restrict:"A",priority:1001,scope:!0,controller:"ngTableController",compile:function(t){var i=[],r=0,o=null;if(e.forEach(e.element(t.find("tr")),function(t){t=e.element(t),t.hasClass("ng-table-group")||o||(o=t)}),o)return e.forEach(o.find("td"),function(t){var o=e.element(t);if(!o.attr("ignore-cell")||"true"!==o.attr("ignore-cell")){var a=function(e){return o.attr("x-data-"+e)||o.attr("data-"+e)||o.attr(e)},s=function(t){var r=a(t);if(r)return function(t,o){return n(r)(t,e.extend(o||{},{$columns:i}))}},l=a("title-alt")||a("title");l&&o.attr("data-title-text","{{"+l+"}}"),i.push({id:r++,title:s("title"),titleAlt:s("title-alt"),headerTitle:s("header-title"),sortable:s("sortable"),class:s("header-class"),filter:s("filter"),headerTemplateURL:s("header"),filterData:s("filter-data"),show:o.attr("ng-show")?function(e){return n(o.attr("ng-show"))(e)}:void 0})}}),function(e,t,n,r){e.$columns=i=r.buildColumns(i),r.setupBindingsToInternalScope(n.ngTable),r.loadFilterData(i),r.compileDirectiveTemplates()}}}}]),t.directive("ngTableDynamic",["$parse",function(t){function n(e){if(!e||e.indexOf(" with ")>-1){var t=e.split(/\s+with\s+/);return{tableParams:t[0],columns:t[1]}}throw new Error("Parse error (expected example: ng-table-dynamic='tableParams with cols')")}return{restrict:"A",priority:1001,scope:!0,controller:"ngTableController",compile:function(i){var r;if(e.forEach(e.element(i.find("tr")),function(t){t=e.element(t),t.hasClass("ng-table-group")||r||(r=t)}),r)return e.forEach(r.find("td"),function(t){var n=e.element(t);(function(e){return n.attr("x-data-"+e)||n.attr("data-"+e)||n.attr(e)})("title")||n.attr("data-title-text","{{$columns[$index].titleAlt(this) || $columns[$index].title(this)}}"),n.attr("ng-show")||n.attr("ng-show","$columns[$index].show(this)")}),function(e,i,r,o){var a=n(r.ngTableDynamic),s=t(a.columns)(e)||[];e.$columns=o.buildColumns(s),o.setupBindingsToInternalScope(a.tableParams),o.loadFilterData(e.$columns),o.compileDirectiveTemplates()}}}}]),t.directive("ngTablePagination",["$compile",function(t){return{restrict:"A",scope:{params:"=ngTablePagination",templateUrl:"="},replace:!1,link:function(n,i,r){n.params.settings().$scope.$on("ngTableAfterReloadData",function(){n.pages=n.params.generatePagesArray(n.params.page(),n.params.total(),n.params.count())},!0),n.$watch("templateUrl",function(r){if(!e.isUndefined(r)){var o=e.element(document.createElement("div"));o.attr({"ng-include":"templateUrl"}),i.append(o),t(o)(n)}})}}}]),e.module("ngTable").run(["$templateCache",function(e){e.put("ng-table/filters/select-multiple.html",'<select ng-options="data.id as data.title for data in $column.data" ng-disabled="$filterRow.disabled" multiple ng-multiple="true" ng-model="params.filter()[name]" ng-show="filter==\'select-multiple\'" class="filter filter-select-multiple form-control" name="{{name}}"> </select>'),e.put("ng-table/filters/select.html",'<select ng-options="data.id as data.title for data in $column.data" ng-disabled="$filterRow.disabled" ng-model="params.filter()[name]" ng-show="filter==\'select\'" class="filter filter-select form-control" name="{{name}}"> </select>'),e.put("ng-table/filters/text.html",'<input type="text" name="{{name}}" ng-disabled="$filterRow.disabled" ng-model="params.filter()[name]" ng-if="filter==\'text\'" class="input-filter form-control"/>'),e.put("ng-table/header.html",'<tr> <th title="{{$column.headerTitle(this)}}" ng-repeat="$column in $columns" ng-class="{ \'sortable\': $column.sortable(this), \'sort-asc\': params.sorting()[$column.sortable(this)]==\'asc\', \'sort-desc\': params.sorting()[$column.sortable(this)]==\'desc\' }" ng-click="sortBy($column, $event)" ng-show="$column.show(this)" ng-init="template=$column.headerTemplateURL(this)" class="header {{$column.class(this)}}"> <div ng-if="!template" ng-show="!template" class="ng-table-header" ng-class="{\'sort-indicator\': params.settings().sortingIndicator==\'div\'}"> <span ng-bind="$column.title(this)" ng-class="{\'sort-indicator\': params.settings().sortingIndicator==\'span\'}"></span> </div> <div ng-if="template" ng-show="template" ng-include="template"></div> </th> </tr> <tr ng-show="show_filter" class="ng-table-filters"> <th data-title-text="{{$column.titleAlt(this) || $column.title(this)}}" ng-repeat="$column in $columns" ng-show="$column.show(this)" class="filter"> <div ng-repeat="(name, filter) in $column.filter(this)"> <div ng-if="filter.indexOf(\'/\') !==-1" ng-include="filter"></div> <div ng-if="filter.indexOf(\'/\')===-1" ng-include="\'ng-table/filters/\' + filter + \'.html\'"></div> </div> </th> </tr> '),e.put("ng-table/pager.html",'<div class="ng-cloak ng-table-pager" ng-if="params.data.length"> <div ng-if="params.settings().counts.length" class="ng-table-counts btn-group pull-right"> <button ng-repeat="count in params.settings().counts" type="button" ng-class="{\'active\':params.count()==count}" ng-click="params.count(count)" class="btn btn-default"> <span ng-bind="count"></span> </button> </div> <ul class="pagination ng-table-pagination"> <li ng-class="{\'disabled\': !page.active && !page.current, \'active\': page.current}" ng-repeat="page in pages" ng-switch="page.type"> <a ng-switch-when="prev" ng-click="params.page(page.number)" href="">&laquo;</a> <a ng-switch-when="first" ng-click="params.page(page.number)" href=""><span ng-bind="page.number"></span></a> <a ng-switch-when="page" ng-click="params.page(page.number)" href=""><span ng-bind="page.number"></span></a> <a ng-switch-when="more" ng-click="params.page(page.number)" href="">&#8230;</a> <a ng-switch-when="last" ng-click="params.page(page.number)" href=""><span ng-bind="page.number"></span></a> <a ng-switch-when="next" ng-click="params.page(page.number)" href="">&raquo;</a> </li> </ul> </div> ')}]),t}),function(e){void 0===e.fn.each2&&e.extend(e.fn,{each2:function(t){for(var n=e([0]),i=-1,r=this.length;++i<r&&(n.context=n[0]=this[i])&&!1!==t.call(n[0],i,n););return this}})}(jQuery),function(e,t){"use strict";function n(t){var n=e(document.createTextNode(""));t.before(n),n.before(t),n.remove()}function i(e){function t(e){return H[e]||e}return e.replace(/[^\u0000-\u007E]/g,t)}function r(e,t){for(var n=0,i=t.length;n<i;n+=1)if(a(e,t[n]))return n;return-1}function o(){var t=e(V);t.appendTo("body");var n={width:t.width()-t[0].clientWidth,height:t.height()-t[0].clientHeight};return t.remove(),n}function a(e,n){return e===n||e!==t&&n!==t&&(null!==e&&null!==n&&(e.constructor===String?e+""==n+"":n.constructor===String&&n+""==e+""))}function s(t,n){var i,r,o;if(null===t||t.length<1)return[];for(i=t.split(n),r=0,o=i.length;r<o;r+=1)i[r]=e.trim(i[r]);return i}function l(e){return e.outerWidth(!1)-e.width()}function c(n){var i="keyup-change-value";n.on("keydown",function(){e.data(n,i)===t&&e.data(n,i,n.val())}),n.on("keyup",function(){var r=e.data(n,i);r!==t&&n.val()!==r&&(e.removeData(n,i),n.trigger("keyup-change"))})}function u(n){n.on("mousemove",function(n){var i=R;i!==t&&i.x===n.pageX&&i.y===n.pageY||e(n.target).trigger("mousemove-filtered",n)})}function d(e,n,i){i=i||t;var r;return function(){var t=arguments;window.clearTimeout(r),r=window.setTimeout(function(){n.apply(i,t)},e)}}function f(e,t){var n=d(e,function(e){t.trigger("scroll-debounced",e)});t.on("scroll",function(e){r(e.target,t.get())>=0&&n(e)})}function h(e){e[0]!==document.activeElement&&window.setTimeout(function(){var t,n=e[0],i=e.val().length;e.focus(),(n.offsetWidth>0||n.offsetHeight>0)&&n===document.activeElement&&(n.setSelectionRange?n.setSelectionRange(i,i):n.createTextRange&&(t=n.createTextRange(),t.collapse(!1),t.select()))},0)}function p(t){t=e(t)[0];var n=0,i=0;if("selectionStart"in t)n=t.selectionStart,i=t.selectionEnd-n;else if("selection"in document){t.focus();var r=document.selection.createRange();i=document.selection.createRange().text.length,r.moveStart("character",-t.value.length),n=r.text.length-i}return{offset:n,length:i}}function g(e){e.preventDefault(),e.stopPropagation()}function m(e){e.preventDefault(),
-e.stopImmediatePropagation()}function v(t){if(!j){var n=t[0].currentStyle||window.getComputedStyle(t[0],null);j=e(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:n.fontSize,fontFamily:n.fontFamily,fontStyle:n.fontStyle,fontWeight:n.fontWeight,letterSpacing:n.letterSpacing,textTransform:n.textTransform,whiteSpace:"nowrap"}),j.attr("class","select2-sizer"),e("body").append(j)}return j.text(t.val()),j.width()}function $(t,n,i){var r,o,a=[];r=e.trim(t.attr("class")),r&&(r=""+r,e(r.split(/\s+/)).each2(function(){0===this.indexOf("select2-")&&a.push(this)})),r=e.trim(n.attr("class")),r&&(r=""+r,e(r.split(/\s+/)).each2(function(){0!==this.indexOf("select2-")&&(o=i(this))&&a.push(o)})),t.attr("class",a.join(" "))}function y(e,t,n,r){var o=i(e.toUpperCase()).indexOf(i(t.toUpperCase())),a=t.length;if(o<0)return void n.push(r(e));n.push(r(e.substring(0,o))),n.push("<span class='select2-match'>"),n.push(r(e.substring(o,o+a))),n.push("</span>"),n.push(r(e.substring(o+a,e.length)))}function b(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})}function w(n){var i,r=null,o=n.quietMillis||100,a=n.url,s=this;return function(l){window.clearTimeout(i),i=window.setTimeout(function(){var i=n.data,o=a,c=n.transport||e.fn.select2.ajaxDefaults.transport,u={type:n.type||"GET",cache:n.cache||!1,jsonpCallback:n.jsonpCallback||t,dataType:n.dataType||"json"},d=e.extend({},e.fn.select2.ajaxDefaults.params,u);i=i?i.call(s,l.term,l.page,l.context):null,o="function"==typeof o?o.call(s,l.term,l.page,l.context):o,r&&"function"==typeof r.abort&&r.abort(),n.params&&(e.isFunction(n.params)?e.extend(d,n.params.call(s)):e.extend(d,n.params)),e.extend(d,{url:o,dataType:n.dataType,data:i,success:function(e){var t=n.results(e,l.page,l);l.callback(t)},error:function(e,t,n){var i={hasError:!0,jqXHR:e,textStatus:t,errorThrown:n};l.callback(i)}}),r=c.call(s,d)},o)}}function x(t){var n,i,r=t,o=function(e){return""+e.text};e.isArray(r)&&(i=r,r={results:i}),!1===e.isFunction(r)&&(i=r,r=function(){return i});var a=r();return a.text&&(o=a.text,e.isFunction(o)||(n=a.text,o=function(e){return e[n]})),function(t){var n,i=t.term,a={results:[]};if(""===i)return void t.callback(r());n=function(r,a){var s,l;if(r=r[0],r.children){s={};for(l in r)r.hasOwnProperty(l)&&(s[l]=r[l]);s.children=[],e(r.children).each2(function(e,t){n(t,s.children)}),(s.children.length||t.matcher(i,o(s),r))&&a.push(s)}else t.matcher(i,o(r),r)&&a.push(r)},e(r().results).each2(function(e,t){n(t,a.results)}),t.callback(a)}}function C(n){var i=e.isFunction(n);return function(r){var o=r.term,a={results:[]},s=i?n(r):n;e.isArray(s)&&(e(s).each(function(){var e=this.text!==t,n=e?this.text:this;(""===o||r.matcher(o,n))&&a.results.push(e?this:{id:this,text:this})}),r.callback(a))}}function k(t,n){if(e.isFunction(t))return!0;if(!t)return!1;if("string"==typeof t)return!0;throw new Error(n+" must be a string, function, or falsy value")}function S(t,n){if(e.isFunction(t)){var i=Array.prototype.slice.call(arguments,2);return t.apply(n,i)}return t}function E(t){var n=0;return e.each(t,function(e,t){t.children?n+=E(t.children):n++}),n}function T(e,n,i,r){var o,s,l,c,u,d=e,f=!1;if(!r.createSearchChoice||!r.tokenSeparators||r.tokenSeparators.length<1)return t;for(;;){for(s=-1,l=0,c=r.tokenSeparators.length;l<c&&(u=r.tokenSeparators[l],!((s=e.indexOf(u))>=0));l++);if(s<0)break;if(o=e.substring(0,s),e=e.substring(s+u.length),o.length>0&&(o=r.createSearchChoice.call(this,o,n))!==t&&null!==o&&r.id(o)!==t&&null!==r.id(o)){for(f=!1,l=0,c=n.length;l<c;l++)if(a(r.id(o),r.id(n[l]))){f=!0;break}f||i(o)}}return d!==e?e:void 0}function D(){var t=this;e.each(arguments,function(e,n){t[n].remove(),t[n]=null})}function A(t,n){var i=function(){};return i.prototype=new t,i.prototype.constructor=i,i.prototype.parent=t.prototype,i.prototype=e.extend(i.prototype,n),i}if(window.Select2===t){var M,O,I,P,N,j,F,L,R={x:0,y:0},M={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(e){switch(e=e.which?e.which:e){case M.LEFT:case M.RIGHT:case M.UP:case M.DOWN:return!0}return!1},isControl:function(e){switch(e.which){case M.SHIFT:case M.CTRL:case M.ALT:return!0}return!!e.metaKey},isFunctionKey:function(e){return(e=e.which?e.which:e)>=112&&e<=123}},V="<div class='select2-measure-scrollbar'></div>",H={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};F=e(document),N=function(){var e=1;return function(){return e++}}(),O=A(Object,{bind:function(e){var t=this;return function(){e.apply(t,arguments)}},init:function(n){var i,r;this.opts=n=this.prepareOpts(n),this.id=n.id,n.element.data("select2")!==t&&null!==n.element.data("select2")&&n.element.data("select2").destroy(),this.container=this.createContainer(),this.liveRegion=e("<span>",{role:"status","aria-live":"polite"}).addClass("select2-hidden-accessible").appendTo(document.body),this.containerId="s2id_"+(n.element.attr("id")||"autogen"+N()),this.containerEventName=this.containerId.replace(/([.])/g,"_").replace(/([;&,\-\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.container.attr("title",n.element.attr("title")),this.body=e("body"),$(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.attr("style",n.element.attr("style")),this.container.css(S(n.containerCss,this.opts.element)),this.container.addClass(S(n.containerCssClass,this.opts.element)),this.elementTabIndex=this.opts.element.attr("tabindex"),this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("click.select2",g),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),$(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(S(n.dropdownCssClass,this.opts.element)),this.dropdown.data("select2",this),this.dropdown.on("click",g),this.results=i=this.container.find(".select2-results"),this.search=r=this.container.find("input.select2-input"),this.queryCount=0,this.resultsPage=0,this.context=null,this.initContainer(),this.container.on("click",g),u(this.results),this.dropdown.on("mousemove-filtered",".select2-results",this.bind(this.highlightUnderEvent)),this.dropdown.on("touchstart touchmove touchend",".select2-results",this.bind(function(e){this._touchEvent=!0,this.highlightUnderEvent(e)})),this.dropdown.on("touchmove",".select2-results",this.bind(this.touchMoved)),this.dropdown.on("touchstart touchend",".select2-results",this.bind(this.clearTouchMoved)),this.dropdown.on("click",this.bind(function(e){this._touchEvent&&(this._touchEvent=!1,this.selectHighlighted())})),f(80,this.results),this.dropdown.on("scroll-debounced",".select2-results",this.bind(this.loadMoreIfNeeded)),e(this.container).on("change",".select2-input",function(e){e.stopPropagation()}),e(this.dropdown).on("change",".select2-input",function(e){e.stopPropagation()}),e.fn.mousewheel&&i.mousewheel(function(e,t,n,r){var o=i.scrollTop();r>0&&o-r<=0?(i.scrollTop(0),g(e)):r<0&&i.get(0).scrollHeight-i.scrollTop()+r<=i.height()&&(i.scrollTop(i.get(0).scrollHeight-i.height()),g(e))}),c(r),r.on("keyup-change input paste",this.bind(this.updateResults)),r.on("focus",function(){r.addClass("select2-focused")}),r.on("blur",function(){r.removeClass("select2-focused")}),this.dropdown.on("mouseup",".select2-results",this.bind(function(t){e(t.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(t),this.selectHighlighted(t))})),this.dropdown.on("click mouseup mousedown touchstart touchend focusin",function(e){e.stopPropagation()}),this.nextSearchTerm=t,e.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),null!==n.maximumInputLength&&this.search.attr("maxlength",n.maximumInputLength);var a=n.element.prop("disabled");a===t&&(a=!1),this.enable(!a);var s=n.element.prop("readonly");s===t&&(s=!1),this.readonly(s),L=L||o(),this.autofocus=n.element.prop("autofocus"),n.element.prop("autofocus",!1),this.autofocus&&this.focus(),this.search.attr("placeholder",n.searchInputPlaceholder)},destroy:function(){var e=this.opts.element,n=e.data("select2"),i=this;this.close(),e.length&&e[0].detachEvent&&e.each(function(){this.detachEvent("onpropertychange",i._sync)}),this.propertyObserver&&(this.propertyObserver.disconnect(),this.propertyObserver=null),this._sync=null,n!==t&&(n.container.remove(),n.liveRegion.remove(),n.dropdown.remove(),e.removeClass("select2-offscreen").removeData("select2").off(".select2").prop("autofocus",this.autofocus||!1),this.elementTabIndex?e.attr({tabindex:this.elementTabIndex}):e.removeAttr("tabindex"),e.show()),D.call(this,"container","liveRegion","dropdown","results","search")},optionToData:function(e){return e.is("option")?{id:e.prop("value"),text:e.text(),element:e.get(),css:e.attr("class"),disabled:e.prop("disabled"),locked:a(e.attr("locked"),"locked")||a(e.data("locked"),!0)}:e.is("optgroup")?{text:e.attr("label"),children:[],element:e.get(),css:e.attr("class")}:void 0},prepareOpts:function(n){var i,r,o,l,c=this;if(i=n.element,"select"===i.get(0).tagName.toLowerCase()&&(this.select=r=n.element),r&&e.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in n)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),n=e.extend({},{populateResults:function(i,r,o){var a,s=this.opts.id,l=this.liveRegion;(a=function(i,r,u){var d,f,h,p,g,m,v,$,y,b;i=n.sortResults(i,r,o);var w=[];for(d=0,f=i.length;d<f;d+=1)h=i[d],g=!0===h.disabled,p=!g&&s(h)!==t,m=h.children&&h.children.length>0,v=e("<li></li>"),v.addClass("select2-results-dept-"+u),v.addClass("select2-result"),v.addClass(p?"select2-result-selectable":"select2-result-unselectable"),g&&v.addClass("select2-disabled"),m&&v.addClass("select2-result-with-children"),v.addClass(c.opts.formatResultCssClass(h)),v.attr("role","presentation"),$=e(document.createElement("div")),$.addClass("select2-result-label"),$.attr("id","select2-result-label-"+N()),$.attr("role","option"),b=n.formatResult(h,$,o,c.opts.escapeMarkup),b!==t&&($.html(b),v.append($)),m&&(y=e("<ul></ul>"),y.addClass("select2-result-sub"),a(h.children,y,u+1),v.append(y)),v.data("select2-data",h),w.push(v[0]);r.append(w),l.text(n.formatMatches(i.length))})(r,i,0)}},e.fn.select2.defaults,n),"function"!=typeof n.id&&(o=n.id,n.id=function(e){return e[o]}),e.isArray(n.element.data("select2Tags"))){if("tags"in n)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+n.element.attr("id");n.tags=n.element.data("select2Tags")}if(r?(n.query=this.bind(function(e){var n,r,o,a={results:[],more:!1},s=e.term;o=function(t,n){var i;t.is("option")?e.matcher(s,t.text(),t)&&n.push(c.optionToData(t)):t.is("optgroup")&&(i=c.optionToData(t),t.children().each2(function(e,t){o(t,i.children)}),i.children.length>0&&n.push(i))},n=i.children(),this.getPlaceholder()!==t&&n.length>0&&(r=this.getPlaceholderOption())&&(n=n.not(r)),n.each2(function(e,t){o(t,a.results)}),e.callback(a)}),n.id=function(e){return e.id}):"query"in n||("ajax"in n?(l=n.element.data("ajax-url"),l&&l.length>0&&(n.ajax.url=l),n.query=w.call(n.element,n.ajax)):"data"in n?n.query=x(n.data):"tags"in n&&(n.query=C(n.tags),n.createSearchChoice===t&&(n.createSearchChoice=function(t){return{id:e.trim(t),text:e.trim(t)}}),n.initSelection===t&&(n.initSelection=function(t,i){var r=[];e(s(t.val(),n.separator)).each(function(){var t={id:this,text:this},i=n.tags;e.isFunction(i)&&(i=i()),e(i).each(function(){if(a(this.id,t.id))return t=this,!1}),r.push(t)}),i(r)}))),"function"!=typeof n.query)throw"query function not defined for Select2 "+n.element.attr("id");if("top"===n.createSearchChoicePosition)n.createSearchChoicePosition=function(e,t){e.unshift(t)};else if("bottom"===n.createSearchChoicePosition)n.createSearchChoicePosition=function(e,t){e.push(t)};else if("function"!=typeof n.createSearchChoicePosition)throw"invalid createSearchChoicePosition option must be 'top', 'bottom' or a custom function";return n},monitorSource:function(){var n,i=this.opts.element,r=this;i.on("change.select2",this.bind(function(e){!0!==this.opts.element.data("select2-change-triggered")&&this.initSelection()})),this._sync=this.bind(function(){var e=i.prop("disabled");e===t&&(e=!1),this.enable(!e);var n=i.prop("readonly");n===t&&(n=!1),this.readonly(n),$(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(S(this.opts.containerCssClass,this.opts.element)),$(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(S(this.opts.dropdownCssClass,this.opts.element))}),i.length&&i[0].attachEvent&&i.each(function(){this.attachEvent("onpropertychange",r._sync)}),(n=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver)!==t&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new n(function(t){e.each(t,r._sync)}),this.propertyObserver.observe(i.get(0),{attributes:!0,subtree:!1}))},triggerSelect:function(t){var n=e.Event("select2-selecting",{val:this.id(t),object:t,choice:t});return this.opts.element.trigger(n),!n.isDefaultPrevented()},triggerChange:function(t){t=t||{},t=e.extend({},t,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(t),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},isInterfaceEnabled:function(){return!0===this.enabledInterface},enableInterface:function(){var e=this._enabled&&!this._readonly,t=!e;return e!==this.enabledInterface&&(this.container.toggleClass("select2-container-disabled",t),this.close(),this.enabledInterface=e,!0)},enable:function(e){e===t&&(e=!0),this._enabled!==e&&(this._enabled=e,this.opts.element.prop("disabled",!e),this.enableInterface())},disable:function(){this.enable(!1)},readonly:function(e){e===t&&(e=!1),this._readonly!==e&&(this._readonly=e,this.opts.element.prop("readonly",e),this.enableInterface())},opened:function(){return!!this.container&&this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var t,n,i,r,o,a=this.dropdown,s=this.container.offset(),l=this.container.outerHeight(!1),c=this.container.outerWidth(!1),u=a.outerHeight(!1),d=e(window),f=d.width(),h=d.height(),p=d.scrollLeft()+f,g=d.scrollTop()+h,m=s.top+l,v=s.left,$=m+u<=g,y=s.top-u>=d.scrollTop(),b=a.outerWidth(!1),w=v+b<=p,x=a.hasClass("select2-drop-above");x?(n=!0,!y&&$&&(i=!0,n=!1)):(n=!1,!$&&y&&(i=!0,n=!0)),i&&(a.hide(),s=this.container.offset(),l=this.container.outerHeight(!1),c=this.container.outerWidth(!1),u=a.outerHeight(!1),p=d.scrollLeft()+f,g=d.scrollTop()+h,m=s.top+l,v=s.left,b=a.outerWidth(!1),w=v+b<=p,a.show(),this.focusSearch()),this.opts.dropdownAutoWidth?(o=e(".select2-results",a)[0],a.addClass("select2-drop-auto-width"),a.css("width",""),b=a.outerWidth(!1)+(o.scrollHeight===o.clientHeight?0:L.width),b>c?c=b:b=c,u=a.outerHeight(!1),w=v+b<=p):this.container.removeClass("select2-drop-auto-width"),"static"!==this.body.css("position")&&(t=this.body.offset(),m-=t.top,v-=t.left),w||(v=s.left+this.container.outerWidth(!1)-b),r={left:v,width:c},n?(r.top=s.top-u,r.bottom="auto",this.container.addClass("select2-drop-above"),a.addClass("select2-drop-above")):(r.top=m,r.bottom="auto",this.container.removeClass("select2-drop-above"),a.removeClass("select2-drop-above")),r=e.extend(r,S(this.opts.dropdownCss,this.opts.element)),a.css(r)},shouldOpen:function(){var t;return!this.opened()&&(!1!==this._enabled&&!0!==this._readonly&&(t=e.Event("select2-opening"),this.opts.element.trigger(t),!t.isDefaultPrevented()))},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return!!this.shouldOpen()&&(this.opening(),F.on("mousemove.select2Event",function(e){R.x=e.pageX,R.y=e.pageY}),!0)},opening:function(){var t,i=this.containerEventName,r="scroll."+i,o="resize."+i,a="orientationchange."+i;this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.clearDropdownAlignmentPreference(),this.dropdown[0]!==this.body.children().last()[0]&&this.dropdown.detach().appendTo(this.body),t=e("#select2-drop-mask"),0==t.length&&(t=e(document.createElement("div")),t.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),t.hide(),t.appendTo(this.body),t.on("mousedown touchstart click",function(i){n(t);var r,o=e("#select2-drop");o.length>0&&(r=o.data("select2"),r.opts.selectOnBlur&&r.selectHighlighted({noFocus:!0}),r.close(),i.preventDefault(),i.stopPropagation())})),this.dropdown.prev()[0]!==t[0]&&this.dropdown.before(t),e("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),t.show(),this.positionDropdown(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active");var s=this;this.container.parents().add(window).each(function(){e(this).on(o+" "+r+" "+a,function(e){s.opened()&&s.positionDropdown()})})},close:function(){if(this.opened()){var t=this.containerEventName,n="scroll."+t,i="resize."+t,r="orientationchange."+t;this.container.parents().add(window).each(function(){e(this).off(n).off(i).off(r)}),this.clearDropdownAlignmentPreference(),e("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active"),this.results.empty(),F.off("mousemove.select2Event"),this.clearSearch(),this.search.removeClass("select2-active"),this.opts.element.trigger(e.Event("select2-close"))}},externalSearch:function(e){this.open(),this.search.val(e),this.updateResults(!1)},clearSearch:function(){},getMaximumSelectionSize:function(){return S(this.opts.maximumSelectionSize,this.opts.element)},ensureHighlightVisible:function(){var t,n,i,r,o,a,s,l,c=this.results;if(!((n=this.highlight())<0)){if(0==n)return void c.scrollTop(0);t=this.findHighlightableChoices().find(".select2-result-label"),i=e(t[n]),l=(i.offset()||{}).top||0,r=l+i.outerHeight(!0),n===t.length-1&&(s=c.find("li.select2-more-results"),s.length>0&&(r=s.offset().top+s.outerHeight(!0))),o=c.offset().top+c.outerHeight(!0),r>o&&c.scrollTop(c.scrollTop()+(r-o)),a=l-c.offset().top,a<0&&"none"!=i.css("display")&&c.scrollTop(c.scrollTop()+a)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-disabled):not(.select2-selected)")},moveHighlight:function(t){for(var n=this.findHighlightableChoices(),i=this.highlight();i>-1&&i<n.length;){i+=t;var r=e(n[i]);if(r.hasClass("select2-result-selectable")&&!r.hasClass("select2-disabled")&&!r.hasClass("select2-selected")){this.highlight(i);break}}},highlight:function(t){var n,i,o=this.findHighlightableChoices();if(0===arguments.length)return r(o.filter(".select2-highlighted")[0],o.get());t>=o.length&&(t=o.length-1),t<0&&(t=0),this.removeHighlight(),n=e(o[t]),n.addClass("select2-highlighted"),this.search.attr("aria-activedescendant",n.find(".select2-result-label").attr("id")),this.ensureHighlightVisible(),this.liveRegion.text(n.text()),(i=n.data("select2-data"))&&this.opts.element.trigger({type:"select2-highlight",val:this.id(i),choice:i})},removeHighlight:function(){this.results.find(".select2-highlighted").removeClass("select2-highlighted")},touchMoved:function(){this._touchMoved=!0},clearTouchMoved:function(){this._touchMoved=!1},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(t){var n=e(t.target).closest(".select2-result-selectable");if(n.length>0&&!n.is(".select2-highlighted")){var i=this.findHighlightableChoices();this.highlight(i.index(n))}else 0==n.length&&this.removeHighlight()},loadMoreIfNeeded:function(){var e=this.results,t=e.find("li.select2-more-results"),n=this.resultsPage+1,i=this,r=this.search.val(),o=this.context;0!==t.length&&t.offset().top-e.offset().top-e.height()<=this.opts.loadMorePadding&&(t.addClass("select2-active"),this.opts.query({element:this.opts.element,term:r,page:n,context:o,matcher:this.opts.matcher,callback:this.bind(function(a){i.opened()&&(i.opts.populateResults.call(this,e,a.results,{term:r,page:n,context:o}),i.postprocessResults(a,!1,!1),!0===a.more?(t.detach().appendTo(e).text(S(i.opts.formatLoadMore,i.opts.element,n+1)),window.setTimeout(function(){i.loadMoreIfNeeded()},10)):t.remove(),i.positionDropdown(),i.resultsPage=n,i.context=a.context,this.opts.element.trigger({type:"select2-loaded",items:a}))})}))},tokenize:function(){},updateResults:function(n){function i(){c.removeClass("select2-active"),f.positionDropdown(),u.find(".select2-no-results,.select2-selection-limit,.select2-searching").length?f.liveRegion.text(u.text()):f.liveRegion.text(f.opts.formatMatches(u.find(".select2-result-selectable").length))}function r(e){u.html(e),i()}var o,s,l,c=this.search,u=this.results,d=this.opts,f=this,h=c.val(),p=e.data(this.container,"select2-last-term");if((!0===n||!p||!a(h,p))&&(e.data(this.container,"select2-last-term",h),!0===n||!1!==this.showSearchInput&&this.opened())){l=++this.queryCount;var g=this.getMaximumSelectionSize();if(g>=1&&(o=this.data(),e.isArray(o)&&o.length>=g&&k(d.formatSelectionTooBig,"formatSelectionTooBig")))return void r("<li class='select2-selection-limit'>"+S(d.formatSelectionTooBig,d.element,g)+"</li>");if(c.val().length<d.minimumInputLength)return r(k(d.formatInputTooShort,"formatInputTooShort")?"<li class='select2-no-results'>"+S(d.formatInputTooShort,d.element,c.val(),d.minimumInputLength)+"</li>":""),void(n&&this.showSearch&&this.showSearch(!0));if(d.maximumInputLength&&c.val().length>d.maximumInputLength)return void r(k(d.formatInputTooLong,"formatInputTooLong")?"<li class='select2-no-results'>"+S(d.formatInputTooLong,d.element,c.val(),d.maximumInputLength)+"</li>":"");d.formatSearching&&0===this.findHighlightableChoices().length&&r("<li class='select2-searching'>"+S(d.formatSearching,d.element)+"</li>"),c.addClass("select2-active"),this.removeHighlight(),s=this.tokenize(),s!=t&&null!=s&&c.val(s),this.resultsPage=1,d.query({element:d.element,term:c.val(),page:this.resultsPage,context:null,matcher:d.matcher,callback:this.bind(function(o){var s;if(l==this.queryCount){if(!this.opened())return void this.search.removeClass("select2-active");if(o.hasError!==t&&k(d.formatAjaxError,"formatAjaxError"))return void r("<li class='select2-ajax-error'>"+S(d.formatAjaxError,d.element,o.jqXHR,o.textStatus,o.errorThrown)+"</li>");if(this.context=o.context===t?null:o.context,this.opts.createSearchChoice&&""!==c.val()&&(s=this.opts.createSearchChoice.call(f,c.val(),o.results))!==t&&null!==s&&f.id(s)!==t&&null!==f.id(s)&&0===e(o.results).filter(function(){return a(f.id(this),f.id(s))}).length&&this.opts.createSearchChoicePosition(o.results,s),0===o.results.length&&k(d.formatNoMatches,"formatNoMatches"))return void r("<li class='select2-no-results'>"+S(d.formatNoMatches,d.element,c.val())+"</li>");u.empty(),f.opts.populateResults.call(this,u,o.results,{term:c.val(),page:this.resultsPage,context:null}),!0===o.more&&k(d.formatLoadMore,"formatLoadMore")&&(u.append("<li class='select2-more-results'>"+d.escapeMarkup(S(d.formatLoadMore,d.element,this.resultsPage))+"</li>"),window.setTimeout(function(){f.loadMoreIfNeeded()},10)),this.postprocessResults(o,n),i(),this.opts.element.trigger({type:"select2-loaded",items:o})}})})}},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){h(this.search)},selectHighlighted:function(e){if(this._touchMoved)return void this.clearTouchMoved();var t=this.highlight(),n=this.results.find(".select2-highlighted"),i=n.closest(".select2-result").data("select2-data");i?(this.highlight(t),this.onSelect(i,e)):e&&e.noFocus&&this.close()},getPlaceholder:function(){var e;return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder||((e=this.getPlaceholderOption())!==t?e.text():t)},getPlaceholderOption:function(){if(this.select){var n=this.select.children("option").first();if(this.opts.placeholderOption!==t)return"first"===this.opts.placeholderOption&&n||"function"==typeof this.opts.placeholderOption&&this.opts.placeholderOption(this.select);if(""===e.trim(n.text())&&""===n.val())return n}},initContainerWidth:function(){function n(){var n,i,r,o,a,s;if("off"===this.opts.width)return null;if("element"===this.opts.width)return 0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px";if("copy"===this.opts.width||"resolve"===this.opts.width){if((n=this.opts.element.attr("style"))!==t)for(i=n.split(";"),o=0,a=i.length;o<a;o+=1)if(s=i[o].replace(/\s/g,""),
-null!==(r=s.match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i))&&r.length>=1)return r[1];return"resolve"===this.opts.width?(n=this.opts.element.css("width"),n.indexOf("%")>0?n:0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px"):null}return e.isFunction(this.opts.width)?this.opts.width():this.opts.width}var i=n.call(this);null!==i&&this.container.css("width",i)}}),I=A(O,{createContainer:function(){return e(document.createElement("div")).attr({class:"select2-container"}).html(["<a href='javascript:void(0)' class='select2-choice' tabindex='-1'>"," <span class='select2-chosen'>&#160;</span><abbr class='select2-search-choice-close'></abbr>"," <span class='select2-arrow' role='presentation'><b role='presentation'></b></span>","</a>","<label for='' class='select2-offscreen'></label>","<input class='select2-focusser select2-offscreen' type='text' aria-haspopup='true' role='button' />","<div class='select2-drop select2-display-none'>"," <div class='select2-search'>"," <label for='' class='select2-offscreen'></label>"," <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input' role='combobox' aria-expanded='true'"," aria-autocomplete='list' />"," </div>"," <ul class='select2-results' role='listbox'>"," </ul>","</div>"].join(""))},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var n,i,r;this.opts.minimumResultsForSearch>=0&&this.showSearch(!0),this.parent.opening.apply(this,arguments),!1!==this.showSearchInput&&this.search.val(this.focusser.val()),this.opts.shouldFocusInput(this)&&(this.search.focus(),n=this.search.get(0),n.createTextRange?(i=n.createTextRange(),i.collapse(!1),i.select()):n.setSelectionRange&&(r=this.search.val().length,n.setSelectionRange(r,r))),""===this.search.val()&&this.nextSearchTerm!=t&&(this.search.val(this.nextSearchTerm),this.search.select()),this.focusser.prop("disabled",!0).val(""),this.updateResults(!0),this.opts.element.trigger(e.Event("select2-open"))},close:function(){this.opened()&&(this.parent.close.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus()},destroy:function(){e("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),D.call(this,"selection","focusser")},initContainer:function(){var t,i,r=this.container,o=this.dropdown,a=N();this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0),this.selection=t=r.find(".select2-choice"),this.focusser=r.find(".select2-focusser"),t.find(".select2-chosen").attr("id","select2-chosen-"+a),this.focusser.attr("aria-labelledby","select2-chosen-"+a),this.results.attr("id","select2-results-"+a),this.search.attr("aria-owns","select2-results-"+a),this.focusser.attr("id","s2id_autogen"+a),i=e("label[for='"+this.opts.element.attr("id")+"']"),this.focusser.prev().text(i.text()).attr("for",this.focusser.attr("id"));var s=this.opts.element.attr("title");this.opts.element.attr("title",s||i.text()),this.focusser.attr("tabindex",this.elementTabIndex),this.search.attr("id",this.focusser.attr("id")+"_search"),this.search.prev().text(e("label[for='"+this.focusser.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("keydown",this.bind(function(e){if(this.isInterfaceEnabled()&&229!=e.keyCode){if(e.which===M.PAGE_UP||e.which===M.PAGE_DOWN)return void g(e);switch(e.which){case M.UP:case M.DOWN:return this.moveHighlight(e.which===M.UP?-1:1),void g(e);case M.ENTER:return this.selectHighlighted(),void g(e);case M.TAB:return void this.selectHighlighted({noFocus:!0});case M.ESC:return this.cancel(e),void g(e)}}})),this.search.on("blur",this.bind(function(e){document.activeElement===this.body.get(0)&&window.setTimeout(this.bind(function(){this.opened()&&this.search.focus()}),0)})),this.focusser.on("keydown",this.bind(function(e){if(this.isInterfaceEnabled()&&e.which!==M.TAB&&!M.isControl(e)&&!M.isFunctionKey(e)&&e.which!==M.ESC){if(!1===this.opts.openOnEnter&&e.which===M.ENTER)return void g(e);if(e.which==M.DOWN||e.which==M.UP||e.which==M.ENTER&&this.opts.openOnEnter){if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return;return this.open(),void g(e)}return e.which==M.DELETE||e.which==M.BACKSPACE?(this.opts.allowClear&&this.clear(),void g(e)):void 0}})),c(this.focusser),this.focusser.on("keyup-change input",this.bind(function(e){if(this.opts.minimumResultsForSearch>=0){if(e.stopPropagation(),this.opened())return;this.open()}})),t.on("mousedown touchstart","abbr",this.bind(function(e){this.isInterfaceEnabled()&&(this.clear(),m(e),this.close(),this.selection.focus())})),t.on("mousedown touchstart",this.bind(function(i){n(t),this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.opened()?this.close():this.isInterfaceEnabled()&&this.open(),g(i)})),o.on("mousedown touchstart",this.bind(function(){this.opts.shouldFocusInput(this)&&this.search.focus()})),t.on("focus",this.bind(function(e){g(e)})),this.focusser.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){this.opened()||(this.container.removeClass("select2-container-active"),this.opts.element.trigger(e.Event("select2-blur")))})),this.search.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.setPlaceholder()},clear:function(t){var n=this.selection.data("select2-data");if(n){var i=e.Event("select2-clearing");if(this.opts.element.trigger(i),i.isDefaultPrevented())return;var r=this.getPlaceholderOption();this.opts.element.val(r?r.val():""),this.selection.find(".select2-chosen").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),!1!==t&&(this.opts.element.trigger({type:"select2-removed",val:this.id(n),choice:n}),this.triggerChange({removed:n}))}},initSelection:function(){if(this.isPlaceholderOptionSelected())this.updateSelection(null),this.close(),this.setPlaceholder();else{var e=this;this.opts.initSelection.call(null,this.opts.element,function(n){n!==t&&null!==n&&(e.updateSelection(n),e.close(),e.setPlaceholder(),e.nextSearchTerm=e.opts.nextSearchTerm(n,e.search.val()))})}},isPlaceholderOptionSelected:function(){var e;return this.getPlaceholder()!==t&&((e=this.getPlaceholderOption())!==t&&e.prop("selected")||""===this.opts.element.val()||this.opts.element.val()===t||null===this.opts.element.val())},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments),n=this;return"select"===t.element.get(0).tagName.toLowerCase()?t.initSelection=function(e,t){var i=e.find("option").filter(function(){return this.selected&&!this.disabled});t(n.optionToData(i))}:"data"in t&&(t.initSelection=t.initSelection||function(n,i){var r=n.val(),o=null;t.query({matcher:function(e,n,i){var s=a(r,t.id(i));return s&&(o=i),s},callback:e.isFunction(i)?function(){i(o)}:e.noop})}),t},getPlaceholder:function(){return this.select&&this.getPlaceholderOption()===t?t:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var e=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&e!==t){if(this.select&&this.getPlaceholderOption()===t)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(e)),this.selection.addClass("select2-default"),this.container.removeClass("select2-allowclear")}},postprocessResults:function(e,t,n){var i=0,r=this;if(this.findHighlightableChoices().each2(function(e,t){if(a(r.id(t.data("select2-data")),r.opts.element.val()))return i=e,!1}),!1!==n&&(!0===t&&i>=0?this.highlight(i):this.highlight(0)),!0===t){var o=this.opts.minimumResultsForSearch;o>=0&&this.showSearch(E(e.results)>=o)}},showSearch:function(t){this.showSearchInput!==t&&(this.showSearchInput=t,this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!t),this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!t),e(this.dropdown,this.container).toggleClass("select2-with-searchbox",t))},onSelect:function(e,t){if(this.triggerSelect(e)){var n=this.opts.element.val(),i=this.data();this.opts.element.val(this.id(e)),this.updateSelection(e),this.opts.element.trigger({type:"select2-selected",val:this.id(e),choice:e}),this.nextSearchTerm=this.opts.nextSearchTerm(e,this.search.val()),this.close(),t&&t.noFocus||!this.opts.shouldFocusInput(this)||this.focusser.focus(),a(n,this.id(e))||this.triggerChange({added:e,removed:i})}},updateSelection:function(e){var n,i,r=this.selection.find(".select2-chosen");this.selection.data("select2-data",e),r.empty(),null!==e&&(n=this.opts.formatSelection(e,r,this.opts.escapeMarkup)),n!==t&&r.append(n),i=this.opts.formatSelectionCssClass(e,r),i!==t&&r.addClass(i),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==t&&this.container.addClass("select2-allowclear")},val:function(){var e,n=!1,i=null,r=this,o=this.data();if(0===arguments.length)return this.opts.element.val();if(e=arguments[0],arguments.length>1&&(n=arguments[1]),this.select)this.select.val(e).find("option").filter(function(){return this.selected}).each2(function(e,t){return i=r.optionToData(t),!1}),this.updateSelection(i),this.setPlaceholder(),n&&this.triggerChange({added:i,removed:o});else{if(!e&&0!==e)return void this.clear(n);if(this.opts.initSelection===t)throw new Error("cannot call val() if initSelection() is not defined");this.opts.element.val(e),this.opts.initSelection(this.opts.element,function(e){r.opts.element.val(e?r.id(e):""),r.updateSelection(e),r.setPlaceholder(),n&&r.triggerChange({added:e,removed:o})})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(e){var n,i=!1;if(0===arguments.length)return n=this.selection.data("select2-data"),n==t&&(n=null),n;arguments.length>1&&(i=arguments[1]),e?(n=this.data(),this.opts.element.val(e?this.id(e):""),this.updateSelection(e),i&&this.triggerChange({added:e,removed:n})):this.clear(i)}}),P=A(O,{createContainer:function(){return e(document.createElement("div")).attr({class:"select2-container select2-container-multi"}).html(["<ul class='select2-choices'>"," <li class='select2-search-field'>"," <label for='' class='select2-offscreen'></label>"," <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi select2-display-none'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""))},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments),n=this;return"select"===t.element.get(0).tagName.toLowerCase()?t.initSelection=function(e,t){var i=[];e.find("option").filter(function(){return this.selected&&!this.disabled}).each2(function(e,t){i.push(n.optionToData(t))}),t(i)}:"data"in t&&(t.initSelection=t.initSelection||function(n,i){var r=s(n.val(),t.separator),o=[];t.query({matcher:function(n,i,s){var l=e.grep(r,function(e){return a(e,t.id(s))}).length;return l&&o.push(s),l},callback:e.isFunction(i)?function(){for(var e=[],n=0;n<r.length;n++)for(var s=r[n],l=0;l<o.length;l++){var c=o[l];if(a(s,t.id(c))){e.push(c),o.splice(l,1);break}}i(e)}:e.noop})}),t},selectChoice:function(e){var t=this.container.find(".select2-search-choice-focus");t.length&&e&&e[0]==t[0]||(t.length&&this.opts.element.trigger("choice-deselected",t),t.removeClass("select2-search-choice-focus"),e&&e.length&&(this.close(),e.addClass("select2-search-choice-focus"),this.opts.element.trigger("choice-selected",e)))},destroy:function(){e("label[for='"+this.search.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),D.call(this,"searchContainer","selection")},initContainer:function(){var t,n=".select2-choices";this.searchContainer=this.container.find(".select2-search-field"),this.selection=t=this.container.find(n);var i=this;this.selection.on("click",".select2-search-choice:not(.select2-locked)",function(t){i.search[0].focus(),i.selectChoice(e(this))}),this.search.attr("id","s2id_autogen"+N()),this.search.prev().text(e("label[for='"+this.opts.element.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("input paste",this.bind(function(){this.search.attr("placeholder")&&0==this.search.val().length||this.isInterfaceEnabled()&&(this.opened()||this.open())})),this.search.attr("tabindex",this.elementTabIndex),this.keydowns=0,this.search.on("keydown",this.bind(function(e){if(this.isInterfaceEnabled()){++this.keydowns;var n=t.find(".select2-search-choice-focus"),i=n.prev(".select2-search-choice:not(.select2-locked)"),r=n.next(".select2-search-choice:not(.select2-locked)"),o=p(this.search);if(n.length&&(e.which==M.LEFT||e.which==M.RIGHT||e.which==M.BACKSPACE||e.which==M.DELETE||e.which==M.ENTER)){var a=n;return e.which==M.LEFT&&i.length?a=i:e.which==M.RIGHT?a=r.length?r:null:e.which===M.BACKSPACE?this.unselect(n.first())&&(this.search.width(10),a=i.length?i:r):e.which==M.DELETE?this.unselect(n.first())&&(this.search.width(10),a=r.length?r:null):e.which==M.ENTER&&(a=null),this.selectChoice(a),g(e),void(a&&a.length||this.open())}if((e.which===M.BACKSPACE&&1==this.keydowns||e.which==M.LEFT)&&0==o.offset&&!o.length)return this.selectChoice(t.find(".select2-search-choice:not(.select2-locked)").last()),void g(e);if(this.selectChoice(null),this.opened())switch(e.which){case M.UP:case M.DOWN:return this.moveHighlight(e.which===M.UP?-1:1),void g(e);case M.ENTER:return this.selectHighlighted(),void g(e);case M.TAB:return this.selectHighlighted({noFocus:!0}),void this.close();case M.ESC:return this.cancel(e),void g(e)}if(e.which!==M.TAB&&!M.isControl(e)&&!M.isFunctionKey(e)&&e.which!==M.BACKSPACE&&e.which!==M.ESC){if(e.which===M.ENTER){if(!1===this.opts.openOnEnter)return;if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return}this.open(),e.which!==M.PAGE_UP&&e.which!==M.PAGE_DOWN||g(e),e.which===M.ENTER&&g(e)}}})),this.search.on("keyup",this.bind(function(e){this.keydowns=0,this.resizeSearch()})),this.search.on("blur",this.bind(function(t){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.selectChoice(null),this.opened()||this.clearSearch(),t.stopImmediatePropagation(),this.opts.element.trigger(e.Event("select2-blur"))})),this.container.on("click",n,this.bind(function(t){this.isInterfaceEnabled()&&(e(t.target).closest(".select2-search-choice").length>0||(this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.open(),this.focusSearch(),t.preventDefault()))})),this.container.on("focus",n,this.bind(function(){this.isInterfaceEnabled()&&(this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop("disabled",!this.isInterfaceEnabled())},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||""!==this.opts.element.val()){var e=this;this.opts.initSelection.call(null,this.opts.element,function(n){n!==t&&null!==n&&(e.updateSelection(n),e.close(),e.clearSearch())})}},clearSearch:function(){var e=this.getPlaceholder(),n=this.getMaxSearchWidth();e!==t&&0===this.getVal().length&&!1===this.search.hasClass("select2-focused")?(this.search.val(e).addClass("select2-default"),this.search.width(n>0?n:this.container.css("width"))):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.clearPlaceholder(),this.resizeSearch(),this.parent.opening.apply(this,arguments),this.focusSearch(),""===this.search.val()&&this.nextSearchTerm!=t&&(this.search.val(this.nextSearchTerm),this.search.select()),this.updateResults(!0),this.opts.shouldFocusInput(this)&&this.search.focus(),this.opts.element.trigger(e.Event("select2-open"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(t){var n=[],i=[],o=this;e(t).each(function(){r(o.id(this),n)<0&&(n.push(o.id(this)),i.push(this))}),t=i,this.selection.find(".select2-search-choice").remove(),e(t).each(function(){o.addSelectedChoice(this)}),o.postprocessResults()},tokenize:function(){var e=this.search.val();null!=(e=this.opts.tokenizer.call(this,e,this.data(),this.bind(this.onSelect),this.opts))&&e!=t&&(this.search.val(e),e.length>0&&this.open())},onSelect:function(e,n){this.triggerSelect(e)&&""!==e.text&&(this.addSelectedChoice(e),this.opts.element.trigger({type:"selected",val:this.id(e),choice:e}),this.nextSearchTerm=this.opts.nextSearchTerm(e,this.search.val()),this.clearSearch(),this.updateResults(),!this.select&&this.opts.closeOnSelect||this.postprocessResults(e,!1,!0===this.opts.closeOnSelect),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()?this.updateResults(!0):this.nextSearchTerm!=t&&(this.search.val(this.nextSearchTerm),this.updateResults(),this.search.select()),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:e}),n&&n.noFocus||this.focusSearch())},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(n){var i,r,o=!n.locked,a=e("<li class='select2-search-choice'> <div></div> <a href='#' class='select2-search-choice-close' tabindex='-1'></a></li>"),s=e("<li class='select2-search-choice select2-locked'><div></div></li>"),l=o?a:s,c=this.id(n),u=this.getVal();i=this.opts.formatSelection(n,l.find("div"),this.opts.escapeMarkup),i!=t&&l.find("div").replaceWith("<div>"+i+"</div>"),r=this.opts.formatSelectionCssClass(n,l.find("div")),r!=t&&l.addClass(r),o&&l.find(".select2-search-choice-close").on("mousedown",g).on("click dblclick",this.bind(function(t){this.isInterfaceEnabled()&&(this.unselect(e(t.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),g(t),this.close(),this.focusSearch())})).on("focus",this.bind(function(){this.isInterfaceEnabled()&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))})),l.data("select2-data",n),l.insertBefore(this.searchContainer),u.push(c),this.setVal(u)},unselect:function(t){var n,i,o=this.getVal();if(t=t.closest(".select2-search-choice"),0===t.length)throw"Invalid argument: "+t+". Must be .select2-search-choice";if(n=t.data("select2-data")){var a=e.Event("select2-removing");if(a.val=this.id(n),a.choice=n,this.opts.element.trigger(a),a.isDefaultPrevented())return!1;for(;(i=r(this.id(n),o))>=0;)o.splice(i,1),this.setVal(o),this.select&&this.postprocessResults();return t.remove(),this.opts.element.trigger({type:"select2-removed",val:this.id(n),choice:n}),this.triggerChange({removed:n}),!0}},postprocessResults:function(e,t,n){var i=this.getVal(),o=this.results.find(".select2-result"),a=this.results.find(".select2-result-with-children"),s=this;o.each2(function(e,t){r(s.id(t.data("select2-data")),i)>=0&&(t.addClass("select2-selected"),t.find(".select2-result-selectable").addClass("select2-selected"))}),a.each2(function(e,t){t.is(".select2-result-selectable")||0!==t.find(".select2-result-selectable:not(.select2-selected)").length||t.addClass("select2-selected")}),-1==this.highlight()&&!1!==n&&s.highlight(0),!this.opts.createSearchChoice&&!o.filter(".select2-result:not(.select2-selected)").length>0&&(!e||e&&!e.more&&0===this.results.find(".select2-no-results").length)&&k(s.opts.formatNoMatches,"formatNoMatches")&&this.results.append("<li class='select2-no-results'>"+S(s.opts.formatNoMatches,s.opts.element,s.search.val())+"</li>")},getMaxSearchWidth:function(){return this.selection.width()-l(this.search)},resizeSearch:function(){var e,t,n,i,r,o=l(this.search);e=v(this.search)+10,t=this.search.offset().left,n=this.selection.width(),i=this.selection.offset().left,r=n-(t-i)-o,r<e&&(r=n-o),r<40&&(r=n-o),r<=0&&(r=e),this.search.width(Math.floor(r))},getVal:function(){var e;return this.select?(e=this.select.val(),null===e?[]:e):(e=this.opts.element.val(),s(e,this.opts.separator))},setVal:function(t){var n;this.select?this.select.val(t):(n=[],e(t).each(function(){r(this,n)<0&&n.push(this)}),this.opts.element.val(0===n.length?"":n.join(this.opts.separator)))},buildChangeDetails:function(e,t){for(var t=t.slice(0),e=e.slice(0),n=0;n<t.length;n++)for(var i=0;i<e.length;i++)a(this.opts.id(t[n]),this.opts.id(e[i]))&&(t.splice(n,1),n>0&&n--,e.splice(i,1),i--);return{added:t,removed:e}},val:function(n,i){var r,o=this;if(0===arguments.length)return this.getVal();if(r=this.data(),r.length||(r=[]),!n&&0!==n)return this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),void(i&&this.triggerChange({added:this.data(),removed:r}));if(this.setVal(n),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),i&&this.triggerChange(this.buildChangeDetails(r,this.data()));else{if(this.opts.initSelection===t)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(t){var n=e.map(t,o.id);o.setVal(n),o.updateSelection(t),o.clearSearch(),i&&o.triggerChange(o.buildChangeDetails(r,o.data()))})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var t=[],n=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){t.push(n.opts.id(e(this).data("select2-data")))}),this.setVal(t),this.triggerChange()},data:function(t,n){var i,r,o=this;if(0===arguments.length)return this.selection.children(".select2-search-choice").map(function(){return e(this).data("select2-data")}).get();r=this.data(),t||(t=[]),i=e.map(t,function(e){return o.opts.id(e)}),this.setVal(i),this.updateSelection(t),this.clearSearch(),n&&this.triggerChange(this.buildChangeDetails(r,this.data()))}}),e.fn.select2=function(){var n,i,o,a,s,l=Array.prototype.slice.call(arguments,0),c=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],u=["opened","isFocused","container","dropdown"],d=["val","data"],f={search:"externalSearch"};return this.each(function(){if(0===l.length||"object"==typeof l[0])n=0===l.length?{}:e.extend({},l[0]),n.element=e(this),"select"===n.element.get(0).tagName.toLowerCase()?s=n.element.prop("multiple"):(s=n.multiple||!1,"tags"in n&&(n.multiple=s=!0)),i=s?new window.Select2.class.multi:new window.Select2.class.single,i.init(n);else{if("string"!=typeof l[0])throw"Invalid arguments to select2 plugin: "+l;if(r(l[0],c)<0)throw"Unknown method: "+l[0];if(a=t,(i=e(this).data("select2"))===t)return;if(o=l[0],"container"===o?a=i.container:"dropdown"===o?a=i.dropdown:(f[o]&&(o=f[o]),a=i[o].apply(i,l.slice(1))),r(l[0],u)>=0||r(l[0],d)>=0&&1==l.length)return!1}}),a===t?this:a},e.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(e,t,n,i){var r=[];return y(e.text,n.term,r,i),r.join("")},formatSelection:function(e,n,i){return e?i(e.text):t},sortResults:function(e,t,n){return e},formatResultCssClass:function(e){return e.css},formatSelectionCssClass:function(e,n){return t},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(e){return e==t?null:e.id},matcher:function(e,t){return i(""+t).toUpperCase().indexOf(i(""+e).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:T,escapeMarkup:b,blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(e){return e},adaptDropdownCssClass:function(e){return null},nextSearchTerm:function(e,n){return t},searchInputPlaceholder:"",createSearchChoicePosition:"top",shouldFocusInput:function(e){return!(("ontouchstart"in window||navigator.msMaxTouchPoints>0)&&e.opts.minimumResultsForSearch<0)}},e.fn.select2.locales=[],e.fn.select2.locales.en={formatMatches:function(e){return 1===e?"One result is available, press enter to select it.":e+" results are available, use up and down arrow keys to navigate."},formatNoMatches:function(){return"No matches found"},formatAjaxError:function(e,t,n){return"Loading failed"},formatInputTooShort:function(e,t){var n=t-e.length;return"Please enter "+n+" or more character"+(1==n?"":"s")},formatInputTooLong:function(e,t){var n=e.length-t;return"Please delete "+n+" character"+(1==n?"":"s")},formatSelectionTooBig:function(e){return"You can only select "+e+" item"+(1==e?"":"s")},formatLoadMore:function(e){return"Loading more results…"},formatSearching:function(){return"Searching…"}},e.extend(e.fn.select2.defaults,e.fn.select2.locales.en),e.fn.select2.ajaxDefaults={transport:e.ajax,params:{type:"GET",cache:!1,dataType:"json"}},window.Select2={query:{ajax:w,local:x,tags:C},util:{debounce:d,markMatch:y,escapeMarkup:b,stripDiacritics:i},class:{abstract:O,single:I,multi:P}}}}(jQuery),function(){"use strict";var e={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,COMMAND:91,MAP:{91:"COMMAND",8:"BACKSPACE",9:"TAB",13:"ENTER",16:"SHIFT",17:"CTRL",18:"ALT",19:"PAUSEBREAK",20:"CAPSLOCK",27:"ESC",32:"SPACE",33:"PAGE_UP",34:"PAGE_DOWN",35:"END",36:"HOME",37:"LEFT",38:"UP",39:"RIGHT",40:"DOWN",43:"+",44:"PRINTSCREEN",45:"INSERT",46:"DELETE",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NUMLOCK",145:"SCROLLLOCK",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},isControl:function(t){switch(t.which){case e.COMMAND:case e.SHIFT:case e.CTRL:case e.ALT:return!0}return!!t.metaKey},isFunctionKey:function(e){return(e=e.which?e.which:e)>=112&&e<=123},isVerticalMovement:function(t){return~[e.UP,e.DOWN].indexOf(t)},isHorizontalMovement:function(t){return~[e.LEFT,e.RIGHT,e.BACKSPACE,e.DELETE].indexOf(t)}};void 0===angular.element.prototype.querySelectorAll&&(angular.element.prototype.querySelectorAll=function(e){return angular.element(this[0].querySelectorAll(e))}),void 0===angular.element.prototype.closest&&(angular.element.prototype.closest=function(e){for(var t=this[0],n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;t;){if(n.bind(t)(e))return t;t=t.parentElement}return!1});var t=0,n=angular.module("ui.select",[]).constant("uiSelectConfig",{theme:"bootstrap",searchEnabled:!0,sortable:!1,placeholder:"",refreshDelay:1e3,closeOnSelect:!0,generateId:function(){return t++},appendToBody:!1}).service("uiSelectMinErr",function(){var e=angular.$$minErr("ui.select");return function(){var t=e.apply(this,arguments),n=t.message.replace(new RegExp("\nhttp://errors.angularjs.org/.*"),"");return new Error(n)}}).directive("uisTranscludeAppend",function(){return{link:function(e,t,n,i,r){r(e,function(e){t.append(e)})}}}).filter("highlight",function(){function e(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(t,n){return n&&t?t.replace(new RegExp(e(n),"gi"),'<span class="ui-select-highlight">$&</span>'):t}}).factory("uisOffset",["$document","$window",function(e,t){return function(n){var i=n[0].getBoundingClientRect();return{width:i.width||n.prop("offsetWidth"),height:i.height||n.prop("offsetHeight"),top:i.top+(t.pageYOffset||e[0].documentElement.scrollTop),left:i.left+(t.pageXOffset||e[0].documentElement.scrollLeft)}}}]);n.directive("uiSelectChoices",["uiSelectConfig","uisRepeatParser","uiSelectMinErr","$compile",function(e,t,n,i){return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(t){return(t.parent().attr("theme")||e.theme)+"/choices.tpl.html"},compile:function(r,o){if(!o.repeat)throw n("repeat","Expected 'repeat' expression.");return function(r,o,a,s,l){var c=a.groupBy,u=a.groupFilter;if(s.parseRepeatAttr(a.repeat,c,u),s.disableChoiceExpression=a.uiDisableChoice,s.onHighlightCallback=a.onHighlight,c){var d=o.querySelectorAll(".ui-select-choices-group");if(1!==d.length)throw n("rows","Expected 1 .ui-select-choices-group but got '{0}'.",d.length);d.attr("ng-repeat",t.getGroupNgRepeatExpression())}var f=o.querySelectorAll(".ui-select-choices-row");if(1!==f.length)throw n("rows","Expected 1 .ui-select-choices-row but got '{0}'.",f.length);f.attr("ng-repeat",t.getNgRepeatExpression(s.parserResult.itemName,"$select.items",s.parserResult.trackByExp,c)).attr("ng-if","$select.open").attr("ng-mouseenter","$select.setActiveItem("+s.parserResult.itemName+")").attr("ng-click","$select.select("+s.parserResult.itemName+",false,$event)");var h=o.querySelectorAll(".ui-select-choices-row-inner");if(1!==h.length)throw n("rows","Expected 1 .ui-select-choices-row-inner but got '{0}'.",h.length);h.attr("uis-transclude-append",""),i(o,l)(r),r.$watch("$select.search",function(e){e&&!s.open&&s.multiple&&s.activate(!1,!0),s.activeIndex=s.tagging.isActivated?-1:0,s.refresh(a.refresh)}),a.$observe("refreshDelay",function(){var t=r.$eval(a.refreshDelay);s.refreshDelay=void 0!==t?t:e.refreshDelay})}}}}]),n.controller("uiSelectCtrl",["$scope","$element","$timeout","$filter","uisRepeatParser","uiSelectMinErr","uiSelectConfig",function(t,n,i,r,o,a,s){function l(){(f.resetSearchInput||void 0===f.resetSearchInput&&s.resetSearchInput)&&(f.search=h,f.selected&&f.items.length&&!f.multiple&&(f.activeIndex=f.items.indexOf(f.selected)))}function c(e,t){var n,i,r=[];for(n=0;n<t.length;n++)for(i=0;i<e.length;i++)e[i].name==[t[n]]&&r.push(e[i]);return r}function u(t){var n=!0;switch(t){case e.DOWN:!f.open&&f.multiple?f.activate(!1,!0):f.activeIndex<f.items.length-1&&f.activeIndex++;break;case e.UP:!f.open&&f.multiple?f.activate(!1,!0):(f.activeIndex>0||0===f.search.length&&f.tagging.isActivated&&f.activeIndex>-1)&&f.activeIndex--;break;case e.TAB:f.multiple&&!f.open||f.select(f.items[f.activeIndex],!0);break;case e.ENTER:f.open&&(f.tagging.isActivated||f.activeIndex>=0)?f.select(f.items[f.activeIndex]):f.activate(!1,!0)
-;break;case e.ESC:f.close();break;default:n=!1}return n}function d(){var e=n.querySelectorAll(".ui-select-choices-content"),t=e.querySelectorAll(".ui-select-choices-row");if(t.length<1)throw a("choices","Expected multiple .ui-select-choices-row but got '{0}'.",t.length);if(!(f.activeIndex<0)){var i=t[f.activeIndex],r=i.offsetTop+i.clientHeight-e[0].scrollTop,o=e[0].offsetHeight;r>o?e[0].scrollTop+=r-o:r<i.clientHeight&&(f.isGrouped&&0===f.activeIndex?e[0].scrollTop=0:e[0].scrollTop-=i.clientHeight-r)}}var f=this,h="";if(f.placeholder=s.placeholder,f.searchEnabled=s.searchEnabled,f.sortable=s.sortable,f.refreshDelay=s.refreshDelay,f.removeSelected=!1,f.closeOnSelect=!0,f.search=h,f.activeIndex=0,f.items=[],f.open=!1,f.focus=!1,f.disabled=!1,f.selected=void 0,f.focusser=void 0,f.resetSearchInput=!0,f.multiple=void 0,f.disableChoiceExpression=void 0,f.tagging={isActivated:!1,fct:void 0},f.taggingTokens={isActivated:!1,tokens:void 0},f.lockChoiceExpression=void 0,f.clickTriggeredSelect=!1,f.$filter=r,f.searchInput=n.querySelectorAll("input.ui-select-search"),1!==f.searchInput.length)throw a("searchInput","Expected 1 input.ui-select-search but got '{0}'.",f.searchInput.length);f.isEmpty=function(){return angular.isUndefined(f.selected)||null===f.selected||""===f.selected},f.activate=function(e,n){f.disabled||f.open||(n||l(),t.$broadcast("uis:activate"),f.open=!0,f.activeIndex=f.activeIndex>=f.items.length?0:f.activeIndex,-1===f.activeIndex&&!1!==f.taggingLabel&&(f.activeIndex=0),i(function(){f.search=e||f.search,f.searchInput[0].focus()}))},f.findGroupByName=function(e){return f.groups&&f.groups.filter(function(t){return t.name===e})[0]},f.parseRepeatAttr=function(e,n,i){function r(e){var r=t.$eval(n);if(f.groups=[],angular.forEach(e,function(e){var t=angular.isFunction(r)?r(e):e[r],n=f.findGroupByName(t);n?n.items.push(e):f.groups.push({name:t,items:[e]})}),i){var o=t.$eval(i);angular.isFunction(o)?f.groups=o(f.groups):angular.isArray(o)&&(f.groups=c(f.groups,o))}f.items=[],f.groups.forEach(function(e){f.items=f.items.concat(e.items)})}function s(e){f.items=e}f.setItemsFn=n?r:s,f.parserResult=o.parse(e),f.isGrouped=!!n,f.itemProperty=f.parserResult.itemName,f.refreshItems=function(e){e=e||f.parserResult.source(t);var n=f.selected;if(angular.isArray(n)&&!n.length||!f.removeSelected)f.setItemsFn(e);else if(void 0!==e){var i=e.filter(function(e){return n.indexOf(e)<0});f.setItemsFn(i)}},t.$watchCollection(f.parserResult.source,function(e){if(void 0===e||null===e)f.items=[];else{if(!angular.isArray(e))throw a("items","Expected an array but got '{0}'.",e);f.refreshItems(e),f.ngModel.$modelValue=null}})};var p;f.refresh=function(e){void 0!==e&&(p&&i.cancel(p),p=i(function(){t.$eval(e)},f.refreshDelay))},f.setActiveItem=function(e){f.activeIndex=f.items.indexOf(e)},f.isActive=function(e){if(!f.open)return!1;var t=f.items.indexOf(e[f.itemProperty]),n=t===f.activeIndex;return!(!n||t<0&&!1!==f.taggingLabel||t<0&&!1===f.taggingLabel)&&(n&&!angular.isUndefined(f.onHighlightCallback)&&e.$eval(f.onHighlightCallback),n)},f.isDisabled=function(e){if(f.open){var t,n=f.items.indexOf(e[f.itemProperty]),i=!1;return n>=0&&!angular.isUndefined(f.disableChoiceExpression)&&(t=f.items[n],i=!!e.$eval(f.disableChoiceExpression),t._uiSelectChoiceDisabled=i),i}},f.select=function(e,n,r){if(void 0===e||!e._uiSelectChoiceDisabled){if(!f.items&&!f.search)return;if(!e||!e._uiSelectChoiceDisabled){if(f.tagging.isActivated){if(!1===f.taggingLabel)if(f.activeIndex<0){if(!(e=void 0!==f.tagging.fct?f.tagging.fct(f.search):f.search)||angular.equals(f.items[0],e))return}else e=f.items[f.activeIndex];else if(0===f.activeIndex){if(void 0===e)return;if(void 0!==f.tagging.fct&&"string"==typeof e){if(!(e=f.tagging.fct(f.search)))return}else"string"==typeof e&&(e=e.replace(f.taggingLabel,"").trim())}if(f.selected&&angular.isArray(f.selected)&&f.selected.filter(function(t){return angular.equals(t,e)}).length>0)return void f.close(n)}t.$broadcast("uis:select",e);var o={};o[f.parserResult.itemName]=e,i(function(){f.onSelectCallback(t,{$item:e,$model:f.parserResult.modelMapper(t,o)})}),f.closeOnSelect&&f.close(n),r&&"click"===r.type&&(f.clickTriggeredSelect=!0)}}},f.close=function(e){f.open&&(f.ngModel&&f.ngModel.$setTouched&&f.ngModel.$setTouched(),l(),f.open=!1,t.$broadcast("uis:close",e))},f.setFocus=function(){f.focus||f.focusInput[0].focus()},f.clear=function(e){f.select(void 0),e.stopPropagation(),i(function(){f.focusser[0].focus()},0,!1)},f.toggle=function(e){f.open?(f.close(),e.preventDefault(),e.stopPropagation()):f.activate()},f.isLocked=function(e,t){var n,i=f.selected[t];return i&&!angular.isUndefined(f.lockChoiceExpression)&&(n=!!e.$eval(f.lockChoiceExpression),i._uiSelectChoiceLocked=n),n};var g=null;f.sizeSearchInput=function(){var e=f.searchInput[0],n=f.searchInput.parent().parent()[0],r=function(){return n.clientWidth*!!e.offsetParent},o=function(t){if(0===t)return!1;var n=t-e.offsetLeft-10;return n<50&&(n=t),f.searchInput.css("width",n+"px"),!0};f.searchInput.css("width","10px"),i(function(){null!==g||o(r())||(g=t.$watch(r,function(e){o(e)&&(g(),g=null)}))})},f.searchInput.on("keydown",function(n){var r=n.which;t.$apply(function(){var t=!1;if((f.items.length>0||f.tagging.isActivated)&&(u(r),f.taggingTokens.isActivated)){for(var o=0;o<f.taggingTokens.tokens.length;o++)f.taggingTokens.tokens[o]===e.MAP[n.keyCode]&&f.search.length>0&&(t=!0);t&&i(function(){f.searchInput.triggerHandler("tagged");var t=f.search.replace(e.MAP[n.keyCode],"").trim();f.tagging.fct&&(t=f.tagging.fct(t)),t&&f.select(t,!0)})}}),e.isVerticalMovement(r)&&f.items.length>0&&d(),r!==e.ENTER&&r!==e.ESC||(n.preventDefault(),n.stopPropagation())}),f.searchInput.on("paste",function(e){var t=e.originalEvent.clipboardData.getData("text/plain");if(t&&t.length>0&&f.taggingTokens.isActivated&&f.tagging.fct){var n=t.split(f.taggingTokens.tokens[0]);n&&n.length>0&&(angular.forEach(n,function(e){var t=f.tagging.fct(e);t&&f.select(t,!0)}),e.preventDefault(),e.stopPropagation())}}),f.searchInput.on("tagged",function(){i(function(){l()})}),t.$on("$destroy",function(){f.searchInput.off("keyup keydown tagged blur paste")})}]),n.directive("uiSelect",["$document","uiSelectConfig","uiSelectMinErr","uisOffset","$compile","$parse","$timeout",function(e,t,n,i,r,o,a){return{restrict:"EA",templateUrl:function(e,n){return(n.theme||t.theme)+(angular.isDefined(n.multiple)?"/select-multiple.tpl.html":"/select.tpl.html")},replace:!0,transclude:!0,require:["uiSelect","^ngModel"],scope:!0,controller:"uiSelectCtrl",controllerAs:"$select",compile:function(r,s){return angular.isDefined(s.multiple)?r.append("<ui-select-multiple/>").removeAttr("multiple"):r.append("<ui-select-single/>"),function(r,s,l,c,u){function d(e){if(p.open){if(!(window.jQuery?window.jQuery.contains(s[0],e.target):s[0].contains(e.target))&&!p.clickTriggeredSelect){var t=["input","button","textarea"],n=angular.element(e.target).scope(),i=n&&n.$select&&n.$select!==p;i||(i=~t.indexOf(e.target.tagName.toLowerCase())),p.close(i),r.$digest()}p.clickTriggeredSelect=!1}}function f(){var t=i(s);v=angular.element('<div class="ui-select-placeholder"></div>'),v[0].style.width=t.width+"px",v[0].style.height=t.height+"px",s.after(v),$=s[0].style.width,e.find("body").append(s),s[0].style.position="absolute",s[0].style.left=t.left+"px",s[0].style.top=t.top+"px",s[0].style.width=t.width+"px"}function h(){null!==v&&(v.replaceWith(s),v=null,s[0].style.position="",s[0].style.left="",s[0].style.top="",s[0].style.width=$)}var p=c[0],g=c[1];p.generatedId=t.generateId(),p.baseTitle=l.title||"Select box",p.focusserTitle=p.baseTitle+" focus",p.focusserId="focusser-"+p.generatedId,p.closeOnSelect=function(){return angular.isDefined(l.closeOnSelect)?o(l.closeOnSelect)():t.closeOnSelect}(),p.onSelectCallback=o(l.onSelect),p.onRemoveCallback=o(l.onRemove),p.ngModel=g,p.choiceGrouped=function(e){return p.isGrouped&&e&&e.name},l.tabindex&&l.$observe("tabindex",function(e){p.focusInput.attr("tabindex",e),s.removeAttr("tabindex")}),r.$watch("searchEnabled",function(){var e=r.$eval(l.searchEnabled);p.searchEnabled=void 0!==e?e:t.searchEnabled}),r.$watch("sortable",function(){var e=r.$eval(l.sortable);p.sortable=void 0!==e?e:t.sortable}),l.$observe("disabled",function(){p.disabled=void 0!==l.disabled&&l.disabled}),l.$observe("resetSearchInput",function(){var e=r.$eval(l.resetSearchInput);p.resetSearchInput=void 0===e||e}),l.$observe("tagging",function(){if(void 0!==l.tagging){var e=r.$eval(l.tagging);p.tagging={isActivated:!0,fct:!0!==e?e:void 0}}else p.tagging={isActivated:!1,fct:void 0}}),l.$observe("taggingLabel",function(){void 0!==l.tagging&&("false"===l.taggingLabel?p.taggingLabel=!1:p.taggingLabel=void 0!==l.taggingLabel?l.taggingLabel:"(new)")}),l.$observe("taggingTokens",function(){if(void 0!==l.tagging){var e=void 0!==l.taggingTokens?l.taggingTokens.split("|"):[",","ENTER"];p.taggingTokens={isActivated:!0,tokens:e}}}),angular.isDefined(l.autofocus)&&a(function(){p.setFocus()}),angular.isDefined(l.focusOn)&&r.$on(l.focusOn,function(){a(function(){p.setFocus()})}),e.on("click",d),r.$on("$destroy",function(){e.off("click",d)}),u(r,function(e){var t=angular.element("<div>").append(e),i=t.querySelectorAll(".ui-select-match");if(i.removeAttr("ui-select-match"),i.removeAttr("data-ui-select-match"),1!==i.length)throw n("transcluded","Expected 1 .ui-select-match but got '{0}'.",i.length);s.querySelectorAll(".ui-select-match").replaceWith(i);var r=t.querySelectorAll(".ui-select-choices");if(r.removeAttr("ui-select-choices"),r.removeAttr("data-ui-select-choices"),1!==r.length)throw n("transcluded","Expected 1 .ui-select-choices but got '{0}'.",r.length);s.querySelectorAll(".ui-select-choices").replaceWith(r)});var m=r.$eval(l.appendToBody);(void 0!==m?m:t.appendToBody)&&(r.$watch("$select.open",function(e){e?f():h()}),r.$on("$destroy",function(){h()}));var v=null,$="",y=null;r.$watch("$select.open",function(t){if(t){if(null===(y=angular.element(s).querySelectorAll(".ui-select-dropdown")))return;y[0].style.opacity=0,a(function(){var t=i(s),n=i(y);t.top+t.height+n.height>e[0].documentElement.scrollTop+e[0].documentElement.clientHeight&&(y[0].style.position="absolute",y[0].style.top=-1*n.height+"px",s.addClass("direction-up")),y[0].style.opacity=1})}else{if(null===y)return;y[0].style.position="",y[0].style.top="",s.removeClass("direction-up")}})}}}}]),n.directive("uiSelectMatch",["uiSelectConfig",function(e){return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(t){return(t.parent().attr("theme")||e.theme)+(t.parent().attr("multiple")?"/match-multiple.tpl.html":"/match.tpl.html")},link:function(t,n,i,r){function o(e){r.allowClear=!!angular.isDefined(e)&&(""===e||"true"===e.toLowerCase())}r.lockChoiceExpression=i.uiLockChoice,i.$observe("placeholder",function(t){r.placeholder=void 0!==t?t:e.placeholder}),i.$observe("allowClear",o),o(i.allowClear),r.multiple&&r.sizeSearchInput()}}}]),n.directive("uiSelectMultiple",["uiSelectMinErr","$timeout",function(t,n){return{restrict:"EA",require:["^uiSelect","^ngModel"],controller:["$scope","$timeout",function(e,t){var n,i=this,r=e.$select;e.$evalAsync(function(){n=e.ngModel}),i.activeMatchIndex=-1,i.updateModel=function(){n.$setViewValue(Date.now()),i.refreshComponent()},i.refreshComponent=function(){r.refreshItems(),r.sizeSearchInput()},i.removeChoice=function(n){var o=r.selected[n];if(!o._uiSelectChoiceLocked){var a={};a[r.parserResult.itemName]=o,r.selected.splice(n,1),i.activeMatchIndex=-1,r.sizeSearchInput(),t(function(){r.onRemoveCallback(e,{$item:o,$model:r.parserResult.modelMapper(e,a)})}),i.updateModel()}},i.getPlaceholder=function(){if(!r.selected.length)return r.placeholder}}],controllerAs:"$selectMultiple",link:function(i,r,o,a){function s(e){return angular.isNumber(e.selectionStart)?e.selectionStart:e.value.length}function l(t){var n=s(d.searchInput[0]),i=d.selected.length,r=i-1,o=h.activeMatchIndex,a=h.activeMatchIndex+1,l=h.activeMatchIndex-1,c=o;return!(n>0||d.search.length&&t==e.RIGHT)&&(d.close(),c=function(){switch(t){case e.LEFT:return~h.activeMatchIndex?l:r;case e.RIGHT:return~h.activeMatchIndex&&o!==r?a:(d.activate(),!1);case e.BACKSPACE:return~h.activeMatchIndex?(h.removeChoice(o),l):r;case e.DELETE:return!!~h.activeMatchIndex&&(h.removeChoice(h.activeMatchIndex),o)}}(),d.selected.length&&!1!==c?h.activeMatchIndex=Math.min(r,Math.max(0,c)):h.activeMatchIndex=-1,!0)}function c(e){return void 0!==e&&void 0!==d.search&&e.filter(function(e){return void 0!==d.search.toUpperCase()&&void 0!==e&&e.toUpperCase()===d.search.toUpperCase()}).length>0}function u(e,t){var n=-1;if(angular.isArray(e))for(var i=angular.copy(e),r=0;r<i.length;r++)if(void 0===d.tagging.fct)i[r]+" "+d.taggingLabel===t&&(n=r);else{var o=i[r];o.isTag=!0,angular.equals(o,t)&&(n=r)}return n}var d=a[0],f=i.ngModel=a[1],h=i.$selectMultiple;d.multiple=!0,d.removeSelected=!0,d.focusInput=d.searchInput,f.$parsers.unshift(function(){for(var e,t={},n=[],r=d.selected.length-1;r>=0;r--)t={},t[d.parserResult.itemName]=d.selected[r],e=d.parserResult.modelMapper(i,t),n.unshift(e);return n}),f.$formatters.unshift(function(e){var t,n=d.parserResult.source(i,{$select:{search:""}}),r={};if(!n)return e;var o=[],a=function(e,n){if(e&&e.length){for(var a=e.length-1;a>=0;a--){if(r[d.parserResult.itemName]=e[a],t=d.parserResult.modelMapper(i,r),d.parserResult.trackByExp){var s=/\.(.+)/.exec(d.parserResult.trackByExp);if(s.length>0&&t[s[1]]==n[s[1]])return o.unshift(e[a]),!0}if(angular.equals(t,n))return o.unshift(e[a]),!0}return!1}};if(!e)return o;for(var s=e.length-1;s>=0;s--)a(d.selected,e[s])||a(n,e[s])||o.unshift(e[s]);return o}),i.$watchCollection(function(){return f.$modelValue},function(e,t){t!=e&&(f.$modelValue=null,h.refreshComponent())}),f.$render=function(){if(!angular.isArray(f.$viewValue)){if(!angular.isUndefined(f.$viewValue)&&null!==f.$viewValue)throw t("multiarr","Expected model value to be array but got '{0}'",f.$viewValue);d.selected=[]}d.selected=f.$viewValue,i.$evalAsync()},i.$on("uis:select",function(e,t){d.selected.push(t),h.updateModel()}),i.$on("uis:activate",function(){h.activeMatchIndex=-1}),i.$watch("$select.disabled",function(e,t){t&&!e&&d.sizeSearchInput()}),d.searchInput.on("keydown",function(t){var n=t.which;i.$apply(function(){var i=!1;e.isHorizontalMovement(n)&&(i=l(n)),i&&n!=e.TAB&&(t.preventDefault(),t.stopPropagation())})}),d.searchInput.on("keyup",function(t){if(e.isVerticalMovement(t.which)||i.$evalAsync(function(){d.activeIndex=!1===d.taggingLabel?-1:0}),d.tagging.isActivated&&d.search.length>0){if(t.which===e.TAB||e.isControl(t)||e.isFunctionKey(t)||t.which===e.ESC||e.isVerticalMovement(t.which))return;if(d.activeIndex=!1===d.taggingLabel?-1:0,!1===d.taggingLabel)return;var n,r,o,a,s=angular.copy(d.items),l=angular.copy(d.items),f=!1,h=-1;if(void 0!==d.tagging.fct){if(o=d.$filter("filter")(s,{isTag:!0}),o.length>0&&(a=o[0]),s.length>0&&a&&(f=!0,s=s.slice(1,s.length),l=l.slice(1,l.length)),n=d.tagging.fct(d.search),n.isTag=!0,l.filter(function(e){return angular.equals(e,d.tagging.fct(d.search))}).length>0)return;n.isTag=!0}else{if(o=d.$filter("filter")(s,function(e){return e.match(d.taggingLabel)}),o.length>0&&(a=o[0]),r=s[0],void 0!==r&&s.length>0&&a&&(f=!0,s=s.slice(1,s.length),l=l.slice(1,l.length)),n=d.search+" "+d.taggingLabel,u(d.selected,d.search)>-1)return;if(c(l.concat(d.selected)))return void(f&&(s=l,i.$evalAsync(function(){d.activeIndex=0,d.items=s})));if(c(l))return void(f&&(d.items=l.slice(1,l.length)))}f&&(h=u(d.selected,n)),h>-1?s=s.slice(h+1,s.length-1):(s=[],s.push(n),s=s.concat(l)),i.$evalAsync(function(){d.activeIndex=0,d.items=s})}}),d.searchInput.on("blur",function(){n(function(){h.activeMatchIndex=-1})})}}}]),n.directive("uiSelectSingle",["$timeout","$compile",function(t,n){return{restrict:"EA",require:["^uiSelect","^ngModel"],link:function(i,r,o,a){var s=a[0],l=a[1];l.$parsers.unshift(function(e){var t={};return t[s.parserResult.itemName]=e,s.parserResult.modelMapper(i,t)}),l.$formatters.unshift(function(e){var t,n=s.parserResult.source(i,{$select:{search:""}}),r={};if(n){var o=function(n){return r[s.parserResult.itemName]=n,(t=s.parserResult.modelMapper(i,r))==e};if(s.selected&&o(s.selected))return s.selected;for(var a=n.length-1;a>=0;a--)if(o(n[a]))return n[a]}return e}),i.$watch("$select.selected",function(e){l.$viewValue!==e&&l.$setViewValue(e)}),l.$render=function(){s.selected=l.$viewValue},i.$on("uis:select",function(e,t){s.selected=t}),i.$on("uis:close",function(e,n){t(function(){s.focusser.prop("disabled",!1),n||s.focusser[0].focus()},0,!1)}),i.$on("uis:activate",function(){c.prop("disabled",!0)});var c=angular.element("<input ng-disabled='$select.disabled' class='ui-select-focusser ui-select-offscreen' type='text' id='{{ $select.focusserId }}' aria-label='{{ $select.focusserTitle }}' aria-haspopup='true' role='button' />");n(c)(i),s.focusser=c,s.focusInput=c,r.parent().append(c),c.bind("focus",function(){i.$evalAsync(function(){s.focus=!0})}),c.bind("blur",function(){i.$evalAsync(function(){s.focus=!1})}),c.bind("keydown",function(t){if(t.which===e.BACKSPACE)return t.preventDefault(),t.stopPropagation(),s.select(void 0),void i.$apply();t.which===e.TAB||e.isControl(t)||e.isFunctionKey(t)||t.which===e.ESC||(t.which!=e.DOWN&&t.which!=e.UP&&t.which!=e.ENTER&&t.which!=e.SPACE||(t.preventDefault(),t.stopPropagation(),s.activate()),i.$digest())}),c.bind("keyup input",function(t){t.which===e.TAB||e.isControl(t)||e.isFunctionKey(t)||t.which===e.ESC||t.which==e.ENTER||t.which===e.BACKSPACE||(s.activate(c.val()),c.val(""),i.$digest())})}}}]),n.directive("uiSelectSort",["$timeout","uiSelectConfig","uiSelectMinErr",function(e,t,n){return{require:"^uiSelect",link:function(t,i,r,o){if(null===t[r.uiSelectSort])throw n("sort","Expected a list to sort");var a=angular.extend({axis:"horizontal"},t.$eval(r.uiSelectSortOptions)),s=a.axis;t.$watch(function(){return o.sortable},function(e){e?i.attr("draggable",!0):i.removeAttr("draggable")}),i.on("dragstart",function(e){i.addClass("dragging"),(e.dataTransfer||e.originalEvent.dataTransfer).setData("text/plain",t.$index)}),i.on("dragend",function(){i.removeClass("dragging")});var l,c=function(e,t){this.splice(t,0,this.splice(e,1)[0])},u=function(e){e.preventDefault(),("vertical"===s?e.offsetY||e.layerY||(e.originalEvent?e.originalEvent.offsetY:0):e.offsetX||e.layerX||(e.originalEvent?e.originalEvent.offsetX:0))<this["vertical"===s?"offsetHeight":"offsetWidth"]/2?(i.removeClass("dropping-after"),i.addClass("dropping-before")):(i.removeClass("dropping-before"),i.addClass("dropping-after"))},d=function(t){t.preventDefault();var n=parseInt((t.dataTransfer||t.originalEvent.dataTransfer).getData("text/plain"),10);e.cancel(l),l=e(function(){f(n)},20)},f=function(e){var n=t.$eval(r.uiSelectSort),o=n[e],a=null;a=i.hasClass("dropping-before")?e<t.$index?t.$index-1:t.$index:e<t.$index?t.$index:t.$index+1,c.apply(n,[e,a]),t.$apply(function(){t.$emit("uiSelectSort:change",{array:n,item:o,from:e,to:a})}),i.removeClass("dropping"),i.removeClass("dropping-before"),i.removeClass("dropping-after"),i.off("drop",d)};i.on("dragenter",function(){i.hasClass("dragging")||(i.addClass("dropping"),i.on("dragover",u),i.on("drop",d))}),i.on("dragleave",function(e){e.target==i&&(i.removeClass("dropping"),i.removeClass("dropping-before"),i.removeClass("dropping-after"),i.off("dragover",u),i.off("drop",d))})}}}]),n.service("uisRepeatParser",["uiSelectMinErr","$parse",function(e,t){var n=this;n.parse=function(n){var i=n.match(/^\s*(?:([\s\S]+?)\s+as\s+)?([\S]+?)\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!i)throw e("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",n);return{itemName:i[2],source:t(i[3]),trackByExp:i[4],modelMapper:t(i[1]||i[2])}},n.getGroupNgRepeatExpression=function(){return"$group in $select.groups"},n.getNgRepeatExpression=function(e,t,n,i){var r=e+" in "+(i?"$group.items":t);return n&&(r+=" track by "+n),r}}])}(),angular.module("ui.select").run(["$templateCache",function(e){e.put("bootstrap/choices.tpl.html",'<ul class="ui-select-choices ui-select-choices-content ui-select-dropdown dropdown-menu" role="listbox" ng-show="$select.items.length > 0"><li class="ui-select-choices-group" id="ui-select-choices-{{ $select.generatedId }}"><div class="divider" ng-show="$select.isGrouped && $index > 0"></div><div ng-show="$select.isGrouped" class="ui-select-choices-group-label dropdown-header" ng-bind="$group.name"></div><div id="ui-select-choices-row-{{ $select.generatedId }}-{{$index}}" class="ui-select-choices-row" ng-class="{active: $select.isActive(this), disabled: $select.isDisabled(this)}" role="option"><a href="javascript:void(0)" class="ui-select-choices-row-inner"></a></div></li></ul>'),e.put("bootstrap/match-multiple.tpl.html",'<span class="ui-select-match"><span ng-repeat="$item in $select.selected"><span class="ui-select-match-item btn btn-default btn-xs" tabindex="-1" type="button" ng-disabled="$select.disabled" ng-click="$selectMultiple.activeMatchIndex = $index;" ng-class="{\'btn-primary\':$selectMultiple.activeMatchIndex === $index, \'select-locked\':$select.isLocked(this, $index)}" ui-select-sort="$select.selected"><span class="close ui-select-match-close" ng-hide="$select.disabled" ng-click="$selectMultiple.removeChoice($index)">&nbsp;&times;</span> <span uis-transclude-append=""></span></span></span></span>'),e.put("bootstrap/match.tpl.html",'<div class="ui-select-match" ng-hide="$select.open" ng-disabled="$select.disabled" ng-class="{\'btn-default-focus\':$select.focus}"><span tabindex="-1" class="btn btn-default form-control ui-select-toggle" aria-label="{{ $select.baseTitle }} activate" ng-disabled="$select.disabled" ng-click="$select.activate()" style="outline: 0;"><span ng-show="$select.isEmpty()" class="ui-select-placeholder text-muted">{{$select.placeholder}}</span> <span ng-hide="$select.isEmpty()" class="ui-select-match-text pull-left" ng-class="{\'ui-select-allow-clear\': $select.allowClear && !$select.isEmpty()}" ng-transclude=""></span> <i class="caret pull-right" ng-click="$select.toggle($event)"></i> <a ng-show="$select.allowClear && !$select.isEmpty()" aria-label="{{ $select.baseTitle }} clear" style="margin-right: 10px" ng-click="$select.clear($event)" class="btn btn-xs btn-link pull-right"><i class="glyphicon glyphicon-remove" aria-hidden="true"></i></a></span></div>'),e.put("bootstrap/select-multiple.tpl.html",'<div class="ui-select-container ui-select-multiple ui-select-bootstrap dropdown form-control" ng-class="{open: $select.open}"><div><div class="ui-select-match"></div><input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" class="ui-select-search input-xs" placeholder="{{$selectMultiple.getPlaceholder()}}" ng-disabled="$select.disabled" ng-hide="$select.disabled" ng-click="$select.activate()" ng-model="$select.search" role="combobox" aria-label="{{ $select.baseTitle }}" ondrop="return false;"></div><div class="ui-select-choices"></div></div>'),e.put("bootstrap/select.tpl.html",'<div class="ui-select-container ui-select-bootstrap dropdown" ng-class="{open: $select.open}"><div class="ui-select-match"></div><input type="text" autocomplete="off" tabindex="-1" aria-expanded="true" aria-label="{{ $select.baseTitle }}" aria-owns="ui-select-choices-{{ $select.generatedId }}" aria-activedescendant="ui-select-choices-row-{{ $select.generatedId }}-{{ $select.activeIndex }}" class="form-control ui-select-search" placeholder="{{$select.placeholder}}" ng-model="$select.search" ng-show="$select.searchEnabled && $select.open"><div class="ui-select-choices"></div></div>'),e.put("select2/choices.tpl.html",'<ul class="ui-select-choices ui-select-choices-content select2-results"><li class="ui-select-choices-group" ng-class="{\'select2-result-with-children\': $select.choiceGrouped($group) }"><div ng-show="$select.choiceGrouped($group)" class="ui-select-choices-group-label select2-result-label" ng-bind="$group.name"></div><ul role="listbox" id="ui-select-choices-{{ $select.generatedId }}" ng-class="{\'select2-result-sub\': $select.choiceGrouped($group), \'select2-result-single\': !$select.choiceGrouped($group) }"><li role="option" id="ui-select-choices-row-{{ $select.generatedId }}-{{$index}}" class="ui-select-choices-row" ng-class="{\'select2-highlighted\': $select.isActive(this), \'select2-disabled\': $select.isDisabled(this)}"><div class="select2-result-label ui-select-choices-row-inner"></div></li></ul></li></ul>'),e.put("select2/match-multiple.tpl.html",'<span class="ui-select-match"><li class="ui-select-match-item select2-search-choice" ng-repeat="$item in $select.selected" ng-class="{\'select2-search-choice-focus\':$selectMultiple.activeMatchIndex === $index, \'select2-locked\':$select.isLocked(this, $index)}" ui-select-sort="$select.selected"><span uis-transclude-append=""></span> <a href="javascript:;" class="ui-select-match-close select2-search-choice-close" ng-click="$selectMultiple.removeChoice($index)" tabindex="-1"></a></li></span>'),e.put("select2/match.tpl.html",'<a class="select2-choice ui-select-match" ng-class="{\'select2-default\': $select.isEmpty()}" ng-click="$select.toggle($event)" aria-label="{{ $select.baseTitle }} select"><span ng-show="$select.isEmpty()" class="select2-chosen">{{$select.placeholder}}</span> <span ng-hide="$select.isEmpty()" class="select2-chosen" ng-transclude=""></span> <abbr ng-if="$select.allowClear && !$select.isEmpty()" class="select2-search-choice-close" ng-click="$select.clear($event)"></abbr> <span class="select2-arrow ui-select-toggle"><b></b></span></a>'),e.put("select2/select-multiple.tpl.html",'<div class="ui-select-container ui-select-multiple select2 select2-container select2-container-multi" ng-class="{\'select2-container-active select2-dropdown-open open\': $select.open, \'select2-container-disabled\': $select.disabled}"><ul class="select2-choices"><span class="ui-select-match"></span><li class="select2-search-field"><input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="combobox" aria-expanded="true" aria-owns="ui-select-choices-{{ $select.generatedId }}" aria-label="{{ $select.baseTitle }}" aria-activedescendant="ui-select-choices-row-{{ $select.generatedId }}-{{ $select.activeIndex }}" class="select2-input ui-select-search" placeholder="{{$selectMultiple.getPlaceholder()}}" ng-disabled="$select.disabled" ng-hide="$select.disabled" ng-model="$select.search" ng-click="$select.activate()" style="width: 34px;" ondrop="return false;"></li></ul><div class="ui-select-dropdown select2-drop select2-with-searchbox select2-drop-active" ng-class="{\'select2-display-none\': !$select.open}"><div class="ui-select-choices"></div></div></div>'),e.put("select2/select.tpl.html",'<div class="ui-select-container select2 select2-container" ng-class="{\'select2-container-active select2-dropdown-open open\': $select.open, \'select2-container-disabled\': $select.disabled, \'select2-container-active\': $select.focus, \'select2-allowclear\': $select.allowClear && !$select.isEmpty()}"><div class="ui-select-match"></div><div class="ui-select-dropdown select2-drop select2-with-searchbox select2-drop-active" ng-class="{\'select2-display-none\': !$select.open}"><div class="select2-search" ng-show="$select.searchEnabled"><input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="combobox" aria-expanded="true" aria-owns="ui-select-choices-{{ $select.generatedId }}" aria-label="{{ $select.baseTitle }}" aria-activedescendant="ui-select-choices-row-{{ $select.generatedId }}-{{ $select.activeIndex }}" class="ui-select-search select2-input" ng-model="$select.search"></div><div class="ui-select-choices"></div></div></div>'),e.put("selectize/choices.tpl.html",'<div ng-show="$select.open" class="ui-select-choices ui-select-dropdown selectize-dropdown single"><div class="ui-select-choices-content selectize-dropdown-content"><div class="ui-select-choices-group optgroup" role="listbox"><div ng-show="$select.isGrouped" class="ui-select-choices-group-label optgroup-header" ng-bind="$group.name"></div><div role="option" class="ui-select-choices-row" ng-class="{active: $select.isActive(this), disabled: $select.isDisabled(this)}"><div class="option ui-select-choices-row-inner" data-selectable=""></div></div></div></div></div>'),e.put("selectize/match.tpl.html",'<div ng-hide="($select.open || $select.isEmpty())" class="ui-select-match" ng-transclude=""></div>'),e.put("selectize/select.tpl.html",'<div class="ui-select-container selectize-control single" ng-class="{\'open\': $select.open}"><div class="selectize-input" ng-class="{\'focus\': $select.open, \'disabled\': $select.disabled, \'selectize-focus\' : $select.focus}" ng-click="$select.activate()"><div class="ui-select-match"></div><input type="text" autocomplete="off" tabindex="-1" class="ui-select-search ui-select-toggle" ng-click="$select.toggle($event)" placeholder="{{$select.placeholder}}" ng-model="$select.search" ng-hide="!$select.searchEnabled || ($select.selected && !$select.open)" ng-disabled="$select.disabled" aria-label="{{ $select.baseTitle }}"></div><div class="ui-select-choices"></div></div>')}]),require.modules={},require.aliases={},require.resolve=function(e){"/"===e.charAt(0)&&(e=e.slice(1));for(var t=[e,e+".js",e+".json",e+"/index.js",e+"/index.json"],n=0;n<t.length;n++){var e=t[n];if(require.modules.hasOwnProperty(e))return e;if(require.aliases.hasOwnProperty(e))return require.aliases[e]}},require.normalize=function(e,t){var n=[];if("."!=t.charAt(0))return t;e=e.split("/"),t=t.split("/");for(var i=0;i<t.length;++i)".."==t[i]?e.pop():"."!=t[i]&&""!=t[i]&&n.push(t[i]);return e.concat(n).join("/")},require.register=function(e,t){require.modules[e]=t},require.alias=function(e,t){if(!require.modules.hasOwnProperty(e))throw new Error('Failed to alias "'+e+'", it does not exist');require.aliases[t]=e},require.relative=function(e){function t(e,t){for(var n=e.length;n--;)if(e[n]===t)return n;return-1}function n(t){return require(n.resolve(t),e,t)}var i=require.normalize(e,"..");return n.resolve=function(n){var r=n.charAt(0);if("/"==r)return n.slice(1);if("."==r)return require.normalize(i,n);var o=e.split("/"),a=t(o,"deps")+1;return a||(a=0),n=o.slice(0,a+1).join("/")+"/deps/"+n},n.exists=function(e){return require.modules.hasOwnProperty(n.resolve(e))},n},require.register("switchery/switchery.js",function(e,t,n){function i(e,t){if(!(this instanceof i))return new i(t);this.element=e,this.options=t||{};for(var n in r)n in this.options||(this.options[n]=r[n]);"checkbox"==this.element.type&&this.init()}n.exports=i;var r={color:"#64bd63",className:"switchery",disabled:!1,speed:"0.1s"};i.prototype.hide=function(){this.element.style.display="none"},i.prototype.show=function(){var e=this.create();this.element.parentNode.appendChild(e)},i.prototype.create=function(){return this.switcher=document.createElement("span"),this.jack=document.createElement("small"),this.switcher.appendChild(this.jack),this.switcher.className=this.options.className,this.switcher},i.prototype.isChecked=function(){return this.element.checked},i.prototype.isDisabled=function(){return this.options.disabled||this.element.disabled},i.prototype.setPosition=function(e){var t=this.isChecked(),n=this.switcher,i=this.jack;e&&t?t=!1:e&&!t&&(t=!0),!0===t?(this.element.checked=!0,window.getComputedStyle?i.style.left=parseInt(window.getComputedStyle(n).width)-i.offsetWidth+"px":i.style.left=parseInt(n.currentStyle.width)-i.offsetWidth+"px",this.options.color&&this.colorize()):(i.style.left="0",this.element.checked=!1,this.switcher.style.backgroundColor="",this.switcher.style.borderColor="")},i.prototype.setSpeed=function(){this.switcher.style.transitionDuration=this.options.speed,this.jack.style.transitionDuration=this.options.speed},i.prototype.setAttributes=function(){
-var e=this.element.getAttribute("id"),t=this.element.getAttribute("name");e&&this.switcher.setAttribute("id",e),t&&this.switcher.setAttribute("name",t)},i.prototype.colorize=function(){this.switcher.style.backgroundColor=this.options.color,this.switcher.style.borderColor=this.options.color},i.prototype.handleClick=function(){var e=this,t=this.switcher;!1===this.isDisabled()?t.addEventListener?t.addEventListener("click",function(){e.setPosition(!0)}):t.attachEvent("onclick",function(){e.setPosition(!0)}):this.element.disabled=!0},i.prototype.init=function(){this.hide(),this.show(),this.setSpeed(),this.setPosition(),this.setAttributes(),this.handleClick()}}),require.alias("switchery/switchery.js","switchery/index.js"),!function(){function e(t){var n=e.modules[t];if(!n)throw new Error('failed to require "'+t+'"');return"exports"in n||"function"!=typeof n.definition||(n.client=n.component=!0,n.definition.call(this,n.exports={},n),delete n.definition),n.exports}e.loader="component",e.helper={},e.helper.semVerSort=function(e,t){for(var n=e.version.split("."),i=t.version.split("."),r=0;r<n.length;++r){var o=parseInt(n[r],10),a=parseInt(i[r],10);if(o!==a)return o>a?1:-1;var s=n[r].substr((""+o).length),l=i[r].substr((""+a).length);if(""===s&&""!==l)return 1;if(""!==s&&""===l)return-1;if(""!==s&&""!==l)return s>l?1:-1}return 0},e.latest=function(t,n){function i(e){throw new Error('failed to find latest module of "'+e+'"')}var r=/(.*)~(.*)@v?(\d+\.\d+\.\d+[^\/]*)$/;/(.*)~(.*)/.test(t)||i(t);for(var o=Object.keys(e.modules),a=[],s=[],l=0;l<o.length;l++){var c=o[l];if(new RegExp(t+"@").test(c)){var u=c.substr(t.length+1);null!=r.exec(c)?a.push({version:u,name:c}):s.push({version:u,name:c})}}if(0===a.concat(s).length&&i(t),a.length>0){var d=a.sort(e.helper.semVerSort).pop().name;return!0===n?d:e(d)}var d=s.sort(function(e,t){return e.name>t.name})[0].name;return!0===n?d:e(d)},e.modules={},e.register=function(t,n){e.modules[t]={definition:n}},e.define=function(t,n){e.modules[t]={exports:n}},e.register("abpetkov~transitionize@0.0.3",function(e,t){function n(e,t){return this instanceof n?(this.element=e,this.props=t||{},void this.init()):new n(e,t)}t.exports=n,n.prototype.isSafari=function(){return/Safari/.test(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor)},n.prototype.init=function(){var e=[];for(var t in this.props)e.push(t+" "+this.props[t]);this.element.style.transition=e.join(", "),this.isSafari()&&(this.element.style.webkitTransition=e.join(", "))}}),e.register("ftlabs~fastclick@v0.6.11",function(e,t){function n(e){"use strict";var t,i=this;if(this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=10,this.layer=e,!e||!e.nodeType)throw new TypeError("Layer must be a document node");this.onClick=function(){return n.prototype.onClick.apply(i,arguments)},this.onMouse=function(){return n.prototype.onMouse.apply(i,arguments)},this.onTouchStart=function(){return n.prototype.onTouchStart.apply(i,arguments)},this.onTouchMove=function(){return n.prototype.onTouchMove.apply(i,arguments)},this.onTouchEnd=function(){return n.prototype.onTouchEnd.apply(i,arguments)},this.onTouchCancel=function(){return n.prototype.onTouchCancel.apply(i,arguments)},n.notNeeded(e)||(this.deviceIsAndroid&&(e.addEventListener("mouseover",this.onMouse,!0),e.addEventListener("mousedown",this.onMouse,!0),e.addEventListener("mouseup",this.onMouse,!0)),e.addEventListener("click",this.onClick,!0),e.addEventListener("touchstart",this.onTouchStart,!1),e.addEventListener("touchmove",this.onTouchMove,!1),e.addEventListener("touchend",this.onTouchEnd,!1),e.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(e.removeEventListener=function(t,n,i){var r=Node.prototype.removeEventListener;"click"===t?r.call(e,t,n.hijacked||n,i):r.call(e,t,n,i)},e.addEventListener=function(t,n,i){var r=Node.prototype.addEventListener;"click"===t?r.call(e,t,n.hijacked||(n.hijacked=function(e){e.propagationStopped||n(e)}),i):r.call(e,t,n,i)}),"function"==typeof e.onclick&&(t=e.onclick,e.addEventListener("click",function(e){t(e)},!1),e.onclick=null))}n.prototype.deviceIsAndroid=navigator.userAgent.indexOf("Android")>0,n.prototype.deviceIsIOS=/iP(ad|hone|od)/.test(navigator.userAgent),n.prototype.deviceIsIOS4=n.prototype.deviceIsIOS&&/OS 4_\d(_\d)?/.test(navigator.userAgent),n.prototype.deviceIsIOSWithBadTarget=n.prototype.deviceIsIOS&&/OS ([6-9]|\d{2})_\d/.test(navigator.userAgent),n.prototype.needsClick=function(e){"use strict";switch(e.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(e.disabled)return!0;break;case"input":if(this.deviceIsIOS&&"file"===e.type||e.disabled)return!0;break;case"label":case"video":return!0}return/\bneedsclick\b/.test(e.className)},n.prototype.needsFocus=function(e){"use strict";switch(e.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!this.deviceIsAndroid;case"input":switch(e.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!e.disabled&&!e.readOnly;default:return/\bneedsfocus\b/.test(e.className)}},n.prototype.sendClick=function(e,t){"use strict";var n,i;document.activeElement&&document.activeElement!==e&&document.activeElement.blur(),i=t.changedTouches[0],n=document.createEvent("MouseEvents"),n.initMouseEvent(this.determineEventType(e),!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),n.forwardedTouchEvent=!0,e.dispatchEvent(n)},n.prototype.determineEventType=function(e){"use strict";return this.deviceIsAndroid&&"select"===e.tagName.toLowerCase()?"mousedown":"click"},n.prototype.focus=function(e){"use strict";var t;this.deviceIsIOS&&e.setSelectionRange&&0!==e.type.indexOf("date")&&"time"!==e.type?(t=e.value.length,e.setSelectionRange(t,t)):e.focus()},n.prototype.updateScrollParent=function(e){"use strict";var t,n;if(!(t=e.fastClickScrollParent)||!t.contains(e)){n=e;do{if(n.scrollHeight>n.offsetHeight){t=n,e.fastClickScrollParent=n;break}n=n.parentElement}while(n)}t&&(t.fastClickLastScrollTop=t.scrollTop)},n.prototype.getTargetElementFromEventTarget=function(e){"use strict";return e.nodeType===Node.TEXT_NODE?e.parentNode:e},n.prototype.onTouchStart=function(e){"use strict";var t,n,i;if(e.targetTouches.length>1)return!0;if(t=this.getTargetElementFromEventTarget(e.target),n=e.targetTouches[0],this.deviceIsIOS){if(i=window.getSelection(),i.rangeCount&&!i.isCollapsed)return!0;if(!this.deviceIsIOS4){if(n.identifier===this.lastTouchIdentifier)return e.preventDefault(),!1;this.lastTouchIdentifier=n.identifier,this.updateScrollParent(t)}}return this.trackingClick=!0,this.trackingClickStart=e.timeStamp,this.targetElement=t,this.touchStartX=n.pageX,this.touchStartY=n.pageY,e.timeStamp-this.lastClickTime<200&&e.preventDefault(),!0},n.prototype.touchHasMoved=function(e){"use strict";var t=e.changedTouches[0],n=this.touchBoundary;return Math.abs(t.pageX-this.touchStartX)>n||Math.abs(t.pageY-this.touchStartY)>n},n.prototype.onTouchMove=function(e){"use strict";return!this.trackingClick||((this.targetElement!==this.getTargetElementFromEventTarget(e.target)||this.touchHasMoved(e))&&(this.trackingClick=!1,this.targetElement=null),!0)},n.prototype.findControl=function(e){"use strict";return void 0!==e.control?e.control:e.htmlFor?document.getElementById(e.htmlFor):e.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},n.prototype.onTouchEnd=function(e){"use strict";var t,n,i,r,o,a=this.targetElement;if(!this.trackingClick)return!0;if(e.timeStamp-this.lastClickTime<200)return this.cancelNextClick=!0,!0;if(this.cancelNextClick=!1,this.lastClickTime=e.timeStamp,n=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,this.deviceIsIOSWithBadTarget&&(o=e.changedTouches[0],a=document.elementFromPoint(o.pageX-window.pageXOffset,o.pageY-window.pageYOffset)||a,a.fastClickScrollParent=this.targetElement.fastClickScrollParent),"label"===(i=a.tagName.toLowerCase())){if(t=this.findControl(a)){if(this.focus(a),this.deviceIsAndroid)return!1;a=t}}else if(this.needsFocus(a))return e.timeStamp-n>100||this.deviceIsIOS&&window.top!==window&&"input"===i?(this.targetElement=null,!1):(this.focus(a),this.deviceIsIOS4&&"select"===i||(this.targetElement=null,e.preventDefault()),!1);return!(!this.deviceIsIOS||this.deviceIsIOS4||!(r=a.fastClickScrollParent)||r.fastClickLastScrollTop===r.scrollTop)||(this.needsClick(a)||(e.preventDefault(),this.sendClick(a,e)),!1)},n.prototype.onTouchCancel=function(){"use strict";this.trackingClick=!1,this.targetElement=null},n.prototype.onMouse=function(e){"use strict";return!this.targetElement||(!!e.forwardedTouchEvent||(!(e.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick))||(e.stopImmediatePropagation?e.stopImmediatePropagation():e.propagationStopped=!0,e.stopPropagation(),e.preventDefault(),!1)))},n.prototype.onClick=function(e){"use strict";var t;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===e.target.type&&0===e.detail||(t=this.onMouse(e),t||(this.targetElement=null),t)},n.prototype.destroy=function(){"use strict";var e=this.layer;this.deviceIsAndroid&&(e.removeEventListener("mouseover",this.onMouse,!0),e.removeEventListener("mousedown",this.onMouse,!0),e.removeEventListener("mouseup",this.onMouse,!0)),e.removeEventListener("click",this.onClick,!0),e.removeEventListener("touchstart",this.onTouchStart,!1),e.removeEventListener("touchmove",this.onTouchMove,!1),e.removeEventListener("touchend",this.onTouchEnd,!1),e.removeEventListener("touchcancel",this.onTouchCancel,!1)},n.notNeeded=function(e){"use strict";var t,i;if(void 0===window.ontouchstart)return!0;if(i=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!n.prototype.deviceIsAndroid)return!0;if(t=document.querySelector("meta[name=viewport]")){if(-1!==t.content.indexOf("user-scalable=no"))return!0;if(i>31&&window.innerWidth<=window.screen.width)return!0}}return"none"===e.style.msTouchAction},n.attach=function(e){"use strict";return new n(e)},"undefined"!=typeof define&&define.amd?define(function(){"use strict";return n}):void 0!==t&&t.exports?(t.exports=n.attach,t.exports.FastClick=n):window.FastClick=n}),e.register("component~indexof@0.0.3",function(e,t){t.exports=function(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0;n<e.length;++n)if(e[n]===t)return n;return-1}}),e.register("component~classes@1.2.1",function(t,n){function i(e){if(!e)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}var r=e("component~indexof@0.0.3"),o=/\s+/,a=Object.prototype.toString;n.exports=function(e){return new i(e)},i.prototype.add=function(e){if(this.list)return this.list.add(e),this;var t=this.array();return~r(t,e)||t.push(e),this.el.className=t.join(" "),this},i.prototype.remove=function(e){if("[object RegExp]"==a.call(e))return this.removeMatching(e);if(this.list)return this.list.remove(e),this;var t=this.array(),n=r(t,e);return~n&&t.splice(n,1),this.el.className=t.join(" "),this},i.prototype.removeMatching=function(e){for(var t=this.array(),n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},i.prototype.toggle=function(e,t){return this.list?(void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this):(void 0!==t?t?this.add(e):this.remove(e):this.has(e)?this.remove(e):this.add(e),this)},i.prototype.array=function(){var e=this.el.className.replace(/^\s+|\s+$/g,""),t=e.split(o);return""===t[0]&&t.shift(),t},i.prototype.has=i.prototype.contains=function(e){return this.list?this.list.contains(e):!!~r(this.array(),e)}}),e.register("component~event@0.1.4",function(e,t){var n=window.addEventListener?"addEventListener":"attachEvent",i=window.removeEventListener?"removeEventListener":"detachEvent",r="addEventListener"!==n?"on":"";e.bind=function(e,t,i,o){return e[n](r+t,i,o||!1),i},e.unbind=function(e,t,n,o){return e[i](r+t,n,o||!1),n}}),e.register("component~query@0.0.3",function(e,t){function n(e,t){return t.querySelector(e)}e=t.exports=function(e,t){return t=t||document,n(e,t)},e.all=function(e,t){return t=t||document,t.querySelectorAll(e)},e.engine=function(t){if(!t.one)throw new Error(".one callback required");if(!t.all)throw new Error(".all callback required");return n=t.one,e.all=t.all,e}}),e.register("component~matches-selector@0.1.5",function(t,n){function i(e,t){if(!e||1!==e.nodeType)return!1;if(a)return a.call(e,t);for(var n=r.all(t,e.parentNode),i=0;i<n.length;++i)if(n[i]==e)return!0;return!1}var r=e("component~query@0.0.3"),o=Element.prototype,a=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.msMatchesSelector||o.oMatchesSelector;n.exports=i}),e.register("component~closest@0.1.4",function(t,n){var i=e("component~matches-selector@0.1.5");n.exports=function(e,t,n,r){for(e=n?{parentNode:e}:e,r=r||document;(e=e.parentNode)&&e!==document;){if(i(e,t))return e;if(e===r)return}}}),e.register("component~delegate@0.2.3",function(t,n){var i=e("component~closest@0.1.4"),r=e("component~event@0.1.4");t.bind=function(e,t,n,o,a){return r.bind(e,n,function(n){var r=n.target||n.srcElement;n.delegateTarget=i(r,t,!0,e),n.delegateTarget&&o.call(e,n)},a)},t.unbind=function(e,t,n,i){r.unbind(e,t,n,i)}}),e.register("component~events@1.0.9",function(t,n){function i(e,t){if(!(this instanceof i))return new i(e,t);if(!e)throw new Error("element required");if(!t)throw new Error("object required");this.el=e,this.obj=t,this._events={}}function r(e){var t=e.split(/ +/);return{name:t.shift(),selector:t.join(" ")}}var o=e("component~event@0.1.4"),a=e("component~delegate@0.2.3");n.exports=i,i.prototype.sub=function(e,t,n){this._events[e]=this._events[e]||{},this._events[e][t]=n},i.prototype.bind=function(e,t){function n(){var e=[].slice.call(arguments).concat(u);l[t].apply(l,e)}var i=r(e),s=this.el,l=this.obj,c=i.name,t=t||"on"+c,u=[].slice.call(arguments,2);return i.selector?n=a.bind(s,i.selector,c,n):o.bind(s,c,n),this.sub(c,t,n),n},i.prototype.unbind=function(e,t){if(0==arguments.length)return this.unbindAll();if(1==arguments.length)return this.unbindAllOf(e);var n=this._events[e];if(n){var i=n[t];i&&o.unbind(this.el,e,i)}},i.prototype.unbindAll=function(){for(var e in this._events)this.unbindAllOf(e)},i.prototype.unbindAllOf=function(e){var t=this._events[e];if(t)for(var n in t)this.unbind(e,n)}}),e.register("switchery",function(t,n){function i(e,t){if(!(this instanceof i))return new i(e,t);this.element=e,this.options=t||{};for(var n in l)null==this.options[n]&&(this.options[n]=l[n]);null!=this.element&&"checkbox"==this.element.type&&this.init(),!0===this.isDisabled()&&this.disable()}var r=e("abpetkov~transitionize@0.0.3"),o=e("ftlabs~fastclick@v0.6.11"),a=e("component~classes@1.2.1"),s=e("component~events@1.0.9");n.exports=i;var l={color:"#64bd63",secondaryColor:"#dfdfdf",jackColor:"#fff",jackSecondaryColor:null,className:"switchery",disabled:!1,disabledOpacity:.5,speed:"0.4s",size:"default"};i.prototype.hide=function(){this.element.style.display="none"},i.prototype.show=function(){var e=this.create();this.insertAfter(this.element,e)},i.prototype.create=function(){return this.switcher=document.createElement("span"),this.jack=document.createElement("small"),this.switcher.appendChild(this.jack),this.switcher.className=this.options.className,this.events=s(this.switcher,this),this.switcher},i.prototype.insertAfter=function(e,t){e.parentNode.insertBefore(t,e.nextSibling)},i.prototype.setPosition=function(e){var t=this.isChecked(),n=this.switcher,i=this.jack;e&&t?t=!1:e&&!t&&(t=!0),!0===t?(this.element.checked=!0,i.style.left=window.getComputedStyle?parseInt(window.getComputedStyle(n).width)-parseInt(window.getComputedStyle(i).width)+"px":parseInt(n.currentStyle.width)-parseInt(i.currentStyle.width)+"px",this.options.color&&this.colorize(),this.setSpeed()):(i.style.left=0,this.element.checked=!1,this.switcher.style.boxShadow="inset 0 0 0 0 "+this.options.secondaryColor,this.switcher.style.borderColor=this.options.secondaryColor,this.switcher.style.backgroundColor=this.options.secondaryColor!==l.secondaryColor?this.options.secondaryColor:"#fff",this.jack.style.backgroundColor=this.options.jackSecondaryColor!==this.options.jackColor?this.options.jackSecondaryColor:this.options.jackColor,this.setSpeed())},i.prototype.setSpeed=function(){var e={},t={"background-color":this.options.speed,left:this.options.speed.replace(/[a-z]/,"")/2+"s"};e=this.isChecked()?{border:this.options.speed,"box-shadow":this.options.speed,"background-color":3*this.options.speed.replace(/[a-z]/,"")+"s"}:{border:this.options.speed,"box-shadow":this.options.speed},r(this.switcher,e),r(this.jack,t)},i.prototype.setSize=function(){switch(this.options.size){case"small":a(this.switcher).add("switchery-small");break;case"large":a(this.switcher).add("switchery-large");break;default:a(this.switcher).add("switchery-default")}},i.prototype.colorize=function(){var e=this.switcher.offsetHeight/2;this.switcher.style.backgroundColor=this.options.color,this.switcher.style.borderColor=this.options.color,this.switcher.style.boxShadow="inset 0 0 0 "+e+"px "+this.options.color,this.jack.style.backgroundColor=this.options.jackColor},i.prototype.handleOnchange=function(e){if(document.dispatchEvent){var t=document.createEvent("HTMLEvents");t.initEvent("change",!0,!0),this.element.dispatchEvent(t)}else this.element.fireEvent("onchange")},i.prototype.handleChange=function(){var e=this,t=this.element;t.addEventListener?t.addEventListener("change",function(){e.setPosition()}):t.attachEvent("onchange",function(){e.setPosition()})},i.prototype.handleClick=function(){var e=this.switcher;o(e),this.events.bind("click","bindClick")},i.prototype.bindClick=function(){var e=this.element.parentNode.tagName.toLowerCase(),t="label"!==e;this.setPosition(t),this.handleOnchange(this.element.checked)},i.prototype.markAsSwitched=function(){this.element.setAttribute("data-switchery",!0)},i.prototype.markedAsSwitched=function(){return this.element.getAttribute("data-switchery")},i.prototype.init=function(){this.hide(),this.show(),this.setSize(),this.setPosition(),this.markAsSwitched(),this.handleChange(),this.handleClick()},i.prototype.isChecked=function(){return this.element.checked},i.prototype.isDisabled=function(){return this.options.disabled||this.element.disabled||this.element.readOnly},i.prototype.destroy=function(){this.events.unbind()},i.prototype.enable=function(){this.options.disabled&&(this.options.disabled=!1),this.element.disabled&&(this.element.disabled=!1),this.element.readOnly&&(this.element.readOnly=!1),this.switcher.style.opacity=1,this.events.bind("click","bindClick")},i.prototype.disable=function(){this.options.disabled||(this.options.disabled=!0),this.element.disabled||(this.element.disabled=!0),this.element.readOnly||(this.element.readOnly=!0),this.switcher.style.opacity=this.options.disabledOpacity,this.destroy()}}),"object"==typeof exports?module.exports=e("switchery"):"function"==typeof define&&define.amd?define("Switchery",[],function(){return e("switchery")}):(this||window).Switchery=e("switchery")}(),angular.module("NgSwitchery",[]).directive("uiSwitch",["$window","$timeout","$log","$parse",function(e,t,n,i){function r(n,r,o,a){function s(){t(function(){c&&angular.element(c.switcher).remove(),c=new e.Switchery(r[0],l);var t=c.element;t.checked=n.initValue,c.setPosition(!1),t.addEventListener("change",function(e){n.$apply(function(){a.$setViewValue(t.checked)})})},0)}if(!a)return!1;var l={};try{l=i(o.uiSwitch)(n)}catch(e){}var c,u;o.$observe("disabled",function(e){void 0!=e&&e!=u&&(u=e,s())}),s()}return{require:"ngModel",restrict:"AE",scope:{initValue:"=ngModel"},link:r}}]),function(){function e(e){return["$rootScope","$window",function(t,n){for(var i,r,o,a=n[e]||(console.warn("This browser does not support Web Storage!"),{}),s={$default:function(e){for(var t in e)angular.isDefined(s[t])||(s[t]=e[t]);return s},$reset:function(e){for(var t in s)"$"===t[0]||delete s[t];return s.$default(e)}},l=0;l<a.length;l++)(o=a.key(l))&&"ngStorage-"===o.slice(0,10)&&(s[o.slice(10)]=angular.fromJson(a.getItem(o)));return i=angular.copy(s),t.$watch(function(){r||(r=setTimeout(function(){if(r=null,!angular.equals(s,i)){angular.forEach(s,function(e,t){angular.isDefined(e)&&"$"!==t[0]&&a.setItem("ngStorage-"+t,angular.toJson(e)),delete i[t]});for(var e in i)a.removeItem("ngStorage-"+e);i=angular.copy(s)}},100))}),"localStorage"===e&&n.addEventListener&&n.addEventListener("storage",function(e){"ngStorage-"===e.key.slice(0,10)&&(e.newValue?s[e.key.slice(10)]=angular.fromJson(e.newValue):delete s[e.key.slice(10)],i=angular.copy(s),t.$apply())}),s}]}angular.module("ngStorage",[]).factory("$localStorage",e("localStorage")).factory("$sessionStorage",e("sessionStorage"))}(); \ No newline at end of file
+function require(e,t,n){var i=require.resolve(e);if(null==i){n=n||e,t=t||"root";var r=new Error('Failed to require "'+n+'" from "'+t+'"');throw r.path=n,r.parent=t,r.require=!0,r}var o=require.modules[i];if(!o._resolving&&!o.exports){var a={};a.exports={},a.client=a.component=!0,o._resolving=!0,o.call(this,a.exports,require.relative(i),a),delete o._resolving,o.exports=a.exports}return o.exports}if(function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=e.length,n=J.type(e);return"function"!==n&&!J.isWindow(e)&&(!(1!==e.nodeType||!t)||("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e))}function i(e,t,n){if(J.isFunction(t))return J.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return J.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(ae.test(t))return J.filter(t,e,n);t=J.filter(t,e)}return J.grep(e,function(e){return z.call(t,e)>=0!==n})}function r(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function o(e){var t=fe[e]={};return J.each(e.match(de)||[],function(e,n){t[n]=!0}),t}function a(){Z.removeEventListener("DOMContentLoaded",a,!1),e.removeEventListener("load",a,!1),J.ready()}function s(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=J.expando+Math.random()}function l(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace($e,"-$1").toLowerCase(),"string"==typeof(n=e.getAttribute(i))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:ve.test(n)?J.parseJSON(n):n)}catch(e){}me.set(e,t,n)}else n=void 0;return n}function c(){return!0}function u(){return!1}function d(){try{return Z.activeElement}catch(e){}}function f(e,t){return J.nodeName(e,"table")&&J.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function p(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function h(e){var t=Pe.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function g(e,t){for(var n=0,i=e.length;n<i;n++)ge.set(e[n],"globalEval",!t||ge.get(t[n],"globalEval"))}function m(e,t){var n,i,r,o,a,s,l,c;if(1===t.nodeType){if(ge.hasData(e)&&(o=ge.access(e),a=ge.set(t,o),c=o.events)){delete a.handle,a.events={};for(r in c)for(n=0,i=c[r].length;n<i;n++)J.event.add(t,r,c[r][n])}me.hasData(e)&&(s=me.access(e),l=J.extend({},s),me.set(t,l))}}function v(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&J.nodeName(e,t)?J.merge([e],n):n}function $(e,t){var n=t.nodeName.toLowerCase();"input"===n&&xe.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function y(t,n){var i,r=J(n.createElement(t)).appendTo(n.body),o=e.getDefaultComputedStyle&&(i=e.getDefaultComputedStyle(r[0]))?i.display:J.css(r[0],"display");return r.detach(),o}function b(e){var t=Z,n=Le[e];return n||(n=y(e,t),"none"!==n&&n||(Fe=(Fe||J("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=Fe[0].contentDocument,t.write(),t.close(),n=y(e,t),Fe.detach()),Le[e]=n),n}function w(e,t,n){var i,r,o,a,s=e.style;return n=n||He(e),n&&(a=n.getPropertyValue(t)||n[t]),n&&(""!==a||J.contains(e.ownerDocument,e)||(a=J.style(e,t)),Ve.test(a)&&Re.test(t)&&(i=s.width,r=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=i,s.minWidth=r,s.maxWidth=o)),void 0!==a?a+"":a}function x(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function C(e,t){if(t in e)return t;for(var n=t[0].toUpperCase()+t.slice(1),i=t,r=ze.length;r--;)if((t=ze[r]+n)in e)return t;return i}function k(e,t,n){var i=Ue.exec(t);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):t}function S(e,t,n,i,r){for(var o=n===(i?"border":"content")?4:"width"===t?1:0,a=0;o<4;o+=2)"margin"===n&&(a+=J.css(e,n+be[o],!0,r)),i?("content"===n&&(a-=J.css(e,"padding"+be[o],!0,r)),"margin"!==n&&(a-=J.css(e,"border"+be[o]+"Width",!0,r))):(a+=J.css(e,"padding"+be[o],!0,r),"padding"!==n&&(a+=J.css(e,"border"+be[o]+"Width",!0,r)));return a}function E(e,t,n){var i=!0,r="width"===t?e.offsetWidth:e.offsetHeight,o=He(e),a="border-box"===J.css(e,"boxSizing",!1,o);if(r<=0||null==r){if(r=w(e,t,o),(r<0||null==r)&&(r=e.style[t]),Ve.test(r))return r;i=a&&(X.boxSizingReliable()||r===e.style[t]),r=parseFloat(r)||0}return r+S(e,t,n||(a?"border":"content"),i,o)+"px"}function T(e,t){for(var n,i,r,o=[],a=0,s=e.length;a<s;a++)i=e[a],i.style&&(o[a]=ge.get(i,"olddisplay"),n=i.style.display,t?(o[a]||"none"!==n||(i.style.display=""),""===i.style.display&&we(i)&&(o[a]=ge.access(i,"olddisplay",b(i.nodeName)))):(r=we(i),"none"===n&&r||ge.set(i,"olddisplay",r?n:J.css(i,"display"))));for(a=0;a<s;a++)i=e[a],i.style&&(t&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=t?o[a]||"":"none"));return e}function D(e,t,n,i,r){return new D.prototype.init(e,t,n,i,r)}function A(){return setTimeout(function(){Ye=void 0}),Ye=J.now()}function M(e,t){var n,i=0,r={height:e};for(t=t?1:0;i<4;i+=2-t)n=be[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function O(e,t,n){for(var i,r=(Qe[t]||[]).concat(Qe["*"]),o=0,a=r.length;o<a;o++)if(i=r[o].call(n,t,e))return i}function I(e,t,n){var i,r,o,a,s,l,c,u=this,d={},f=e.style,p=e.nodeType&&we(e),h=ge.get(e,"fxshow");n.queue||(s=J._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,J.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],c=J.css(e,"display"),"inline"===("none"===c?ge.get(e,"olddisplay")||b(e.nodeName):c)&&"none"===J.css(e,"float")&&(f.display="inline-block")),n.overflow&&(f.overflow="hidden",u.always(function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}));for(i in t)if(r=t[i],Ge.exec(r)){if(delete t[i],o=o||"toggle"===r,r===(p?"hide":"show")){if("show"!==r||!h||void 0===h[i])continue;p=!0}d[i]=h&&h[i]||J.style(e,i)}else c=void 0;if(J.isEmptyObject(d))"inline"===("none"===c?b(e.nodeName):c)&&(f.display=c);else{h?"hidden"in h&&(p=h.hidden):h=ge.access(e,"fxshow",{}),o&&(h.hidden=!p),p?J(e).show():u.done(function(){J(e).hide()}),u.done(function(){var t;ge.remove(e,"fxshow");for(t in d)J.style(e,t,d[t])});for(i in d)a=O(p?h[i]:0,i,u),i in h||(h[i]=a.start,p&&(a.end=a.start,a.start="width"===i||"height"===i?1:0))}}function P(e,t){var n,i,r,o,a;for(n in e)if(i=J.camelCase(n),r=t[i],o=e[n],J.isArray(o)&&(r=o[1],o=e[n]=o[0]),n!==i&&(e[i]=o,delete e[n]),(a=J.cssHooks[i])&&"expand"in a){o=a.expand(o),delete e[i];for(n in o)n in e||(e[n]=o[n],t[n]=r)}else t[i]=r}function N(e,t,n){var i,r,o=0,a=Je.length,s=J.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var t=Ye||A(),n=Math.max(0,c.startTime+c.duration-t),i=n/c.duration||0,o=1-i,a=0,l=c.tweens.length;a<l;a++)c.tweens[a].run(o);return s.notifyWith(e,[c,o,n]),o<1&&l?n:(s.resolveWith(e,[c]),!1)},c=s.promise({elem:e,props:J.extend({},t),opts:J.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Ye||A(),duration:n.duration,tweens:[],createTween:function(t,n){var i=J.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(i),i},stop:function(t){var n=0,i=t?c.tweens.length:0;if(r)return this;for(r=!0;n<i;n++)c.tweens[n].run(1);return t?s.resolveWith(e,[c,t]):s.rejectWith(e,[c,t]),this}}),u=c.props;for(P(u,c.opts.specialEasing);o<a;o++)if(i=Je[o].call(c,e,u,c.opts))return i;return J.map(u,O,c),J.isFunction(c.opts.start)&&c.opts.start.call(e,c),J.fx.timer(J.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function j(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,o=t.toLowerCase().match(de)||[];if(J.isFunction(n))for(;i=o[r++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function F(e,t,n,i){function r(s){var l;return o[s]=!0,J.each(e[s]||[],function(e,s){var c=s(t,n,i);return"string"!=typeof c||a||o[c]?a?!(l=c):void 0:(t.dataTypes.unshift(c),r(c),!1)}),l}var o={},a=e===vt;return r(t.dataTypes[0])||!o["*"]&&r("*")}function L(e,t){var n,i,r=J.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:i||(i={}))[n]=t[n]);return i&&J.extend(!0,e,i),e}function R(e,t,n){for(var i,r,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(r in s)if(s[r]&&s[r].test(i)){l.unshift(r);break}if(l[0]in n)o=l[0];else{for(r in n){if(!l[0]||e.converters[r+" "+l[0]]){o=r;break}a||(a=r)}o=o||a}if(o)return o!==l[0]&&l.unshift(o),n[o]}function V(e,t,n,i){var r,o,a,s,l,c={},u=e.dataTypes.slice();if(u[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(o=u.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=u.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(a=c[l+" "+o]||c["* "+o]))for(r in c)if(s=r.split(" "),s[1]===o&&(a=c[l+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[r]:!0!==c[r]&&(o=s[0],u.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}function H(e,t,n,i){var r;if(J.isArray(t))J.each(t,function(t,r){n||bt.test(e)?i(e,r):H(e+"["+("object"==typeof r?t:"")+"]",r,n,i)});else if(n||"object"!==J.type(t))i(e,t);else for(r in t)H(e+"["+r+"]",t[r],n,i)}function q(e){return J.isWindow(e)?e:9===e.nodeType&&e.defaultView}var U=[],_=U.slice,B=U.concat,W=U.push,z=U.indexOf,Y={},K=Y.toString,G=Y.hasOwnProperty,X={},Z=e.document,J=function(e,t){return new J.fn.init(e,t)},Q=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ee=/^-ms-/,te=/-([\da-z])/gi,ne=function(e,t){return t.toUpperCase()};J.fn=J.prototype={jquery:"2.1.1",constructor:J,selector:"",length:0,toArray:function(){return _.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:_.call(this)},pushStack:function(e){var t=J.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return J.each(this,e,t)},map:function(e){return this.pushStack(J.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(_.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:W,sort:U.sort,splice:U.splice},J.extend=J.fn.extend=function(){var e,t,n,i,r,o,a=arguments[0]||{},s=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||J.isFunction(a)||(a={}),s===l&&(a=this,s--);s<l;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],i=e[t],a!==i&&(c&&i&&(J.isPlainObject(i)||(r=J.isArray(i)))?(r?(r=!1,o=n&&J.isArray(n)?n:[]):o=n&&J.isPlainObject(n)?n:{},a[t]=J.extend(c,o,i)):void 0!==i&&(a[t]=i));return a},J.extend({expando:"jQuery"+("2.1.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===J.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return!J.isArray(e)&&e-parseFloat(e)>=0},isPlainObject:function(e){return"object"===J.type(e)&&!e.nodeType&&!J.isWindow(e)&&!(e.constructor&&!G.call(e.constructor.prototype,"isPrototypeOf"))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?Y[K.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;(e=J.trim(e))&&(1===e.indexOf("use strict")?(t=Z.createElement("script"),t.text=e,Z.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(ee,"ms-").replace(te,ne)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,i){var r=0,o=e.length,a=n(e);if(i){if(a)for(;r<o&&!1!==t.apply(e[r],i);r++);else for(r in e)if(!1===t.apply(e[r],i))break}else if(a)for(;r<o&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(Q,"")},makeArray:function(e,t){var i=t||[];return null!=e&&(n(Object(e))?J.merge(i,"string"==typeof e?[e]:e):W.call(i,e)),i},inArray:function(e,t,n){return null==t?-1:z.call(t,e,n)},merge:function(e,t){for(var n=+t.length,i=0,r=e.length;i<n;i++)e[r++]=t[i];return e.length=r,e},grep:function(e,t,n){for(var i=[],r=0,o=e.length,a=!n;r<o;r++)!t(e[r],r)!==a&&i.push(e[r]);return i},map:function(e,t,i){var r,o=0,a=e.length,s=n(e),l=[];if(s)for(;o<a;o++)null!=(r=t(e[o],o,i))&&l.push(r);else for(o in e)null!=(r=t(e[o],o,i))&&l.push(r);return B.apply([],l)},guid:1,proxy:function(e,t){var n,i,r;if("string"==typeof t&&(n=e[t],t=e,e=n),J.isFunction(e))return i=_.call(arguments,2),r=function(){return e.apply(t||this,i.concat(_.call(arguments)))},r.guid=e.guid=e.guid||J.guid++,r},now:Date.now,support:X}),J.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){Y["[object "+t+"]"]=t.toLowerCase()});var ie=function(e){function t(e,t,n,i){var r,o,a,s,c,d,f,p,h,g;if((t?t.ownerDocument||t:R)!==M&&A(t),t=t||M,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(I&&!i){if(r=me.exec(e))if(a=r[1]){if(9===s){if(!(o=t.getElementById(a))||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&F(t,o)&&o.id===a)return n.push(o),n}else{if(r[2])return Z.apply(n,t.getElementsByTagName(e)),n;if((a=r[3])&&y.getElementsByClassName&&t.getElementsByClassName)return Z.apply(n,t.getElementsByClassName(a)),n}if(y.qsa&&(!P||!P.test(e))){if(p=f=L,h=t,g=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(d=C(e),(f=t.getAttribute("id"))?p=f.replace($e,"\\$&"):t.setAttribute("id",p),p="[id='"+p+"'] ",c=d.length;c--;)d[c]=p+u(d[c]);h=ve.test(e)&&l(t.parentNode)||t,g=d.join(",")}if(g)try{return Z.apply(n,h.querySelectorAll(g)),n}catch(e){}finally{f||t.removeAttribute("id")}}}return S(e.replace(ae,"$1"),t,n,i)}function n(){function e(n,i){return t.push(n+" ")>b.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[L]=!0,e}function r(e){var t=M.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),i=e.length;i--;)b.attrHandle[n[i]]=t}function a(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||z)-(~e.sourceIndex||z);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return i(function(t){return t=+t,i(function(n,i){for(var r,o=e([],n.length,t),a=o.length;a--;)n[r=o[a]]&&(n[r]=!(i[r]=n[r]))})})}function l(e){return e&&typeof e.getElementsByTagName!==W&&e}function c(){}function u(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function d(e,t,n){var i=t.dir,r=n&&"parentNode"===i,o=H++;return t.first?function(t,n,o){for(;t=t[i];)if(1===t.nodeType||r)return e(t,n,o)}:function(t,n,a){var s,l,c=[V,o];if(a){for(;t=t[i];)if((1===t.nodeType||r)&&e(t,n,a))return!0}else for(;t=t[i];)if(1===t.nodeType||r){if(l=t[L]||(t[L]={}),(s=l[i])&&s[0]===V&&s[1]===o)return c[2]=s[2];if(l[i]=c,c[2]=e(t,n,a))return!0}}}function f(e){return e.length>1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function p(e,n,i){for(var r=0,o=n.length;r<o;r++)t(e,n[r],i);return i}function h(e,t,n,i,r){for(var o,a=[],s=0,l=e.length,c=null!=t;s<l;s++)(o=e[s])&&(n&&!n(o,i,r)||(a.push(o),c&&t.push(s)));return a}function g(e,t,n,r,o,a){return r&&!r[L]&&(r=g(r)),o&&!o[L]&&(o=g(o,a)),i(function(i,a,s,l){var c,u,d,f=[],g=[],m=a.length,v=i||p(t||"*",s.nodeType?[s]:s,[]),$=!e||!i&&t?v:h(v,f,e,s,l),y=n?o||(i?e:m||r)?[]:a:$;if(n&&n($,y,s,l),r)for(c=h(y,g),r(c,[],s,l),u=c.length;u--;)(d=c[u])&&(y[g[u]]=!($[g[u]]=d));if(i){if(o||e){if(o){for(c=[],u=y.length;u--;)(d=y[u])&&c.push($[u]=d);o(null,y=[],c,l)}for(u=y.length;u--;)(d=y[u])&&(c=o?Q.call(i,d):f[u])>-1&&(i[c]=!(a[c]=d))}}else y=h(y===a?y.splice(m,y.length):y),o?o(null,a,y,l):Z.apply(a,y)})}function m(e){for(var t,n,i,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,l=d(function(e){return e===t},a,!0),c=d(function(e){return Q.call(t,e)>-1},a,!0),p=[function(e,n,i){return!o&&(i||n!==E)||((t=n).nodeType?l(e,n,i):c(e,n,i))}];s<r;s++)if(n=b.relative[e[s].type])p=[d(f(p),n)];else{if(n=b.filter[e[s].type].apply(null,e[s].matches),n[L]){for(i=++s;i<r&&!b.relative[e[i].type];i++);return g(s>1&&f(p),s>1&&u(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ae,"$1"),n,s<i&&m(e.slice(s,i)),i<r&&m(e=e.slice(i)),i<r&&u(e))}p.push(n)}return f(p)}function v(e,n){var r=n.length>0,o=e.length>0,a=function(i,a,s,l,c){var u,d,f,p=0,g="0",m=i&&[],v=[],$=E,y=i||o&&b.find.TAG("*",c),w=V+=null==$?1:Math.random()||.1,x=y.length;for(c&&(E=a!==M&&a);g!==x&&null!=(u=y[g]);g++){if(o&&u){for(d=0;f=e[d++];)if(f(u,a,s)){l.push(u);break}c&&(V=w)}r&&((u=!f&&u)&&p--,i&&m.push(u))}if(p+=g,r&&g!==p){for(d=0;f=n[d++];)f(m,v,a,s);if(i){if(p>0)for(;g--;)m[g]||v[g]||(v[g]=G.call(l));v=h(v)}Z.apply(l,v),c&&!i&&v.length>0&&p+n.length>1&&t.uniqueSort(l)}return c&&(V=w,E=$),m};return r?i(a):a}var $,y,b,w,x,C,k,S,E,T,D,A,M,O,I,P,N,j,F,L="sizzle"+-new Date,R=e.document,V=0,H=0,q=n(),U=n(),_=n(),B=function(e,t){return e===t&&(D=!0),0},W="undefined",z=1<<31,Y={}.hasOwnProperty,K=[],G=K.pop,X=K.push,Z=K.push,J=K.slice,Q=K.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1},ee="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",te="[\\x20\\t\\r\\n\\f]",ne="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ie=ne.replace("w","w#"),re="\\["+te+"*("+ne+")(?:"+te+"*([*^$|!~]?=)"+te+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ie+"))|)"+te+"*\\]",oe=":("+ne+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+re+")*)|.*)\\)|)",ae=new RegExp("^"+te+"+|((?:^|[^\\\\])(?:\\\\.)*)"+te+"+$","g"),se=new RegExp("^"+te+"*,"+te+"*"),le=new RegExp("^"+te+"*([>+~]|"+te+")"+te+"*"),ce=new RegExp("="+te+"*([^\\]'\"]*?)"+te+"*\\]","g"),ue=new RegExp(oe),de=new RegExp("^"+ie+"$"),fe={ID:new RegExp("^#("+ne+")"),CLASS:new RegExp("^\\.("+ne+")"),TAG:new RegExp("^("+ne.replace("w","w*")+")"),ATTR:new RegExp("^"+re),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+te+"*(even|odd|(([+-]|)(\\d*)n|)"+te+"*(?:([+-]|)"+te+"*(\\d+)|))"+te+"*\\)|)","i"),bool:new RegExp("^(?:"+ee+")$","i"),needsContext:new RegExp("^"+te+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+te+"*((?:-\\d)?\\d*)"+te+"*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,he=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,me=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,$e=/'|\\/g,ye=new RegExp("\\\\([\\da-f]{1,6}"+te+"?|("+te+")|.)","ig"),be=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)};try{Z.apply(K=J.call(R.childNodes),R.childNodes),K[R.childNodes.length].nodeType}catch(e){Z={apply:K.length?function(e,t){X.apply(e,J.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}y=t.support={},x=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},A=t.setDocument=function(e){var t,n=e?e.ownerDocument||e:R,i=n.defaultView;return n!==M&&9===n.nodeType&&n.documentElement?(M=n,O=n.documentElement,I=!x(n),i&&i!==i.top&&(i.addEventListener?i.addEventListener("unload",function(){A()},!1):i.attachEvent&&i.attachEvent("onunload",function(){A()})),y.attributes=r(function(e){return e.className="i",!e.getAttribute("className")}),y.getElementsByTagName=r(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),y.getElementsByClassName=ge.test(n.getElementsByClassName)&&r(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),y.getById=r(function(e){return O.appendChild(e).id=L,!n.getElementsByName||!n.getElementsByName(L).length}),y.getById?(b.find.ID=function(e,t){if(typeof t.getElementById!==W&&I){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},b.filter.ID=function(e){var t=e.replace(ye,be);return function(e){return e.getAttribute("id")===t}}):(delete b.find.ID,b.filter.ID=function(e){var t=e.replace(ye,be);return function(e){var n=typeof e.getAttributeNode!==W&&e.getAttributeNode("id");return n&&n.value===t}}),b.find.TAG=y.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==W)return t.getElementsByTagName(e)}:function(e,t){var n,i=[],r=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},b.find.CLASS=y.getElementsByClassName&&function(e,t){if(typeof t.getElementsByClassName!==W&&I)return t.getElementsByClassName(e)},N=[],P=[],(y.qsa=ge.test(n.querySelectorAll))&&(r(function(e){e.innerHTML="<select msallowclip=''><option selected=''></option></select>",e.querySelectorAll("[msallowclip^='']").length&&P.push("[*^$]="+te+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||P.push("\\["+te+"*(?:value|"+ee+")"),e.querySelectorAll(":checked").length||P.push(":checked")}),r(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&P.push("name"+te+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||P.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),P.push(",.*:")})),(y.matchesSelector=ge.test(j=O.matches||O.webkitMatchesSelector||O.mozMatchesSelector||O.oMatchesSelector||O.msMatchesSelector))&&r(function(e){y.disconnectedMatch=j.call(e,"div"),j.call(e,"[s!='']:x"),N.push("!=",oe)}),P=P.length&&new RegExp(P.join("|")),N=N.length&&new RegExp(N.join("|")),t=ge.test(O.compareDocumentPosition),F=t||ge.test(O.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},B=t?function(e,t){if(e===t)return D=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i||(i=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&i||!y.sortDetached&&t.compareDocumentPosition(e)===i?e===n||e.ownerDocument===R&&F(R,e)?-1:t===n||t.ownerDocument===R&&F(R,t)?1:T?Q.call(T,e)-Q.call(T,t):0:4&i?-1:1)}:function(e,t){if(e===t)return D=!0,0;var i,r=0,o=e.parentNode,s=t.parentNode,l=[e],c=[t];if(!o||!s)return e===n?-1:t===n?1:o?-1:s?1:T?Q.call(T,e)-Q.call(T,t):0;if(o===s)return a(e,t);for(i=e;i=i.parentNode;)l.unshift(i);for(i=t;i=i.parentNode;)c.unshift(i);for(;l[r]===c[r];)r++;return r?a(l[r],c[r]):l[r]===R?-1:c[r]===R?1:0},n):M},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==M&&A(e),n=n.replace(ce,"='$1']"),y.matchesSelector&&I&&(!N||!N.test(n))&&(!P||!P.test(n)))try{var i=j.call(e,n);if(i||y.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){}return t(n,M,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==M&&A(e),F(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==M&&A(e);var n=b.attrHandle[t.toLowerCase()],i=n&&Y.call(b.attrHandle,t.toLowerCase())?n(e,t,!I):void 0;return void 0!==i?i:y.attributes||!I?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,r=0;if(D=!y.detectDuplicates,T=!y.sortStable&&e.slice(0),e.sort(B),D){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return T=null,e},w=t.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=w(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=w(t);return n},b=t.selectors={cacheLength:50,createPseudo:i,match:fe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ye,be),e[3]=(e[3]||e[4]||e[5]||"").replace(ye,be),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return fe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ue.test(n)&&(t=C(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ye,be).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=q[e+" "];return t||(t=new RegExp("(^|"+te+")"+e+"("+te+"|$)"))&&q(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==W&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(r){var o=t.attr(r,e);return null==o?"!="===n:!n||(o+="","="===n?o===i:"!="===n?o!==i:"^="===n?i&&0===o.indexOf(i):"*="===n?i&&o.indexOf(i)>-1:"$="===n?i&&o.slice(-i.length)===i:"~="===n?(" "+o+" ").indexOf(i)>-1:"|="===n&&(o===i||o.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,n,i,r){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,f,p,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),$=!l&&!s;if(m){if(o){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&$){for(u=m[L]||(m[L]={}),c=u[e]||[],p=c[0]===V&&c[1],f=c[0]===V&&c[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(f=p=0)||h.pop();)if(1===d.nodeType&&++f&&d===t){u[e]=[V,p,f];break}}else if($&&(c=(t[L]||(t[L]={}))[e])&&c[0]===V)f=c[1];else for(;(d=++p&&d&&d[g]||(f=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++f||($&&((d[L]||(d[L]={}))[e]=[V,f]),d!==t)););return(f-=r)===i||f%i==0&&f/i>=0}}},PSEUDO:function(e,n){var r,o=b.pseudos[e]||b.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[L]?o(n):o.length>1?(r=[e,e,"",n],b.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,r=o(e,n),a=r.length;a--;)i=Q.call(e,r[a]),e[i]=!(t[i]=r[a])}):function(e){return o(e,0,r)}):o}},pseudos:{not:i(function(e){var t=[],n=[],r=k(e.replace(ae,"$1"));return r[L]?i(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return function(t){return(t.textContent||t.innerText||w(t)).indexOf(e)>-1}}),lang:i(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ye,be).toLowerCase(),function(t){var n;do{if(n=I?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===O},focus:function(e){return e===M.activeElement&&(!M.hasFocus||M.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return he.test(e.nodeName)},input:function(e){return pe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:s(function(){return[0]}),last:s(function(e,t){return[t-1]}),eq:s(function(e,t,n){return[n<0?n+t:n]}),even:s(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:s(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:s(function(e,t,n){for(var i=n<0?n+t:n;--i>=0;)e.push(i);return e}),gt:s(function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e})}},b.pseudos.nth=b.pseudos.eq;for($ in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[$]=function(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}($);for($ in{submit:!0,reset:!0})b.pseudos[$]=function(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}($);return c.prototype=b.filters=b.pseudos,b.setFilters=new c,C=t.tokenize=function(e,n){var i,r,o,a,s,l,c,u=U[e+" "];if(u)return n?0:u.slice(0);for(s=e,l=[],c=b.preFilter;s;){i&&!(r=se.exec(s))||(r&&(s=s.slice(r[0].length)||s),l.push(o=[])),i=!1,(r=le.exec(s))&&(i=r.shift(),o.push({value:i,type:r[0].replace(ae," ")}),s=s.slice(i.length));for(a in b.filter)!(r=fe[a].exec(s))||c[a]&&!(r=c[a](r))||(i=r.shift(),o.push({value:i,type:a,matches:r}),s=s.slice(i.length));if(!i)break}return n?s.length:s?t.error(e):U(e,l).slice(0)},k=t.compile=function(e,t){var n,i=[],r=[],o=_[e+" "];if(!o){for(t||(t=C(e)),n=t.length;n--;)o=m(t[n]),o[L]?i.push(o):r.push(o);o=_(e,v(r,i)),o.selector=e}return o},S=t.select=function(e,t,n,i){var r,o,a,s,c,d="function"==typeof e&&e,f=!i&&C(e=d.selector||e);if(n=n||[],1===f.length){if(o=f[0]=f[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&y.getById&&9===t.nodeType&&I&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(ye,be),t)||[])[0]))return n;d&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(r=fe.needsContext.test(e)?0:o.length;r--&&(a=o[r],!b.relative[s=a.type]);)if((c=b.find[s])&&(i=c(a.matches[0].replace(ye,be),ve.test(o[0].type)&&l(t.parentNode)||t))){if(o.splice(r,1),!(e=i.length&&u(o)))return Z.apply(n,i),n;break}}return(d||k(e,f))(i,t,!I,n,ve.test(e)&&l(t.parentNode)||t),n},y.sortStable=L.split("").sort(B).join("")===L,y.detectDuplicates=!!D,A(),y.sortDetached=r(function(e){return 1&e.compareDocumentPosition(M.createElement("div"))}),r(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),y.attributes&&r(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),r(function(e){return null==e.getAttribute("disabled")})||o(ee,function(e,t,n){var i;if(!n)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(e);J.find=ie,J.expr=ie.selectors,J.expr[":"]=J.expr.pseudos,J.unique=ie.uniqueSort,J.text=ie.getText,J.isXMLDoc=ie.isXML,J.contains=ie.contains;var re=J.expr.match.needsContext,oe=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ae=/^.[^:#\[\.,]*$/
+;J.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?J.find.matchesSelector(i,e)?[i]:[]:J.find.matches(e,J.grep(t,function(e){return 1===e.nodeType}))},J.fn.extend({find:function(e){var t,n=this.length,i=[],r=this;if("string"!=typeof e)return this.pushStack(J(e).filter(function(){for(t=0;t<n;t++)if(J.contains(r[t],this))return!0}));for(t=0;t<n;t++)J.find(e,r[t],i);return i=this.pushStack(n>1?J.unique(i):i),i.selector=this.selector?this.selector+" "+e:e,i},filter:function(e){return this.pushStack(i(this,e||[],!1))},not:function(e){return this.pushStack(i(this,e||[],!0))},is:function(e){return!!i(this,"string"==typeof e&&re.test(e)?J(e):e||[],!1).length}});var se,le=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(J.fn.init=function(e,t){var n,i;if(!e)return this;if("string"==typeof e){if(!(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:le.exec(e))||!n[1]&&t)return!t||t.jquery?(t||se).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof J?t[0]:t,J.merge(this,J.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:Z,!0)),oe.test(n[1])&&J.isPlainObject(t))for(n in t)J.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return i=Z.getElementById(n[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=Z,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):J.isFunction(e)?void 0!==se.ready?se.ready(e):e(J):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),J.makeArray(e,this))}).prototype=J.fn,se=J(Z);var ce=/^(?:parents|prev(?:Until|All))/,ue={children:!0,contents:!0,next:!0,prev:!0};J.extend({dir:function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&J(e).is(n))break;i.push(e)}return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),J.fn.extend({has:function(e){var t=J(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(J.contains(this,t[e]))return!0})},closest:function(e,t){for(var n,i=0,r=this.length,o=[],a=re.test(e)||"string"!=typeof e?J(e,t||this.context):0;i<r;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&J.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?J.unique(o):o)},index:function(e){return e?"string"==typeof e?z.call(J(e),this[0]):z.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(J.unique(J.merge(this.get(),J(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),J.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return J.dir(e,"parentNode")},parentsUntil:function(e,t,n){return J.dir(e,"parentNode",n)},next:function(e){return r(e,"nextSibling")},prev:function(e){return r(e,"previousSibling")},nextAll:function(e){return J.dir(e,"nextSibling")},prevAll:function(e){return J.dir(e,"previousSibling")},nextUntil:function(e,t,n){return J.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return J.dir(e,"previousSibling",n)},siblings:function(e){return J.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return J.sibling(e.firstChild)},contents:function(e){return e.contentDocument||J.merge([],e.childNodes)}},function(e,t){J.fn[e]=function(n,i){var r=J.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=J.filter(i,r)),this.length>1&&(ue[e]||J.unique(r),ce.test(e)&&r.reverse()),this.pushStack(r)}});var de=/\S+/g,fe={};J.Callbacks=function(e){e="string"==typeof e?fe[e]||o(e):J.extend({},e);var t,n,i,r,a,s,l=[],c=!e.once&&[],u=function(o){for(t=e.memory&&o,n=!0,s=r||0,r=0,a=l.length,i=!0;l&&s<a;s++)if(!1===l[s].apply(o[0],o[1])&&e.stopOnFalse){t=!1;break}i=!1,l&&(c?c.length&&u(c.shift()):t?l=[]:d.disable())},d={add:function(){if(l){var n=l.length;!function t(n){J.each(n,function(n,i){var r=J.type(i);"function"===r?e.unique&&d.has(i)||l.push(i):i&&i.length&&"string"!==r&&t(i)})}(arguments),i?a=l.length:t&&(r=n,u(t))}return this},remove:function(){return l&&J.each(arguments,function(e,t){for(var n;(n=J.inArray(t,l,n))>-1;)l.splice(n,1),i&&(n<=a&&a--,n<=s&&s--)}),this},has:function(e){return e?J.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],a=0,this},disable:function(){return l=c=t=void 0,this},disabled:function(){return!l},lock:function(){return c=void 0,t||d.disable(),this},locked:function(){return!c},fireWith:function(e,t){return!l||n&&!c||(t=t||[],t=[e,t.slice?t.slice():t],i?c.push(t):u(t)),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!n}};return d},J.extend({Deferred:function(e){var t=[["resolve","done",J.Callbacks("once memory"),"resolved"],["reject","fail",J.Callbacks("once memory"),"rejected"],["notify","progress",J.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var e=arguments;return J.Deferred(function(n){J.each(t,function(t,o){var a=J.isFunction(e[t])&&e[t];r[o[1]](function(){var e=a&&a.apply(this,arguments);e&&J.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+"With"](this===i?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?J.extend(e,i):i}},r={};return i.pipe=i.then,J.each(t,function(e,o){var a=o[2],s=o[3];i[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),r[o[0]]=function(){return r[o[0]+"With"](this===r?i:this,arguments),this},r[o[0]+"With"]=a.fireWith}),i.promise(r),e&&e.call(r,r),r},when:function(e){var t,n,i,r=0,o=_.call(arguments),a=o.length,s=1!==a||e&&J.isFunction(e.promise)?a:0,l=1===s?e:J.Deferred(),c=function(e,n,i){return function(r){n[e]=this,i[e]=arguments.length>1?_.call(arguments):r,i===t?l.notifyWith(n,i):--s||l.resolveWith(n,i)}};if(a>1)for(t=new Array(a),n=new Array(a),i=new Array(a);r<a;r++)o[r]&&J.isFunction(o[r].promise)?o[r].promise().done(c(r,i,o)).fail(l.reject).progress(c(r,n,t)):--s;return s||l.resolveWith(i,o),l.promise()}});var pe;J.fn.ready=function(e){return J.ready.promise().done(e),this},J.extend({isReady:!1,readyWait:1,holdReady:function(e){e?J.readyWait++:J.ready(!0)},ready:function(e){(!0===e?--J.readyWait:J.isReady)||(J.isReady=!0,!0!==e&&--J.readyWait>0||(pe.resolveWith(Z,[J]),J.fn.triggerHandler&&(J(Z).triggerHandler("ready"),J(Z).off("ready"))))}}),J.ready.promise=function(t){return pe||(pe=J.Deferred(),"complete"===Z.readyState?setTimeout(J.ready):(Z.addEventListener("DOMContentLoaded",a,!1),e.addEventListener("load",a,!1))),pe.promise(t)},J.ready.promise();var he=J.access=function(e,t,n,i,r,o,a){var s=0,l=e.length,c=null==n;if("object"===J.type(n)){r=!0;for(s in n)J.access(e,t,s,n[s],!0,o,a)}else if(void 0!==i&&(r=!0,J.isFunction(i)||(a=!0),c&&(a?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(J(e),n)})),t))for(;s<l;s++)t(e[s],n,a?i:i.call(e[s],s,t(e[s],n)));return r?e:c?t.call(e):l?t(e[0],n):o};J.acceptData=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType},s.uid=1,s.accepts=J.acceptData,s.prototype={key:function(e){if(!s.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=s.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(i){t[this.expando]=n,J.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var i,r=this.key(e),o=this.cache[r];if("string"==typeof t)o[t]=n;else if(J.isEmptyObject(o))J.extend(this.cache[r],t);else for(i in t)o[i]=t[i];return o},get:function(e,t){var n=this.cache[this.key(e)];return void 0===t?n:n[t]},access:function(e,t,n){var i;return void 0===t||t&&"string"==typeof t&&void 0===n?(i=this.get(e,t),void 0!==i?i:this.get(e,J.camelCase(t))):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i,r,o=this.key(e),a=this.cache[o];if(void 0===t)this.cache[o]={};else{J.isArray(t)?i=t.concat(t.map(J.camelCase)):(r=J.camelCase(t),t in a?i=[t,r]:(i=r,i=i in a?[i]:i.match(de)||[])),n=i.length;for(;n--;)delete a[i[n]]}},hasData:function(e){return!J.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}};var ge=new s,me=new s,ve=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,$e=/([A-Z])/g;J.extend({hasData:function(e){return me.hasData(e)||ge.hasData(e)},data:function(e,t,n){return me.access(e,t,n)},removeData:function(e,t){me.remove(e,t)},_data:function(e,t,n){return ge.access(e,t,n)},_removeData:function(e,t){ge.remove(e,t)}}),J.fn.extend({data:function(e,t){var n,i,r,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(r=me.get(o),1===o.nodeType&&!ge.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&(i=a[n].name,0===i.indexOf("data-")&&(i=J.camelCase(i.slice(5)),l(o,i,r[i])));ge.set(o,"hasDataAttrs",!0)}return r}return"object"==typeof e?this.each(function(){me.set(this,e)}):he(this,function(t){var n,i=J.camelCase(e);if(o&&void 0===t){if(void 0!==(n=me.get(o,e)))return n;if(void 0!==(n=me.get(o,i)))return n;if(void 0!==(n=l(o,i,void 0)))return n}else this.each(function(){var n=me.get(this,i);me.set(this,i,t),-1!==e.indexOf("-")&&void 0!==n&&me.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){me.remove(this,e)})}}),J.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=ge.get(e,t),n&&(!i||J.isArray(n)?i=ge.access(e,t,J.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=J.queue(e,t),i=n.length,r=n.shift(),o=J._queueHooks(e,t),a=function(){J.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete o.stop,r.call(e,a,o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ge.get(e,n)||ge.access(e,n,{empty:J.Callbacks("once memory").add(function(){ge.remove(e,[t+"queue",n])})})}}),J.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?J.queue(this[0],e):void 0===t?this:this.each(function(){var n=J.queue(this,e,t);J._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&J.dequeue(this,e)})},dequeue:function(e){return this.each(function(){J.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,r=J.Deferred(),o=this,a=this.length,s=function(){--i||r.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=ge.get(o[a],e+"queueHooks"))&&n.empty&&(i++,n.empty.add(s));return s(),r.promise(t)}});var ye=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,be=["Top","Right","Bottom","Left"],we=function(e,t){return e=t||e,"none"===J.css(e,"display")||!J.contains(e.ownerDocument,e)},xe=/^(?:checkbox|radio)$/i;!function(){var e=Z.createDocumentFragment(),t=e.appendChild(Z.createElement("div")),n=Z.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),X.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",X.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();X.focusinBubbles="onfocusin"in e;var Ce=/^key/,ke=/^(?:mouse|pointer|contextmenu)|click/,Se=/^(?:focusinfocus|focusoutblur)$/,Ee=/^([^.]*)(?:\.(.+)|)$/;J.event={global:{},add:function(e,t,n,i,r){var o,a,s,l,c,u,d,f,p,h,g,m=ge.get(e);if(m)for(n.handler&&(o=n,n=o.handler,r=o.selector),n.guid||(n.guid=J.guid++),(l=m.events)||(l=m.events={}),(a=m.handle)||(a=m.handle=function(t){return void 0!==J&&J.event.triggered!==t.type?J.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(de)||[""],c=t.length;c--;)s=Ee.exec(t[c])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p&&(d=J.event.special[p]||{},p=(r?d.delegateType:d.bindType)||p,d=J.event.special[p]||{},u=J.extend({type:p,origType:g,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&J.expr.match.needsContext.test(r),namespace:h.join(".")},o),(f=l[p])||(f=l[p]=[],f.delegateCount=0,d.setup&&!1!==d.setup.call(e,i,h,a)||e.addEventListener&&e.addEventListener(p,a,!1)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),r?f.splice(f.delegateCount++,0,u):f.push(u),J.event.global[p]=!0)},remove:function(e,t,n,i,r){var o,a,s,l,c,u,d,f,p,h,g,m=ge.hasData(e)&&ge.get(e);if(m&&(l=m.events)){for(t=(t||"").match(de)||[""],c=t.length;c--;)if(s=Ee.exec(t[c])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p){for(d=J.event.special[p]||{},p=(i?d.delegateType:d.bindType)||p,f=l[p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=f.length;o--;)u=f[o],!r&&g!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(f.splice(o,1),u.selector&&f.delegateCount--,d.remove&&d.remove.call(e,u));a&&!f.length&&(d.teardown&&!1!==d.teardown.call(e,h,m.handle)||J.removeEvent(e,p,m.handle),delete l[p])}else for(p in l)J.event.remove(e,p+t[c],n,i,!0);J.isEmptyObject(l)&&(delete m.handle,ge.remove(e,"events"))}},trigger:function(t,n,i,r){var o,a,s,l,c,u,d,f=[i||Z],p=G.call(t,"type")?t.type:t,h=G.call(t,"namespace")?t.namespace.split("."):[];if(a=s=i=i||Z,3!==i.nodeType&&8!==i.nodeType&&!Se.test(p+J.event.triggered)&&(p.indexOf(".")>=0&&(h=p.split("."),p=h.shift(),h.sort()),c=p.indexOf(":")<0&&"on"+p,t=t[J.expando]?t:new J.Event(p,"object"==typeof t&&t),t.isTrigger=r?2:3,t.namespace=h.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:J.makeArray(n,[t]),d=J.event.special[p]||{},r||!d.trigger||!1!==d.trigger.apply(i,n))){if(!r&&!d.noBubble&&!J.isWindow(i)){for(l=d.delegateType||p,Se.test(l+p)||(a=a.parentNode);a;a=a.parentNode)f.push(a),s=a;s===(i.ownerDocument||Z)&&f.push(s.defaultView||s.parentWindow||e)}for(o=0;(a=f[o++])&&!t.isPropagationStopped();)t.type=o>1?l:d.bindType||p,u=(ge.get(a,"events")||{})[t.type]&&ge.get(a,"handle"),u&&u.apply(a,n),(u=c&&a[c])&&u.apply&&J.acceptData(a)&&(t.result=u.apply(a,n),!1===t.result&&t.preventDefault());return t.type=p,r||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(f.pop(),n)||!J.acceptData(i)||c&&J.isFunction(i[p])&&!J.isWindow(i)&&(s=i[c],s&&(i[c]=null),J.event.triggered=p,i[p](),J.event.triggered=void 0,s&&(i[c]=s)),t.result}},dispatch:function(e){e=J.event.fix(e);var t,n,i,r,o,a=[],s=_.call(arguments),l=(ge.get(this,"events")||{})[e.type]||[],c=J.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,e)){for(a=J.event.handlers.call(this,e,l),t=0;(r=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=r.elem,n=0;(o=r.handlers[n++])&&!e.isImmediatePropagationStopped();)e.namespace_re&&!e.namespace_re.test(o.namespace)||(e.handleObj=o,e.data=o.data,void 0!==(i=((J.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,s))&&!1===(e.result=i)&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,i,r,o,a=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!==this;l=l.parentNode||this)if(!0!==l.disabled||"click"!==e.type){for(i=[],n=0;n<s;n++)o=t[n],r=o.selector+" ",void 0===i[r]&&(i[r]=o.needsContext?J(r,this).index(l)>=0:J.find(r,this,null,[l]).length),i[r]&&i.push(o);i.length&&a.push({elem:l,handlers:i})}return s<t.length&&a.push({elem:this,handlers:t.slice(s)}),a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,i,r,o=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||Z,i=n.documentElement,r=n.body,e.pageX=t.clientX+(i&&i.scrollLeft||r&&r.scrollLeft||0)-(i&&i.clientLeft||r&&r.clientLeft||0),e.pageY=t.clientY+(i&&i.scrollTop||r&&r.scrollTop||0)-(i&&i.clientTop||r&&r.clientTop||0)),e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0),e}},fix:function(e){if(e[J.expando])return e;var t,n,i,r=e.type,o=e,a=this.fixHooks[r];for(a||(this.fixHooks[r]=a=ke.test(r)?this.mouseHooks:Ce.test(r)?this.keyHooks:{}),i=a.props?this.props.concat(a.props):this.props,e=new J.Event(o),t=i.length;t--;)n=i[t],e[n]=o[n];return e.target||(e.target=Z),3===e.target.nodeType&&(e.target=e.target.parentNode),a.filter?a.filter(e,o):e},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==d()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===d()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&J.nodeName(this,"input"))return this.click(),!1},_default:function(e){return J.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,i){var r=J.extend(new J.Event,n,{type:e,isSimulated:!0,originalEvent:{}});i?J.event.trigger(r,null,t):J.event.dispatch.call(t,r),r.isDefaultPrevented()&&n.preventDefault()}},J.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},J.Event=function(e,t){if(!(this instanceof J.Event))return new J.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?c:u):this.type=e,t&&J.extend(this,t),this.timeStamp=e&&e.timeStamp||J.now(),this[J.expando]=!0},J.Event.prototype={isDefaultPrevented:u,isPropagationStopped:u,isImmediatePropagationStopped:u,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=c,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=c,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=c,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},J.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){J.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,r=e.relatedTarget,o=e.handleObj;return r&&(r===i||J.contains(i,r))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),X.focusinBubbles||J.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){J.event.simulate(t,e.target,J.event.fix(e),!0)};J.event.special[t]={setup:function(){var i=this.ownerDocument||this,r=ge.access(i,t);r||i.addEventListener(e,n,!0),ge.access(i,t,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=ge.access(i,t)-1;r?ge.access(i,t,r):(i.removeEventListener(e,n,!0),ge.remove(i,t))}}}),J.fn.extend({on:function(e,t,n,i,r){var o,a;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=void 0);for(a in e)this.on(a,t,n,e[a],r);return this}if(null==n&&null==i?(i=t,n=t=void 0):null==i&&("string"==typeof t?(i=n,n=void 0):(i=n,n=t,t=void 0)),!1===i)i=u;else if(!i)return this;return 1===r&&(o=i,i=function(e){return J().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=J.guid++)),this.each(function(){J.event.add(this,e,i,n,t)})},one:function(e,t,n,i){return this.on(e,t,n,i,1)},off:function(e,t,n){var i,r;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,J(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(r in e)this.off(r,t,e[r]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=u),this.each(function(){J.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){J.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return J.event.trigger(e,t,n,!0)}});var Te=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,De=/<([\w:]+)/,Ae=/<|&#?\w+;/,Me=/<(?:script|style|link)/i,Oe=/checked\s*(?:[^=]|=\s*.checked.)/i,Ie=/^$|\/(?:java|ecma)script/i,Pe=/^true\/(.*)/,Ne=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,je={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};je.optgroup=je.option,je.tbody=je.tfoot=je.colgroup=je.caption=je.thead,je.th=je.td,J.extend({clone:function(e,t,n){var i,r,o,a,s=e.cloneNode(!0),l=J.contains(e.ownerDocument,e);if(!(X.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||J.isXMLDoc(e)))for(a=v(s),o=v(e),i=0,r=o.length;i<r;i++)$(o[i],a[i]);if(t)if(n)for(o=o||v(e),a=a||v(s),i=0,r=o.length;i<r;i++)m(o[i],a[i]);else m(e,s);return a=v(s,"script"),a.length>0&&g(a,!l&&v(e,"script")),s},buildFragment:function(e,t,n,i){for(var r,o,a,s,l,c,u=t.createDocumentFragment(),d=[],f=0,p=e.length;f<p;f++)if((r=e[f])||0===r)if("object"===J.type(r))J.merge(d,r.nodeType?[r]:r);else if(Ae.test(r)){for(o=o||u.appendChild(t.createElement("div")),a=(De.exec(r)||["",""])[1].toLowerCase(),s=je[a]||je._default,o.innerHTML=s[1]+r.replace(Te,"<$1></$2>")+s[2],c=s[0];c--;)o=o.lastChild;J.merge(d,o.childNodes),o=u.firstChild,o.textContent=""}else d.push(t.createTextNode(r));for(u.textContent="",f=0;r=d[f++];)if((!i||-1===J.inArray(r,i))&&(l=J.contains(r.ownerDocument,r),o=v(u.appendChild(r),"script"),l&&g(o),n))for(c=0;r=o[c++];)Ie.test(r.type||"")&&n.push(r);return u},cleanData:function(e){for(var t,n,i,r,o=J.event.special,a=0;void 0!==(n=e[a]);a++){if(J.acceptData(n)&&(r=n[ge.expando])&&(t=ge.cache[r])){if(t.events)for(i in t.events)o[i]?J.event.remove(n,i):J.removeEvent(n,i,t.handle);ge.cache[r]&&delete ge.cache[r]}delete me.cache[n[me.expando]]}}}),J.fn.extend({text:function(e){return he(this,function(e){return void 0===e?J.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){f(this,e).appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=f(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,i=e?J.filter(e,this):this,r=0;null!=(n=i[r]);r++)t||1!==n.nodeType||J.cleanData(v(n)),n.parentNode&&(t&&J.contains(n.ownerDocument,n)&&g(v(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(J.cleanData(v(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return J.clone(this,e,t)})},html:function(e){return he(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Me.test(e)&&!je[(De.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(Te,"<$1></$2>");try{for(;n<i;n++)t=this[n]||{},1===t.nodeType&&(J.cleanData(v(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,J.cleanData(v(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=B.apply([],e);var n,i,r,o,a,s,l=0,c=this.length,u=this,d=c-1,f=e[0],g=J.isFunction(f);if(g||c>1&&"string"==typeof f&&!X.checkClone&&Oe.test(f))return this.each(function(n){var i=u.eq(n);g&&(e[0]=f.call(this,n,i.html())),i.domManip(e,t)});if(c&&(n=J.buildFragment(e,this[0].ownerDocument,!1,this),i=n.firstChild,1===n.childNodes.length&&(n=i),i)){for(r=J.map(v(n,"script"),p),o=r.length;l<c;l++)a=n,l!==d&&(a=J.clone(a,!0,!0),o&&J.merge(r,v(a,"script"))),t.call(this[l],a,l);if(o)for(s=r[r.length-1].ownerDocument,J.map(r,h),l=0;l<o;l++)a=r[l],Ie.test(a.type||"")&&!ge.access(a,"globalEval")&&J.contains(s,a)&&(a.src?J._evalUrl&&J._evalUrl(a.src):J.globalEval(a.textContent.replace(Ne,"")))}return this}}),J.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){J.fn[e]=function(e){for(var n,i=[],r=J(e),o=r.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),J(r[a])[t](n),W.apply(i,n.get());return this.pushStack(i)}});var Fe,Le={},Re=/^margin/,Ve=new RegExp("^("+ye+")(?!px)[a-z%]+$","i"),He=function(e){return e.ownerDocument.defaultView.getComputedStyle(e,null)};!function(){function t(){a.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",a.innerHTML="",r.appendChild(o);var t=e.getComputedStyle(a,null);n="1%"!==t.top,i="4px"===t.width,r.removeChild(o)}var n,i,r=Z.documentElement,o=Z.createElement("div"),a=Z.createElement("div");a.style&&(a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",X.clearCloneStyle="content-box"===a.style.backgroundClip,o.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",o.appendChild(a),e.getComputedStyle&&J.extend(X,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return null==i&&t(),i},reliableMarginRight:function(){var t,n=a.appendChild(Z.createElement("div"));return n.style.cssText=a.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",n.style.marginRight=n.style.width="0",a.style.width="1px",r.appendChild(o),t=!parseFloat(e.getComputedStyle(n,null).marginRight),r.removeChild(o),t}}))}(),J.swap=function(e,t,n,i){var r,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];r=n.apply(e,i||[]);for(o in t)e.style[o]=a[o];return r};var qe=/^(none|table(?!-c[ea]).+)/,Ue=new RegExp("^("+ye+")(.*)$","i"),_e=new RegExp("^([+-])=("+ye+")","i"),Be={position:"absolute",visibility:"hidden",display:"block"},We={letterSpacing:"0",fontWeight:"400"},ze=["Webkit","O","Moz","ms"];J.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=w(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,a,s=J.camelCase(t),l=e.style;if(t=J.cssProps[s]||(J.cssProps[s]=C(l,s)),a=J.cssHooks[t]||J.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(r=a.get(e,!1,i))?r:l[t];o=typeof n,"string"===o&&(r=_e.exec(n))&&(n=(r[1]+1)*r[2]+parseFloat(J.css(e,t)),o="number"),null!=n&&n===n&&("number"!==o||J.cssNumber[s]||(n+="px"),X.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,i))||(l[t]=n))}},css:function(e,t,n,i){var r,o,a,s=J.camelCase(t);return t=J.cssProps[s]||(J.cssProps[s]=C(e.style,s)),a=J.cssHooks[t]||J.cssHooks[s],a&&"get"in a&&(r=a.get(e,!0,n)),void 0===r&&(r=w(e,t,i)),"normal"===r&&t in We&&(r=We[t]),""===n||n?(o=parseFloat(r),!0===n||J.isNumeric(o)?o||0:r):r}}),J.each(["height","width"],function(e,t){J.cssHooks[t]={get:function(e,n,i){if(n)return qe.test(J.css(e,"display"))&&0===e.offsetWidth?J.swap(e,Be,function(){return E(e,t,i)}):E(e,t,i)},set:function(e,n,i){var r=i&&He(e);return k(e,n,i?S(e,t,i,"border-box"===J.css(e,"boxSizing",!1,r),r):0)}}}),J.cssHooks.marginRight=x(X.reliableMarginRight,function(e,t){if(t)return J.swap(e,{display:"inline-block"},w,[e,"marginRight"])}),J.each({margin:"",padding:"",border:"Width"},function(e,t){J.cssHooks[e+t]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];i<4;i++)r[e+be[i]+t]=o[i]||o[i-2]||o[0];return r}},Re.test(e)||(J.cssHooks[e+t].set=k)}),J.fn.extend({css:function(e,t){return he(this,function(e,t,n){var i,r,o={},a=0;if(J.isArray(t)){for(i=He(e),r=t.length;a<r;a++)o[t[a]]=J.css(e,t[a],!1,i);return o}return void 0!==n?J.style(e,t,n):J.css(e,t)},e,t,arguments.length>1)},show:function(){return T(this,!0)},hide:function(){return T(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){we(this)?J(this).show():J(this).hide()})}}),J.Tween=D,D.prototype={constructor:D,init:function(e,t,n,i,r,o){this.elem=e,this.prop=n,this.easing=r||"swing",this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(J.cssNumber[n]?"":"px")},cur:function(){var e=D.propHooks[this.prop];return e&&e.get?e.get(this):D.propHooks._default.get(this)},run:function(e){var t,n=D.propHooks[this.prop];return this.options.duration?this.pos=t=J.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):D.propHooks._default.set(this),this}},D.prototype.init.prototype=D.prototype,D.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=J.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){J.fx.step[e.prop]?J.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[J.cssProps[e.prop]]||J.cssHooks[e.prop])?J.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},D.propHooks.scrollTop=D.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},J.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},J.fx=D.prototype.init,J.fx.step={};var Ye,Ke,Ge=/^(?:toggle|show|hide)$/,Xe=new RegExp("^(?:([+-])=|)("+ye+")([a-z%]*)$","i"),Ze=/queueHooks$/,Je=[I],Qe={"*":[function(e,t){var n=this.createTween(e,t),i=n.cur(),r=Xe.exec(t),o=r&&r[3]||(J.cssNumber[e]?"":"px"),a=(J.cssNumber[e]||"px"!==o&&+i)&&Xe.exec(J.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],r=r||[],a=+i||1;do{s=s||".5",a/=s,J.style(n.elem,e,a+o)}while(s!==(s=n.cur()/i)&&1!==s&&--l)}return r&&(a=n.start=+a||+i||0,n.unit=o,n.end=r[1]?a+(r[1]+1)*r[2]:+r[2]),n}]};J.Animation=J.extend(N,{tweener:function(e,t){J.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,i=0,r=e.length;i<r;i++)n=e[i],Qe[n]=Qe[n]||[],Qe[n].unshift(t)},prefilter:function(e,t){t?Je.unshift(e):Je.push(e)}}),J.speed=function(e,t,n){var i=e&&"object"==typeof e?J.extend({},e):{complete:n||!n&&t||J.isFunction(e)&&e,duration:e,easing:n&&t||t&&!J.isFunction(t)&&t};return i.duration=J.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in J.fx.speeds?J.fx.speeds[i.duration]:J.fx.speeds._default,null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){J.isFunction(i.old)&&i.old.call(this),i.queue&&J.dequeue(this,i.queue)},i},J.fn.extend({fadeTo:function(e,t,n,i){return this.filter(we).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var r=J.isEmptyObject(e),o=J.speed(t,n,i),a=function(){var t=N(this,J.extend({},e),o);(r||ge.get(this,"finish"))&&t.stop(!0)};return a.finish=a,r||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,r=null!=e&&e+"queueHooks",o=J.timers,a=ge.get(this);if(r)a[r]&&a[r].stop&&i(a[r]);else for(r in a)a[r]&&a[r].stop&&Ze.test(r)&&i(a[r]);for(r=o.length;r--;)o[r].elem!==this||null!=e&&o[r].queue!==e||(o[r].anim.stop(n),t=!1,o.splice(r,1));!t&&n||J.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){
+var t,n=ge.get(this),i=n[e+"queue"],r=n[e+"queueHooks"],o=J.timers,a=i?i.length:0;for(n.finish=!0,J.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),J.each(["toggle","show","hide"],function(e,t){var n=J.fn[t];J.fn[t]=function(e,i,r){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(M(t,!0),e,i,r)}}),J.each({slideDown:M("show"),slideUp:M("hide"),slideToggle:M("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){J.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),J.timers=[],J.fx.tick=function(){var e,t=0,n=J.timers;for(Ye=J.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||J.fx.stop(),Ye=void 0},J.fx.timer=function(e){J.timers.push(e),e()?J.fx.start():J.timers.pop()},J.fx.interval=13,J.fx.start=function(){Ke||(Ke=setInterval(J.fx.tick,J.fx.interval))},J.fx.stop=function(){clearInterval(Ke),Ke=null},J.fx.speeds={slow:600,fast:200,_default:400},J.fn.delay=function(e,t){return e=J.fx?J.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var i=setTimeout(t,e);n.stop=function(){clearTimeout(i)}})},function(){var e=Z.createElement("input"),t=Z.createElement("select"),n=t.appendChild(Z.createElement("option"));e.type="checkbox",X.checkOn=""!==e.value,X.optSelected=n.selected,t.disabled=!0,X.optDisabled=!n.disabled,e=Z.createElement("input"),e.value="t",e.type="radio",X.radioValue="t"===e.value}();var et,tt=J.expr.attrHandle;J.fn.extend({attr:function(e,t){return he(this,J.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){J.removeAttr(this,e)})}}),J.extend({attr:function(e,t,n){var i,r,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?J.prop(e,t,n):(1===o&&J.isXMLDoc(e)||(t=t.toLowerCase(),i=J.attrHooks[t]||(J.expr.match.bool.test(t)?et:void 0)),void 0===n?i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=J.find.attr(e,t),null==r?void 0:r):null!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):void J.removeAttr(e,t))},removeAttr:function(e,t){var n,i,r=0,o=t&&t.match(de);if(o&&1===e.nodeType)for(;n=o[r++];)i=J.propFix[n]||n,J.expr.match.bool.test(n)&&(e[i]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!X.radioValue&&"radio"===t&&J.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),et={set:function(e,t,n){return!1===t?J.removeAttr(e,n):e.setAttribute(n,n),n}},J.each(J.expr.match.bool.source.match(/\w+/g),function(e,t){var n=tt[t]||J.find.attr;tt[t]=function(e,t,i){var r,o;return i||(o=tt[t],tt[t]=r,r=null!=n(e,t,i)?t.toLowerCase():null,tt[t]=o),r}});var nt=/^(?:input|select|textarea|button)$/i;J.fn.extend({prop:function(e,t){return he(this,J.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[J.propFix[e]||e]})}}),J.extend({propFix:{for:"htmlFor",class:"className"},prop:function(e,t,n){var i,r,o,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return o=1!==a||!J.isXMLDoc(e),o&&(t=J.propFix[t]||t,r=J.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||nt.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),X.optSelected||(J.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),J.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){J.propFix[this.toLowerCase()]=this});var it=/[\t\r\n\f]/g;J.fn.extend({addClass:function(e){var t,n,i,r,o,a,s="string"==typeof e&&e,l=0,c=this.length;if(J.isFunction(e))return this.each(function(t){J(this).addClass(e.call(this,t,this.className))});if(s)for(t=(e||"").match(de)||[];l<c;l++)if(n=this[l],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(it," "):" ")){for(o=0;r=t[o++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");a=J.trim(i),n.className!==a&&(n.className=a)}return this},removeClass:function(e){var t,n,i,r,o,a,s=0===arguments.length||"string"==typeof e&&e,l=0,c=this.length;if(J.isFunction(e))return this.each(function(t){J(this).removeClass(e.call(this,t,this.className))});if(s)for(t=(e||"").match(de)||[];l<c;l++)if(n=this[l],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(it," "):"")){for(o=0;r=t[o++];)for(;i.indexOf(" "+r+" ")>=0;)i=i.replace(" "+r+" "," ");a=e?J.trim(i):"",n.className!==a&&(n.className=a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):J.isFunction(e)?this.each(function(n){J(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var t,i=0,r=J(this),o=e.match(de)||[];t=o[i++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else"undefined"!==n&&"boolean"!==n||(this.className&&ge.set(this,"__className__",this.className),this.className=this.className||!1===e?"":ge.get(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,i=this.length;n<i;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(it," ").indexOf(t)>=0)return!0;return!1}});var rt=/\r/g;J.fn.extend({val:function(e){var t,n,i,r=this[0];{if(arguments.length)return i=J.isFunction(e),this.each(function(n){var r;1===this.nodeType&&(r=i?e.call(this,n,J(this).val()):e,null==r?r="":"number"==typeof r?r+="":J.isArray(r)&&(r=J.map(r,function(e){return null==e?"":e+""})),(t=J.valHooks[this.type]||J.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))});if(r)return(t=J.valHooks[r.type]||J.valHooks[r.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:(n=r.value,"string"==typeof n?n.replace(rt,""):null==n?"":n)}}}),J.extend({valHooks:{option:{get:function(e){var t=J.find.attr(e,"value");return null!=t?t:J.trim(J.text(e))}},select:{get:function(e){for(var t,n,i=e.options,r=e.selectedIndex,o="select-one"===e.type||r<0,a=o?null:[],s=o?r+1:i.length,l=r<0?s:o?r:0;l<s;l++)if(n=i[l],(n.selected||l===r)&&(X.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!J.nodeName(n.parentNode,"optgroup"))){if(t=J(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,i,r=e.options,o=J.makeArray(t),a=r.length;a--;)i=r[a],(i.selected=J.inArray(i.value,o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),J.each(["radio","checkbox"],function(){J.valHooks[this]={set:function(e,t){if(J.isArray(t))return e.checked=J.inArray(J(e).val(),t)>=0}},X.checkOn||(J.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),J.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){J.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),J.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var ot=J.now(),at=/\?/;J.parseJSON=function(e){return JSON.parse(e+"")},J.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||J.error("Invalid XML: "+e),t};var st,lt,ct=/#.*$/,ut=/([?&])_=[^&]*/,dt=/^(.*?):[ \t]*([^\r\n]*)$/gm,ft=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,pt=/^(?:GET|HEAD)$/,ht=/^\/\//,gt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,mt={},vt={},$t="*/".concat("*");try{lt=location.href}catch(e){lt=Z.createElement("a"),lt.href="",lt=lt.href}st=gt.exec(lt.toLowerCase())||[],J.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:lt,type:"GET",isLocal:ft.test(st[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$t,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":J.parseJSON,"text xml":J.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?L(L(e,J.ajaxSettings),t):L(J.ajaxSettings,e)},ajaxPrefilter:j(mt),ajaxTransport:j(vt),ajax:function(e,t){function n(e,t,n,a){var l,u,v,$,b,x=t;2!==y&&(y=2,s&&clearTimeout(s),i=void 0,o=a||"",w.readyState=e>0?4:0,l=e>=200&&e<300||304===e,n&&($=R(d,w,n)),$=V(d,$,w,l),l?(d.ifModified&&(b=w.getResponseHeader("Last-Modified"),b&&(J.lastModified[r]=b),(b=w.getResponseHeader("etag"))&&(J.etag[r]=b)),204===e||"HEAD"===d.type?x="nocontent":304===e?x="notmodified":(x=$.state,u=$.data,v=$.error,l=!v)):(v=x,!e&&x||(x="error",e<0&&(e=0))),w.status=e,w.statusText=(t||x)+"",l?h.resolveWith(f,[u,x,w]):h.rejectWith(f,[w,x,v]),w.statusCode(m),m=void 0,c&&p.trigger(l?"ajaxSuccess":"ajaxError",[w,d,l?u:v]),g.fireWith(f,[w,x]),c&&(p.trigger("ajaxComplete",[w,d]),--J.active||J.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,r,o,a,s,l,c,u,d=J.ajaxSetup({},t),f=d.context||d,p=d.context&&(f.nodeType||f.jquery)?J(f):J.event,h=J.Deferred(),g=J.Callbacks("once memory"),m=d.statusCode||{},v={},$={},y=0,b="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(2===y){if(!a)for(a={};t=dt.exec(o);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===y?o:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return y||(e=$[n]=$[n]||e,v[e]=t),this},overrideMimeType:function(e){return y||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(y<2)for(t in e)m[t]=[m[t],e[t]];else w.always(e[w.status]);return this},abort:function(e){var t=e||b;return i&&i.abort(t),n(0,t),this}};if(h.promise(w).complete=g.add,w.success=w.done,w.error=w.fail,d.url=((e||d.url||lt)+"").replace(ct,"").replace(ht,st[1]+"//"),d.type=t.method||t.type||d.method||d.type,d.dataTypes=J.trim(d.dataType||"*").toLowerCase().match(de)||[""],null==d.crossDomain&&(l=gt.exec(d.url.toLowerCase()),d.crossDomain=!(!l||l[1]===st[1]&&l[2]===st[2]&&(l[3]||("http:"===l[1]?"80":"443"))===(st[3]||("http:"===st[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=J.param(d.data,d.traditional)),F(mt,d,t,w),2===y)return w;c=d.global,c&&0==J.active++&&J.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!pt.test(d.type),r=d.url,d.hasContent||(d.data&&(r=d.url+=(at.test(r)?"&":"?")+d.data,delete d.data),!1===d.cache&&(d.url=ut.test(r)?r.replace(ut,"$1_="+ot++):r+(at.test(r)?"&":"?")+"_="+ot++)),d.ifModified&&(J.lastModified[r]&&w.setRequestHeader("If-Modified-Since",J.lastModified[r]),J.etag[r]&&w.setRequestHeader("If-None-Match",J.etag[r])),(d.data&&d.hasContent&&!1!==d.contentType||t.contentType)&&w.setRequestHeader("Content-Type",d.contentType),w.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+$t+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)w.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(!1===d.beforeSend.call(f,w,d)||2===y))return w.abort();b="abort";for(u in{success:1,error:1,complete:1})w[u](d[u]);if(i=F(vt,d,t,w)){w.readyState=1,c&&p.trigger("ajaxSend",[w,d]),d.async&&d.timeout>0&&(s=setTimeout(function(){w.abort("timeout")},d.timeout));try{y=1,i.send(v,n)}catch(e){if(!(y<2))throw e;n(-1,e)}}else n(-1,"No Transport");return w},getJSON:function(e,t,n){return J.get(e,t,n,"json")},getScript:function(e,t){return J.get(e,void 0,t,"script")}}),J.each(["get","post"],function(e,t){J[t]=function(e,n,i,r){return J.isFunction(n)&&(r=r||i,i=n,n=void 0),J.ajax({url:e,type:t,dataType:r,data:n,success:i})}}),J.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){J.fn[t]=function(e){return this.on(t,e)}}),J._evalUrl=function(e){return J.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},J.fn.extend({wrapAll:function(e){var t;return J.isFunction(e)?this.each(function(t){J(this).wrapAll(e.call(this,t))}):(this[0]&&(t=J(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return J.isFunction(e)?this.each(function(t){J(this).wrapInner(e.call(this,t))}):this.each(function(){var t=J(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=J.isFunction(e);return this.each(function(n){J(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){J.nodeName(this,"body")||J(this).replaceWith(this.childNodes)}).end()}}),J.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0},J.expr.filters.visible=function(e){return!J.expr.filters.hidden(e)};var yt=/%20/g,bt=/\[\]$/,wt=/\r?\n/g,xt=/^(?:submit|button|image|reset|file)$/i,Ct=/^(?:input|select|textarea|keygen)/i;J.param=function(e,t){var n,i=[],r=function(e,t){t=J.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=J.ajaxSettings&&J.ajaxSettings.traditional),J.isArray(e)||e.jquery&&!J.isPlainObject(e))J.each(e,function(){r(this.name,this.value)});else for(n in e)H(n,e[n],t,r);return i.join("&").replace(yt,"+")},J.fn.extend({serialize:function(){return J.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=J.prop(this,"elements");return e?J.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!J(this).is(":disabled")&&Ct.test(this.nodeName)&&!xt.test(e)&&(this.checked||!xe.test(e))}).map(function(e,t){var n=J(this).val();return null==n?null:J.isArray(n)?J.map(n,function(e){return{name:t.name,value:e.replace(wt,"\r\n")}}):{name:t.name,value:n.replace(wt,"\r\n")}}).get()}}),J.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var kt=0,St={},Et={0:200,1223:204},Tt=J.ajaxSettings.xhr();e.ActiveXObject&&J(e).on("unload",function(){for(var e in St)St[e]()}),X.cors=!!Tt&&"withCredentials"in Tt,X.ajax=Tt=!!Tt,J.ajaxTransport(function(e){var t;if(X.cors||Tt&&!e.crossDomain)return{send:function(n,i){var r,o=e.xhr(),a=++kt;if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(r in e.xhrFields)o[r]=e.xhrFields[r];e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(r in n)o.setRequestHeader(r,n[r]);t=function(e){return function(){t&&(delete St[a],t=o.onload=o.onerror=null,"abort"===e?o.abort():"error"===e?i(o.status,o.statusText):i(Et[o.status]||o.status,o.statusText,"string"==typeof o.responseText?{text:o.responseText}:void 0,o.getAllResponseHeaders()))}},o.onload=t(),o.onerror=t("error"),t=St[a]=t("abort");try{o.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),J.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return J.globalEval(e),e}}}),J.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),J.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,r){t=J("<script>").prop({async:!0,charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&r("error"===e.type?404:200,e.type)}),Z.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Dt=[],At=/(=)\?(?=&|$)|\?\?/;J.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Dt.pop()||J.expando+"_"+ot++;return this[e]=!0,e}}),J.ajaxPrefilter("json jsonp",function(t,n,i){var r,o,a,s=!1!==t.jsonp&&(At.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&At.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return r=t.jsonpCallback=J.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(At,"$1"+r):!1!==t.jsonp&&(t.url+=(at.test(t.url)?"&":"?")+t.jsonp+"="+r),t.converters["script json"]=function(){return a||J.error(r+" was not called"),a[0]},t.dataTypes[0]="json",o=e[r],e[r]=function(){a=arguments},i.always(function(){e[r]=o,t[r]&&(t.jsonpCallback=n.jsonpCallback,Dt.push(r)),a&&J.isFunction(o)&&o(a[0]),a=o=void 0}),"script"}),J.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||Z;var i=oe.exec(e),r=!n&&[];return i?[t.createElement(i[1])]:(i=J.buildFragment([e],t,r),r&&r.length&&J(r).remove(),J.merge([],i.childNodes))};var Mt=J.fn.load;J.fn.load=function(e,t,n){if("string"!=typeof e&&Mt)return Mt.apply(this,arguments);var i,r,o,a=this,s=e.indexOf(" ");return s>=0&&(i=J.trim(e.slice(s)),e=e.slice(0,s)),J.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(r="POST"),a.length>0&&J.ajax({url:e,type:r,dataType:"html",data:t}).done(function(e){o=arguments,a.html(i?J("<div>").append(J.parseHTML(e)).find(i):e)}).complete(n&&function(e,t){a.each(n,o||[e.responseText,t,e])}),this},J.expr.filters.animated=function(e){return J.grep(J.timers,function(t){return e===t.elem}).length};var Ot=e.document.documentElement;J.offset={setOffset:function(e,t,n){var i,r,o,a,s,l,c,u=J.css(e,"position"),d=J(e),f={};"static"===u&&(e.style.position="relative"),s=d.offset(),o=J.css(e,"top"),l=J.css(e,"left"),c=("absolute"===u||"fixed"===u)&&(o+l).indexOf("auto")>-1,c?(i=d.position(),a=i.top,r=i.left):(a=parseFloat(o)||0,r=parseFloat(l)||0),J.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+r),"using"in t?t.using.call(e,f):d.css(f)}},J.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){J.offset.setOffset(this,e,t)});var t,n,i=this[0],r={top:0,left:0},o=i&&i.ownerDocument;if(o)return t=o.documentElement,J.contains(t,i)?(void 0!==i.getBoundingClientRect&&(r=i.getBoundingClientRect()),n=q(o),{top:r.top+n.pageYOffset-t.clientTop,left:r.left+n.pageXOffset-t.clientLeft}):r},position:function(){if(this[0]){var e,t,n=this[0],i={top:0,left:0};return"fixed"===J.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),J.nodeName(e[0],"html")||(i=e.offset()),i.top+=J.css(e[0],"borderTopWidth",!0),i.left+=J.css(e[0],"borderLeftWidth",!0)),{top:t.top-i.top-J.css(n,"marginTop",!0),left:t.left-i.left-J.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||Ot;e&&!J.nodeName(e,"html")&&"static"===J.css(e,"position");)e=e.offsetParent;return e||Ot})}}),J.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,n){var i="pageYOffset"===n;J.fn[t]=function(r){return he(this,function(t,r,o){var a=q(t);if(void 0===o)return a?a[n]:t[r];a?a.scrollTo(i?e.pageXOffset:o,i?o:e.pageYOffset):t[r]=o},t,r,arguments.length,null)}}),J.each(["top","left"],function(e,t){J.cssHooks[t]=x(X.pixelPosition,function(e,n){if(n)return n=w(e,t),Ve.test(n)?J(e).position()[t]+"px":n})}),J.each({Height:"height",Width:"width"},function(e,t){J.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){J.fn[i]=function(i,r){var o=arguments.length&&(n||"boolean"!=typeof i),a=n||(!0===i||!0===r?"margin":"border");return he(this,function(t,n,i){var r;return J.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(r=t.documentElement,Math.max(t.body["scroll"+e],r["scroll"+e],t.body["offset"+e],r["offset"+e],r["client"+e])):void 0===i?J.css(t,n,a):J.style(t,n,i,a)},t,o?i:void 0,o,null)}})}),J.fn.size=function(){return this.length},J.fn.andSelf=J.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return J});var It=e.jQuery,Pt=e.$;return J.noConflict=function(t){return e.$===J&&(e.$=Pt),t&&e.jQuery===J&&(e.jQuery=It),J},void 0===t&&(e.jQuery=e.$=J),J}),function(){function e(e){function t(t,n,i,r,o,a){for(;o>=0&&o<a;o+=e){var s=r?r[o]:o;i=n(i,t[s],s,t)}return i}return function(n,i,r,o){i=y(i,o,4);var a=!E(n)&&$.keys(n),s=(a||n).length,l=e>0?0:s-1;return arguments.length<3&&(r=n[a?a[l]:l],l+=e),t(n,i,r,a,l,s)}}function t(e){return function(t,n,i){n=b(n,i);for(var r=S(t),o=e>0?0:r-1;o>=0&&o<r;o+=e)if(n(t[o],o,t))return o;return-1}}function n(e,t,n){return function(i,r,o){var a=0,s=S(i);if("number"==typeof o)e>0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return o=n(i,r),i[o]===r?o:-1;if(r!==r)return o=t(u.call(i,a,s),$.isNaN),o>=0?o+a:-1;for(o=e>0?a:s-1;o>=0&&o<s;o+=e)if(i[o]===r)return o;return-1}}function i(e,t){var n=O.length,i=e.constructor,r=$.isFunction(i)&&i.prototype||s,o="constructor";for($.has(e,o)&&!$.contains(t,o)&&t.push(o);n--;)(o=O[n])in e&&e[o]!==r[o]&&!$.contains(t,o)&&t.push(o)}var r=this,o=r._,a=Array.prototype,s=Object.prototype,l=Function.prototype,c=a.push,u=a.slice,d=s.toString,f=s.hasOwnProperty,p=Array.isArray,h=Object.keys,g=l.bind,m=Object.create,v=function(){},$=function(e){return e instanceof $?e:this instanceof $?void(this._wrapped=e):new $(e)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=$),exports._=$):r._=$,$.VERSION="1.8.3";var y=function(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,r){return e.call(t,n,i,r)};case 4:return function(n,i,r,o){return e.call(t,n,i,r,o)}}return function(){return e.apply(t,arguments)}},b=function(e,t,n){return null==e?$.identity:$.isFunction(e)?y(e,t,n):$.isObject(e)?$.matcher(e):$.property(e)};$.iteratee=function(e,t){return b(e,t,1/0)};var w=function(e,t){return function(n){var i=arguments.length;if(i<2||null==n)return n;for(var r=1;r<i;r++)for(var o=arguments[r],a=e(o),s=a.length,l=0;l<s;l++){var c=a[l];t&&void 0!==n[c]||(n[c]=o[c])}return n}},x=function(e){if(!$.isObject(e))return{};if(m)return m(e);v.prototype=e;var t=new v;return v.prototype=null,t},C=function(e){return function(t){return null==t?void 0:t[e]}},k=Math.pow(2,53)-1,S=C("length"),E=function(e){var t=S(e);return"number"==typeof t&&t>=0&&t<=k};$.each=$.forEach=function(e,t,n){t=y(t,n);var i,r;if(E(e))for(i=0,r=e.length;i<r;i++)t(e[i],i,e);else{var o=$.keys(e);for(i=0,r=o.length;i<r;i++)t(e[o[i]],o[i],e)}return e},$.map=$.collect=function(e,t,n){t=b(t,n);for(var i=!E(e)&&$.keys(e),r=(i||e).length,o=Array(r),a=0;a<r;a++){var s=i?i[a]:a;o[a]=t(e[s],s,e)}return o},$.reduce=$.foldl=$.inject=e(1),$.reduceRight=$.foldr=e(-1),$.find=$.detect=function(e,t,n){var i;if(void 0!==(i=E(e)?$.findIndex(e,t,n):$.findKey(e,t,n))&&-1!==i)return e[i]},$.filter=$.select=function(e,t,n){var i=[];return t=b(t,n),$.each(e,function(e,n,r){t(e,n,r)&&i.push(e)}),i},$.reject=function(e,t,n){return $.filter(e,$.negate(b(t)),n)},$.every=$.all=function(e,t,n){t=b(t,n);for(var i=!E(e)&&$.keys(e),r=(i||e).length,o=0;o<r;o++){var a=i?i[o]:o;if(!t(e[a],a,e))return!1}return!0},$.some=$.any=function(e,t,n){t=b(t,n);for(var i=!E(e)&&$.keys(e),r=(i||e).length,o=0;o<r;o++){var a=i?i[o]:o;if(t(e[a],a,e))return!0}return!1},$.contains=$.includes=$.include=function(e,t,n,i){return E(e)||(e=$.values(e)),("number"!=typeof n||i)&&(n=0),$.indexOf(e,t,n)>=0},$.invoke=function(e,t){var n=u.call(arguments,2),i=$.isFunction(t);return $.map(e,function(e){var r=i?t:e[t];return null==r?r:r.apply(e,n)})},$.pluck=function(e,t){return $.map(e,$.property(t))},$.where=function(e,t){return $.filter(e,$.matcher(t))},$.findWhere=function(e,t){return $.find(e,$.matcher(t))},$.max=function(e,t,n){var i,r,o=-1/0,a=-1/0;if(null==t&&null!=e){e=E(e)?e:$.values(e);for(var s=0,l=e.length;s<l;s++)(i=e[s])>o&&(o=i)}else t=b(t,n),$.each(e,function(e,n,i){((r=t(e,n,i))>a||r===-1/0&&o===-1/0)&&(o=e,a=r)});return o},$.min=function(e,t,n){var i,r,o=1/0,a=1/0;if(null==t&&null!=e){e=E(e)?e:$.values(e);for(var s=0,l=e.length;s<l;s++)(i=e[s])<o&&(o=i)}else t=b(t,n),$.each(e,function(e,n,i){((r=t(e,n,i))<a||r===1/0&&o===1/0)&&(o=e,a=r)});return o},$.shuffle=function(e){for(var t,n=E(e)?e:$.values(e),i=n.length,r=Array(i),o=0;o<i;o++)t=$.random(0,o),t!==o&&(r[o]=r[t]),r[t]=n[o];return r},$.sample=function(e,t,n){return null==t||n?(E(e)||(e=$.values(e)),e[$.random(e.length-1)]):$.shuffle(e).slice(0,Math.max(0,t))},$.sortBy=function(e,t,n){return t=b(t,n),$.pluck($.map(e,function(e,n,i){return{value:e,index:n,criteria:t(e,n,i)}}).sort(function(e,t){var n=e.criteria,i=t.criteria;if(n!==i){if(n>i||void 0===n)return 1;if(n<i||void 0===i)return-1}return e.index-t.index}),"value")};var T=function(e){return function(t,n,i){var r={};return n=b(n,i),$.each(t,function(i,o){var a=n(i,o,t);e(r,i,a)}),r}};$.groupBy=T(function(e,t,n){$.has(e,n)?e[n].push(t):e[n]=[t]}),$.indexBy=T(function(e,t,n){e[n]=t}),$.countBy=T(function(e,t,n){$.has(e,n)?e[n]++:e[n]=1}),$.toArray=function(e){return e?$.isArray(e)?u.call(e):E(e)?$.map(e,$.identity):$.values(e):[]},$.size=function(e){return null==e?0:E(e)?e.length:$.keys(e).length},$.partition=function(e,t,n){t=b(t,n);var i=[],r=[];return $.each(e,function(e,n,o){(t(e,n,o)?i:r).push(e)}),[i,r]},$.first=$.head=$.take=function(e,t,n){if(null!=e)return null==t||n?e[0]:$.initial(e,e.length-t)},$.initial=function(e,t,n){return u.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))},$.last=function(e,t,n){if(null!=e)return null==t||n?e[e.length-1]:$.rest(e,Math.max(0,e.length-t))},$.rest=$.tail=$.drop=function(e,t,n){return u.call(e,null==t||n?1:t)},$.compact=function(e){return $.filter(e,$.identity)};var D=function(e,t,n,i){for(var r=[],o=0,a=i||0,s=S(e);a<s;a++){var l=e[a];if(E(l)&&($.isArray(l)||$.isArguments(l))){t||(l=D(l,t,n));var c=0,u=l.length;for(r.length+=u;c<u;)r[o++]=l[c++]}else n||(r[o++]=l)}return r};$.flatten=function(e,t){return D(e,t,!1)},$.without=function(e){return $.difference(e,u.call(arguments,1))},$.uniq=$.unique=function(e,t,n,i){$.isBoolean(t)||(i=n,n=t,t=!1),null!=n&&(n=b(n,i));for(var r=[],o=[],a=0,s=S(e);a<s;a++){var l=e[a],c=n?n(l,a,e):l;t?(a&&o===c||r.push(l),o=c):n?$.contains(o,c)||(o.push(c),r.push(l)):$.contains(r,l)||r.push(l)}return r},$.union=function(){return $.uniq(D(arguments,!0,!0))},$.intersection=function(e){for(var t=[],n=arguments.length,i=0,r=S(e);i<r;i++){var o=e[i];if(!$.contains(t,o)){for(var a=1;a<n&&$.contains(arguments[a],o);a++);a===n&&t.push(o)}}return t},$.difference=function(e){var t=D(arguments,!0,!0,1);return $.filter(e,function(e){return!$.contains(t,e)})},$.zip=function(){return $.unzip(arguments)},$.unzip=function(e){for(var t=e&&$.max(e,S).length||0,n=Array(t),i=0;i<t;i++)n[i]=$.pluck(e,i);return n},$.object=function(e,t){for(var n={},i=0,r=S(e);i<r;i++)t?n[e[i]]=t[i]:n[e[i][0]]=e[i][1];return n},$.findIndex=t(1),$.findLastIndex=t(-1),$.sortedIndex=function(e,t,n,i){n=b(n,i,1);for(var r=n(t),o=0,a=S(e);o<a;){var s=Math.floor((o+a)/2);n(e[s])<r?o=s+1:a=s}return o},$.indexOf=n(1,$.findIndex,$.sortedIndex),$.lastIndexOf=n(-1,$.findLastIndex),$.range=function(e,t,n){null==t&&(t=e||0,e=0),n=n||1;for(var i=Math.max(Math.ceil((t-e)/n),0),r=Array(i),o=0;o<i;o++,e+=n)r[o]=e;return r};var A=function(e,t,n,i,r){if(!(i instanceof t))return e.apply(n,r);var o=x(e.prototype),a=e.apply(o,r);return $.isObject(a)?a:o};$.bind=function(e,t){if(g&&e.bind===g)return g.apply(e,u.call(arguments,1));if(!$.isFunction(e))throw new TypeError("Bind must be called on a function");var n=u.call(arguments,2),i=function(){return A(e,i,t,this,n.concat(u.call(arguments)))};return i},$.partial=function(e){var t=u.call(arguments,1),n=function(){for(var i=0,r=t.length,o=Array(r),a=0;a<r;a++)o[a]=t[a]===$?arguments[i++]:t[a];for(;i<arguments.length;)o.push(arguments[i++]);return A(e,n,this,this,o)};return n},$.bindAll=function(e){var t,n,i=arguments.length;if(i<=1)throw new Error("bindAll must be passed function names");for(t=1;t<i;t++)n=arguments[t],e[n]=$.bind(e[n],e);return e},$.memoize=function(e,t){var n=function(i){var r=n.cache,o=""+(t?t.apply(this,arguments):i);return $.has(r,o)||(r[o]=e.apply(this,arguments)),r[o]};return n.cache={},n},$.delay=function(e,t){var n=u.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},$.defer=$.partial($.delay,$,1),$.throttle=function(e,t,n){var i,r,o,a=null,s=0;n||(n={});var l=function(){s=!1===n.leading?0:$.now(),a=null,o=e.apply(i,r),a||(i=r=null)};return function(){var c=$.now();s||!1!==n.leading||(s=c);var u=t-(c-s);return i=this,r=arguments,u<=0||u>t?(a&&(clearTimeout(a),a=null),s=c,o=e.apply(i,r),a||(i=r=null)):a||!1===n.trailing||(a=setTimeout(l,u)),o}},$.debounce=function(e,t,n){var i,r,o,a,s,l=function(){var c=$.now()-a;c<t&&c>=0?i=setTimeout(l,t-c):(i=null,n||(s=e.apply(o,r),i||(o=r=null)))};return function(){o=this,r=arguments,a=$.now();var c=n&&!i;return i||(i=setTimeout(l,t)),c&&(s=e.apply(o,r),o=r=null),s}},$.wrap=function(e,t){return $.partial(t,e)},$.negate=function(e){return function(){return!e.apply(this,arguments)}},$.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,i=e[t].apply(this,arguments);n--;)i=e[n].call(this,i);return i}},$.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},$.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}},$.once=$.partial($.before,2);var M=!{toString:null}.propertyIsEnumerable("toString"),O=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];$.keys=function(e){if(!$.isObject(e))return[];if(h)return h(e);var t=[];for(var n in e)$.has(e,n)&&t.push(n);return M&&i(e,t),t},$.allKeys=function(e){if(!$.isObject(e))return[];var t=[];for(var n in e)t.push(n);return M&&i(e,t),t},$.values=function(e){for(var t=$.keys(e),n=t.length,i=Array(n),r=0;r<n;r++)i[r]=e[t[r]];return i},$.mapObject=function(e,t,n){t=b(t,n);for(var i,r=$.keys(e),o=r.length,a={},s=0;s<o;s++)i=r[s],a[i]=t(e[i],i,e);return a},$.pairs=function(e){for(var t=$.keys(e),n=t.length,i=Array(n),r=0;r<n;r++)i[r]=[t[r],e[t[r]]];return i},$.invert=function(e){for(var t={},n=$.keys(e),i=0,r=n.length;i<r;i++)t[e[n[i]]]=n[i];return t},$.functions=$.methods=function(e){var t=[];for(var n in e)$.isFunction(e[n])&&t.push(n);return t.sort()},$.extend=w($.allKeys),$.extendOwn=$.assign=w($.keys),$.findKey=function(e,t,n){t=b(t,n);for(var i,r=$.keys(e),o=0,a=r.length;o<a;o++)if(i=r[o],t(e[i],i,e))return i},$.pick=function(e,t,n){var i,r,o={},a=e;if(null==a)return o;$.isFunction(t)?(r=$.allKeys(a),i=y(t,n)):(r=D(arguments,!1,!1,1),i=function(e,t,n){return t in n},a=Object(a));for(var s=0,l=r.length;s<l;s++){var c=r[s],u=a[c];i(u,c,a)&&(o[c]=u)}return o},$.omit=function(e,t,n){if($.isFunction(t))t=$.negate(t);else{var i=$.map(D(arguments,!1,!1,1),String);t=function(e,t){return!$.contains(i,t)}}return $.pick(e,t,n)},$.defaults=w($.allKeys,!0),$.create=function(e,t){var n=x(e);return t&&$.extendOwn(n,t),n},$.clone=function(e){return $.isObject(e)?$.isArray(e)?e.slice():$.extend({},e):e},$.tap=function(e,t){return t(e),e},$.isMatch=function(e,t){var n=$.keys(t),i=n.length;if(null==e)return!i;for(var r=Object(e),o=0;o<i;o++){var a=n[o];if(t[a]!==r[a]||!(a in r))return!1}return!0};var I=function(e,t,n,i){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return e===t;e instanceof $&&(e=e._wrapped),t instanceof $&&(t=t._wrapped);var r=d.call(e);if(r!==d.call(t))return!1;switch(r){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t}var o="[object Array]"===r;if(!o){
+if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!($.isFunction(a)&&a instanceof a&&$.isFunction(s)&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}n=n||[],i=i||[];for(var l=n.length;l--;)if(n[l]===e)return i[l]===t;if(n.push(e),i.push(t),o){if((l=e.length)!==t.length)return!1;for(;l--;)if(!I(e[l],t[l],n,i))return!1}else{var c,u=$.keys(e);if(l=u.length,$.keys(t).length!==l)return!1;for(;l--;)if(c=u[l],!$.has(t,c)||!I(e[c],t[c],n,i))return!1}return n.pop(),i.pop(),!0};$.isEqual=function(e,t){return I(e,t)},$.isEmpty=function(e){return null==e||(E(e)&&($.isArray(e)||$.isString(e)||$.isArguments(e))?0===e.length:0===$.keys(e).length)},$.isElement=function(e){return!(!e||1!==e.nodeType)},$.isArray=p||function(e){return"[object Array]"===d.call(e)},$.isObject=function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},$.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(e){$["is"+e]=function(t){return d.call(t)==="[object "+e+"]"}}),$.isArguments(arguments)||($.isArguments=function(e){return $.has(e,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&($.isFunction=function(e){return"function"==typeof e||!1}),$.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},$.isNaN=function(e){return $.isNumber(e)&&e!==+e},$.isBoolean=function(e){return!0===e||!1===e||"[object Boolean]"===d.call(e)},$.isNull=function(e){return null===e},$.isUndefined=function(e){return void 0===e},$.has=function(e,t){return null!=e&&f.call(e,t)},$.noConflict=function(){return r._=o,this},$.identity=function(e){return e},$.constant=function(e){return function(){return e}},$.noop=function(){},$.property=C,$.propertyOf=function(e){return null==e?function(){}:function(t){return e[t]}},$.matcher=$.matches=function(e){return e=$.extendOwn({},e),function(t){return $.isMatch(t,e)}},$.times=function(e,t,n){var i=Array(Math.max(0,e));t=y(t,n,1);for(var r=0;r<e;r++)i[r]=t(r);return i},$.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},$.now=Date.now||function(){return(new Date).getTime()};var P={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},N=$.invert(P),j=function(e){var t=function(t){return e[t]},n="(?:"+$.keys(e).join("|")+")",i=RegExp(n),r=RegExp(n,"g");return function(e){return e=null==e?"":""+e,i.test(e)?e.replace(r,t):e}};$.escape=j(P),$.unescape=j(N),$.result=function(e,t,n){var i=null==e?void 0:e[t];return void 0===i&&(i=n),$.isFunction(i)?i.call(e):i};var F=0;$.uniqueId=function(e){var t=++F+"";return e?e+t:t},$.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var L=/(.)^/,R={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},V=/\\|'|\r|\n|\u2028|\u2029/g,H=function(e){return"\\"+R[e]};$.template=function(e,t,n){!t&&n&&(t=n),t=$.defaults({},t,$.templateSettings);var i=RegExp([(t.escape||L).source,(t.interpolate||L).source,(t.evaluate||L).source].join("|")+"|$","g"),r=0,o="__p+='";e.replace(i,function(t,n,i,a,s){return o+=e.slice(r,s).replace(V,H),r=s+t.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":i?o+="'+\n((__t=("+i+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),t}),o+="';\n",t.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var a=new Function(t.variable||"obj","_",o)}catch(e){throw e.source=o,e}var s=function(e){return a.call(this,e,$)};return s.source="function("+(t.variable||"obj")+"){\n"+o+"}",s},$.chain=function(e){var t=$(e);return t._chain=!0,t};var q=function(e,t){return e._chain?$(t).chain():t};$.mixin=function(e){$.each($.functions(e),function(t){var n=$[t]=e[t];$.prototype[t]=function(){var e=[this._wrapped];return c.apply(e,arguments),q(this,n.apply($,e))}})},$.mixin($),$.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=a[e];$.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],q(this,n)}}),$.each(["concat","join","slice"],function(e){var t=a[e];$.prototype[e]=function(){return q(this,t.apply(this._wrapped,arguments))}}),$.prototype.value=function(){return this._wrapped},$.prototype.valueOf=$.prototype.toJSON=$.prototype.value,$.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return $})}.call(this),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(e){"use strict";function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(void 0!==e.style[n])return{end:t[n]};return!1}e.fn.emulateTransitionEnd=function(t){var n=!1,i=this;e(this).one("bsTransitionEnd",function(){n=!0});var r=function(){n||e(i).trigger(e.support.transition.end)};return setTimeout(r,t),this},e(function(){e.support.transition=t(),e.support.transition&&(e.event.special.bsTransitionEnd={bindType:e.support.transition.end,delegateType:e.support.transition.end,handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var n=e(this),r=n.data("bs.alert");r||n.data("bs.alert",r=new i(this)),"string"==typeof t&&r[t].call(n)})}var n='[data-dismiss="alert"]',i=function(t){e(t).on("click",n,this.close)};i.VERSION="3.2.0",i.prototype.close=function(t){function n(){o.detach().trigger("closed.bs.alert").remove()}var i=e(this),r=i.attr("data-target");r||(r=i.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var o=e(r);t&&t.preventDefault(),o.length||(o=i.hasClass("alert")?i:i.parent()),o.trigger(t=e.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),e.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",n).emulateTransitionEnd(150):n())};var r=e.fn.alert;e.fn.alert=t,e.fn.alert.Constructor=i,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.bs.alert.data-api",n,i.prototype.close)}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.button"),o="object"==typeof t&&t;r||i.data("bs.button",r=new n(this,o)),"toggle"==t?r.toggle():t&&r.setState(t)})}var n=function(t,i){this.$element=e(t),this.options=e.extend({},n.DEFAULTS,i),this.isLoading=!1};n.VERSION="3.2.0",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(t){var n="disabled",i=this.$element,r=i.is("input")?"val":"html",o=i.data();t+="Text",null==o.resetText&&i.data("resetText",i[r]()),i[r](null==o[t]?this.options[t]:o[t]),setTimeout(e.proxy(function(){"loadingText"==t?(this.isLoading=!0,i.addClass(n).attr(n,n)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n))},this),0)},n.prototype.toggle=function(){var e=!0,t=this.$element.closest('[data-toggle="buttons"]');if(t.length){var n=this.$element.find("input");"radio"==n.prop("type")&&(n.prop("checked")&&this.$element.hasClass("active")?e=!1:t.find(".active").removeClass("active")),e&&n.prop("checked",!this.$element.hasClass("active")).trigger("change")}e&&this.$element.toggleClass("active")};var i=e.fn.button;e.fn.button=t,e.fn.button.Constructor=n,e.fn.button.noConflict=function(){return e.fn.button=i,this},e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var i=e(n.target);i.hasClass("btn")||(i=i.closest(".btn")),t.call(i,"toggle"),n.preventDefault()})}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.carousel"),o=e.extend({},n.DEFAULTS,i.data(),"object"==typeof t&&t),a="string"==typeof t?t:o.slide;r||i.data("bs.carousel",r=new n(this,o)),"number"==typeof t?r.to(t):a?r[a]():o.interval&&r.pause().cycle()})}var n=function(t,n){this.$element=e(t).on("keydown.bs.carousel",e.proxy(this.keydown,this)),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter.bs.carousel",e.proxy(this.pause,this)).on("mouseleave.bs.carousel",e.proxy(this.cycle,this))};n.VERSION="3.2.0",n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},n.prototype.keydown=function(e){switch(e.which){case 37:this.prev();break;case 39:this.next();break;default:return}e.preventDefault()},n.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},n.prototype.getItemIndex=function(e){return this.$items=e.parent().children(".item"),this.$items.index(e||this.$active)},n.prototype.to=function(t){var n=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){n.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",e(this.$items[t]))},n.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){if(!this.sliding)return this.slide("next")},n.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},n.prototype.slide=function(t,n){var i=this.$element.find(".item.active"),r=n||i[t](),o=this.interval,a="next"==t?"left":"right",s="next"==t?"first":"last",l=this;if(!r.length){if(!this.options.wrap)return;r=this.$element.find(".item")[s]()}if(r.hasClass("active"))return this.sliding=!1;var c=r[0],u=e.Event("slide.bs.carousel",{relatedTarget:c,direction:a});if(this.$element.trigger(u),!u.isDefaultPrevented()){if(this.sliding=!0,o&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var d=e(this.$indicators.children()[this.getItemIndex(r)]);d&&d.addClass("active")}var f=e.Event("slid.bs.carousel",{relatedTarget:c,direction:a});return e.support.transition&&this.$element.hasClass("slide")?(r.addClass(t),r[0].offsetWidth,i.addClass(a),r.addClass(a),i.one("bsTransitionEnd",function(){r.removeClass([t,a].join(" ")).addClass("active"),i.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(f)},0)}).emulateTransitionEnd(1e3*i.css("transition-duration").slice(0,-1))):(i.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger(f)),o&&this.cycle(),this}};var i=e.fn.carousel;e.fn.carousel=t,e.fn.carousel.Constructor=n,e.fn.carousel.noConflict=function(){return e.fn.carousel=i,this},e(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(n){var i,r=e(this),o=e(r.attr("data-target")||(i=r.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""));if(o.hasClass("carousel")){var a=e.extend({},o.data(),r.data()),s=r.attr("data-slide-to");s&&(a.interval=!1),t.call(o,a),s&&o.data("bs.carousel").to(s),n.preventDefault()}}),e(window).on("load",function(){e('[data-ride="carousel"]').each(function(){var n=e(this);t.call(n,n.data())})})}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.collapse"),o=e.extend({},n.DEFAULTS,i.data(),"object"==typeof t&&t);!r&&o.toggle&&"show"==t&&(t=!t),r||i.data("bs.collapse",r=new n(this,o)),"string"==typeof t&&r[t]()})}var n=function(t,i){this.$element=e(t),this.options=e.extend({},n.DEFAULTS,i),this.transitioning=null,this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};n.VERSION="3.2.0",n.DEFAULTS={toggle:!0},n.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},n.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var n=e.Event("show.bs.collapse");if(this.$element.trigger(n),!n.isDefaultPrevented()){var i=this.$parent&&this.$parent.find("> .panel > .in");if(i&&i.length){var r=i.data("bs.collapse");if(r&&r.transitioning)return;t.call(i,"hide"),r||i.data("bs.collapse",null)}var o=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[o](0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[o](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return a.call(this);var s=e.camelCase(["scroll",o].join("-"));this.$element.one("bsTransitionEnd",e.proxy(a,this)).emulateTransitionEnd(350)[o](this.$element[0][s])}}},n.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=e.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};if(!e.support.transition)return i.call(this);this.$element[n](0).one("bsTransitionEnd",e.proxy(i,this)).emulateTransitionEnd(350)}}},n.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var i=e.fn.collapse;e.fn.collapse=t,e.fn.collapse.Constructor=n,e.fn.collapse.noConflict=function(){return e.fn.collapse=i,this},e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(n){var i,r=e(this),o=r.attr("data-target")||n.preventDefault()||(i=r.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""),a=e(o),s=a.data("bs.collapse"),l=s?"toggle":r.data(),c=r.attr("data-parent"),u=c&&e(c);s&&s.transitioning||(u&&u.find('[data-toggle="collapse"][data-parent="'+c+'"]').not(r).addClass("collapsed"),r[a.hasClass("in")?"addClass":"removeClass"]("collapsed")),t.call(a,l)})}(jQuery),function(e){"use strict";function t(t){t&&3===t.which||(e(r).remove(),e(o).each(function(){var i=n(e(this)),r={relatedTarget:this};i.hasClass("open")&&(i.trigger(t=e.Event("hide.bs.dropdown",r)),t.isDefaultPrevented()||i.removeClass("open").trigger("hidden.bs.dropdown",r))}))}function n(t){var n=t.attr("data-target");n||(n=t.attr("href"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i=n&&e(n);return i&&i.length?i:t.parent()}function i(t){return this.each(function(){var n=e(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new a(this)),"string"==typeof t&&i[t].call(n)})}var r=".dropdown-backdrop",o='[data-toggle="dropdown"]',a=function(t){e(t).on("click.bs.dropdown",this.toggle)};a.VERSION="3.2.0",a.prototype.toggle=function(i){var r=e(this);if(!r.is(".disabled, :disabled")){var o=n(r),a=o.hasClass("open");if(t(),!a){"ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&e('<div class="dropdown-backdrop"/>').insertAfter(e(this)).on("click",t);var s={relatedTarget:this};if(o.trigger(i=e.Event("show.bs.dropdown",s)),i.isDefaultPrevented())return;r.trigger("focus"),o.toggleClass("open").trigger("shown.bs.dropdown",s)}return!1}},a.prototype.keydown=function(t){if(/(38|40|27)/.test(t.keyCode)){var i=e(this);if(t.preventDefault(),t.stopPropagation(),!i.is(".disabled, :disabled")){var r=n(i),a=r.hasClass("open");if(!a||a&&27==t.keyCode)return 27==t.which&&r.find(o).trigger("focus"),i.trigger("click");var s=" li:not(.divider):visible a",l=r.find('[role="menu"]'+s+', [role="listbox"]'+s);if(l.length){var c=l.index(l.filter(":focus"));38==t.keyCode&&c>0&&c--,40==t.keyCode&&c<l.length-1&&c++,~c||(c=0),l.eq(c).trigger("focus")}}}};var s=e.fn.dropdown;e.fn.dropdown=i,e.fn.dropdown.Constructor=a,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=s,this},e(document).on("click.bs.dropdown.data-api",t).on("click.bs.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.bs.dropdown.data-api",o,a.prototype.toggle).on("keydown.bs.dropdown.data-api",o+', [role="menu"], [role="listbox"]',a.prototype.keydown)}(jQuery),function(e){"use strict";function t(t,i){return this.each(function(){var r=e(this),o=r.data("bs.modal"),a=e.extend({},n.DEFAULTS,r.data(),"object"==typeof t&&t);o||r.data("bs.modal",o=new n(this,a)),"string"==typeof t?o[t](i):a.show&&o.show(i)})}var n=function(t,n){this.options=n,this.$body=e(document.body),this.$element=e(t),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,e.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};n.VERSION="3.2.0",n.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},n.prototype.toggle=function(e){return this.isShown?this.hide():this.show(e)},n.prototype.show=function(t){var n=this,i=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(i),this.isShown||i.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.$body.addClass("modal-open"),this.setScrollbar(),this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',e.proxy(this.hide,this)),this.backdrop(function(){var i=e.support.transition&&n.$element.hasClass("fade");n.$element.parent().length||n.$element.appendTo(n.$body),n.$element.show().scrollTop(0),i&&n.$element[0].offsetWidth,n.$element.addClass("in").attr("aria-hidden",!1),n.enforceFocus();var r=e.Event("shown.bs.modal",{relatedTarget:t});i?n.$element.find(".modal-dialog").one("bsTransitionEnd",function(){n.$element.trigger("focus").trigger(r)}).emulateTransitionEnd(300):n.$element.trigger("focus").trigger(r)}))},n.prototype.hide=function(t){t&&t.preventDefault(),t=e.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.$body.removeClass("modal-open"),this.resetScrollbar(),this.escape(),e(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),e.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",e.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},n.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy(function(e){this.$element[0]===e.target||this.$element.has(e.target).length||this.$element.trigger("focus")},this))},n.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",e.proxy(function(e){27==e.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},n.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){e.$element.trigger("hidden.bs.modal")})},n.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},n.prototype.backdrop=function(t){var n=this,i=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var r=e.support.transition&&i;if(this.$backdrop=e('<div class="modal-backdrop '+i+'" />').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",e.proxy(function(e){e.target===e.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;r?this.$backdrop.one("bsTransitionEnd",t).emulateTransitionEnd(150):t()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var o=function(){n.removeBackdrop(),t&&t()};e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",o).emulateTransitionEnd(150):o()}else t&&t()},n.prototype.checkScrollbar=function(){document.body.clientWidth>=window.innerWidth||(this.scrollbarWidth=this.scrollbarWidth||this.measureScrollbar())},n.prototype.setScrollbar=function(){var e=parseInt(this.$body.css("padding-right")||0,10);this.scrollbarWidth&&this.$body.css("padding-right",e+this.scrollbarWidth)},n.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},n.prototype.measureScrollbar=function(){var e=document.createElement("div");e.className="modal-scrollbar-measure",this.$body.append(e);var t=e.offsetWidth-e.clientWidth;return this.$body[0].removeChild(e),t};var i=e.fn.modal;e.fn.modal=t,e.fn.modal.Constructor=n,e.fn.modal.noConflict=function(){return e.fn.modal=i,this},e(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(n){var i=e(this),r=i.attr("href"),o=e(i.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),a=o.data("bs.modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},o.data(),i.data());i.is("a")&&n.preventDefault(),o.one("show.bs.modal",function(e){e.isDefaultPrevented()||o.one("hidden.bs.modal",function(){i.is(":visible")&&i.trigger("focus")})}),t.call(o,a,this)})}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.tooltip"),o="object"==typeof t&&t;(r||"destroy"!=t)&&(r||i.data("bs.tooltip",r=new n(this,o)),"string"==typeof t&&r[t]())})}var n=function(e,t){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",e,t)};n.VERSION="3.2.0",n.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},n.prototype.init=function(t,n,i){this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&e(this.options.viewport.selector||this.options.viewport);for(var r=this.options.trigger.split(" "),o=r.length;o--;){var a=r[o];if("click"==a)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=a){var s="hover"==a?"mouseenter":"focusin",l="hover"==a?"mouseleave":"focusout";this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.getOptions=function(t){return t=e.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},n.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,function(e,i){n[e]!=i&&(t[e]=i)}),t},n.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),clearTimeout(n.timeout),n.hoverState="in",!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)},n.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),clearTimeout(n.timeout),n.hoverState="out",!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)},n.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var n=e.contains(document.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!n)return;var i=this,r=this.tip(),o=this.getUID(this.type);this.setContent(),r.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&r.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,l=s.test(a);l&&(a=a.replace(s,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element);var c=this.getPosition(),u=r[0].offsetWidth,d=r[0].offsetHeight;if(l){var f=a,p=this.$element.parent(),h=this.getPosition(p);a="bottom"==a&&c.top+c.height+d-h.scroll>h.height?"top":"top"==a&&c.top-h.scroll-d<0?"bottom":"right"==a&&c.right+u>h.width?"left":"left"==a&&c.left-u<h.left?"right":a,r.removeClass(f).addClass(a)}var g=this.getCalculatedOffset(a,c,u,d);this.applyPlacement(g,a);var m=function(){i.$element.trigger("shown.bs."+i.type),i.hoverState=null};e.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",m).emulateTransitionEnd(150):m()}},n.prototype.applyPlacement=function(t,n){var i=this.tip(),r=i[0].offsetWidth,o=i[0].offsetHeight,a=parseInt(i.css("margin-top"),10),s=parseInt(i.css("margin-left"),10);isNaN(a)&&(a=0),isNaN(s)&&(s=0),t.top=t.top+a,t.left=t.left+s,e.offset.setOffset(i[0],e.extend({using:function(e){i.css({top:Math.round(e.top),left:Math.round(e.left)})}},t),0),i.addClass("in");var l=i[0].offsetWidth,c=i[0].offsetHeight;"top"==n&&c!=o&&(t.top=t.top+o-c);var u=this.getViewportAdjustedDelta(n,t,l,c);u.left?t.left+=u.left:t.top+=u.top;var d=u.left?2*u.left-r+l:2*u.top-o+c,f=u.left?"left":"top",p=u.left?"offsetWidth":"offsetHeight";i.offset(t),this.replaceArrow(d,i[0][p],f)},n.prototype.replaceArrow=function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},n.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},n.prototype.hide=function(){function t(){"in"!=n.hoverState&&i.detach(),n.$element.trigger("hidden.bs."+n.type)}var n=this,i=this.tip(),r=e.Event("hide.bs."+this.type);if(this.$element.removeAttr("aria-describedby"),this.$element.trigger(r),!r.isDefaultPrevented())return i.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?i.one("bsTransitionEnd",t).emulateTransitionEnd(150):t(),this.hoverState=null,this},n.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||"string"!=typeof e.attr("data-original-title"))&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},n.prototype.hasContent=function(){return this.getTitle()},n.prototype.getPosition=function(t){t=t||this.$element;var n=t[0],i="BODY"==n.tagName;return e.extend({},"function"==typeof n.getBoundingClientRect?n.getBoundingClientRect():null,{scroll:i?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop(),width:i?e(window).width():t.outerWidth(),height:i?e(window).height():t.outerHeight()},i?{top:0,left:0}:t.offset())},n.prototype.getCalculatedOffset=function(e,t,n,i){return"bottom"==e?{top:t.top+t.height,left:t.left+t.width/2-n/2}:"top"==e?{top:t.top-i,left:t.left+t.width/2-n/2}:"left"==e?{top:t.top+t.height/2-i/2,left:t.left-n}:{top:t.top+t.height/2-i/2,left:t.left+t.width}},n.prototype.getViewportAdjustedDelta=function(e,t,n,i){var r={top:0,left:0};if(!this.$viewport)return r;var o=this.options.viewport&&this.options.viewport.padding||0,a=this.getPosition(this.$viewport);if(/right|left/.test(e)){var s=t.top-o-a.scroll,l=t.top+o-a.scroll+i;s<a.top?r.top=a.top-s:l>a.top+a.height&&(r.top=a.top+a.height-l)}else{var c=t.left-o,u=t.left+o+n;c<a.left?r.left=a.left-c:u>a.width&&(r.left=a.left+a.width-u)}return r},n.prototype.getTitle=function(){var e=this.$element,t=this.options;return e.attr("data-original-title")||("function"==typeof t.title?t.title.call(e[0]):t.title)},n.prototype.getUID=function(e){do{e+=~~(1e6*Math.random())}while(document.getElementById(e));return e},n.prototype.tip=function(){return this.$tip=this.$tip||e(this.options.template)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},n.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},n.prototype.enable=function(){this.enabled=!0},n.prototype.disable=function(){this.enabled=!1},n.prototype.toggleEnabled=function(){this.enabled=!this.enabled},n.prototype.toggle=function(t){var n=this;t&&((n=e(t.currentTarget).data("bs."+this.type))||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n))),n.tip().hasClass("in")?n.leave(n):n.enter(n)},n.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var i=e.fn.tooltip;e.fn.tooltip=t,e.fn.tooltip.Constructor=n,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=i,this}}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.popover"),o="object"==typeof t&&t;(r||"destroy"!=t)&&(r||i.data("bs.popover",r=new n(this,o)),"string"==typeof t&&r[t]())})}var n=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");n.VERSION="3.2.0",n.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),n.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),n.prototype.constructor=n,n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content").empty()[this.options.html?"string"==typeof n?"html":"append":"text"](n),e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},n.prototype.tip=function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip};var i=e.fn.popover;e.fn.popover=t,e.fn.popover.Constructor=n,e.fn.popover.noConflict=function(){return e.fn.popover=i,this}}(jQuery),function(e){"use strict";function t(n,i){var r=e.proxy(this.process,this);this.$body=e("body"),this.$scrollElement=e(e(n).is("body")?window:n),this.options=e.extend({},t.DEFAULTS,i),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",r),this.refresh(),this.process()}function n(n){return this.each(function(){var i=e(this),r=i.data("bs.scrollspy"),o="object"==typeof n&&n;r||i.data("bs.scrollspy",r=new t(this,o)),"string"==typeof n&&r[n]()})}t.VERSION="3.2.0",t.DEFAULTS={offset:10},t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},t.prototype.refresh=function(){var t="offset",n=0;e.isWindow(this.$scrollElement[0])||(t="position",n=this.$scrollElement.scrollTop()),this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight();var i=this;this.$body.find(this.selector).map(function(){var i=e(this),r=i.data("target")||i.attr("href"),o=/^#./.test(r)&&e(r);return o&&o.length&&o.is(":visible")&&[[o[t]().top+n,r]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){i.offsets.push(this[0]),i.targets.push(this[1])})},t.prototype.process=function(){var e,t=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),i=this.options.offset+n-this.$scrollElement.height(),r=this.offsets,o=this.targets,a=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),t>=i)return a!=(e=o[o.length-1])&&this.activate(e);if(a&&t<=r[0])return a!=(e=o[0])&&this.activate(e);for(e=r.length;e--;)a!=o[e]&&t>=r[e]&&(!r[e+1]||t<=r[e+1])&&this.activate(o[e])},
+t.prototype.activate=function(t){this.activeTarget=t,e(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var n=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=e(n).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")};var i=e.fn.scrollspy;e.fn.scrollspy=n,e.fn.scrollspy.Constructor=t,e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=i,this},e(window).on("load.bs.scrollspy.data-api",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);n.call(t,t.data())})})}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.tab");r||i.data("bs.tab",r=new n(this)),"string"==typeof t&&r[t]()})}var n=function(t){this.element=e(t)};n.VERSION="3.2.0",n.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),i=t.data("target");if(i||(i=t.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var r=n.find(".active:last a")[0],o=e.Event("show.bs.tab",{relatedTarget:r});if(t.trigger(o),!o.isDefaultPrevented()){var a=e(i);this.activate(t.closest("li"),n),this.activate(a,a.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:r})})}}},n.prototype.activate=function(t,n,i){function r(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),a?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),i&&i()}var o=n.find("> .active"),a=i&&e.support.transition&&o.hasClass("fade");a?o.one("bsTransitionEnd",r).emulateTransitionEnd(150):r(),o.removeClass("in")};var i=e.fn.tab;e.fn.tab=t,e.fn.tab.Constructor=n,e.fn.tab.noConflict=function(){return e.fn.tab=i,this},e(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(n){n.preventDefault(),t.call(e(this),"show")})}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.affix"),o="object"==typeof t&&t;r||i.data("bs.affix",r=new n(this,o)),"string"==typeof t&&r[t]()})}var n=function(t,i){this.options=e.extend({},n.DEFAULTS,i),this.$target=e(this.options.target).on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(t),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.2.0",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var e=this.$target.scrollTop(),t=this.$element.offset();return this.pinnedOffset=t.top-e},n.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t=e(document).height(),i=this.$target.scrollTop(),r=this.$element.offset(),o=this.options.offset,a=o.top,s=o.bottom;"object"!=typeof o&&(s=a=o),"function"==typeof a&&(a=o.top(this.$element)),"function"==typeof s&&(s=o.bottom(this.$element));var l=!(null!=this.unpin&&i+this.unpin<=r.top)&&(null!=s&&r.top+this.$element.height()>=t-s?"bottom":null!=a&&i<=a&&"top");if(this.affixed!==l){null!=this.unpin&&this.$element.css("top","");var c="affix"+(l?"-"+l:""),u=e.Event(c+".bs.affix");this.$element.trigger(u),u.isDefaultPrevented()||(this.affixed=l,this.unpin="bottom"==l?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(c).trigger(e.Event(c.replace("affix","affixed"))),"bottom"==l&&this.$element.offset({top:t-this.$element.height()-s}))}}};var i=e.fn.affix;e.fn.affix=t,e.fn.affix.Constructor=n,e.fn.affix.noConflict=function(){return e.fn.affix=i,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var n=e(this),i=n.data();i.offset=i.offset||{},i.offsetBottom&&(i.offset.bottom=i.offsetBottom),i.offsetTop&&(i.offset.top=i.offsetTop),t.call(n,i)})})}(jQuery),function(e,t,n){"use strict";function i(e,t){return t=t||Error,function(){var n,i,r=arguments[0],o="["+(e?e+":":"")+r+"] ",a=arguments[1],s=arguments;for(n=o+a.replace(/\{\d+\}/g,function(e){var t,n=+e.slice(1,-1);return n+2<s.length?(t=s[n+2],"function"==typeof t?t.toString().replace(/ ?\{[\s\S]*$/,""):void 0===t?"undefined":"string"!=typeof t?U(t):t):e}),n=n+"\nhttp://errors.angularjs.org/1.3.0/"+(e?e+"/":"")+r,i=2;i<arguments.length;i++)n=n+(2==i?"?":"&")+"p"+(i-2)+"="+encodeURIComponent(function(e){return"function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):void 0===e?"undefined":"string"!=typeof e?JSON.stringify(e):e}(arguments[i]));return new t(n)}}function r(e){if(null==e||S(e))return!1;var t=e.length;return!(e.nodeType!==ii||!t)||(b(e)||Zn(e)||0===t||"number"==typeof t&&t>0&&t-1 in e)}function o(e,t,n){var i,a;if(e)if(C(e))for(i in e)"prototype"==i||"length"==i||"name"==i||e.hasOwnProperty&&!e.hasOwnProperty(i)||t.call(n,e[i],i,e);else if(Zn(e)||r(e)){var s="object"!=typeof e;for(i=0,a=e.length;i<a;i++)(s||i in e)&&t.call(n,e[i],i,e)}else if(e.forEach&&e.forEach!==o)e.forEach(t,n,e);else for(i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e);return e}function a(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t.sort()}function s(e,t,n){for(var i=a(e),r=0;r<i.length;r++)t.call(n,e[i[r]],i[r]);return i}function l(e){return function(t,n){e(n,t)}}function c(){return++Gn}function u(e,t){t?e.$$hashKey=t:delete e.$$hashKey}function d(e){for(var t=e.$$hashKey,n=1,i=arguments.length;n<i;n++){var r=arguments[n];if(r)for(var o=Object.keys(r),a=0,s=o.length;a<s;a++){var l=o[a];e[l]=r[l]}}return u(e,t),e}function f(e){return parseInt(e,10)}function p(e,t){return d(new(d(function(){},{prototype:e})),t)}function h(){}function g(e){return e}function m(e){return function(){return e}}function v(e){return void 0===e}function $(e){return void 0!==e}function y(e){return null!==e&&"object"==typeof e}function b(e){return"string"==typeof e}function w(e){return"number"==typeof e}function x(e){return"[object Date]"===zn.call(e)}function C(e){return"function"==typeof e}function k(e){return"[object RegExp]"===zn.call(e)}function S(e){return e&&e.window===e}function E(e){return e&&e.$evalAsync&&e.$watch}function T(e){return"[object File]"===zn.call(e)}function D(e){return"[object Blob]"===zn.call(e)}function A(e){return"boolean"==typeof e}function M(e){return e&&C(e.then)}function O(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function I(e){var t,n={},i=e.split(",");for(t=0;t<i.length;t++)n[i[t]]=!0;return n}function P(e){return Nn(e.nodeName||e[0].nodeName)}function N(e,t){var n=e.indexOf(t);return n>=0&&e.splice(n,1),t}function j(e,t,n,i){if(S(e)||E(e))throw Yn("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");if(t){if(e===t)throw Yn("cpi","Can't copy! Source and destination are identical.");if(n=n||[],i=i||[],y(e)){var r=n.indexOf(e);if(-1!==r)return i[r];n.push(e),i.push(t)}var a;if(Zn(e)){t.length=0;for(var s=0;s<e.length;s++)a=j(e[s],null,n,i),y(e[s])&&(n.push(e[s]),i.push(a)),t.push(a)}else{var l=t.$$hashKey;Zn(t)?t.length=0:o(t,function(e,n){delete t[n]});for(var c in e)e.hasOwnProperty(c)&&(a=j(e[c],null,n,i),y(e[c])&&(n.push(e[c]),i.push(a)),t[c]=a);u(t,l)}}else if(t=e,e)if(Zn(e))t=j(e,[],n,i);else if(x(e))t=new Date(e.getTime());else if(k(e))t=new RegExp(e.source,e.toString().match(/[^\/]*$/)[0]),t.lastIndex=e.lastIndex;else if(y(e)){var d=Object.create(Object.getPrototypeOf(e));t=j(e,d,n,i)}return t}function F(e,t){if(Zn(e)){t=t||[];for(var n=0,i=e.length;n<i;n++)t[n]=e[n]}else if(y(e)){t=t||{};for(var r in e)"$"===r.charAt(0)&&"$"===r.charAt(1)||(t[r]=e[r])}return t||e}function L(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!==e&&t!==t)return!0;var i,r,o,a=typeof e,s=typeof t;if(a==s&&"object"==a){if(!Zn(e)){if(x(e))return!!x(t)&&L(e.getTime(),t.getTime());if(k(e)&&k(t))return e.toString()==t.toString();if(E(e)||E(t)||S(e)||S(t)||Zn(t))return!1;o={};for(r in e)if("$"!==r.charAt(0)&&!C(e[r])){if(!L(e[r],t[r]))return!1;o[r]=!0}for(r in t)if(!o.hasOwnProperty(r)&&"$"!==r.charAt(0)&&t[r]!==n&&!C(t[r]))return!1;return!0}if(!Zn(t))return!1;if((i=e.length)==t.length){for(r=0;r<i;r++)if(!L(e[r],t[r]))return!1;return!0}}return!1}function R(e,t,n){return e.concat(_n.call(t,n))}function V(e,t){return _n.call(e,t||0)}function H(e,t){var n=arguments.length>2?V(arguments,2):[];return!C(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,n.concat(_n.call(arguments,0))):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function q(e,i){var r=i;return"string"==typeof e&&"$"===e.charAt(0)&&"$"===e.charAt(1)?r=n:S(i)?r="$WINDOW":i&&t===i?r="$DOCUMENT":E(i)&&(r="$SCOPE"),r}function U(e,t){return void 0===e?n:JSON.stringify(e,q,t?" ":null)}function _(e){return b(e)?JSON.parse(e):e}function B(e){e=Hn(e).clone();try{e.empty()}catch(e){}var t=Hn("<div>").append(e).html();try{return e[0].nodeType===ri?Nn(t):t.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+Nn(t)})}catch(e){return Nn(t)}}function W(e){try{return decodeURIComponent(e)}catch(e){}}function z(e){var t,n,i={};return o((e||"").split("&"),function(e){if(e&&(t=e.replace(/\+/g,"%20").split("="),n=W(t[0]),$(n))){var r=!$(t[1])||W(t[1]);jn.call(i,n)?Zn(i[n])?i[n].push(r):i[n]=[i[n],r]:i[n]=r}}),i}function Y(e){var t=[];return o(e,function(e,n){Zn(e)?o(e,function(e){t.push(G(n,!0)+(!0===e?"":"="+G(e,!0)))}):t.push(G(n,!0)+(!0===e?"":"="+G(e,!0)))}),t.length?t.join("&"):""}function K(e){return G(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function G(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,t?"%20":"+")}function X(e,t){var n,i,r=ei.length;for(e=Hn(e),i=0;i<r;++i)if(n=ei[i]+t,b(n=e.attr(n)))return n;return null}function Z(e,t){var n,i,r={};o(ei,function(t){var r=t+"app";!n&&e.hasAttribute&&e.hasAttribute(r)&&(n=e,i=e.getAttribute(r))}),o(ei,function(t){var r,o=t+"app";!n&&(r=e.querySelector("["+o.replace(":","\\:")+"]"))&&(n=r,i=r.getAttribute(o))}),n&&(r.strictDi=null!==X(n,"strict-di"),t(n,i?[i]:[],r))}function J(n,i,r){y(r)||(r={}),r=d({strictDi:!1},r);var a=function(){if(n=Hn(n),n.injector()){var e=n[0]===t?"document":B(n);throw Yn("btstrpd","App Already Bootstrapped with this Element '{0}'",e.replace(/</,"&lt;").replace(/>/,"&gt;"))}i=i||[],i.unshift(["$provide",function(e){e.value("$rootElement",n)}]),r.debugInfoEnabled&&i.push(["$compileProvider",function(e){e.debugInfoEnabled(!0)}]),i.unshift("ng");var o=Re(i,r.strictDi);return o.invoke(["$rootScope","$rootElement","$compile","$injector",function(e,t,n,i){e.$apply(function(){t.data("$injector",i),n(t)(e)})}]),o},s=/^NG_ENABLE_DEBUG_INFO!/,l=/^NG_DEFER_BOOTSTRAP!/;if(e&&s.test(e.name)&&(r.debugInfoEnabled=!0,e.name=e.name.replace(s,"")),e&&!l.test(e.name))return a();e.name=e.name.replace(l,""),Kn.resumeBootstrap=function(e){o(e,function(e){i.push(e)}),a()}}function Q(){e.name="NG_ENABLE_DEBUG_INFO!"+e.name,e.location.reload()}function ee(e){return Kn.element(e).injector().get("$$testability")}function te(e,t){return t=t||"_",e.replace(ti,function(e,n){return(n?t:"")+e.toLowerCase()})}function ne(e,t,n){if(!e)throw Yn("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function ie(e,t,n){return n&&Zn(e)&&(e=e[e.length-1]),ne(C(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function re(e,t){if("hasOwnProperty"===e)throw Yn("badname","hasOwnProperty is not a valid {0} name",t)}function oe(e,t,n){if(!t)return e;for(var i,r=t.split("."),o=e,a=r.length,s=0;s<a;s++)i=r[s],e&&(e=(o=e)[i]);return!n&&C(e)?H(o,e):e}function ae(e){var t=e[0],n=e[e.length-1],i=[t];do{if(!(t=t.nextSibling))break;i.push(t)}while(t!==n);return Hn(i)}function se(){return Object.create(null)}function le(e){function t(e,t,n){return e[t]||(e[t]=n())}var n=i("$injector"),r=i("ng"),o=t(e,"angular",Object);return o.$$minErr=o.$$minErr||i,t(o,"module",function(){var e={};return function(i,o,a){return function(e,t){if("hasOwnProperty"===e)throw r("badname","hasOwnProperty is not a valid {0} name",t)}(i,"module"),o&&e.hasOwnProperty(i)&&(e[i]=null),t(e,i,function(){function e(e,n,i,r){return r||(r=t),function(){return r[i||"push"]([e,n,arguments]),c}}if(!o)throw n("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",i);var t=[],r=[],s=[],l=e("$injector","invoke","push",r),c={_invokeQueue:t,_configBlocks:r,_runBlocks:s,requires:o,name:i,provider:e("$provide","provider"),factory:e("$provide","factory"),service:e("$provide","service"),value:e("$provide","value"),constant:e("$provide","constant","unshift"),animation:e("$animateProvider","register"),filter:e("$filterProvider","register"),controller:e("$controllerProvider","register"),directive:e("$compileProvider","directive"),config:l,run:function(e){return s.push(e),this}};return a&&l(a),c})}})}function ce(){return++ui}function ue(e){return e.replace(pi,function(e,t,n,i){return i?n.toUpperCase():n}).replace(hi,"Moz$1")}function de(e){return!$i.test(e)}function fe(e){var t=e.nodeType;return t===ii||!t||t===ai}function pe(e,t){var n,i,r,a,s=t.createDocumentFragment(),l=[];if(de(e))l.push(t.createTextNode(e));else{for(n=n||s.appendChild(t.createElement("div")),i=(yi.exec(e)||["",""])[1].toLowerCase(),r=wi[i]||wi._default,n.innerHTML=r[1]+e.replace(bi,"<$1></$2>")+r[2],a=r[0];a--;)n=n.lastChild;l=R(l,n.childNodes),n=s.firstChild,n.textContent=""}return s.textContent="",s.innerHTML="",o(l,function(e){s.appendChild(e)}),s}function he(e,n){n=n||t;var i;return(i=vi.exec(e))?[n.createElement(i[1])]:(i=pe(e,n))?i.childNodes:[]}function ge(e){if(e instanceof ge)return e;var t;if(b(e)&&(e=Jn(e),t=!0),!(this instanceof ge)){if(t&&"<"!=e.charAt(0))throw mi("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new ge(e)}t?Se(this,he(e)):Se(this,e)}function me(e){return e.cloneNode(!0)}function ve(e,t){if(t||ye(e),e.querySelectorAll)for(var n=e.querySelectorAll("*"),i=0,r=n.length;i<r;i++)ye(n[i])}function $e(e,t,n,i){if($(i))throw mi("offargs","jqLite#off() does not support the `selector` argument");var r=be(e),a=r&&r.events,s=r&&r.handle;if(s)if(t)o(t.split(" "),function(t){if($(n)){var i=a[t];if(N(i||[],n),i&&i.length>0)return}fi(e,t,s),delete a[t]});else for(t in a)"$destroy"!==t&&fi(e,t,s),delete a[t]}function ye(e,t){var i=e.ng339,r=i&&ci[i];if(r){if(t)return void delete r.data[t];r.handle&&(r.events.$destroy&&r.handle({},"$destroy"),$e(e)),delete ci[i],e.ng339=n}}function be(e,t){var i=e.ng339,r=i&&ci[i];return t&&!r&&(e.ng339=i=ce(),r=ci[i]={events:{},data:{},handle:n}),r}function we(e,t,n){if(fe(e)){var i=$(n),r=!i&&t&&!y(t),o=!t,a=be(e,!r),s=a&&a.data;if(i)s[t]=n;else{if(o)return s;if(r)return s&&s[t];d(s,t)}}}function xe(e,t){return!!e.getAttribute&&(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1}function Ce(e,t){t&&e.setAttribute&&o(t.split(" "),function(t){e.setAttribute("class",Jn((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Jn(t)+" "," ")))})}function ke(e,t){if(t&&e.setAttribute){var n=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");o(t.split(" "),function(e){e=Jn(e),-1===n.indexOf(" "+e+" ")&&(n+=e+" ")}),e.setAttribute("class",Jn(n))}}function Se(e,t){if(t)if(t.nodeType)e[e.length++]=t;else{var n=t.length;if("number"==typeof n&&t.window!==t){if(n)for(var i=0;i<n;i++)e[e.length++]=t[i]}else e[e.length++]=t}}function Ee(e,t){return Te(e,"$"+(t||"ngController")+"Controller")}function Te(e,t,i){e.nodeType==ai&&(e=e.documentElement);for(var r=Zn(t)?t:[t];e;){for(var o=0,a=r.length;o<a;o++)if((i=Hn.data(e,r[o]))!==n)return i;e=e.parentNode||e.nodeType===si&&e.host}}function De(e){for(ve(e,!0);e.firstChild;)e.removeChild(e.firstChild)}function Ae(e,t){t||ve(e);var n=e.parentNode;n&&n.removeChild(e)}function Me(t,n){n=n||e,"complete"===n.document.readyState?n.setTimeout(t):Hn(n).on("load",t)}function Oe(e,t){var n=Ci[t.toLowerCase()];return n&&ki[P(e)]&&n}function Ie(e,t){var n=e.nodeName;return("INPUT"===n||"TEXTAREA"===n)&&Si[t]}function Pe(e,t){var n=function(n,i){n.isDefaultPrevented=function(){return n.defaultPrevented};var r=t[i||n.type],o=r?r.length:0;if(o){if(v(n.immediatePropagationStopped)){var a=n.stopImmediatePropagation;n.stopImmediatePropagation=function(){n.immediatePropagationStopped=!0,n.stopPropagation&&n.stopPropagation(),a&&a.call(n)}}n.isImmediatePropagationStopped=function(){return!0===n.immediatePropagationStopped},o>1&&(r=F(r));for(var s=0;s<o;s++)n.isImmediatePropagationStopped()||r[s].call(e,n)}};return n.elem=e,n}function Ne(e,t){var n=e&&e.$$hashKey;if(n)return"function"==typeof n&&(n=e.$$hashKey()),n;var i=typeof e;return n="function"==i||"object"==i&&null!==e?e.$$hashKey=i+":"+(t||c)():i+":"+e}function je(e,t){if(t){var n=0;this.nextUid=function(){return++n}}o(e,this.put,this)}function Fe(e){var t=e.toString().replace(Ai,""),n=t.match(Ei);return n?"function("+(n[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function Le(e,t,n){var i,r,a,s;if("function"==typeof e){if(!(i=e.$inject)){if(i=[],e.length){if(t)throw b(n)&&n||(n=e.name||Fe(e)),Mi("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n);r=e.toString().replace(Ai,""),a=r.match(Ei),o(a[1].split(Ti),function(e){e.replace(Di,function(e,t,n){i.push(n)})})}e.$inject=i}}else Zn(e)?(s=e.length-1,ie(e[s],"fn"),i=e.slice(0,s)):ie(e,"fn",!0);return i}function Re(e,t){function i(e){return function(t,n){if(!y(t))return e(t,n);o(t,l(e))}}function r(e,t){if(re(e,"service"),(C(t)||Zn(t))&&(t=E.instantiate(t)),!t.$get)throw Mi("pget","Provider '{0}' must define $get factory method.",e);return S[e+w]=t}function a(e,t){return function(){var i=D.invoke(t,this,n,e);if(v(i))throw Mi("undef","Provider '{0}' must return a value from $get factory method.",e);return i}}function s(e,t,n){return r(e,{$get:!1!==n?a(e,t):t})}function c(e,t){return s(e,["$injector",function(e){return e.instantiate(t)}])}function u(e,t){return s(e,m(t),!1)}function d(e,t){re(e,"constant"),S[e]=t,T[e]=t}function f(e,t){var n=E.get(e+w),i=n.$get;n.$get=function(){var e=D.invoke(i,n);return D.invoke(t,null,{$delegate:e})}}function p(e){var t,n=[];return o(e,function(e){function i(e){var t,n;for(t=0,n=e.length;t<n;t++){var i=e[t],r=E.get(i[0]);r[i[1]].apply(r,i[2])}}if(!k.get(e)){k.put(e,!0);try{b(e)?(t=Un(e),n=n.concat(p(t.requires)).concat(t._runBlocks),i(t._invokeQueue),i(t._configBlocks)):C(e)?n.push(E.invoke(e)):Zn(e)?n.push(E.invoke(e)):ie(e,"module")}catch(t){throw Zn(e)&&(e=e[e.length-1]),t.message&&t.stack&&-1==t.stack.indexOf(t.message)&&(t=t.message+"\n"+t.stack),Mi("modulerr","Failed to instantiate module {0} due to:\n{1}",e,t.stack||t.message||t)}}}),n}function g(e,n){function i(t){if(e.hasOwnProperty(t)){if(e[t]===$)throw Mi("cdep","Circular dependency found: {0}",t+" <- "+x.join(" <- "));return e[t]}try{return x.unshift(t),e[t]=$,e[t]=n(t)}catch(n){throw e[t]===$&&delete e[t],n}finally{x.shift()}}function r(e,n,r,o){"string"==typeof r&&(o=r,r=null);var a,s,l,c=[],u=Le(e,t,o);for(s=0,a=u.length;s<a;s++){if("string"!=typeof(l=u[s]))throw Mi("itkn","Incorrect injection token! Expected service name as string, got {0}",l);c.push(r&&r.hasOwnProperty(l)?r[l]:i(l))}return Zn(e)&&(e=e[a]),e.apply(n,c)}function o(e,t,n){var i,o,a=function(){};return a.prototype=(Zn(e)?e[e.length-1]:e).prototype,i=new a,o=r(e,i,t,n),y(o)||C(o)?o:i}return{invoke:r,instantiate:o,get:i,annotate:Le,has:function(t){return S.hasOwnProperty(t+w)||e.hasOwnProperty(t)}}}t=!0===t;var $={},w="Provider",x=[],k=new je([],!0),S={$provide:{provider:i(r),factory:i(s),service:i(c),value:i(u),constant:i(d),decorator:f}},E=S.$injector=g(S,function(){throw Mi("unpr","Unknown provider: {0}",x.join(" <- "))}),T={},D=T.$injector=g(T,function(e){var t=E.get(e+w);return D.invoke(t.$get,t,n,e)});return o(p(e),function(e){D.invoke(e||h)}),D}function Ve(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(t,n,i){function r(e){var t=null;return Array.prototype.some.call(e,function(e){if("a"===P(e))return t=e,!0}),t}function o(){var e=s.yOffset;if(C(e))e=e();else if(O(e)){var n=e[0],i=t.getComputedStyle(n);e="fixed"!==i.position?0:n.getBoundingClientRect().bottom}else w(e)||(e=0);return e}function a(e){if(e){e.scrollIntoView();var n=o();if(n){var i=e.getBoundingClientRect().top;t.scrollBy(0,i-n)}}else t.scrollTo(0,0)}function s(){var e,t=n.hash();t?(e=l.getElementById(t))?a(e):(e=r(l.getElementsByName(t)))?a(e):"top"===t&&a(null):a(null)}var l=t.document;return e&&i.$watch(function(){return n.hash()},function(e,t){e===t&&""===e||Me(function(){i.$evalAsync(s)})}),s}]}function He(){this.$get=["$$rAF","$timeout",function(e,t){return e.supported?function(t){return e(t)}:function(e){return t(e,0,!1)}}]}function qe(e,t,i,r){function a(e){try{e.apply(null,V(arguments,1))}finally{if(0===--x)for(;C.length;)try{C.pop()()}catch(e){i.error(e)}}}function s(e,t){!function n(){o(S,function(e){e()}),k=t(n,e)}()}function l(){c(),u()}function c(){E=e.history.state,E=v(E)?null:E,L(E,P)&&(E=P),P=E}function u(){D===f.url()&&T===E||(D=f.url(),T=E,o(O,function(e){e(f.url(),E)}))}function d(e){try{return decodeURIComponent(e)}catch(t){return e}}var f=this,p=t[0],g=e.location,m=e.history,$=e.setTimeout,y=e.clearTimeout,w={};f.isMock=!1;var x=0,C=[];f.$$completeOutstandingRequest=a,f.$$incOutstandingRequestCount=function(){x++},f.notifyWhenNoOutstandingRequests=function(e){o(S,function(e){e()}),0===x?e():C.push(e)};var k,S=[];f.addPollFn=function(e){return v(k)&&s(100,$),S.push(e),e};var E,T,D=g.href,A=t.find("base"),M=null;c(),T=E,f.url=function(t,n,i){if(v(i)&&(i=null),g!==e.location&&(g=e.location),m!==e.history&&(m=e.history),t){var o=T===i;if(D===t&&(!r.history||o))return;var a=D&&pt(D)===pt(t);return D=t,T=i,!r.history||a&&o?(a||(M=t),n?g.replace(t):g.href=t):(m[n?"replaceState":"pushState"](i,"",t),c(),T=E),f}return M||g.href.replace(/%27/g,"'")},f.state=function(){return E};var O=[],I=!1,P=null;f.onUrlChange=function(t){return I||(r.history&&Hn(e).on("popstate",l),Hn(e).on("hashchange",l),I=!0),O.push(t),t},f.$$checkUrlChange=u,f.baseHref=function(){var e=A.attr("href");return e?e.replace(/^(https?\:)?\/\/[^\/]*/,""):""};var N={},j="",F=f.baseHref();f.cookies=function(e,t){var r,o,a,s,l;if(!e){if(p.cookie!==j)for(j=p.cookie,o=j.split("; "),N={},s=0;s<o.length;s++)a=o[s],(l=a.indexOf("="))>0&&(e=d(a.substring(0,l)),N[e]===n&&(N[e]=d(a.substring(l+1))));return N}t===n?p.cookie=encodeURIComponent(e)+"=;path="+F+";expires=Thu, 01 Jan 1970 00:00:00 GMT":b(t)&&(r=(p.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+";path="+F).length+1)>4096&&i.warn("Cookie '"+e+"' possibly not set or overflowed because it was too large ("+r+" > 4096 bytes)!")},f.defer=function(e,t){var n;return x++,n=$(function(){delete w[n],a(e)},t||0),w[n]=!0,n},f.defer.cancel=function(e){return!!w[e]&&(delete w[e],y(e),a(h),!0)}}function Ue(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,i){return new qe(e,i,t,n)}]}function _e(){this.$get=function(){function e(e,n){function r(e){e!=f&&(p?p==e&&(p=e.n):p=e,o(e.n,e.p),o(e,f),f=e,f.n=null)}function o(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}if(e in t)throw i("$cacheFactory")("iid","CacheId '{0}' is already taken!",e);var a=0,s=d({},n,{id:e}),l={},c=n&&n.capacity||Number.MAX_VALUE,u={},f=null,p=null;return t[e]={put:function(e,t){if(c<Number.MAX_VALUE){r(u[e]||(u[e]={key:e}))}if(!v(t))return e in l||a++,l[e]=t,a>c&&this.remove(p.key),t},get:function(e){if(c<Number.MAX_VALUE){var t=u[e];if(!t)return;r(t)}return l[e]},remove:function(e){if(c<Number.MAX_VALUE){var t=u[e];if(!t)return;t==f&&(f=t.p),t==p&&(p=t.n),o(t.n,t.p),delete u[e]}delete l[e],a--},removeAll:function(){l={},a=0,u={},f=p=null},destroy:function(){l=null,s=null,u=null,delete t[e]},info:function(){return d({},s,{size:a})}}}var t={};return e.info=function(){var e={};return o(t,function(t,n){e[n]=t.info()}),e},e.get=function(e){return t[e]},e}}function Be(){this.$get=["$cacheFactory",function(e){return e("templates")}]}function We(e,i){function r(e,t){var n=/^\s*([@=&])(\??)\s*(\w*)\s*$/,i={};return o(e,function(e,r){var o=e.match(n);if(!o)throw Pi("iscp","Invalid isolate scope definition for directive '{0}'. Definition: {... {1}: '{2}' ...}",t,r,e);i[r]={attrName:o[3]||r,mode:o[1],optional:"?"===o[2]}}),i}var a={},s="Directive",c=/^\s*directive\:\s*([\d\w_\-]+)\s+(.*)$/,u=/(([\d\w_\-]+)(?:\:([^;]+))?;?)/,f=I("ngSrc,ngSrcset,src,srcset"),v=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,w=/^(on[a-z]+|formaction)$/;this.directive=function t(n,i){return re(n,"directive"),b(n)?(ne(i,"directiveFactory"),a.hasOwnProperty(n)||(a[n]=[],e.factory(n+s,["$injector","$exceptionHandler",function(e,t){var i=[];return o(a[n],function(o,a){try{var s=e.invoke(o);C(s)?s={compile:m(s)}:!s.compile&&s.link&&(s.compile=m(s.link)),s.priority=s.priority||0,s.index=a,s.name=s.name||n,s.require=s.require||s.controller&&s.name,s.restrict=s.restrict||"EA",y(s.scope)&&(s.$$isolateBindings=r(s.scope,s.name)),i.push(s)}catch(e){t(e)}}),i}])),a[n].push(i)):o(n,l(t)),this},this.aHrefSanitizationWhitelist=function(e){return $(e)?(i.aHrefSanitizationWhitelist(e),this):i.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(e){return $(e)?(i.imgSrcSanitizationWhitelist(e),this):i.imgSrcSanitizationWhitelist()};var x=!0;this.debugInfoEnabled=function(e){return $(e)?(x=e,this):x},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(e,i,r,l,m,$,k,S,T,D,A){function M(e,t){try{e.addClass(t)}catch(e){}}function O(e,t,n,i,r){e instanceof Hn||(e=Hn(e)),o(e,function(t,n){t.nodeType==ri&&t.nodeValue.match(/\S+/)&&(e[n]=Hn(t).wrap("<span></span>").parent()[0])});var a=j(e,t,e,n,i,r);O.$$addScopeClass(e);var s=null;return function(t,n,i,r,o){ne(t,"scope"),s||(s=I(o));var l;if(l="html"!==s?Hn(J(s,Hn("<div>").append(e).html())):n?xi.clone.call(e):e,i)for(var c in i)l.data("$"+c+"Controller",i[c].instance);return O.$$addScopeInfo(l,t),n&&n(l,t),a&&a(t,l,l,r),l}}function I(e){var t=e&&e[0];return t&&"foreignobject"!==P(t)&&t.toString().match(/SVG/)?"svg":"html"}function j(e,t,i,r,o,a){function s(e,i,r,o){var a,s,l,c,u,d,f,p,m;if(h){var v=i.length;for(m=new Array(v),u=0;u<g.length;u+=3)f=g[u],m[f]=i[f]}else m=i;for(u=0,d=g.length;u<d;)l=m[g[u++]],a=g[u++],s=g[u++],a?(a.scope?(c=e.$new(),O.$$addScopeInfo(Hn(l),c)):c=e,p=a.transcludeOnThisElement?F(e,a.transclude,o,a.elementTranscludeOnThisElement):!a.templateOnThisElement&&o?o:!o&&t?F(e,t):null,a(s,c,l,r,p)):s&&s(e,l.childNodes,n,o)}for(var l,c,u,d,f,p,h,g=[],m=0;m<e.length;m++)l=new ae,c=R(e[m],[],l,0===m?r:n,o),u=c.length?U(c,e[m],l,t,i,null,[],[],a):null,u&&u.scope&&O.$$addScopeClass(l.$$element),f=u&&u.terminal||!(d=e[m].childNodes)||!d.length?null:j(d,u?(u.transcludeOnThisElement||!u.templateOnThisElement)&&u.transclude:t),(u||f)&&(g.push(m,u,f),p=!0,h=h||u),a=null;return p?s:null}function F(e,t,n,i){return function(i,r,o,a,s){return i||(i=e.$new(!1,s),i.$$transcluded=!0),t(i,r,o,n,a)}}function R(e,t,n,i,r){var o,a,s=e.nodeType,l=n.$attr;switch(s){case ii:W(t,ze(P(e)),"E",i,r);for(var d,f,p,h,g,m,v=e.attributes,$=0,y=v&&v.length;$<y;$++){var w=!1,x=!1;d=v[$],f=d.name,g=Jn(d.value),h=ze(f),(m=fe.test(h))&&(f=te(h.substr(6),"-"));var C=h.replace(/(Start|End)$/,"");z(C)&&h===C+"Start"&&(w=f,x=f.substr(0,f.length-5)+"end",f=f.substr(0,f.length-6)),p=ze(f.toLowerCase()),l[p]=f,!m&&n.hasOwnProperty(p)||(n[p]=g,Oe(e,p)&&(n[p]=!0)),ee(e,t,g,p,m),W(t,p,"A",i,r,w,x)}if(a=e.className,b(a)&&""!==a)for(;o=u.exec(a);)p=ze(o[2]),W(t,p,"C",i,r)&&(n[p]=Jn(o[3])),a=a.substr(o.index+o[0].length);break;case ri:Z(t,e.nodeValue);break;case oi:try{o=c.exec(e.nodeValue),o&&(p=ze(o[1]),W(t,p,"M",i,r)&&(n[p]=Jn(o[2])))}catch(e){}}return t.sort(G),t}function H(e,t,n){var i=[],r=0;if(t&&e.hasAttribute&&e.hasAttribute(t)){do{if(!e)throw Pi("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",t,n);e.nodeType==ii&&(e.hasAttribute(t)&&r++,e.hasAttribute(n)&&r--),i.push(e),e=e.nextSibling}while(r>0)}else i.push(e);return Hn(i)}function q(e,t,n){return function(i,r,o,a,s){return r=H(r[0],t,n),e(i,r,o,a,s)}}function U(e,a,s,l,c,u,d,f,p){function h(e,t,n,i){e&&(n&&(e=q(e,n,i)),e.require=S.require,e.directiveName=T,(N===S||S.$$isolateScope)&&(e=re(e,{isolateScope:!0})),d.push(e)),t&&(n&&(t=q(t,n,i)),t.require=S.require,t.directiveName=T,(N===S||S.$$isolateScope)&&(t=re(t,{isolateScope:!0})),f.push(t))}function g(e,t,n,i){var r,a,s="data",l=!1,c=n;if(b(t)){if(a=t.match(v),t=t.substring(a[0].length),a[3]&&(a[1]?a[3]=null:a[1]=a[3]),"^"===a[1]?s="inheritedData":"^^"===a[1]&&(s="inheritedData",c=n.parent()),"?"===a[2]&&(l=!0),r=null,i&&"data"===s&&(r=i[t])&&(r=r.instance),!(r=r||c[s]("$"+t+"Controller"))&&!l)throw Pi("ctreq","Controller '{0}', required by directive '{1}', can't be found!",t,e);return r}return Zn(t)&&(r=[],o(t,function(t){r.push(g(e,t,n,i))})),r}function w(e,t,r,l,c){function u(e,t,i){var r;return E(e)||(i=t,t=e,e=n),z&&(r=w),i||(i=z?C.parent():C),c(e,t,r,i,A)}var p,h,v,y,b,w,x,C,S;if(a===r?(S=s,C=s.$$element):(C=Hn(r),S=new ae(C,s)),N&&(b=t.$new(!0)),x=c&&u,P&&(k={},w={},o(P,function(e){var n,i={$scope:e===N||e.$$isolateScope?b:t,$element:C,$attrs:S,$transclude:x};y=e.controller,"@"==y&&(y=S[e.name]),n=$(y,i,!0,e.controllerAs),w[e.name]=n,z||C.data("$"+e.name+"Controller",n.instance),k[e.name]=n})),N){O.$$addScopeInfo(C,b,!0,!(j&&(j===N||j===N.$$originalDirective))),O.$$addScopeClass(C,!0);var T=k&&k[N.name],D=b;T&&T.identifier&&!0===N.bindToController&&(D=T.instance),o(b.$$isolateBindings=N.$$isolateBindings,function(e,n){var r,o,a,s,l=e.attrName,c=e.optional,u=e.mode;switch(u){case"@":S.$observe(l,function(e){D[n]=e}),S.$$observers[l].$$scope=t,S[l]&&(D[n]=i(S[l])(t));break;case"=":if(c&&!S[l])return;o=m(S[l]),s=o.literal?L:function(e,t){return e===t||e!==e&&t!==t},a=o.assign||function(){throw r=D[n]=o(t),Pi("nonassign","Expression '{0}' used with directive '{1}' is non-assignable!",S[l],N.name)},r=D[n]=o(t);var d=function(e){return s(e,D[n])||(s(e,r)?a(t,e=D[n]):D[n]=e),r=e};d.$stateful=!0;var f=t.$watch(m(S[l],d),null,o.literal);b.$on("$destroy",f);break;case"&":o=m(S[l]),D[n]=function(e){return o(t,e)}}})}for(k&&(o(k,function(e){e()}),k=null),p=0,h=d.length;p<h;p++)v=d[p],oe(v,v.isolateScope?b:t,C,S,v.require&&g(v.directiveName,v.require,C,w),x);var A=t;for(N&&(N.template||null===N.templateUrl)&&(A=b),e&&e(A,r.childNodes,n,c),p=f.length-1;p>=0;p--)v=f[p],oe(v,v.isolateScope?b:t,C,S,v.require&&g(v.directiveName,v.require,C,w),x)}p=p||{};for(var x,k,S,T,D,A,M,I=-Number.MAX_VALUE,P=p.controllerDirectives,N=p.newIsolateScopeDirective,j=p.templateDirective,F=p.nonTlbTranscludeDirective,U=!1,W=!1,z=p.hasElementTranscludeDirective,G=s.$$element=Hn(a),Z=u,Q=l,ee=0,te=e.length;ee<te;ee++){S=e[ee];var ne=S.$$start,se=S.$$end;if(ne&&(G=H(a,ne,se)),D=n,I>S.priority)break;if((M=S.scope)&&(S.templateUrl||(y(M)?(X("new/isolated scope",N||x,S,G),N=S):X("new/isolated scope",N,S,G)),x=x||S),T=S.name,!S.templateUrl&&S.controller&&(M=S.controller,P=P||{},X("'"+T+"' controller",P[T],S,G),P[T]=S),(M=S.transclude)&&(U=!0,S.$$tlb||(X("transclusion",F,S,G),F=S),"element"==M?(z=!0,I=S.priority,D=G,G=s.$$element=Hn(t.createComment(" "+T+": "+s[T]+" ")),a=G[0],ie(c,V(D),a),Q=O(D,l,I,Z&&Z.name,{nonTlbTranscludeDirective:F})):(D=Hn(me(a)).contents(),G.empty(),Q=O(D,l))),S.template)if(W=!0,X("template",j,S,G),j=S,M=C(S.template)?S.template(G,s):S.template,M=ue(M),S.replace){if(Z=S,
+D=de(M)?[]:Ke(J(S.templateNamespace,Jn(M))),a=D[0],1!=D.length||a.nodeType!==ii)throw Pi("tplrt","Template for directive '{0}' must have exactly one root element. {1}",T,"");ie(c,G,a);var le={$attr:{}},ce=R(a,[],le),fe=e.splice(ee+1,e.length-(ee+1));N&&_(ce),e=e.concat(ce).concat(fe),Y(s,le),te=e.length}else G.html(M);if(S.templateUrl)W=!0,X("template",j,S,G),j=S,S.replace&&(Z=S),w=K(e.splice(ee,e.length-ee),G,s,c,U&&Q,d,f,{controllerDirectives:P,newIsolateScopeDirective:N,templateDirective:j,nonTlbTranscludeDirective:F}),te=e.length;else if(S.compile)try{A=S.compile(G,s,Q),C(A)?h(null,A,ne,se):A&&h(A.pre,A.post,ne,se)}catch(e){r(e,B(G))}S.terminal&&(w.terminal=!0,I=Math.max(I,S.priority))}return w.scope=x&&!0===x.scope,w.transcludeOnThisElement=U,w.elementTranscludeOnThisElement=z,w.templateOnThisElement=W,w.transclude=Q,p.hasElementTranscludeDirective=z,w}function _(e){for(var t=0,n=e.length;t<n;t++)e[t]=p(e[t],{$$isolateScope:!0})}function W(t,i,o,l,c,u,d){if(i===c)return null;var f=null;if(a.hasOwnProperty(i))for(var h,g=e.get(i+s),m=0,v=g.length;m<v;m++)try{h=g[m],(l===n||l>h.priority)&&-1!=h.restrict.indexOf(o)&&(u&&(h=p(h,{$$start:u,$$end:d})),t.push(h),f=h)}catch(e){r(e)}return f}function z(t){if(a.hasOwnProperty(t))for(var n,i=e.get(t+s),r=0,o=i.length;r<o;r++)if(n=i[r],n.multiElement)return!0;return!1}function Y(e,t){var n=t.$attr,i=e.$attr,r=e.$$element;o(e,function(i,r){"$"!=r.charAt(0)&&(t[r]&&t[r]!==i&&(i+=("style"===r?";":" ")+t[r]),e.$set(r,i,!0,n[r]))}),o(t,function(t,o){"class"==o?(M(r,t),e.class=(e.class?e.class+" ":"")+t):"style"==o?(r.attr("style",r.attr("style")+";"+t),e.style=(e.style?e.style+";":"")+t):"$"==o.charAt(0)||e.hasOwnProperty(o)||(e[o]=t,i[o]=n[o])})}function K(e,t,n,i,r,a,s,c){var u,f,p=[],h=t[0],g=e.shift(),m=d({},g,{templateUrl:null,transclude:null,replace:null,$$originalDirective:g}),v=C(g.templateUrl)?g.templateUrl(t,n):g.templateUrl,$=g.templateNamespace;return t.empty(),l(T.getTrustedResourceUrl(v)).then(function(l){var d,b,w,x;if(l=ue(l),g.replace){if(w=de(l)?[]:Ke(J($,Jn(l))),d=w[0],1!=w.length||d.nodeType!==ii)throw Pi("tplrt","Template for directive '{0}' must have exactly one root element. {1}",g.name,v);b={$attr:{}},ie(i,t,d);var C=R(d,[],b);y(g.scope)&&_(C),e=C.concat(e),Y(n,b)}else d=h,t.html(l);for(e.unshift(m),u=U(e,d,n,r,t,g,a,s,c),o(i,function(e,n){e==d&&(i[n]=t[0])}),f=j(t[0].childNodes,r);p.length;){var k=p.shift(),S=p.shift(),E=p.shift(),T=p.shift(),D=t[0];if(!k.$$destroyed){if(S!==h){var A=S.className;c.hasElementTranscludeDirective&&g.replace||(D=me(d)),ie(E,Hn(S),D),M(Hn(D),A)}x=u.transcludeOnThisElement?F(k,u.transclude,T):T,u(f,k,D,i,x)}}p=null}),function(e,t,n,i,r){var o=r;t.$$destroyed||(p?(p.push(t),p.push(n),p.push(i),p.push(o)):(u.transcludeOnThisElement&&(o=F(t,u.transclude,r)),u(f,t,n,i,o)))}}function G(e,t){var n=t.priority-e.priority;return 0!==n?n:e.name!==t.name?e.name<t.name?-1:1:e.index-t.index}function X(e,t,n,i){if(t)throw Pi("multidir","Multiple directives [{0}, {1}] asking for {2} on: {3}",t.name,n.name,e,B(i))}function Z(e,t){var n=i(t,!0);n&&e.push({priority:0,compile:function(e){var t=e.parent(),i=!!t.length;return i&&O.$$addBindingClass(t),function(e,t){var r=t.parent();i||O.$$addBindingClass(r),O.$$addBindingInfo(r,n.expressions),e.$watch(n,function(e){t[0].nodeValue=e})}}})}function J(e,n){switch(e=Nn(e||"html")){case"svg":case"math":var i=t.createElement("div");return i.innerHTML="<"+e+">"+n+"</"+e+">",i.childNodes[0].childNodes;default:return n}}function Q(e,t){if("srcdoc"==t)return T.HTML;var n=P(e);return"xlinkHref"==t||"form"==n&&"action"==t||"img"!=n&&("src"==t||"ngSrc"==t)?T.RESOURCE_URL:void 0}function ee(e,t,n,r,o){var a=i(n,!0);if(a){if("multiple"===r&&"select"===P(e))throw Pi("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",B(e));t.push({priority:100,compile:function(){return{pre:function(t,n,s){var l=s.$$observers||(s.$$observers={});if(w.test(r))throw Pi("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");s[r]&&(a=i(s[r],!0,Q(e,r),f[r]||o))&&(s[r]=a(t),(l[r]||(l[r]=[])).$$inter=!0,(s.$$observers&&s.$$observers[r].$$scope||t).$watch(a,function(e,t){"class"===r&&e!=t?s.$updateClass(e,t):s.$set(r,e)}))}}}})}}function ie(e,n,i){var r,o,a=n[0],s=n.length,l=a.parentNode;if(e)for(r=0,o=e.length;r<o;r++)if(e[r]==a){e[r++]=i;for(var c=r,u=c+s-1,d=e.length;c<d;c++,u++)u<d?e[c]=e[u]:delete e[c];e.length-=s-1,e.context===a&&(e.context=i);break}l&&l.replaceChild(i,a);var f=t.createDocumentFragment();f.appendChild(a),Hn(i).data(Hn(a).data()),qn?(Xn=!0,qn.cleanData([a])):delete Hn.cache[a[Hn.expando]];for(var p=1,h=n.length;p<h;p++){var g=n[p];Hn(g).remove(),f.appendChild(g),delete n[p]}n[0]=i,n.length=1}function re(e,t){return d(function(){return e.apply(null,arguments)},e,t)}function oe(e,t,n,i,o,a){try{e(t,n,i,o,a)}catch(e){r(e,B(n))}}var ae=function(e,t){if(t){var n,i,r,o=Object.keys(t);for(n=0,i=o.length;n<i;n++)r=o[n],this[r]=t[r]}else this.$attr={};this.$$element=e};ae.prototype={$normalize:ze,$addClass:function(e){e&&e.length>0&&D.addClass(this.$$element,e)},$removeClass:function(e){e&&e.length>0&&D.removeClass(this.$$element,e)},$updateClass:function(e,t){var n=Ye(e,t);n&&n.length&&D.addClass(this.$$element,n);var i=Ye(t,e);i&&i.length&&D.removeClass(this.$$element,i)},$set:function(e,t,i,a){var s,l=this.$$element[0],c=Oe(l,e),u=Ie(l,e),d=e;if(c?(this.$$element.prop(e,t),a=c):u&&(this[u]=t,d=u),this[e]=t,a?this.$attr[e]=a:(a=this.$attr[e])||(this.$attr[e]=a=te(e,"-")),"a"===(s=P(this.$$element))&&"href"===e||"img"===s&&"src"===e)this[e]=t=A(t,"src"===e);else if("img"===s&&"srcset"===e){for(var f="",p=Jn(t),h=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,g=/\s/.test(p)?h:/(,)/,m=p.split(g),v=Math.floor(m.length/2),$=0;$<v;$++){var y=2*$;f+=A(Jn(m[y]),!0),f+=" "+Jn(m[y+1])}var b=Jn(m[2*$]).split(/\s/);f+=A(Jn(b[0]),!0),2===b.length&&(f+=" "+Jn(b[1])),this[e]=t=f}!1!==i&&(null===t||t===n?this.$$element.removeAttr(a):this.$$element.attr(a,t));var w=this.$$observers;w&&o(w[d],function(e){try{e(t)}catch(e){r(e)}})},$observe:function(e,t){var n=this,i=n.$$observers||(n.$$observers=se()),r=i[e]||(i[e]=[]);return r.push(t),k.$evalAsync(function(){r.$$inter||t(n[e])}),function(){N(r,t)}}};var le=i.startSymbol(),ce=i.endSymbol(),ue="{{"==le||"}}"==ce?g:function(e){return e.replace(/\{\{/g,le).replace(/}}/g,ce)},fe=/^ngAttr[A-Z]/;return O.$$addBindingInfo=x?function(e,t){var n=e.data("$binding")||[];Zn(t)?n=n.concat(t):n.push(t),e.data("$binding",n)}:h,O.$$addBindingClass=x?function(e){M(e,"ng-binding")}:h,O.$$addScopeInfo=x?function(e,t,n,i){var r=n?i?"$isolateScopeNoTemplate":"$isolateScope":"$scope";e.data(r,t)}:h,O.$$addScopeClass=x?function(e,t){M(e,t?"ng-isolate-scope":"ng-scope")}:h,O}]}function ze(e){return ue(e.replace(Ni,""))}function Ye(e,t){var n="",i=e.split(/\s+/),r=t.split(/\s+/);e:for(var o=0;o<i.length;o++){for(var a=i[o],s=0;s<r.length;s++)if(a==r[s])continue e;n+=(n.length>0?" ":"")+a}return n}function Ke(e){e=Hn(e);var t=e.length;if(t<=1)return e;for(;t--;){e[t].nodeType===oi&&Bn.call(e,t,1)}return e}function Ge(){var e={},t=!1,r=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(t,n){re(t,"controller"),y(t)?d(e,t):e[t]=n},this.allowGlobals=function(){t=!0},this.$get=["$injector","$window",function(o,a){function s(e,t,n,r){if(!e||!y(e.$scope))throw i("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",r,t);e.$scope[t]=n}return function(i,l,c,u){var f,p,h,g;if(c=!0===c,u&&b(u)&&(g=u),b(i)&&(p=i.match(r),h=p[1],g=g||p[3],i=e.hasOwnProperty(h)?e[h]:oe(l.$scope,h,!0)||(t?oe(a,h,!0):n),ie(i,h,!0)),c){var m=function(){};return m.prototype=(Zn(i)?i[i.length-1]:i).prototype,f=new m,g&&s(l,g,f,h||i.name),d(function(){return o.invoke(i,f,l,h),f},{instance:f,identifier:g})}return f=o.instantiate(i,l,h),g&&s(l,g,f,h||i.name),f}}]}function Xe(){this.$get=["$window",function(e){return Hn(e.document)}]}function Ze(){this.$get=["$log",function(e){return function(t,n){e.error.apply(e,arguments)}}]}function Je(e){var t,n,i,r={};return e?(o(e.split("\n"),function(e){i=e.indexOf(":"),t=Nn(Jn(e.substr(0,i))),n=Jn(e.substr(i+1)),t&&(r[t]=r[t]?r[t]+", "+n:n)}),r):r}function Qe(e){var t=y(e)?e:n;return function(n){return t||(t=Je(e)),n?t[Nn(n)]||null:t}}function et(e,t,n){return C(n)?n(e,t):(o(n,function(n){e=n(e,t)}),e)}function tt(e){return 200<=e&&e<300}function nt(){var e=/^\s*(\[|\{[^\{])/,t=/[\}\]]\s*$/,i=/^\)\]\}',?\n/,r={"Content-Type":"application/json;charset=utf-8"},a=this.defaults={transformResponse:[function(n,r){if(b(n)){n=n.replace(i,"");var o=r("Content-Type");(o&&0===o.indexOf("application/json")||e.test(n)&&t.test(n))&&(n=_(n))}return n}],transformRequest:[function(e){return!y(e)||T(e)||D(e)?e:U(e)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:F(r),put:F(r),patch:F(r)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},l=!1;this.useApplyAsync=function(e){return $(e)?(l=!!e,this):l};var c=this.interceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(e,t,i,r,u,f){function p(e){function t(e){var t=d({},e);return e.data?t.data=et(e.data,e.headers,i.transformResponse):t.data=e.data,tt(e.status)?t:u.reject(t)}var i={method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse},r=function(e){var t,n,i,r=a.headers,s=d({},e.headers);r=d({},r.common,r[Nn(e.method)]);e:for(t in r){n=Nn(t);for(i in s)if(Nn(i)===n)continue e;s[t]=r[t]}return function(e){var t;o(e,function(n,i){C(n)&&(t=n(),null!=t?e[i]=t:delete e[i])})}(s),s}(e);d(i,e),i.headers=r,i.method=Fn(i.method);var s=function(e){r=e.headers;var n=et(e.data,Qe(r),e.transformRequest);return v(n)&&o(r,function(e,t){"content-type"===Nn(t)&&delete r[t]}),v(e.withCredentials)&&!v(a.withCredentials)&&(e.withCredentials=a.withCredentials),h(e,n,r).then(t,t)},l=[s,n],c=u.when(i);for(o(w,function(e){(e.request||e.requestError)&&l.unshift(e.request,e.requestError),(e.response||e.responseError)&&l.push(e.response,e.responseError)});l.length;){var f=l.shift(),p=l.shift();c=c.then(f,p)}return c.success=function(e){return c.then(function(t){e(t.data,t.status,t.headers,i)}),c},c.error=function(e){return c.then(null,function(t){e(t.data,t.status,t.headers,i)}),c},c}function h(i,o,s){function c(e,t,n,i){function o(){d(t,e,n,i)}h&&(tt(e)?h.put(C,[e,t,Je(n),i]):h.remove(C)),l?r.$applyAsync(o):(o(),r.$$phase||r.$apply())}function d(e,t,n,r){t=Math.max(t,0),(tt(t)?w.resolve:w.reject)({data:e,status:t,headers:Qe(n),config:i,statusText:r})}function f(){var e=p.pendingRequests.indexOf(i);-1!==e&&p.pendingRequests.splice(e,1)}var h,b,w=u.defer(),x=w.promise,C=g(i.url,i.params);if(p.pendingRequests.push(i),x.then(f,f),!i.cache&&!a.cache||!1===i.cache||"GET"!==i.method&&"JSONP"!==i.method||(h=y(i.cache)?i.cache:y(a.cache)?a.cache:m),h)if(b=h.get(C),$(b)){if(M(b))return b.then(f,f),b;Zn(b)?d(b[1],b[0],F(b[2]),b[3]):d(b,200,{},"OK")}else h.put(C,x);if(v(b)){var k=Yt(i.url)?t.cookies()[i.xsrfCookieName||a.xsrfCookieName]:n;k&&(s[i.xsrfHeaderName||a.xsrfHeaderName]=k),e(i.method,C,o,c,s,i.timeout,i.withCredentials,i.responseType)}return x}function g(e,t){if(!t)return e;var n=[];return s(t,function(e,t){null===e||v(e)||(Zn(e)||(e=[e]),o(e,function(e){y(e)&&(e=x(e)?e.toISOString():U(e)),n.push(G(t)+"="+G(e))}))}),n.length>0&&(e+=(-1==e.indexOf("?")?"?":"&")+n.join("&")),e}var m=i("$http"),w=[];return o(c,function(e){w.unshift(b(e)?f.get(e):f.invoke(e))}),p.pendingRequests=[],function(e){o(arguments,function(e){p[e]=function(t,n){return p(d(n||{},{method:e,url:t}))}})}("get","delete","head","jsonp"),function(e){o(arguments,function(e){p[e]=function(t,n,i){return p(d(i||{},{method:e,url:t,data:n}))}})}("post","put","patch"),p.defaults=a,p}]}function it(){return new e.XMLHttpRequest}function rt(){this.$get=["$browser","$window","$document",function(e,t,n){return ot(e,it,e.defer,t.angular.callbacks,n[0])}]}function ot(e,t,n,i,r){function a(e,t,n){var o=r.createElement("script"),a=null;return o.type="text/javascript",o.src=e,o.async=!0,a=function(e){fi(o,"load",a),fi(o,"error",a),r.body.removeChild(o),o=null;var s=-1,l="unknown";e&&("load"!==e.type||i[t].called||(e={type:"error"}),l=e.type,s="error"===e.type?404:200),n&&n(s,l)},di(o,"load",a),di(o,"error",a),r.body.appendChild(o),a}return function(r,s,l,c,u,d,f,p){function g(){y&&y(),b&&b.abort()}function m(t,i,r,o,a){x&&n.cancel(x),y=b=null,t(i,r,o,a),e.$$completeOutstandingRequest(h)}if(e.$$incOutstandingRequestCount(),s=s||e.url(),"jsonp"==Nn(r)){var v="_"+(i.counter++).toString(36);i[v]=function(e){i[v].data=e,i[v].called=!0};var y=a(s.replace("JSON_CALLBACK","angular.callbacks."+v),v,function(e,t){m(c,e,i[v].data,"",t),i[v]=h})}else{var b=t();b.open(r,s,!0),o(u,function(e,t){$(e)&&b.setRequestHeader(t,e)}),b.onload=function(){var e=b.statusText||"",t="response"in b?b.response:b.responseText,n=1223===b.status?204:b.status;0===n&&(n=t?200:"file"==zt(s).protocol?404:0),m(c,n,t,b.getAllResponseHeaders(),e)};var w=function(){m(c,-1,null,null,"")};if(b.onerror=w,b.onabort=w,f&&(b.withCredentials=!0),p)try{b.responseType=p}catch(e){if("json"!==p)throw e}b.send(l||null)}if(d>0)var x=n(g,d);else M(d)&&d.then(g)}}function at(){var e="{{",t="}}";this.startSymbol=function(t){return t?(e=t,this):e},this.endSymbol=function(e){return e?(t=e,this):t},this.$get=["$parse","$exceptionHandler","$sce",function(n,i,r){function o(e){return"\\\\\\"+e}function a(o,a,f,p){function h(n){return n.replace(c,e).replace(u,t)}function g(e){try{return A(D(e))}catch(e){var t=ji("interr","Can't interpolate: {0}\n{1}",o,e.toString());i(t)}}p=!!p;for(var m,$,y,b=0,w=[],x=[],k=o.length,S=[],E=[];b<k;){if(-1==(m=o.indexOf(e,b))||-1==($=o.indexOf(t,m+s))){b!==k&&S.push(h(o.substring(b)));break}b!==m&&S.push(h(o.substring(b,m))),y=o.substring(m+s,$),w.push(y),x.push(n(y,g)),b=$+l,E.push(S.length),S.push("")}if(f&&S.length>1)throw ji("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce",o);if(!a||w.length){var T=function(e){for(var t=0,n=w.length;t<n;t++){if(p&&v(e[t]))return;S[E[t]]=e[t]}return S.join("")},D=function(e){return f?r.getTrusted(f,e):r.valueOf(e)},A=function(e){if(null==e)return"";switch(typeof e){case"string":break;case"number":e=""+e;break;default:e=U(e)}return e};return d(function(e){var t=0,n=w.length,r=new Array(n);try{for(;t<n;t++)r[t]=x[t](e);return T(r)}catch(e){var a=ji("interr","Can't interpolate: {0}\n{1}",o,e.toString());i(a)}},{exp:o,expressions:w,$$watchDelegate:function(e,t,n){var i;return e.$watchGroup(x,function(n,r){var o=T(n);C(t)&&t.call(this,o,n!==r?i:o,e),i=o},n)}})}}var s=e.length,l=t.length,c=new RegExp(e.replace(/./g,o),"g"),u=new RegExp(t.replace(/./g,o),"g");return a.startSymbol=function(){return e},a.endSymbol=function(){return t},a}]}function st(){this.$get=["$rootScope","$window","$q","$$q",function(e,t,n,i){function r(r,a,s,l){var c=t.setInterval,u=t.clearInterval,d=0,f=$(l)&&!l,p=(f?i:n).defer(),h=p.promise;return s=$(s)?s:0,h.then(null,null,r),h.$$intervalId=c(function(){p.notify(d++),s>0&&d>=s&&(p.resolve(d),u(h.$$intervalId),delete o[h.$$intervalId]),f||e.$apply()},a),o[h.$$intervalId]=p,h}var o={};return r.cancel=function(e){return!!(e&&e.$$intervalId in o)&&(o[e.$$intervalId].reject("canceled"),t.clearInterval(e.$$intervalId),delete o[e.$$intervalId],!0)},r}]}function lt(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"¤",posSuf:"",negPre:"(¤",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a",short:"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(e){return 1===e?"one":"other"}}}}function ct(e){for(var t=e.split("/"),n=t.length;n--;)t[n]=K(t[n]);return t.join("/")}function ut(e,t,n){var i=zt(e,n);t.$$protocol=i.protocol,t.$$host=i.hostname,t.$$port=f(i.port)||Li[i.protocol]||null}function dt(e,t,n){var i="/"!==e.charAt(0);i&&(e="/"+e);var r=zt(e,n);t.$$path=decodeURIComponent(i&&"/"===r.pathname.charAt(0)?r.pathname.substring(1):r.pathname),t.$$search=z(r.search),t.$$hash=decodeURIComponent(r.hash),t.$$path&&"/"!=t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function ft(e,t){if(0===t.indexOf(e))return t.substr(e.length)}function pt(e){var t=e.indexOf("#");return-1==t?e:e.substr(0,t)}function ht(e){return e.substr(0,pt(e).lastIndexOf("/")+1)}function gt(e){return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function mt(e,t){this.$$html5=!0,t=t||"";var i=ht(e);ut(e,this,e),this.$$parse=function(t){var n=ft(i,t);if(!b(n))throw Ri("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',t,i);dt(n,this,e),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=Y(this.$$search),t=this.$$hash?"#"+K(this.$$hash):"";this.$$url=ct(this.$$path)+(e?"?"+e:"")+t,this.$$absUrl=i+this.$$url.substr(1)},this.$$parseLinkUrl=function(r,o){if(o&&"#"===o[0])return this.hash(o.slice(1)),!0;var a,s,l;return(a=ft(e,r))!==n?(s=a,l=(a=ft(t,a))!==n?i+(ft("/",a)||a):e+s):(a=ft(i,r))!==n?l=i+a:i==r+"/"&&(l=i),l&&this.$$parse(l),!!l}}function vt(e,t){var n=ht(e);ut(e,this,e),this.$$parse=function(i){var r=ft(e,i)||ft(n,i),o="#"==r.charAt(0)?ft(t,r):this.$$html5?r:"";if(!b(o))throw Ri("ihshprfx",'Invalid url "{0}", missing hash prefix "{1}".',i,t);dt(o,this,e),this.$$path=function(e,t,n){var i,r=/^\/[A-Z]:(\/.*)/;return 0===t.indexOf(n)&&(t=t.replace(n,"")),r.exec(t)?e:(i=r.exec(e),i?i[1]:e)}(this.$$path,o,e),this.$$compose()},this.$$compose=function(){var n=Y(this.$$search),i=this.$$hash?"#"+K(this.$$hash):"";this.$$url=ct(this.$$path)+(n?"?"+n:"")+i,this.$$absUrl=e+(this.$$url?t+this.$$url:"")},this.$$parseLinkUrl=function(t,n){return pt(e)==pt(t)&&(this.$$parse(t),!0)}}function $t(e,t){this.$$html5=!0,vt.apply(this,arguments);var n=ht(e);this.$$parseLinkUrl=function(i,r){if(r&&"#"===r[0])return this.hash(r.slice(1)),!0;var o,a;return e==pt(i)?o=i:(a=ft(n,i))?o=e+t+a:n===i+"/"&&(o=n),o&&this.$$parse(o),!!o},this.$$compose=function(){var n=Y(this.$$search),i=this.$$hash?"#"+K(this.$$hash):"";this.$$url=ct(this.$$path)+(n?"?"+n:"")+i,this.$$absUrl=e+t+this.$$url}}function yt(e){return function(){return this[e]}}function bt(e,t){return function(n){return v(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function wt(){var t="",n={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(e){return $(e)?(t=e,this):t},this.html5Mode=function(e){return A(e)?(n.enabled=e,this):y(e)?(A(e.enabled)&&(n.enabled=e.enabled),A(e.requireBase)&&(n.requireBase=e.requireBase),A(e.rewriteLinks)&&(n.rewriteLinks=e.rewriteLinks),this):n},this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(i,r,o,a){function s(e,t,n){var i=c.url(),o=c.$$state;try{r.url(e,t,n),c.$$state=r.state()}catch(e){throw c.url(i),c.$$state=o,e}}function l(e,t){i.$broadcast("$locationChangeSuccess",c.absUrl(),e,c.$$state,t)}var c,u,d,f=r.baseHref(),p=r.url();if(n.enabled){if(!f&&n.requireBase)throw Ri("nobase","$location in HTML5 mode requires a <base> tag to be present!");d=gt(p)+(f||"/"),u=o.history?mt:$t}else d=pt(p),u=vt;c=new u(d,"#"+t),c.$$parseLinkUrl(p,p),c.$$state=r.state();var h=/^\s*(javascript|mailto):/i;a.on("click",function(t){if(n.rewriteLinks&&!t.ctrlKey&&!t.metaKey&&2!=t.which){for(var o=Hn(t.target);"a"!==P(o[0]);)if(o[0]===a[0]||!(o=o.parent())[0])return;var s=o.prop("href"),l=o.attr("href")||o.attr("xlink:href");y(s)&&"[object SVGAnimatedString]"===s.toString()&&(s=zt(s.animVal).href),h.test(s)||!s||o.attr("target")||t.isDefaultPrevented()||c.$$parseLinkUrl(s,l)&&(t.preventDefault(),c.absUrl()!=r.url()&&(i.$apply(),e.angular["ff-684208-preventDefault"]=!0))}}),c.absUrl()!=p&&r.url(c.absUrl(),!0);var g=!0;return r.onUrlChange(function(e,t){i.$evalAsync(function(){var n=c.absUrl(),r=c.$$state;c.$$parse(e),c.$$state=t,i.$broadcast("$locationChangeStart",e,n,t,r).defaultPrevented?(c.$$parse(n),c.$$state=r,s(n,!1,r)):(g=!1,l(n,r))}),i.$$phase||i.$digest()}),i.$watch(function(){var e=r.url(),t=r.state(),n=c.$$replace,a=e!==c.absUrl()||c.$$html5&&o.history&&t!==c.$$state;(g||a)&&(g=!1,i.$evalAsync(function(){i.$broadcast("$locationChangeStart",c.absUrl(),e,c.$$state,t).defaultPrevented?(c.$$parse(e),c.$$state=t):(a&&s(c.absUrl(),n,t===c.$$state?null:c.$$state),l(e,t))})),c.$$replace=!1}),c}]}function xt(){var e=!0,t=this;this.debugEnabled=function(t){return $(t)?(e=t,this):e},this.$get=["$window",function(n){function i(e){return e instanceof Error&&(e.stack?e=e.message&&-1===e.stack.indexOf(e.message)?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}function r(e){var t=n.console||{},r=t[e]||t.log||h,a=!1;try{a=!!r.apply}catch(e){}return a?function(){var e=[];return o(arguments,function(t){e.push(i(t))}),r.apply(t,e)}:function(e,t){r(e,null==t?"":t)}}return{log:r("log"),info:r("info"),warn:r("warn"),error:r("error"),debug:function(){var n=r("debug");return function(){e&&n.apply(t,arguments)}}()}}]}function Ct(e,t){if("__defineGetter__"===e||"__defineSetter__"===e||"__lookupGetter__"===e||"__lookupSetter__"===e||"__proto__"===e)throw Hi("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",t);return e}function kt(e,t){if(e){if(e.constructor===e)throw Hi("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e.window===e)throw Hi("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",t);if(e.children&&(e.nodeName||e.prop&&e.attr&&e.find))throw Hi("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",t);if(e===Object)throw Hi("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",t)}return e}function St(e,t){if(e){if(e.constructor===e)throw Hi("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e===qi||e===Ui||e===_i)throw Hi("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",t)}}function Et(e){return e.constant}function Tt(e,t,n,i){kt(e,i);for(var r,o=t.split("."),a=0;o.length>1;a++){r=Ct(o.shift(),i);var s=kt(e[r],i);s||(s={},e[r]=s),e=s}return r=Ct(o.shift(),i),kt(e[r],i),e[r]=n,n}function Dt(e,t,i,r,o,a){return Ct(e,a),Ct(t,a),Ct(i,a),Ct(r,a),Ct(o,a),function(a,s){var l=s&&s.hasOwnProperty(e)?s:a;return null==l?l:(l=l[e],t?null==l?n:(l=l[t],i?null==l?n:(l=l[i],r?null==l?n:(l=l[r],o?null==l?n:l=l[o]:l):l):l):l)}}function At(e,t,i){var r=Gi[e];if(r)return r;var a=e.split("."),s=a.length;if(t.csp)r=s<6?Dt(a[0],a[1],a[2],a[3],a[4],i):function(e,t){var r,o=0;do{r=Dt(a[o++],a[o++],a[o++],a[o++],a[o++],i)(e,t),t=n,e=r}while(o<s);return r};else{var l="";o(a,function(e,t){Ct(e,i),l+="if(s == null) return undefined;\ns="+(t?"s":'((l&&l.hasOwnProperty("'+e+'"))?l:s)')+"."+e+";\n"}),l+="return s;";var c=new Function("s","l",l);c.toString=m(l),r=c}return r.sharedGetter=!0,r.assign=function(t,n){return Tt(t,e,n,e)},Gi[e]=r,r}function Mt(){var e=se(),t={csp:!1};this.$get=["$filter","$sniffer",function(n,i){function r(e){var t=e;return e.sharedGetter&&(t=function(t,n){return e(t,n)},t.literal=e.literal,t.constant=e.constant,t.assign=e.assign),t}function a(e,t){for(var n=0,i=e.length;n<i;n++){var r=e[n];r.constant||(r.inputs?a(r.inputs,t):-1===t.indexOf(r)&&t.push(r))}return t}function s(e,t){return null==e||null==t?e===t:("object"!=typeof e||"object"!=typeof(e=e.valueOf()))&&(e===t||e!==e&&t!==t)}function l(e,t,n,i){var r,o=i.$$inputs||(i.$$inputs=a(i.inputs,[]));if(1===o.length){var l=s;return o=o[0],e.$watch(function(e){var t=o(e);return s(t,l)||(r=i(e),l=t&&t.valueOf()),r},t,n)}for(var c=[],u=0,d=o.length;u<d;u++)c[u]=s;return e.$watch(function(e){for(var t=!1,n=0,a=o.length;n<a;n++){var l=o[n](e);(t||(t=!s(l,c[n])))&&(c[n]=l&&l.valueOf())}return t&&(r=i(e)),r},t,n)}function c(e,t,n,i){var r,o;return r=e.$watch(function(e){return i(e)},function(e,n,i){o=e,C(t)&&t.apply(this,arguments),$(e)&&i.$$postDigest(function(){$(o)&&r()})},n)}function u(e,t,n,i){function r(e){var t=!0;return o(e,function(e){$(e)||(t=!1)}),t}var a,s;return a=e.$watch(function(e){return i(e)},function(e,n,i){s=e,C(t)&&t.call(this,e,n,i),r(e)&&i.$$postDigest(function(){r(s)&&a()})},n)}function d(e,t,n,i){var r;return r=e.$watch(function(e){return i(e)},function(e,n,i){C(t)&&t.apply(this,arguments),r()},n)}function f(e,t){if(!t)return e;var n=function(n,i){var r=e(n,i),o=t(r,n,i);return $(r)?o:r};return e.$$watchDelegate&&e.$$watchDelegate!==l?n.$$watchDelegate=e.$$watchDelegate:t.$stateful||(n.$$watchDelegate=l,n.inputs=[e]),n}return t.csp=i.csp,function(i,o){var a,s,p;switch(typeof i){case"string":if(p=i=i.trim(),!(a=e[p])){":"===i.charAt(0)&&":"===i.charAt(1)&&(s=!0,i=i.substring(2));var g=new Yi(t);a=new Ki(g,n,t).parse(i),a.constant?a.$$watchDelegate=d:s?(a=r(a),a.$$watchDelegate=a.literal?u:c):a.inputs&&(a.$$watchDelegate=l),e[p]=a}return f(a,o);case"function":return f(i,o);default:return f(h,o)}}}]}function Ot(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return Pt(function(t){e.$evalAsync(t)},t)}]}function It(){this.$get=["$browser","$exceptionHandler",function(e,t){return Pt(function(t){e.defer(t)},t)}]}function Pt(e,t){function r(e,t,n){function i(t){return function(n){r||(r=!0,t.call(e,n))}}var r=!1;return[i(t),i(n)]}function a(){this.$$state={status:0}}function s(e,t){return function(n){t.call(e,n)}}function l(e){var i,r,o;o=e.pending,e.processScheduled=!1,e.pending=n;for(var a=0,s=o.length;a<s;++a){r=o[a][0],i=o[a][e.status];try{C(i)?r.resolve(i(e.value)):1===e.status?r.resolve(e.value):r.reject(e.value)}catch(e){r.reject(e),t(e)}}}function c(t){!t.processScheduled&&t.pending&&(t.processScheduled=!0,e(function(){l(t)}))}function u(){this.promise=new a,this.resolve=s(this,this.resolve),this.reject=s(this,this.reject),this.notify=s(this,this.notify)}function d(e){var t=new u,n=0,i=Zn(e)?[]:{};return o(e,function(e,r){n++,v(e).then(function(e){i.hasOwnProperty(r)||(i[r]=e,--n||t.resolve(i))},function(e){i.hasOwnProperty(r)||t.reject(e)})}),0===n&&t.resolve(i),t.promise}var f=i("$q",TypeError),p=function(){return new u};a.prototype={then:function(e,t,n){var i=new u;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([i,e,t,n]),this.$$state.status>0&&c(this.$$state),i.promise},catch:function(e){return this.then(null,e)},finally:function(e,t){return this.then(function(t){return m(t,!0,e)},function(t){return m(t,!1,e)},t)}},u.prototype={resolve:function(e){this.promise.$$state.status||(e===this.promise?this.$$reject(f("qcycle","Expected promise to be resolved with value other than itself '{0}'",e)):this.$$resolve(e))},$$resolve:function(e){var n,i;i=r(this,this.$$resolve,this.$$reject);try{(y(e)||C(e))&&(n=e&&e.then),C(n)?(this.promise.$$state.status=-1,n.call(e,i[0],i[1],this.notify)):(this.promise.$$state.value=e,this.promise.$$state.status=1,c(this.promise.$$state))}catch(e){i[1](e),t(e)}},reject:function(e){this.promise.$$state.status||this.$$reject(e)},$$reject:function(e){this.promise.$$state.value=e,this.promise.$$state.status=2,c(this.promise.$$state)},notify:function(n){var i=this.promise.$$state.pending;this.promise.$$state.status<=0&&i&&i.length&&e(function(){for(var e,r,o=0,a=i.length;o<a;o++){r=i[o][0],e=i[o][3];try{r.notify(C(e)?e(n):n)}catch(e){t(e)}}})}};var h=function(e){var t=new u;return t.reject(e),t.promise},g=function(e,t){var n=new u;return t?n.resolve(e):n.reject(e),n.promise},m=function(e,t,n){var i=null;try{C(n)&&(i=n())}catch(e){return g(e,!1)}return M(i)?i.then(function(){return g(e,t)},function(e){return g(e,!1)}):g(e,t)},v=function(e,t,n,i){var r=new u;return r.resolve(e),r.promise.then(t,n,i)},$=function e(t){function n(e){r.resolve(e)}function i(e){r.reject(e)}if(!C(t))throw f("norslvr","Expected resolverFn, got '{0}'",t);if(!(this instanceof e))return new e(t);var r=new u;return t(n,i),r.promise};return $.defer=p,$.reject=h,$.when=v,$.all=d,$}function Nt(){this.$get=["$window","$timeout",function(e,t){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame,i=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.mozCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,r=!!n,o=r?function(e){var t=n(e);return function(){i(t)}}:function(e){var n=t(e,16.66,!1);return function(){t.cancel(n)}};return o.supported=r,o}]}function jt(){var e=10,t=i("$rootScope"),n=null,a=null;this.digestTtl=function(t){return arguments.length&&(e=t),e},this.$get=["$injector","$exceptionHandler","$parse","$browser",function(i,s,l,u){function d(){this.$id=c(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$isolateBindings=null}function f(e){if(b.$$phase)throw t("inprog","{0} already in progress",b.$$phase);b.$$phase=e}function p(){b.$$phase=null}function g(e,t,n){do{e.$$listenerCount[n]-=t,0===e.$$listenerCount[n]&&delete e.$$listenerCount[n]}while(e=e.$parent)}function m(){}function v(){for(;k.length;)try{k.shift()()}catch(e){s(e)}a=null}function $(){null===a&&(a=u.defer(function(){b.$apply(v)}))}d.prototype={constructor:d,$new:function(e,t){function n(){i.$$destroyed=!0}var i;return t=t||this,e?(i=new d,i.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=function(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$id=c(),this.$$ChildScope=null},this.$$ChildScope.prototype=this),i=new this.$$ChildScope),i.$parent=t,i.$$prevSibling=t.$$childTail,t.$$childHead?(t.$$childTail.$$nextSibling=i,t.$$childTail=i):t.$$childHead=t.$$childTail=i,(e||t!=this)&&i.$on("$destroy",n),i},$watch:function(e,t,i){var r=l(e);if(r.$$watchDelegate)return r.$$watchDelegate(this,t,i,r);var o=this,a=o.$$watchers,s={fn:t,last:m,get:r,exp:e,eq:!!i};return n=null,C(t)||(s.fn=h),a||(a=o.$$watchers=[]),a.unshift(s),function(){N(a,s),n=null}},$watchGroup:function(e,t){function n(){l=!1,c?(c=!1,t(r,r,s)):t(r,i,s)}var i=new Array(e.length),r=new Array(e.length),a=[],s=this,l=!1,c=!0;if(!e.length){var u=!0;return s.$evalAsync(function(){u&&t(r,r,s)}),function(){u=!1}}return 1===e.length?this.$watch(e[0],function(e,n,o){r[0]=e,i[0]=n,t(r,e===n?r:i,o)}):(o(e,function(e,t){var o=s.$watch(e,function(e,o){r[t]=e,i[t]=o,l||(l=!0,s.$evalAsync(n))});a.push(o)}),function(){for(;a.length;)a.shift()()})},$watchCollection:function(e,t){function n(e){o=e;var t,n,i,s;if(y(o))if(r(o)){a!==p&&(a=p,m=a.length=0,d++),t=o.length,m!==t&&(d++,a.length=m=t);for(var l=0;l<t;l++)s=a[l],i=o[l],s!==s&&i!==i||s===i||(d++,a[l]=i)}else{a!==h&&(a=h={},m=0,d++),t=0;for(n in o)o.hasOwnProperty(n)&&(t++,i=o[n],s=a[n],n in a?s!==s&&i!==i||s===i||(d++,a[n]=i):(m++,a[n]=i,d++));if(m>t){d++;for(n in a)o.hasOwnProperty(n)||(m--,delete a[n])}}else a!==o&&(a=o,d++);return d}function i(){if(g?(g=!1,t(o,o,c)):t(o,s,c),u)if(y(o))if(r(o)){s=new Array(o.length);for(var e=0;e<o.length;e++)s[e]=o[e]}else{s={};for(var n in o)jn.call(o,n)&&(s[n]=o[n])}else s=o}n.$stateful=!0;var o,a,s,c=this,u=t.length>1,d=0,f=l(e,n),p=[],h={},g=!0,m=0;return this.$watch(f,i)},$digest:function(){var i,r,o,l,c,d,h,g,$,y,k,S=e,E=this,T=[];f("$digest"),
+u.$$checkUrlChange(),this===b&&null!==a&&(u.defer.cancel(a),v()),n=null;do{for(d=!1,g=E;w.length;){try{k=w.shift(),k.scope.$eval(k.expression)}catch(e){s(e)}n=null}e:do{if(l=g.$$watchers)for(c=l.length;c--;)try{if(i=l[c])if((r=i.get(g))===(o=i.last)||(i.eq?L(r,o):"number"==typeof r&&"number"==typeof o&&isNaN(r)&&isNaN(o))){if(i===n){d=!1;break e}}else d=!0,n=i,i.last=i.eq?j(r,null):r,i.fn(r,o===m?r:o,g),S<5&&($=4-S,T[$]||(T[$]=[]),y=C(i.exp)?"fn: "+(i.exp.name||i.exp.toString()):i.exp,y+="; newVal: "+U(r)+"; oldVal: "+U(o),T[$].push(y))}catch(e){s(e)}if(!(h=g.$$childHead||g!==E&&g.$$nextSibling))for(;g!==E&&!(h=g.$$nextSibling);)g=g.$parent}while(g=h);if((d||w.length)&&!S--)throw p(),t("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",e,U(T))}while(d||w.length);for(p();x.length;)try{x.shift()()}catch(e){s(e)}},$destroy:function(){if(!this.$$destroyed){var e=this.$parent;if(this.$broadcast("$destroy"),this.$$destroyed=!0,this!==b){for(var t in this.$$listenerCount)g(this,this.$$listenerCount[t],t);e.$$childHead==this&&(e.$$childHead=this.$$nextSibling),e.$$childTail==this&&(e.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=h,this.$on=this.$watch=this.$watchGroup=function(){return h},this.$$listeners={},this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null}}},$eval:function(e,t){return l(e)(this,t)},$evalAsync:function(e){b.$$phase||w.length||u.defer(function(){w.length&&b.$digest()}),w.push({scope:this,expression:e})},$$postDigest:function(e){x.push(e)},$apply:function(e){try{return f("$apply"),this.$eval(e)}catch(e){s(e)}finally{p();try{b.$digest()}catch(e){throw s(e),e}}},$applyAsync:function(e){function t(){n.$eval(e)}var n=this;e&&k.push(t),$()},$on:function(e,t){var n=this.$$listeners[e];n||(this.$$listeners[e]=n=[]),n.push(t);var i=this;do{i.$$listenerCount[e]||(i.$$listenerCount[e]=0),i.$$listenerCount[e]++}while(i=i.$parent);var r=this;return function(){n[n.indexOf(t)]=null,g(r,1,e)}},$emit:function(e,t){var n,i,r,o=[],a=this,l=!1,c={name:e,targetScope:a,stopPropagation:function(){l=!0},preventDefault:function(){c.defaultPrevented=!0},defaultPrevented:!1},u=R([c],arguments,1);do{for(n=a.$$listeners[e]||o,c.currentScope=a,i=0,r=n.length;i<r;i++)if(n[i])try{n[i].apply(null,u)}catch(e){s(e)}else n.splice(i,1),i--,r--;if(l)return c.currentScope=null,c;a=a.$parent}while(a);return c.currentScope=null,c},$broadcast:function(e,t){var n=this,i=n,r=n,o={name:e,targetScope:n,preventDefault:function(){o.defaultPrevented=!0},defaultPrevented:!1};if(!n.$$listenerCount[e])return o;for(var a,l,c,u=R([o],arguments,1);i=r;){for(o.currentScope=i,a=i.$$listeners[e]||[],l=0,c=a.length;l<c;l++)if(a[l])try{a[l].apply(null,u)}catch(e){s(e)}else a.splice(l,1),l--,c--;if(!(r=i.$$listenerCount[e]&&i.$$childHead||i!==n&&i.$$nextSibling))for(;i!==n&&!(r=i.$$nextSibling);)i=i.$parent}return o.currentScope=null,o}};var b=new d,w=b.$$asyncQueue=[],x=b.$$postDigestQueue=[],k=b.$$applyAsyncQueue=[];return b}]}function Ft(){var e=/^\s*(https?|ftp|mailto|tel|file):/,t=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(t){return $(t)?(e=t,this):e},this.imgSrcSanitizationWhitelist=function(e){return $(e)?(t=e,this):t},this.$get=function(){return function(n,i){var r,o=i?t:e;return r=zt(n).href,""===r||r.match(o)?n:"unsafe:"+r}}}function Lt(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")}function Rt(e){if("self"===e)return e;if(b(e)){if(e.indexOf("***")>-1)throw Xi("iwcard","Illegal sequence *** in string matcher. String: {0}",e);return e=Lt(e).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+e+"$")}if(k(e))return new RegExp("^"+e.source+"$");throw Xi("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function Vt(e){var t=[];return $(e)&&o(e,function(e){t.push(Rt(e))}),t}function Ht(){this.SCE_CONTEXTS=Zi;var e=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(e=Vt(t)),e},this.resourceUrlBlacklist=function(e){return arguments.length&&(t=Vt(e)),t},this.$get=["$injector",function(i){function r(e,t){return"self"===e?Yt(t):!!e.exec(t.href)}function o(n){var i,o,a=zt(n.toString()),s=!1;for(i=0,o=e.length;i<o;i++)if(r(e[i],a)){s=!0;break}if(s)for(i=0,o=t.length;i<o;i++)if(r(t[i],a)){s=!1;break}return s}function a(e){var t=function(e){this.$$unwrapTrustedValue=function(){return e}};return e&&(t.prototype=new e),t.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},t.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},t}function s(e,t){var i=f.hasOwnProperty(e)?f[e]:null;if(!i)throw Xi("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",e,t);if(null===t||t===n||""===t)return t;if("string"!=typeof t)throw Xi("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",e);return new i(t)}function l(e){return e instanceof d?e.$$unwrapTrustedValue():e}function c(e,t){if(null===t||t===n||""===t)return t;var i=f.hasOwnProperty(e)?f[e]:null;if(i&&t instanceof i)return t.$$unwrapTrustedValue();if(e===Zi.RESOURCE_URL){if(o(t))return t;throw Xi("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",t.toString())}if(e===Zi.HTML)return u(t);throw Xi("unsafe","Attempting to use an unsafe value in a safe context.")}var u=function(e){throw Xi("unsafe","Attempting to use an unsafe value in a safe context.")};i.has("$sanitize")&&(u=i.get("$sanitize"));var d=a(),f={};return f[Zi.HTML]=a(d),f[Zi.CSS]=a(d),f[Zi.URL]=a(d),f[Zi.JS]=a(d),f[Zi.RESOURCE_URL]=a(f[Zi.URL]),{trustAs:s,getTrusted:c,valueOf:l}}]}function qt(){var e=!0;this.enabled=function(t){return arguments.length&&(e=!!t),e},this.$get=["$document","$parse","$sceDelegate",function(t,n,i){if(e&&t[0].documentMode<8)throw Xi("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var r=F(Zi);r.isEnabled=function(){return e},r.trustAs=i.trustAs,r.getTrusted=i.getTrusted,r.valueOf=i.valueOf,e||(r.trustAs=r.getTrusted=function(e,t){return t},r.valueOf=g),r.parseAs=function(e,t){var i=n(t);return i.literal&&i.constant?i:n(t,function(t){return r.getTrusted(e,t)})};var a=r.parseAs,s=r.getTrusted,l=r.trustAs;return o(Zi,function(e,t){var n=Nn(t);r[ue("parse_as_"+n)]=function(t){return a(e,t)},r[ue("get_trusted_"+n)]=function(t){return s(e,t)},r[ue("trust_as_"+n)]=function(t){return l(e,t)}}),r}]}function Ut(){this.$get=["$window","$document",function(e,t){var n,i,r={},o=f((/android (\d+)/.exec(Nn((e.navigator||{}).userAgent))||[])[1]),a=/Boxee/i.test((e.navigator||{}).userAgent),s=t[0]||{},l=/^(Moz|webkit|O|ms)(?=[A-Z])/,c=s.body&&s.body.style,u=!1,d=!1;if(c){for(var p in c)if(i=l.exec(p)){n=i[0],n=n.substr(0,1).toUpperCase()+n.substr(1);break}n||(n="WebkitOpacity"in c&&"webkit"),u=!!("transition"in c||n+"Transition"in c),d=!!("animation"in c||n+"Animation"in c),!o||u&&d||(u=b(s.body.style.webkitTransition),d=b(s.body.style.webkitAnimation))}return{history:!(!e.history||!e.history.pushState||o<4||a),hasEvent:function(e){if("input"==e&&9==Vn)return!1;if(v(r[e])){var t=s.createElement("div");r[e]="on"+e in t}return r[e]},csp:Qn(),vendorPrefix:n,transitions:u,animations:d,android:o}}]}function _t(){this.$get=["$templateCache","$http","$q",function(e,t,n){function i(r,o){function a(){if(s.totalPendingRequests--,!o)throw Pi("tpload","Failed to load template: {0}",r);return n.reject()}var s=i;return s.totalPendingRequests++,t.get(r,{cache:e}).then(function(t){var n=t.data;return n&&0!==n.length?(s.totalPendingRequests--,e.put(r,n),n):a()},a)}return i.totalPendingRequests=0,i}]}function Bt(){this.$get=["$rootScope","$browser","$location",function(e,t,n){var i={};return i.findBindings=function(e,t,n){var i=e.getElementsByClassName("ng-binding"),r=[];return o(i,function(e){var i=Kn.element(e).data("$binding");i&&o(i,function(i){if(n){new RegExp("(^|\\s)"+t+"(\\s|\\||$)").test(i)&&r.push(e)}else-1!=i.indexOf(t)&&r.push(e)})}),r},i.findModels=function(e,t,n){for(var i=["ng-","data-ng-","ng\\:"],r=0;r<i.length;++r){var o=n?"=":"*=",a="["+i[r]+"model"+o+'"'+t+'"]',s=e.querySelectorAll(a);if(s.length)return s}},i.getLocation=function(){return n.url()},i.setLocation=function(t){t!==n.url()&&(n.url(t),e.$digest())},i.whenStable=function(e){t.notifyWhenNoOutstandingRequests(e)},i}]}function Wt(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(e,t,n,i,r){function o(o,s,l){var c,u=$(l)&&!l,d=(u?i:n).defer(),f=d.promise;return c=t.defer(function(){try{d.resolve(o())}catch(e){d.reject(e),r(e)}finally{delete a[f.$$timeoutId]}u||e.$apply()},s),f.$$timeoutId=c,a[c]=d,f}var a={};return o.cancel=function(e){return!!(e&&e.$$timeoutId in a)&&(a[e.$$timeoutId].reject("canceled"),delete a[e.$$timeoutId],t.defer.cancel(e.$$timeoutId))},o}]}function zt(e,t){var n=e;return Vn&&(Ji.setAttribute("href",n),n=Ji.href),Ji.setAttribute("href",n),{href:Ji.href,protocol:Ji.protocol?Ji.protocol.replace(/:$/,""):"",host:Ji.host,search:Ji.search?Ji.search.replace(/^\?/,""):"",hash:Ji.hash?Ji.hash.replace(/^#/,""):"",hostname:Ji.hostname,port:Ji.port,pathname:"/"===Ji.pathname.charAt(0)?Ji.pathname:"/"+Ji.pathname}}function Yt(e){var t=b(e)?zt(e):e;return t.protocol===Qi.protocol&&t.host===Qi.host}function Kt(){this.$get=m(e)}function Gt(e){function t(i,r){if(y(i)){var a={};return o(i,function(e,n){a[n]=t(n,e)}),a}return e.factory(i+n,r)}var n="Filter";this.register=t,this.$get=["$injector",function(e){return function(t){return e.get(t+n)}}],t("currency",Zt),t("date",cn),t("filter",Xt),t("json",un),t("limitTo",dn),t("lowercase",rr),t("number",Jt),t("orderBy",fn),t("uppercase",or)}function Xt(){return function(e,t,n){if(!Zn(e))return e;var i=typeof n,r=[];r.check=function(e,t){for(var n=0;n<r.length;n++)if(!r[n](e,t))return!1;return!0},"function"!==i&&(n="boolean"===i&&n?function(e,t){return Kn.equals(e,t)}:function(e,t){if(e&&t&&"object"==typeof e&&"object"==typeof t){for(var i in e)if("$"!==i.charAt(0)&&jn.call(e,i)&&n(e[i],t[i]))return!0;return!1}return t=(""+t).toLowerCase(),(""+e).toLowerCase().indexOf(t)>-1});var o=function(e,t){if("string"==typeof t&&"!"===t.charAt(0))return!o(e,t.substr(1));switch(typeof e){case"boolean":case"number":case"string":return n(e,t);case"object":switch(typeof t){case"object":return n(e,t);default:for(var i in e)if("$"!==i.charAt(0)&&o(e[i],t))return!0}return!1;case"array":for(var r=0;r<e.length;r++)if(o(e[r],t))return!0;return!1;default:return!1}};switch(typeof t){case"boolean":case"number":case"string":t={$:t};case"object":for(var a in t)!function(e){void 0!==t[e]&&r.push(function(n){return o("$"==e?n:n&&n[e],t[e])})}(a);break;case"function":r.push(t);break;default:return e}for(var s=[],l=0;l<e.length;l++){var c=e[l];r.check(c,l)&&s.push(c)}return s}}function Zt(e){var t=e.NUMBER_FORMATS;return function(e,n,i){return v(n)&&(n=t.CURRENCY_SYM),v(i)&&(i=2),null==e?e:Qt(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,i).replace(/\u00A4/g,n)}}function Jt(e){var t=e.NUMBER_FORMATS;return function(e,n){return null==e?e:Qt(e,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,n)}}function Qt(e,t,n,i,r){if(!isFinite(e)||y(e))return"";var o=e<0;e=Math.abs(e);var a=e+"",s="",l=[],c=!1;if(-1!==a.indexOf("e")){var u=a.match(/([\d\.]+)e(-?)(\d+)/);u&&"-"==u[2]&&u[3]>r+1?(a="0",e=0):(s=a,c=!0)}if(c)r>0&&e>-1&&e<1&&(s=e.toFixed(r));else{var d=(a.split(er)[1]||"").length;v(r)&&(r=Math.min(Math.max(t.minFrac,d),t.maxFrac)),e=+(Math.round(+(e.toString()+"e"+r)).toString()+"e"+-r),0===e&&(o=!1);var f=(""+e).split(er),p=f[0];f=f[1]||"";var h,g=0,m=t.lgSize,$=t.gSize;if(p.length>=m+$)for(g=p.length-m,h=0;h<g;h++)(g-h)%$==0&&0!==h&&(s+=n),s+=p.charAt(h);for(h=g;h<p.length;h++)(p.length-h)%m==0&&0!==h&&(s+=n),s+=p.charAt(h);for(;f.length<r;)f+="0";r&&"0"!==r&&(s+=i+f.substr(0,r))}return l.push(o?t.negPre:t.posPre),l.push(s),l.push(o?t.negSuf:t.posSuf),l.join("")}function en(e,t,n){var i="";for(e<0&&(i="-",e=-e),e=""+e;e.length<t;)e="0"+e;return n&&(e=e.substr(e.length-t)),i+e}function tn(e,t,n,i){return n=n||0,function(r){var o=r["get"+e]();return(n>0||o>-n)&&(o+=n),0===o&&-12==n&&(o=12),en(o,t,i)}}function nn(e,t){return function(n,i){var r=n["get"+e]();return i[Fn(t?"SHORT"+e:e)][r]}}function rn(e){var t=-1*e.getTimezoneOffset(),n=t>=0?"+":"";return n+=en(Math[t>0?"floor":"ceil"](t/60),2)+en(Math.abs(t%60),2)}function on(e){var t=new Date(e,0,1).getDay();return new Date(e,0,(t<=4?5:12)-t)}function an(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+(4-e.getDay()))}function sn(e){return function(t){var n=on(t.getFullYear()),i=an(t),r=+i-+n;return en(1+Math.round(r/6048e5),e)}}function ln(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]}function cn(e){function t(e){var t;if(t=e.match(n)){var i=new Date(0),r=0,o=0,a=t[8]?i.setUTCFullYear:i.setFullYear,s=t[8]?i.setUTCHours:i.setHours;t[9]&&(r=f(t[9]+t[10]),o=f(t[9]+t[11])),a.call(i,f(t[1]),f(t[2])-1,f(t[3]));var l=f(t[4]||0)-r,c=f(t[5]||0)-o,u=f(t[6]||0),d=Math.round(1e3*parseFloat("0."+(t[7]||0)));return s.call(i,l,c,u,d),i}return e}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,i,r){var a,s,l="",c=[];if(i=i||"mediumDate",i=e.DATETIME_FORMATS[i]||i,b(n)&&(n=ir.test(n)?f(n):t(n)),w(n)&&(n=new Date(n)),!x(n))return n;for(;i;)s=nr.exec(i),s?(c=R(c,s,1),i=c.pop()):(c.push(i),i=null);return r&&"UTC"===r&&(n=new Date(n.getTime()),n.setMinutes(n.getMinutes()+n.getTimezoneOffset())),o(c,function(t){a=tr[t],l+=a?a(n,e.DATETIME_FORMATS):t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}}function un(){return function(e){return U(e,!0)}}function dn(){return function(e,t){if(w(e)&&(e=e.toString()),!Zn(e)&&!b(e))return e;if(t=Math.abs(Number(t))===1/0?Number(t):f(t),b(e))return t?t>=0?e.slice(0,t):e.slice(t,e.length):"";var n,i,r=[];for(t>e.length?t=e.length:t<-e.length&&(t=-e.length),t>0?(n=0,i=t):(n=e.length+t,i=e.length);n<i;n++)r.push(e[n]);return r}}function fn(e){return function(t,n,i){function o(e,t){for(var i=0;i<n.length;i++){var r=n[i](e,t);if(0!==r)return r}return 0}function a(e,t){return t?function(t,n){return e(n,t)}:e}function s(e,t){var n=typeof e,i=typeof t;return n==i?(x(e)&&x(t)&&(e=e.valueOf(),t=t.valueOf()),"string"==n&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t?0:e<t?-1:1):n<i?-1:1}if(!r(t))return t;n=Zn(n)?n:[n],0===n.length&&(n=["+"]),n=n.map(function(t){var n=!1,i=t||g;if(b(t)){if("+"!=t.charAt(0)&&"-"!=t.charAt(0)||(n="-"==t.charAt(0),t=t.substring(1)),""===t)return a(function(e,t){return s(e,t)},n);if(i=e(t),i.constant){var r=i();return a(function(e,t){return s(e[r],t[r])},n)}}return a(function(e,t){return s(i(e),i(t))},n)});for(var l=[],c=0;c<t.length;c++)l.push(t[c]);return l.sort(a(o,i))}}function pn(e){return C(e)&&(e={link:e}),e.restrict=e.restrict||"AC",m(e)}function hn(e,t){e.$name=t}function gn(e,t,i,r,a){var s=this,l=[],c=s.$$parentForm=e.parent().controller("form")||lr;s.$error={},s.$$success={},s.$pending=n,s.$name=a(t.name||t.ngForm||"")(i),s.$dirty=!1,s.$pristine=!0,s.$valid=!0,s.$invalid=!1,s.$submitted=!1,c.$addControl(s),s.$rollbackViewValue=function(){o(l,function(e){e.$rollbackViewValue()})},s.$commitViewValue=function(){o(l,function(e){e.$commitViewValue()})},s.$addControl=function(e){re(e.$name,"input"),l.push(e),e.$name&&(s[e.$name]=e)},s.$$renameControl=function(e,t){var n=e.$name;s[n]===e&&delete s[n],s[t]=e,e.$name=t},s.$removeControl=function(e){e.$name&&s[e.$name]===e&&delete s[e.$name],o(s.$pending,function(t,n){s.$setValidity(n,null,e)}),o(s.$error,function(t,n){s.$setValidity(n,null,e)}),N(l,e)},An({ctrl:this,$element:e,set:function(e,t,n){var i=e[t];if(i){-1===i.indexOf(n)&&i.push(n)}else e[t]=[n]},unset:function(e,t,n){var i=e[t];i&&(N(i,n),0===i.length&&delete e[t])},parentForm:c,$animate:r}),s.$setDirty=function(){r.removeClass(e,Dr),r.addClass(e,Ar),s.$dirty=!0,s.$pristine=!1,c.$setDirty()},s.$setPristine=function(){r.setClass(e,Dr,Ar+" "+cr),s.$dirty=!1,s.$pristine=!0,s.$submitted=!1,o(l,function(e){e.$setPristine()})},s.$setUntouched=function(){o(l,function(e){e.$setUntouched()})},s.$setSubmitted=function(){r.addClass(e,cr),s.$submitted=!0,c.$setSubmitted()}}function mn(e){e.$formatters.push(function(t){return e.$isEmpty(t)?t:t.toString()})}function vn(e,t,n,i,r,o){$n(e,t,n,i,r,o),mn(i)}function $n(e,t,n,i,r,o){var a=(t.prop(Pn),t[0].placeholder),s={},l=Nn(t[0].type);if(!r.android){var c=!1;t.on("compositionstart",function(e){c=!0}),t.on("compositionend",function(){c=!1,u()})}var u=function(e){if(!c){var r=t.val(),o=e&&e.type;if(Vn&&"input"===(e||s).type&&t[0].placeholder!==a)return void(a=t[0].placeholder);"password"===l||n.ngTrim&&"false"===n.ngTrim||(r=Jn(r)),(i.$viewValue!==r||""===r&&i.$$hasNativeValidators)&&i.$setViewValue(r,o)}};if(r.hasEvent("input"))t.on("input",u);else{var d,f=function(e){d||(d=o.defer(function(){u(e),d=null}))};t.on("keydown",function(e){var t=e.keyCode;91===t||15<t&&t<19||37<=t&&t<=40||f(e)}),r.hasEvent("paste")&&t.on("paste cut",f)}t.on("change",u),i.$render=function(){t.val(i.$isEmpty(i.$modelValue)?"":i.$viewValue)}}function yn(e,t){if(x(e))return e;if(b(e)){yr.lastIndex=0;var n=yr.exec(e);if(n){var i=+n[1],r=+n[2],o=0,a=0,s=0,l=0,c=on(i),u=7*(r-1);return t&&(o=t.getHours(),a=t.getMinutes(),s=t.getSeconds(),l=t.getMilliseconds()),new Date(i,0,c.getDate()+u,o,a,s,l)}}return NaN}function bn(e,t){return function(n,i){var r,a;if(x(n))return n;if(b(n)){if('"'==n.charAt(0)&&'"'==n.charAt(n.length-1)&&(n=n.substring(1,n.length-1)),pr.test(n))return new Date(n);if(e.lastIndex=0,r=e.exec(n))return r.shift(),a=i?{yyyy:i.getFullYear(),MM:i.getMonth()+1,dd:i.getDate(),HH:i.getHours(),mm:i.getMinutes(),ss:i.getSeconds(),sss:i.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},o(r,function(e,n){n<t.length&&(a[t[n]]=+e)}),new Date(a.yyyy,a.MM-1,a.dd,a.HH,a.mm,a.ss||0,1e3*a.sss||0)}return NaN}}function wn(e,t,i,r){return function(o,a,s,l,c,u,d){function f(e){return $(e)?x(e)?e:i(e):n}xn(o,a,s,l),$n(o,a,s,l,c,u);var p,h=l&&l.$options&&l.$options.timezone;if(l.$$parserName=e,l.$parsers.push(function(e){if(l.$isEmpty(e))return null;if(t.test(e)){var r=i(e,p);return"UTC"===h&&r.setMinutes(r.getMinutes()-r.getTimezoneOffset()),r}return n}),l.$formatters.push(function(e){if(!l.$isEmpty(e)){if(!x(e))throw Cr("datefmt","Expected `{0}` to be a date",e);if((p=e)&&"UTC"===h){var t=6e4*p.getTimezoneOffset();p=new Date(p.getTime()+t)}return d("date")(e,r,h)}return p=null,""}),$(s.min)||s.ngMin){var g;l.$validators.min=function(e){return l.$isEmpty(e)||v(g)||i(e)>=g},s.$observe("min",function(e){g=f(e),l.$validate()})}if($(s.max)||s.ngMax){var m;l.$validators.max=function(e){return l.$isEmpty(e)||v(m)||i(e)<=m},s.$observe("max",function(e){m=f(e),l.$validate()})}l.$isEmpty=function(e){return!e||e.getTime&&e.getTime()!==e.getTime()}}}function xn(e,t,i,r){var o=t[0];(r.$$hasNativeValidators=y(o.validity))&&r.$parsers.push(function(e){var i=t.prop(Pn)||{};return i.badInput&&!i.typeMismatch?n:e})}function Cn(e,t,i,r,o,a){if(xn(e,t,i,r),$n(e,t,i,r,o,a),r.$$parserName="number",r.$parsers.push(function(e){return r.$isEmpty(e)?null:mr.test(e)?parseFloat(e):n}),r.$formatters.push(function(e){if(!r.$isEmpty(e)){if(!w(e))throw Cr("numfmt","Expected `{0}` to be a number",e);e=e.toString()}return e}),i.min||i.ngMin){var s;r.$validators.min=function(e){return r.$isEmpty(e)||v(s)||e>=s},i.$observe("min",function(e){$(e)&&!w(e)&&(e=parseFloat(e,10)),s=w(e)&&!isNaN(e)?e:n,r.$validate()})}if(i.max||i.ngMax){var l;r.$validators.max=function(e){return r.$isEmpty(e)||v(l)||e<=l},i.$observe("max",function(e){$(e)&&!w(e)&&(e=parseFloat(e,10)),l=w(e)&&!isNaN(e)?e:n,r.$validate()})}}function kn(e,t,n,i,r,o){$n(e,t,n,i,r,o),mn(i),i.$$parserName="url",i.$validators.url=function(e){return i.$isEmpty(e)||hr.test(e)}}function Sn(e,t,n,i,r,o){$n(e,t,n,i,r,o),mn(i),i.$$parserName="email",i.$validators.email=function(e){return i.$isEmpty(e)||gr.test(e)}}function En(e,t,n,i){v(n.name)&&t.attr("name",c());var r=function(e){t[0].checked&&i.$setViewValue(n.value,e&&e.type)};t.on("click",r),i.$render=function(){var e=n.value;t[0].checked=e==i.$viewValue},n.$observe("value",i.$render)}function Tn(e,t,n,r,o){var a;if($(r)){if(a=e(r),!a.constant)throw i("ngModel")("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,r);return a(t)}return o}function Dn(e,t,n,i,r,o,a,s){var l=Tn(s,e,"ngTrueValue",n.ngTrueValue,!0),c=Tn(s,e,"ngFalseValue",n.ngFalseValue,!1),u=function(e){i.$setViewValue(t[0].checked,e&&e.type)};t.on("click",u),i.$render=function(){t[0].checked=i.$viewValue},i.$isEmpty=function(e){return e!==l},i.$formatters.push(function(e){return L(e,l)}),i.$parsers.push(function(e){return e?l:c})}function An(e){function t(e,t,l){t===n?i("$pending",e,l):r("$pending",e,l),A(t)?t?(d(s.$error,e,l),u(s.$$success,e,l)):(u(s.$error,e,l),d(s.$$success,e,l)):(d(s.$error,e,l),d(s.$$success,e,l)),s.$pending?(o(Mr,!0),s.$valid=s.$invalid=n,a("",null)):(o(Mr,!1),s.$valid=Mn(s.$error),s.$invalid=!s.$valid,a("",s.$valid));var c;c=s.$pending&&s.$pending[e]?n:!s.$error[e]&&(!!s.$$success[e]||null),a(e,c),f.$setValidity(e,c,s)}function i(e,t,n){s[e]||(s[e]={}),u(s[e],t,n)}function r(e,t,i){s[e]&&d(s[e],t,i),Mn(s[e])&&(s[e]=n)}function o(e,t){t&&!c[e]?(p.addClass(l,e),c[e]=!0):!t&&c[e]&&(p.removeClass(l,e),c[e]=!1)}function a(e,t){e=e?"-"+te(e,"-"):"",o(Er+e,!0===t),o(Tr+e,!1===t)}var s=e.ctrl,l=e.$element,c={},u=e.set,d=e.unset,f=e.parentForm,p=e.$animate;c[Tr]=!(c[Er]=l.hasClass(Er)),s.$setValidity=t}function Mn(e){if(e)for(var t in e)return!1;return!0}function On(e,t){return e="ngClass"+e,["$animate",function(n){function i(e,t){var n=[];e:for(var i=0;i<e.length;i++){for(var r=e[i],o=0;o<t.length;o++)if(r==t[o])continue e;n.push(r)}return n}function r(e){if(Zn(e))return e;if(b(e))return e.split(" ");if(y(e)){var t=[];return o(e,function(e,n){e&&(t=t.concat(n.split(" ")))}),t}return e}return{restrict:"AC",link:function(a,s,l){function c(e){var t=d(e,1);l.$addClass(t)}function u(e){var t=d(e,-1);l.$removeClass(t)}function d(e,t){var n=s.data("$classCounts")||{},i=[];return o(e,function(e){(t>0||n[e])&&(n[e]=(n[e]||0)+t,n[e]===+(t>0)&&i.push(e))}),s.data("$classCounts",n),i.join(" ")}function f(e,t){var r=i(t,e),o=i(e,t);r=d(r,1),o=d(o,-1),r&&r.length&&n.addClass(s,r),o&&o.length&&n.removeClass(s,o)}function p(e){if(!0===t||a.$index%2===t){var n=r(e||[]);if(h){if(!L(e,h)){var i=r(h);f(i,n)}}else c(n)}h=F(e)}var h;a.$watch(l[e],p,!0),l.$observe("class",function(t){p(a.$eval(l[e]))}),"ngClass"!==e&&a.$watch("$index",function(n,i){var o=1&n;if(o!==(1&i)){var s=r(a.$eval(l[e]));o===t?c(s):u(s)}})}}}]}var In=/^\/(.+)\/([a-z]*)$/,Pn="validity",Nn=function(e){return b(e)?e.toLowerCase():e},jn=Object.prototype.hasOwnProperty,Fn=function(e){return b(e)?e.toUpperCase():e},Ln=function(e){return b(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(32|e.charCodeAt(0))}):e},Rn=function(e){return b(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(-33&e.charCodeAt(0))}):e};"i"!=="I".toLowerCase()&&(Nn=Ln,Fn=Rn);var Vn,Hn,qn,Un,_n=[].slice,Bn=[].splice,Wn=[].push,zn=Object.prototype.toString,Yn=i("ng"),Kn=e.angular||(e.angular={}),Gn=0;Vn=t.documentMode,h.$inject=[],g.$inject=[];var Xn,Zn=Array.isArray,Jn=function(e){return b(e)?e.trim():e},Qn=function(){if($(Qn.isActive_))return Qn.isActive_;var e=!(!t.querySelector("[ng-csp]")&&!t.querySelector("[data-ng-csp]"));if(!e)try{new Function("")}catch(t){e=!0}return Qn.isActive_=e},ei=["ng-","data-ng-","ng:","x-ng-"],ti=/[A-Z]/g,ni=!1,ii=1,ri=3,oi=8,ai=9,si=11,li={full:"1.3.0",major:1,minor:3,dot:0,codeName:"superluminal-nudge"};ge.expando="ng339";var ci=ge.cache={},ui=1,di=function(e,t,n){e.addEventListener(t,n,!1)},fi=function(e,t,n){e.removeEventListener(t,n,!1)};ge._data=function(e){return this.cache[e[this.expando]]||{}};var pi=/([\:\-\_]+(.))/g,hi=/^moz([A-Z])/,gi={mouseleave:"mouseout",mouseenter:"mouseover"},mi=i("jqLite"),vi=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,$i=/<|&#?\w+;/,yi=/<([\w:]+)/,bi=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,wi={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};wi.optgroup=wi.option,wi.tbody=wi.tfoot=wi.colgroup=wi.caption=wi.thead,wi.th=wi.td;var xi=ge.prototype={ready:function(n){function i(){r||(r=!0,n())}var r=!1;"complete"===t.readyState?setTimeout(i):(this.on("DOMContentLoaded",i),ge(e).on("load",i),this.on("DOMContentLoaded",i))},toString:function(){var e=[];return o(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return Hn(e>=0?this[e]:this[this.length+e])},length:0,push:Wn,sort:[].sort,splice:[].splice},Ci={};o("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(e){Ci[Nn(e)]=e});var ki={};o("input,select,option,textarea,button,form,details".split(","),function(e){ki[e]=!0});var Si={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};o({data:we,removeData:ye},function(e,t){ge[t]=e}),o({data:we,inheritedData:Te,scope:function(e){return Hn.data(e,"$scope")||Te(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return Hn.data(e,"$isolateScope")||Hn.data(e,"$isolateScopeNoTemplate")},controller:Ee,injector:function(e){return Te(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:xe,css:function(e,t,n){if(t=ue(t),!$(n))return e.style[t];e.style[t]=n},attr:function(e,t,i){var r=Nn(t);if(Ci[r]){if(!$(i))return e[t]||(e.attributes.getNamedItem(t)||h).specified?r:n;i?(e[t]=!0,e.setAttribute(t,r)):(e[t]=!1,e.removeAttribute(r))}else if($(i))e.setAttribute(t,i);else if(e.getAttribute){var o=e.getAttribute(t,2);return null===o?n:o}},prop:function(e,t,n){if(!$(n))return e[t];e[t]=n},text:function(){function e(e,t){if(v(t)){var n=e.nodeType;return n===ii||n===ri?e.textContent:""}e.textContent=t}return e.$dv="",e}(),val:function(e,t){if(v(t)){if(e.multiple&&"select"===P(e)){var n=[];return o(e.options,function(e){e.selected&&n.push(e.value||e.text)}),0===n.length?null:n}return e.value}e.value=t},html:function(e,t){if(v(t))return e.innerHTML;ve(e,!0),e.innerHTML=t},empty:De},function(e,t){ge.prototype[t]=function(t,i){var r,o,a=this.length;if(e!==De&&(2==e.length&&e!==xe&&e!==Ee?t:i)===n){if(y(t)){for(r=0;r<a;r++)if(e===we)e(this[r],t);else for(o in t)e(this[r],o,t[o]);return this}for(var s=e.$dv,l=s===n?Math.min(a,1):a,c=0;c<l;c++){var u=e(this[c],t,i);s=s?s+u:u}return s}for(r=0;r<a;r++)e(this[r],t,i);return this}}),o({removeData:ye,on:function e(t,n,i,r){if($(r))throw mi("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(fe(t)){var o=be(t,!0),a=o.events,s=o.handle;s||(s=o.handle=Pe(t,a));for(var l=n.indexOf(" ")>=0?n.split(" "):[n],c=l.length;c--;){n=l[c];var u=a[n];u||(a[n]=[],"mouseenter"===n||"mouseleave"===n?e(t,gi[n],function(e){var t=this,i=e.relatedTarget;i&&(i===t||t.contains(i))||s(e,n)}):"$destroy"!==n&&di(t,n,s),u=a[n]),u.push(i)}}},off:$e,one:function(e,t,n){e=Hn(e),e.on(t,function i(){e.off(t,n),e.off(t,i)}),e.on(t,n)},replaceWith:function(e,t){var n,i=e.parentNode;ve(e),o(new ge(t),function(t){n?i.insertBefore(t,n.nextSibling):i.replaceChild(t,e),n=t})},children:function(e){var t=[];return o(e.childNodes,function(e){e.nodeType===ii&&t.push(e)}),t},contents:function(e){return e.contentDocument||e.childNodes||[]},append:function(e,t){var n=e.nodeType;if(n===ii||n===si){t=new ge(t);for(var i=0,r=t.length;i<r;i++){var o=t[i];e.appendChild(o)}}},prepend:function(e,t){if(e.nodeType===ii){var n=e.firstChild;o(new ge(t),function(t){e.insertBefore(t,n)})}},wrap:function(e,t){t=Hn(t).eq(0).clone()[0];var n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)},remove:Ae,detach:function(e){Ae(e,!0)},after:function(e,t){var n=e,i=e.parentNode;t=new ge(t);for(var r=0,o=t.length;r<o;r++){var a=t[r];i.insertBefore(a,n.nextSibling),n=a}},addClass:ke,removeClass:Ce,toggleClass:function(e,t,n){t&&o(t.split(" "),function(t){var i=n;v(i)&&(i=!xe(e,t)),(i?ke:Ce)(e,t)})},parent:function(e){var t=e.parentNode;return t&&t.nodeType!==si?t:null},next:function(e){return e.nextElementSibling},find:function(e,t){return e.getElementsByTagName?e.getElementsByTagName(t):[]},clone:me,triggerHandler:function(e,t,n){var i,r,a,s=t.type||t,l=be(e),c=l&&l.events,u=c&&c[s];u&&(i={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:h,type:s,target:e},t.type&&(i=d(i,t)),r=F(u),a=n?[i].concat(n):[i],o(r,function(t){i.isImmediatePropagationStopped()||t.apply(e,a)}))}},function(e,t){ge.prototype[t]=function(t,n,i){for(var r,o=0,a=this.length;o<a;o++)v(r)?(r=e(this[o],t,n,i),$(r)&&(r=Hn(r))):Se(r,e(this[o],t,n,i));return $(r)?r:this},ge.prototype.bind=ge.prototype.on,ge.prototype.unbind=ge.prototype.off}),je.prototype={put:function(e,t){this[Ne(e,this.nextUid)]=t},get:function(e){return this[Ne(e,this.nextUid)]},remove:function(e){var t=this[e=Ne(e,this.nextUid)];return delete this[e],t}};var Ei=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,Ti=/,/,Di=/^\s*(_?)(\S+?)\1\s*$/,Ai=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Mi=i("$injector");Re.$$annotate=Le;var Oi=i("$animate"),Ii=["$provide",function(e){this.$$selectors={},this.register=function(t,n){var i=t+"-animation";if(t&&"."!=t.charAt(0))throw Oi("notcsel","Expecting class selector starting with '.' got '{0}'.",t);this.$$selectors[t.substr(1)]=i,e.factory(i,n)},this.classNameFilter=function(e){return 1===arguments.length&&(this.$$classNameFilter=e instanceof RegExp?e:null),this.$$classNameFilter},this.$get=["$$q","$$asyncCallback","$rootScope",function(e,t,n){function i(t){var i,r=e.defer();return r.promise.$$cancelFn=function(){i&&i()},n.$$postDigest(function(){i=t(function(){r.resolve()})}),r.promise}function r(e,t){var n=[],i=[],r=se();return o((e.attr("class")||"").split(/\s+/),function(e){r[e]=!0}),o(t,function(e,t){var o=r[t];!1===e&&o?i.push(t):!0!==e||o||n.push(t)}),n.length+i.length>0&&[n.length?n:null,i.length?i:null]}function a(e,t,n){for(var i=0,r=t.length;i<r;++i){e[t[i]]=n}}function s(){return c||(c=e.defer(),t(function(){c.resolve(),c=null})),c.promise}function l(e,t){if(Kn.isObject(t)){var n=d(t.from||{},t.to||{});e.css(n)}}var c;return{animate:function(e,t,n){return l(e,{from:t,to:n}),s()},enter:function(e,t,n,i){return l(e,i),n?n.after(e):t.prepend(e),s()},leave:function(e,t){return e.remove(),s()},move:function(e,t,n,i){return this.enter(e,t,n,i)},addClass:function(e,t,n){return this.setClass(e,t,[],n)},$$addClassImmediately:function(e,t,n){return e=Hn(e),t=b(t)?t:Zn(t)?t.join(" "):"",o(e,function(e){ke(e,t)}),l(e,n),s()},removeClass:function(e,t,n){return this.setClass(e,[],t,n)},$$removeClassImmediately:function(e,t,n){return e=Hn(e),t=b(t)?t:Zn(t)?t.join(" "):"",o(e,function(e){Ce(e,t)}),l(e,n),s()},setClass:function(e,t,n,o){var s=this,l=!1;e=Hn(e);var c=e.data("$$animateClasses");c?o&&c.options&&(c.options=Kn.extend(c.options||{},o)):(c={classes:{},options:o},l=!0);var u=c.classes;return t=Zn(t)?t:t.split(" "),n=Zn(n)?n:n.split(" "),a(u,t,!0),a(u,n,!1),l&&(c.promise=i(function(t){var n=e.data("$$animateClasses");if(e.removeData("$$animateClasses"),n){var i=r(e,n.classes);i&&s.$$setClassImmediately(e,i[0],i[1],n.options)}t()}),
+e.data("$$animateClasses",c)),c.promise},$$setClassImmediately:function(e,t,n,i){return t&&this.$$addClassImmediately(e,t),n&&this.$$removeClassImmediately(e,n),l(e,i),s()},enabled:h,cancel:h}}]}],Pi=i("$compile");We.$inject=["$provide","$$sanitizeUriProvider"];var Ni=/^(x[\:\-_]|data[\:\-_])/i,ji=i("$interpolate"),Fi=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,Li={http:80,https:443,ftp:21},Ri=i("$location"),Vi={$$html5:!1,$$replace:!1,absUrl:yt("$$absUrl"),url:function(e){if(v(e))return this.$$url;var t=Fi.exec(e);return t[1]&&this.path(decodeURIComponent(t[1])),(t[2]||t[1])&&this.search(t[3]||""),this.hash(t[5]||""),this},protocol:yt("$$protocol"),host:yt("$$host"),port:yt("$$port"),path:bt("$$path",function(e){return e=null!==e?e.toString():"","/"==e.charAt(0)?e:"/"+e}),search:function(e,t){switch(arguments.length){case 0:return this.$$search;case 1:if(b(e)||w(e))e=e.toString(),this.$$search=z(e);else{if(!y(e))throw Ri("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");e=j(e,{}),o(e,function(t,n){null==t&&delete e[n]}),this.$$search=e}break;default:v(t)||null===t?delete this.$$search[e]:this.$$search[e]=t}return this.$$compose(),this},hash:bt("$$hash",function(e){return null!==e?e.toString():""}),replace:function(){return this.$$replace=!0,this}};o([$t,vt,mt],function(e){e.prototype=Object.create(Vi),e.prototype.state=function(t){if(!arguments.length)return this.$$state;if(e!==mt||!this.$$html5)throw Ri("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=v(t)?null:t,this}});var Hi=i("$parse"),qi=Function.prototype.call,Ui=Function.prototype.apply,_i=Function.prototype.bind,Bi=se();o({null:function(){return null},true:function(){return!0},false:function(){return!1},undefined:function(){}},function(e,t){e.constant=e.literal=e.sharedGetter=!0,Bi[t]=e}),Bi.this=function(e){return e},Bi.this.sharedGetter=!0;var Wi=d(se(),{"+":function(e,t,i,r){return i=i(e,t),r=r(e,t),$(i)?$(r)?i+r:i:$(r)?r:n},"-":function(e,t,n,i){return n=n(e,t),i=i(e,t),($(n)?n:0)-($(i)?i:0)},"*":function(e,t,n,i){return n(e,t)*i(e,t)},"/":function(e,t,n,i){return n(e,t)/i(e,t)},"%":function(e,t,n,i){return n(e,t)%i(e,t)},"===":function(e,t,n,i){return n(e,t)===i(e,t)},"!==":function(e,t,n,i){return n(e,t)!==i(e,t)},"==":function(e,t,n,i){return n(e,t)==i(e,t)},"!=":function(e,t,n,i){return n(e,t)!=i(e,t)},"<":function(e,t,n,i){return n(e,t)<i(e,t)},">":function(e,t,n,i){return n(e,t)>i(e,t)},"<=":function(e,t,n,i){return n(e,t)<=i(e,t)},">=":function(e,t,n,i){return n(e,t)>=i(e,t)},"&&":function(e,t,n,i){return n(e,t)&&i(e,t)},"||":function(e,t,n,i){return n(e,t)||i(e,t)},"!":function(e,t,n){return!n(e,t)},"=":!0,"|":!0}),zi={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Yi=function(e){this.options=e};Yi.prototype={constructor:Yi,lex:function(e){for(this.text=e,this.index=0,this.ch=n,this.tokens=[];this.index<this.text.length;)if(this.ch=this.text.charAt(this.index),this.is("\"'"))this.readString(this.ch);else if(this.isNumber(this.ch)||this.is(".")&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(this.ch))this.readIdent();else if(this.is("(){}[].,;:?"))this.tokens.push({index:this.index,text:this.ch}),this.index++;else if(this.isWhitespace(this.ch))this.index++;else{var t=this.ch+this.peek(),i=t+this.peek(2),r=Wi[this.ch],o=Wi[t],a=Wi[i];a?(this.tokens.push({index:this.index,text:i,fn:a}),this.index+=3):o?(this.tokens.push({index:this.index,text:t,fn:o}),this.index+=2):r?(this.tokens.push({index:this.index,text:this.ch,fn:r}),this.index+=1):this.throwError("Unexpected next character ",this.index,this.index+1)}return this.tokens},is:function(e){return-1!==e.indexOf(this.ch)},peek:function(e){var t=e||1;return this.index+t<this.text.length&&this.text.charAt(this.index+t)},isNumber:function(e){return"0"<=e&&e<="9"},isWhitespace:function(e){return" "===e||"\r"===e||"\t"===e||"\n"===e||"\v"===e||" "===e},isIdent:function(e){return"a"<=e&&e<="z"||"A"<=e&&e<="Z"||"_"===e||"$"===e},isExpOperator:function(e){return"-"===e||"+"===e||this.isNumber(e)},throwError:function(e,t,n){n=n||this.index;var i=$(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,n)+"]":" "+n;throw Hi("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",e,i,this.text)},readNumber:function(){for(var e="",t=this.index;this.index<this.text.length;){var n=Nn(this.text.charAt(this.index));if("."==n||this.isNumber(n))e+=n;else{var i=this.peek();if("e"==n&&this.isExpOperator(i))e+=n;else if(this.isExpOperator(n)&&i&&this.isNumber(i)&&"e"==e.charAt(e.length-1))e+=n;else{if(!this.isExpOperator(n)||i&&this.isNumber(i)||"e"!=e.charAt(e.length-1))break;this.throwError("Invalid exponent")}}this.index++}e*=1,this.tokens.push({index:t,text:e,constant:!0,fn:function(){return e}})},readIdent:function(){for(var e,t,i,r,o=this.text,a="",s=this.index;this.index<this.text.length&&("."===(r=this.text.charAt(this.index))||this.isIdent(r)||this.isNumber(r));)"."===r&&(e=this.index),a+=r,this.index++;if(e&&"."===a[a.length-1]&&(this.index--,a=a.slice(0,-1),-1===(e=a.lastIndexOf("."))&&(e=n)),e)for(t=this.index;t<this.text.length;){if("("===(r=this.text.charAt(t))){i=a.substr(e-s+1),a=a.substr(0,e-s),this.index=t;break}if(!this.isWhitespace(r))break;t++}this.tokens.push({index:s,text:a,fn:Bi[a]||At(a,this.options,o)}),i&&(this.tokens.push({index:e,text:"."}),this.tokens.push({index:e+1,text:i}))},readString:function(e){var t=this.index;this.index++;for(var n="",i=e,r=!1;this.index<this.text.length;){var o=this.text.charAt(this.index);if(i+=o,r){if("u"===o){var a=this.text.substring(this.index+1,this.index+5);a.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+a+"]"),this.index+=4,n+=String.fromCharCode(parseInt(a,16))}else{n+=zi[o]||o}r=!1}else if("\\"===o)r=!0;else{if(o===e)return this.index++,void this.tokens.push({index:t,text:i,string:n,constant:!0,fn:function(){return n}});n+=o}this.index++}this.throwError("Unterminated quote",t)}};var Ki=function(e,t,n){this.lexer=e,this.$filter=t,this.options=n};Ki.ZERO=d(function(){return 0},{sharedGetter:!0,constant:!0}),Ki.prototype={constructor:Ki,parse:function(e){this.text=e,this.tokens=this.lexer.lex(e);var t=this.statements();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),t.literal=!!t.literal,t.constant=!!t.constant,t},primary:function(){var e;if(this.expect("("))e=this.filterChain(),this.consume(")");else if(this.expect("["))e=this.arrayDeclaration();else if(this.expect("{"))e=this.object();else{var t=this.expect();e=t.fn,e||this.throwError("not a primary expression",t),t.constant&&(e.constant=!0,e.literal=!0)}for(var n,i;n=this.expect("(","[",".");)"("===n.text?(e=this.functionCall(e,i),i=null):"["===n.text?(i=e,e=this.objectIndex(e)):"."===n.text?(i=e,e=this.fieldAccess(e)):this.throwError("IMPOSSIBLE");return e},throwError:function(e,t){throw Hi("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",t.text,e,t.index+1,this.text,this.text.substring(t.index))},peekToken:function(){if(0===this.tokens.length)throw Hi("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(e,t,n,i){if(this.tokens.length>0){var r=this.tokens[0],o=r.text;if(o===e||o===t||o===n||o===i||!e&&!t&&!n&&!i)return r}return!1},expect:function(e,t,n,i){var r=this.peek(e,t,n,i);return!!r&&(this.tokens.shift(),r)},consume:function(e){this.expect(e)||this.throwError("is unexpected, expecting ["+e+"]",this.peek())},unaryFn:function(e,t){return d(function(n,i){return e(n,i,t)},{constant:t.constant,inputs:[t]})},binaryFn:function(e,t,n,i){return d(function(i,r){return t(i,r,e,n)},{constant:e.constant&&n.constant,inputs:!i&&[e,n]})},statements:function(){for(var e=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&e.push(this.filterChain()),!this.expect(";"))return 1===e.length?e[0]:function(t,n){for(var i,r=0,o=e.length;r<o;r++)i=e[r](t,n);return i}},filterChain:function(){for(var e=this.expression();this.expect("|");)e=this.filter(e);return e},filter:function(e){var t,i,r=this.expect(),o=this.$filter(r.text);if(this.peek(":"))for(t=[],i=[];this.expect(":");)t.push(this.expression());var a=[e].concat(t||[]);return d(function(r,a){var s=e(r,a);if(i){i[0]=s;for(var l=t.length;l--;)i[l+1]=t[l](r,a);return o.apply(n,i)}return o(s)},{constant:!o.$stateful&&a.every(Et),inputs:!o.$stateful&&a})},expression:function(){return this.assignment()},assignment:function(){var e,t,n=this.ternary();return(t=this.expect("="))?(n.assign||this.throwError("implies assignment but ["+this.text.substring(0,t.index)+"] can not be assigned to",t),e=this.ternary(),d(function(t,i){return n.assign(t,e(t,i),i)},{inputs:[n,e]})):n},ternary:function(){var e,t,n=this.logicalOR();if(t=this.expect("?")){if(e=this.assignment(),t=this.expect(":")){var i=this.assignment();return d(function(t,r){return n(t,r)?e(t,r):i(t,r)},{constant:n.constant&&e.constant&&i.constant})}this.throwError("expected :",t)}return n},logicalOR:function(){for(var e,t=this.logicalAND();e=this.expect("||");)t=this.binaryFn(t,e.fn,this.logicalAND(),!0);return t},logicalAND:function(){var e,t=this.equality();return(e=this.expect("&&"))&&(t=this.binaryFn(t,e.fn,this.logicalAND(),!0)),t},equality:function(){var e,t=this.relational();return(e=this.expect("==","!=","===","!=="))&&(t=this.binaryFn(t,e.fn,this.equality())),t},relational:function(){var e,t=this.additive();return(e=this.expect("<",">","<=",">="))&&(t=this.binaryFn(t,e.fn,this.relational())),t},additive:function(){for(var e,t=this.multiplicative();e=this.expect("+","-");)t=this.binaryFn(t,e.fn,this.multiplicative());return t},multiplicative:function(){for(var e,t=this.unary();e=this.expect("*","/","%");)t=this.binaryFn(t,e.fn,this.unary());return t},unary:function(){var e;return this.expect("+")?this.primary():(e=this.expect("-"))?this.binaryFn(Ki.ZERO,e.fn,this.unary()):(e=this.expect("!"))?this.unaryFn(e.fn,this.unary()):this.primary()},fieldAccess:function(e){var t=this.text,n=this.expect().text,i=At(n,this.options,t);return d(function(t,n,r){return i(r||e(t,n))},{assign:function(i,r,o){var a=e(i,o);return a||e.assign(i,a={}),Tt(a,n,r,t)}})},objectIndex:function(e){var t=this.text,i=this.expression();return this.consume("]"),d(function(r,o){var a=e(r,o),s=i(r,o);return Ct(s,t),a?kt(a[s],t):n},{assign:function(n,r,o){var a=Ct(i(n,o),t),s=kt(e(n,o),t);return s||e.assign(n,s={}),s[a]=r}})},functionCall:function(e,t){var n=[];if(")"!==this.peekToken().text)do{n.push(this.expression())}while(this.expect(","));this.consume(")");var i=this.text,r=n.length?[]:null;return function(o,a){var s=t?t(o,a):o,l=e(o,a,s)||h;if(r)for(var c=n.length;c--;)r[c]=kt(n[c](o,a),i);return kt(s,i),St(l,i),kt(l.apply?l.apply(s,r):l(r[0],r[1],r[2],r[3],r[4]),i)}},arrayDeclaration:function(){var e=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;var t=this.expression();e.push(t)}while(this.expect(","));return this.consume("]"),d(function(t,n){for(var i=[],r=0,o=e.length;r<o;r++)i.push(e[r](t,n));return i},{literal:!0,constant:e.every(Et),inputs:e})},object:function(){var e=[],t=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;var n=this.expect();e.push(n.string||n.text),this.consume(":");var i=this.expression();t.push(i)}while(this.expect(","));return this.consume("}"),d(function(n,i){for(var r={},o=0,a=t.length;o<a;o++)r[e[o]]=t[o](n,i);return r},{literal:!0,constant:t.every(Et),inputs:t})}};var Gi=se(),Xi=i("$sce"),Zi={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Pi=i("$compile"),Ji=t.createElement("a"),Qi=zt(e.location.href,!0);Gt.$inject=["$provide"],Zt.$inject=["$locale"],Jt.$inject=["$locale"];var er=".",tr={yyyy:tn("FullYear",4),yy:tn("FullYear",2,0,!0),y:tn("FullYear",1),MMMM:nn("Month"),MMM:nn("Month",!0),MM:tn("Month",2,1),M:tn("Month",1,1),dd:tn("Date",2),d:tn("Date",1),HH:tn("Hours",2),H:tn("Hours",1),hh:tn("Hours",2,-12),h:tn("Hours",1,-12),mm:tn("Minutes",2),m:tn("Minutes",1),ss:tn("Seconds",2),s:tn("Seconds",1),sss:tn("Milliseconds",3),EEEE:nn("Day"),EEE:nn("Day",!0),a:ln,Z:rn,ww:sn(2),w:sn(1)},nr=/((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|w+))(.*)/,ir=/^\-?\d+$/;cn.$inject=["$locale"];var rr=m(Nn),or=m(Fn);fn.$inject=["$parse"];var ar=m({restrict:"E",compile:function(e,t){if(!t.href&&!t.xlinkHref&&!t.name)return function(e,t){var n="[object SVGAnimatedString]"===zn.call(t.prop("href"))?"xlink:href":"href";t.on("click",function(e){t.attr(n)||e.preventDefault()})}}}),sr={};o(Ci,function(e,t){if("multiple"!=e){var n=ze("ng-"+t);sr[n]=function(){return{restrict:"A",priority:100,link:function(e,i,r){e.$watch(r[n],function(e){r.$set(t,!!e)})}}}}}),o(Si,function(e,t){sr[t]=function(){return{priority:100,link:function(e,n,i){if("ngPattern"===t&&"/"==i.ngPattern.charAt(0)){var r=i.ngPattern.match(In);if(r)return void i.$set("ngPattern",new RegExp(r[1],r[2]))}e.$watch(i[t],function(e){i.$set(t,e)})}}}}),o(["src","srcset","href"],function(e){var t=ze("ng-"+e);sr[t]=function(){return{priority:99,link:function(n,i,r){var o=e,a=e;"href"===e&&"[object SVGAnimatedString]"===zn.call(i.prop("href"))&&(a="xlinkHref",r.$attr[a]="xlink:href",o=null),r.$observe(t,function(t){if(!t)return void("href"===e&&r.$set(a,null));r.$set(a,t),Vn&&o&&i.prop(o,r[a])})}}}});var lr={$addControl:h,$$renameControl:hn,$removeControl:h,$setValidity:h,$setDirty:h,$setPristine:h,$setSubmitted:h},cr="ng-submitted";gn.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var ur=function(e){return["$timeout",function(t){return{name:"form",restrict:e?"EAC":"E",controller:gn,compile:function(e){return e.addClass(Dr).addClass(Er),{pre:function(e,i,r,o){if(!("action"in r)){var a=function(t){e.$apply(function(){o.$commitViewValue(),o.$setSubmitted()}),t.preventDefault?t.preventDefault():t.returnValue=!1};di(i[0],"submit",a),i.on("$destroy",function(){t(function(){fi(i[0],"submit",a)},0,!1)})}var s=o.$$parentForm,l=o.$name;l&&(Tt(e,l,o,l),r.$observe(r.name?"name":"ngForm",function(t){l!==t&&(Tt(e,l,n,l),l=t,Tt(e,l,o,l),s.$$renameControl(o,l))})),i.on("$destroy",function(){s.$removeControl(o),l&&Tt(e,l,n,l),d(o,lr)})}}}}}]},dr=ur(),fr=ur(!0),pr=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,hr=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,gr=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,mr=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,vr=/^(\d{4})-(\d{2})-(\d{2})$/,$r=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,yr=/^(\d{4})-W(\d\d)$/,br=/^(\d{4})-(\d\d)$/,wr=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,xr=/(\s+|^)default(\s+|$)/,Cr=new i("ngModel"),kr={text:vn,date:wn("date",vr,bn(vr,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":wn("datetimelocal",$r,bn($r,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:wn("time",wr,bn(wr,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:wn("week",yr,yn,"yyyy-Www"),month:wn("month",br,bn(br,["yyyy","MM"]),"yyyy-MM"),number:Cn,url:kn,email:Sn,radio:En,checkbox:Dn,hidden:h,button:h,submit:h,reset:h,file:h},Sr=["$browser","$sniffer","$filter","$parse",function(e,t,n,i){return{restrict:"E",require:["?ngModel"],link:{pre:function(r,o,a,s){s[0]&&(kr[Nn(a.type)]||kr.text)(r,o,a,s[0],t,e,n,i)}}}}],Er="ng-valid",Tr="ng-invalid",Dr="ng-pristine",Ar="ng-dirty",Mr="ng-pending",Or=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(e,t,i,r,a,s,l,c,u,d){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=n,this.$name=d(i.name||"",!1)(e);var f=a(i.ngModel),p=null,g=this,m=function(){var t=f(e);return g.$options&&g.$options.getterSetter&&C(t)&&(t=t()),t},y=function(t){var n;g.$options&&g.$options.getterSetter&&C(n=f(e))?n(g.$modelValue):f.assign(e,g.$modelValue)};this.$$setOptions=function(e){if(g.$options=e,!(f.assign||e&&e.getterSetter))throw Cr("nonassign","Expression '{0}' is non-assignable. Element: {1}",i.ngModel,B(r))},this.$render=h,this.$isEmpty=function(e){return v(e)||""===e||null===e||e!==e};var b=r.inheritedData("$formController")||lr,x=0;An({ctrl:this,$element:r,set:function(e,t){e[t]=!0},unset:function(e,t){delete e[t]},parentForm:b,$animate:s}),this.$setPristine=function(){g.$dirty=!1,g.$pristine=!0,s.removeClass(r,Ar),s.addClass(r,Dr)},this.$setUntouched=function(){g.$touched=!1,g.$untouched=!0,s.setClass(r,"ng-untouched","ng-touched")},this.$setTouched=function(){g.$touched=!0,g.$untouched=!1,s.setClass(r,"ng-touched","ng-untouched")},this.$rollbackViewValue=function(){l.cancel(p),g.$viewValue=g.$$lastCommittedViewValue,g.$render()},this.$validate=function(){w(g.$modelValue)&&isNaN(g.$modelValue)||this.$$parseAndValidate()},this.$$runValidators=function(e,t,i,r){function a(e,t){l===x&&g.$setValidity(e,t)}function s(e){l===x&&r(e)}x++;var l=x;return function(e){var t=g.$$parserName||"parse";if(e===n)a(t,null);else if(a(t,e),!e)return o(g.$validators,function(e,t){a(t,null)}),o(g.$asyncValidators,function(e,t){a(t,null)}),!1;return!0}(e)&&function(){var e=!0;return o(g.$validators,function(n,r){var o=n(t,i);e=e&&o,a(r,o)}),!!e||(o(g.$asyncValidators,function(e,t){a(t,null)}),!1)}()?void function(){var e=[],r=!0;o(g.$asyncValidators,function(o,s){var l=o(t,i);if(!M(l))throw Cr("$asyncValidators","Expected asynchronous validator to return a promise but got '{0}' instead.",l);a(s,n),e.push(l.then(function(){a(s,!0)},function(e){r=!1,a(s,!1)}))}),e.length?u.all(e).then(function(){s(r)},h):s(!0)}():void s(!1)},this.$commitViewValue=function(){var e=g.$viewValue;l.cancel(p),(g.$$lastCommittedViewValue!==e||""===e&&g.$$hasNativeValidators)&&(g.$$lastCommittedViewValue=e,g.$pristine&&(g.$dirty=!0,g.$pristine=!1,s.removeClass(r,Dr),s.addClass(r,Ar),b.$setDirty()),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function e(){g.$modelValue!==a&&g.$$writeModelToScope()}var t=g.$$lastCommittedViewValue,i=t,r=!v(i)||n;if(r)for(var o=0;o<g.$parsers.length;o++)if(i=g.$parsers[o](i),v(i)){r=!1;break}w(g.$modelValue)&&isNaN(g.$modelValue)&&(g.$modelValue=m());var a=g.$modelValue,s=g.$options&&g.$options.allowInvalid;s&&(g.$modelValue=i,e()),g.$$runValidators(r,i,t,function(t){s||(g.$modelValue=t?i:n,e())})},this.$$writeModelToScope=function(){y(g.$modelValue),o(g.$viewChangeListeners,function(e){try{e()}catch(e){t(e)}})},this.$setViewValue=function(e,t){g.$viewValue=e,g.$options&&!g.$options.updateOnDefault||g.$$debounceViewValueCommit(t)},this.$$debounceViewValueCommit=function(t){var n,i=0,r=g.$options;r&&$(r.debounce)&&(n=r.debounce,w(n)?i=n:w(n[t])?i=n[t]:w(n.default)&&(i=n.default)),l.cancel(p),i?p=l(function(){g.$commitViewValue()},i):c.$$phase?g.$commitViewValue():e.$apply(function(){g.$commitViewValue()})},e.$watch(function(){var e=m();if(e!==g.$modelValue){g.$modelValue=e;for(var t=g.$formatters,i=t.length,r=e;i--;)r=t[i](r);g.$viewValue!==r&&(g.$viewValue=g.$$lastCommittedViewValue=r,g.$render(),g.$$runValidators(n,e,r,h))}return e})}],Ir=function(){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:Or,priority:1,compile:function(e){return e.addClass(Dr).addClass("ng-untouched").addClass(Er),{pre:function(e,t,n,i){var r=i[0],o=i[1]||lr;r.$$setOptions(i[2]&&i[2].$options),o.$addControl(r),n.$observe("name",function(e){r.$name!==e&&o.$$renameControl(r,e)}),e.$on("$destroy",function(){o.$removeControl(r)})},post:function(e,t,n,i){var r=i[0];r.$options&&r.$options.updateOn&&t.on(r.$options.updateOn,function(e){r.$$debounceViewValueCommit(e&&e.type)}),t.on("blur",function(t){r.$touched||e.$apply(function(){r.$setTouched()})})}}}}},Pr=m({restrict:"A",require:"ngModel",link:function(e,t,n,i){i.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),Nr=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,i){i&&(n.required=!0,i.$validators.required=function(e){return!n.required||!i.$isEmpty(e)},n.$observe("required",function(){i.$validate()}))}}},jr=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,r,o){if(o){var a,s=r.ngPattern||r.pattern;r.$observe("pattern",function(e){if(b(e)&&e.length>0&&(e=new RegExp(e)),e&&!e.test)throw i("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",s,e,B(t));a=e||n,o.$validate()}),o.$validators.pattern=function(e){return o.$isEmpty(e)||v(a)||a.test(e)}}}}},Fr=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,i){if(i){var r=0;n.$observe("maxlength",function(e){r=f(e)||0,i.$validate()}),i.$validators.maxlength=function(e,t){return i.$isEmpty(e)||t.length<=r}}}}},Lr=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,i){if(i){var r=0;n.$observe("minlength",function(e){r=f(e)||0,i.$validate()}),i.$validators.minlength=function(e,t){return i.$isEmpty(e)||t.length>=r}}}}},Rr=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(e,t,i,r){var a=t.attr(i.$attr.ngList)||", ",s="false"!==i.ngTrim,l=s?Jn(a):a,c=function(e){if(!v(e)){var t=[];return e&&o(e.split(l),function(e){e&&t.push(s?Jn(e):e)}),t}};r.$parsers.push(c),r.$formatters.push(function(e){return Zn(e)?e.join(a):n}),r.$isEmpty=function(e){return!e||!e.length}}}},Vr=/^(true|false|\d+)$/,Hr=function(){return{restrict:"A",priority:100,compile:function(e,t){return Vr.test(t.ngValue)?function(e,t,n){n.$set("value",e.$eval(n.ngValue))}:function(e,t,n){e.$watch(n.ngValue,function(e){n.$set("value",e)})}}}},qr=function(){return{restrict:"A",controller:["$scope","$attrs",function(e,t){var i=this;this.$options=e.$eval(t.ngModelOptions),this.$options.updateOn!==n?(this.$options.updateOnDefault=!1,this.$options.updateOn=Jn(this.$options.updateOn.replace(xr,function(){return i.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},Ur=["$compile",function(e){return{restrict:"AC",compile:function(t){return e.$$addBindingClass(t),function(t,i,r){e.$$addBindingInfo(i,r.ngBind),i=i[0],t.$watch(r.ngBind,function(e){i.textContent=e===n?"":e})}}}}],_r=["$interpolate","$compile",function(e,t){return{compile:function(i){return t.$$addBindingClass(i),function(i,r,o){var a=e(r.attr(o.$attr.ngBindTemplate));t.$$addBindingInfo(r,a.expressions),r=r[0],o.$observe("ngBindTemplate",function(e){r.textContent=e===n?"":e})}}}}],Br=["$sce","$parse","$compile",function(e,t,n){return{restrict:"A",compile:function(i,r){var o=t(r.ngBindHtml),a=t(r.ngBindHtml,function(e){return(e||"").toString()});return n.$$addBindingClass(i),function(t,i,r){n.$$addBindingInfo(i,r.ngBindHtml),t.$watch(a,function(){i.html(e.getTrustedHtml(o(t))||"")})}}}}],Wr=On("",!0),zr=On("Odd",0),Yr=On("Even",1),Kr=pn({compile:function(e,t){t.$set("ngCloak",n),e.removeClass("ng-cloak")}}),Gr=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Xr={},Zr={blur:!0,focus:!0};o("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(e){var t=ze("ng-"+e);Xr[t]=["$parse","$rootScope",function(n,i){return{restrict:"A",compile:function(r,o){var a=n(o[t]);return function(t,n){n.on(e,function(n){var r=function(){a(t,{$event:n})};Zr[e]&&i.$$phase?t.$evalAsync(r):t.$apply(r)})}}}}]});var Jr=["$animate",function(e){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,i,r,o,a){var s,l,c;n.$watch(r.ngIf,function(n){n?l||a(function(n,o){l=o,n[n.length++]=t.createComment(" end ngIf: "+r.ngIf+" "),s={clone:n},e.enter(n,i.parent(),i)}):(c&&(c.remove(),c=null),l&&(l.$destroy(),l=null),s&&(c=ae(s.clone),e.leave(c).then(function(){c=null}),s=null))})}}}],Qr=["$templateRequest","$anchorScroll","$animate","$sce",function(e,t,n,i){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Kn.noop,compile:function(r,o){var a=o.ngInclude||o.src,s=o.onload||"",l=o.autoscroll;return function(r,o,c,u,d){var f,p,h,g=0,m=function(){p&&(p.remove(),p=null),f&&(f.$destroy(),f=null),h&&(n.leave(h).then(function(){p=null}),p=h,h=null)};r.$watch(i.parseAsResourceUrl(a),function(i){var a=function(){!$(l)||l&&!r.$eval(l)||t()},c=++g;i?(e(i,!0).then(function(e){if(c===g){var t=r.$new();u.template=e;var l=d(t,function(e){m(),n.enter(e,null,o).then(a)});f=t,h=l,f.$emit("$includeContentLoaded",i),r.$eval(s)}},function(){c===g&&(m(),r.$emit("$includeContentError",i))}),r.$emit("$includeContentRequested",i)):(m(),u.template=null)})}}}}],eo=["$compile",function(e){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(i,r,o,a){if(/SVG/.test(r[0].toString()))return r.empty(),void e(pe(a.template,t).childNodes)(i,function(e){r.append(e)},n,n,r);r.html(a.template),e(r.contents())(i)}}}],to=pn({priority:450,compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),no=pn({terminal:!0,priority:1e3}),io=["$locale","$interpolate",function(e,t){var n=/{}/g;return{restrict:"EA",link:function(i,r,a){var s=a.count,l=a.$attr.when&&r.attr(a.$attr.when),c=a.offset||0,u=i.$eval(l)||{},d={},f=t.startSymbol(),p=t.endSymbol(),h=/^when(Minus)?(.+)$/;o(a,function(e,t){h.test(t)&&(u[Nn(t.replace("when","").replace("Minus","-"))]=r.attr(a.$attr[t]))}),o(u,function(e,i){d[i]=t(e.replace(n,f+s+"-"+c+p))}),i.$watch(function(){var t=parseFloat(i.$eval(s));return isNaN(t)?"":(t in u||(t=e.pluralCat(t-c)),d[t](i))},function(e){r.text(e)})}}}],ro=["$parse","$animate",function(e,a){var s=i("ngRepeat"),l=function(e,t,n,i,r,o,a){e[n]=i,r&&(e[r]=o),e.$index=t,e.$first=0===t,e.$last=t===a-1,e.$middle=!(e.$first||e.$last),e.$odd=!(e.$even=0==(1&t))},c=function(e){return e.clone[0]},u=function(e){return e.clone[e.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(i,d){var f=d.ngRepeat,p=t.createComment(" end ngRepeat: "+f+" "),h=f.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!h)throw s("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",f);var g=h[1],m=h[2],v=h[3],$=h[4];if(!(h=g.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/)))throw s("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",g);var y=h[3]||h[1],b=h[2];if(v&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(v)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent)$/.test(v)))throw s("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",v);var w,x,C,k,S={$id:Ne};return $?w=e($):(C=function(e,t){return Ne(t)},k=function(e){return e}),function(e,t,i,d,h){w&&(x=function(t,n,i){return b&&(S[b]=t),S[y]=n,S.$index=i,w(e,S)});var g=se();e.$watchCollection(m,function(i){var d,m,$,w,S,E,T,D,A,M,O,I,P=t[0],N=se();if(v&&(e[v]=i),r(i))A=i,D=x||C;else{D=x||k,A=[];for(var j in i)i.hasOwnProperty(j)&&"$"!=j.charAt(0)&&A.push(j);A.sort()}for(w=A.length,O=new Array(w),d=0;d<w;d++)if(S=i===A?d:A[d],E=i[S],T=D(S,E,d),g[T])M=g[T],delete g[T],N[T]=M,O[d]=M;else{if(N[T])throw o(O,function(e){e&&e.scope&&(g[e.id]=e)}),s("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",f,T,U(E));O[d]={id:T,scope:n,clone:n},N[T]=!0}for(var F in g){if(M=g[F],I=ae(M.clone),a.leave(I),I[0].parentNode)for(d=0,m=I.length;d<m;d++)I[d].$$NG_REMOVED=!0;M.scope.$destroy()}for(d=0;d<w;d++)if(S=i===A?d:A[d],E=i[S],M=O[d],M.scope){$=P;do{$=$.nextSibling}while($&&$.$$NG_REMOVED);c(M)!=$&&a.move(ae(M.clone),null,Hn(P)),P=u(M),l(M.scope,d,y,E,b,S,w)}else h(function(e,t){M.scope=t;var n=p.cloneNode(!1);e[e.length++]=n,a.enter(e,null,Hn(P)),P=n,M.clone=e,N[M.id]=M,l(M.scope,d,y,E,b,S,w)});g=N})}}}}],oo=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,i){t.$watch(i.ngShow,function(t){e[t?"removeClass":"addClass"](n,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],ao=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,i){t.$watch(i.ngHide,function(t){e[t?"addClass":"removeClass"](n,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],so=pn(function(e,t,n){e.$watch(n.ngStyle,function(e,n){n&&e!==n&&o(n,function(e,n){t.css(n,"")}),e&&t.css(e)},!0)}),lo=["$animate",function(e){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(n,i,r,a){var s=r.ngSwitch||r.on,l=[],c=[],u=[],d=[],f=function(e,t){return function(){e.splice(t,1)}};n.$watch(s,function(n){var i,r;for(i=0,r=u.length;i<r;++i)e.cancel(u[i]);for(u.length=0,i=0,r=d.length;i<r;++i){var s=ae(c[i].clone);d[i].$destroy();(u[i]=e.leave(s)).then(f(u,i))}c.length=0,d.length=0,(l=a.cases["!"+n]||a.cases["?"])&&o(l,function(n){n.transclude(function(i,r){d.push(r);var o=n.element;i[i.length++]=t.createComment(" end ngSwitchWhen: ");var a={clone:i};c.push(a),e.enter(i,o.parent(),o)})})})}}}],co=pn({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,i,r){i.cases["!"+n.ngSwitchWhen]=i.cases["!"+n.ngSwitchWhen]||[],i.cases["!"+n.ngSwitchWhen].push({transclude:r,element:t})}}),uo=pn({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,i,r){i.cases["?"]=i.cases["?"]||[],i.cases["?"].push({transclude:r,element:t})}}),fo=pn({restrict:"EAC",link:function(e,t,n,r,o){if(!o)throw i("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",B(t));o(function(e){t.empty(),t.append(e)})}}),po=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){if("text/ng-template"==n.type){var i=n.id,r=t[0].text;e.put(i,r)}}}}],ho=i("ngOptions"),go=m({restrict:"A",terminal:!0}),mo=["$compile","$parse",function(e,i){var r=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,s={$setViewValue:h};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(e,t,n){var i,r,o=this,a={},l=s;o.databound=n.ngModel,o.init=function(e,t,n){l=e,i=t,r=n},o.addOption=function(t,n){re(t,'"option value"'),a[t]=!0,l.$viewValue==t&&(e.val(t),r.parent()&&r.remove()),n&&n[0].hasAttribute("selected")&&(n[0].selected=!0)},o.removeOption=function(e){this.hasOption(e)&&(delete a[e],l.$viewValue==e&&this.renderUnknownOption(e))},o.renderUnknownOption=function(t){var n="? "+Ne(t)+" ?";r.val(n),e.prepend(r),e.val(n),r.prop("selected",!0)},o.hasOption=function(e){return a.hasOwnProperty(e)},t.$on("$destroy",function(){o.renderUnknownOption=h})}],link:function(s,l,c,u){if(u[1]){for(var d,f=u[0],p=u[1],h=c.multiple,g=c.ngOptions,m=!1,y=!1,b=Hn(t.createElement("option")),w=Hn(t.createElement("optgroup")),x=b.clone(),C=0,k=l.children(),S=k.length;C<S;C++)if(""===k[C].value){d=m=k.eq(C);break}f.init(p,m,x),h&&(p.$isEmpty=function(e){return!e||0===e.length}),g?function(t,s,l){function c(e,n,i){return L[T]=i,M&&(L[M]=n),e(t,L)}function u(){t.$apply(function(){var e,n=P(t)||[];if(h)e=[],o(s.val(),function(t){e.push(d(t,n[t]))});else{var i=s.val();e=d(i,n[i])}l.$setViewValue(e),k()})}function d(e,t){return"?"===e?n:""===e?null:c(A||I,e,t)}function p(){var e,n=P(t);if(n&&Zn(n)){e=new Array(n.length);for(var i=0,r=n.length;i<r;i++)e[i]=c(E,i,n[i]);return e}if(n){e={};for(var o in n)n.hasOwnProperty(o)&&(e[o]=c(E,o,n[o]))}return e}function v(e){var t;if(h)if(j&&Zn(e)){t=new je([]);for(var n=0;n<e.length;n++)t.put(c(j,null,e[n]),!0)
+}else t=new je(e);else j&&(e=c(j,null,e));return function(n,i){var r;return r=j||A||I,h?$(t.remove(c(r,n,i))):e==c(r,n,i)}}function x(){y||(t.$$postDigest(k),y=!0)}function C(e,t,n){e[t]=e[t]||0,e[t]+=n?1:-1}function k(){y=!1;var e,n,i,r,u,d,p,g,x,k,S,T,D,A,I,N,j={"":[]},L=[""],R=l.$viewValue,V=P(t)||[],H=M?a(V):V,q={},U=v(R),_=!1;for(T=0;k=H.length,T<k;T++)p=T,M&&(p=H[T],"$"===p.charAt(0))||(g=V[p],e=c(O,p,g)||"",(n=j[e])||(n=j[e]=[],L.push(e)),D=U(p,g),_=_||D,N=c(E,p,g),N=$(N)?N:"",n.push({id:M?H[T]:T,label:N,selected:D}));for(h||(m||null===R?j[""].unshift({id:"",label:"",selected:!_}):_||j[""].unshift({id:"?",label:"",selected:!0})),S=0,x=L.length;S<x;S++){for(e=L[S],n=j[e],F.length<=S?(r={element:w.clone().attr("label",e),label:n.label},u=[r],F.push(u),s.append(r.element)):(u=F[S],r=u[0],r.label!=e&&r.element.attr("label",r.label=e)),A=null,T=0,k=n.length;T<k;T++)i=n[T],(d=u[T+1])?(A=d.element,d.label!==i.label&&(C(q,d.label,!1),C(q,i.label,!0),A.text(d.label=i.label)),d.id!==i.id&&A.val(d.id=i.id),A[0].selected!==i.selected&&(A.prop("selected",d.selected=i.selected),Vn&&A.prop("selected",d.selected))):(""===i.id&&m?I=m:(I=b.clone()).val(i.id).prop("selected",i.selected).attr("selected",i.selected).text(i.label),u.push(d={element:I,label:i.label,id:i.id,selected:i.selected}),C(q,i.label,!0),A?A.after(I):r.element.append(I),A=I);for(T++;u.length>T;)i=u.pop(),C(q,i.label,!1),i.element.remove();o(q,function(e,t){e>0?f.addOption(t):e<0&&f.removeOption(t)})}for(;F.length>S;)F.pop()[0].element.remove()}var S;if(!(S=g.match(r)))throw ho("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",g,B(s));var E=i(S[2]||S[1]),T=S[4]||S[6],D=/ as /.test(S[0])&&S[1],A=D?i(D):null,M=S[5],O=i(S[3]||""),I=i(S[2]?S[1]:T),P=i(S[7]),N=S[8],j=N?i(S[8]):null,F=[[{element:s,label:""}]],L={};m&&(e(m)(t),m.removeClass("ng-scope"),m.remove()),s.empty(),s.on("change",u),l.$render=k,t.$watchCollection(P,x),t.$watchCollection(p,x),h&&t.$watchCollection(function(){return l.$modelValue},x)}(s,l,p):h?function(e,t,n){var i;n.$render=function(){var e=new je(n.$viewValue);o(t.find("option"),function(t){t.selected=$(e.get(t.value))})},e.$watch(function(){L(i,n.$viewValue)||(i=F(n.$viewValue),n.$render())}),t.on("change",function(){e.$apply(function(){var e=[];o(t.find("option"),function(t){t.selected&&e.push(t.value)}),n.$setViewValue(e)})})}(s,l,p):function(e,t,n,i){n.$render=function(){var e=n.$viewValue;i.hasOption(e)?(x.parent()&&x.remove(),t.val(e),""===e&&d.prop("selected",!0)):v(e)&&d?t.val(""):i.renderUnknownOption(e)},t.on("change",function(){e.$apply(function(){x.parent()&&x.remove(),n.$setViewValue(t.val())})})}(s,l,p,f)}}}}],vo=["$interpolate",function(e){var t={addOption:h,removeOption:h};return{restrict:"E",priority:100,compile:function(n,i){if(v(i.value)){var r=e(n.text(),!0);r||i.$set("value",n.text())}return function(e,n,i){var o=n.parent(),a=o.data("$selectController")||o.parent().data("$selectController");a&&a.databound||(a=t),r?e.$watch(r,function(e,t){i.$set("value",e),t!==e&&a.removeOption(t),a.addOption(e,n)}):a.addOption(i.value,n),n.on("$destroy",function(){a.removeOption(i.value)})}}}}],$o=m({restrict:"E",terminal:!1});if(e.angular.bootstrap)return void console.log("WARNING: Tried to load angular more than once.");!function(){var t;ni||(qn=e.jQuery,qn&&qn.fn.on?(Hn=qn,d(qn.fn,{scope:xi.scope,isolateScope:xi.isolateScope,controller:xi.controller,injector:xi.injector,inheritedData:xi.inheritedData}),t=qn.cleanData,qn.cleanData=function(e){var n;if(Xn)Xn=!1;else for(var i,r=0;null!=(i=e[r]);r++)(n=qn._data(i,"events"))&&n.$destroy&&qn(i).triggerHandler("$destroy");t(e)}):Hn=ge,Kn.element=Hn,ni=!0)}(),function(t){d(t,{bootstrap:J,copy:j,extend:d,equals:L,element:Hn,forEach:o,injector:Re,noop:h,bind:H,toJson:U,fromJson:_,identity:g,isUndefined:v,isDefined:$,isString:b,isFunction:C,isObject:y,isNumber:w,isElement:O,isArray:Zn,version:li,isDate:x,lowercase:Nn,uppercase:Fn,callbacks:{counter:0},getTestability:ee,$$minErr:i,$$csp:Qn,reloadWithDebugInfo:Q}),Un=le(e);try{Un("ngLocale")}catch(e){Un("ngLocale",[]).provider("$locale",lt)}Un("ng",["ngLocale"],["$provide",function(e){e.provider({$$sanitizeUri:Ft}),e.provider("$compile",We).directive({a:ar,input:Sr,textarea:Sr,form:dr,script:po,select:mo,style:$o,option:vo,ngBind:Ur,ngBindHtml:Br,ngBindTemplate:_r,ngClass:Wr,ngClassEven:Yr,ngClassOdd:zr,ngCloak:Kr,ngController:Gr,ngForm:fr,ngHide:ao,ngIf:Jr,ngInclude:Qr,ngInit:to,ngNonBindable:no,ngPluralize:io,ngRepeat:ro,ngShow:oo,ngStyle:so,ngSwitch:lo,ngSwitchWhen:co,ngSwitchDefault:uo,ngOptions:go,ngTransclude:fo,ngModel:Ir,ngList:Rr,ngChange:Pr,pattern:jr,ngPattern:jr,required:Nr,ngRequired:Nr,minlength:Lr,ngMinlength:Lr,maxlength:Fr,ngMaxlength:Fr,ngValue:Hr,ngModelOptions:qr}).directive({ngInclude:eo}).directive(sr).directive(Xr),e.provider({$anchorScroll:Ve,$animate:Ii,$browser:Ue,$cacheFactory:_e,$controller:Ge,$document:Xe,$exceptionHandler:Ze,$filter:Gt,$interpolate:at,$interval:st,$http:nt,$httpBackend:rt,$location:wt,$log:xt,$parse:Mt,$rootScope:jt,$q:Ot,$$q:It,$sce:qt,$sceDelegate:Ht,$sniffer:Ut,$templateCache:Be,$templateRequest:_t,$$testability:Bt,$timeout:Wt,$window:Kt,$$rAF:Nt,$$asyncCallback:He})}])}(Kn),Hn(t).ready(function(){Z(t,J)})}(window,document),!window.angular.$$csp()&&window.angular.element(document).find("head").prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}</style>'),function(e,t,n){"use strict";function i(){function e(e,n){return t.extend(new(t.extend(function(){},{prototype:e})),n)}function n(e,t){var n=t.caseInsensitiveMatch,i={originalPath:e,regexp:e},r=i.keys=[];return e=e.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(e,t,n,i){var o="?"===i?i:null,a="*"===i?i:null;return r.push({name:n,optional:!!o}),t=t||"",(o?"":t)+"(?:"+(o?t:"")+(a&&"(.+?)"||"([^/]+)")+(o||"")+")"+(o||"")}).replace(/([\/$\*])/g,"\\$1"),i.regexp=new RegExp("^"+e+"$",n?"i":""),i}var i={};this.when=function(e,r){if(i[e]=t.extend({reloadOnSearch:!0},r,e&&n(e,r)),e){var o="/"==e[e.length-1]?e.substr(0,e.length-1):e+"/";i[o]=t.extend({redirectTo:e},n(o,r))}return this},this.otherwise=function(e){return"string"==typeof e&&(e={redirectTo:e}),this.when(null,e),this},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce",function(n,r,o,a,s,c,u){function d(e,t){var n=t.keys,i={};if(!t.regexp)return null;var r=t.regexp.exec(e);if(!r)return null;for(var o=1,a=r.length;o<a;++o){var s=n[o-1],l=r[o];s&&l&&(i[s.name]=l)}return i}function f(e){var i=y.current;m=h(),(v=m&&i&&m.$$route===i.$$route&&t.equals(m.pathParams,i.pathParams)&&!m.reloadOnSearch&&!$)||!i&&!m||n.$broadcast("$routeChangeStart",m,i).defaultPrevented&&e&&e.preventDefault()}function p(){var e=y.current,i=m;v?(e.params=i.params,t.copy(e.params,o),n.$broadcast("$routeUpdate",e)):(i||e)&&($=!1,y.current=i,i&&i.redirectTo&&(t.isString(i.redirectTo)?r.path(g(i.redirectTo,i.params)).search(i.params).replace():r.url(i.redirectTo(i.pathParams,r.path(),r.search())).replace()),a.when(i).then(function(){if(i){var e,n,r=t.extend({},i.resolve);return t.forEach(r,function(e,n){r[n]=t.isString(e)?s.get(e):s.invoke(e,null,null,n)}),t.isDefined(e=i.template)?t.isFunction(e)&&(e=e(i.params)):t.isDefined(n=i.templateUrl)&&(t.isFunction(n)&&(n=n(i.params)),n=u.getTrustedResourceUrl(n),t.isDefined(n)&&(i.loadedTemplateUrl=n,e=c(n))),t.isDefined(e)&&(r.$template=e),a.all(r)}}).then(function(r){i==y.current&&(i&&(i.locals=r,t.copy(i.params,o)),n.$broadcast("$routeChangeSuccess",i,e))},function(t){i==y.current&&n.$broadcast("$routeChangeError",i,e,t)}))}function h(){var n,o;return t.forEach(i,function(i,a){!o&&(n=d(r.path(),i))&&(o=e(i,{params:t.extend({},r.search(),n),pathParams:n}),o.$$route=i)}),o||i[null]&&e(i[null],{params:{},pathParams:{}})}function g(e,n){var i=[];return t.forEach((e||"").split(":"),function(e,t){if(0===t)i.push(e);else{var r=e.match(/(\w+)(.*)/),o=r[1];i.push(n[o]),i.push(r[2]||""),delete n[o]}}),i.join("")}var m,v,$=!1,y={routes:i,reload:function(){$=!0,n.$evalAsync(function(){f(),p()})},updateParams:function(e){if(!this.current||!this.current.$$route)throw l("norout","Tried updating route when with no current route");var n={},i=this;t.forEach(Object.keys(e),function(t){i.current.pathParams[t]||(n[t]=e[t])}),e=t.extend({},this.current.params,e),r.path(g(this.current.$$route.originalPath,e)),r.search(t.extend({},r.search(),n))}};return n.$on("$locationChangeStart",f),n.$on("$locationChangeSuccess",p),y}]}function r(){this.$get=function(){return{}}}function o(e,n,i){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(r,o,a,s,l){function c(){p&&(i.cancel(p),p=null),d&&(d.$destroy(),d=null),f&&(p=i.leave(f),p.then(function(){p=null}),f=null)}function u(){var a=e.current&&e.current.locals,s=a&&a.$template;if(t.isDefined(s)){var u=r.$new(),p=e.current,m=l(u,function(e){i.enter(e,null,f||o).then(function(){!t.isDefined(h)||h&&!r.$eval(h)||n()}),c()});f=m,d=p.scope=u,d.$emit("$viewContentLoaded"),d.$eval(g)}else c()}var d,f,p,h=a.autoscroll,g=a.onload||"";r.$on("$routeChangeSuccess",u),u()}}}function a(e,t,n){return{restrict:"ECA",priority:-400,link:function(i,r){var o=n.current,a=o.locals;r.html(a.$template);var s=e(r.contents());if(o.controller){a.$scope=i;var l=t(o.controller,a);o.controllerAs&&(i[o.controllerAs]=l),r.data("$ngControllerController",l),r.children().data("$ngControllerController",l)}s(i)}}}var s=t.module("ngRoute",["ng"]).provider("$route",i),l=t.$$minErr("ngRoute");s.provider("$routeParams",r),s.directive("ngView",o),s.directive("ngView",a),o.$inject=["$route","$anchorScroll","$animate"],a.$inject=["$compile","$controller","$route"]}(window,window.angular),function(e,t,n){"use strict";function i(e){return null!=e&&""!==e&&"hasOwnProperty"!==e&&s.test("."+e)}function r(e,t){if(!i(t))throw a("badmember",'Dotted member path "@{0}" is invalid.',t);for(var r=t.split("."),o=0,s=r.length;o<s&&e!==n;o++){var l=r[o];e=null!==e?e[l]:n}return e}function o(e,n){n=n||{},t.forEach(n,function(e,t){delete n[t]});for(var i in e)!e.hasOwnProperty(i)||"$"===i.charAt(0)&&"$"===i.charAt(1)||(n[i]=e[i]);return n}var a=t.$$minErr("$resource"),s=/^(\.[a-zA-Z_$][0-9a-zA-Z_$]*)+$/;t.module("ngResource",["ng"]).provider("$resource",function(){var e=this;this.defaults={stripTrailingSlashes:!0,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},delete:{method:"DELETE"}}},this.$get=["$http","$q",function(i,s){function l(e){return c(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function c(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,t?"%20":"+")}function u(t,n){this.template=t,this.defaults=h({},e.defaults,n),this.urlParams={}}function d(l,c,v,$){function y(e,t){var n={};return t=h({},c,t),p(t,function(t,i){m(t)&&(t=t()),n[i]=t&&t.charAt&&"@"==t.charAt(0)?r(e,t.substr(1)):t}),n}function b(e){return e.resource}function w(e){o(e||{},this)}var x=new u(l,$);return v=h({},e.defaults.actions,v),w.prototype.toJSON=function(){var e=h({},this);return delete e.$promise,delete e.$resolved,e},p(v,function(e,r){var l=/^(POST|PUT|PATCH)$/i.test(e.method);w[r]=function(c,u,d,v){var $,C,k,S={};switch(arguments.length){case 4:k=v,C=d;case 3:case 2:if(!m(u)){S=c,$=u,C=d;break}if(m(c)){C=c,k=u;break}C=u,k=d;case 1:m(c)?C=c:l?$=c:S=c;break;case 0:break;default:throw a("badargs","Expected up to 4 arguments [params, data, success, error], got {0} arguments",arguments.length)}var E=this instanceof w,T=E?$:e.isArray?[]:new w($),D={},A=e.interceptor&&e.interceptor.response||b,M=e.interceptor&&e.interceptor.responseError||n;p(e,function(e,t){"params"!=t&&"isArray"!=t&&"interceptor"!=t&&(D[t]=g(e))}),l&&(D.data=$),x.setUrlParams(D,h({},y($,e.params||{}),S),e.url);var O=i(D).then(function(n){var i=n.data,s=T.$promise;if(i){if(t.isArray(i)!==!!e.isArray)throw a("badcfg","Error in resource configuration for action `{0}`. Expected response to contain an {1} but got an {2}",r,e.isArray?"array":"object",t.isArray(i)?"array":"object");e.isArray?(T.length=0,p(i,function(e){"object"==typeof e?T.push(new w(e)):T.push(e)})):(o(i,T),T.$promise=s)}return T.$resolved=!0,n.resource=T,n},function(e){return T.$resolved=!0,(k||f)(e),s.reject(e)});return O=O.then(function(e){var t=A(e);return(C||f)(t,e.headers),t},M),E?O:(T.$promise=O,T.$resolved=!1,T)},w.prototype["$"+r]=function(e,t,n){m(e)&&(n=t,t=e,e={});var i=w[r].call(this,e,this,t,n);return i.$promise||i}}),w.bind=function(e){return d(l,h({},c,e),v)},w}var f=t.noop,p=t.forEach,h=t.extend,g=t.copy,m=t.isFunction;return u.prototype={setUrlParams:function(e,n,i){var r,o,s=this,c=i||s.template,u=s.urlParams={};p(c.split(/\W/),function(e){if("hasOwnProperty"===e)throw a("badname","hasOwnProperty is not a valid parameter name.");!new RegExp("^\\d+$").test(e)&&e&&new RegExp("(^|[^\\\\]):"+e+"(\\W|$)").test(c)&&(u[e]=!0)}),c=c.replace(/\\:/g,":"),n=n||{},p(s.urlParams,function(e,i){r=n.hasOwnProperty(i)?n[i]:s.defaults[i],t.isDefined(r)&&null!==r?(o=l(r),c=c.replace(new RegExp(":"+i+"(\\W|$)","g"),function(e,t){return o+t})):c=c.replace(new RegExp("(/?):"+i+"(\\W|$)","g"),function(e,t,n){return"/"==n.charAt(0)?n:t+n})}),s.defaults.stripTrailingSlashes&&(c=c.replace(/\/+$/,"")||"/"),c=c.replace(/\/\.(?=\w+($|\?))/,"."),e.url=c.replace(/\/\\\./,"/."),p(n,function(t,n){s.urlParams[n]||(e.params=e.params||{},e.params[n]=t)})}},d}]})}(window,window.angular),function(e,t,n){"use strict";t.module("ngCookies",["ng"]).factory("$cookies",["$rootScope","$browser",function(e,i){function r(){var e,r,o,l;for(e in s)u(a[e])&&i.cookies(e,n);for(e in a)r=a[e],t.isString(r)||(r=""+r,a[e]=r),r!==s[e]&&(i.cookies(e,r),l=!0);if(l){l=!1,o=i.cookies();for(e in a)a[e]!==o[e]&&(u(o[e])?delete a[e]:a[e]=o[e],l=!0)}}var o,a={},s={},l=!1,c=t.copy,u=t.isUndefined;return i.addPollFn(function(){var t=i.cookies();o!=t&&(o=t,c(t,s),c(t,a),l&&e.$apply())})(),l=!0,e.$watch(r),a}]).factory("$cookieStore",["$cookies",function(e){return{get:function(n){var i=e[n];return i?t.fromJson(i):i},put:function(n,i){e[n]=t.toJson(i)},remove:function(t){delete e[t]}}}])}(window,window.angular),function(e,t,n){"use strict";t.module("ngAnimate",["ng"]).directive("ngAnimateChildren",function(){return function(e,n,i){var r=i.ngAnimateChildren;t.isString(r)&&0===r.length?n.data("$$ngAnimateChildren",!0):e.$watch(r,function(e){n.data("$$ngAnimateChildren",!!e)})}}).factory("$$animateReflow",["$$rAF","$document",function(e,t){var n=t[0].body;return function(t){return e(function(){n.offsetWidth;t()})}}]).config(["$provide","$animateProvider",function(n,i){function r(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.nodeType==h)return n}}function o(e){return e&&t.element(e)}function a(e){return t.element(r(e))}function s(e,t){return r(e)==r(t)}var l=t.noop,c=t.forEach,u=i.$$selectors,d=t.isArray,f=t.isString,p=t.isObject,h=1,g="$$ngAnimateState",m="ng-animate",v={running:!0};n.decorator("$animate",["$delegate","$$q","$injector","$sniffer","$rootElement","$$asyncCallback","$rootScope","$document","$templateRequest",function(e,n,h,$,y,b,w,x,C){function k(e,t){var n=e.data(g)||{};return t&&(n.running=!0,n.structural=!0,e.data(g,n)),n.disabled||n.running&&n.structural}function S(e){var t,i=n.defer();return i.promise.$$cancelFn=function(){t&&t()},w.$$postDigest(function(){t=e(function(){i.resolve()})}),i.promise}function E(e){if(p(e))return e.tempClasses&&f(e.tempClasses)&&(e.tempClasses=e.tempClasses.split(/\s+/)),e}function T(e,t,n){n=n||{};var i={};c(n,function(e,t){c(t.split(" "),function(t){i[t]=e})});var r=Object.create(null);c((e.attr("class")||"").split(/\s+/),function(e){r[e]=!0});var o=[],a=[];return c(t.classes,function(e,t){var n=r[t],s=i[t]||{};!1===e?(n||"addClass"==s.event)&&a.push(t):!0===e&&(n&&"removeClass"!=s.event||o.push(t))}),o.length+a.length>0&&[o.join(" "),a.join(" ")]}function D(e){if(e){var t=[],n={},i=e.substr(1).split(".");($.transitions||$.animations)&&t.push(h.get(u[""]));for(var r=0;r<i.length;r++){var o=i[r],a=u[o];a&&!n[o]&&(t.push(h.get(a)),n[o]=!0)}return t}}function A(e,n,i,r){function o(e,t){var n=e[t],i=e["before"+t.charAt(0).toUpperCase()+t.substr(1)];if(n||i)return"leave"==t&&(i=n,n=null),x.push({event:t,fn:n}),y.push({event:t,fn:i}),!0}function a(t,n,o){function a(e){if(n){if((n[e]||l)(),++d<s.length)return;n=null}o()}var s=[];c(t,function(e){e.fn&&s.push(e)});var d=0;c(s,function(t,o){var s=function(){a(o)};switch(t.event){case"setClass":n.push(t.fn(e,u,f,s,r));break;case"animate":n.push(t.fn(e,i,r.from,r.to,s));break;case"addClass":n.push(t.fn(e,u||i,s,r));break;case"removeClass":n.push(t.fn(e,f||i,s,r));break;default:n.push(t.fn(e,s,r))}}),n&&0===n.length&&o()}var s=e[0];if(s){r&&(r.to=r.to||{},r.from=r.from||{});var u,f;d(i)&&(u=i[0],f=i[1],u?f?i=u+" "+f:(i=u,n="addClass"):(i=f,n="removeClass"));var p="setClass"==n,h=p||"addClass"==n||"removeClass"==n||"animate"==n,g=e.attr("class"),m=g+" "+i;if(L(m)){var v=l,$=[],y=[],b=l,w=[],x=[],C=(" "+m).replace(/\s+/g,".");return c(D(C),function(e){!o(e,n)&&p&&(o(e,"addClass"),o(e,"removeClass"))}),{node:s,event:n,className:i,isClassBased:h,isSetClassOperation:p,applyStyles:function(){r&&e.css(t.extend(r.from||{},r.to||{}))},before:function(e){v=e,a(y,$,function(){v=l,e()})},after:function(e){b=e,a(x,w,function(){b=l,e()})},cancel:function(){$&&(c($,function(e){(e||l)(!0)}),v(!0)),w&&(c(w,function(e){(e||l)(!0)}),b(!0))}}}}}function M(e,n,i,r,o,a,s,u){function d(t){var r="$animate:"+t;x&&x[r]&&x[r].length>0&&b(function(){i.triggerHandler(r,{event:e,className:n})})}function f(){d("before")}function p(){d("after")}function h(){d("close"),u()}function v(){v.hasBeenRun||(v.hasBeenRun=!0,a())}function $(){if(!$.hasBeenRun){w&&w.applyStyles(),$.hasBeenRun=!0,s&&s.tempClasses&&c(s.tempClasses,function(e){i.removeClass(e)});var e=i.data(g);e&&(w&&w.isClassBased?I(i,n):(b(function(){var e=i.data(g)||{};N==e.index&&I(i,n)}),i.data(g,e))),h()}}var y=l,w=A(i,e,n,s);if(!w)return v(),f(),p(),$(),y;e=w.event,n=w.className;var x=t.element._data(w.node);if(x=x&&x.events,r||(r=o?o.parent():i.parent()),P(i,r))return v(),f(),p(),$(),y;var C=i.data(g)||{},k=C.active||{},S=C.totalActive||0,E=C.last,T=!1;if(S>0){var D=[];if(w.isClassBased){if("setClass"==E.event)D.push(E),I(i,n);else if(k[n]){var M=k[n];M.event==e?T=!0:(D.push(M),I(i,n))}}else if("leave"==e&&k["ng-leave"])T=!0;else{for(var O in k)D.push(k[O]);C={},I(i,!0)}D.length>0&&c(D,function(e){e.cancel()})}if(!w.isClassBased||w.isSetClassOperation||"animate"==e||T||(T="addClass"==e==i.hasClass(n)),T)return v(),f(),p(),h(),y;k=C.active||{},S=C.totalActive||0,"leave"==e&&i.one("$destroy",function(e){var n=t.element(this),i=n.data(g);if(i){var r=i.active["ng-leave"];r&&(r.cancel(),I(n,"ng-leave"))}}),i.addClass(m),s&&s.tempClasses&&c(s.tempClasses,function(e){i.addClass(e)});var N=j++;return S++,k[n]=w,i.data(g,{last:w,active:k,index:N,totalActive:S}),f(),w.before(function(t){var r=i.data(g);t=t||!r||!r.active[n]||w.isClassBased&&r.active[n].event!=e,v(),!0===t?$():(p(),w.after($))}),w.cancel}function O(e){var n=r(e);if(n){var i=t.isFunction(n.getElementsByClassName)?n.getElementsByClassName(m):n.querySelectorAll("."+m);c(i,function(e){e=t.element(e);var n=e.data(g);n&&n.active&&c(n.active,function(e){e.cancel()})})}}function I(e,t){if(s(e,y))v.disabled||(v.running=!1,v.structural=!1);else if(t){var n=e.data(g)||{},i=!0===t;!i&&n.active&&n.active[t]&&(n.totalActive--,delete n.active[t]),!i&&n.totalActive||(e.removeClass(m),e.removeData(g))}}function P(e,n){if(v.disabled)return!0;if(s(e,y))return v.running;var i,r,o;do{if(0===n.length)break;var a=s(n,y),l=a?v:n.data(g)||{};if(l.disabled)return!0;if(a&&(o=!0),!1!==i){var c=n.data("$$ngAnimateChildren");t.isDefined(c)&&(i=c)}r=r||l.running||l.last&&!l.last.isClassBased}while(n=n.parent());return!o||!i&&r}y.data(g,v);var N=w.$watch(function(){return C.totalPendingRequests},function(e,t){0===e&&(N(),w.$$postDigest(function(){w.$$postDigest(function(){v.running=!1})}))}),j=0,F=i.classNameFilter(),L=F?function(e){return F.test(e)}:function(){return!0};return{animate:function(e,t,n,i,r){return i=i||"ng-inline-animate",r=E(r)||{},r.from=n?t:null,r.to=n||t,S(function(t){return M("animate",i,a(e),null,null,l,r,t)})},enter:function(n,i,r,s){return s=E(s),n=t.element(n),i=o(i),r=o(r),k(n,!0),e.enter(n,i,r),S(function(e){return M("enter","ng-enter",a(n),i,r,l,s,e)})},leave:function(n,i){return i=E(i),n=t.element(n),O(n),k(n,!0),S(function(t){return M("leave","ng-leave",a(n),null,null,function(){e.leave(n)},i,t)})},move:function(n,i,r,s){return s=E(s),n=t.element(n),i=o(i),r=o(r),O(n),k(n,!0),e.move(n,i,r),S(function(e){return M("move","ng-move",a(n),i,r,l,s,e)})},addClass:function(e,t,n){return this.setClass(e,t,[],n)},removeClass:function(e,t,n){return this.setClass(e,[],t,n)},setClass:function(n,i,o,s){if(s=E(s),n=t.element(n),n=a(n),k(n))return e.$$setClassImmediately(n,i,o,s);var l,u=n.data("$$animateClasses"),f=!!u;return u||(u={},u.classes={}),l=u.classes,i=d(i)?i:i.split(" "),c(i,function(e){e&&e.length&&(l[e]=!0)}),o=d(o)?o:o.split(" "),c(o,function(e){e&&e.length&&(l[e]=!1)}),f?(s&&u.options&&(u.options=t.extend(u.options||{},s)),u.promise):(n.data("$$animateClasses",u={classes:l,options:s}),u.promise=S(function(t){var i=n.parent(),o=r(n),a=o.parentNode;if(!a||a.$$NG_REMOVED||o.$$NG_REMOVED)return void t();var s=n.data("$$animateClasses");n.removeData("$$animateClasses");var l=n.data(g)||{},c=T(n,s,l.active);return c?M("setClass",c,n,i,null,function(){c[0]&&e.$$addClassImmediately(n,c[0]),c[1]&&e.$$removeClassImmediately(n,c[1])},s.options,t):t()}))},cancel:function(e){e.$$cancelFn()},enabled:function(e,t){switch(arguments.length){case 2:if(e)I(t);else{var n=t.data(g)||{};n.disabled=!0,t.data(g,n)}break;case 1:v.disabled=!e;break;default:e=!v.disabled}return!!e}}}]),i.register("",["$window","$sniffer","$timeout","$$animateReflow",function(n,i,o,a){function s(){P||(P=a(function(){z=[],P=null,B={}}))}function u(e,t){P&&P(),z.push(t),P=a(function(){c(z,function(e){e()}),z=[],P=null,B={}})}function p(e,n){var i=r(e);e=t.element(i),G.push(e);var a=Date.now()+n;a<=K||(o.cancel(Y),K=a,Y=o(function(){g(G),G=[]},n,!1))}function g(e){c(e,function(e){var t=e.data(H);t&&c(t.closeAnimationFns,function(e){e()})})}function m(e,t){var i=t?B[t]:null;if(!i){var r=0,o=0,a=0,s=0;c(e,function(e){if(e.nodeType==h){var t=n.getComputedStyle(e)||{},i=t[D+N];r=Math.max(v(i),r);var l=t[D+F];o=Math.max(v(l),o),s=Math.max(v(t[M+F]),s);var c=v(t[M+N]);c>0&&(c*=parseInt(t[M+L],10)||1),a=Math.max(c,a)}}),i={total:0,transitionDelay:o,transitionDuration:r,animationDelay:s,animationDuration:a},t&&(B[t]=i)}return i}function v(e){var t=0,n=f(e)?e.split(/\s*,\s*/):[];return c(n,function(e){t=Math.max(parseFloat(e)||0,t)}),t}function $(e){var t=e.parent(),n=t.data(V);return n||(t.data(V,++W),n=W),n+"-"+r(e).getAttribute("class")}function y(e,t,n,i){var o=["ng-enter","ng-leave","ng-move"].indexOf(n)>=0,a=$(t),s=a+" "+n,l=B[s]?++B[s].total:0,c={};if(l>0){var u=n+"-stagger",d=a+" "+u,f=!B[d];f&&t.addClass(u),c=m(t,d),f&&t.removeClass(u)}t.addClass(n);var p=t.data(H)||{},h=m(t,s),g=h.transitionDuration,v=h.animationDuration;if(o&&0===g&&0===v)return t.removeClass(n),!1;var y=i||o&&g>0,b=v>0&&c.animationDelay>0&&0===c.animationDuration,C=p.closeAnimationFns||[];t.data(H,{stagger:c,cacheKey:s,running:p.running||0,itemIndex:l,blockTransition:y,closeAnimationFns:C});var k=r(t);return y&&(w(k,!0),i&&t.css(i)),b&&x(k,!0),!0}function b(e,t,n,i,a){function s(){t.off(F,l),t.removeClass(f),t.removeClass(h),N&&o.cancel(N),E(t,n);var e=r(t);for(var i in g)e.style.removeProperty(g[i])}function l(e){e.stopPropagation();var t=e.originalEvent||e,n=t.$manualTimeStamp||t.timeStamp||Date.now(),r=parseFloat(t.elapsedTime.toFixed(q));Math.max(n-j,0)>=M&&r>=T&&i()}var u=r(t),d=t.data(H);if(-1==u.getAttribute("class").indexOf(n)||!d)return void i();var f="",h="";c(n.split(" "),function(e,t){var n=(t>0?" ":"")+e;f+=n+"-active",h+=n+"-pending"});var g=[],v=d.itemIndex,$=d.stagger,y=0;if(v>0){var b=0;$.transitionDelay>0&&0===$.transitionDuration&&(b=$.transitionDelay*v);var C=0;$.animationDelay>0&&0===$.animationDuration&&(C=$.animationDelay*v,g.push(I+"animation-play-state")),y=Math.round(100*Math.max(b,C))/100}y||(t.addClass(f),d.blockTransition&&w(u,!1));var k=d.cacheKey+" "+f,S=m(t,k),T=Math.max(S.transitionDuration,S.animationDuration);if(0===T)return t.removeClass(f),E(t,n),void i();!y&&a&&(S.transitionDuration||(t.css("transition",S.animationDuration+"s linear all"),g.push("transition")),t.css(a));var D=Math.max(S.transitionDelay,S.animationDelay),M=D*_;if(g.length>0){var P=u.getAttribute("style")||"";";"!==P.charAt(P.length-1)&&(P+=";"),u.setAttribute("style",P+" ")}var N,j=Date.now(),F=O+" "+A,L=(D+T)*U,R=(y+L)*_;return y>0&&(t.addClass(h),N=o(function(){N=null,S.transitionDuration>0&&w(u,!1),S.animationDuration>0&&x(u,!1),t.addClass(f),t.removeClass(h),a&&(0===S.transitionDuration&&t.css("transition",S.animationDuration+"s linear all"),t.css(a),g.push("transition"))},y*_,!1)),t.on(F,l),d.closeAnimationFns.push(function(){s(),i()}),d.running++,p(t,R),s}function w(e,t){e.style[D+j]=t?"none":""}function x(e,t){e.style[M+R]=t?"paused":""}function C(e,t,n,i){if(y(e,t,n,i))return function(e){e&&E(t,n)}}function k(e,t,n,i,r){if(t.data(H))return b(e,t,n,i,r);E(t,n),i()}function S(e,t,n,i,r){var o=C(e,t,n,r.from);if(!o)return s(),void i();var a=o;return u(t,function(){a=k(e,t,n,i,r.to)}),function(e){(a||l)(e)}}function E(e,t){e.removeClass(t);var n=e.data(H);n&&(n.running&&n.running--,n.running&&0!==n.running||e.removeData(H))}function T(e,t){var n="";return e=d(e)?e:e.split(/\s+/),c(e,function(e,i){e&&e.length>0&&(n+=(i>0?" ":"")+e+t)}),n}var D,A,M,O,I="";void 0===e.ontransitionend&&void 0!==e.onwebkittransitionend?(I="-webkit-",D="WebkitTransition",A="webkitTransitionEnd transitionend"):(D="transition",A="transitionend"),void 0===e.onanimationend&&void 0!==e.onwebkitanimationend?(I="-webkit-",M="WebkitAnimation",O="webkitAnimationEnd animationend"):(M="animation",O="animationend");var P,N="Duration",j="Property",F="Delay",L="IterationCount",R="PlayState",V="$$ngAnimateKey",H="$$ngAnimateCSS3Data",q=3,U=1.5,_=1e3,B={},W=0,z=[],Y=null,K=0,G=[];return{animate:function(e,t,n,i,r,o){return o=o||{},o.from=n,o.to=i,S("animate",e,t,r,o)},enter:function(e,t,n){return n=n||{},S("enter",e,"ng-enter",t,n)},leave:function(e,t,n){return n=n||{},S("leave",e,"ng-leave",t,n)},move:function(e,t,n){return n=n||{},S("move",e,"ng-move",t,n)},beforeSetClass:function(e,t,n,i,r){r=r||{};var o=T(n,"-remove")+" "+T(t,"-add"),a=C("setClass",e,o,r.from);if(a)return u(e,i),a;s(),i()},beforeAddClass:function(e,t,n,i){i=i||{};var r=C("addClass",e,T(t,"-add"),i.from);if(r)return u(e,n),r;s(),n()},beforeRemoveClass:function(e,t,n,i){i=i||{};var r=C("removeClass",e,T(t,"-remove"),i.from);if(r)return u(e,n),r;s(),n()},setClass:function(e,t,n,i,r){return r=r||{},n=T(n,"-remove"),t=T(t,"-add"),k("setClass",e,n+" "+t,i,r.to)},addClass:function(e,t,n,i){return i=i||{},k("addClass",e,T(t,"-add"),n,i.to)},removeClass:function(e,t,n,i){return i=i||{},k("removeClass",e,T(t,"-remove"),n,i.to)}}}])}])}(window,window.angular),function(e,t,n){"use strict";function i(){return["$animate",function(e){return{restrict:"AE",transclude:"element",priority:1,terminal:!0,require:"^^ngMessages",link:function(t,n,i,o,a){var s,l=n[0],c=i.ngMessage||i.when;i=i.ngMessageExp||i.whenExp;var u=function(e){s=e?r(e)?e:e.split(/[\s,]+/):null,o.reRender()};i?(u(t.$eval(i)),t.$watchCollection(i,u)):u(c);var d,f;o.register(l,f={test:function(e){var t=s;return e=t?r(t)?0<=t.indexOf(e):t.hasOwnProperty(e):void 0},attach:function(){d||a(t,function(t){e.enter(t,null,n),d=t;var i=d.$$attachId=o.getAttachId();d.on("$destroy",function(){d&&d.$$attachId===i&&(o.deregister(l),f.detach())})})},detach:function(){if(d){var t=d;d=null,e.leave(t)}}})}}}]}var r=t.isArray,o=t.forEach,a=t.isString,s=t.element;t.module("ngMessages",[]).directive("ngMessages",["$animate",function(e){function t(e,t){return a(t)&&0===t.length||n(e.$eval(t))}function n(e){return a(e)?e.length:!!e}return{require:"ngMessages",restrict:"AE",controller:["$element","$scope","$attrs",function(i,r,a){function s(e,t){for(var n=t,i=[];n&&n!==e;){var r=n.$$ngMessageNode;if(r&&r.length)return p[r];n.childNodes.length&&-1==i.indexOf(n)?(i.push(n),n=n.childNodes[n.childNodes.length-1]):n=n.previousSibling||n.parentNode}}var l=this,c=0,u=0;this.getAttachId=function(){return u++};var d,f,p=this.messages={};this.render=function(s){s=s||{},d=!1,f=s;for(var c=t(r,a.ngMessagesMultiple)||t(r,a.multiple),u=[],p={},h=l.head,g=!1,m=0;null!=h;){m++;var v=h.message,$=!1;g||o(s,function(e,t){!$&&n(e)&&v.test(t)&&!p[t]&&($=p[t]=!0,v.attach())}),$?g=!c:u.push(v),h=h.next}o(u,function(e){e.detach()}),u.length!==m?e.setClass(i,"ng-active","ng-inactive"):e.setClass(i,"ng-inactive","ng-active")},r.$watchCollection(a.ngMessages||a.for,l.render),this.reRender=function(){d||(d=!0,r.$evalAsync(function(){d&&f&&l.render(f)}))},this.register=function(e,t){var n=c.toString();p[n]={message:t};var r=i[0],o=p[n];l.head?(r=s(r,e))?(o.next=r.next,r.next=o):(o.next=l.head,l.head=o):l.head=o,e.$$ngMessageNode=n,c++,l.reRender()},this.deregister=function(e){var t=e.$$ngMessageNode;delete e.$$ngMessageNode;var n=p[t];(e=s(i[0],e))?e.next=n.next:l.head=n.next,delete p[t],l.reRender()}}]}}]).directive("ngMessagesInclude",["$templateRequest","$document","$compile",function(e,t,n){return{restrict:"AE",require:"^^ngMessages",link:function(i,r,o){var a=o.ngMessagesInclude||o.src;e(a).then(function(e){n(e)(i,function(e){r.after(e),e=s(t[0].createComment(" ngMessagesInclude: "+a+" ")),r.after(e),r.remove()})})}}}]).directive("ngMessage",i()).directive("ngMessageExp",i())}(window,window.angular),angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.transition","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.bindHtml","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.dropdown","ui.bootstrap.modal","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["template/accordion/accordion-group.html","template/accordion/accordion.html","template/alert/alert.html","template/carousel/carousel.html","template/carousel/slide.html","template/datepicker/datepicker.html","template/datepicker/day.html","template/datepicker/month.html","template/datepicker/popup.html","template/datepicker/year.html","template/modal/backdrop.html","template/modal/window.html","template/pagination/pager.html","template/pagination/pagination.html","template/tooltip/tooltip-html-unsafe-popup.html","template/tooltip/tooltip-popup.html","template/popover/popover.html","template/progressbar/bar.html","template/progressbar/progress.html","template/progressbar/progressbar.html","template/rating/rating.html","template/tabs/tab.html","template/tabs/tabset.html","template/timepicker/timepicker.html","template/typeahead/typeahead-match.html","template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.transition",[]).factory("$transition",["$q","$timeout","$rootScope",function(e,t,n){function i(e){for(var t in e)if(void 0!==o.style[t])return e[t]}var r=function(i,o,a){a=a||{};var s=e.defer(),l=r[a.animation?"animationEndEventName":"transitionEndEventName"],c=function(e){n.$apply(function(){i.unbind(l,c),s.resolve(i)})};return l&&i.bind(l,c),t(function(){angular.isString(o)?i.addClass(o):angular.isFunction(o)?o(i):angular.isObject(o)&&i.css(o),
+l||s.resolve(i)}),s.promise.cancel=function(){l&&i.unbind(l,c),s.reject("Transition cancelled")},s.promise},o=document.createElement("trans"),a={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"},s={WebkitTransition:"webkitAnimationEnd",MozTransition:"animationend",OTransition:"oAnimationEnd",transition:"animationend"};return r.transitionEndEventName=i(a),r.animationEndEventName=i(s),r}]),angular.module("ui.bootstrap.collapse",["ui.bootstrap.transition"]).directive("collapse",["$transition",function(e){return{link:function(t,n,i){function r(t){function i(){c===r&&(c=void 0)}var r=e(n,t);return c&&c.cancel(),c=r,r.then(i,i),r}function o(){u?(u=!1,a()):(n.removeClass("collapse").addClass("collapsing"),r({height:n[0].scrollHeight+"px"}).then(a))}function a(){n.removeClass("collapsing"),n.addClass("collapse in"),n.css({height:"auto"})}function s(){if(u)u=!1,l(),n.css({height:0});else{n.css({height:n[0].scrollHeight+"px"});n[0].offsetWidth;n.removeClass("collapse in").addClass("collapsing"),r({height:0}).then(l)}}function l(){n.removeClass("collapsing"),n.addClass("collapse")}var c,u=!0;t.$watch(i.collapse,function(e){e?s():o()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("accordionConfig",{closeOthers:!0}).controller("AccordionController",["$scope","$attrs","accordionConfig",function(e,t,n){this.groups=[],this.closeOthers=function(i){(angular.isDefined(t.closeOthers)?e.$eval(t.closeOthers):n.closeOthers)&&angular.forEach(this.groups,function(e){e!==i&&(e.isOpen=!1)})},this.addGroup=function(e){var t=this;this.groups.push(e),e.$on("$destroy",function(n){t.removeGroup(e)})},this.removeGroup=function(e){var t=this.groups.indexOf(e);-1!==t&&this.groups.splice(t,1)}}]).directive("accordion",function(){return{restrict:"EA",controller:"AccordionController",transclude:!0,replace:!1,templateUrl:"template/accordion/accordion.html"}}).directive("accordionGroup",function(){return{require:"^accordion",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/accordion/accordion-group.html",scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(e){this.heading=e}},link:function(e,t,n,i){i.addGroup(e),e.$watch("isOpen",function(t){t&&i.closeOthers(e)}),e.toggleOpen=function(){e.isDisabled||(e.isOpen=!e.isOpen)}}}}).directive("accordionHeading",function(){return{restrict:"EA",transclude:!0,template:"",replace:!0,require:"^accordionGroup",link:function(e,t,n,i,r){i.setHeading(r(e,function(){}))}}}).directive("accordionTransclude",function(){return{require:"^accordionGroup",link:function(e,t,n,i){e.$watch(function(){return i[n.accordionTransclude]},function(e){e&&(t.html(""),t.append(e))})}}}),angular.module("ui.bootstrap.alert",[]).controller("AlertController",["$scope","$attrs",function(e,t){e.closeable="close"in t,this.close=e.close}]).directive("alert",function(){return{restrict:"EA",controller:"AlertController",templateUrl:"template/alert/alert.html",transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}).directive("dismissOnTimeout",["$timeout",function(e){return{require:"alert",link:function(t,n,i,r){e(function(){r.close()},parseInt(i.dismissOnTimeout,10))}}}]),angular.module("ui.bootstrap.bindHtml",[]).directive("bindHtmlUnsafe",function(){return function(e,t,n){t.addClass("ng-binding").data("$binding",n.bindHtmlUnsafe),e.$watch(n.bindHtmlUnsafe,function(e){t.html(e||"")})}}),angular.module("ui.bootstrap.buttons",[]).constant("buttonConfig",{activeClass:"active",toggleEvent:"click"}).controller("ButtonsController",["buttonConfig",function(e){this.activeClass=e.activeClass||"active",this.toggleEvent=e.toggleEvent||"click"}]).directive("btnRadio",function(){return{require:["btnRadio","ngModel"],controller:"ButtonsController",link:function(e,t,n,i){var r=i[0],o=i[1];o.$render=function(){t.toggleClass(r.activeClass,angular.equals(o.$modelValue,e.$eval(n.btnRadio)))},t.bind(r.toggleEvent,function(){var i=t.hasClass(r.activeClass);i&&!angular.isDefined(n.uncheckable)||e.$apply(function(){o.$setViewValue(i?null:e.$eval(n.btnRadio)),o.$render()})})}}}).directive("btnCheckbox",function(){return{require:["btnCheckbox","ngModel"],controller:"ButtonsController",link:function(e,t,n,i){function r(){return a(n.btnCheckboxTrue,!0)}function o(){return a(n.btnCheckboxFalse,!1)}function a(t,n){var i=e.$eval(t);return angular.isDefined(i)?i:n}var s=i[0],l=i[1];l.$render=function(){t.toggleClass(s.activeClass,angular.equals(l.$modelValue,r()))},t.bind(s.toggleEvent,function(){e.$apply(function(){l.$setViewValue(t.hasClass(s.activeClass)?o():r()),l.$render()})})}}}),angular.module("ui.bootstrap.carousel",["ui.bootstrap.transition"]).controller("CarouselController",["$scope","$timeout","$interval","$transition",function(e,t,n,i){function r(){o();var t=+e.interval;!isNaN(t)&&t>0&&(s=n(a,t))}function o(){s&&(n.cancel(s),s=null)}function a(){var t=+e.interval;l&&!isNaN(t)&&t>0?e.next():e.pause()}var s,l,c=this,u=c.slides=e.slides=[],d=-1;c.currentSlide=null;var f=!1;c.select=e.select=function(n,o){function a(){if(!f){if(c.currentSlide&&angular.isString(o)&&!e.noTransition&&n.$element){n.$element.addClass(o);n.$element[0].offsetWidth;angular.forEach(u,function(e){angular.extend(e,{direction:"",entering:!1,leaving:!1,active:!1})}),angular.extend(n,{direction:o,active:!0,entering:!0}),angular.extend(c.currentSlide||{},{direction:o,leaving:!0}),e.$currentTransition=i(n.$element,{}),function(t,n){e.$currentTransition.then(function(){s(t,n)},function(){s(t,n)})}(n,c.currentSlide)}else s(n,c.currentSlide);c.currentSlide=n,d=l,r()}}function s(t,n){angular.extend(t,{direction:"",active:!0,leaving:!1,entering:!1}),angular.extend(n||{},{direction:"",active:!1,leaving:!1,entering:!1}),e.$currentTransition=null}var l=u.indexOf(n);void 0===o&&(o=l>d?"next":"prev"),n&&n!==c.currentSlide&&(e.$currentTransition?(e.$currentTransition.cancel(),t(a)):a())},e.$on("$destroy",function(){f=!0}),c.indexOfSlide=function(e){return u.indexOf(e)},e.next=function(){var t=(d+1)%u.length;if(!e.$currentTransition)return c.select(u[t],"next")},e.prev=function(){var t=d-1<0?u.length-1:d-1;if(!e.$currentTransition)return c.select(u[t],"prev")},e.isActive=function(e){return c.currentSlide===e},e.$watch("interval",r),e.$on("$destroy",o),e.play=function(){l||(l=!0,r())},e.pause=function(){e.noPause||(l=!1,o())},c.addSlide=function(t,n){t.$element=n,u.push(t),1===u.length||t.active?(c.select(u[u.length-1]),1==u.length&&e.play()):t.active=!1},c.removeSlide=function(e){var t=u.indexOf(e);u.splice(t,1),u.length>0&&e.active?t>=u.length?c.select(u[t-1]):c.select(u[t]):d>t&&d--}}]).directive("carousel",[function(){return{restrict:"EA",transclude:!0,replace:!0,controller:"CarouselController",require:"carousel",templateUrl:"template/carousel/carousel.html",scope:{interval:"=",noTransition:"=",noPause:"="}}}]).directive("slide",function(){return{require:"^carousel",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/carousel/slide.html",scope:{active:"=?"},link:function(e,t,n,i){i.addSlide(e,t),e.$on("$destroy",function(){i.removeSlide(e)}),e.$watch("active",function(t){t&&i.select(e)})}}}),angular.module("ui.bootstrap.dateparser",[]).service("dateParser",["$locale","orderByFilter",function(e,t){function n(e){var n=[],i=e.split("");return angular.forEach(r,function(t,r){var o=e.indexOf(r);if(o>-1){e=e.split(""),i[o]="("+t.regex+")",e[o]="$";for(var a=o+1,s=o+r.length;a<s;a++)i[a]="",e[a]="$";e=e.join(""),n.push({index:o,apply:t.apply})}}),{regex:new RegExp("^"+i.join("")+"$"),map:t(n,"index")}}function i(e,t,n){return 1===t&&n>28?29===n&&(e%4==0&&e%100!=0||e%400==0):3!==t&&5!==t&&8!==t&&10!==t||n<31}this.parsers={};var r={yyyy:{regex:"\\d{4}",apply:function(e){this.year=+e}},yy:{regex:"\\d{2}",apply:function(e){this.year=+e+2e3}},y:{regex:"\\d{1,4}",apply:function(e){this.year=+e}},MMMM:{regex:e.DATETIME_FORMATS.MONTH.join("|"),apply:function(t){this.month=e.DATETIME_FORMATS.MONTH.indexOf(t)}},MMM:{regex:e.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(t){this.month=e.DATETIME_FORMATS.SHORTMONTH.indexOf(t)}},MM:{regex:"0[1-9]|1[0-2]",apply:function(e){this.month=e-1}},M:{regex:"[1-9]|1[0-2]",apply:function(e){this.month=e-1}},dd:{regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(e){this.date=+e}},d:{regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(e){this.date=+e}},EEEE:{regex:e.DATETIME_FORMATS.DAY.join("|")},EEE:{regex:e.DATETIME_FORMATS.SHORTDAY.join("|")}};this.parse=function(t,r){if(!angular.isString(t)||!r)return t;r=e.DATETIME_FORMATS[r]||r,this.parsers[r]||(this.parsers[r]=n(r));var o=this.parsers[r],a=o.regex,s=o.map,l=t.match(a);if(l&&l.length){for(var c,u={year:1900,month:0,date:1,hours:0},d=1,f=l.length;d<f;d++){var p=s[d-1];p.apply&&p.apply.call(u,l[d])}return i(u.year,u.month,u.date)&&(c=new Date(u.year,u.month,u.date,u.hours)),c}}}]),angular.module("ui.bootstrap.position",[]).factory("$position",["$document","$window",function(e,t){function n(e,n){return e.currentStyle?e.currentStyle[n]:t.getComputedStyle?t.getComputedStyle(e)[n]:e.style[n]}function i(e){return"static"===(n(e,"position")||"static")}var r=function(t){for(var n=e[0],r=t.offsetParent||n;r&&r!==n&&i(r);)r=r.offsetParent;return r||n};return{position:function(t){var n=this.offset(t),i={top:0,left:0},o=r(t[0]);o!=e[0]&&(i=this.offset(angular.element(o)),i.top+=o.clientTop-o.scrollTop,i.left+=o.clientLeft-o.scrollLeft);var a=t[0].getBoundingClientRect();return{width:a.width||t.prop("offsetWidth"),height:a.height||t.prop("offsetHeight"),top:n.top-i.top,left:n.left-i.left}},offset:function(n){var i=n[0].getBoundingClientRect();return{width:i.width||n.prop("offsetWidth"),height:i.height||n.prop("offsetHeight"),top:i.top+(t.pageYOffset||e[0].documentElement.scrollTop),left:i.left+(t.pageXOffset||e[0].documentElement.scrollLeft)}},positionElements:function(e,t,n,i){var r,o,a,s,l=n.split("-"),c=l[0],u=l[1]||"center";r=i?this.offset(e):this.position(e),o=t.prop("offsetWidth"),a=t.prop("offsetHeight");var d={center:function(){return r.left+r.width/2-o/2},left:function(){return r.left},right:function(){return r.left+r.width}},f={center:function(){return r.top+r.height/2-a/2},top:function(){return r.top},bottom:function(){return r.top+r.height}};switch(c){case"right":s={top:f[u](),left:d[c]()};break;case"left":s={top:f[u](),left:r.left-o};break;case"bottom":s={top:f[c](),left:d[u]()};break;default:s={top:r.top-a,left:d[u]()}}return s}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.position"]).constant("datepickerConfig",{formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",datepickerMode:"day",minMode:"day",maxMode:"year",showWeeks:!0,startingDay:0,yearRange:20,minDate:null,maxDate:null}).controller("DatepickerController",["$scope","$attrs","$parse","$interpolate","$timeout","$log","dateFilter","datepickerConfig",function(e,t,n,i,r,o,a,s){var l=this,c={$setViewValue:angular.noop};this.modes=["day","month","year"],angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","minMode","maxMode","showWeeks","startingDay","yearRange"],function(n,r){l[n]=angular.isDefined(t[n])?r<8?i(t[n])(e.$parent):e.$parent.$eval(t[n]):s[n]}),angular.forEach(["minDate","maxDate"],function(i){t[i]?e.$parent.$watch(n(t[i]),function(e){l[i]=e?new Date(e):null,l.refreshView()}):l[i]=s[i]?new Date(s[i]):null}),e.datepickerMode=e.datepickerMode||s.datepickerMode,e.uniqueId="datepicker-"+e.$id+"-"+Math.floor(1e4*Math.random()),this.activeDate=angular.isDefined(t.initDate)?e.$parent.$eval(t.initDate):new Date,e.isActive=function(t){return 0===l.compare(t.date,l.activeDate)&&(e.activeDateId=t.uid,!0)},this.init=function(e){c=e,c.$render=function(){l.render()}},this.render=function(){if(c.$modelValue){var e=new Date(c.$modelValue),t=!isNaN(e);t?this.activeDate=e:o.error('Datepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.'),c.$setValidity("date",t)}this.refreshView()},this.refreshView=function(){if(this.element){this._refreshView();var e=c.$modelValue?new Date(c.$modelValue):null;c.$setValidity("date-disabled",!e||this.element&&!this.isDisabled(e))}},this.createDateObject=function(e,t){var n=c.$modelValue?new Date(c.$modelValue):null;return{date:e,label:a(e,t),selected:n&&0===this.compare(e,n),disabled:this.isDisabled(e),current:0===this.compare(e,new Date)}},this.isDisabled=function(n){return this.minDate&&this.compare(n,this.minDate)<0||this.maxDate&&this.compare(n,this.maxDate)>0||t.dateDisabled&&e.dateDisabled({date:n,mode:e.datepickerMode})},this.split=function(e,t){for(var n=[];e.length>0;)n.push(e.splice(0,t));return n},e.select=function(t){if(e.datepickerMode===l.minMode){var n=c.$modelValue?new Date(c.$modelValue):new Date(0,0,0,0,0,0,0);n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),c.$setViewValue(n),c.$render()}else l.activeDate=t,e.datepickerMode=l.modes[l.modes.indexOf(e.datepickerMode)-1]},e.move=function(e){var t=l.activeDate.getFullYear()+e*(l.step.years||0),n=l.activeDate.getMonth()+e*(l.step.months||0);l.activeDate.setFullYear(t,n,1),l.refreshView()},e.toggleMode=function(t){t=t||1,e.datepickerMode===l.maxMode&&1===t||e.datepickerMode===l.minMode&&-1===t||(e.datepickerMode=l.modes[l.modes.indexOf(e.datepickerMode)+t])},e.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var u=function(){r(function(){l.element[0].focus()},0,!1)};e.$on("datepicker.focus",u),e.keydown=function(t){var n=e.keys[t.which];if(n&&!t.shiftKey&&!t.altKey)if(t.preventDefault(),t.stopPropagation(),"enter"===n||"space"===n){if(l.isDisabled(l.activeDate))return;e.select(l.activeDate),u()}else!t.ctrlKey||"up"!==n&&"down"!==n?(l.handleKeyDown(n,t),l.refreshView()):(e.toggleMode("up"===n?1:-1),u())}}]).directive("datepicker",function(){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/datepicker.html",scope:{datepickerMode:"=?",dateDisabled:"&"},require:["datepicker","?^ngModel"],controller:"DatepickerController",link:function(e,t,n,i){var r=i[0],o=i[1];o&&r.init(o)}}}).directive("daypicker",["dateFilter",function(e){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/day.html",require:"^datepicker",link:function(t,n,i,r){function o(e,t){return 1!==t||e%4!=0||e%100==0&&e%400!=0?l[t]:29}function a(e,t){var n=new Array(t),i=new Date(e),r=0;for(i.setHours(12);r<t;)n[r++]=new Date(i),i.setDate(i.getDate()+1);return n}function s(e){var t=new Date(e);t.setDate(t.getDate()+4-(t.getDay()||7));var n=t.getTime();return t.setMonth(0),t.setDate(1),Math.floor(Math.round((n-t)/864e5)/7)+1}t.showWeeks=r.showWeeks,r.step={months:1},r.element=n;var l=[31,28,31,30,31,30,31,31,30,31,30,31];r._refreshView=function(){var n=r.activeDate.getFullYear(),i=r.activeDate.getMonth(),o=new Date(n,i,1),l=r.startingDay-o.getDay(),c=l>0?7-l:-l,u=new Date(o);c>0&&u.setDate(1-c);for(var d=a(u,42),f=0;f<42;f++)d[f]=angular.extend(r.createDateObject(d[f],r.formatDay),{secondary:d[f].getMonth()!==i,uid:t.uniqueId+"-"+f});t.labels=new Array(7);for(var p=0;p<7;p++)t.labels[p]={abbr:e(d[p].date,r.formatDayHeader),full:e(d[p].date,"EEEE")};if(t.title=e(r.activeDate,r.formatDayTitle),t.rows=r.split(d,7),t.showWeeks){t.weekNumbers=[];for(var h=s(t.rows[0][0].date),g=t.rows.length;t.weekNumbers.push(h++)<g;);}},r.compare=function(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate())-new Date(t.getFullYear(),t.getMonth(),t.getDate())},r.handleKeyDown=function(e,t){var n=r.activeDate.getDate();if("left"===e)n-=1;else if("up"===e)n-=7;else if("right"===e)n+=1;else if("down"===e)n+=7;else if("pageup"===e||"pagedown"===e){var i=r.activeDate.getMonth()+("pageup"===e?-1:1);r.activeDate.setMonth(i,1),n=Math.min(o(r.activeDate.getFullYear(),r.activeDate.getMonth()),n)}else"home"===e?n=1:"end"===e&&(n=o(r.activeDate.getFullYear(),r.activeDate.getMonth()));r.activeDate.setDate(n)},r.refreshView()}}}]).directive("monthpicker",["dateFilter",function(e){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/month.html",require:"^datepicker",link:function(t,n,i,r){r.step={years:1},r.element=n,r._refreshView=function(){for(var n=new Array(12),i=r.activeDate.getFullYear(),o=0;o<12;o++)n[o]=angular.extend(r.createDateObject(new Date(i,o,1),r.formatMonth),{uid:t.uniqueId+"-"+o});t.title=e(r.activeDate,r.formatMonthTitle),t.rows=r.split(n,3)},r.compare=function(e,t){return new Date(e.getFullYear(),e.getMonth())-new Date(t.getFullYear(),t.getMonth())},r.handleKeyDown=function(e,t){var n=r.activeDate.getMonth();if("left"===e)n-=1;else if("up"===e)n-=3;else if("right"===e)n+=1;else if("down"===e)n+=3;else if("pageup"===e||"pagedown"===e){var i=r.activeDate.getFullYear()+("pageup"===e?-1:1);r.activeDate.setFullYear(i)}else"home"===e?n=0:"end"===e&&(n=11);r.activeDate.setMonth(n)},r.refreshView()}}}]).directive("yearpicker",["dateFilter",function(e){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/year.html",require:"^datepicker",link:function(e,t,n,i){function r(e){return parseInt((e-1)/o,10)*o+1}var o=i.yearRange;i.step={years:o},i.element=t,i._refreshView=function(){for(var t=new Array(o),n=0,a=r(i.activeDate.getFullYear());n<o;n++)t[n]=angular.extend(i.createDateObject(new Date(a+n,0,1),i.formatYear),{uid:e.uniqueId+"-"+n});e.title=[t[0].label,t[o-1].label].join(" - "),e.rows=i.split(t,5)},i.compare=function(e,t){return e.getFullYear()-t.getFullYear()},i.handleKeyDown=function(e,t){var n=i.activeDate.getFullYear();"left"===e?n-=1:"up"===e?n-=5:"right"===e?n+=1:"down"===e?n+=5:"pageup"===e||"pagedown"===e?n+=("pageup"===e?-1:1)*i.step.years:"home"===e?n=r(i.activeDate.getFullYear()):"end"===e&&(n=r(i.activeDate.getFullYear())+o-1),i.activeDate.setFullYear(n)},i.refreshView()}}}]).constant("datepickerPopupConfig",{datepickerPopup:"yyyy-MM-dd",currentText:"Today",clearText:"Clear",closeText:"Done",closeOnDateSelection:!0,appendToBody:!1,showButtonBar:!0}).directive("datepickerPopup",["$compile","$parse","$document","$position","dateFilter","dateParser","datepickerPopupConfig",function(e,t,n,i,r,o,a){return{restrict:"EA",require:"ngModel",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&"},link:function(s,l,c,u){function d(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}function f(e){if(e){if(angular.isDate(e)&&!isNaN(e))return u.$setValidity("date",!0),e;if(angular.isString(e)){var t=o.parse(e,p)||new Date(e);return isNaN(t)?void u.$setValidity("date",!1):(u.$setValidity("date",!0),t)}return void u.$setValidity("date",!1)}return u.$setValidity("date",!0),null}var p,h=angular.isDefined(c.closeOnDateSelection)?s.$parent.$eval(c.closeOnDateSelection):a.closeOnDateSelection,g=angular.isDefined(c.datepickerAppendToBody)?s.$parent.$eval(c.datepickerAppendToBody):a.appendToBody;s.showButtonBar=angular.isDefined(c.showButtonBar)?s.$parent.$eval(c.showButtonBar):a.showButtonBar,s.getText=function(e){return s[e+"Text"]||a[e+"Text"]},c.$observe("datepickerPopup",function(e){p=e||a.datepickerPopup,u.$render()});var m=angular.element("<div datepicker-popup-wrap><div datepicker></div></div>");m.attr({"ng-model":"date","ng-change":"dateSelection()"});var v=angular.element(m.children()[0]);c.datepickerOptions&&angular.forEach(s.$parent.$eval(c.datepickerOptions),function(e,t){v.attr(d(t),e)}),s.watchData={},angular.forEach(["minDate","maxDate","datepickerMode"],function(e){if(c[e]){var n=t(c[e]);if(s.$parent.$watch(n,function(t){s.watchData[e]=t}),v.attr(d(e),"watchData."+e),"datepickerMode"===e){var i=n.assign;s.$watch("watchData."+e,function(e,t){e!==t&&i(s.$parent,e)})}}}),c.dateDisabled&&v.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),u.$parsers.unshift(f),s.dateSelection=function(e){angular.isDefined(e)&&(s.date=e),u.$setViewValue(s.date),u.$render(),h&&(s.isOpen=!1,l[0].focus())},l.bind("input change keyup",function(){s.$apply(function(){s.date=u.$modelValue})}),u.$render=function(){var e=u.$viewValue?r(u.$viewValue,p):"";l.val(e),s.date=f(u.$modelValue)};var $=function(e){s.isOpen&&e.target!==l[0]&&s.$apply(function(){s.isOpen=!1})},y=function(e,t){s.keydown(e)};l.bind("keydown",y),s.keydown=function(e){27===e.which?(e.preventDefault(),e.stopPropagation(),s.close()):40!==e.which||s.isOpen||(s.isOpen=!0)},s.$watch("isOpen",function(e){e?(s.$broadcast("datepicker.focus"),s.position=g?i.offset(l):i.position(l),s.position.top=s.position.top+l.prop("offsetHeight"),n.bind("click",$)):n.unbind("click",$)}),s.select=function(e){if("today"===e){var t=new Date;angular.isDate(u.$modelValue)?(e=new Date(u.$modelValue),e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate())):e=new Date(t.setHours(0,0,0,0))}s.dateSelection(e)},s.close=function(){s.isOpen=!1,l[0].focus()};var b=e(m)(s);m.remove(),g?n.find("body").append(b):l.after(b),s.$on("$destroy",function(){b.remove(),l.unbind("keydown",y),n.unbind("click",$)})}}}]).directive("datepickerPopupWrap",function(){return{restrict:"EA",replace:!0,transclude:!0,templateUrl:"template/datepicker/popup.html",link:function(e,t,n){t.bind("click",function(e){e.preventDefault(),e.stopPropagation()})}}}),angular.module("ui.bootstrap.dropdown",[]).constant("dropdownConfig",{openClass:"open"}).service("dropdownService",["$document",function(e){var t=null;this.open=function(r){t||(e.bind("click",n),e.bind("keydown",i)),t&&t!==r&&(t.isOpen=!1),t=r},this.close=function(r){t===r&&(t=null,e.unbind("click",n),e.unbind("keydown",i))};var n=function(e){if(t){var n=t.getToggleElement();e&&n&&n[0].contains(e.target)||t.$apply(function(){t.isOpen=!1})}},i=function(e){27===e.which&&(t.focusToggleElement(),n())}}]).controller("DropdownController",["$scope","$attrs","$parse","dropdownConfig","dropdownService","$animate",function(e,t,n,i,r,o){var a,s=this,l=e.$new(),c=i.openClass,u=angular.noop,d=t.onToggle?n(t.onToggle):angular.noop;this.init=function(i){s.$element=i,t.isOpen&&(a=n(t.isOpen),u=a.assign,e.$watch(a,function(e){l.isOpen=!!e}))},this.toggle=function(e){return l.isOpen=arguments.length?!!e:!l.isOpen},this.isOpen=function(){return l.isOpen},l.getToggleElement=function(){return s.toggleElement},l.focusToggleElement=function(){s.toggleElement&&s.toggleElement[0].focus()},l.$watch("isOpen",function(t,n){o[t?"addClass":"removeClass"](s.$element,c),t?(l.focusToggleElement(),r.open(l)):r.close(l),u(e,t),angular.isDefined(t)&&t!==n&&d(e,{open:!!t})}),e.$on("$locationChangeSuccess",function(){l.isOpen=!1}),e.$on("$destroy",function(){l.$destroy()})}]).directive("dropdown",function(){return{controller:"DropdownController",link:function(e,t,n,i){i.init(t)}}}).directive("dropdownToggle",function(){return{require:"?^dropdown",link:function(e,t,n,i){if(i){i.toggleElement=t;var r=function(r){r.preventDefault(),t.hasClass("disabled")||n.disabled||e.$apply(function(){i.toggle()})};t.bind("click",r),t.attr({"aria-haspopup":!0,"aria-expanded":!1}),e.$watch(i.isOpen,function(e){t.attr("aria-expanded",!!e)}),e.$on("$destroy",function(){t.unbind("click",r)})}}}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.transition"]).factory("$$stackedMap",function(){return{createNew:function(){var e=[];return{add:function(t,n){e.push({key:t,value:n})},get:function(t){for(var n=0;n<e.length;n++)if(t==e[n].key)return e[n]},keys:function(){for(var t=[],n=0;n<e.length;n++)t.push(e[n].key);return t},top:function(){return e[e.length-1]},remove:function(t){for(var n=-1,i=0;i<e.length;i++)if(t==e[i].key){n=i;break}return e.splice(n,1)[0]},removeTop:function(){return e.splice(e.length-1,1)[0]},length:function(){return e.length}}}}}).directive("modalBackdrop",["$timeout",function(e){return{restrict:"EA",replace:!0,templateUrl:"template/modal/backdrop.html",link:function(t,n,i){t.backdropClass=i.backdropClass||"",t.animate=!1,e(function(){t.animate=!0})}}}]).directive("modalWindow",["$modalStack","$timeout",function(e,t){return{restrict:"EA",scope:{index:"@",animate:"="},replace:!0,transclude:!0,templateUrl:function(e,t){return t.templateUrl||"template/modal/window.html"},link:function(n,i,r){i.addClass(r.windowClass||""),n.size=r.size,t(function(){n.animate=!0,i[0].querySelectorAll("[autofocus]").length||i[0].focus()}),n.close=function(t){var n=e.getTop();n&&n.value.backdrop&&"static"!=n.value.backdrop&&t.target===t.currentTarget&&(t.preventDefault(),t.stopPropagation(),e.dismiss(n.key,"backdrop click"))}}}}]).directive("modalTransclude",function(){return{link:function(e,t,n,i,r){r(e.$parent,function(e){t.empty(),t.append(e)})}}}).factory("$modalStack",["$transition","$timeout","$document","$compile","$rootScope","$$stackedMap",function(e,t,n,i,r,o){function a(){for(var e=-1,t=p.keys(),n=0;n<t.length;n++)p.get(t[n]).value.backdrop&&(e=n);return e}function s(e){var t=n.find("body").eq(0),i=p.get(e).value;p.remove(e),c(i.modalDomEl,i.modalScope,300,function(){i.modalScope.$destroy(),t.toggleClass(f,p.length()>0),l()})}function l(){if(u&&-1==a()){var e=d;c(u,d,150,function(){e.$destroy(),e=null}),u=void 0,d=void 0}}function c(n,i,r,o){function a(){a.done||(a.done=!0,n.remove(),o&&o())}i.animate=!1;var s=e.transitionEndEventName;if(s){var l=t(a,r);n.bind(s,function(){t.cancel(l),a(),i.$apply()})}else t(a)}var u,d,f="modal-open",p=o.createNew(),h={};return r.$watch(a,function(e){d&&(d.index=e)}),n.bind("keydown",function(e){var t;27===e.which&&(t=p.top())&&t.value.keyboard&&(e.preventDefault(),r.$apply(function(){h.dismiss(t.key,"escape key press")}))}),h.open=function(e,t){p.add(e,{deferred:t.deferred,modalScope:t.scope,backdrop:t.backdrop,keyboard:t.keyboard});var o=n.find("body").eq(0),s=a();if(s>=0&&!u){d=r.$new(!0),d.index=s;var l=angular.element("<div modal-backdrop></div>");l.attr("backdrop-class",t.backdropClass),u=i(l)(d),o.append(u)}var c=angular.element("<div modal-window></div>");c.attr({"template-url":t.windowTemplateUrl,"window-class":t.windowClass,size:t.size,index:p.length()-1,animate:"animate"}).html(t.content);var h=i(c)(t.scope);p.top().value.modalDomEl=h,o.append(h),o.addClass(f)},h.close=function(e,t){var n=p.get(e);n&&(n.value.deferred.resolve(t),s(e))},h.dismiss=function(e,t){var n=p.get(e);n&&(n.value.deferred.reject(t),s(e))},h.dismissAll=function(e){for(var t=this.getTop();t;)this.dismiss(t.key,e),t=this.getTop()},h.getTop=function(){return p.top()},h}]).provider("$modal",function(){var e={options:{backdrop:!0,keyboard:!0},$get:["$injector","$rootScope","$q","$http","$templateCache","$controller","$modalStack",function(t,n,i,r,o,a,s){function l(e){return e.template?i.when(e.template):r.get(angular.isFunction(e.templateUrl)?e.templateUrl():e.templateUrl,{cache:o}).then(function(e){return e.data})}function c(e){var n=[];return angular.forEach(e,function(e){(angular.isFunction(e)||angular.isArray(e))&&n.push(i.when(t.invoke(e)))}),n}var u={};return u.open=function(t){var r=i.defer(),o=i.defer(),u={result:r.promise,opened:o.promise,close:function(e){s.close(u,e)},dismiss:function(e){s.dismiss(u,e)}};if(t=angular.extend({},e.options,t),t.resolve=t.resolve||{},!t.template&&!t.templateUrl)throw new Error("One of template or templateUrl options is required.");var d=i.all([l(t)].concat(c(t.resolve)));return d.then(function(e){var i=(t.scope||n).$new();i.$close=u.close,i.$dismiss=u.dismiss;var o,l={},c=1;t.controller&&(l.$scope=i,l.$modalInstance=u,angular.forEach(t.resolve,function(t,n){l[n]=e[c++]}),o=a(t.controller,l),t.controllerAs&&(i[t.controllerAs]=o)),s.open(u,{scope:i,deferred:r,content:e[0],backdrop:t.backdrop,keyboard:t.keyboard,backdropClass:t.backdropClass,windowClass:t.windowClass,windowTemplateUrl:t.windowTemplateUrl,size:t.size})},function(e){r.reject(e)}),d.then(function(){o.resolve(!0)},function(){o.reject(!1)}),u},u}]};return e}),angular.module("ui.bootstrap.pagination",[]).controller("PaginationController",["$scope","$attrs","$parse",function(e,t,n){var i=this,r={$setViewValue:angular.noop},o=t.numPages?n(t.numPages).assign:angular.noop;this.init=function(o,a){r=o,this.config=a,r.$render=function(){i.render()},t.itemsPerPage?e.$parent.$watch(n(t.itemsPerPage),function(t){i.itemsPerPage=parseInt(t,10),e.totalPages=i.calculateTotalPages()}):this.itemsPerPage=a.itemsPerPage},this.calculateTotalPages=function(){var t=this.itemsPerPage<1?1:Math.ceil(e.totalItems/this.itemsPerPage);return Math.max(t||0,1)},this.render=function(){e.page=parseInt(r.$viewValue,10)||1},e.selectPage=function(t){e.page!==t&&t>0&&t<=e.totalPages&&(r.$setViewValue(t),r.$render())},e.getText=function(t){return e[t+"Text"]||i.config[t+"Text"]},e.noPrevious=function(){return 1===e.page},e.noNext=function(){return e.page===e.totalPages},e.$watch("totalItems",function(){e.totalPages=i.calculateTotalPages()}),e.$watch("totalPages",function(t){o(e.$parent,t),e.page>t?e.selectPage(t):r.$render()})}]).constant("paginationConfig",{itemsPerPage:10,boundaryLinks:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0}).directive("pagination",["$parse","paginationConfig",function(e,t){return{restrict:"EA",scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@"},require:["pagination","?ngModel"],controller:"PaginationController",templateUrl:"template/pagination/pagination.html",replace:!0,link:function(n,i,r,o){function a(e,t,n){return{number:e,text:t,active:n}}function s(e,t){var n=[],i=1,r=t,o=angular.isDefined(u)&&u<t;o&&(d?(i=Math.max(e-Math.floor(u/2),1),(r=i+u-1)>t&&(r=t,i=r-u+1)):(i=(Math.ceil(e/u)-1)*u+1,r=Math.min(i+u-1,t)));for(var s=i;s<=r;s++){var l=a(s,s,s===e);n.push(l)}if(o&&!d){if(i>1){var c=a(i-1,"...",!1);n.unshift(c)}if(r<t){var f=a(r+1,"...",!1);n.push(f)}}return n}var l=o[0],c=o[1];if(c){var u=angular.isDefined(r.maxSize)?n.$parent.$eval(r.maxSize):t.maxSize,d=angular.isDefined(r.rotate)?n.$parent.$eval(r.rotate):t.rotate;n.boundaryLinks=angular.isDefined(r.boundaryLinks)?n.$parent.$eval(r.boundaryLinks):t.boundaryLinks,n.directionLinks=angular.isDefined(r.directionLinks)?n.$parent.$eval(r.directionLinks):t.directionLinks,l.init(c,t),r.maxSize&&n.$parent.$watch(e(r.maxSize),function(e){u=parseInt(e,10),l.render()});var f=l.render;l.render=function(){f(),n.page>0&&n.page<=n.totalPages&&(n.pages=s(n.page,n.totalPages))}}}}}]).constant("pagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("pager",["pagerConfig",function(e){return{restrict:"EA",scope:{totalItems:"=",previousText:"@",nextText:"@"},require:["pager","?ngModel"],controller:"PaginationController",templateUrl:"template/pagination/pager.html",replace:!0,link:function(t,n,i,r){var o=r[0],a=r[1];a&&(t.align=angular.isDefined(i.align)?t.$parent.$eval(i.align):e.align,o.init(a,e))}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).provider("$tooltip",function(){function e(e){var t=/[A-Z]/g;return e.replace(t,function(e,t){return(t?"-":"")+e.toLowerCase()})}var t={placement:"top",animation:!0,popupDelay:0},n={mouseenter:"mouseleave",click:"click",focus:"blur"},i={};this.options=function(e){angular.extend(i,e)},this.setTriggers=function(e){angular.extend(n,e)},this.$get=["$window","$compile","$timeout","$document","$position","$interpolate",function(r,o,a,s,l,c){return function(r,u,d){function f(e){var t=e||p.trigger||d;return{show:t,hide:n[t]||t}}var p=angular.extend({},t,i),h=e(r),g=c.startSymbol(),m=c.endSymbol(),v="<div "+h+'-popup title="'+g+"title"+m+'" content="'+g+"content"+m+'" placement="'+g+"placement"+m+'" animation="animation" is-open="isOpen"></div>';return{restrict:"EA",compile:function(e,t){var n=o(v);return function(e,t,i){function o(){D.isOpen?d():c()}function c(){T&&!e.$eval(i[u+"Enable"])||($(),D.popupDelay?k||(k=a(h,D.popupDelay,!1),k.then(function(e){e()})):h()())}function d(){e.$apply(function(){g()})}function h(){return k=null,C&&(a.cancel(C),C=null),D.content?(m(),w.css({top:0,
+left:0,display:"block"}),D.$digest(),A(),D.isOpen=!0,D.$digest(),A):angular.noop}function g(){D.isOpen=!1,a.cancel(k),k=null,D.animation?C||(C=a(v,500)):v()}function m(){w&&v(),x=D.$new(),w=n(x,function(e){S?s.find("body").append(e):t.after(e)})}function v(){C=null,w&&(w.remove(),w=null),x&&(x.$destroy(),x=null)}function $(){y(),b()}function y(){var e=i[u+"Placement"];D.placement=angular.isDefined(e)?e:p.placement}function b(){var e=i[u+"PopupDelay"],t=parseInt(e,10);D.popupDelay=isNaN(t)?p.popupDelay:t}var w,x,C,k,S=!!angular.isDefined(p.appendToBody)&&p.appendToBody,E=f(void 0),T=angular.isDefined(i[u+"Enable"]),D=e.$new(!0),A=function(){var e=l.positionElements(t,w,D.placement,S);e.top+="px",e.left+="px",w.css(e)};D.isOpen=!1,i.$observe(r,function(e){D.content=e,!e&&D.isOpen&&g()}),i.$observe(u+"Title",function(e){D.title=e});var M=function(){t.unbind(E.show,c),t.unbind(E.hide,d)};!function(){var e=i[u+"Trigger"];M(),E=f(e),E.show===E.hide?t.bind(E.show,o):(t.bind(E.show,c),t.bind(E.hide,d))}();var O=e.$eval(i[u+"Animation"]);D.animation=angular.isDefined(O)?!!O:p.animation;var I=e.$eval(i[u+"AppendToBody"]);S=angular.isDefined(I)?I:S,S&&e.$on("$locationChangeSuccess",function(){D.isOpen&&g()}),e.$on("$destroy",function(){a.cancel(C),a.cancel(k),M(),v(),D=null})}}}}}]}).directive("tooltipPopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-popup.html"}}).directive("tooltip",["$tooltip",function(e){return e("tooltip","tooltip","mouseenter")}]).directive("tooltipHtmlUnsafePopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-unsafe-popup.html"}}).directive("tooltipHtmlUnsafe",["$tooltip",function(e){return e("tooltipHtmlUnsafe","tooltip","mouseenter")}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("popoverPopup",function(){return{restrict:"EA",replace:!0,scope:{title:"@",content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover.html"}}).directive("popover",["$tooltip",function(e){return e("popover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("progressConfig",{animate:!0,max:100}).controller("ProgressController",["$scope","$attrs","progressConfig",function(e,t,n){var i=this,r=angular.isDefined(t.animate)?e.$parent.$eval(t.animate):n.animate;this.bars=[],e.max=angular.isDefined(t.max)?e.$parent.$eval(t.max):n.max,this.addBar=function(t,n){r||n.css({transition:"none"}),this.bars.push(t),t.$watch("value",function(n){t.percent=+(100*n/e.max).toFixed(2)}),t.$on("$destroy",function(){n=null,i.removeBar(t)})},this.removeBar=function(e){this.bars.splice(this.bars.indexOf(e),1)}}]).directive("progress",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",require:"progress",scope:{},templateUrl:"template/progressbar/progress.html"}}).directive("bar",function(){return{restrict:"EA",replace:!0,transclude:!0,require:"^progress",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/bar.html",link:function(e,t,n,i){i.addBar(e,t)}}}).directive("progressbar",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/progressbar.html",link:function(e,t,n,i){i.addBar(e,angular.element(t.children()[0]))}}}),angular.module("ui.bootstrap.rating",[]).constant("ratingConfig",{max:5,stateOn:null,stateOff:null}).controller("RatingController",["$scope","$attrs","ratingConfig",function(e,t,n){var i={$setViewValue:angular.noop};this.init=function(r){i=r,i.$render=this.render,this.stateOn=angular.isDefined(t.stateOn)?e.$parent.$eval(t.stateOn):n.stateOn,this.stateOff=angular.isDefined(t.stateOff)?e.$parent.$eval(t.stateOff):n.stateOff;var o=angular.isDefined(t.ratingStates)?e.$parent.$eval(t.ratingStates):new Array(angular.isDefined(t.max)?e.$parent.$eval(t.max):n.max);e.range=this.buildTemplateObjects(o)},this.buildTemplateObjects=function(e){for(var t=0,n=e.length;t<n;t++)e[t]=angular.extend({index:t},{stateOn:this.stateOn,stateOff:this.stateOff},e[t]);return e},e.rate=function(t){!e.readonly&&t>=0&&t<=e.range.length&&(i.$setViewValue(t),i.$render())},e.enter=function(t){e.readonly||(e.value=t),e.onHover({value:t})},e.reset=function(){e.value=i.$viewValue,e.onLeave()},e.onKeydown=function(t){/(37|38|39|40)/.test(t.which)&&(t.preventDefault(),t.stopPropagation(),e.rate(e.value+(38===t.which||39===t.which?1:-1)))},this.render=function(){e.value=i.$viewValue}}]).directive("rating",function(){return{restrict:"EA",require:["rating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"RatingController",templateUrl:"template/rating/rating.html",replace:!0,link:function(e,t,n,i){var r=i[0],o=i[1];o&&r.init(o)}}}),angular.module("ui.bootstrap.tabs",[]).controller("TabsetController",["$scope",function(e){var t=this,n=t.tabs=e.tabs=[];t.select=function(e){angular.forEach(n,function(t){t.active&&t!==e&&(t.active=!1,t.onDeselect())}),e.active=!0,e.onSelect()},t.addTab=function(e){n.push(e),1===n.length?e.active=!0:e.active&&t.select(e)},t.removeTab=function(e){var r=n.indexOf(e);if(e.active&&n.length>1&&!i){var o=r==n.length-1?r-1:r+1;t.select(n[o])}n.splice(r,1)};var i;e.$on("$destroy",function(){i=!0})}]).directive("tabset",function(){return{restrict:"EA",transclude:!0,replace:!0,scope:{type:"@"},controller:"TabsetController",templateUrl:"template/tabs/tabset.html",link:function(e,t,n){e.vertical=!!angular.isDefined(n.vertical)&&e.$parent.$eval(n.vertical),e.justified=!!angular.isDefined(n.justified)&&e.$parent.$eval(n.justified)}}}).directive("tab",["$parse",function(e){return{require:"^tabset",restrict:"EA",replace:!0,templateUrl:"template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},compile:function(t,n,i){return function(t,n,r,o){t.$watch("active",function(e){e&&o.select(t)}),t.disabled=!1,r.disabled&&t.$parent.$watch(e(r.disabled),function(e){t.disabled=!!e}),t.select=function(){t.disabled||(t.active=!0)},o.addTab(t),t.$on("$destroy",function(){o.removeTab(t)}),t.$transcludeFn=i}}}}]).directive("tabHeadingTransclude",[function(){return{restrict:"A",require:"^tab",link:function(e,t,n,i){e.$watch("headingElement",function(e){e&&(t.html(""),t.append(e))})}}}]).directive("tabContentTransclude",function(){function e(e){return e.tagName&&(e.hasAttribute("tab-heading")||e.hasAttribute("data-tab-heading")||"tab-heading"===e.tagName.toLowerCase()||"data-tab-heading"===e.tagName.toLowerCase())}return{restrict:"A",require:"^tabset",link:function(t,n,i){var r=t.$eval(i.tabContentTransclude);r.$transcludeFn(r.$parent,function(t){angular.forEach(t,function(t){e(t)?r.headingElement=t:n.append(t)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("timepickerConfig",{hourStep:1,minuteStep:1,showMeridian:!0,meridians:null,readonlyInput:!1,mousewheel:!0}).controller("TimepickerController",["$scope","$attrs","$parse","$log","$locale","timepickerConfig",function(e,t,n,i,r,o){function a(){var t=parseInt(e.hours,10);if(e.showMeridian?t>0&&t<13:t>=0&&t<24)return e.showMeridian&&(12===t&&(t=0),e.meridian===g[1]&&(t+=12)),t}function s(){var t=parseInt(e.minutes,10);return t>=0&&t<60?t:void 0}function l(e){return angular.isDefined(e)&&e.toString().length<2?"0"+e:e}function c(e){u(),h.$setViewValue(new Date(p)),d(e)}function u(){h.$setValidity("time",!0),e.invalidHours=!1,e.invalidMinutes=!1}function d(t){var n=p.getHours(),i=p.getMinutes();e.showMeridian&&(n=0===n||12===n?12:n%12),e.hours="h"===t?n:l(n),e.minutes="m"===t?i:l(i),e.meridian=p.getHours()<12?g[0]:g[1]}function f(e){var t=new Date(p.getTime()+6e4*e);p.setHours(t.getHours(),t.getMinutes()),c()}var p=new Date,h={$setViewValue:angular.noop},g=angular.isDefined(t.meridians)?e.$parent.$eval(t.meridians):o.meridians||r.DATETIME_FORMATS.AMPMS;this.init=function(n,i){h=n,h.$render=this.render;var r=i.eq(0),a=i.eq(1);(angular.isDefined(t.mousewheel)?e.$parent.$eval(t.mousewheel):o.mousewheel)&&this.setupMousewheelEvents(r,a),e.readonlyInput=angular.isDefined(t.readonlyInput)?e.$parent.$eval(t.readonlyInput):o.readonlyInput,this.setupInputEvents(r,a)};var m=o.hourStep;t.hourStep&&e.$parent.$watch(n(t.hourStep),function(e){m=parseInt(e,10)});var v=o.minuteStep;t.minuteStep&&e.$parent.$watch(n(t.minuteStep),function(e){v=parseInt(e,10)}),e.showMeridian=o.showMeridian,t.showMeridian&&e.$parent.$watch(n(t.showMeridian),function(t){if(e.showMeridian=!!t,h.$error.time){var n=a(),i=s();angular.isDefined(n)&&angular.isDefined(i)&&(p.setHours(n),c())}else d()}),this.setupMousewheelEvents=function(t,n){var i=function(e){e.originalEvent&&(e=e.originalEvent);var t=e.wheelDelta?e.wheelDelta:-e.deltaY;return e.detail||t>0};t.bind("mousewheel wheel",function(t){e.$apply(i(t)?e.incrementHours():e.decrementHours()),t.preventDefault()}),n.bind("mousewheel wheel",function(t){e.$apply(i(t)?e.incrementMinutes():e.decrementMinutes()),t.preventDefault()})},this.setupInputEvents=function(t,n){if(e.readonlyInput)return e.updateHours=angular.noop,void(e.updateMinutes=angular.noop);var i=function(t,n){h.$setViewValue(null),h.$setValidity("time",!1),angular.isDefined(t)&&(e.invalidHours=t),angular.isDefined(n)&&(e.invalidMinutes=n)};e.updateHours=function(){var e=a();angular.isDefined(e)?(p.setHours(e),c("h")):i(!0)},t.bind("blur",function(t){!e.invalidHours&&e.hours<10&&e.$apply(function(){e.hours=l(e.hours)})}),e.updateMinutes=function(){var e=s();angular.isDefined(e)?(p.setMinutes(e),c("m")):i(void 0,!0)},n.bind("blur",function(t){!e.invalidMinutes&&e.minutes<10&&e.$apply(function(){e.minutes=l(e.minutes)})})},this.render=function(){var e=h.$modelValue?new Date(h.$modelValue):null;isNaN(e)?(h.$setValidity("time",!1),i.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(e&&(p=e),u(),d())},e.incrementHours=function(){f(60*m)},e.decrementHours=function(){f(60*-m)},e.incrementMinutes=function(){f(v)},e.decrementMinutes=function(){f(-v)},e.toggleMeridian=function(){f(720*(p.getHours()<12?1:-1))}}]).directive("timepicker",function(){return{restrict:"EA",require:["timepicker","?^ngModel"],controller:"TimepickerController",replace:!0,scope:{},templateUrl:"template/timepicker/timepicker.html",link:function(e,t,n,i){var r=i[0],o=i[1];o&&r.init(o,t.find("input"))}}}),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).factory("typeaheadParser",["$parse",function(e){var t=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(n){var i=n.match(t);if(!i)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+n+'".');return{itemName:i[3],source:e(i[4]),viewMapper:e(i[2]||i[1]),modelMapper:e(i[1])}}}}]).directive("typeahead",["$compile","$parse","$q","$timeout","$document","$position","typeaheadParser",function(e,t,n,i,r,o,a){var s=[9,13,27,38,40];return{require:"ngModel",link:function(l,c,u,d){var f,p=l.$eval(u.typeaheadMinLength)||1,h=l.$eval(u.typeaheadWaitMs)||0,g=!1!==l.$eval(u.typeaheadEditable),m=t(u.typeaheadLoading).assign||angular.noop,v=t(u.typeaheadOnSelect),$=u.typeaheadInputFormatter?t(u.typeaheadInputFormatter):void 0,y=!!u.typeaheadAppendToBody&&l.$eval(u.typeaheadAppendToBody),b=!1!==l.$eval(u.typeaheadFocusFirst),w=t(u.ngModel).assign,x=a.parse(u.typeahead),C=l.$new();l.$on("$destroy",function(){C.$destroy()});var k="typeahead-"+C.$id+"-"+Math.floor(1e4*Math.random());c.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":k});var S=angular.element("<div typeahead-popup></div>");S.attr({id:k,matches:"matches",active:"activeIdx",select:"select(activeIdx)",query:"query",position:"position"}),angular.isDefined(u.typeaheadTemplateUrl)&&S.attr("template-url",u.typeaheadTemplateUrl);var E=function(){C.matches=[],C.activeIdx=-1,c.attr("aria-expanded",!1)},T=function(e){return k+"-option-"+e};C.$watch("activeIdx",function(e){e<0?c.removeAttr("aria-activedescendant"):c.attr("aria-activedescendant",T(e))});var D=function(e){var t={$viewValue:e};m(l,!0),n.when(x.source(l,t)).then(function(n){var i=e===d.$viewValue;if(i&&f)if(n.length>0){C.activeIdx=b?0:-1,C.matches.length=0;for(var r=0;r<n.length;r++)t[x.itemName]=n[r],C.matches.push({id:T(r),label:x.viewMapper(C,t),model:n[r]});C.query=e,C.position=y?o.offset(c):o.position(c),C.position.top=C.position.top+c.prop("offsetHeight"),c.attr("aria-expanded",!0)}else E();i&&m(l,!1)},function(){E(),m(l,!1)})};E(),C.query=void 0;var A,M=function(e){A=i(function(){D(e)},h)},O=function(){A&&i.cancel(A)};d.$parsers.unshift(function(e){return f=!0,e&&e.length>=p?h>0?(O(),M(e)):D(e):(m(l,!1),O(),E()),g?e:e?void d.$setValidity("editable",!1):(d.$setValidity("editable",!0),e)}),d.$formatters.push(function(e){var t,n,i={};return $?(i.$model=e,$(l,i)):(i[x.itemName]=e,t=x.viewMapper(l,i),i[x.itemName]=void 0,n=x.viewMapper(l,i),t!==n?t:e)}),C.select=function(e){var t,n,r={};r[x.itemName]=n=C.matches[e].model,t=x.modelMapper(l,r),w(l,t),d.$setValidity("editable",!0),v(l,{$item:n,$model:t,$label:x.viewMapper(l,r)}),E(),i(function(){c[0].focus()},0,!1)},c.bind("keydown",function(e){0!==C.matches.length&&-1!==s.indexOf(e.which)&&(-1!=C.activeIdx||13!==e.which&&9!==e.which)&&(e.preventDefault(),40===e.which?(C.activeIdx=(C.activeIdx+1)%C.matches.length,C.$digest()):38===e.which?(C.activeIdx=(C.activeIdx>0?C.activeIdx:C.matches.length)-1,C.$digest()):13===e.which||9===e.which?C.$apply(function(){C.select(C.activeIdx)}):27===e.which&&(e.stopPropagation(),E(),C.$digest()))}),c.bind("blur",function(e){f=!1});var I=function(e){c[0]!==e.target&&(E(),C.$digest())};r.bind("click",I),l.$on("$destroy",function(){r.unbind("click",I),y&&P.remove()});var P=e(S)(C);y?r.find("body").append(P):c.after(P)}}}]).directive("typeaheadPopup",function(){return{restrict:"EA",scope:{matches:"=",query:"=",active:"=",position:"=",select:"&"},replace:!0,templateUrl:"template/typeahead/typeahead-popup.html",link:function(e,t,n){e.templateUrl=n.templateUrl,e.isOpen=function(){return e.matches.length>0},e.isActive=function(t){return e.active==t},e.selectActive=function(t){e.active=t},e.selectMatch=function(t){e.select({activeIdx:t})}}}}).directive("typeaheadMatch",["$http","$templateCache","$compile","$parse",function(e,t,n,i){return{restrict:"EA",scope:{index:"=",match:"=",query:"="},link:function(r,o,a){var s=i(a.templateUrl)(r.$parent)||"template/typeahead/typeahead-match.html";e.get(s,{cache:t}).success(function(e){o.replaceWith(n(e.trim())(r))})}}}]).filter("typeaheadHighlight",function(){function e(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(t,n){return n?(""+t).replace(new RegExp(e(n),"gi"),"<strong>$&</strong>"):t}}),angular.module("template/accordion/accordion-group.html",[]).run(["$templateCache",function(e){e.put("template/accordion/accordion-group.html",'<div class="panel panel-default">\n <div class="panel-heading">\n <h4 class="panel-title">\n <a href class="accordion-toggle" ng-click="toggleOpen()" accordion-transclude="heading"><span ng-class="{\'text-muted\': isDisabled}">{{heading}}</span></a>\n </h4>\n </div>\n <div class="panel-collapse" collapse="!isOpen">\n\t <div class="panel-body" ng-transclude></div>\n </div>\n</div>\n')}]),angular.module("template/accordion/accordion.html",[]).run(["$templateCache",function(e){e.put("template/accordion/accordion.html",'<div class="panel-group" ng-transclude></div>')}]),angular.module("template/alert/alert.html",[]).run(["$templateCache",function(e){e.put("template/alert/alert.html",'<div class="alert" ng-class="[\'alert-\' + (type || \'warning\'), closeable ? \'alert-dismissable\' : null]" role="alert">\n <button ng-show="closeable" type="button" class="close" ng-click="close()">\n <span aria-hidden="true">&times;</span>\n <span class="sr-only">Close</span>\n </button>\n <div ng-transclude></div>\n</div>\n')}]),angular.module("template/carousel/carousel.html",[]).run(["$templateCache",function(e){e.put("template/carousel/carousel.html",'<div ng-mouseenter="pause()" ng-mouseleave="play()" class="carousel" ng-swipe-right="prev()" ng-swipe-left="next()">\n <ol class="carousel-indicators" ng-show="slides.length > 1">\n <li ng-repeat="slide in slides track by $index" ng-class="{active: isActive(slide)}" ng-click="select(slide)"></li>\n </ol>\n <div class="carousel-inner" ng-transclude></div>\n <a class="left carousel-control" ng-click="prev()" ng-show="slides.length > 1"><span class="glyphicon glyphicon-chevron-left"></span></a>\n <a class="right carousel-control" ng-click="next()" ng-show="slides.length > 1"><span class="glyphicon glyphicon-chevron-right"></span></a>\n</div>\n')}]),angular.module("template/carousel/slide.html",[]).run(["$templateCache",function(e){e.put("template/carousel/slide.html","<div ng-class=\"{\n 'active': leaving || (active && !entering),\n 'prev': (next || active) && direction=='prev',\n 'next': (next || active) && direction=='next',\n 'right': direction=='prev',\n 'left': direction=='next'\n }\" class=\"item text-center\" ng-transclude></div>\n")}]),angular.module("template/datepicker/datepicker.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/datepicker.html",'<div ng-switch="datepickerMode" role="application" ng-keydown="keydown($event)">\n <daypicker ng-switch-when="day" tabindex="0"></daypicker>\n <monthpicker ng-switch-when="month" tabindex="0"></monthpicker>\n <yearpicker ng-switch-when="year" tabindex="0"></yearpicker>\n</div>')}]),angular.module("template/datepicker/day.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/day.html",'<table role="grid" aria-labelledby="{{uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="{{5 + showWeeks}}"><button id="{{uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n <tr>\n <th ng-show="showWeeks" class="text-center"></th>\n <th ng-repeat="label in labels track by $index" class="text-center"><small aria-label="{{label.full}}">{{label.abbr}}</small></th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="row in rows track by $index">\n <td ng-show="showWeeks" class="text-center h6"><em>{{ weekNumbers[$index] }}</em></td>\n <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{dt.uid}}" aria-disabled="{{!!dt.disabled}}">\n <button type="button" style="width:100%;" class="btn btn-default btn-sm" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="{\'text-muted\': dt.secondary, \'text-info\': dt.current}">{{dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/datepicker/month.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/month.html",'<table role="grid" aria-labelledby="{{uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th><button id="{{uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{dt.uid}}" aria-disabled="{{!!dt.disabled}}">\n <button type="button" style="width:100%;" class="btn btn-default" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="{\'text-info\': dt.current}">{{dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/datepicker/popup.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/popup.html",'<ul class="dropdown-menu" ng-style="{display: (isOpen && \'block\') || \'none\', top: position.top+\'px\', left: position.left+\'px\'}" ng-keydown="keydown($event)">\n\t<li ng-transclude></li>\n\t<li ng-if="showButtonBar" style="padding:10px 9px 2px">\n\t\t<span class="btn-group pull-left">\n\t\t\t<button type="button" class="btn btn-sm btn-info" ng-click="select(\'today\')">{{ getText(\'current\') }}</button>\n\t\t\t<button type="button" class="btn btn-sm btn-danger" ng-click="select(null)">{{ getText(\'clear\') }}</button>\n\t\t</span>\n\t\t<button type="button" class="btn btn-sm btn-success pull-right" ng-click="close()">{{ getText(\'close\') }}</button>\n\t</li>\n</ul>\n')}]),angular.module("template/datepicker/year.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/year.html",'<table role="grid" aria-labelledby="{{uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="3"><button id="{{uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{dt.uid}}" aria-disabled="{{!!dt.disabled}}">\n <button type="button" style="width:100%;" class="btn btn-default" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="{\'text-info\': dt.current}">{{dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/modal/backdrop.html",[]).run(["$templateCache",function(e){e.put("template/modal/backdrop.html",'<div class="modal-backdrop fade {{ backdropClass }}"\n ng-class="{in: animate}"\n ng-style="{\'z-index\': 1040 + (index && 1 || 0) + index*10}"\n></div>\n')}]),angular.module("template/modal/window.html",[]).run(["$templateCache",function(e){e.put("template/modal/window.html",'<div tabindex="-1" role="dialog" class="modal fade" ng-class="{in: animate}" ng-style="{\'z-index\': 1050 + index*10, display: \'block\'}" ng-click="close($event)">\n <div class="modal-dialog" ng-class="{\'modal-sm\': size == \'sm\', \'modal-lg\': size == \'lg\'}"><div class="modal-content" modal-transclude></div></div>\n</div>')}]),angular.module("template/pagination/pager.html",[]).run(["$templateCache",function(e){e.put("template/pagination/pager.html",'<ul class="pager">\n <li ng-class="{disabled: noPrevious(), previous: align}"><a href ng-click="selectPage(page - 1)">{{getText(\'previous\')}}</a></li>\n <li ng-class="{disabled: noNext(), next: align}"><a href ng-click="selectPage(page + 1)">{{getText(\'next\')}}</a></li>\n</ul>')}]),angular.module("template/pagination/pagination.html",[]).run(["$templateCache",function(e){e.put("template/pagination/pagination.html",'<ul class="pagination">\n <li ng-if="boundaryLinks" ng-class="{disabled: noPrevious()}"><a href ng-click="selectPage(1)">{{getText(\'first\')}}</a></li>\n <li ng-if="directionLinks" ng-class="{disabled: noPrevious()}"><a href ng-click="selectPage(page - 1)">{{getText(\'previous\')}}</a></li>\n <li ng-repeat="page in pages track by $index" ng-class="{active: page.active}"><a href ng-click="selectPage(page.number)">{{page.text}}</a></li>\n <li ng-if="directionLinks" ng-class="{disabled: noNext()}"><a href ng-click="selectPage(page + 1)">{{getText(\'next\')}}</a></li>\n <li ng-if="boundaryLinks" ng-class="{disabled: noNext()}"><a href ng-click="selectPage(totalPages)">{{getText(\'last\')}}</a></li>\n</ul>')}]),angular.module("template/tooltip/tooltip-html-unsafe-popup.html",[]).run(["$templateCache",function(e){e.put("template/tooltip/tooltip-html-unsafe-popup.html",'<div class="tooltip {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" bind-html-unsafe="content"></div>\n</div>\n')}]),angular.module("template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(e){e.put("template/tooltip/tooltip-popup.html",'<div class="tooltip {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" ng-bind="content"></div>\n</div>\n')}]),angular.module("template/popover/popover.html",[]).run(["$templateCache",function(e){e.put("template/popover/popover.html",'<div class="popover {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="title" ng-show="title"></h3>\n <div class="popover-content" ng-bind="content"></div>\n </div>\n</div>\n')}]),angular.module("template/progressbar/bar.html",[]).run(["$templateCache",function(e){e.put("template/progressbar/bar.html",'<div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: percent + \'%\'}" aria-valuetext="{{percent | number:0}}%" ng-transclude></div>')}]),angular.module("template/progressbar/progress.html",[]).run(["$templateCache",function(e){e.put("template/progressbar/progress.html",'<div class="progress" ng-transclude></div>')}]),angular.module("template/progressbar/progressbar.html",[]).run(["$templateCache",function(e){e.put("template/progressbar/progressbar.html",'<div class="progress">\n <div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: percent + \'%\'}" aria-valuetext="{{percent | number:0}}%" ng-transclude></div>\n</div>')}]),angular.module("template/rating/rating.html",[]).run(["$templateCache",function(e){e.put("template/rating/rating.html",'<span ng-mouseleave="reset()" ng-keydown="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="{{range.length}}" aria-valuenow="{{value}}">\n <i ng-repeat="r in range track by $index" ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || \'glyphicon-star\') || (r.stateOff || \'glyphicon-star-empty\')">\n <span class="sr-only">({{ $index < value ? \'*\' : \' \' }})</span>\n </i>\n</span>')}]),angular.module("template/tabs/tab.html",[]).run(["$templateCache",function(e){e.put("template/tabs/tab.html",'<li ng-class="{active: active, disabled: disabled}">\n <a href ng-click="select()" tab-heading-transclude>{{heading}}</a>\n</li>\n')}]),angular.module("template/tabs/tabset.html",[]).run(["$templateCache",function(e){e.put("template/tabs/tabset.html",'<div>\n <ul class="nav nav-{{type || \'tabs\'}}" ng-class="{\'nav-stacked\': vertical, \'nav-justified\': justified}" ng-transclude></ul>\n <div class="tab-content">\n <div class="tab-pane" \n ng-repeat="tab in tabs" \n ng-class="{active: tab.active}"\n tab-content-transclude="tab">\n </div>\n </div>\n</div>\n')}]),angular.module("template/timepicker/timepicker.html",[]).run(["$templateCache",function(e){e.put("template/timepicker/timepicker.html",'<table>\n\t<tbody>\n\t\t<tr class="text-center">\n\t\t\t<td><a ng-click="incrementHours()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td><a ng-click="incrementMinutes()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n\t\t\t<td ng-show="showMeridian"></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td style="width:50px;" class="form-group" ng-class="{\'has-error\': invalidHours}">\n\t\t\t\t<input type="text" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-mousewheel="incrementHours()" ng-readonly="readonlyInput" maxlength="2">\n\t\t\t</td>\n\t\t\t<td>:</td>\n\t\t\t<td style="width:50px;" class="form-group" ng-class="{\'has-error\': invalidMinutes}">\n\t\t\t\t<input type="text" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="readonlyInput" maxlength="2">\n\t\t\t</td>\n\t\t\t<td ng-show="showMeridian"><button type="button" class="btn btn-default text-center" ng-click="toggleMeridian()">{{meridian}}</button></td>\n\t\t</tr>\n\t\t<tr class="text-center">\n\t\t\t<td><a ng-click="decrementHours()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td><a ng-click="decrementMinutes()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n\t\t\t<td ng-show="showMeridian"></td>\n\t\t</tr>\n\t</tbody>\n</table>\n')}]),angular.module("template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(e){e.put("template/typeahead/typeahead-match.html",'<a tabindex="-1" bind-html-unsafe="match.label | typeaheadHighlight:query"></a>')}]),angular.module("template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(e){e.put("template/typeahead/typeahead-popup.html",'<ul class="dropdown-menu" ng-show="isOpen()" ng-style="{top: position.top+\'px\', left: position.left+\'px\'}" style="display: block;" role="listbox" aria-hidden="{{!isOpen()}}">\n <li ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index)" role="option" id="{{match.id}}">\n <div typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></div>\n </li>\n</ul>\n')}]),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(e,t,n){"use strict";function i(e,t){return j(new(j(function(){},{prototype:e})),t)}function r(e){return N(arguments,function(t){t!==e&&N(t,function(t,n){e.hasOwnProperty(n)||(e[n]=t)})}),e}function o(e,t){var n=[];for(var i in e.path){if(e.path[i]!==t.path[i])break;n.push(e.path[i])}return n}function a(e){if(Object.keys)return Object.keys(e);var n=[];return t.forEach(e,function(e,t){n.push(t)}),n}function s(e,t){if(Array.prototype.indexOf)return e.indexOf(t,Number(arguments[2])||0);var n=e.length>>>0,i=Number(arguments[2])||0;for(i=i<0?Math.ceil(i):Math.floor(i),i<0&&(i+=n);i<n;i++)if(i in e&&e[i]===t)return i;return-1}function l(e,t,n,i){var r,l=o(n,i),c={},u=[]
+;for(var d in l)if(l[d].params&&(r=a(l[d].params),r.length))for(var f in r)s(u,r[f])>=0||(u.push(r[f]),c[r[f]]=e[r[f]]);return j({},c,t)}function c(e,t,n){if(!n){n=[];for(var i in e)n.push(i)}for(var r=0;r<n.length;r++){var o=n[r];if(e[o]!=t[o])return!1}return!0}function u(e,t){var n={};return N(e,function(e){n[e]=t[e]}),n}function d(e,t){var i=1,o=2,a={},s=[],l=a,c=j(e.when(a),{$$promises:a,$$values:a});this.study=function(a){function u(e,n){if(h[n]!==o){if(p.push(n),h[n]===i)throw p.splice(0,p.indexOf(n)),new Error("Cyclic dependency: "+p.join(" -> "));if(h[n]=i,O(e))f.push(n,[function(){return t.get(e)}],s);else{var r=t.annotate(e);N(r,function(e){e!==n&&a.hasOwnProperty(e)&&u(a[e],e)}),f.push(n,e,r)}p.pop(),h[n]=o}}function d(e){return I(e)&&e.then&&e.$$promises}if(!I(a))throw new Error("'invocables' must be an object");var f=[],p=[],h={};return N(a,u),a=p=h=null,function(i,o,a){function s(){--v||($||r(m,o.$$values),h.$$values=m,h.$$promises=!0,delete h.$$inheritedValues,p.resolve(m))}function u(e){h.$$failure=e,p.reject(e)}if(d(i)&&a===n&&(a=o,o=i,i=null),i){if(!I(i))throw new Error("'locals' must be an object")}else i=l;if(o){if(!d(o))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else o=c;var p=e.defer(),h=p.promise,g=h.$$promises={},m=j({},i),v=1+f.length/3,$=!1;if(A(o.$$failure))return u(o.$$failure),h;o.$$inheritedValues&&r(m,o.$$inheritedValues),o.$$values?($=r(m,o.$$values),h.$$inheritedValues=o.$$values,s()):(o.$$inheritedValues&&(h.$$inheritedValues=o.$$inheritedValues),j(g,o.$$promises),o.then(s,u));for(var y=0,b=f.length;y<b;y+=3)i.hasOwnProperty(f[y])?s():function(n,r,o){function l(e){d.reject(e),u(e)}function c(){if(!A(h.$$failure))try{d.resolve(t.invoke(r,a,m)),d.promise.then(function(e){m[n]=e,s()},l)}catch(e){l(e)}}var d=e.defer(),f=0;N(o,function(e){g.hasOwnProperty(e)&&!i.hasOwnProperty(e)&&(f++,g[e].then(function(t){m[e]=t,--f||c()},l))}),f||c(),g[n]=d.promise}(f[y],f[y+1],f[y+2]);return h}},this.resolve=function(e,t,n,i){return this.study(e)(t,n,i)}}function f(e,t,n){this.fromConfig=function(e,t,n){return A(e.template)?this.fromString(e.template,t):A(e.templateUrl)?this.fromUrl(e.templateUrl,t):A(e.templateProvider)?this.fromProvider(e.templateProvider,t,n):null},this.fromString=function(e,t){return M(e)?e(t):e},this.fromUrl=function(n,i){return M(n)&&(n=n(i)),null==n?null:e.get(n,{cache:t}).then(function(e){return e.data})},this.fromProvider=function(e,t,i){return n.invoke(e,null,i||{params:t})}}function p(e,i){function r(e){return A(e)?this.type.decode(e):g.$$getDefaultValue(this)}function o(t,n,i){if(!/^\w+(-+\w+)*$/.test(t))throw new Error("Invalid parameter name '"+t+"' in pattern '"+e+"'");if(p[t])throw new Error("Duplicate parameter name '"+t+"' in pattern '"+e+"'");p[t]=j({type:n||new h,$value:r},i)}function a(e,t,n){var i=e.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!t)return i;var r=n?"?":"";return i+r+"("+t+")"+r}function s(e){if(!i.params||!i.params[e])return{};var t=i.params[e];return I(t)?t:{value:t}}i=t.isObject(i)?i:{};var l,c=/([:*])(\w+)|\{(\w+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,u="^",d=0,f=this.segments=[],p=this.params={};this.source=e;for(var m,v,$,y,b;(l=c.exec(e))&&(m=l[2]||l[3],v=l[4]||("*"==l[1]?".*":"[^/]*"),$=e.substring(d,l.index),y=this.$types[v]||new h({pattern:new RegExp(v)}),b=s(m),!($.indexOf("?")>=0));)u+=a($,y.$subPattern(),A(b.value)),o(m,y,b),f.push($),d=c.lastIndex;$=e.substring(d);var w=$.indexOf("?");if(w>=0){var x=this.sourceSearch=$.substring(w);$=$.substring(0,w),this.sourcePath=e.substring(0,d+w),N(x.substring(1).split(/[&?]/),function(e){o(e,null,s(e))})}else this.sourcePath=e,this.sourceSearch="";u+=a($)+(!1===i.strict?"/?":"")+"$",f.push($),this.regexp=new RegExp(u,i.caseInsensitive?"i":n),this.prefix=f[0]}function h(e){j(this,e)}function g(){function e(){return{strict:o,caseInsensitive:r}}function t(e){return M(e)||P(e)&&M(e[e.length-1])}function n(){N(s,function(e){if(p.prototype.$types[e.name])throw new Error("A type named '"+e.name+"' has already been defined.");var n=new h(t(e.def)?i.invoke(e.def):e.def);p.prototype.$types[e.name]=n})}var i,r=!1,o=!0,a=!0,s=[],l={int:{decode:function(e){return parseInt(e,10)},is:function(e){return!!A(e)&&this.decode(e.toString())===e},pattern:/\d+/},bool:{encode:function(e){return e?1:0},decode:function(e){return 0!==parseInt(e,10)},is:function(e){return!0===e||!1===e},pattern:/0|1/},string:{pattern:/[^\/]*/},date:{equals:function(e,t){return e.toISOString()===t.toISOString()},decode:function(e){return new Date(e)},encode:function(e){return[e.getFullYear(),("0"+(e.getMonth()+1)).slice(-2),("0"+e.getDate()).slice(-2)].join("-")},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/}};g.$$getDefaultValue=function(e){if(!t(e.value))return e.value;if(!i)throw new Error("Injectable functions cannot be called at configuration time");return i.invoke(e.value)},this.caseInsensitive=function(e){r=e},this.strictMode=function(e){o=e},this.compile=function(t,n){return new p(t,j(e(),n))},this.isMatcher=function(e){if(!I(e))return!1;var t=!0;return N(p.prototype,function(n,i){M(n)&&(t=t&&A(e[i])&&M(e[i]))}),t},this.type=function(e,t){return A(t)?(s.push({name:e,def:t}),a||n(),this):p.prototype.$types[e]},this.$get=["$injector",function(e){return i=e,a=!1,p.prototype.$types={},n(),N(l,function(e,t){p.prototype.$types[t]||(p.prototype.$types[t]=new h(e))}),this}]}function m(e,t){function i(e){var t=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(e.source);return null!=t?t[1].replace(/\\(.)/g,"$1"):""}function r(e,t){return e.replace(/\$(\$|\d{1,2})/,function(e,n){return t["$"===n?0:Number(n)]})}function o(e,t,n){if(!n)return!1;var i=e.invoke(t,t,{$match:n});return!A(i)||i}function a(t,n,i,r){function o(e,t,n){return"/"===f?e:t?f.slice(0,-1)+e:n?f.slice(1)+e:e}function a(e){function n(e){var n=e(i,t);return!!n&&(O(n)&&t.replace().url(n),!0)}if(!e||!e.defaultPrevented){var r,o=l.length;for(r=0;r<o;r++)if(n(l[r]))return;c&&n(c)}}function d(){return s=s||n.$on("$locationChangeSuccess",a)}var f=r.baseHref(),p=t.url();return u||d(),{sync:function(){a()},listen:function(){return d()},update:function(e){if(e)return void(p=t.url());t.url()!==p&&(t.url(p),t.replace())},push:function(e,n,i){t.url(e.format(n||{})),i&&i.replace&&t.replace()},href:function(n,i,r){if(!n.validates(i))return null;var a=e.html5Mode(),s=n.format(i);if(r=r||{},a||null===s||(s="#"+e.hashPrefix()+s),s=o(s,a,r.absolute),!r.absolute||!s)return s;var l=!a&&s?"/":"",c=t.port();return c=80===c||443===c?"":":"+c,[t.protocol(),"://",t.host(),c,l,s].join("")}}}var s,l=[],c=null,u=!1;this.rule=function(e){if(!M(e))throw new Error("'rule' must be a function");return l.push(e),this},this.otherwise=function(e){if(O(e)){var t=e;e=function(){return t}}else if(!M(e))throw new Error("'rule' must be a function");return c=e,this},this.when=function(e,n){var a,s=O(n);if(O(e)&&(e=t.compile(e)),!s&&!M(n)&&!P(n))throw new Error("invalid 'handler' in when()");var l={matcher:function(e,n){return s&&(a=t.compile(n),n=["$match",function(e){return a.format(e)}]),j(function(t,i){return o(t,n,e.exec(i.path(),i.search()))},{prefix:O(e.prefix)?e.prefix:""})},regex:function(e,t){if(e.global||e.sticky)throw new Error("when() RegExp must not be global or sticky");return s&&(a=t,t=["$match",function(e){return r(a,e)}]),j(function(n,i){return o(n,t,e.exec(i.path()))},{prefix:i(e)})}},c={matcher:t.isMatcher(e),regex:e instanceof RegExp};for(var u in c)if(c[u])return this.rule(l[u](e,n));throw new Error("invalid 'what' in when()")},this.deferIntercept=function(e){e===n&&(e=!0),u=e},this.$get=a,a.$inject=["$location","$rootScope","$injector","$browser"]}function v(e,r){function o(e){return 0===e.indexOf(".")||0===e.indexOf("^")}function s(e,t){if(!e)return n;var i=O(e),r=i?e:e.name;if(o(r)){if(!t)throw new Error("No reference point given for path '"+r+"'");for(var a=r.split("."),s=0,l=a.length,c=t;s<l;s++)if(""!==a[s]||0!==s){if("^"!==a[s])break;if(!c.parent)throw new Error("Path '"+r+"' not valid for state '"+t.name+"'");c=c.parent}else c=t;a=a.slice(s).join("."),r=c.name+(c.name&&a?".":"")+a}var u=w[r];return!u||!i&&(i||u!==e&&u.self!==e)?n:u}function d(e,t){x[e]||(x[e]=[]),x[e].push(t)}function f(t){t=i(t,{self:t,resolve:t.resolve||{},toString:function(){return this.name}});var n=t.name;if(!O(n)||n.indexOf("@")>=0)throw new Error("State must have a valid name");if(w.hasOwnProperty(n))throw new Error("State '"+n+"'' is already defined");var r=-1!==n.indexOf(".")?n.substring(0,n.lastIndexOf(".")):O(t.parent)?t.parent:"";if(r&&!w[r])return d(r,t.self);for(var o in k)M(k[o])&&(t[o]=k[o](t,k.$delegates[o]));if(w[n]=t,!t[C]&&t.url&&e.when(t.url,["$match","$stateParams",function(e,n){b.$current.navigable==t&&c(e,n)||b.transitionTo(t,e,{location:!1})}]),x[n])for(var a=0;a<x[n].length;a++)f(x[n][a]);return t}function p(e){return e.indexOf("*")>-1}function h(e){var t=e.split("."),n=b.$current.name.split(".");if("**"===t[0]&&(n=n.slice(n.indexOf(t[1])),n.unshift("**")),"**"===t[t.length-1]&&(n.splice(n.indexOf(t[t.length-2])+1,Number.MAX_VALUE),n.push("**")),t.length!=n.length)return!1;for(var i=0,r=t.length;i<r;i++)"*"===t[i]&&(n[i]="*");return n.join("")===t.join("")}function g(e,t){return O(e)&&!A(t)?k[e]:M(t)&&O(e)?(k[e]&&!k.$delegates[e]&&(k.$delegates[e]=k[e]),k[e]=t,this):this}function m(e,t){return I(e)?t=e:t.name=e,f(t),this}function v(e,r,o,d,f,g,m){function v(t,n,i,o){var a=e.$broadcast("$stateNotFound",t,n,i);if(a.defaultPrevented)return m.update(),E;if(!a.retry)return null;if(o.$retry)return m.update(),T;var s=b.transition=r.when(a.retry);return s.then(function(){return s!==b.transition?k:(t.options.$retry=!0,b.transitionTo(t.to,t.toParams,t.options))},function(){return E}),m.update(),s}function x(e,n,i,s,l){var c=i?n:u(a(e.params),n),p={$stateParams:c};l.resolve=f.resolve(e.resolve,p,l.resolve,e);var h=[l.resolve.then(function(e){l.globals=e})];return s&&h.push(s),N(e.views,function(n,i){var r=n.resolve&&n.resolve!==e.resolve?n.resolve:{};r.$template=[function(){return o.load(i,{view:n,locals:p,params:c})||""}],h.push(f.resolve(r,p,l.resolve,e).then(function(o){if(M(n.controllerProvider)||P(n.controllerProvider)){var a=t.extend({},r,p);o.$$controller=d.invoke(n.controllerProvider,null,a)}else o.$$controller=n.controller;o.$$state=e,o.$$controllerAs=n.controllerAs,l[i]=o}))}),r.all(h).then(function(e){return l})}var k=r.reject(new Error("transition superseded")),S=r.reject(new Error("transition prevented")),E=r.reject(new Error("transition aborted")),T=r.reject(new Error("transition failed"));return y.locals={resolve:null,globals:{$stateParams:{}}},b={params:{},current:y.self,$current:y,transition:null},b.reload=function(){b.transitionTo(b.current,g,{reload:!0,inherit:!1,notify:!1})},b.go=function(e,t,n){return b.transitionTo(e,t,j({inherit:!0,relative:b.$current},n))},b.transitionTo=function(t,n,o){n=n||{},o=j({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},o||{});var f,p=b.$current,h=b.params,w=p.path,E=s(t,o.relative);if(!A(E)){var T={to:t,toParams:n,options:o},D=v(T,p.self,h,o);if(D)return D;if(t=T.to,n=T.toParams,o=T.options,E=s(t,o.relative),!A(E)){if(!o.relative)throw new Error("No such state '"+t+"'");throw new Error("Could not resolve '"+t+"' from state '"+o.relative+"'")}}if(E[C])throw new Error("Cannot transition to abstract state '"+t+"'");o.inherit&&(n=l(g,n||{},b.$current,E)),t=E;var M=t.path,O=0,I=M[O],P=y.locals,N=[];if(!o.reload)for(;I&&I===w[O]&&c(n,h,I.ownParams);)P=N[O]=I.locals,O++,I=M[O];if($(t,p,P,o))return!1!==t.self.reloadOnSearch&&m.update(),b.transition=null,r.when(b.current);if(n=u(a(t.params),n||{}),o.notify&&e.$broadcast("$stateChangeStart",t.self,n,p.self,h).defaultPrevented)return m.update(),S;for(var L=r.when(P),R=O;R<M.length;R++,I=M[R])P=N[R]=i(P),L=x(I,n,I===t,L,P);var V=b.transition=L.then(function(){var i,r,a;if(b.transition!==V)return k;for(i=w.length-1;i>=O;i--)a=w[i],a.self.onExit&&d.invoke(a.self.onExit,a.self,a.locals.globals),a.locals=null;for(i=O;i<M.length;i++)r=M[i],r.locals=N[i],r.self.onEnter&&d.invoke(r.self.onEnter,r.self,r.locals.globals);return b.transition!==V?k:(b.$current=t,b.current=t.self,b.params=n,F(b.params,g),b.transition=null,o.location&&t.navigable&&m.push(t.navigable.url,t.navigable.locals.globals.$stateParams,{replace:"replace"===o.location}),o.notify&&e.$broadcast("$stateChangeSuccess",t.self,n,p.self,h),m.update(!0),b.current)},function(i){return b.transition!==V?k:(b.transition=null,f=e.$broadcast("$stateChangeError",t.self,n,p.self,h,i),f.defaultPrevented||m.update(),r.reject(i))});return V},b.is=function(e,i){var r=s(e);return A(r)?b.$current===r&&(!A(i)||null===i||t.equals(g,i)):n},b.includes=function(e,t){if(O(e)&&p(e)){if(!h(e))return!1;e=b.$current.name}var i=s(e);return A(i)?!!A(b.$current.includes[i.name])&&c(t,g):n},b.href=function(e,t,n){n=j({lossy:!0,inherit:!0,absolute:!1,relative:b.$current},n||{});var i=s(e,n.relative);if(!A(i))return null;n.inherit&&(t=l(g,t||{},b.$current,i));var r=i&&n.lossy?i.navigable:i;return r&&r.url?m.href(r.url,u(a(i.params),t||{}),{absolute:n.absolute}):null},b.get=function(e,t){if(0===arguments.length)return a(w).map(function(e){return w[e].self});var n=s(e,t);return n&&n.self?n.self:null},b}function $(e,t,n,i){if(e===t&&(n===t.locals&&!i.reload||!1===e.self.reloadOnSearch))return!0}var y,b,w={},x={},C="abstract",k={parent:function(e){if(A(e.parent)&&e.parent)return s(e.parent);var t=/^(.+)\.[^.]+$/.exec(e.name);return t?s(t[1]):y},data:function(e){return e.parent&&e.parent.data&&(e.data=e.self.data=j({},e.parent.data,e.data)),e.data},url:function(e){var t=e.url,n={params:e.params||{}};if(O(t))return"^"==t.charAt(0)?r.compile(t.substring(1),n):(e.parent.navigable||y).url.concat(t,n);if(!t||r.isMatcher(t))return t;throw new Error("Invalid url '"+t+"' in state '"+e+"'")},navigable:function(e){return e.url?e:e.parent?e.parent.navigable:null},params:function(e){return e.params?e.params:e.url?e.url.params:e.parent.params},views:function(e){var t={};return N(A(e.views)?e.views:{"":e},function(n,i){i.indexOf("@")<0&&(i+="@"+e.parent.name),t[i]=n}),t},ownParams:function(e){if(e.params=e.params||{},!e.parent)return a(e.params);var t={};N(e.params,function(e,n){t[n]=!0}),N(e.parent.params,function(n,i){if(!t[i])throw new Error("Missing required parameter '"+i+"' in state '"+e.name+"'");t[i]=!1});var n=[];return N(t,function(e,t){e&&n.push(t)}),n},path:function(e){return e.parent?e.parent.path.concat(e):[]},includes:function(e){var t=e.parent?j({},e.parent.includes):{};return t[e.name]=!0,t},$delegates:{}};y=f({name:"",url:"^",views:null,abstract:!0}),y.navigable=null,this.decorator=g,this.state=m,this.$get=v,v.$inject=["$rootScope","$q","$view","$injector","$resolve","$stateParams","$urlRouter"]}function $(){function e(e,t){return{load:function(n,i){var r;return i=j({template:null,controller:null,view:null,locals:null,notify:!0,async:!0,params:{}},i),i.view&&(r=t.fromConfig(i.view,i.params,i.locals)),r&&i.notify&&e.$broadcast("$viewContentLoading",i),r}}}this.$get=e,e.$inject=["$rootScope","$templateFactory"]}function y(){var e=!1;this.useAnchorScroll=function(){e=!0},this.$get=["$anchorScroll","$timeout",function(t,n){return e?t:function(e){n(function(){e[0].scrollIntoView()},0,!1)}}]}function b(e,n,i){function r(e,t){if(s)return{enter:function(e,t,n){s.enter(e,null,t,n)},leave:function(e,t){s.leave(e,t)}};if(a){var n=a&&a(t,e);return{enter:function(e,t,i){n.enter(e,null,t),i()},leave:function(e,t){n.leave(e),t()}}}return function(){return{enter:function(e,t,n){t.after(e),n()},leave:function(e,t){e.remove(),t()}}}()}var o=function(){return n.has?function(e){return n.has(e)?n.get(e):null}:function(e){try{return n.get(e)}catch(e){return null}}}(),a=o("$animator"),s=o("$animate");return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(n,o,a){return function(n,o,s){function l(){u&&(u.remove(),u=null),f&&(f.$destroy(),f=null),d&&(m.leave(d,function(){u=null}),u=d,d=null)}function c(r){var c,u=x(s,o.inheritedData("$uiView")),v=u&&e.$current&&e.$current.locals[u];if(r||v!==p){c=n.$new(),p=e.$current.locals[u];var $=a(c,function(e){m.enter(e,o,function(){(t.isDefined(g)&&!g||n.$eval(g))&&i(e)}),l()});d=$,f=c,f.$emit("$viewContentLoaded"),f.$eval(h)}}var u,d,f,p,h=s.onload||"",g=s.autoscroll,m=r(s,n);n.$on("$stateChangeSuccess",function(){c(!1)}),n.$on("$viewContentLoading",function(){c(!1)}),c(!0)}}}}function w(e,t,n){return{restrict:"ECA",priority:-400,compile:function(i){var r=i.html();return function(i,o,a){var s=n.$current,l=x(a,o.inheritedData("$uiView")),c=s&&s.locals[l];if(c){o.data("$uiView",{name:l,state:c.$$state}),o.html(c.$template?c.$template:r);var u=e(o.contents());if(c.$$controller){c.$scope=i;var d=t(c.$$controller,c);c.$$controllerAs&&(i[c.$$controllerAs]=d),o.data("$ngControllerController",d),o.children().data("$ngControllerController",d)}u(i)}}}}}function x(e,t){var n=e.uiView||e.name||"";return n.indexOf("@")>=0?n:n+"@"+(t?t.state.name:"")}function C(e,t){var n,i=e.match(/^\s*({[^}]*})\s*$/);if(i&&(e=t+"("+i[1]+")"),!(n=e.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/))||4!==n.length)throw new Error("Invalid state ref '"+e+"'");return{state:n[1],paramExpr:n[3]||null}}function k(e){var t=e.parent().inheritedData("$uiView");if(t&&t.state&&t.state.name)return t.state}function S(e,n){var i=["location","inherit","reload"];return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(r,o,a,s){var l=C(a.uiSref,e.current.name),c=null,u=k(o)||e.$current,d="FORM"===o[0].nodeName,f=d?"action":"href",p=!0,h={relative:u,inherit:!0},g=r.$eval(a.uiSrefOpts)||{};t.forEach(i,function(e){e in g&&(h[e]=g[e])});var m=function(t){if(t&&(c=t),p){var n=e.href(l.state,c,h),i=s[1]||s[0];if(i&&i.$$setStateInfo(l.state,c),null===n)return p=!1,!1;o[0][f]=n}};l.paramExpr&&(r.$watch(l.paramExpr,function(e,t){e!==c&&m(e)},!0),c=r.$eval(l.paramExpr)),m(),d||o.bind("click",function(t){if(!((t.which||t.button)>1||t.ctrlKey||t.metaKey||t.shiftKey||o.attr("target"))){var i=n(function(){e.go(l.state,c,h)});t.preventDefault(),t.preventDefault=function(){n.cancel(i)}}})}}}function E(e,t,n){return{restrict:"A",controller:["$scope","$element","$attrs",function(i,r,o){function a(){s()?r.addClass(f):r.removeClass(f)}function s(){return void 0!==o.uiSrefActiveEq?e.$current.self===u&&l():e.includes(u.name)&&l()}function l(){return!d||c(d,t)}var u,d,f;f=n(o.uiSrefActiveEq||o.uiSrefActive||"",!1)(i),this.$$setStateInfo=function(t,n){u=e.get(t,k(r)),d=n,a()},i.$on("$stateChangeSuccess",a)}]}}function T(e){return function(t){return e.is(t)}}function D(e){return function(t){return e.includes(t)}}var A=t.isDefined,M=t.isFunction,O=t.isString,I=t.isObject,P=t.isArray,N=t.forEach,j=t.extend,F=t.copy;t.module("ui.router.util",["ng"]),t.module("ui.router.router",["ui.router.util"]),t.module("ui.router.state",["ui.router.router","ui.router.util"]),t.module("ui.router",["ui.router.state"]),t.module("ui.router.compat",["ui.router"]),d.$inject=["$q","$injector"],t.module("ui.router.util").service("$resolve",d),f.$inject=["$http","$templateCache","$injector"],t.module("ui.router.util").service("$templateFactory",f),p.prototype.concat=function(e,t){return new p(this.sourcePath+e+this.sourceSearch,t)},p.prototype.toString=function(){return this.source},p.prototype.exec=function(e,t){var n=this.regexp.exec(e);if(!n)return null;t=t||{};var i,r,o,a=this.parameters(),s=a.length,l=this.segments.length-1,c={};if(l!==n.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");for(i=0;i<l;i++)o=a[i],r=this.params[o],c[o]=r.$value(n[i+1]);for(;i<s;i++)o=a[i],r=this.params[o],c[o]=r.$value(t[o]);return c},p.prototype.parameters=function(e){return A(e)?this.params[e]||null:a(this.params)},p.prototype.validates=function(e){var t,n,i=!0,r=this;return N(e,function(e,o){r.params[o]&&(n=r.params[o],t=!e&&A(n.value),i=i&&(t||n.type.is(e)))}),i},p.prototype.format=function(e){var t=this.segments,n=this.parameters();if(!e)return t.join("").replace("//","/");var i,r,o,a,s,l,c=t.length-1,u=n.length,d=t[0];if(!this.validates(e))return null;for(i=0;i<c;i++)a=n[i],o=e[a],s=this.params[a],(A(o)||"/"!==t[i]&&"/"!==t[i+1])&&(null!=o&&(d+=encodeURIComponent(s.type.encode(o))),d+=t[i+1]);for(;i<u;i++)a=n[i],null!=(o=e[a])&&(l=P(o),l&&(o=o.map(encodeURIComponent).join("&"+a+"=")),d+=(r?"&":"?")+a+"="+(l?o:encodeURIComponent(o)),r=!0);return d},p.prototype.$types={},h.prototype.is=function(e,t){return!0},h.prototype.encode=function(e,t){return e},h.prototype.decode=function(e,t){return e},h.prototype.equals=function(e,t){return e==t},h.prototype.$subPattern=function(){var e=this.pattern.toString();return e.substr(1,e.length-2)},h.prototype.pattern=/.*/,t.module("ui.router.util").provider("$urlMatcherFactory",g),m.$inject=["$locationProvider","$urlMatcherFactoryProvider"],t.module("ui.router.router").provider("$urlRouter",m),v.$inject=["$urlRouterProvider","$urlMatcherFactoryProvider"],t.module("ui.router.state").value("$stateParams",{}).provider("$state",v),$.$inject=[],t.module("ui.router.state").provider("$view",$),t.module("ui.router.state").provider("$uiViewScroll",y),b.$inject=["$state","$injector","$uiViewScroll"],w.$inject=["$compile","$controller","$state"],t.module("ui.router.state").directive("uiView",b),t.module("ui.router.state").directive("uiView",w),S.$inject=["$state","$timeout"],E.$inject=["$state","$stateParams","$interpolate"],t.module("ui.router.state").directive("uiSref",S).directive("uiSrefActive",E).directive("uiSrefActiveEq",E),T.$inject=["$state"],D.$inject=["$state"],t.module("ui.router.state").filter("isState",T).filter("includedByState",D)}(window,window.angular),angular.module("pascalprecht.translate",["ng"]).run(["$translate",function(e){var t=e.storageKey(),n=e.storage();n?n.get(t)?e.use(n.get(t)):angular.isString(e.preferredLanguage())?e.use(e.preferredLanguage()):n.set(t,e.use()):angular.isString(e.preferredLanguage())&&e.use(e.preferredLanguage())}]),angular.module("pascalprecht.translate").provider("$translate",["$STORAGE_KEY",function(e){var t,n,i,r,o,a,s,l,c,u,d,f,p,h,g,m={},v=[],$=e,y=[],b=!1,w="translate-cloak",x=!1,C=function(){var e=window.navigator;return((angular.isArray(e.languages)?e.languages[0]:e.language||e.browserLanguage||e.systemLanguage||e.userLanguage)||"").split("-").join("_")},k=function(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},S=function(){return this.replace(/^\s+|\s+$/g,"")},E=function(e){for(var t=[],i=angular.lowercase(e),r=0,o=v.length;r<o;r++)t.push(angular.lowercase(v[r]));if(k(t,i)>-1)return e;if(n){var a;for(var s in n){var l=!1,c=Object.prototype.hasOwnProperty.call(n,s)&&angular.lowercase(s)===angular.lowercase(e);if("*"===s.slice(-1)&&(l=s.slice(0,-1)===e.slice(0,s.length-1)),(c||l)&&(a=n[s],k(t,angular.lowercase(a))>-1))return a}}var u=e.split("_");return u.length>1&&k(t,angular.lowercase(u[0]))>-1?u[0]:e},T=function(e,t){if(!e&&!t)return m;if(e&&!t){if(angular.isString(e))return m[e]}else angular.isObject(m[e])||(m[e]={}),angular.extend(m[e],D(t));return this};this.translations=T,this.cloakClassName=function(e){return e?(w=e,this):w};var D=function(e,t,n,i){var r,o,a,s;t||(t=[]),n||(n={});for(r in e)Object.prototype.hasOwnProperty.call(e,r)&&(s=e[r],angular.isObject(s)?D(s,t.concat(r),n,r):(o=t.length?t.join(".")+"."+r:r,t.length&&r===i&&(a=""+t.join("."),n[a]="@:"+o),n[o]=s));return n};this.addInterpolation=function(e){return y.push(e),this},this.useMessageFormatInterpolation=function(){return this.useInterpolation("$translateMessageFormatInterpolation")},this.useInterpolation=function(e){return u=e,this},this.useSanitizeValueStrategy=function(e){return b=e,this},this.preferredLanguage=function(e){return A(e),this};var A=function(e){return e&&(t=e),t};this.translationNotFoundIndicator=function(e){return this.translationNotFoundIndicatorLeft(e),this.translationNotFoundIndicatorRight(e),this},this.translationNotFoundIndicatorLeft=function(e){return e?(p=e,this):p},this.translationNotFoundIndicatorRight=function(e){return e?(h=e,this):h},this.fallbackLanguage=function(e){return M(e),this};var M=function(e){return e?(angular.isString(e)?(r=!0,i=[e]):angular.isArray(e)&&(r=!1,i=e),angular.isString(t)&&k(i,t)<0&&i.push(t),this):r?i[0]:i};this.use=function(e){if(e){if(!m[e]&&!d)throw new Error("$translateProvider couldn't find translationTable for langKey: '"+e+"'");return o=e,this}return o};var O=function(e){if(!e)return l?l+$:$;$=e};this.storageKey=O,this.useUrlLoader=function(e,t){return this.useLoader("$translateUrlLoader",angular.extend({url:e},t))},this.useStaticFilesLoader=function(e){return this.useLoader("$translateStaticFilesLoader",e)},this.useLoader=function(e,t){return d=e,f=t||{},this},this.useLocalStorage=function(){return this.useStorage("$translateLocalStorage")},this.useCookieStorage=function(){return this.useStorage("$translateCookieStorage")},this.useStorage=function(e){return s=e,this},this.storagePrefix=function(e){return e?(l=e,this):e},this.useMissingTranslationHandlerLog=function(){return this.useMissingTranslationHandler("$translateMissingTranslationHandlerLog")},this.useMissingTranslationHandler=function(e){return c=e,this},this.usePostCompiling=function(e){return x=!!e,this},this.determinePreferredLanguage=function(e){var n=e&&angular.isFunction(e)?e():C();return t=v.length?E(n):n,this},this.registerAvailableLanguageKeys=function(e,t){return e?(v=e,t&&(n=t),this):v},this.useLoaderCache=function(e){return!1===e?g=void 0:!0===e?g=!0:void 0===e?g="$translationCache":e&&(g=e),this},this.$get=["$log","$injector","$rootScope","$q",function(e,n,l,v){var C,I,P,N=n.get(u||"$translateDefaultInterpolation"),j=!1,F={},L={},R=function(e,n,r){if(angular.isArray(e)){return function(e){for(var t={},i=[],o=0,a=e.length;o<a;o++)i.push(function(e){var i=v.defer(),o=function(n){t[e]=n,i.resolve([e,n])};return R(e,n,r).then(o,o),i.promise}(e[o]));return v.all(i).then(function(){return t})}(e)}var a=v.defer();e&&(e=S.apply(e));var l=function(){var e=t?L[t]:L[o];if(I=0,s&&!e){var n=C.get($);if(e=L[n],i&&i.length){var r=k(i,n);I=0===r?1:0,k(i,t)<0&&i.push(t)}}return e}();return l?l.then(function(){X(e,n,r).then(a.resolve,a.reject)},a.reject):X(e,n,r).then(a.resolve,a.reject),a.promise},V=function(e){return p&&(e=[p,e].join(" ")),h&&(e=[e,h].join(" ")),e},H=function(e){o=e,l.$emit("$translateChangeSuccess",{language:e}),s&&C.set(R.storageKey(),o),N.setLocale(o),angular.forEach(F,function(e,t){F[t].setLocale(o)}),l.$emit("$translateChangeEnd",{language:e})},q=function(e){if(!e)throw"No language key specified for loading.";var t=v.defer();l.$emit("$translateLoadingStart",{language:e}),j=!0;var i=g;"string"==typeof i&&(i=n.get(i));var r=angular.extend({},f,{key:e,$http:angular.extend({},{cache:i},f.$http)});return n.get(d)(r).then(function(n){var i={};l.$emit("$translateLoadingSuccess",{language:e}),angular.isArray(n)?angular.forEach(n,function(e){angular.extend(i,D(e))}):angular.extend(i,D(n)),j=!1,t.resolve({key:e,table:i}),l.$emit("$translateLoadingEnd",{language:e})},function(e){l.$emit("$translateLoadingError",{language:e}),t.reject(e),l.$emit("$translateLoadingEnd",{language:e})}),t.promise};if(s&&(C=n.get(s),!C.get||!C.set))throw new Error("Couldn't use storage '"+s+"', missing get() or set() method!");angular.isFunction(N.useSanitizeValueStrategy)&&N.useSanitizeValueStrategy(b),y.length&&angular.forEach(y,function(e){var i=n.get(e);i.setLocale(t||o),angular.isFunction(i.useSanitizeValueStrategy)&&i.useSanitizeValueStrategy(b),F[i.getInterpolationIdentifier()]=i});var U=function(e){var t=v.defer();return Object.prototype.hasOwnProperty.call(m,e)?t.resolve(m[e]):L[e]?L[e].then(function(e){T(e.key,e.table),t.resolve(e.table)},t.reject):t.reject(),t.promise},_=function(e,t,n,i){var r=v.defer();return U(e).then(function(a){Object.prototype.hasOwnProperty.call(a,t)?(i.setLocale(e),r.resolve(i.interpolate(a[t],n)),i.setLocale(o)):r.reject()},r.reject),r.promise},B=function(e,t,n,i){var r,a=m[e];return Object.prototype.hasOwnProperty.call(a,t)&&(i.setLocale(e),r=i.interpolate(a[t],n),i.setLocale(o)),r},W=function(e){if(c){var t=n.get(c)(e,o);return void 0!==t?t:e}return e},z=function(e,t,n,r){var o=v.defer();if(e<i.length){var a=i[e];_(a,t,n,r).then(o.resolve,function(){z(e+1,t,n,r).then(o.resolve)})}else o.resolve(W(t));return o.promise},Y=function(e,t,n,r){var o;if(e<i.length){var a=i[e];o=B(a,t,n,r),o||(o=Y(e+1,t,n,r))}return o},K=function(e,t,n){return z(P>0?P:I,e,t,n)},G=function(e,t,n){return Y(P>0?P:I,e,t,n)},X=function(e,t,n){var r=v.defer(),a=o?m[o]:m,s=n?F[n]:N;if(a&&Object.prototype.hasOwnProperty.call(a,e)){var l=a[e];"@:"===l.substr(0,2)?R(l.substr(2),t,n).then(r.resolve,r.reject):r.resolve(s.interpolate(l,t))}else{var u;c&&!j&&(u=W(e)),o&&i&&i.length?K(e,t,s).then(function(e){r.resolve(e)},function(e){r.reject(V(e))}):c&&!j&&u?r.resolve(u):r.reject(V(e))}return r.promise},Z=function(e,t,n){var r,a=o?m[o]:m,s=n?F[n]:N;if(a&&Object.prototype.hasOwnProperty.call(a,e)){var l=a[e];r="@:"===l.substr(0,2)?Z(l.substr(2),t,n):s.interpolate(l,t)}else{var u;c&&!j&&(u=W(e)),o&&i&&i.length?(I=0,r=G(e,t,s)):r=c&&!j&&u?u:V(e)}return r};if(R.preferredLanguage=function(e){return e&&A(e),t},R.cloakClassName=function(){return w},R.fallbackLanguage=function(e){if(void 0!==e&&null!==e){if(M(e),d&&i&&i.length)for(var t=0,n=i.length;t<n;t++)L[i[t]]||(L[i[t]]=q(i[t]));R.use(R.use())}return r?i[0]:i},R.useFallbackLanguage=function(e){if(void 0!==e&&null!==e)if(e){var t=k(i,e);t>-1&&(P=t)}else P=0},R.proposedLanguage=function(){return a},R.storage=function(){return C},R.use=function(e){if(!e)return o;var t=v.defer();l.$emit("$translateChangeStart",{language:e});var n=E(e);return n&&(e=n),m[e]||!d||L[e]?(t.resolve(e),H(e)):(a=e,L[e]=q(e).then(function(n){T(n.key,n.table),t.resolve(n.key),H(n.key),a===e&&(a=void 0)},function(e){a===e&&(a=void 0),l.$emit("$translateChangeError",{language:e}),t.reject(e),l.$emit("$translateChangeEnd",{language:e})})),t.promise},R.storageKey=function(){return O()},R.isPostCompilingEnabled=function(){return x},R.refresh=function(e){function t(){r.resolve(),l.$emit("$translateRefreshEnd",{language:e})}function n(){r.reject(),l.$emit("$translateRefreshEnd",{language:e})}if(!d)throw new Error("Couldn't refresh translation table, no loader registered!");var r=v.defer();if(l.$emit("$translateRefreshStart",{language:e}),e)m[e]?q(e).then(function(n){T(n.key,n.table),e===o&&H(o),t()},n):n();else{var a=[],s={};if(i&&i.length)for(var c=0,u=i.length;c<u;c++)a.push(q(i[c])),s[i[c]]=!0;o&&!s[o]&&a.push(q(o)),v.all(a).then(function(e){angular.forEach(e,function(e){m[e.key]&&delete m[e.key],T(e.key,e.table)}),o&&H(o),t()})}return r.promise},R.instant=function(e,n,r){if(null===e||angular.isUndefined(e))return e;if(angular.isArray(e)){for(var a={},s=0,l=e.length;s<l;s++)a[e[s]]=R.instant(e[s],n,r);return a}if(angular.isString(e)&&e.length<1)return e;e&&(e=S.apply(e));var u,d=[];t&&d.push(t),o&&d.push(o),i&&i.length&&(d=d.concat(i));for(var f=0,p=d.length;f<p;f++){var h=d[f];if(m[h]&&void 0!==m[h][e]&&(u=Z(e,n,r)),void 0!==u)break}return u||""===u||(u=N.interpolate(e,n),c&&!j&&(u=W(e))),u},R.versionInfo=function(){return"2.4.1"},R.loaderCache=function(){return g},d&&(angular.equals(m,{})&&R.use(R.use()),i&&i.length))for(var J=function(e){T(e.key,e.table),l.$emit("$translateChangeEnd",{language:e.key})},Q=0,ee=i.length;Q<ee;Q++)L[i[Q]]=q(i[Q]).then(J);return R}]}]),angular.module("pascalprecht.translate").factory("$translateDefaultInterpolation",["$interpolate",function(e){var t,n={},i=null,r={escaped:function(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=angular.element("<div></div>").text(e[n]).html());return t}},o=function(e){return angular.isFunction(r[i])?r[i](e):e};return n.setLocale=function(e){t=e},n.getInterpolationIdentifier=function(){return"default"},n.useSanitizeValueStrategy=function(e){return i=e,this},n.interpolate=function(t,n){
+return i&&(n=o(n)),e(t)(n||{})},n}]),angular.module("pascalprecht.translate").constant("$STORAGE_KEY","NG_TRANSLATE_LANG_KEY"),angular.module("pascalprecht.translate").directive("translate",["$translate","$q","$interpolate","$compile","$parse","$rootScope",function(e,t,n,i,r,o){return{restrict:"AE",scope:!0,compile:function(t,a){var s=a.translateValues?a.translateValues:void 0,l=a.translateInterpolation?a.translateInterpolation:void 0,c=t[0].outerHTML.match(/translate-value-+/i),u="^(.*)("+n.startSymbol()+".*"+n.endSymbol()+")(.*)";return function(t,d,f){if(t.interpolateParams={},t.preText="",t.postText="",f.$observe("translate",function(e){if(angular.equals(e,"")||!angular.isDefined(e)){var i=d.text().match(u);angular.isArray(i)?(t.preText=i[1],t.postText=i[3],t.translationId=n(i[2])(t.$parent)):t.translationId=d.text().replace(/^\s+|\s+$/g,"")}else t.translationId=e}),f.$observe("translateDefault",function(e){t.defaultText=e}),s&&f.$observe("translateValues",function(e){e&&t.$parent.$watch(function(){angular.extend(t.interpolateParams,r(e)(t.$parent))})}),c){for(var p in f)Object.prototype.hasOwnProperty.call(f,p)&&"translateValue"===p.substr(0,14)&&"translateValues"!==p&&function(e){f.$observe(e,function(n){t.interpolateParams[angular.lowercase(e.substr(14,1))+e.substr(15)]=n})}(p)}var h=function(t,n,r){r||void 0===n.defaultText||(t=n.defaultText),d.html(n.preText+t+n.postText);var o=e.isPostCompilingEnabled(),s=void 0!==a.translateCompile,l=s&&"false"!==a.translateCompile;(o&&!s||l)&&i(d.contents())(n)},g=function(){return s||c?function(){var n=function(){t.translationId&&t.interpolateParams&&e(t.translationId,t.interpolateParams,l).then(function(e){h(e,t,!0)},function(e){h(e,t,!1)})};t.$watch("interpolateParams",n,!0),t.$watch("translationId",n)}:function(){var n=t.$watch("translationId",function(i){t.translationId&&i&&e(i,{},l).then(function(e){h(e,t,!0),n()},function(e){h(e,t,!1),n()})},!0)}}(),m=o.$on("$translateChangeSuccess",g);g(),t.$on("$destroy",m)}}}}]),angular.module("pascalprecht.translate").directive("translateCloak",["$rootScope","$translate",function(e,t){return{compile:function(n){var i=e.$on("$translateChangeEnd",function(){n.removeClass(t.cloakClassName()),i(),i=null});n.addClass(t.cloakClassName())}}}]),angular.module("pascalprecht.translate").filter("translate",["$parse","$translate",function(e,t){var n=function(n,i,r){return angular.isObject(i)||(i=e(i)(this)),t.instant(n,i,r)};return n.$stateful=!0,n}]),function(e,t){"function"==typeof define&&define.amd?define([],function(){return t()}):"object"==typeof exports?module.exports=t():t()}(0,function(){function e(e,t){"use strict";return function(n){if(!(n&&(angular.isArray(n.files)||angular.isString(n.prefix)&&angular.isString(n.suffix))))throw new Error("Couldn't load static files, no files and prefix or suffix specified!");n.files||(n.files=[{prefix:n.prefix,suffix:n.suffix}]);for(var i=e.defer(),r=[],o=n.files.length,a=0;a<o;a++)r.push(function(i){if(!i||!angular.isString(i.prefix)||!angular.isString(i.suffix))throw new Error("Couldn't load static file, no prefix or suffix specified!");var r=e.defer();return t(angular.extend({url:[i.prefix,n.key,i.suffix].join(""),method:"GET",params:""},n.$http)).success(function(e){r.resolve(e)}).error(function(){r.reject(n.key)}),r.promise}({prefix:n.files[a].prefix,key:n.key,suffix:n.files[a].suffix}));return e.all(r).then(function(e){for(var t=e.length,n={},r=0;r<t;r++)for(var o in e[r])n[o]=e[r][o];i.resolve(n)},function(e){i.reject(e)}),i.promise}}return angular.module("pascalprecht.translate").factory("$translateStaticFilesLoader",e),e.$inject=["$q","$http"],e.displayName="$translateStaticFilesLoader","pascalprecht.translate"}),function(e,t){"function"==typeof define&&define.amd?define([],function(){return t()}):"object"==typeof exports?module.exports=t():t()}(0,function(){function e(e){"use strict";return{get:function(t){return e.get(t)},set:function(t,n){e.put(t,n)},put:function(t,n){e.put(t,n)}}}return angular.module("pascalprecht.translate").factory("$translateCookieStorage",e),e.$inject=["$cookieStore"],e.displayName="$translateCookieStorage","pascalprecht.translate"}),function(e,t,n){"use strict";function i(e,n,i,r,o,a){function s(e,n){return angular.element((n||t).querySelectorAll(e))}function l(e){return c[e]?c[e]:c[e]=n.get(e,{cache:a}).then(function(e){return e.data})}this.compile=function(t){t.template&&/\.html$/.test(t.template)&&(console.warn("Deprecated use of `template` option to pass a file. Please use the `templateUrl` option instead."),t.templateUrl=t.template,t.template="");var n=t.templateUrl,a=t.template||"",c=t.controller,u=t.controllerAs,d=angular.copy(t.resolve||{}),f=angular.copy(t.locals||{}),p=t.transformTemplate||angular.identity,h=t.bindToController;if(angular.forEach(d,function(e,t){angular.isString(e)?d[t]=i.get(e):d[t]=i.invoke(e)}),angular.extend(d,f),a)d.$template=e.when(a);else{if(!n)throw new Error("Missing `template` / `templateUrl` option.");d.$template=l(n)}return t.titleTemplate&&(d.$template=e.all([d.$template,l(t.titleTemplate)]).then(function(e){var t=angular.element(e[0]);return s('[ng-bind="title"]',t[0]).removeAttr("ng-bind").html(e[1]),t[0].outerHTML})),t.contentTemplate&&(d.$template=e.all([d.$template,l(t.contentTemplate)]).then(function(e){var n=angular.element(e[0]),i=s('[ng-bind="content"]',n[0]).removeAttr("ng-bind").html(e[1]);return t.templateUrl||i.next().remove(),n[0].outerHTML})),e.all(d).then(function(e){var n=p(e.$template);t.html&&(n=n.replace(/ng-bind="/gi,'ng-bind-html="'));var i=angular.element("<div>").html(n.trim()).contents(),a=r(i);return{locals:e,element:i,link:function(t){if(e.$scope=t,c){var n=o(c,e,!0);h&&angular.extend(n.instance,e);var r=angular.isObject(n)?n:n();i.data("$ngControllerController",r),i.children().data("$ngControllerController",r),u&&(t[u]=r)}return a.apply(null,arguments)}}})};var c={}}i.$inject=["$q","$http","$injector","$compile","$controller","$templateCache"],angular.module("mgcrea.ngStrap.tooltip",["mgcrea.ngStrap.core","mgcrea.ngStrap.helpers.dimensions"]).provider("$tooltip",function(){var e=this.defaults={animation:"am-fade",customClass:"",prefixClass:"tooltip",prefixEvent:"tooltip",container:!1,target:!1,placement:"top",templateUrl:"tooltip/tooltip.tpl.html",template:"",titleTemplate:!1,trigger:"hover focus",keyboard:!1,html:!1,show:!1,title:"",type:"",delay:0,autoClose:!1,bsEnabled:!0,viewport:{selector:"body",padding:0}};this.$get=["$window","$rootScope","$bsCompiler","$q","$templateCache","$http","$animate","$sce","dimensions","$$rAF","$timeout",function(n,i,r,o,a,s,l,c,u,d,f){function p(o,a){function s(){N.$emit(I.prefixEvent+".show",O)}function p(){if(N.$emit(I.prefixEvent+".hide",O),H===B){if(_&&"focus"===I.trigger)return o[0].blur();M()}}function $(){var e=I.trigger.split(" ");angular.forEach(e,function(e){"click"===e||"contextmenu"===e?o.on(e,O.toggle):"manual"!==e&&(o.on("hover"===e?"mouseenter":"focus",O.enter),o.on("hover"===e?"mouseleave":"blur",O.leave),"button"===j&&"hover"!==e&&o.on(m?"touchstart":"mousedown",O.$onFocusElementMouseDown))})}function y(){for(var e=I.trigger.split(" "),t=e.length;t--;){var n=e[t];"click"===n||"contextmenu"===n?o.off(n,O.toggle):"manual"!==n&&(o.off("hover"===n?"mouseenter":"focus",O.enter),o.off("hover"===n?"mouseleave":"blur",O.leave),"button"===j&&"hover"!==n&&o.off(m?"touchstart":"mousedown",O.$onFocusElementMouseDown))}}function b(){"focus"!==I.trigger?H.on("keyup",O.$onKeyUp):o.on("keyup",O.$onFocusKeyUp)}function w(){"focus"!==I.trigger?H.off("keyup",O.$onKeyUp):o.off("keyup",O.$onFocusKeyUp)}function x(){f(function(){H.on("click",k),v.on("click",O.hide),W=!0},0,!1)}function C(){W&&(H.off("click",k),v.off("click",O.hide),W=!1)}function k(e){e.stopPropagation()}function S(e){e=e||I.target||o;var i=e[0],r="BODY"===i.tagName,a=i.getBoundingClientRect(),s={};for(var l in a)s[l]=a[l];null===s.width&&(s=angular.extend({},s,{width:a.right-a.left,height:a.bottom-a.top}));var c=r?{top:0,left:0}:u.offset(i),d={scroll:r?t.documentElement.scrollTop||t.body.scrollTop:e.prop("scrollTop")||0},f=r?{width:t.documentElement.clientWidth,height:n.innerHeight}:null;return angular.extend({},s,d,f,c)}function E(e,t,n,i){var r,o=e.split("-");switch(o[0]){case"right":r={top:t.top+t.height/2-i/2,left:t.left+t.width};break;case"bottom":r={top:t.top+t.height,left:t.left+t.width/2-n/2};break;case"left":r={top:t.top+t.height/2-i/2,left:t.left-n};break;default:r={top:t.top-i,left:t.left+t.width/2-n/2}}if(!o[1])return r;if("top"===o[0]||"bottom"===o[0])switch(o[1]){case"left":r.left=t.left;break;case"right":r.left=t.left+t.width-n}else if("left"===o[0]||"right"===o[0])switch(o[1]){case"top":r.top=t.top-i+t.height;break;case"bottom":r.top=t.top}return r}function T(e,t){var n=H[0],i=n.offsetWidth,r=n.offsetHeight,o=parseInt(u.css(n,"margin-top"),10),a=parseInt(u.css(n,"margin-left"),10);isNaN(o)&&(o=0),isNaN(a)&&(a=0),e.top=e.top+o,e.left=e.left+a,u.setOffset(n,angular.extend({using:function(e){H.css({top:Math.round(e.top)+"px",left:Math.round(e.left)+"px",right:""})}},e),0);var s=n.offsetWidth,l=n.offsetHeight;if("top"===t&&l!==r&&(e.top=e.top+r-l),!/top-left|top-right|bottom-left|bottom-right/.test(t)){var c=D(t,e,s,l);if(c.left?e.left+=c.left:e.top+=c.top,u.setOffset(n,e),/top|right|bottom|left/.test(t)){var d=/top|bottom/.test(t);A(d?2*c.left-i+s:2*c.top-r+l,n[d?"offsetWidth":"offsetHeight"],d)}}}function D(e,t,n,i){var r={top:0,left:0};if(!O.$viewport)return r;var o=I.viewport&&I.viewport.padding||0,a=S(O.$viewport);if(/right|left/.test(e)){var s=t.top-o-a.scroll,l=t.top+o-a.scroll+i;s<a.top?r.top=a.top-s:l>a.top+a.height&&(r.top=a.top+a.height-l)}else{var c=t.left-o,u=t.left+o+n;c<a.left?r.left=a.left-c:u>a.right&&(r.left=a.left+a.width-u)}return r}function A(e,t,n){g(".tooltip-arrow, .arrow",H[0]).css(n?"left":"top",50*(1-e/t)+"%").css(n?"top":"left","")}function M(){clearTimeout(L),O.$isShown&&null!==H&&(I.autoClose&&C(),I.keyboard&&w()),U&&(U.$destroy(),U=null),H&&(H.remove(),H=O.$element=null)}var O={},I=O.$options=angular.extend({},e,a),P=O.$promise=r.compile(I),N=O.$scope=I.scope&&I.scope.$new()||i.$new(),j=o[0].nodeName.toLowerCase();if(I.delay&&angular.isString(I.delay)){var F=I.delay.split(",").map(parseFloat);I.delay=F.length>1?{show:F[0],hide:F[1]}:F[0]}O.$id=I.id||o.attr("id")||"",I.title&&(N.title=c.trustAsHtml(I.title)),N.$setEnabled=function(e){N.$$postDigest(function(){O.setEnabled(e)})},N.$hide=function(){N.$$postDigest(function(){O.hide()})},N.$show=function(){N.$$postDigest(function(){O.show()})},N.$toggle=function(){N.$$postDigest(function(){O.toggle()})},O.$isShown=N.$isShown=!1;var L,R,V,H,q,U;P.then(function(e){V=e,O.init()}),O.init=function(){I.delay&&angular.isNumber(I.delay)&&(I.delay={show:I.delay,hide:I.delay}),"self"===I.container?q=o:angular.isElement(I.container)?q=I.container:I.container&&(q=g(I.container)),$(),I.target&&(I.target=angular.isElement(I.target)?I.target:g(I.target)),I.show&&N.$$postDigest(function(){"focus"===I.trigger?o[0].focus():O.show()})},O.destroy=function(){y(),M(),N.$destroy()},O.enter=function(){if(clearTimeout(L),R="in",!I.delay||!I.delay.show)return O.show();L=setTimeout(function(){"in"===R&&O.show()},I.delay.show)},O.show=function(){if(I.bsEnabled&&!O.$isShown){N.$emit(I.prefixEvent+".show.before",O);var e,t;I.container?(e=q,t=q[0].lastChild?angular.element(q[0].lastChild):null):(e=null,t=o),H&&M(),U=O.$scope.$new(),H=O.$element=V.link(U,function(e,t){}),H.css({top:"-9999px",left:"-9999px",right:"auto",display:"block",visibility:"hidden"}),I.animation&&H.addClass(I.animation),I.type&&H.addClass(I.prefixClass+"-"+I.type),I.customClass&&H.addClass(I.customClass),t?t.after(H):e.prepend(H),O.$isShown=N.$isShown=!0,h(N),O.$applyPlacement(),angular.version.minor<=2?l.enter(H,e,t,s):l.enter(H,e,t).then(s),h(N),d(function(){H&&H.css({visibility:"visible"}),I.keyboard&&("focus"!==I.trigger&&O.focus(),b())}),I.autoClose&&x()}},O.leave=function(){if(clearTimeout(L),R="out",!I.delay||!I.delay.hide)return O.hide();L=setTimeout(function(){"out"===R&&O.hide()},I.delay.hide)};var _,B;O.hide=function(e){O.$isShown&&(N.$emit(I.prefixEvent+".hide.before",O),_=e,B=H,angular.version.minor<=2?l.leave(H,p):l.leave(H).then(p),O.$isShown=N.$isShown=!1,h(N),I.keyboard&&null!==H&&w(),I.autoClose&&null!==H&&C())},O.toggle=function(e){e&&e.preventDefault(),O.$isShown?O.leave():O.enter()},O.focus=function(){H[0].focus()},O.setEnabled=function(e){I.bsEnabled=e},O.setViewport=function(e){I.viewport=e},O.$applyPlacement=function(){if(H){var t=I.placement,n=/\s?auto?\s?/i,i=n.test(t);i&&(t=t.replace(n,"")||e.placement),H.addClass(I.placement);var r=S(),o=H.prop("offsetWidth"),a=H.prop("offsetHeight");if(O.$viewport=I.viewport&&g(I.viewport.selector||I.viewport),i){var s=t,l=S(O.$viewport);/bottom/.test(s)&&r.bottom+a>l.bottom?t=s.replace("bottom","top"):/top/.test(s)&&r.top-a<l.top&&(t=s.replace("top","bottom")),/left/.test(s)&&r.left-o<l.left?t=t.replace("left","right"):/right/.test(s)&&r.right+o>l.width&&(t=t.replace("right","left")),H.removeClass(s).addClass(t)}T(E(t,r,o,a),t)}},O.$onKeyUp=function(e){27===e.which&&O.$isShown&&(O.hide(),e.stopPropagation())},O.$onFocusKeyUp=function(e){27===e.which&&(o[0].blur(),e.stopPropagation())},O.$onFocusElementMouseDown=function(e){e.preventDefault(),e.stopPropagation(),O.$isShown?o[0].blur():o[0].focus()};var W=!1;return O}function h(e){e.$$phase||e.$root&&e.$root.$$phase||e.$digest()}function g(e,n){return angular.element((n||t).querySelectorAll(e))}var m="createTouch"in n.document,v=angular.element(n.document);return p}]}).directive("bsTooltip",["$window","$location","$sce","$tooltip","$$rAF",function(e,t,n,i,r){return{restrict:"EAC",scope:!0,link:function(e,t,o,a){var s,l={scope:e};angular.forEach(["template","templateUrl","controller","controllerAs","titleTemplate","placement","container","delay","trigger","html","animation","backdropAnimation","type","customClass","id"],function(e){angular.isDefined(o[e])&&(l[e]=o[e])});var c=/^(false|0|)$/i;angular.forEach(["html","container"],function(e){angular.isDefined(o[e])&&c.test(o[e])&&(l[e]=!1)});var u=t.attr("data-target");angular.isDefined(u)&&(c.test(u)?l.target=!1:l.target=u),e.hasOwnProperty("title")||(e.title=""),o.$observe("title",function(t){if(angular.isDefined(t)||!e.hasOwnProperty("title")){var i=e.title;e.title=n.trustAsHtml(t),angular.isDefined(i)&&r(function(){s&&s.$applyPlacement()})}}),o.$observe("disabled",function(e){e&&s.$isShown&&s.hide()}),o.bsTooltip&&e.$watch(o.bsTooltip,function(t,n){angular.isObject(t)?angular.extend(e,t):e.title=t,angular.isDefined(n)&&r(function(){s&&s.$applyPlacement()})},!0),o.bsShow&&e.$watch(o.bsShow,function(e,t){s&&angular.isDefined(e)&&(angular.isString(e)&&(e=!!e.match(/true|,?(tooltip),?/i)),!0===e?s.show():s.hide())}),o.bsEnabled&&e.$watch(o.bsEnabled,function(e,t){s&&angular.isDefined(e)&&(angular.isString(e)&&(e=!!e.match(/true|1|,?(tooltip),?/i)),!1===e?s.setEnabled(!1):s.setEnabled(!0))}),o.viewport&&e.$watch(o.viewport,function(e){s&&angular.isDefined(e)&&s.setViewport(e)}),s=i(t,l),e.$on("$destroy",function(){s&&s.destroy(),l=null,s=null})}}}]),angular.module("mgcrea.ngStrap.typeahead",["mgcrea.ngStrap.tooltip","mgcrea.ngStrap.helpers.parseOptions"]).provider("$typeahead",function(){var e=this.defaults={animation:"am-fade",prefixClass:"typeahead",prefixEvent:"$typeahead",placement:"bottom-left",templateUrl:"typeahead/typeahead.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,minLength:1,filter:"bsAsyncFilter",limit:6,autoSelect:!1,comparator:"",trimValue:!0};this.$get=["$window","$rootScope","$tooltip","$$rAF","$timeout",function(t,n,i,r,o){function a(t,n,a){var l={},c=angular.extend({},e,a);l=i(t,c);var u=a.scope,d=l.$scope;d.$resetMatches=function(){d.$matches=[],d.$activeIndex=c.autoSelect?0:-1},d.$resetMatches(),d.$activate=function(e){d.$$postDigest(function(){l.activate(e)})},d.$select=function(e,t){d.$$postDigest(function(){l.select(e)})},d.$isVisible=function(){return l.$isVisible()},l.update=function(e){d.$matches=e,d.$activeIndex>=e.length&&(d.$activeIndex=c.autoSelect?0:-1),s(d),r(l.$applyPlacement)},l.activate=function(e){d.$activeIndex=e},l.select=function(e){if(-1!==e){var t=d.$matches[e].value;n.$setViewValue(t),n.$render(),d.$resetMatches(),u&&u.$digest(),d.$emit(c.prefixEvent+".select",t,e,l)}},l.$isVisible=function(){return c.minLength&&n?d.$matches.length&&angular.isString(n.$viewValue)&&n.$viewValue.length>=c.minLength:!!d.$matches.length},l.$getIndex=function(e){var t;for(t=d.$matches.length;t--&&!angular.equals(d.$matches[t].value,e););return t},l.$onMouseDown=function(e){e.preventDefault(),e.stopPropagation()},l.$onKeyDown=function(e){/(38|40|13)/.test(e.keyCode)&&(!l.$isVisible()||13===e.keyCode&&-1===d.$activeIndex||(e.preventDefault(),e.stopPropagation()),13===e.keyCode&&d.$matches.length?l.select(d.$activeIndex):38===e.keyCode&&d.$activeIndex>0?d.$activeIndex--:40===e.keyCode&&d.$activeIndex<d.$matches.length-1?d.$activeIndex++:angular.isUndefined(d.$activeIndex)&&(d.$activeIndex=0),d.$digest())};var f=l.show;l.show=function(){f(),o(function(){l.$element&&(l.$element.on("mousedown",l.$onMouseDown),c.keyboard&&t&&t.on("keydown",l.$onKeyDown))},0,!1)};var p=l.hide;return l.hide=function(){l.$element&&l.$element.off("mousedown",l.$onMouseDown),c.keyboard&&t&&t.off("keydown",l.$onKeyDown),c.autoSelect||l.activate(-1),p()},l}function s(e){e.$$phase||e.$root&&e.$root.$$phase||e.$digest()}return a.defaults=e,a}]}).filter("bsAsyncFilter",["$filter",function(e){return function(t,n,i){return t&&angular.isFunction(t.then)?t.then(function(t){return e("filter")(t,n,i)}):e("filter")(t,n,i)}}]).directive("bsTypeahead",["$window","$parse","$q","$typeahead","$parseOptions",function(e,t,n,i,r){var o=i.defaults;return{restrict:"EAC",require:"ngModel",link:function(e,t,n,a){t.off("change");var s={scope:e};angular.forEach(["template","templateUrl","controller","controllerAs","placement","container","delay","trigger","keyboard","html","animation","filter","limit","minLength","watchOptions","selectMode","autoSelect","comparator","id","prefixEvent","prefixClass"],function(e){angular.isDefined(n[e])&&(s[e]=n[e])});var l=/^(false|0|)$/i;angular.forEach(["html","container","trimValue","filter"],function(e){angular.isDefined(n[e])&&l.test(n[e])&&(s[e]=!1)}),t.attr("autocomplete")||t.attr("autocomplete","off");var c=angular.isDefined(s.filter)?s.filter:o.filter,u=s.limit||o.limit,d=s.comparator||o.comparator,f=n.bsOptions;c&&(f+=" | "+c+":$viewValue",d&&(f+=":"+d)),u&&(f+=" | limitTo:"+u);var p=r(f),h=i(t,a,s);if(s.watchOptions){var g=p.$match[7].replace(/\|.+/,"").replace(/\(.*\)/g,"").trim();e.$watchCollection(g,function(t,n){p.valuesFn(e,a).then(function(e){h.update(e),a.$render()})})}e.$watch(n.ngModel,function(t,n){e.$modelValue=t,p.valuesFn(e,a).then(function(e){if(s.selectMode&&!e.length&&t.length>0)return void a.$setViewValue(a.$viewValue.substring(0,a.$viewValue.length-1));e.length>u&&(e=e.slice(0,u)),h.update(e),a.$render()})}),a.$formatters.push(function(e){var t=p.displayValue(e);return t||(angular.isDefined(e)&&"object"!=typeof e?e:"")}),a.$render=function(){if(a.$isEmpty(a.$viewValue))return t.val("");var e=h.$getIndex(a.$modelValue),n=-1!==e?h.$scope.$matches[e].label:a.$viewValue;n=angular.isObject(n)?p.displayValue(n):n;var i=n?n.toString().replace(/<(?:.|\n)*?>/gm,""):"";t.val(!1===s.trimValue?i:i.trim())},e.$on("$destroy",function(){h&&h.destroy(),s=null,h=null})}}}]),angular.module("mgcrea.ngStrap.timepicker",["mgcrea.ngStrap.helpers.dateParser","mgcrea.ngStrap.helpers.dateFormatter","mgcrea.ngStrap.tooltip"]).provider("$timepicker",function(){var e=this.defaults={animation:"am-fade",prefixClass:"timepicker",placement:"bottom-left",templateUrl:"timepicker/timepicker.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,useNative:!0,timeType:"date",timeFormat:"shortTime",timezone:null,modelTimeFormat:null,autoclose:!1,minTime:-1/0,maxTime:1/0,length:5,hourStep:1,minuteStep:5,secondStep:5,roundDisplay:!1,iconUp:"glyphicon glyphicon-chevron-up",iconDown:"glyphicon glyphicon-chevron-down",arrowBehavior:"pager"};this.$get=["$window","$document","$rootScope","$sce","$dateFormatter","$tooltip","$timeout",function(t,n,i,r,o,a,s){function l(t,n,i){function r(e,n){var i=e+n;if(t[0].createTextRange){var r=t[0].createTextRange();r.collapse(!0),r.moveStart("character",e),r.moveEnd("character",i),r.select()}else t[0].setSelectionRange?t[0].setSelectionRange(e,i):angular.isUndefined(t[0].selectionStart)&&(t[0].selectionStart=e,t[0].selectionEnd=i)}function l(){t[0].focus()}var d=a(t,angular.extend({},e,i)),f=i.scope,p=d.$options,h=d.$scope,g=p.lang,m=function(e,t,n){return o.formatDate(e,t,g,n)},v=0,$=p.roundDisplay?function(e){var t=6e4*p.minuteStep;return new Date(Math.floor(e.getTime()/t)*t)}(new Date):new Date,y=n.$dateValue||$,b={hour:y.getHours(),meridian:y.getHours()<12,minute:y.getMinutes(),second:y.getSeconds(),millisecond:y.getMilliseconds()},w=o.getDatetimeFormat(p.timeFormat,g),x=o.hoursFormat(w),C=o.timeSeparator(w),k=o.minutesFormat(w),S=o.secondsFormat(w),E=o.showSeconds(w),T=o.showAM(w);h.$iconUp=p.iconUp,h.$iconDown=p.iconDown,h.$select=function(e,t){d.select(e,t)},h.$moveIndex=function(e,t){d.$moveIndex(e,t)},h.$switchMeridian=function(e){d.switchMeridian(e)},d.update=function(e){angular.isDate(e)&&!isNaN(e.getTime())?(d.$date=e,angular.extend(b,{hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds(),millisecond:e.getMilliseconds()}),d.$build()):d.$isBuilt||d.$build()},d.select=function(e,t,i){n.$dateValue&&!isNaN(n.$dateValue.getTime())||(n.$dateValue=new Date(1970,0,1)),angular.isDate(e)||(e=new Date(e)),0===t?n.$dateValue.setHours(e.getHours()):1===t?n.$dateValue.setMinutes(e.getMinutes()):2===t&&n.$dateValue.setSeconds(e.getSeconds()),n.$setViewValue(angular.copy(n.$dateValue)),n.$render(),p.autoclose&&!i&&s(function(){d.hide(!0)})},d.switchMeridian=function(e){if(n.$dateValue&&!isNaN(n.$dateValue.getTime())){var t=(e||n.$dateValue).getHours();n.$dateValue.setHours(t<12?t+12:t-12),n.$setViewValue(angular.copy(n.$dateValue)),n.$render()}},d.$build=function(){var e,t,n=h.midIndex=parseInt(p.length/2,10),i=[];for(e=0;e<p.length;e++)t=new Date(1970,0,1,b.hour-(n-e)*p.hourStep),i.push({date:t,label:m(t,x),selected:d.$date&&d.$isSelected(t,0),disabled:d.$isDisabled(t,0)});var r,o=[];for(e=0;e<p.length;e++)r=new Date(1970,0,1,0,b.minute-(n-e)*p.minuteStep),o.push({date:r,label:m(r,k),selected:d.$date&&d.$isSelected(r,1),disabled:d.$isDisabled(r,1)});var a,s=[];for(e=0;e<p.length;e++)a=new Date(1970,0,1,0,0,b.second-(n-e)*p.secondStep),s.push({date:a,label:m(a,S),selected:d.$date&&d.$isSelected(a,2),disabled:d.$isDisabled(a,2)});var l=[];for(e=0;e<p.length;e++)E?l.push([i[e],o[e],s[e]]):l.push([i[e],o[e]]);h.rows=l,h.showSeconds=E,h.showAM=T,h.isAM=(d.$date||i[n].date).getHours()<12,h.timeSeparator=C,d.$isBuilt=!0},d.$isSelected=function(e,t){return!!d.$date&&(0===t?e.getHours()===d.$date.getHours():1===t?e.getMinutes()===d.$date.getMinutes():2===t?e.getSeconds()===d.$date.getSeconds():void 0)},d.$isDisabled=function(e,t){var n;return 0===t?n=e.getTime()+6e4*b.minute+1e3*b.second:1===t?n=e.getTime()+36e5*b.hour+1e3*b.second:2===t&&(n=e.getTime()+36e5*b.hour+6e4*b.minute),n<1*p.minTime||n>1*p.maxTime},h.$arrowAction=function(e,t){"picker"===p.arrowBehavior?d.$setTimeByStep(e,t):d.$moveIndex(e,t)},d.$setTimeByStep=function(e,t){var n=new Date(d.$date||y),i=n.getHours(),r=n.getMinutes(),o=n.getSeconds();0===t?n.setHours(i-parseInt(p.hourStep,10)*e):1===t?n.setMinutes(r-parseInt(p.minuteStep,10)*e):2===t&&n.setSeconds(o-parseInt(p.secondStep,10)*e),d.select(n,t,!0)},d.$moveIndex=function(e,t){var n;0===t?(n=new Date(1970,0,1,b.hour+e*p.length,b.minute,b.second),angular.extend(b,{hour:n.getHours()})):1===t?(n=new Date(1970,0,1,b.hour,b.minute+e*p.length*p.minuteStep,b.second),angular.extend(b,{minute:n.getMinutes()})):2===t&&(n=new Date(1970,0,1,b.hour,b.minute,b.second+e*p.length*p.secondStep),angular.extend(b,{second:n.getSeconds()})),d.$build()},d.$onMouseDown=function(e){if("input"!==e.target.nodeName.toLowerCase()&&e.preventDefault(),e.stopPropagation(),u){var t=angular.element(e.target);"button"!==t[0].nodeName.toLowerCase()&&(t=t.parent()),t.triggerHandler("click")}},d.$onKeyDown=function(e){if(/(38|37|39|40|13)/.test(e.keyCode)&&!e.shiftKey&&!e.altKey){if(e.preventDefault(),e.stopPropagation(),13===e.keyCode)return void d.hide(!0);var t=new Date(d.$date),n=t.getHours(),i=m(t,x).length,o=t.getMinutes(),a=m(t,k).length,s=t.getSeconds(),l=m(t,S).length,c=/(37|39)/.test(e.keyCode),u=2+1*E+1*T;c&&(37===e.keyCode?v=v<1?u-1:v-1:39===e.keyCode&&(v=v<u-1?v+1:0));var h=[0,i],g=0;38===e.keyCode&&(g=-1),40===e.keyCode&&(g=1);var $=2===v&&E,y=2===v&&!E||3===v&&E;0===v?(t.setHours(n+g*parseInt(p.hourStep,10)),i=m(t,x).length,h=[0,i]):1===v?(t.setMinutes(o+g*parseInt(p.minuteStep,10)),a=m(t,k).length,h=[i+1,a]):$?(t.setSeconds(s+g*parseInt(p.secondStep,10)),l=m(t,S).length,h=[i+1+a+1,l]):y&&(c||d.switchMeridian(),h=[i+1+a+1+(l+1)*E,2]),d.select(t,v,!0),r(h[0],h[1]),f.$digest()}};var D=d.init;d.init=function(){if(c&&p.useNative)return t.prop("type","time"),void t.css("-webkit-appearance","textfield");u&&(t.prop("type","text"),t.attr("readonly","true"),t.on("click",l)),D()};var A=d.destroy;d.destroy=function(){c&&p.useNative&&t.off("click",l),A()};var M=d.show;d.show=function(){!u&&t.attr("readonly")||t.attr("disabled")||(M(),s(function(){d.$element&&d.$element.on(u?"touchstart":"mousedown",d.$onMouseDown),p.keyboard&&t&&t.on("keydown",d.$onKeyDown)},0,!1))};var O=d.hide;return d.hide=function(e){d.$isShown&&(d.$element&&d.$element.off(u?"touchstart":"mousedown",d.$onMouseDown),p.keyboard&&t&&t.off("keydown",d.$onKeyDown),O(e))},d}var c=/(ip[ao]d|iphone|android)/gi.test(t.navigator.userAgent),u="createTouch"in t.document&&c;return e.lang||(e.lang=o.getDefaultLocale()),l.defaults=e,l}]}).directive("bsTimepicker",["$window","$parse","$q","$dateFormatter","$dateParser","$timepicker",function(e,t,n,i,r,o){var a=o.defaults,s=/(ip[ao]d|iphone|android)/gi.test(e.navigator.userAgent);return{restrict:"EAC",require:"ngModel",link:function(e,t,n,l){function c(e){if(angular.isDate(e)){var t=isNaN(d.minTime)||new Date(e.getTime()).setFullYear(1970,0,1)>=d.minTime,n=isNaN(d.maxTime)||new Date(e.getTime()).setFullYear(1970,0,1)<=d.maxTime,i=t&&n;l.$setValidity("date",i),l.$setValidity("min",t),l.$setValidity("max",n),i&&(l.$dateValue=e)}}function u(){return!l.$dateValue||isNaN(l.$dateValue.getTime())?"":g(l.$dateValue,d.timeFormat)}var d={scope:e};angular.forEach(["template","templateUrl","controller","controllerAs","placement","container","delay","trigger","keyboard","html","animation","autoclose","timeType","timeFormat","timezone","modelTimeFormat","useNative","hourStep","minuteStep","secondStep","length","arrowBehavior","iconUp","iconDown","roundDisplay","id","prefixClass","prefixEvent"],function(e){angular.isDefined(n[e])&&(d[e]=n[e])});var f=/^(false|0|)$/i;angular.forEach(["html","container","autoclose","useNative","roundDisplay"],function(e){angular.isDefined(n[e])&&f.test(n[e])&&(d[e]=!1)}),s&&(d.useNative||a.useNative)&&(d.timeFormat="HH:mm");var p=o(t,l,d);d=p.$options;var h=d.lang,g=function(e,t,n){return i.formatDate(e,t,h,n)};n.bsShow&&e.$watch(n.bsShow,function(e,t){p&&angular.isDefined(e)&&(angular.isString(e)&&(e=!!e.match(/true|,?(timepicker),?/i)),!0===e?p.show():p.hide())});var m=r({format:d.timeFormat,lang:h});angular.forEach(["minTime","maxTime"],function(e){angular.isDefined(n[e])&&n.$observe(e,function(t){p.$options[e]=m.getTimeForAttribute(e,t),isNaN(p.$options[e])||p.$build(),c(l.$dateValue)})}),e.$watch(n.ngModel,function(e,t){p.update(l.$dateValue)},!0),l.$parsers.unshift(function(e){var t;if(!e)return l.$setValidity("date",!0),null;var n=angular.isDate(e)?e:m.parse(e,l.$dateValue);return!n||isNaN(n.getTime())?void l.$setValidity("date",!1):(c(n),"string"===d.timeType?(t=m.timezoneOffsetAdjust(n,d.timezone,!0),g(t,d.modelTimeFormat||d.timeFormat)):(t=m.timezoneOffsetAdjust(l.$dateValue,d.timezone,!0),"number"===d.timeType?t.getTime():"unix"===d.timeType?t.getTime()/1e3:"iso"===d.timeType?t.toISOString():new Date(t)))}),l.$formatters.push(function(e){var t;return t=angular.isUndefined(e)||null===e?NaN:angular.isDate(e)?e:"string"===d.timeType?m.parse(e,null,d.modelTimeFormat):"unix"===d.timeType?new Date(1e3*e):new Date(e),l.$dateValue=m.timezoneOffsetAdjust(t,d.timezone),u()}),l.$render=function(){t.val(u())},e.$on("$destroy",function(){p&&p.destroy(),d=null,p=null})}}}]),angular.module("mgcrea.ngStrap.tab",[]).provider("$tab",function(){var e=this.defaults={animation:"am-fade",template:"tab/tab.tpl.html",navClass:"nav-tabs",activeClass:"active"},t=this.controller=function(t,n,i){var r=this;r.$options=angular.copy(e),angular.forEach(["animation","navClass","activeClass"],function(e){angular.isDefined(i[e])&&(r.$options[e]=i[e])}),t.$navClass=r.$options.navClass,t.$activeClass=r.$options.activeClass,r.$panes=t.$panes=[],r.$activePaneChangeListeners=r.$viewChangeListeners=[],r.$push=function(e){angular.isUndefined(r.$panes.$active)&&t.$setActive(e.name||0),r.$panes.push(e)},r.$remove=function(e){var t,n=r.$panes.indexOf(e),i=r.$panes.$active;t=angular.isString(i)?r.$panes.map(function(e){return e.name}).indexOf(i):r.$panes.$active,r.$panes.splice(n,1),n<t?t--:n===t&&t===r.$panes.length&&t--,t>=0&&t<r.$panes.length?r.$setActive(r.$panes[t].name||t):r.$setActive()},r.$setActive=t.$setActive=function(e){r.$panes.$active=e,r.$activePaneChangeListeners.forEach(function(e){e()})},r.$isActive=t.$isActive=function(e,t){return r.$panes.$active===e.name||r.$panes.$active===t}};this.$get=function(){var n={};return n.defaults=e,n.controller=t,n}}).directive("bsTabs",["$window","$animate","$tab","$parse",function(e,t,n,i){var r=n.defaults;return{require:["?ngModel","bsTabs"],transclude:!0,scope:!0,controller:["$scope","$element","$attrs",n.controller],templateUrl:function(e,t){return t.template||r.template},link:function(e,t,n,r){var o=r[0],a=r[1];if(o&&(a.$activePaneChangeListeners.push(function(){o.$setViewValue(a.$panes.$active)}),o.$formatters.push(function(e){return a.$setActive(e),e})),n.bsActivePane){var s=i(n.bsActivePane);a.$activePaneChangeListeners.push(function(){s.assign(e,a.$panes.$active)}),e.$watch(n.bsActivePane,function(e,t){a.$setActive(e)},!0)}}}}]).directive("bsPane",["$window","$animate","$sce",function(e,t,n){return{require:["^?ngModel","^bsTabs"],scope:!0,link:function(e,i,r,o){function a(){var n=s.$panes.indexOf(e);t[s.$isActive(e,n)?"addClass":"removeClass"](i,s.$options.activeClass)}var s=o[1];i.addClass("tab-pane"),r.$observe("title",function(t,i){e.title=n.trustAsHtml(t)}),e.name=r.name,s.$options.animation&&i.addClass(s.$options.animation),r.$observe("disabled",function(t,n){e.disabled=e.$eval(t)}),s.$push(e),e.$on("$destroy",function(){s.$remove(e)}),s.$activePaneChangeListeners.push(function(){a()}),a()}}}]),angular.module("mgcrea.ngStrap.select",["mgcrea.ngStrap.tooltip","mgcrea.ngStrap.helpers.parseOptions"]).provider("$select",function(){var e=this.defaults={animation:"am-fade",prefixClass:"select",prefixEvent:"$select",placement:"bottom-left",templateUrl:"select/select.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,multiple:!1,allNoneButtons:!1,sort:!0,caretHtml:'&nbsp;<span class="caret"></span>',placeholder:"Choose among the following...",allText:"All",noneText:"None",maxLength:3,maxLengthHtml:"selected",iconCheckmark:"glyphicon glyphicon-ok"};this.$get=["$window","$document","$rootScope","$tooltip","$timeout",function(t,n,i,r,o){function a(i,a,s){var c={},u=angular.extend({},e,s);c=r(i,u);var d=c.$scope;d.$matches=[],u.multiple?d.$activeIndex=[]:d.$activeIndex=-1,d.$isMultiple=u.multiple,d.$showAllNoneButtons=u.allNoneButtons&&u.multiple,d.$iconCheckmark=u.iconCheckmark,d.$allText=u.allText,d.$noneText=u.noneText,d.$activate=function(e){d.$$postDigest(function(){
+c.activate(e)})},d.$select=function(e,t){d.$$postDigest(function(){c.select(e)})},d.$isVisible=function(){return c.$isVisible()},d.$isActive=function(e){return c.$isActive(e)},d.$selectAll=function(){for(var e=0;e<d.$matches.length;e++)d.$isActive(e)||d.$select(e)},d.$selectNone=function(){for(var e=0;e<d.$matches.length;e++)d.$isActive(e)&&d.$select(e)},c.update=function(e){d.$matches=e,c.$updateActiveIndex()},c.activate=function(e){return u.multiple?(c.$isActive(e)?d.$activeIndex.splice(d.$activeIndex.indexOf(e),1):d.$activeIndex.push(e),u.sort&&d.$activeIndex.sort(function(e,t){return e-t})):d.$activeIndex=e,d.$activeIndex},c.select=function(e){var t=d.$matches[e].value;d.$apply(function(){c.activate(e),u.multiple?a.$setViewValue(d.$activeIndex.map(function(e){return angular.isUndefined(d.$matches[e])?null:d.$matches[e].value})):(a.$setViewValue(t),c.hide())}),d.$emit(u.prefixEvent+".select",t,e,c)},c.$updateActiveIndex=function(){u.multiple?angular.isArray(a.$modelValue)?d.$activeIndex=a.$modelValue.map(function(e){return c.$getIndex(e)}):d.$activeIndex=[]:angular.isDefined(a.$modelValue)&&d.$matches.length?d.$activeIndex=c.$getIndex(a.$modelValue):d.$activeIndex=-1},c.$isVisible=function(){return u.minLength&&a?d.$matches.length&&a.$viewValue.length>=u.minLength:d.$matches.length},c.$isActive=function(e){return u.multiple?-1!==d.$activeIndex.indexOf(e):d.$activeIndex===e},c.$getIndex=function(e){var t;for(t=d.$matches.length;t--&&!angular.equals(d.$matches[t].value,e););return t},c.$onMouseDown=function(e){if(e.preventDefault(),e.stopPropagation(),l){angular.element(e.target).triggerHandler("click")}},c.$onKeyDown=function(e){if(/(9|13|38|40)/.test(e.keyCode))return 9!==e.keyCode&&(e.preventDefault(),e.stopPropagation()),u.multiple&&9===e.keyCode?c.hide():u.multiple||13!==e.keyCode&&9!==e.keyCode?void(u.multiple||(38===e.keyCode&&d.$activeIndex>0?d.$activeIndex--:38===e.keyCode&&d.$activeIndex<0?d.$activeIndex=d.$matches.length-1:40===e.keyCode&&d.$activeIndex<d.$matches.length-1?d.$activeIndex++:angular.isUndefined(d.$activeIndex)&&(d.$activeIndex=0),d.$digest())):c.select(d.$activeIndex)},c.$isIE=function(){var e=t.navigator.userAgent;return e.indexOf("MSIE ")>0||e.indexOf("Trident/")>0||e.indexOf("Edge/")>0},c.$selectScrollFix=function(e){"UL"===n[0].activeElement.tagName&&(e.preventDefault(),e.stopImmediatePropagation(),e.target.focus())};var f=c.show;c.show=function(){f(),u.multiple&&c.$element.addClass("select-multiple"),o(function(){c.$element.on(l?"touchstart":"mousedown",c.$onMouseDown),u.keyboard&&i.on("keydown",c.$onKeyDown)},0,!1)};var p=c.hide;return c.hide=function(){!u.multiple&&angular.isUndefined(a.$modelValue)&&(d.$activeIndex=-1),c.$element.off(l?"touchstart":"mousedown",c.$onMouseDown),u.keyboard&&i.off("keydown",c.$onKeyDown),p(!0)},c}var s=/(ip[ao]d|iphone|android)/gi.test(t.navigator.userAgent),l="createTouch"in t.document&&s;return a.defaults=e,a}]}).directive("bsSelect",["$window","$parse","$q","$select","$parseOptions",function(e,t,n,i,r){var o=i.defaults;return{restrict:"EAC",require:"ngModel",link:function(e,t,n,a){var s={scope:e,placeholder:o.placeholder};angular.forEach(["template","templateUrl","controller","controllerAs","placement","container","delay","trigger","keyboard","html","animation","placeholder","allNoneButtons","maxLength","maxLengthHtml","allText","noneText","iconCheckmark","autoClose","id","sort","caretHtml","prefixClass","prefixEvent"],function(e){angular.isDefined(n[e])&&(s[e]=n[e])});var l=/^(false|0|)$/i;angular.forEach(["html","container","allNoneButtons","sort"],function(e){angular.isDefined(n[e])&&l.test(n[e])&&(s[e]=!1)});var c=t.attr("data-multiple");if(angular.isDefined(c)&&(l.test(c)?s.multiple=!1:s.multiple=c),"select"===t[0].nodeName.toLowerCase()){var u=t;u.css("display","none"),t=angular.element('<button type="button" class="btn btn-default"></button>'),u.after(t)}var d=r(n.bsOptions),f=i(t,a,s);f.$isIE()&&t[0].addEventListener("blur",f.$selectScrollFix);var p=d.$match[7].replace(/\|.+/,"").trim();e.$watch(p,function(t,n){d.valuesFn(e,a).then(function(e){f.update(e),a.$render()})},!0),e.$watch(n.ngModel,function(e,t){f.$updateActiveIndex(),a.$render()},!0),a.$render=function(){var e,n;s.multiple&&angular.isArray(a.$modelValue)?(e=a.$modelValue.map(function(e){return-1!==(n=f.$getIndex(e))&&f.$scope.$matches[n].label}).filter(angular.isDefined),e=e.length>(s.maxLength||o.maxLength)?e.length+" "+(s.maxLengthHtml||o.maxLengthHtml):e.join(", ")):(n=f.$getIndex(a.$modelValue),e=-1!==n&&f.$scope.$matches[n].label),t.html((e||s.placeholder)+(s.caretHtml||o.caretHtml))},s.multiple&&(a.$isEmpty=function(e){return!e||0===e.length}),e.$on("$destroy",function(){f&&f.destroy(),s=null,f=null})}}}]),angular.module("mgcrea.ngStrap.scrollspy",["mgcrea.ngStrap.helpers.debounce","mgcrea.ngStrap.helpers.dimensions"]).provider("$scrollspy",function(){var e=this.$$spies={},n=this.defaults={debounce:150,throttle:100,offset:100};this.$get=["$window","$document","$rootScope","dimensions","debounce","throttle",function(i,r,o,a,s,l){function c(e,t){return e[0].nodeName&&e[0].nodeName.toLowerCase()===t.toLowerCase()}function u(r){var u=angular.extend({},n,r);u.element||(u.element=p);var h=c(u.element,"body"),g=h?d:u.element,m=h?"window":u.id;if(e[m])return e[m].$$count++,e[m];var v,$,y,b,w,x,C,k,S={},E=S.$trackedElements=[],T=[];return S.init=function(){this.$$count=1,b=s(this.checkPosition,u.debounce),w=l(this.checkPosition,u.throttle),g.on("click",this.checkPositionWithEventLoop),d.on("resize",b),g.on("scroll",w),x=s(this.checkOffsets,u.debounce),v=o.$on("$viewContentLoaded",x),$=o.$on("$includeContentLoaded",x),x(),m&&(e[m]=S)},S.destroy=function(){--this.$$count>0||(g.off("click",this.checkPositionWithEventLoop),d.off("resize",b),g.off("scroll",w),v(),$(),m&&delete e[m])},S.checkPosition=function(){if(T.length){if(k=(h?i.pageYOffset:g.prop("scrollTop"))||0,C=Math.max(i.innerHeight,f.prop("clientHeight")),k<T[0].offsetTop&&y!==T[0].target)return S.$activateElement(T[0]);for(var e=T.length;e--;)if(!angular.isUndefined(T[e].offsetTop)&&null!==T[e].offsetTop&&y!==T[e].target&&!(k<T[e].offsetTop||T[e+1]&&k>T[e+1].offsetTop))return S.$activateElement(T[e])}},S.checkPositionWithEventLoop=function(){setTimeout(S.checkPosition,1)},S.$activateElement=function(e){if(y){var t=S.$getTrackedElement(y);t&&(t.source.removeClass("active"),c(t.source,"li")&&c(t.source.parent().parent(),"li")&&t.source.parent().parent().removeClass("active"))}y=e.target,e.source.addClass("active"),c(e.source,"li")&&c(e.source.parent().parent(),"li")&&e.source.parent().parent().addClass("active")},S.$getTrackedElement=function(e){return E.filter(function(t){return t.target===e})[0]},S.checkOffsets=function(){angular.forEach(E,function(e){var n=t.querySelector(e.target);e.offsetTop=n?a.offset(n).top:null,u.offset&&null!==e.offsetTop&&(e.offsetTop-=1*u.offset)}),T=E.filter(function(e){return null!==e.offsetTop}).sort(function(e,t){return e.offsetTop-t.offsetTop}),b()},S.trackElement=function(e,t){E.push({target:e,source:t})},S.untrackElement=function(e,t){for(var n,i=E.length;i--;)if(E[i].target===e&&E[i].source===t){n=i;break}E.splice(n,1)},S.activate=function(e){E[e].addClass("active")},S.init(),S}var d=angular.element(i),f=angular.element(r.prop("documentElement")),p=angular.element(i.document.body);return u}]}).directive("bsScrollspy",["$rootScope","debounce","dimensions","$scrollspy",function(e,t,n,i){return{restrict:"EAC",link:function(e,t,n){var r={scope:e};angular.forEach(["offset","target"],function(e){angular.isDefined(n[e])&&(r[e]=n[e])});var o=i(r);o.trackElement(r.target,t),e.$on("$destroy",function(){o&&(o.untrackElement(r.target,t),o.destroy()),r=null,o=null})}}}]).directive("bsScrollspyList",["$rootScope","debounce","dimensions","$scrollspy",function(e,t,n,i){return{restrict:"A",compile:function(e,t){var n=e[0].querySelectorAll("li > a[href]");angular.forEach(n,function(e){var t=angular.element(e);t.parent().attr("bs-scrollspy","").attr("data-target",t.attr("href"))})}}}]),angular.module("mgcrea.ngStrap.popover",["mgcrea.ngStrap.tooltip"]).provider("$popover",function(){var e=this.defaults={animation:"am-fade",customClass:"",container:!1,target:!1,placement:"right",templateUrl:"popover/popover.tpl.html",contentTemplate:!1,trigger:"click",keyboard:!0,html:!1,title:"",content:"",delay:0,autoClose:!1};this.$get=["$tooltip",function(t){function n(n,i){var r=angular.extend({},e,i),o=t(n,r);return r.content&&(o.$scope.content=r.content),o}return n}]}).directive("bsPopover",["$window","$sce","$popover",function(e,t,n){var i=e.requestAnimationFrame||e.setTimeout;return{restrict:"EAC",scope:!0,link:function(e,r,o){var a,s={scope:e};angular.forEach(["template","templateUrl","controller","controllerAs","contentTemplate","placement","container","delay","trigger","html","animation","customClass","autoClose","id","prefixClass","prefixEvent"],function(e){angular.isDefined(o[e])&&(s[e]=o[e])});var l=/^(false|0|)$/i;angular.forEach(["html","container","autoClose"],function(e){angular.isDefined(o[e])&&l.test(o[e])&&(s[e]=!1)});var c=r.attr("data-target");angular.isDefined(c)&&(l.test(c)?s.target=!1:s.target=c),angular.forEach(["title","content"],function(n){o[n]&&o.$observe(n,function(r,o){e[n]=t.trustAsHtml(r),angular.isDefined(o)&&i(function(){a&&a.$applyPlacement()})})}),o.bsPopover&&e.$watch(o.bsPopover,function(t,n){angular.isObject(t)?angular.extend(e,t):e.content=t,angular.isDefined(n)&&i(function(){a&&a.$applyPlacement()})},!0),o.bsShow&&e.$watch(o.bsShow,function(e,t){a&&angular.isDefined(e)&&(angular.isString(e)&&(e=!!e.match(/true|,?(popover),?/i)),!0===e?a.show():a.hide())}),o.viewport&&e.$watch(o.viewport,function(e){a&&angular.isDefined(e)&&a.setViewport(e)}),a=n(r,s),e.$on("$destroy",function(){a&&a.destroy(),s=null,a=null})}}}]),angular.module("mgcrea.ngStrap.navbar",[]).provider("$navbar",function(){var e=this.defaults={activeClass:"active",routeAttr:"data-match-route",strict:!1};this.$get=function(){return{defaults:e}}}).directive("bsNavbar",["$window","$location","$navbar",function(e,t,n){var i=n.defaults;return{restrict:"A",link:function(e,n,r,o){var a=angular.copy(i);angular.forEach(Object.keys(i),function(e){angular.isDefined(r[e])&&(a[e]=r[e])}),e.$watch(function(){return t.path()},function(e,t){var i=n[0].querySelectorAll("li["+a.routeAttr+"]");angular.forEach(i,function(t){var n=angular.element(t),i=n.attr(a.routeAttr).replace("/","\\/");a.strict&&(i="^"+i+"$"),new RegExp(i,"i").test(e)?n.addClass(a.activeClass):n.removeClass(a.activeClass)})})}}}]),angular.module("mgcrea.ngStrap.dropdown",["mgcrea.ngStrap.tooltip"]).provider("$dropdown",function(){var e=this.defaults={animation:"am-fade",prefixClass:"dropdown",prefixEvent:"dropdown",placement:"bottom-left",templateUrl:"dropdown/dropdown.tpl.html",trigger:"click",container:!1,keyboard:!0,html:!1,delay:0};this.$get=["$window","$rootScope","$tooltip","$timeout",function(t,n,i,r){function o(t,o){function l(e){if(e.target!==t[0])return e.target!==t[0]&&c.hide()}var c={},u=angular.extend({},e,o);c.$scope=u.scope&&u.scope.$new()||n.$new(),c=i(t,u);var d=t.parent();c.$onKeyDown=function(e){if(/(38|40)/.test(e.keyCode)){e.preventDefault(),e.stopPropagation();var t=angular.element(c.$element[0].querySelectorAll("li:not(.divider) a"));if(t.length){var n;angular.forEach(t,function(e,t){s&&s.call(e,":focus")&&(n=t)}),38===e.keyCode&&n>0?n--:40===e.keyCode&&n<t.length-1?n++:angular.isUndefined(n)&&(n=0),t.eq(n)[0].focus()}}};var f=c.show;c.show=function(){f(),r(function(){u.keyboard&&c.$element&&c.$element.on("keydown",c.$onKeyDown),a.on("click",l)},0,!1),d.hasClass("dropdown")&&d.addClass("open")};var p=c.hide;c.hide=function(){c.$isShown&&(u.keyboard&&c.$element&&c.$element.off("keydown",c.$onKeyDown),a.off("click",l),d.hasClass("dropdown")&&d.removeClass("open"),p())};var h=c.destroy;return c.destroy=function(){a.off("click",l),h()},c}var a=angular.element(t.document.body),s=Element.prototype.matchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector;return o}]}).directive("bsDropdown",["$window","$sce","$dropdown",function(e,t,n){return{restrict:"EAC",scope:!0,compile:function(e,t){if(!t.bsDropdown){for(var i=e[0].nextSibling;i&&1!==i.nodeType;)i=i.nextSibling;i&&i.className.split(" ").indexOf("dropdown-menu")>=0&&(t.template=i.outerHTML,t.templateUrl=void 0,i.parentNode.removeChild(i))}return function(e,i,r){var o={scope:e};angular.forEach(["template","templateUrl","controller","controllerAs","placement","container","delay","trigger","keyboard","html","animation","id","autoClose"],function(e){angular.isDefined(t[e])&&(o[e]=t[e])});var a=/^(false|0|)$/i;angular.forEach(["html","container"],function(e){angular.isDefined(r[e])&&a.test(r[e])&&(o[e]=!1)}),r.bsDropdown&&e.$watch(r.bsDropdown,function(t,n){e.content=t},!0);var s=n(i,o);r.bsShow&&e.$watch(r.bsShow,function(e,t){s&&angular.isDefined(e)&&(angular.isString(e)&&(e=!!e.match(/true|,?(dropdown),?/i)),!0===e?s.show():s.hide())}),e.$on("$destroy",function(){s&&s.destroy(),o=null,s=null})}}}}]),angular.module("mgcrea.ngStrap.modal",["mgcrea.ngStrap.core","mgcrea.ngStrap.helpers.dimensions"]).provider("$modal",function(){var e=this.defaults={animation:"am-fade",backdropAnimation:"am-fade",customClass:"",prefixClass:"modal",prefixEvent:"modal",placement:"top",templateUrl:"modal/modal.tpl.html",template:"",contentTemplate:!1,container:!1,element:null,backdrop:!0,keyboard:!0,html:!1,show:!0,size:null};this.$get=["$window","$rootScope","$bsCompiler","$animate","$timeout","$sce","dimensions",function(n,i,r,o,a,s,l){function c(t){function n(){T.$emit(S.prefixEvent+".show",k)}function a(){T.$emit(S.prefixEvent+".hide",k),h.removeClass(S.prefixClass+"-open"),S.animation&&h.removeClass(S.prefixClass+"-with-"+S.animation)}function l(){S.backdrop&&(A.on("click",w),O.on("click",w),O.on("wheel",x))}function c(){S.backdrop&&(A.off("click",w),O.off("click",w),O.off("wheel",x))}function y(){S.keyboard&&A.on("keyup",k.$onKeyUp)}function b(){S.keyboard&&A.off("keyup",k.$onKeyUp)}function w(e){e.target===e.currentTarget&&("static"===S.backdrop?k.focus():k.hide())}function x(e){e.preventDefault()}function C(){k.$isShown&&null!==A&&(c(),b()),M&&(M.$destroy(),M=null),A&&(A.remove(),A=k.$element=null)}var k={},S=k.$options=angular.extend({},e,t),E=k.$promise=r.compile(S),T=k.$scope=S.scope&&S.scope.$new()||i.$new();S.element||S.container||(S.container="body"),k.$id=S.id||S.element&&S.element.attr("id")||"",f(["title","content"],function(e){S[e]&&(T[e]=s.trustAsHtml(S[e]))}),T.$hide=function(){T.$$postDigest(function(){k.hide()})},T.$show=function(){T.$$postDigest(function(){k.show()})},T.$toggle=function(){T.$$postDigest(function(){k.toggle()})},k.$isShown=T.$isShown=!1;var D,A,M,O=angular.element('<div class="'+S.prefixClass+'-backdrop"/>');return O.css({position:"fixed",top:"0px",left:"0px",bottom:"0px",right:"0px"}),E.then(function(e){D=e,k.init()}),k.init=function(){S.show&&T.$$postDigest(function(){k.show()})},k.destroy=function(){C(),O&&(O.remove(),O=null),T.$destroy()},k.show=function(){if(!k.$isShown){var e,t;if(angular.isElement(S.container)?(e=S.container,t=S.container[0].lastChild?angular.element(S.container[0].lastChild):null):S.container?(e=d(S.container),t=e[0]&&e[0].lastChild?angular.element(e[0].lastChild):null):(e=null,t=S.element),A&&C(),M=k.$scope.$new(),A=k.$element=D.link(M,function(e,t){}),S.backdrop&&(A.css({"z-index":m+20*g}),O.css({"z-index":v+20*g}),g++),!T.$emit(S.prefixEvent+".show.before",k).defaultPrevented){A.css({display:"block"}).addClass(S.placement),S.customClass&&A.addClass(S.customClass),S.size&&$[S.size]&&angular.element(d(".modal-dialog",A[0])).addClass($[S.size]),S.animation&&(S.backdrop&&O.addClass(S.backdropAnimation),A.addClass(S.animation)),S.backdrop&&o.enter(O,h,null),angular.version.minor<=2?o.enter(A,e,t,n):o.enter(A,e,t).then(n),k.$isShown=T.$isShown=!0,u(T);var i=A[0];p(function(){i.focus()}),h.addClass(S.prefixClass+"-open"),S.animation&&h.addClass(S.prefixClass+"-with-"+S.animation),l(),y()}}},k.hide=function(){k.$isShown&&(S.backdrop&&g--,T.$emit(S.prefixEvent+".hide.before",k).defaultPrevented||(angular.version.minor<=2?o.leave(A,a):o.leave(A).then(a),S.backdrop&&o.leave(O),k.$isShown=T.$isShown=!1,u(T),c(),b()))},k.toggle=function(){k.$isShown?k.hide():k.show()},k.focus=function(){A[0].focus()},k.$onKeyUp=function(e){27===e.which&&k.$isShown&&(k.hide(),e.stopPropagation())},k}function u(e){e.$$phase||e.$root&&e.$root.$$phase||e.$digest()}function d(e,n){return angular.element((n||t).querySelectorAll(e))}var f=angular.forEach,p=n.requestAnimationFrame||n.setTimeout,h=angular.element(n.document.body),g=0,m=1050,v=1040,$={lg:"modal-lg",sm:"modal-sm"};return c}]}).directive("bsModal",["$window","$sce","$modal",function(e,t,n){return{restrict:"EAC",scope:!0,link:function(e,i,r,o){var a={scope:e,element:i,show:!1};angular.forEach(["template","templateUrl","controller","controllerAs","contentTemplate","placement","backdrop","keyboard","html","container","animation","backdropAnimation","id","prefixEvent","prefixClass","customClass","modalClass","size"],function(e){angular.isDefined(r[e])&&(a[e]=r[e])}),a.modalClass&&(a.customClass=a.modalClass);var s=/^(false|0|)$/i;angular.forEach(["backdrop","keyboard","html","container"],function(e){angular.isDefined(r[e])&&s.test(r[e])&&(a[e]=!1)}),angular.forEach(["title","content"],function(n){r[n]&&r.$observe(n,function(i,r){e[n]=t.trustAsHtml(i)})}),r.bsModal&&e.$watch(r.bsModal,function(t,n){angular.isObject(t)?angular.extend(e,t):e.content=t},!0);var l=n(a);i.on(r.trigger||"click",l.toggle),e.$on("$destroy",function(){l&&l.destroy(),a=null,l=null})}}}]),angular.version.minor<3&&angular.version.dot<14&&angular.module("ng").factory("$$rAF",["$window","$timeout",function(e,t){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame,i=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.mozCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,r=!!n,o=r?function(e){var t=n(e);return function(){i(t)}}:function(e){var n=t(e,16.66,!1);return function(){t.cancel(n)}};return o.supported=r,o}]),angular.module("mgcrea.ngStrap.helpers.parseOptions",[]).provider("$parseOptions",function(){var e=this.defaults={regexp:/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/};this.$get=["$parse","$q",function(t,n){function i(i,r){function o(e,t){return e.map(function(e,n){var i,r,o={};return o[u]=e,i=c(t,o),r=p(t,o),{label:i,value:r,index:n}})}var a={},s=angular.extend({},e,r);a.$values=[];var l,c,u,d,f,p,h;return a.init=function(){a.$match=l=i.match(s.regexp),c=t(l[2]||l[1]),u=l[4]||l[6],d=l[5],f=t(l[3]||""),p=t(l[2]?l[1]:u),h=t(l[7])},a.valuesFn=function(e,t){return n.when(h(e,t)).then(function(t){return angular.isArray(t)||(t=[]),a.$values=t.length?o(t,e):[],a.$values})},a.displayValue=function(e){var t={};return t[u]=e,c(t)},a.init(),a}return i}]}),angular.module("mgcrea.ngStrap.helpers.dimensions",[]).factory("dimensions",function(){function t(e){var t=e.ownerDocument,r=e.offsetParent||t;if(i(r,"#document"))return t.documentElement;for(;r&&!i(r,"html")&&"static"===n.css(r,"position");)r=r.offsetParent;return r||t.documentElement}var n={},i=n.nodeName=function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()};return n.css=function(t,n,i){var r;return r=t.currentStyle?t.currentStyle[n]:e.getComputedStyle?e.getComputedStyle(t)[n]:t.style[n],!0===i?parseFloat(r)||0:r},n.offset=function(t){var n=t.getBoundingClientRect(),i=t.ownerDocument;return{width:n.width||t.offsetWidth,height:n.height||t.offsetHeight,top:n.top+(e.pageYOffset||i.documentElement.scrollTop)-(i.documentElement.clientTop||0),left:n.left+(e.pageXOffset||i.documentElement.scrollLeft)-(i.documentElement.clientLeft||0)}},n.setOffset=function(e,t,i){var r,o,a,s,l,c,u,d=n.css(e,"position"),f=angular.element(e),p={};"static"===d&&(e.style.position="relative"),l=n.offset(e),a=n.css(e,"top"),c=n.css(e,"left"),u=("absolute"===d||"fixed"===d)&&(a+c).indexOf("auto")>-1,u?(r=n.position(e),s=r.top,o=r.left):(s=parseFloat(a)||0,o=parseFloat(c)||0),angular.isFunction(t)&&(t=t.call(e,i,l)),null!==t.top&&(p.top=t.top-l.top+s),null!==t.left&&(p.left=t.left-l.left+o),"using"in t?t.using.call(f,p):f.css({top:p.top+"px",left:p.left+"px"})},n.position=function(e){var r,o,a={top:0,left:0};return"fixed"===n.css(e,"position")?o=e.getBoundingClientRect():(r=t(e),o=n.offset(e),i(r,"html")||(a=n.offset(r)),a.top+=n.css(r,"borderTopWidth",!0),a.left+=n.css(r,"borderLeftWidth",!0)),{width:e.offsetWidth,height:e.offsetHeight,top:o.top-a.top-n.css(e,"marginTop",!0),left:o.left-a.left-n.css(e,"marginLeft",!0)}},n.height=function(e,t){var i=e.offsetHeight;return t?i+=n.css(e,"marginTop",!0)+n.css(e,"marginBottom",!0):i-=n.css(e,"paddingTop",!0)+n.css(e,"paddingBottom",!0)+n.css(e,"borderTopWidth",!0)+n.css(e,"borderBottomWidth",!0),i},n.width=function(e,t){var i=e.offsetWidth;return t?i+=n.css(e,"marginLeft",!0)+n.css(e,"marginRight",!0):i-=n.css(e,"paddingLeft",!0)+n.css(e,"paddingRight",!0)+n.css(e,"borderLeftWidth",!0)+n.css(e,"borderRightWidth",!0),i},n}),angular.module("mgcrea.ngStrap.helpers.debounce",[]).factory("debounce",["$timeout",function(e){return function(t,n,i){var r=null;return function(){var o=this,a=arguments,s=i&&!r;return r&&e.cancel(r),r=e(function(){r=null,i||t.apply(o,a)},n,!1),s&&t.apply(o,a),r}}}]).factory("throttle",["$timeout",function(e){return function(t,n,i){var r=null;return i||(i={}),function(){var o=this,a=arguments;r||(!1!==i.leading&&t.apply(o,a),r=e(function(){r=null,!1!==i.trailing&&t.apply(o,a)},n,!1))}}}]),angular.module("mgcrea.ngStrap.helpers.dateParser",[]).provider("$dateParser",["$localeProvider",function(e){function t(){this.year=1970,this.month=0,this.day=1,this.hours=0,this.minutes=0,this.seconds=0,this.milliseconds=0}function n(){}function i(e){return!isNaN(parseFloat(e))&&isFinite(e)}function r(e,t){for(var n=e.length,i=t.toString().toLowerCase(),r=0;r<n;r++)if(e[r].toLowerCase()===i)return r;return-1}t.prototype.setMilliseconds=function(e){this.milliseconds=e},t.prototype.setSeconds=function(e){this.seconds=e},t.prototype.setMinutes=function(e){this.minutes=e},t.prototype.setHours=function(e){this.hours=e},t.prototype.getHours=function(){return this.hours},t.prototype.setDate=function(e){this.day=e},t.prototype.setMonth=function(e){this.month=e},t.prototype.setFullYear=function(e){this.year=e},t.prototype.fromDate=function(e){return this.year=e.getFullYear(),this.month=e.getMonth(),this.day=e.getDate(),this.hours=e.getHours(),this.minutes=e.getMinutes(),this.seconds=e.getSeconds(),this.milliseconds=e.getMilliseconds(),this},t.prototype.toDate=function(){return new Date(this.year,this.month,this.day,this.hours,this.minutes,this.seconds,this.milliseconds)};var o=t.prototype,a=this.defaults={format:"shortDate",strict:!1};this.$get=["$locale","dateFilter",function(e,s){return function(l){function c(e){return h(u(e))}function u(e){var t=d(e),n=t.replace(/''/g,"\\'"),i=/('(?:\\'|.)*?')/,r=n.split(i),o=Object.keys(w),a=[];return angular.forEach(r,function(e){if(f(e))e=p(e);else for(var t=0;t<o.length;t++)e=e.split(o[t]).join("${"+t+"}");a.push(e)}),a.join("")}function d(e){return e.replace(/\\/g,"[\\\\]").replace(/-/g,"[-]").replace(/\./g,"[.]").replace(/\*/g,"[*]").replace(/\+/g,"[+]").replace(/\?/g,"[?]").replace(/\$/g,"[$]").replace(/\^/g,"[^]").replace(/\//g,"[/]").replace(/\\s/g,"[\\s]")}function f(e){return/^'.*'$/.test(e)}function p(e){return e.replace(/^'(.*)'$/,"$1")}function h(e){for(var t=Object.keys(w),n=e,i=0;i<t.length;i++)n=n.split("${"+i+"}").join("("+w[t[i]]+")");return new RegExp("^"+n+"$",["i"])}function g(e){return m(u(e))}function m(e){for(var t,n,i,r,o=Object.keys(w),a=new RegExp("\\${(\\d+)}","g"),s=[];null!==(t=a.exec(e));)n=t[1],i=o[n],r=x[i],s.push(r);return s}var v,$,y=angular.extend({},a,l),b={},w={sss:"[0-9]{3}",ss:"[0-5][0-9]",s:y.strict?"[1-5]?[0-9]":"[0-9]|[0-5][0-9]",mm:"[0-5][0-9]",m:y.strict?"[1-5]?[0-9]":"[0-9]|[0-5][0-9]",HH:"[01][0-9]|2[0-3]",H:y.strict?"1?[0-9]|2[0-3]":"[01]?[0-9]|2[0-3]",hh:"[0][1-9]|[1][012]",h:y.strict?"[1-9]|1[012]":"0?[1-9]|1[012]",a:"AM|PM",EEEE:e.DATETIME_FORMATS.DAY.join("|"),EEE:e.DATETIME_FORMATS.SHORTDAY.join("|"),dd:"0[1-9]|[12][0-9]|3[01]",d:y.strict?"[1-9]|[1-2][0-9]|3[01]":"0?[1-9]|[1-2][0-9]|3[01]",MMMM:e.DATETIME_FORMATS.MONTH.join("|"),MMM:e.DATETIME_FORMATS.SHORTMONTH.join("|"),MM:"0[1-9]|1[012]",M:y.strict?"[1-9]|1[012]":"0?[1-9]|1[012]",yyyy:"[1]{1}[0-9]{3}|[2]{1}[0-9]{3}",yy:"[0-9]{2}",y:y.strict?"-?(0|[1-9][0-9]{0,3})":"-?0*[0-9]{1,4}"},x={sss:o.setMilliseconds,ss:o.setSeconds,s:o.setSeconds,mm:o.setMinutes,m:o.setMinutes,HH:o.setHours,H:o.setHours,hh:o.setHours,h:o.setHours,EEEE:n,EEE:n,dd:o.setDate,d:o.setDate,a:function(e){var t=this.getHours()%12;return this.setHours(e.match(/pm/i)?t+12:t)},MMMM:function(t){return this.setMonth(r(e.DATETIME_FORMATS.MONTH,t))},MMM:function(t){return this.setMonth(r(e.DATETIME_FORMATS.SHORTMONTH,t))},MM:function(e){return this.setMonth(1*e-1)},M:function(e){return this.setMonth(1*e-1)},yyyy:o.setFullYear,yy:function(e){return this.setFullYear(2e3+1*e)},y:function(e){return 1*e<=50&&2===e.length?this.setFullYear(2e3+1*e):this.setFullYear(1*e)}};return b.init=function(){b.$format=e.DATETIME_FORMATS[y.format]||y.format,v=c(b.$format),$=g(b.$format)},b.isValid=function(e){return angular.isDate(e)?!isNaN(e.getTime()):v.test(e)},b.parse=function(n,i,r,o){r&&(r=e.DATETIME_FORMATS[r]||r),angular.isDate(n)&&(n=s(n,r||b.$format,o));var a=r?c(r):v,l=r?g(r):$,u=a.exec(n);if(!u)return!1;for(var d=i&&!isNaN(i.getTime())?(new t).fromDate(i):(new t).fromDate(new Date(1970,0,1,0)),f=0;f<u.length-1;f++)l[f]&&l[f].call(d,u[f+1]);var p=d.toDate();return parseInt(d.day,10)===p.getDate()&&p},b.getDateForAttribute=function(e,t){var n;if("today"===t){var r=new Date;n=new Date(r.getFullYear(),r.getMonth(),r.getDate()+("maxDate"===e?1:0),0,0,0,"minDate"===e?0:-1)}else n=angular.isString(t)&&t.match(/^".+"$/)?new Date(t.substr(1,t.length-2)):i(t)?new Date(parseInt(t,10)):angular.isString(t)&&0===t.length?"minDate"===e?-1/0:1/0:new Date(t);return n},b.getTimeForAttribute=function(e,t){return"now"===t?(new Date).setFullYear(1970,0,1):angular.isString(t)&&t.match(/^".+"$/)?new Date(t.substr(1,t.length-2)).setFullYear(1970,0,1):i(t)?new Date(parseInt(t,10)).setFullYear(1970,0,1):angular.isString(t)&&0===t.length?"minTime"===e?-1/0:1/0:b.parse(t,new Date(1970,0,1,0))},b.daylightSavingAdjust=function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},b.timezoneOffsetAdjust=function(e,t,n){return e?(t&&"UTC"===t&&(e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+(n?-1:1)*e.getTimezoneOffset())),e):null},b.init(),b}}]}]),angular.module("mgcrea.ngStrap.helpers.dateFormatter",[]).service("$dateFormatter",["$locale","dateFilter",function(e,t){function n(e){return/(h+)([:\.])?(m+)([:\.])?(s*)[ ]?(a?)/i.exec(e).slice(1)}this.getDefaultLocale=function(){return e.id},this.getDatetimeFormat=function(t,n){return e.DATETIME_FORMATS[t]||t},this.weekdaysShort=function(t){return e.DATETIME_FORMATS.SHORTDAY},this.hoursFormat=function(e){return n(e)[0]},this.minutesFormat=function(e){return n(e)[2]},this.secondsFormat=function(e){return n(e)[4]},this.timeSeparator=function(e){return n(e)[1]},this.showSeconds=function(e){return!!n(e)[4]},this.showAM=function(e){return!!n(e)[5]},this.formatDate=function(e,n,i,r){return t(e,n,r)}}]),angular.module("mgcrea.ngStrap.core",[]).service("$bsCompiler",i),angular.module("mgcrea.ngStrap.datepicker",["mgcrea.ngStrap.helpers.dateParser","mgcrea.ngStrap.helpers.dateFormatter","mgcrea.ngStrap.tooltip"]).provider("$datepicker",function(){var e=this.defaults={animation:"am-fade",prefixClass:"datepicker",placement:"bottom-left",templateUrl:"datepicker/datepicker.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,useNative:!1,dateType:"date",dateFormat:"shortDate",timezone:null,modelDateFormat:null,dayFormat:"dd",monthFormat:"MMM",yearFormat:"yyyy",monthTitleFormat:"MMMM yyyy",yearTitleFormat:"yyyy",strictFormat:!1,autoclose:!1,minDate:-1/0,maxDate:1/0,startView:0,minView:0,startWeek:0,daysOfWeekDisabled:"",iconLeft:"glyphicon glyphicon-chevron-left",iconRight:"glyphicon glyphicon-chevron-right"};this.$get=["$window","$document","$rootScope","$sce","$dateFormatter","datepickerViews","$tooltip","$timeout",function(t,n,i,r,o,a,s,l){function c(t,n,i){function r(e){e.selected=c.$isSelected(e.date)}function o(){t[0].focus()}var c=s(t,angular.extend({},e,i)),f=i.scope,p=c.$options,h=c.$scope;p.startView&&(p.startView-=p.minView);var g=a(c);c.$views=g.views;var m=g.viewDate;h.$mode=p.startView,h.$iconLeft=p.iconLeft,h.$iconRight=p.iconRight;var v=c.$views[h.$mode];h.$select=function(e){c.select(e)},h.$selectPane=function(e){c.$selectPane(e)},h.$toggleMode=function(){c.setMode((h.$mode+1)%c.$views.length)},c.update=function(e){angular.isDate(e)&&!isNaN(e.getTime())&&(c.$date=e,v.update.call(v,e)),c.$build(!0)},c.updateDisabledDates=function(e){p.disabledDateRanges=e;for(var t=0,n=h.rows.length;t<n;t++)angular.forEach(h.rows[t],c.$setDisabledEl)},c.select=function(e,t){angular.isDate(n.$dateValue)||(n.$dateValue=new Date(e)),!h.$mode||t?(n.$setViewValue(angular.copy(e)),n.$render(),p.autoclose&&!t&&l(function(){c.hide(!0)})):(angular.extend(m,{year:e.getFullYear(),month:e.getMonth(),date:e.getDate()}),c.setMode(h.$mode-1),c.$build())},c.setMode=function(e){h.$mode=e,v=c.$views[h.$mode],c.$build()},c.$build=function(e){!0===e&&v.built||(!1!==e||v.built)&&v.build.call(v)},c.$updateSelected=function(){for(var e=0,t=h.rows.length;e<t;e++)angular.forEach(h.rows[e],r)},c.$isSelected=function(e){return v.isSelected(e)},c.$setDisabledEl=function(e){e.disabled=v.isDisabled(e.date)},c.$selectPane=function(e){var t=v.steps,n=new Date(Date.UTC(m.year+(t.year||0)*e,m.month+(t.month||0)*e,1));angular.extend(m,{year:n.getUTCFullYear(),month:n.getUTCMonth(),date:n.getUTCDate()}),c.$build()},c.$onMouseDown=function(e){if(e.preventDefault(),e.stopPropagation(),d){var t=angular.element(e.target);"button"!==t[0].nodeName.toLowerCase()&&(t=t.parent()),t.triggerHandler("click")}},c.$onKeyDown=function(e){if(/(38|37|39|40|13)/.test(e.keyCode)&&!e.shiftKey&&!e.altKey){if(e.preventDefault(),e.stopPropagation(),13===e.keyCode)return void(h.$mode?h.$apply(function(){c.setMode(h.$mode-1)}):c.hide(!0));v.onKeyDown(e),f.$digest()}};var $=c.init;c.init=function(){if(u&&p.useNative)return t.prop("type","date"),void t.css("-webkit-appearance","textfield");d&&(t.prop("type","text"),t.attr("readonly","true"),t.on("click",o)),$()};var y=c.destroy;c.destroy=function(){u&&p.useNative&&t.off("click",o),y()};var b=c.show;c.show=function(){!d&&t.attr("readonly")||t.attr("disabled")||(b(),l(function(){c.$isShown&&(c.$element.on(d?"touchstart":"mousedown",c.$onMouseDown),p.keyboard&&t.on("keydown",c.$onKeyDown))},0,!1))};var w=c.hide;return c.hide=function(e){c.$isShown&&(c.$element.off(d?"touchstart":"mousedown",c.$onMouseDown),p.keyboard&&t.off("keydown",c.$onKeyDown),w(e))},c}var u=/(ip[ao]d|iphone|android)/gi.test(t.navigator.userAgent),d="createTouch"in t.document&&u;return e.lang||(e.lang=o.getDefaultLocale()),c.defaults=e,c}]}).directive("bsDatepicker",["$window","$parse","$q","$dateFormatter","$dateParser","$datepicker",function(e,t,n,i,r,o){var a=/(ip[ao]d|iphone|android)/gi.test(e.navigator.userAgent);return{restrict:"EAC",require:"ngModel",link:function(e,t,n,s){function l(e){return e&&e.length?e:null}function c(e){if(angular.isDate(e)){var t=isNaN(p.$options.minDate)||e.getTime()>=p.$options.minDate,n=isNaN(p.$options.maxDate)||e.getTime()<=p.$options.maxDate,i=t&&n;s.$setValidity("date",i),s.$setValidity("min",t),s.$setValidity("max",n),i&&(s.$dateValue=e)}}
+function u(){return!s.$dateValue||isNaN(s.$dateValue.getTime())?"":g(s.$dateValue,d.dateFormat)}var d={scope:e};angular.forEach(["template","templateUrl","controller","controllerAs","placement","container","delay","trigger","html","animation","autoclose","dateType","dateFormat","timezone","modelDateFormat","dayFormat","strictFormat","startWeek","startDate","useNative","lang","startView","minView","iconLeft","iconRight","daysOfWeekDisabled","id","prefixClass","prefixEvent"],function(e){angular.isDefined(n[e])&&(d[e]=n[e])});var f=/^(false|0|)$/i;angular.forEach(["html","container","autoclose","useNative"],function(e){angular.isDefined(n[e])&&f.test(n[e])&&(d[e]=!1)});var p=o(t,s,d);d=p.$options,a&&d.useNative&&(d.dateFormat="yyyy-MM-dd");var h=d.lang,g=function(e,t){return i.formatDate(e,t,h)},m=r({format:d.dateFormat,lang:h,strict:d.strictFormat});n.bsShow&&e.$watch(n.bsShow,function(e,t){p&&angular.isDefined(e)&&(angular.isString(e)&&(e=!!e.match(/true|,?(datepicker),?/i)),!0===e?p.show():p.hide())}),angular.forEach(["minDate","maxDate"],function(e){angular.isDefined(n[e])&&n.$observe(e,function(t){p.$options[e]=m.getDateForAttribute(e,t),isNaN(p.$options[e])||p.$build(!1),c(s.$dateValue)})}),angular.isDefined(n.dateFormat)&&n.$observe("dateFormat",function(e){p.$options.dateFormat=e}),e.$watch(n.ngModel,function(e,t){p.update(s.$dateValue)},!0),angular.isDefined(n.disabledDates)&&e.$watch(n.disabledDates,function(e,t){e=l(e),t=l(t),e&&p.updateDisabledDates(e)}),s.$parsers.unshift(function(e){var t;if(!e)return s.$setValidity("date",!0),null;var n=m.parse(e,s.$dateValue);return!n||isNaN(n.getTime())?void s.$setValidity("date",!1):(c(n),"string"===d.dateType?(t=m.timezoneOffsetAdjust(n,d.timezone,!0),g(t,d.modelDateFormat||d.dateFormat)):(t=m.timezoneOffsetAdjust(s.$dateValue,d.timezone,!0),"number"===d.dateType?t.getTime():"unix"===d.dateType?t.getTime()/1e3:"iso"===d.dateType?t.toISOString():new Date(t)))}),s.$formatters.push(function(e){var t;return t=angular.isUndefined(e)||null===e?NaN:angular.isDate(e)?e:"string"===d.dateType?m.parse(e,null,d.modelDateFormat):"unix"===d.dateType?new Date(1e3*e):new Date(e),s.$dateValue=m.timezoneOffsetAdjust(t,d.timezone),u()}),s.$render=function(){t.val(u())},e.$on("$destroy",function(){p&&p.destroy(),d=null,p=null})}}}]).provider("datepickerViews",function(){function e(e,t){for(var n=[];e.length>0;)n.push(e.splice(0,t));return n}function t(e,t){return(e%t+t)%t}this.$get=["$dateFormatter","$dateParser","$sce",function(n,i,r){return function(o){var a=o.$scope,s=o.$options,l=s.lang,c=function(e,t){return n.formatDate(e,t,l)},u=i({format:s.dateFormat,lang:l,strict:s.strictFormat}),d=n.weekdaysShort(l),f=d.slice(s.startWeek).concat(d.slice(0,s.startWeek)),p=r.trustAsHtml('<th class="dow text-center">'+f.join('</th><th class="dow text-center">')+"</th>"),h=o.$date||(s.startDate?u.getDateForAttribute("startDate",s.startDate):new Date),g={year:h.getFullYear(),month:h.getMonth(),date:h.getDate()},m=[{format:s.dayFormat,split:7,steps:{month:1},update:function(e,t){!this.built||t||e.getFullYear()!==g.year||e.getMonth()!==g.month?(angular.extend(g,{year:o.$date.getFullYear(),month:o.$date.getMonth(),date:o.$date.getDate()}),o.$build()):e.getDate()===g.date&&1!==e.getDate()||(g.date=o.$date.getDate(),o.$updateSelected())},build:function(){var n=new Date(g.year,g.month,1),i=n.getTimezoneOffset(),r=new Date(+n-864e5*t(n.getDay()-s.startWeek,7)),l=r.getTimezoneOffset(),d=u.timezoneOffsetAdjust(new Date,s.timezone).toDateString();l!==i&&(r=new Date(+r+6e4*(l-i)));for(var f,h=[],m=0;m<42;m++)f=u.daylightSavingAdjust(new Date(r.getFullYear(),r.getMonth(),r.getDate()+m)),h.push({date:f,isToday:f.toDateString()===d,label:c(f,this.format),selected:o.$date&&this.isSelected(f),muted:f.getMonth()!==g.month,disabled:this.isDisabled(f)});a.title=c(n,s.monthTitleFormat),a.showLabels=!0,a.labels=p,a.rows=e(h,this.split),this.built=!0},isSelected:function(e){return o.$date&&e.getFullYear()===o.$date.getFullYear()&&e.getMonth()===o.$date.getMonth()&&e.getDate()===o.$date.getDate()},isDisabled:function(e){var t=e.getTime();if(t<s.minDate||t>s.maxDate)return!0;if(-1!==s.daysOfWeekDisabled.indexOf(e.getDay()))return!0;if(s.disabledDateRanges)for(var n=0;n<s.disabledDateRanges.length;n++)if(t>=s.disabledDateRanges[n].start&&t<=s.disabledDateRanges[n].end)return!0;return!1},onKeyDown:function(e){if(o.$date){var t,n=o.$date.getTime();37===e.keyCode?t=new Date(n-864e5):38===e.keyCode?t=new Date(n-6048e5):39===e.keyCode?t=new Date(n+864e5):40===e.keyCode&&(t=new Date(n+6048e5)),this.isDisabled(t)||o.select(t,!0)}}},{name:"month",format:s.monthFormat,split:4,steps:{year:1},update:function(e,t){this.built&&e.getFullYear()===g.year?e.getMonth()!==g.month&&(angular.extend(g,{month:o.$date.getMonth(),date:o.$date.getDate()}),o.$updateSelected()):(angular.extend(g,{year:o.$date.getFullYear(),month:o.$date.getMonth(),date:o.$date.getDate()}),o.$build())},build:function(){for(var t,n=[],i=0;i<12;i++)t=new Date(g.year,i,1),n.push({date:t,label:c(t,this.format),selected:o.$isSelected(t),disabled:this.isDisabled(t)});a.title=c(t,s.yearTitleFormat),a.showLabels=!1,a.rows=e(n,this.split),this.built=!0},isSelected:function(e){return o.$date&&e.getFullYear()===o.$date.getFullYear()&&e.getMonth()===o.$date.getMonth()},isDisabled:function(e){return+new Date(e.getFullYear(),e.getMonth()+1,0)<s.minDate||e.getTime()>s.maxDate},onKeyDown:function(e){if(o.$date){var t=o.$date.getMonth(),n=new Date(o.$date);37===e.keyCode?n.setMonth(t-1):38===e.keyCode?n.setMonth(t-4):39===e.keyCode?n.setMonth(t+1):40===e.keyCode&&n.setMonth(t+4),this.isDisabled(n)||o.select(n,!0)}}},{name:"year",format:s.yearFormat,split:4,steps:{year:12},update:function(e,t){!this.built||t||parseInt(e.getFullYear()/20,10)!==parseInt(g.year/20,10)?(angular.extend(g,{year:o.$date.getFullYear(),month:o.$date.getMonth(),date:o.$date.getDate()}),o.$build()):e.getFullYear()!==g.year&&(angular.extend(g,{year:o.$date.getFullYear(),month:o.$date.getMonth(),date:o.$date.getDate()}),o.$updateSelected())},build:function(){for(var t,n=g.year-g.year%(3*this.split),i=[],r=0;r<12;r++)t=new Date(n+r,0,1),i.push({date:t,label:c(t,this.format),selected:o.$isSelected(t),disabled:this.isDisabled(t)});a.title=i[0].label+"-"+i[i.length-1].label,a.showLabels=!1,a.rows=e(i,this.split),this.built=!0},isSelected:function(e){return o.$date&&e.getFullYear()===o.$date.getFullYear()},isDisabled:function(e){return+new Date(e.getFullYear()+1,0,0)<s.minDate||e.getTime()>s.maxDate},onKeyDown:function(e){if(o.$date){var t=o.$date.getFullYear(),n=new Date(o.$date);37===e.keyCode?n.setYear(t-1):38===e.keyCode?n.setYear(t-4):39===e.keyCode?n.setYear(t+1):40===e.keyCode&&n.setYear(t+4),this.isDisabled(n)||o.select(n,!0)}}}];return{views:s.minView?Array.prototype.slice.call(m,s.minView):m,viewDate:g}}}]}),angular.module("mgcrea.ngStrap.collapse",[]).provider("$collapse",function(){var e=this.defaults={animation:"am-collapse",disallowToggle:!1,activeClass:"in",startCollapsed:!1,allowMultiple:!1},t=this.controller=function(t,n,i){function r(e){for(var t=l.$targets.$active,n=0;n<t.length;n++)e<t[n]&&(t[n]=t[n]-1),t[n]===l.$targets.length&&(t[n]=l.$targets.length-1)}function o(e){return-1!==l.$targets.$active.indexOf(e)}function a(e){var t=l.$targets.$active.indexOf(e);-1!==t&&l.$targets.$active.splice(t,1)}function s(e){l.$options.allowMultiple||l.$targets.$active.splice(0,1),-1===l.$targets.$active.indexOf(e)&&l.$targets.$active.push(e)}var l=this;l.$options=angular.copy(e),angular.forEach(["animation","disallowToggle","activeClass","startCollapsed","allowMultiple"],function(e){angular.isDefined(i[e])&&(l.$options[e]=i[e])});var c=/^(false|0|)$/i;angular.forEach(["disallowToggle","startCollapsed","allowMultiple"],function(e){angular.isDefined(i[e])&&c.test(i[e])&&(l.$options[e]=!1)}),l.$toggles=[],l.$targets=[],l.$viewChangeListeners=[],l.$registerToggle=function(e){l.$toggles.push(e)},l.$registerTarget=function(e){l.$targets.push(e)},l.$unregisterToggle=function(e){var t=l.$toggles.indexOf(e);l.$toggles.splice(t,1)},l.$unregisterTarget=function(e){var t=l.$targets.indexOf(e);l.$targets.splice(t,1),l.$options.allowMultiple&&a(e),r(t),l.$viewChangeListeners.forEach(function(e){e()})},l.$targets.$active=l.$options.startCollapsed?[]:[0],l.$setActive=t.$setActive=function(e){angular.isArray(e)?l.$targets.$active=e:!l.$options.disallowToggle&&o(e)?a(e):s(e),l.$viewChangeListeners.forEach(function(e){e()})},l.$activeIndexes=function(){return l.$options.allowMultiple?l.$targets.$active:1===l.$targets.$active.length?l.$targets.$active[0]:-1}};this.$get=function(){var n={};return n.defaults=e,n.controller=t,n}}).directive("bsCollapse",["$window","$animate","$collapse",function(e,t,n){return{require:["?ngModel","bsCollapse"],controller:["$scope","$element","$attrs",n.controller],link:function(e,t,n,i){var r=i[0],o=i[1];r&&(o.$viewChangeListeners.push(function(){r.$setViewValue(o.$activeIndexes())}),r.$formatters.push(function(e){if(angular.isArray(e))o.$setActive(e);else{var t=o.$activeIndexes();angular.isArray(t)?-1===t.indexOf(1*e)&&o.$setActive(1*e):t!==1*e&&o.$setActive(1*e)}return e}))}}}]).directive("bsCollapseToggle",function(){return{require:["^?ngModel","^bsCollapse"],link:function(e,t,n,i){var r=i[1];t.attr("data-toggle","collapse"),r.$registerToggle(t),e.$on("$destroy",function(){r.$unregisterToggle(t)}),t.on("click",function(){if(!n.disabled){var i=n.bsCollapseToggle&&"bs-collapse-toggle"!==n.bsCollapseToggle?n.bsCollapseToggle:r.$toggles.indexOf(t);r.$setActive(1*i),e.$apply()}})}}}).directive("bsCollapseTarget",["$animate",function(e){return{require:["^?ngModel","^bsCollapse"],link:function(t,n,i,r){function o(){var t=a.$targets.indexOf(n),i=a.$activeIndexes(),r="removeClass";angular.isArray(i)?-1!==i.indexOf(t)&&(r="addClass"):t===i&&(r="addClass"),e[r](n,a.$options.activeClass)}var a=r[1];n.addClass("collapse"),a.$options.animation&&n.addClass(a.$options.animation),a.$registerTarget(n),t.$on("$destroy",function(){a.$unregisterTarget(n)}),a.$viewChangeListeners.push(function(){o()}),o()}}}]),angular.module("mgcrea.ngStrap.button",[]).provider("$button",function(){var e=this.defaults={activeClass:"active",toggleEvent:"click"};this.$get=function(){return{defaults:e}}}).directive("bsCheckboxGroup",function(){return{restrict:"A",require:"ngModel",compile:function(e,t){e.attr("data-toggle","buttons"),e.removeAttr("ng-model");var n=e[0].querySelectorAll('input[type="checkbox"]');angular.forEach(n,function(e){var n=angular.element(e);n.attr("bs-checkbox",""),n.attr("ng-model",t.ngModel+"."+n.attr("value"))})}}}).directive("bsCheckbox",["$button","$$rAF",function(e,t){var n=e.defaults,i=/^(true|false|\d+)$/;return{restrict:"A",require:"ngModel",link:function(e,r,o,a){var s=n,l="INPUT"===r[0].nodeName,c=l?r.parent():r,u=!angular.isDefined(o.trueValue)||o.trueValue;i.test(o.trueValue)&&(u=e.$eval(o.trueValue));var d=!!angular.isDefined(o.falseValue)&&o.falseValue;i.test(o.falseValue)&&(d=e.$eval(o.falseValue));var f="boolean"!=typeof u||"boolean"!=typeof d;f&&(a.$parsers.push(function(e){return e?u:d}),a.$formatters.push(function(e){return angular.equals(e,u)}),e.$watch(o.ngModel,function(e,t){a.$render()})),a.$render=function(){var e=angular.equals(a.$modelValue,u);t(function(){l&&(r[0].checked=e),c.toggleClass(s.activeClass,e)})},r.bind(s.toggleEvent,function(){e.$apply(function(){l||a.$setViewValue(!c.hasClass("active")),f||a.$render()})})}}}]).directive("bsRadioGroup",function(){return{restrict:"A",require:"ngModel",compile:function(e,t){e.attr("data-toggle","buttons"),e.removeAttr("ng-model");var n=e[0].querySelectorAll('input[type="radio"]');angular.forEach(n,function(e){angular.element(e).attr("bs-radio",""),angular.element(e).attr("ng-model",t.ngModel)})}}}).directive("bsRadio",["$button","$$rAF",function(e,t){var n=e.defaults,i=/^(true|false|\d+)$/;return{restrict:"A",require:"ngModel",link:function(e,r,o,a){var s,l=n,c="INPUT"===r[0].nodeName,u=c?r.parent():r;o.$observe("value",function(t){s="boolean"!=typeof t&&i.test(t)?e.$eval(t):t,a.$render()}),a.$render=function(){var e=angular.equals(a.$modelValue,s);t(function(){c&&(r[0].checked=e),u.toggleClass(l.activeClass,e)})},r.bind(l.toggleEvent,function(){e.$apply(function(){a.$setViewValue(s),a.$render()})})}}}]),angular.module("mgcrea.ngStrap.alert",["mgcrea.ngStrap.modal"]).provider("$alert",function(){var e=this.defaults={animation:"am-fade",prefixClass:"alert",prefixEvent:"alert",placement:null,templateUrl:"alert/alert.tpl.html",container:!1,element:null,backdrop:!1,keyboard:!0,show:!0,duration:!1,type:!1,dismissable:!0};this.$get=["$modal","$timeout",function(t,n){function i(i){var r={},o=angular.extend({},e,i);r=t(o),r.$scope.dismissable=!!o.dismissable,o.type&&(r.$scope.type=o.type);var a=r.show;return o.duration&&(r.show=function(){a(),n(function(){r.hide()},1e3*o.duration)}),r}return i}]}).directive("bsAlert",["$window","$sce","$alert",function(e,t,n){return{restrict:"EAC",scope:!0,link:function(e,i,r,o){var a={scope:e,element:i,show:!1};angular.forEach(["template","templateUrl","controller","controllerAs","placement","keyboard","html","container","animation","duration","dismissable"],function(e){angular.isDefined(r[e])&&(a[e]=r[e])});var s=/^(false|0|)$/i;angular.forEach(["keyboard","html","container","dismissable"],function(e){angular.isDefined(r[e])&&s.test(r[e])&&(a[e]=!1)}),e.hasOwnProperty("title")||(e.title=""),angular.forEach(["title","content","type"],function(n){r[n]&&r.$observe(n,function(i,r){e[n]=t.trustAsHtml(i)})}),r.bsAlert&&e.$watch(r.bsAlert,function(t,n){angular.isObject(t)?angular.extend(e,t):e.content=t},!0);var l=n(a);i.on(r.trigger||"click",l.toggle),e.$on("$destroy",function(){l&&l.destroy(),a=null,l=null})}}}]),angular.module("mgcrea.ngStrap.aside",["mgcrea.ngStrap.modal"]).provider("$aside",function(){var e=this.defaults={animation:"am-fade-and-slide-right",prefixClass:"aside",prefixEvent:"aside",placement:"right",templateUrl:"aside/aside.tpl.html",contentTemplate:!1,container:!1,element:null,backdrop:!0,keyboard:!0,html:!1,show:!0};this.$get=["$modal",function(t){function n(n){var i=angular.extend({},e,n);return t(i)}return n}]}).directive("bsAside",["$window","$sce","$aside",function(e,t,n){return{restrict:"EAC",scope:!0,link:function(e,i,r,o){var a={scope:e,element:i,show:!1};angular.forEach(["template","templateUrl","controller","controllerAs","contentTemplate","placement","backdrop","keyboard","html","container","animation"],function(e){angular.isDefined(r[e])&&(a[e]=r[e])});var s=/^(false|0|)$/i;angular.forEach(["backdrop","keyboard","html","container"],function(e){angular.isDefined(r[e])&&s.test(r[e])&&(a[e]=!1)}),angular.forEach(["title","content"],function(n){r[n]&&r.$observe(n,function(i,r){e[n]=t.trustAsHtml(i)})}),r.bsAside&&e.$watch(r.bsAside,function(t,n){angular.isObject(t)?angular.extend(e,t):e.content=t},!0);var l=n(a);i.on(r.trigger||"click",l.toggle),e.$on("$destroy",function(){l&&l.destroy(),a=null,l=null})}}}]),angular.module("mgcrea.ngStrap.affix",["mgcrea.ngStrap.helpers.dimensions","mgcrea.ngStrap.helpers.debounce"]).provider("$affix",function(){var e=this.defaults={offsetTop:"auto",inlineStyles:!0};this.$get=["$window","debounce","dimensions",function(t,n,i){function r(r,s){function l(e,t,n){var i=c(),r=u();return i<=v?"top":null!==e&&i+e<=t.top?"middle":null!==$&&t.top+n+g>=r-$?"bottom":"middle"}function c(){return p[0]===t?t.pageYOffset:p[0].scrollTop}function u(){return p[0]===t?t.document.body.scrollHeight:p[0].scrollHeight}var d={},f=angular.extend({},e,s),p=f.target,h=!1,g=0,m=0,v=0,$=0,y=null,b=null,w=r.parent();if(f.offsetParent)if(f.offsetParent.match(/^\d+$/))for(var x=0;x<1*f.offsetParent-1;x++)w=w.parent();else w=angular.element(f.offsetParent);return d.init=function(){this.$parseOffsets(),m=i.offset(r[0]).top+g,h=!r[0].style.width,p.on("scroll",this.checkPosition),p.on("click",this.checkPositionWithEventLoop),a.on("resize",this.$debouncedOnResize),this.checkPosition(),this.checkPositionWithEventLoop()},d.destroy=function(){p.off("scroll",this.checkPosition),p.off("click",this.checkPositionWithEventLoop),a.off("resize",this.$debouncedOnResize)},d.checkPositionWithEventLoop=function(){setTimeout(d.checkPosition,1)},d.checkPosition=function(){var e=c(),t=i.offset(r[0]),n=i.height(r[0]),a=l(b,t,n);y!==a&&(y=a,"top"===a?(b=null,h&&r.css("width",""),f.inlineStyles&&(r.css("position",f.offsetParent?"":"relative"),r.css("top",""))):"bottom"===a?(b=f.offsetUnpin?-1*f.offsetUnpin:t.top-e,h&&r.css("width",""),f.inlineStyles&&(r.css("position",f.offsetParent?"":"relative"),r.css("top",f.offsetParent?"":o[0].offsetHeight-$-n-m+"px"))):(b=null,h&&r.css("width",r[0].offsetWidth+"px"),f.inlineStyles&&(r.css("position","fixed"),r.css("top",g+"px"))),r.removeClass("affix affix-top affix-bottom").addClass("affix"+("middle"!==a?"-"+a:"")))},d.$onResize=function(){d.$parseOffsets(),d.checkPosition()},d.$debouncedOnResize=n(d.$onResize,50),d.$parseOffsets=function(){var e=r.css("position");f.inlineStyles&&r.css("position",f.offsetParent?"":"relative"),f.offsetTop&&("auto"===f.offsetTop&&(f.offsetTop="+0"),f.offsetTop.match(/^[-+]\d+$/)?(g=1*-f.offsetTop,v=f.offsetParent?i.offset(w[0]).top+1*f.offsetTop:i.offset(r[0]).top-i.css(r[0],"marginTop",!0)+1*f.offsetTop):v=1*f.offsetTop),f.offsetBottom&&($=f.offsetParent&&f.offsetBottom.match(/^[-+]\d+$/)?u()-(i.offset(w[0]).top+i.height(w[0]))+1*f.offsetBottom+1:1*f.offsetBottom),f.inlineStyles&&r.css("position",e)},d.init(),d}var o=angular.element(t.document.body),a=angular.element(t);return r}]}).directive("bsAffix",["$affix","$window",function(e,t){return{restrict:"EAC",require:"^?bsAffixTarget",link:function(n,i,r,o){var a={scope:n,target:o?o.$element:angular.element(t)};angular.forEach(["offsetTop","offsetBottom","offsetParent","offsetUnpin","inlineStyles"],function(e){if(angular.isDefined(r[e])){var t=r[e];/true/i.test(t)&&(t=!0),/false/i.test(t)&&(t=!1),a[e]=t}});var s=e(i,a);n.$on("$destroy",function(){s&&s.destroy(),a=null,s=null})}}}]).directive("bsAffixTarget",function(){return{controller:["$element",function(e){this.$element=e}]}}),angular.module("mgcrea.ngStrap",["mgcrea.ngStrap.modal","mgcrea.ngStrap.aside","mgcrea.ngStrap.alert","mgcrea.ngStrap.button","mgcrea.ngStrap.select","mgcrea.ngStrap.datepicker","mgcrea.ngStrap.timepicker","mgcrea.ngStrap.navbar","mgcrea.ngStrap.tooltip","mgcrea.ngStrap.popover","mgcrea.ngStrap.dropdown","mgcrea.ngStrap.typeahead","mgcrea.ngStrap.scrollspy","mgcrea.ngStrap.affix","mgcrea.ngStrap.tab","mgcrea.ngStrap.collapse"])}(window,document),function(e,t,n){"use strict";angular.module("mgcrea.ngStrap.aside").run(["$templateCache",function(e){e.put("aside/aside.tpl.html",'<div class="aside" tabindex="-1" role="dialog"><div class="aside-dialog"><div class="aside-content"><div class="aside-header" ng-show="title"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="aside-title" ng-bind="title"></h4></div><div class="aside-body" ng-bind="content"></div><div class="aside-footer"><button type="button" class="btn btn-default" ng-click="$hide()">Close</button></div></div></div></div>')}]),angular.module("mgcrea.ngStrap.alert").run(["$templateCache",function(e){e.put("alert/alert.tpl.html",'<div class="alert" ng-class="[type ? \'alert-\' + type : null]"><button type="button" class="close" ng-if="dismissable" ng-click="$hide()">&times;</button> <strong ng-bind="title"></strong>&nbsp;<span ng-bind-html="content"></span></div>')}]),angular.module("mgcrea.ngStrap.datepicker").run(["$templateCache",function(e){e.put("datepicker/datepicker.tpl.html",'<div class="dropdown-menu datepicker" ng-class="\'datepicker-mode-\' + $mode" style="max-width: 320px"><table style="table-layout: fixed; height: 100%; width: 100%"><thead><tr class="text-center"><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$selectPane(-1)"><i class="{{$iconLeft}}"></i></button></th><th colspan="{{ rows[0].length - 2 }}"><button tabindex="-1" type="button" class="btn btn-default btn-block text-strong" ng-click="$toggleMode()"><strong style="text-transform: capitalize" ng-bind="title"></strong></button></th><th><button tabindex="-1" type="button" class="btn btn-default pull-right" ng-click="$selectPane(+1)"><i class="{{$iconRight}}"></i></button></th></tr><tr ng-if="showLabels" ng-bind-html="labels"></tr></thead><tbody><tr ng-repeat="(i, row) in rows" height="{{ 100 / rows.length }}%"><td class="text-center" ng-repeat="(j, el) in row"><button tabindex="-1" type="button" class="btn btn-default" style="width: 100%" ng-class="{\'btn-primary\': el.selected, \'btn-info btn-today\': el.isToday && !el.selected}" ng-click="$select(el.date)" ng-disabled="el.disabled"><span ng-class="{\'text-muted\': el.muted}" ng-bind="el.label"></span></button></td></tr></tbody></table></div>')}]),angular.module("mgcrea.ngStrap.modal").run(["$templateCache",function(e){e.put("modal/modal.tpl.html",'<div class="modal" tabindex="-1" role="dialog" aria-hidden="true"><div class="modal-dialog"><div class="modal-content"><div class="modal-header" ng-show="title"><button type="button" class="close" aria-label="Close" ng-click="$hide()"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" ng-bind="title"></h4></div><div class="modal-body" ng-bind="content"></div><div class="modal-footer"><button type="button" class="btn btn-default" ng-click="$hide()">Close</button></div></div></div></div>')}]),angular.module("mgcrea.ngStrap.dropdown").run(["$templateCache",function(e){e.put("dropdown/dropdown.tpl.html",'<ul tabindex="-1" class="dropdown-menu" role="menu" ng-show="content && content.length"><li role="presentation" ng-class="{divider: item.divider, active: item.active}" ng-repeat="item in content"><a role="menuitem" tabindex="-1" ng-href="{{item.href}}" ng-if="!item.divider && item.href" target="{{item.target || \'\'}}" ng-bind="item.text"></a> <a role="menuitem" tabindex="-1" href="javascript:void(0)" ng-if="!item.divider && item.click" ng-click="$eval(item.click);$hide()" ng-bind="item.text"></a></li></ul>')}]),angular.module("mgcrea.ngStrap.popover").run(["$templateCache",function(e){e.put("popover/popover.tpl.html",'<div class="popover" tabindex="-1"><div class="arrow"></div><h3 class="popover-title" ng-bind="title" ng-show="title"></h3><div class="popover-content" ng-bind="content"></div></div>')}]),angular.module("mgcrea.ngStrap.select").run(["$templateCache",function(e){e.put("select/select.tpl.html",'<ul tabindex="-1" class="select dropdown-menu" ng-show="$isVisible()" role="select"><li ng-if="$showAllNoneButtons"><div class="btn-group" style="margin-bottom: 5px; margin-left: 5px"><button type="button" class="btn btn-default btn-xs" ng-click="$selectAll()">{{$allText}}</button> <button type="button" class="btn btn-default btn-xs" ng-click="$selectNone()">{{$noneText}}</button></div></li><li role="presentation" ng-repeat="match in $matches" ng-class="{active: $isActive($index)}"><a style="cursor: default" role="menuitem" tabindex="-1" ng-click="$select($index, $event)"><i class="{{$iconCheckmark}} pull-right" ng-if="$isMultiple && $isActive($index)"></i> <span ng-bind="match.label"></span></a></li></ul>')}]),angular.module("mgcrea.ngStrap.tab").run(["$templateCache",function(e){e.put("tab/tab.tpl.html",'<ul class="nav" ng-class="$navClass" role="tablist"><li role="presentation" ng-repeat="$pane in $panes track by $index" ng-class="[ $isActive($pane, $index) ? $activeClass : \'\', $pane.disabled ? \'disabled\' : \'\' ]"><a role="tab" data-toggle="tab" ng-click="!$pane.disabled && $setActive($pane.name || $index)" data-index="{{ $index }}" ng-bind-html="$pane.title" aria-controls="$pane.title"></a></li></ul><div ng-transclude class="tab-content"></div>')}]),angular.module("mgcrea.ngStrap.timepicker").run(["$templateCache",function(e){e.put("timepicker/timepicker.tpl.html",'<div class="dropdown-menu timepicker" style="min-width: 0px;width: auto"><table height="100%"><thead><tr class="text-center"><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(-1, 0)"><i class="{{ $iconUp }}"></i></button></th><th>&nbsp;</th><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(-1, 1)"><i class="{{ $iconUp }}"></i></button></th><th ng-if="showSeconds">&nbsp;</th><th ng-if="showSeconds"><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(-1, 2)"><i class="{{ $iconUp }}"></i></button></th></tr></thead><tbody><tr ng-repeat="(i, row) in rows"><td class="text-center"><button tabindex="-1" style="width: 100%" type="button" class="btn btn-default" ng-class="{\'btn-primary\': row[0].selected}" ng-click="$select(row[0].date, 0)" ng-disabled="row[0].disabled"><span ng-class="{\'text-muted\': row[0].muted}" ng-bind="row[0].label"></span></button></td><td><span ng-bind="i == midIndex ? timeSeparator : \' \'"></span></td><td class="text-center"><button tabindex="-1" ng-if="row[1].date" style="width: 100%" type="button" class="btn btn-default" ng-class="{\'btn-primary\': row[1].selected}" ng-click="$select(row[1].date, 1)" ng-disabled="row[1].disabled"><span ng-class="{\'text-muted\': row[1].muted}" ng-bind="row[1].label"></span></button></td><td ng-if="showSeconds"><span ng-bind="i == midIndex ? timeSeparator : \' \'"></span></td><td ng-if="showSeconds" class="text-center"><button tabindex="-1" ng-if="row[2].date" style="width: 100%" type="button" class="btn btn-default" ng-class="{\'btn-primary\': row[2].selected}" ng-click="$select(row[2].date, 2)" ng-disabled="row[2].disabled"><span ng-class="{\'text-muted\': row[2].muted}" ng-bind="row[2].label"></span></button></td><td ng-if="showAM">&nbsp;</td><td ng-if="showAM"><button tabindex="-1" ng-show="i == midIndex - !isAM * 1" style="width: 100%" type="button" ng-class="{\'btn-primary\': !!isAM}" class="btn btn-default" ng-click="$switchMeridian()" ng-disabled="el.disabled">AM</button> <button tabindex="-1" ng-show="i == midIndex + 1 - !isAM * 1" style="width: 100%" type="button" ng-class="{\'btn-primary\': !isAM}" class="btn btn-default" ng-click="$switchMeridian()" ng-disabled="el.disabled">PM</button></td></tr></tbody><tfoot><tr class="text-center"><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(1, 0)"><i class="{{ $iconDown }}"></i></button></th><th>&nbsp;</th><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(1, 1)"><i class="{{ $iconDown }}"></i></button></th><th ng-if="showSeconds">&nbsp;</th><th ng-if="showSeconds"><button ng-if="showSeconds" tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(1, 2)"><i class="{{ $iconDown }}"></i></button></th></tr></tfoot></table></div>')}]),angular.module("mgcrea.ngStrap.typeahead").run(["$templateCache",function(e){e.put("typeahead/typeahead.tpl.html",'<ul tabindex="-1" class="typeahead dropdown-menu" ng-show="$isVisible()" role="select"><li role="presentation" ng-repeat="match in $matches" ng-class="{active: $index == $activeIndex}"><a role="menuitem" tabindex="-1" ng-click="$select($index, $event)" ng-bind="match.label"></a></li></ul>')}]),angular.module("mgcrea.ngStrap.tooltip").run(["$templateCache",function(e){e.put("tooltip/tooltip.tpl.html",'<div class="tooltip in" ng-show="title"><div class="tooltip-arrow"></div><div class="tooltip-inner" ng-bind="title"></div></div>')}])}(window,document),function(){"use strict";angular.module("toaster",["ngAnimate"]).constant("toasterConfig",{limit:0,"tap-to-dismiss":!0,"close-button":!1,"newest-on-top":!0,"time-out":5e3,"icon-classes":{error:"toast-error",info:"toast-info",wait:"toast-wait",success:"toast-success",warning:"toast-warning"},"body-output-type":"","body-template":"toasterBodyTmpl.html","icon-class":"toast-info","position-class":"toast-top-right","title-class":"toast-title","message-class":"toast-message","prevent-duplicates":!1,"mouseover-timer-stop":!0}).service("toaster",["$rootScope","toasterConfig",function(e,t){this.pop=function(t,n,i,r,o,a,s,l){if(angular.isObject(t)){var c=t;this.toast={type:c.type,title:c.title,body:c.body,timeout:c.timeout,bodyOutputType:c.bodyOutputType,clickHandler:c.clickHandler,showCloseButton:c.showCloseButton},s=c.toasterId}else this.toast={type:t,title:n,body:i,timeout:r,bodyOutputType:o,clickHandler:a,showCloseButton:l};e.$emit("toaster-newToast",s)},this.clear=function(){e.$emit("toaster-clearToasts")};for(var n in t["icon-classes"])this[n]=function(e){return function(t,n,i,r,o,a,s){angular.isString(t)?this.pop(e,t,n,i,r,o,a,s):this.pop(angular.extend(t,{type:e}))}}(n)}]).factory("toasterEventRegistry",["$rootScope",function(e){var t,n=null,i=null,r=[],o=[];return t={setup:function(){n||(n=e.$on("toaster-newToast",function(e,t){for(var n=0,i=r.length;n<i;n++)r[n](e,t)})),i||(i=e.$on("toaster-clearToasts",function(e){for(var t=0,n=o.length;t<n;t++)o[t](e)}))},subscribeToNewToastEvent:function(e){r.push(e)},subscribeToClearToastsEvent:function(e){o.push(e)},unsubscribeToNewToastEvent:function(e){var t=r.indexOf(e);t>=0&&r.splice(t,1),0===r.length&&(n(),n=null)},unsubscribeToClearToastsEvent:function(e){var t=o.indexOf(e);t>=0&&o.splice(t,1),0===o.length&&(i(),i=null)}},{setup:t.setup,subscribeToNewToastEvent:t.subscribeToNewToastEvent,subscribeToClearToastsEvent:t.subscribeToClearToastsEvent,unsubscribeToNewToastEvent:t.unsubscribeToNewToastEvent,unsubscribeToClearToastsEvent:t.unsubscribeToClearToastsEvent}}]).directive("toasterContainer",["$parse","$rootScope","$interval","$sce","toasterConfig","toaster","toasterEventRegistry",function(e,t,n,i,r,o,a){return{replace:!0,restrict:"EA",scope:!0,link:function(t,s,l){function c(e,i){e.timeoutPromise=n(function(){t.removeToast(e.id)},i,1)}function u(n){if(n.type=p["icon-classes"][n.type],n.type||(n.type=p["icon-class"]),!(!0===p["prevent-duplicates"]&&t.toasters.length>0&&t.toasters[t.toasters.length-1].body===n.body)){n.id=++h;var r=p["close-button"];if("boolean"==typeof n.showCloseButton);else if("boolean"==typeof r)n.showCloseButton=r;else if("object"==typeof r){var o=r[n.type];void 0!==o&&null!==o&&(n.showCloseButton=o)}else n.showCloseButton=!1;switch(n.bodyOutputType=n.bodyOutputType||p["body-output-type"],n.bodyOutputType){case"trustedHtml":n.html=i.trustAsHtml(n.body);break;case"template":n.bodyTemplate=n.body||p["body-template"];break;case"templateWithData":var a=e(n.body||p["body-template"]),s=a(t);n.bodyTemplate=s.template,n.data=s.data}t.configureTimer(n),!0===p["newest-on-top"]?(t.toasters.unshift(n),p.limit>0&&t.toasters.length>p.limit&&t.toasters.pop()):(t.toasters.push(n),p.limit>0&&t.toasters.length>p.limit&&t.toasters.shift())}}function d(e){var i=t.toasters[e];i&&(i.timeoutPromise&&n.cancel(i.timeoutPromise),t.toasters.splice(e,1))}function f(){for(var e=t.toasters.length;e>=0;e--)d(e)}var p,h=0;p=angular.extend({},r,t.$eval(l.toasterOptions)),t.config={toasterId:p["toaster-id"],position:p["position-class"],title:p["title-class"],message:p["message-class"],tap:p["tap-to-dismiss"],closeButton:p["close-button"],animation:p["animation-class"],mouseoverTimer:p["mouseover-timer-stop"]},t.$on("$destroy",function(){a.unsubscribeToNewToastEvent(t._onNewToast),a.unsubscribeToClearToastsEvent(t._onClearToasts)}),t.configureTimer=function(e){var t=angular.isNumber(e.timeout)?e.timeout:p["time-out"];t>0&&c(e,t)},t.removeToast=function(e){var n,i;for(n=0,i=t.toasters.length;n<i;n++)if(t.toasters[n].id===e){d(n);break}},t.toasters=[],t._onNewToast=function(e,n){(void 0===t.config.toasterId&&void 0===n||void 0!==n&&n===t.config.toasterId)&&u(o.toast)},t._onClearToasts=function(e){f()},a.setup(),a.subscribeToNewToastEvent(t._onNewToast),a.subscribeToClearToastsEvent(t._onClearToasts)},controller:["$scope","$element","$attrs",function(e,t,i){e.stopTimer=function(t){
+!0===e.config.mouseoverTimer&&t.timeoutPromise&&(n.cancel(t.timeoutPromise),t.timeoutPromise=null)},e.restartTimer=function(t){!0===e.config.mouseoverTimer?t.timeoutPromise||e.configureTimer(t):null===t.timeoutPromise&&e.removeToast(t.id)},e.click=function(t){if(!0===e.config.tap||!0===t.showCloseButton){var n=!0;t.clickHandler&&(angular.isFunction(t.clickHandler)?n=t.clickHandler(t,t.showCloseButton):angular.isFunction(e.$parent.$eval(t.clickHandler))?n=e.$parent.$eval(t.clickHandler)(t,t.showCloseButton):console.log("TOAST-NOTE: Your click handler is not inside a parent scope of toaster-container.")),n&&e.removeToast(t.id)}}}],template:'<div id="toast-container" ng-class="[config.position, config.animation]"><div ng-repeat="toaster in toasters" class="toast" ng-class="toaster.type" ng-click="click(toaster)" ng-mouseover="stopTimer(toaster)" ng-mouseout="restartTimer(toaster)"><button type="button" class="toast-close-button" ng-show="toaster.showCloseButton" ng-click="click(toaster)">&times;</button><div ng-class="config.title">{{toaster.title}}</div><div ng-class="config.message" ng-switch on="toaster.bodyOutputType"><div ng-switch-when="trustedHtml" ng-bind-html="toaster.html"></div><div ng-switch-when="template"><div ng-include="toaster.bodyTemplate"></div></div><div ng-switch-when="templateWithData"><div ng-include="toaster.bodyTemplate"></div></div><div ng-switch-default >{{toaster.body}}</div></div></div></div>'}}])}(window,document),function(e,t){"use strict";if("function"!=typeof define||!define.amd)return t(e);define(["angular"],function(e){return t(e)})}(window.angular||null,function(e){"use strict";var t=e.module("ngTable",[]);return t.value("ngTableDefaults",{params:{},settings:{}}),t.factory("NgTableParams",["$q","$log","ngTableDefaults",function(t,n,i){var r=function(e){return!isNaN(parseFloat(e))&&isFinite(e)};return function(o,a){var s=this,l=function(){u.debugMode&&n.debug&&n.debug.apply(this,arguments)};this.data=[],this.parameters=function(t,n){if(n=n||!1,e.isDefined(t)){for(var i in t){var o=t[i];if(n&&i.indexOf("[")>=0){for(var a=i.split(/\[(.*)\]/).reverse(),s="",u=0,d=a.length;u<d;u++){var f=a[u];if(""!==f){var p=o;o={},o[s=f]=r(p)?parseFloat(p):p}}"sorting"===s&&(c[s]={}),c[s]=e.extend(c[s]||{},o[s])}else c[i]=r(t[i])?parseFloat(t[i]):t[i]}return l("ngTable: set parameters",c),this}return c},this.settings=function(t){return e.isDefined(t)?(e.isArray(t.data)&&(t.total=t.data.length),u=e.extend(u,t),l("ngTable: set settings",u),this):u},this.page=function(t){return e.isDefined(t)?this.parameters({page:t}):c.page},this.total=function(t){return e.isDefined(t)?this.settings({total:t}):u.total},this.count=function(t){return e.isDefined(t)?this.parameters({count:t,page:1}):c.count},this.filter=function(t){return e.isDefined(t)?this.parameters({filter:t,page:1}):c.filter},this.sorting=function(t){if(2==arguments.length){var n={};return n[t]=arguments[1],this.parameters({sorting:n}),this}return e.isDefined(t)?this.parameters({sorting:t}):c.sorting},this.isSortBy=function(t,n){return e.isDefined(c.sorting[t])&&e.equals(c.sorting[t],n)},this.orderBy=function(){var e=[];for(var t in c.sorting)e.push(("asc"===c.sorting[t]?"+":"-")+t);return e},this.getData=function(t,n){return e.isArray(this.data)&&e.isObject(n)?t.resolve(this.data.slice((n.page()-1)*n.count(),n.page()*n.count())):t.resolve([]),t.promise},this.getGroups=function(n,i){var r=t.defer();return r.promise.then(function(t){var r={};e.forEach(t,function(t){var n=e.isFunction(i)?i(t):t[i];r[n]=r[n]||{data:[]},r[n].value=n,r[n].data.push(t)});var o=[];for(var a in r)o.push(r[a]);l("ngTable: refresh groups",o),n.resolve(o)}),this.getData(r,s)},this.generatePagesArray=function(e,t,n){var i,r,o,a,s,l;if(i=11,l=[],(s=Math.ceil(t/n))>1){l.push({type:"prev",number:Math.max(1,e-1),active:e>1}),l.push({type:"first",number:1,active:e>1,current:1===e}),o=Math.round((i-5)/2),a=Math.max(2,e-o),r=Math.min(s-1,e+2*o-(e-a)),a=Math.max(2,a-(2*o-(r-a)));for(var c=a;c<=r;)c===a&&2!==c||c===r&&c!==s-1?l.push({type:"more",active:!1}):l.push({type:"page",number:c,active:e!==c,current:e===c}),c++;l.push({type:"last",number:s,active:e!==s,current:e===s}),l.push({type:"next",number:Math.min(s,e+1),active:e<s})}return l},this.url=function(t){t=t||!1;var n=t?[]:{};for(var i in c)if(c.hasOwnProperty(i)){var r=c[i],o=encodeURIComponent(i);if("object"==typeof r){for(var a in r)if(!e.isUndefined(r[a])&&""!==r[a]){var s=o+"["+encodeURIComponent(a)+"]";t?n.push(s+"="+r[a]):n[s]=r[a]}}else e.isFunction(r)||e.isUndefined(r)||""===r||(t?n.push(o+"="+encodeURIComponent(r)):n[o]=encodeURIComponent(r))}return n},this.reload=function(){var e=t.defer(),n=this,i=null;if(u.$scope)return u.$loading=!0,i=u.groupBy?u.getGroups(e,u.groupBy,this):u.getData(e,this),l("ngTable: reload data"),i||(i=e.promise),i.then(function(e){return u.$loading=!1,l("ngTable: current scope",u.$scope),u.groupBy?(n.data=e,u.$scope&&(u.$scope.$groups=e)):(n.data=e,u.$scope&&(u.$scope.$data=e)),u.$scope&&(u.$scope.pages=n.generatePagesArray(n.page(),n.total(),n.count())),u.$scope.$emit("ngTableAfterReloadData"),e})},this.reloadPages=function(){var e=this;u.$scope.pages=e.generatePagesArray(e.page(),e.total(),e.count())};var c=this.$params={page:1,count:1,filter:{},sorting:{},group:{},groupBy:null};e.extend(c,i.params);var u={$scope:null,$loading:!1,data:null,total:0,defaultSort:"desc",filterDelay:750,counts:[10,25,50,100],sortingIndicator:"span",getGroups:this.getGroups,getData:this.getData};return e.extend(u,i.settings),this.settings(a),this.parameters(o,!0),this}}]),t.factory("ngTableParams",["NgTableParams",function(e){return e}]),t.controller("ngTableController",["$scope","NgTableParams","$timeout","$parse","$compile","$attrs","$element","ngTableColumn",function(t,n,i,r,o,a,s,l){function c(){t.params.$params.page=1}var u=!0;t.$filterRow={},t.$loading=!1,t.hasOwnProperty("params")||(t.params=new n,t.params.isNullInstance=!0),t.params.settings().$scope=t;var d=function(){var e=0;return function(t,n){i.cancel(e),e=i(t,n)}}();t.$watch("params.$params",function(n,i){if(n!==i){if(t.params.settings().$scope=t,e.equals(n.filter,i.filter))t.params.reload();else{var r=u?e.noop:c;d(function(){r(),t.params.reload()},t.params.settings().filterDelay)}t.params.isNullInstance||(u=!1)}},!0),this.compileDirectiveTemplates=function(){if(!s.hasClass("ng-table")){t.templates={header:a.templateHeader?a.templateHeader:"ng-table/header.html",pagination:a.templatePagination?a.templatePagination:"ng-table/pager.html"},s.addClass("ng-table");var n=null;0===s.find("> thead").length&&(n=e.element(document.createElement("thead")).attr("ng-include","templates.header"),s.prepend(n));var i=e.element(document.createElement("div")).attr({"ng-table-pagination":"params","template-url":"templates.pagination"});s.after(i),n&&o(n)(t),o(i)(t)}},this.loadFilterData=function(n){e.forEach(n,function(n){var i;return i=n.filterData(t,{$column:n}),i?e.isObject(i)&&e.isObject(i.promise)?(delete n.filterData,i.promise.then(function(t){e.isArray(t)||e.isFunction(t)||e.isObject(t)?e.isArray(t)&&t.unshift({title:"-",id:""}):t=[],n.data=t})):n.data=i:void delete n.filterData})},this.buildColumns=function(e){return e.map(function(e){return l.buildColumn(e,t)})},this.setupBindingsToInternalScope=function(n){var i=r(n);t.$watch(i,function(n){e.isUndefined(n)||(t.paramsModel=i,t.params=n)},!1),a.showFilter&&t.$parent.$watch(a.showFilter,function(e){t.show_filter=e}),a.disableFilter&&t.$parent.$watch(a.disableFilter,function(e){t.$filterRow.disabled=e})},t.sortBy=function(e,n){var i=e.sortable&&e.sortable();if(i){var r=t.params.settings().defaultSort,o="asc"===r?"desc":"asc",a=t.params.sorting()&&t.params.sorting()[i]&&t.params.sorting()[i]===r,s=n.ctrlKey||n.metaKey?t.params.sorting():{};s[i]=a?o:r,t.params.parameters({sorting:s})}}}]),t.factory("ngTableColumn",[function(){function t(t,i){var r=Object.create(t);for(var o in n)void 0===r[o]&&(r[o]=n[o]),e.isFunction(r[o])||function(e){r[e]=function(){return t[e]}}(o),function(e){var n=r[e];r[e]=function(){return 0===arguments.length?n.call(t,i):n.apply(t,arguments)}}(o);return r}var n={class:function(){return""},filter:function(){return!1},filterData:e.noop,headerTemplateURL:function(){return!1},headerTitle:function(){return""},sortable:function(){return!1},show:function(){return!0},title:function(){return""},titleAlt:function(){return""}};return{buildColumn:t}}]),t.directive("ngTable",["$q","$parse",function(t,n){return{restrict:"A",priority:1001,scope:!0,controller:"ngTableController",compile:function(t){var i=[],r=0,o=null;if(e.forEach(e.element(t.find("tr")),function(t){t=e.element(t),t.hasClass("ng-table-group")||o||(o=t)}),o)return e.forEach(o.find("td"),function(t){var o=e.element(t);if(!o.attr("ignore-cell")||"true"!==o.attr("ignore-cell")){var a=function(e){return o.attr("x-data-"+e)||o.attr("data-"+e)||o.attr(e)},s=function(t){var r=a(t);if(r)return function(t,o){return n(r)(t,e.extend(o||{},{$columns:i}))}},l=a("title-alt")||a("title");l&&o.attr("data-title-text","{{"+l+"}}"),i.push({id:r++,title:s("title"),titleAlt:s("title-alt"),headerTitle:s("header-title"),sortable:s("sortable"),class:s("header-class"),filter:s("filter"),headerTemplateURL:s("header"),filterData:s("filter-data"),show:o.attr("ng-show")?function(e){return n(o.attr("ng-show"))(e)}:void 0})}}),function(e,t,n,r){e.$columns=i=r.buildColumns(i),r.setupBindingsToInternalScope(n.ngTable),r.loadFilterData(i),r.compileDirectiveTemplates()}}}}]),t.directive("ngTableDynamic",["$parse",function(t){function n(e){if(!e||e.indexOf(" with ")>-1){var t=e.split(/\s+with\s+/);return{tableParams:t[0],columns:t[1]}}throw new Error("Parse error (expected example: ng-table-dynamic='tableParams with cols')")}return{restrict:"A",priority:1001,scope:!0,controller:"ngTableController",compile:function(i){var r;if(e.forEach(e.element(i.find("tr")),function(t){t=e.element(t),t.hasClass("ng-table-group")||r||(r=t)}),r)return e.forEach(r.find("td"),function(t){var n=e.element(t);(function(e){return n.attr("x-data-"+e)||n.attr("data-"+e)||n.attr(e)})("title")||n.attr("data-title-text","{{$columns[$index].titleAlt(this) || $columns[$index].title(this)}}"),n.attr("ng-show")||n.attr("ng-show","$columns[$index].show(this)")}),function(e,i,r,o){var a=n(r.ngTableDynamic),s=t(a.columns)(e)||[];e.$columns=o.buildColumns(s),o.setupBindingsToInternalScope(a.tableParams),o.loadFilterData(e.$columns),o.compileDirectiveTemplates()}}}}]),t.directive("ngTablePagination",["$compile",function(t){return{restrict:"A",scope:{params:"=ngTablePagination",templateUrl:"="},replace:!1,link:function(n,i,r){n.params.settings().$scope.$on("ngTableAfterReloadData",function(){n.pages=n.params.generatePagesArray(n.params.page(),n.params.total(),n.params.count())},!0),n.$watch("templateUrl",function(r){if(!e.isUndefined(r)){var o=e.element(document.createElement("div"));o.attr({"ng-include":"templateUrl"}),i.append(o),t(o)(n)}})}}}]),e.module("ngTable").run(["$templateCache",function(e){e.put("ng-table/filters/select-multiple.html",'<select ng-options="data.id as data.title for data in $column.data" ng-disabled="$filterRow.disabled" multiple ng-multiple="true" ng-model="params.filter()[name]" ng-show="filter==\'select-multiple\'" class="filter filter-select-multiple form-control" name="{{name}}"> </select>'),e.put("ng-table/filters/select.html",'<select ng-options="data.id as data.title for data in $column.data" ng-disabled="$filterRow.disabled" ng-model="params.filter()[name]" ng-show="filter==\'select\'" class="filter filter-select form-control" name="{{name}}"> </select>'),e.put("ng-table/filters/text.html",'<input type="text" name="{{name}}" ng-disabled="$filterRow.disabled" ng-model="params.filter()[name]" ng-if="filter==\'text\'" class="input-filter form-control"/>'),e.put("ng-table/header.html",'<tr> <th title="{{$column.headerTitle(this)}}" ng-repeat="$column in $columns" ng-class="{ \'sortable\': $column.sortable(this), \'sort-asc\': params.sorting()[$column.sortable(this)]==\'asc\', \'sort-desc\': params.sorting()[$column.sortable(this)]==\'desc\' }" ng-click="sortBy($column, $event)" ng-show="$column.show(this)" ng-init="template=$column.headerTemplateURL(this)" class="header {{$column.class(this)}}"> <div ng-if="!template" ng-show="!template" class="ng-table-header" ng-class="{\'sort-indicator\': params.settings().sortingIndicator==\'div\'}"> <span ng-bind="$column.title(this)" ng-class="{\'sort-indicator\': params.settings().sortingIndicator==\'span\'}"></span> </div> <div ng-if="template" ng-show="template" ng-include="template"></div> </th> </tr> <tr ng-show="show_filter" class="ng-table-filters"> <th data-title-text="{{$column.titleAlt(this) || $column.title(this)}}" ng-repeat="$column in $columns" ng-show="$column.show(this)" class="filter"> <div ng-repeat="(name, filter) in $column.filter(this)"> <div ng-if="filter.indexOf(\'/\') !==-1" ng-include="filter"></div> <div ng-if="filter.indexOf(\'/\')===-1" ng-include="\'ng-table/filters/\' + filter + \'.html\'"></div> </div> </th> </tr> '),e.put("ng-table/pager.html",'<div class="ng-cloak ng-table-pager" ng-if="params.data.length"> <div ng-if="params.settings().counts.length" class="ng-table-counts btn-group pull-right"> <button ng-repeat="count in params.settings().counts" type="button" ng-class="{\'active\':params.count()==count}" ng-click="params.count(count)" class="btn btn-default"> <span ng-bind="count"></span> </button> </div> <ul class="pagination ng-table-pagination"> <li ng-class="{\'disabled\': !page.active && !page.current, \'active\': page.current}" ng-repeat="page in pages" ng-switch="page.type"> <a ng-switch-when="prev" ng-click="params.page(page.number)" href="">&laquo;</a> <a ng-switch-when="first" ng-click="params.page(page.number)" href=""><span ng-bind="page.number"></span></a> <a ng-switch-when="page" ng-click="params.page(page.number)" href=""><span ng-bind="page.number"></span></a> <a ng-switch-when="more" ng-click="params.page(page.number)" href="">&#8230;</a> <a ng-switch-when="last" ng-click="params.page(page.number)" href=""><span ng-bind="page.number"></span></a> <a ng-switch-when="next" ng-click="params.page(page.number)" href="">&raquo;</a> </li> </ul> </div> ')}]),t}),function(e){void 0===e.fn.each2&&e.extend(e.fn,{each2:function(t){for(var n=e([0]),i=-1,r=this.length;++i<r&&(n.context=n[0]=this[i])&&!1!==t.call(n[0],i,n););return this}})}(jQuery),function(e,t){"use strict";function n(t){var n=e(document.createTextNode(""));t.before(n),n.before(t),n.remove()}function i(e){function t(e){return H[e]||e}return e.replace(/[^\u0000-\u007E]/g,t)}function r(e,t){for(var n=0,i=t.length;n<i;n+=1)if(a(e,t[n]))return n;return-1}function o(){var t=e(V);t.appendTo("body");var n={width:t.width()-t[0].clientWidth,height:t.height()-t[0].clientHeight};return t.remove(),n}function a(e,n){return e===n||e!==t&&n!==t&&(null!==e&&null!==n&&(e.constructor===String?e+""==n+"":n.constructor===String&&n+""==e+""))}function s(t,n){var i,r,o;if(null===t||t.length<1)return[];for(i=t.split(n),r=0,o=i.length;r<o;r+=1)i[r]=e.trim(i[r]);return i}function l(e){return e.outerWidth(!1)-e.width()}function c(n){var i="keyup-change-value";n.on("keydown",function(){e.data(n,i)===t&&e.data(n,i,n.val())}),n.on("keyup",function(){var r=e.data(n,i);r!==t&&n.val()!==r&&(e.removeData(n,i),n.trigger("keyup-change"))})}function u(n){n.on("mousemove",function(n){var i=R;i!==t&&i.x===n.pageX&&i.y===n.pageY||e(n.target).trigger("mousemove-filtered",n)})}function d(e,n,i){i=i||t;var r;return function(){var t=arguments;window.clearTimeout(r),r=window.setTimeout(function(){n.apply(i,t)},e)}}function f(e,t){var n=d(e,function(e){t.trigger("scroll-debounced",e)});t.on("scroll",function(e){r(e.target,t.get())>=0&&n(e)})}function p(e){e[0]!==document.activeElement&&window.setTimeout(function(){var t,n=e[0],i=e.val().length;e.focus(),(n.offsetWidth>0||n.offsetHeight>0)&&n===document.activeElement&&(n.setSelectionRange?n.setSelectionRange(i,i):n.createTextRange&&(t=n.createTextRange(),t.collapse(!1),t.select()))},0)}function h(t){t=e(t)[0];var n=0,i=0;if("selectionStart"in t)n=t.selectionStart,i=t.selectionEnd-n;else if("selection"in document){t.focus();var r=document.selection.createRange();i=document.selection.createRange().text.length,r.moveStart("character",-t.value.length),n=r.text.length-i}return{offset:n,length:i}}function g(e){e.preventDefault(),e.stopPropagation()}function m(e){e.preventDefault(),e.stopImmediatePropagation()}function v(t){if(!j){var n=t[0].currentStyle||window.getComputedStyle(t[0],null);j=e(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:n.fontSize,fontFamily:n.fontFamily,fontStyle:n.fontStyle,fontWeight:n.fontWeight,letterSpacing:n.letterSpacing,textTransform:n.textTransform,whiteSpace:"nowrap"}),j.attr("class","select2-sizer"),e("body").append(j)}return j.text(t.val()),j.width()}function $(t,n,i){var r,o,a=[];r=e.trim(t.attr("class")),r&&(r=""+r,e(r.split(/\s+/)).each2(function(){0===this.indexOf("select2-")&&a.push(this)})),r=e.trim(n.attr("class")),r&&(r=""+r,e(r.split(/\s+/)).each2(function(){0!==this.indexOf("select2-")&&(o=i(this))&&a.push(o)})),t.attr("class",a.join(" "))}function y(e,t,n,r){var o=i(e.toUpperCase()).indexOf(i(t.toUpperCase())),a=t.length;if(o<0)return void n.push(r(e));n.push(r(e.substring(0,o))),n.push("<span class='select2-match'>"),n.push(r(e.substring(o,o+a))),n.push("</span>"),n.push(r(e.substring(o+a,e.length)))}function b(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})}function w(n){var i,r=null,o=n.quietMillis||100,a=n.url,s=this;return function(l){window.clearTimeout(i),i=window.setTimeout(function(){var i=n.data,o=a,c=n.transport||e.fn.select2.ajaxDefaults.transport,u={type:n.type||"GET",cache:n.cache||!1,jsonpCallback:n.jsonpCallback||t,dataType:n.dataType||"json"},d=e.extend({},e.fn.select2.ajaxDefaults.params,u);i=i?i.call(s,l.term,l.page,l.context):null,o="function"==typeof o?o.call(s,l.term,l.page,l.context):o,r&&"function"==typeof r.abort&&r.abort(),n.params&&(e.isFunction(n.params)?e.extend(d,n.params.call(s)):e.extend(d,n.params)),e.extend(d,{url:o,dataType:n.dataType,data:i,success:function(e){var t=n.results(e,l.page,l);l.callback(t)},error:function(e,t,n){var i={hasError:!0,jqXHR:e,textStatus:t,errorThrown:n};l.callback(i)}}),r=c.call(s,d)},o)}}function x(t){var n,i,r=t,o=function(e){return""+e.text};e.isArray(r)&&(i=r,r={results:i}),!1===e.isFunction(r)&&(i=r,r=function(){return i});var a=r();return a.text&&(o=a.text,e.isFunction(o)||(n=a.text,o=function(e){return e[n]})),function(t){var n,i=t.term,a={results:[]};if(""===i)return void t.callback(r());n=function(r,a){var s,l;if(r=r[0],r.children){s={};for(l in r)r.hasOwnProperty(l)&&(s[l]=r[l]);s.children=[],e(r.children).each2(function(e,t){n(t,s.children)}),(s.children.length||t.matcher(i,o(s),r))&&a.push(s)}else t.matcher(i,o(r),r)&&a.push(r)},e(r().results).each2(function(e,t){n(t,a.results)}),t.callback(a)}}function C(n){var i=e.isFunction(n);return function(r){var o=r.term,a={results:[]},s=i?n(r):n;e.isArray(s)&&(e(s).each(function(){var e=this.text!==t,n=e?this.text:this;(""===o||r.matcher(o,n))&&a.results.push(e?this:{id:this,text:this})}),r.callback(a))}}function k(t,n){if(e.isFunction(t))return!0;if(!t)return!1;if("string"==typeof t)return!0;throw new Error(n+" must be a string, function, or falsy value")}function S(t,n){if(e.isFunction(t)){var i=Array.prototype.slice.call(arguments,2);return t.apply(n,i)}return t}function E(t){var n=0;return e.each(t,function(e,t){t.children?n+=E(t.children):n++}),n}function T(e,n,i,r){var o,s,l,c,u,d=e,f=!1;if(!r.createSearchChoice||!r.tokenSeparators||r.tokenSeparators.length<1)return t;for(;;){for(s=-1,l=0,c=r.tokenSeparators.length;l<c&&(u=r.tokenSeparators[l],!((s=e.indexOf(u))>=0));l++);if(s<0)break;if(o=e.substring(0,s),e=e.substring(s+u.length),o.length>0&&(o=r.createSearchChoice.call(this,o,n))!==t&&null!==o&&r.id(o)!==t&&null!==r.id(o)){for(f=!1,l=0,c=n.length;l<c;l++)if(a(r.id(o),r.id(n[l]))){f=!0;break}f||i(o)}}return d!==e?e:void 0}function D(){var t=this;e.each(arguments,function(e,n){t[n].remove(),t[n]=null})}function A(t,n){var i=function(){};return i.prototype=new t,i.prototype.constructor=i,i.prototype.parent=t.prototype,i.prototype=e.extend(i.prototype,n),i}if(window.Select2===t){var M,O,I,P,N,j,F,L,R={x:0,y:0},M={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(e){switch(e=e.which?e.which:e){case M.LEFT:case M.RIGHT:case M.UP:case M.DOWN:return!0}return!1},isControl:function(e){switch(e.which){case M.SHIFT:case M.CTRL:case M.ALT:return!0}return!!e.metaKey},isFunctionKey:function(e){return(e=e.which?e.which:e)>=112&&e<=123}},V="<div class='select2-measure-scrollbar'></div>",H={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};F=e(document),N=function(){var e=1;return function(){return e++}}(),O=A(Object,{bind:function(e){var t=this;return function(){e.apply(t,arguments)}},init:function(n){var i,r;this.opts=n=this.prepareOpts(n),this.id=n.id,n.element.data("select2")!==t&&null!==n.element.data("select2")&&n.element.data("select2").destroy(),this.container=this.createContainer(),this.liveRegion=e("<span>",{role:"status","aria-live":"polite"}).addClass("select2-hidden-accessible").appendTo(document.body),this.containerId="s2id_"+(n.element.attr("id")||"autogen"+N()),this.containerEventName=this.containerId.replace(/([.])/g,"_").replace(/([;&,\-\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.container.attr("title",n.element.attr("title")),this.body=e("body"),$(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.attr("style",n.element.attr("style")),this.container.css(S(n.containerCss,this.opts.element)),this.container.addClass(S(n.containerCssClass,this.opts.element)),this.elementTabIndex=this.opts.element.attr("tabindex"),this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("click.select2",g),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),$(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(S(n.dropdownCssClass,this.opts.element)),this.dropdown.data("select2",this),this.dropdown.on("click",g),this.results=i=this.container.find(".select2-results"),this.search=r=this.container.find("input.select2-input"),this.queryCount=0,this.resultsPage=0,this.context=null,this.initContainer(),this.container.on("click",g),u(this.results),this.dropdown.on("mousemove-filtered",".select2-results",this.bind(this.highlightUnderEvent)),this.dropdown.on("touchstart touchmove touchend",".select2-results",this.bind(function(e){this._touchEvent=!0,this.highlightUnderEvent(e)})),this.dropdown.on("touchmove",".select2-results",this.bind(this.touchMoved)),this.dropdown.on("touchstart touchend",".select2-results",this.bind(this.clearTouchMoved)),this.dropdown.on("click",this.bind(function(e){this._touchEvent&&(this._touchEvent=!1,this.selectHighlighted())})),f(80,this.results),this.dropdown.on("scroll-debounced",".select2-results",this.bind(this.loadMoreIfNeeded)),e(this.container).on("change",".select2-input",function(e){e.stopPropagation()}),e(this.dropdown).on("change",".select2-input",function(e){e.stopPropagation()}),e.fn.mousewheel&&i.mousewheel(function(e,t,n,r){var o=i.scrollTop();r>0&&o-r<=0?(i.scrollTop(0),g(e)):r<0&&i.get(0).scrollHeight-i.scrollTop()+r<=i.height()&&(i.scrollTop(i.get(0).scrollHeight-i.height()),g(e))}),c(r),r.on("keyup-change input paste",this.bind(this.updateResults)),r.on("focus",function(){r.addClass("select2-focused")}),r.on("blur",function(){r.removeClass("select2-focused")}),this.dropdown.on("mouseup",".select2-results",this.bind(function(t){e(t.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(t),this.selectHighlighted(t))})),this.dropdown.on("click mouseup mousedown touchstart touchend focusin",function(e){e.stopPropagation()}),this.nextSearchTerm=t,e.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),null!==n.maximumInputLength&&this.search.attr("maxlength",n.maximumInputLength);var a=n.element.prop("disabled");a===t&&(a=!1),this.enable(!a);var s=n.element.prop("readonly");s===t&&(s=!1),this.readonly(s),L=L||o(),this.autofocus=n.element.prop("autofocus"),n.element.prop("autofocus",!1),this.autofocus&&this.focus(),this.search.attr("placeholder",n.searchInputPlaceholder)},destroy:function(){var e=this.opts.element,n=e.data("select2"),i=this;this.close(),e.length&&e[0].detachEvent&&e.each(function(){this.detachEvent("onpropertychange",i._sync)}),this.propertyObserver&&(this.propertyObserver.disconnect(),this.propertyObserver=null),this._sync=null,n!==t&&(n.container.remove(),n.liveRegion.remove(),n.dropdown.remove(),e.removeClass("select2-offscreen").removeData("select2").off(".select2").prop("autofocus",this.autofocus||!1),this.elementTabIndex?e.attr({tabindex:this.elementTabIndex}):e.removeAttr("tabindex"),e.show()),
+D.call(this,"container","liveRegion","dropdown","results","search")},optionToData:function(e){return e.is("option")?{id:e.prop("value"),text:e.text(),element:e.get(),css:e.attr("class"),disabled:e.prop("disabled"),locked:a(e.attr("locked"),"locked")||a(e.data("locked"),!0)}:e.is("optgroup")?{text:e.attr("label"),children:[],element:e.get(),css:e.attr("class")}:void 0},prepareOpts:function(n){var i,r,o,l,c=this;if(i=n.element,"select"===i.get(0).tagName.toLowerCase()&&(this.select=r=n.element),r&&e.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in n)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),n=e.extend({},{populateResults:function(i,r,o){var a,s=this.opts.id,l=this.liveRegion;(a=function(i,r,u){var d,f,p,h,g,m,v,$,y,b;i=n.sortResults(i,r,o);var w=[];for(d=0,f=i.length;d<f;d+=1)p=i[d],g=!0===p.disabled,h=!g&&s(p)!==t,m=p.children&&p.children.length>0,v=e("<li></li>"),v.addClass("select2-results-dept-"+u),v.addClass("select2-result"),v.addClass(h?"select2-result-selectable":"select2-result-unselectable"),g&&v.addClass("select2-disabled"),m&&v.addClass("select2-result-with-children"),v.addClass(c.opts.formatResultCssClass(p)),v.attr("role","presentation"),$=e(document.createElement("div")),$.addClass("select2-result-label"),$.attr("id","select2-result-label-"+N()),$.attr("role","option"),b=n.formatResult(p,$,o,c.opts.escapeMarkup),b!==t&&($.html(b),v.append($)),m&&(y=e("<ul></ul>"),y.addClass("select2-result-sub"),a(p.children,y,u+1),v.append(y)),v.data("select2-data",p),w.push(v[0]);r.append(w),l.text(n.formatMatches(i.length))})(r,i,0)}},e.fn.select2.defaults,n),"function"!=typeof n.id&&(o=n.id,n.id=function(e){return e[o]}),e.isArray(n.element.data("select2Tags"))){if("tags"in n)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+n.element.attr("id");n.tags=n.element.data("select2Tags")}if(r?(n.query=this.bind(function(e){var n,r,o,a={results:[],more:!1},s=e.term;o=function(t,n){var i;t.is("option")?e.matcher(s,t.text(),t)&&n.push(c.optionToData(t)):t.is("optgroup")&&(i=c.optionToData(t),t.children().each2(function(e,t){o(t,i.children)}),i.children.length>0&&n.push(i))},n=i.children(),this.getPlaceholder()!==t&&n.length>0&&(r=this.getPlaceholderOption())&&(n=n.not(r)),n.each2(function(e,t){o(t,a.results)}),e.callback(a)}),n.id=function(e){return e.id}):"query"in n||("ajax"in n?(l=n.element.data("ajax-url"),l&&l.length>0&&(n.ajax.url=l),n.query=w.call(n.element,n.ajax)):"data"in n?n.query=x(n.data):"tags"in n&&(n.query=C(n.tags),n.createSearchChoice===t&&(n.createSearchChoice=function(t){return{id:e.trim(t),text:e.trim(t)}}),n.initSelection===t&&(n.initSelection=function(t,i){var r=[];e(s(t.val(),n.separator)).each(function(){var t={id:this,text:this},i=n.tags;e.isFunction(i)&&(i=i()),e(i).each(function(){if(a(this.id,t.id))return t=this,!1}),r.push(t)}),i(r)}))),"function"!=typeof n.query)throw"query function not defined for Select2 "+n.element.attr("id");if("top"===n.createSearchChoicePosition)n.createSearchChoicePosition=function(e,t){e.unshift(t)};else if("bottom"===n.createSearchChoicePosition)n.createSearchChoicePosition=function(e,t){e.push(t)};else if("function"!=typeof n.createSearchChoicePosition)throw"invalid createSearchChoicePosition option must be 'top', 'bottom' or a custom function";return n},monitorSource:function(){var n,i=this.opts.element,r=this;i.on("change.select2",this.bind(function(e){!0!==this.opts.element.data("select2-change-triggered")&&this.initSelection()})),this._sync=this.bind(function(){var e=i.prop("disabled");e===t&&(e=!1),this.enable(!e);var n=i.prop("readonly");n===t&&(n=!1),this.readonly(n),$(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(S(this.opts.containerCssClass,this.opts.element)),$(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(S(this.opts.dropdownCssClass,this.opts.element))}),i.length&&i[0].attachEvent&&i.each(function(){this.attachEvent("onpropertychange",r._sync)}),(n=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver)!==t&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new n(function(t){e.each(t,r._sync)}),this.propertyObserver.observe(i.get(0),{attributes:!0,subtree:!1}))},triggerSelect:function(t){var n=e.Event("select2-selecting",{val:this.id(t),object:t,choice:t});return this.opts.element.trigger(n),!n.isDefaultPrevented()},triggerChange:function(t){t=t||{},t=e.extend({},t,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(t),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},isInterfaceEnabled:function(){return!0===this.enabledInterface},enableInterface:function(){var e=this._enabled&&!this._readonly,t=!e;return e!==this.enabledInterface&&(this.container.toggleClass("select2-container-disabled",t),this.close(),this.enabledInterface=e,!0)},enable:function(e){e===t&&(e=!0),this._enabled!==e&&(this._enabled=e,this.opts.element.prop("disabled",!e),this.enableInterface())},disable:function(){this.enable(!1)},readonly:function(e){e===t&&(e=!1),this._readonly!==e&&(this._readonly=e,this.opts.element.prop("readonly",e),this.enableInterface())},opened:function(){return!!this.container&&this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var t,n,i,r,o,a=this.dropdown,s=this.container.offset(),l=this.container.outerHeight(!1),c=this.container.outerWidth(!1),u=a.outerHeight(!1),d=e(window),f=d.width(),p=d.height(),h=d.scrollLeft()+f,g=d.scrollTop()+p,m=s.top+l,v=s.left,$=m+u<=g,y=s.top-u>=d.scrollTop(),b=a.outerWidth(!1),w=v+b<=h,x=a.hasClass("select2-drop-above");x?(n=!0,!y&&$&&(i=!0,n=!1)):(n=!1,!$&&y&&(i=!0,n=!0)),i&&(a.hide(),s=this.container.offset(),l=this.container.outerHeight(!1),c=this.container.outerWidth(!1),u=a.outerHeight(!1),h=d.scrollLeft()+f,g=d.scrollTop()+p,m=s.top+l,v=s.left,b=a.outerWidth(!1),w=v+b<=h,a.show(),this.focusSearch()),this.opts.dropdownAutoWidth?(o=e(".select2-results",a)[0],a.addClass("select2-drop-auto-width"),a.css("width",""),b=a.outerWidth(!1)+(o.scrollHeight===o.clientHeight?0:L.width),b>c?c=b:b=c,u=a.outerHeight(!1),w=v+b<=h):this.container.removeClass("select2-drop-auto-width"),"static"!==this.body.css("position")&&(t=this.body.offset(),m-=t.top,v-=t.left),w||(v=s.left+this.container.outerWidth(!1)-b),r={left:v,width:c},n?(r.top=s.top-u,r.bottom="auto",this.container.addClass("select2-drop-above"),a.addClass("select2-drop-above")):(r.top=m,r.bottom="auto",this.container.removeClass("select2-drop-above"),a.removeClass("select2-drop-above")),r=e.extend(r,S(this.opts.dropdownCss,this.opts.element)),a.css(r)},shouldOpen:function(){var t;return!this.opened()&&(!1!==this._enabled&&!0!==this._readonly&&(t=e.Event("select2-opening"),this.opts.element.trigger(t),!t.isDefaultPrevented()))},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return!!this.shouldOpen()&&(this.opening(),F.on("mousemove.select2Event",function(e){R.x=e.pageX,R.y=e.pageY}),!0)},opening:function(){var t,i=this.containerEventName,r="scroll."+i,o="resize."+i,a="orientationchange."+i;this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.clearDropdownAlignmentPreference(),this.dropdown[0]!==this.body.children().last()[0]&&this.dropdown.detach().appendTo(this.body),t=e("#select2-drop-mask"),0==t.length&&(t=e(document.createElement("div")),t.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),t.hide(),t.appendTo(this.body),t.on("mousedown touchstart click",function(i){n(t);var r,o=e("#select2-drop");o.length>0&&(r=o.data("select2"),r.opts.selectOnBlur&&r.selectHighlighted({noFocus:!0}),r.close(),i.preventDefault(),i.stopPropagation())})),this.dropdown.prev()[0]!==t[0]&&this.dropdown.before(t),e("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),t.show(),this.positionDropdown(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active");var s=this;this.container.parents().add(window).each(function(){e(this).on(o+" "+r+" "+a,function(e){s.opened()&&s.positionDropdown()})})},close:function(){if(this.opened()){var t=this.containerEventName,n="scroll."+t,i="resize."+t,r="orientationchange."+t;this.container.parents().add(window).each(function(){e(this).off(n).off(i).off(r)}),this.clearDropdownAlignmentPreference(),e("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active"),this.results.empty(),F.off("mousemove.select2Event"),this.clearSearch(),this.search.removeClass("select2-active"),this.opts.element.trigger(e.Event("select2-close"))}},externalSearch:function(e){this.open(),this.search.val(e),this.updateResults(!1)},clearSearch:function(){},getMaximumSelectionSize:function(){return S(this.opts.maximumSelectionSize,this.opts.element)},ensureHighlightVisible:function(){var t,n,i,r,o,a,s,l,c=this.results;if(!((n=this.highlight())<0)){if(0==n)return void c.scrollTop(0);t=this.findHighlightableChoices().find(".select2-result-label"),i=e(t[n]),l=(i.offset()||{}).top||0,r=l+i.outerHeight(!0),n===t.length-1&&(s=c.find("li.select2-more-results"),s.length>0&&(r=s.offset().top+s.outerHeight(!0))),o=c.offset().top+c.outerHeight(!0),r>o&&c.scrollTop(c.scrollTop()+(r-o)),a=l-c.offset().top,a<0&&"none"!=i.css("display")&&c.scrollTop(c.scrollTop()+a)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-disabled):not(.select2-selected)")},moveHighlight:function(t){for(var n=this.findHighlightableChoices(),i=this.highlight();i>-1&&i<n.length;){i+=t;var r=e(n[i]);if(r.hasClass("select2-result-selectable")&&!r.hasClass("select2-disabled")&&!r.hasClass("select2-selected")){this.highlight(i);break}}},highlight:function(t){var n,i,o=this.findHighlightableChoices();if(0===arguments.length)return r(o.filter(".select2-highlighted")[0],o.get());t>=o.length&&(t=o.length-1),t<0&&(t=0),this.removeHighlight(),n=e(o[t]),n.addClass("select2-highlighted"),this.search.attr("aria-activedescendant",n.find(".select2-result-label").attr("id")),this.ensureHighlightVisible(),this.liveRegion.text(n.text()),(i=n.data("select2-data"))&&this.opts.element.trigger({type:"select2-highlight",val:this.id(i),choice:i})},removeHighlight:function(){this.results.find(".select2-highlighted").removeClass("select2-highlighted")},touchMoved:function(){this._touchMoved=!0},clearTouchMoved:function(){this._touchMoved=!1},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(t){var n=e(t.target).closest(".select2-result-selectable");if(n.length>0&&!n.is(".select2-highlighted")){var i=this.findHighlightableChoices();this.highlight(i.index(n))}else 0==n.length&&this.removeHighlight()},loadMoreIfNeeded:function(){var e=this.results,t=e.find("li.select2-more-results"),n=this.resultsPage+1,i=this,r=this.search.val(),o=this.context;0!==t.length&&t.offset().top-e.offset().top-e.height()<=this.opts.loadMorePadding&&(t.addClass("select2-active"),this.opts.query({element:this.opts.element,term:r,page:n,context:o,matcher:this.opts.matcher,callback:this.bind(function(a){i.opened()&&(i.opts.populateResults.call(this,e,a.results,{term:r,page:n,context:o}),i.postprocessResults(a,!1,!1),!0===a.more?(t.detach().appendTo(e).text(S(i.opts.formatLoadMore,i.opts.element,n+1)),window.setTimeout(function(){i.loadMoreIfNeeded()},10)):t.remove(),i.positionDropdown(),i.resultsPage=n,i.context=a.context,this.opts.element.trigger({type:"select2-loaded",items:a}))})}))},tokenize:function(){},updateResults:function(n){function i(){c.removeClass("select2-active"),f.positionDropdown(),u.find(".select2-no-results,.select2-selection-limit,.select2-searching").length?f.liveRegion.text(u.text()):f.liveRegion.text(f.opts.formatMatches(u.find(".select2-result-selectable").length))}function r(e){u.html(e),i()}var o,s,l,c=this.search,u=this.results,d=this.opts,f=this,p=c.val(),h=e.data(this.container,"select2-last-term");if((!0===n||!h||!a(p,h))&&(e.data(this.container,"select2-last-term",p),!0===n||!1!==this.showSearchInput&&this.opened())){l=++this.queryCount;var g=this.getMaximumSelectionSize();if(g>=1&&(o=this.data(),e.isArray(o)&&o.length>=g&&k(d.formatSelectionTooBig,"formatSelectionTooBig")))return void r("<li class='select2-selection-limit'>"+S(d.formatSelectionTooBig,d.element,g)+"</li>");if(c.val().length<d.minimumInputLength)return r(k(d.formatInputTooShort,"formatInputTooShort")?"<li class='select2-no-results'>"+S(d.formatInputTooShort,d.element,c.val(),d.minimumInputLength)+"</li>":""),void(n&&this.showSearch&&this.showSearch(!0));if(d.maximumInputLength&&c.val().length>d.maximumInputLength)return void r(k(d.formatInputTooLong,"formatInputTooLong")?"<li class='select2-no-results'>"+S(d.formatInputTooLong,d.element,c.val(),d.maximumInputLength)+"</li>":"");d.formatSearching&&0===this.findHighlightableChoices().length&&r("<li class='select2-searching'>"+S(d.formatSearching,d.element)+"</li>"),c.addClass("select2-active"),this.removeHighlight(),s=this.tokenize(),s!=t&&null!=s&&c.val(s),this.resultsPage=1,d.query({element:d.element,term:c.val(),page:this.resultsPage,context:null,matcher:d.matcher,callback:this.bind(function(o){var s;if(l==this.queryCount){if(!this.opened())return void this.search.removeClass("select2-active");if(o.hasError!==t&&k(d.formatAjaxError,"formatAjaxError"))return void r("<li class='select2-ajax-error'>"+S(d.formatAjaxError,d.element,o.jqXHR,o.textStatus,o.errorThrown)+"</li>");if(this.context=o.context===t?null:o.context,this.opts.createSearchChoice&&""!==c.val()&&(s=this.opts.createSearchChoice.call(f,c.val(),o.results))!==t&&null!==s&&f.id(s)!==t&&null!==f.id(s)&&0===e(o.results).filter(function(){return a(f.id(this),f.id(s))}).length&&this.opts.createSearchChoicePosition(o.results,s),0===o.results.length&&k(d.formatNoMatches,"formatNoMatches"))return void r("<li class='select2-no-results'>"+S(d.formatNoMatches,d.element,c.val())+"</li>");u.empty(),f.opts.populateResults.call(this,u,o.results,{term:c.val(),page:this.resultsPage,context:null}),!0===o.more&&k(d.formatLoadMore,"formatLoadMore")&&(u.append("<li class='select2-more-results'>"+d.escapeMarkup(S(d.formatLoadMore,d.element,this.resultsPage))+"</li>"),window.setTimeout(function(){f.loadMoreIfNeeded()},10)),this.postprocessResults(o,n),i(),this.opts.element.trigger({type:"select2-loaded",items:o})}})})}},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){p(this.search)},selectHighlighted:function(e){if(this._touchMoved)return void this.clearTouchMoved();var t=this.highlight(),n=this.results.find(".select2-highlighted"),i=n.closest(".select2-result").data("select2-data");i?(this.highlight(t),this.onSelect(i,e)):e&&e.noFocus&&this.close()},getPlaceholder:function(){var e;return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder||((e=this.getPlaceholderOption())!==t?e.text():t)},getPlaceholderOption:function(){if(this.select){var n=this.select.children("option").first();if(this.opts.placeholderOption!==t)return"first"===this.opts.placeholderOption&&n||"function"==typeof this.opts.placeholderOption&&this.opts.placeholderOption(this.select);if(""===e.trim(n.text())&&""===n.val())return n}},initContainerWidth:function(){function n(){var n,i,r,o,a,s;if("off"===this.opts.width)return null;if("element"===this.opts.width)return 0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px";if("copy"===this.opts.width||"resolve"===this.opts.width){if((n=this.opts.element.attr("style"))!==t)for(i=n.split(";"),o=0,a=i.length;o<a;o+=1)if(s=i[o].replace(/\s/g,""),null!==(r=s.match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i))&&r.length>=1)return r[1];return"resolve"===this.opts.width?(n=this.opts.element.css("width"),n.indexOf("%")>0?n:0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px"):null}return e.isFunction(this.opts.width)?this.opts.width():this.opts.width}var i=n.call(this);null!==i&&this.container.css("width",i)}}),I=A(O,{createContainer:function(){return e(document.createElement("div")).attr({class:"select2-container"}).html(["<a href='javascript:void(0)' class='select2-choice' tabindex='-1'>"," <span class='select2-chosen'>&#160;</span><abbr class='select2-search-choice-close'></abbr>"," <span class='select2-arrow' role='presentation'><b role='presentation'></b></span>","</a>","<label for='' class='select2-offscreen'></label>","<input class='select2-focusser select2-offscreen' type='text' aria-haspopup='true' role='button' />","<div class='select2-drop select2-display-none'>"," <div class='select2-search'>"," <label for='' class='select2-offscreen'></label>"," <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input' role='combobox' aria-expanded='true'"," aria-autocomplete='list' />"," </div>"," <ul class='select2-results' role='listbox'>"," </ul>","</div>"].join(""))},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var n,i,r;this.opts.minimumResultsForSearch>=0&&this.showSearch(!0),this.parent.opening.apply(this,arguments),!1!==this.showSearchInput&&this.search.val(this.focusser.val()),this.opts.shouldFocusInput(this)&&(this.search.focus(),n=this.search.get(0),n.createTextRange?(i=n.createTextRange(),i.collapse(!1),i.select()):n.setSelectionRange&&(r=this.search.val().length,n.setSelectionRange(r,r))),""===this.search.val()&&this.nextSearchTerm!=t&&(this.search.val(this.nextSearchTerm),this.search.select()),this.focusser.prop("disabled",!0).val(""),this.updateResults(!0),this.opts.element.trigger(e.Event("select2-open"))},close:function(){this.opened()&&(this.parent.close.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus()},destroy:function(){e("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),D.call(this,"selection","focusser")},initContainer:function(){var t,i,r=this.container,o=this.dropdown,a=N();this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0),this.selection=t=r.find(".select2-choice"),this.focusser=r.find(".select2-focusser"),t.find(".select2-chosen").attr("id","select2-chosen-"+a),this.focusser.attr("aria-labelledby","select2-chosen-"+a),this.results.attr("id","select2-results-"+a),this.search.attr("aria-owns","select2-results-"+a),this.focusser.attr("id","s2id_autogen"+a),i=e("label[for='"+this.opts.element.attr("id")+"']"),this.focusser.prev().text(i.text()).attr("for",this.focusser.attr("id"));var s=this.opts.element.attr("title");this.opts.element.attr("title",s||i.text()),this.focusser.attr("tabindex",this.elementTabIndex),this.search.attr("id",this.focusser.attr("id")+"_search"),this.search.prev().text(e("label[for='"+this.focusser.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("keydown",this.bind(function(e){if(this.isInterfaceEnabled()&&229!=e.keyCode){if(e.which===M.PAGE_UP||e.which===M.PAGE_DOWN)return void g(e);switch(e.which){case M.UP:case M.DOWN:return this.moveHighlight(e.which===M.UP?-1:1),void g(e);case M.ENTER:return this.selectHighlighted(),void g(e);case M.TAB:return void this.selectHighlighted({noFocus:!0});case M.ESC:return this.cancel(e),void g(e)}}})),this.search.on("blur",this.bind(function(e){document.activeElement===this.body.get(0)&&window.setTimeout(this.bind(function(){this.opened()&&this.search.focus()}),0)})),this.focusser.on("keydown",this.bind(function(e){if(this.isInterfaceEnabled()&&e.which!==M.TAB&&!M.isControl(e)&&!M.isFunctionKey(e)&&e.which!==M.ESC){if(!1===this.opts.openOnEnter&&e.which===M.ENTER)return void g(e);if(e.which==M.DOWN||e.which==M.UP||e.which==M.ENTER&&this.opts.openOnEnter){if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return;return this.open(),void g(e)}return e.which==M.DELETE||e.which==M.BACKSPACE?(this.opts.allowClear&&this.clear(),void g(e)):void 0}})),c(this.focusser),this.focusser.on("keyup-change input",this.bind(function(e){if(this.opts.minimumResultsForSearch>=0){if(e.stopPropagation(),this.opened())return;this.open()}})),t.on("mousedown touchstart","abbr",this.bind(function(e){this.isInterfaceEnabled()&&(this.clear(),m(e),this.close(),this.selection.focus())})),t.on("mousedown touchstart",this.bind(function(i){n(t),this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.opened()?this.close():this.isInterfaceEnabled()&&this.open(),g(i)})),o.on("mousedown touchstart",this.bind(function(){this.opts.shouldFocusInput(this)&&this.search.focus()})),t.on("focus",this.bind(function(e){g(e)})),this.focusser.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){this.opened()||(this.container.removeClass("select2-container-active"),this.opts.element.trigger(e.Event("select2-blur")))})),this.search.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.setPlaceholder()},clear:function(t){var n=this.selection.data("select2-data");if(n){var i=e.Event("select2-clearing");if(this.opts.element.trigger(i),i.isDefaultPrevented())return;var r=this.getPlaceholderOption();this.opts.element.val(r?r.val():""),this.selection.find(".select2-chosen").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),!1!==t&&(this.opts.element.trigger({type:"select2-removed",val:this.id(n),choice:n}),this.triggerChange({removed:n}))}},initSelection:function(){if(this.isPlaceholderOptionSelected())this.updateSelection(null),this.close(),this.setPlaceholder();else{var e=this;this.opts.initSelection.call(null,this.opts.element,function(n){n!==t&&null!==n&&(e.updateSelection(n),e.close(),e.setPlaceholder(),e.nextSearchTerm=e.opts.nextSearchTerm(n,e.search.val()))})}},isPlaceholderOptionSelected:function(){var e;return this.getPlaceholder()!==t&&((e=this.getPlaceholderOption())!==t&&e.prop("selected")||""===this.opts.element.val()||this.opts.element.val()===t||null===this.opts.element.val())},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments),n=this;return"select"===t.element.get(0).tagName.toLowerCase()?t.initSelection=function(e,t){var i=e.find("option").filter(function(){return this.selected&&!this.disabled});t(n.optionToData(i))}:"data"in t&&(t.initSelection=t.initSelection||function(n,i){var r=n.val(),o=null;t.query({matcher:function(e,n,i){var s=a(r,t.id(i));return s&&(o=i),s},callback:e.isFunction(i)?function(){i(o)}:e.noop})}),t},getPlaceholder:function(){return this.select&&this.getPlaceholderOption()===t?t:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var e=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&e!==t){if(this.select&&this.getPlaceholderOption()===t)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(e)),this.selection.addClass("select2-default"),this.container.removeClass("select2-allowclear")}},postprocessResults:function(e,t,n){var i=0,r=this;if(this.findHighlightableChoices().each2(function(e,t){if(a(r.id(t.data("select2-data")),r.opts.element.val()))return i=e,!1}),!1!==n&&(!0===t&&i>=0?this.highlight(i):this.highlight(0)),!0===t){var o=this.opts.minimumResultsForSearch;o>=0&&this.showSearch(E(e.results)>=o)}},showSearch:function(t){this.showSearchInput!==t&&(this.showSearchInput=t,this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!t),this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!t),e(this.dropdown,this.container).toggleClass("select2-with-searchbox",t))},onSelect:function(e,t){if(this.triggerSelect(e)){var n=this.opts.element.val(),i=this.data();this.opts.element.val(this.id(e)),this.updateSelection(e),this.opts.element.trigger({type:"select2-selected",val:this.id(e),choice:e}),this.nextSearchTerm=this.opts.nextSearchTerm(e,this.search.val()),this.close(),t&&t.noFocus||!this.opts.shouldFocusInput(this)||this.focusser.focus(),a(n,this.id(e))||this.triggerChange({added:e,removed:i})}},updateSelection:function(e){var n,i,r=this.selection.find(".select2-chosen");this.selection.data("select2-data",e),r.empty(),null!==e&&(n=this.opts.formatSelection(e,r,this.opts.escapeMarkup)),n!==t&&r.append(n),i=this.opts.formatSelectionCssClass(e,r),i!==t&&r.addClass(i),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==t&&this.container.addClass("select2-allowclear")},val:function(){var e,n=!1,i=null,r=this,o=this.data();if(0===arguments.length)return this.opts.element.val();if(e=arguments[0],arguments.length>1&&(n=arguments[1]),this.select)this.select.val(e).find("option").filter(function(){return this.selected}).each2(function(e,t){return i=r.optionToData(t),!1}),this.updateSelection(i),this.setPlaceholder(),n&&this.triggerChange({added:i,removed:o});else{if(!e&&0!==e)return void this.clear(n);if(this.opts.initSelection===t)throw new Error("cannot call val() if initSelection() is not defined");this.opts.element.val(e),this.opts.initSelection(this.opts.element,function(e){r.opts.element.val(e?r.id(e):""),r.updateSelection(e),r.setPlaceholder(),n&&r.triggerChange({added:e,removed:o})})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(e){var n,i=!1;if(0===arguments.length)return n=this.selection.data("select2-data"),n==t&&(n=null),n;arguments.length>1&&(i=arguments[1]),e?(n=this.data(),this.opts.element.val(e?this.id(e):""),this.updateSelection(e),i&&this.triggerChange({added:e,removed:n})):this.clear(i)}}),P=A(O,{createContainer:function(){return e(document.createElement("div")).attr({class:"select2-container select2-container-multi"}).html(["<ul class='select2-choices'>"," <li class='select2-search-field'>"," <label for='' class='select2-offscreen'></label>"," <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi select2-display-none'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""))},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments),n=this;return"select"===t.element.get(0).tagName.toLowerCase()?t.initSelection=function(e,t){var i=[];e.find("option").filter(function(){return this.selected&&!this.disabled}).each2(function(e,t){i.push(n.optionToData(t))}),t(i)}:"data"in t&&(t.initSelection=t.initSelection||function(n,i){var r=s(n.val(),t.separator),o=[];t.query({matcher:function(n,i,s){var l=e.grep(r,function(e){return a(e,t.id(s))}).length;return l&&o.push(s),l},callback:e.isFunction(i)?function(){for(var e=[],n=0;n<r.length;n++)for(var s=r[n],l=0;l<o.length;l++){var c=o[l];if(a(s,t.id(c))){e.push(c),o.splice(l,1);break}}i(e)}:e.noop})}),t},selectChoice:function(e){var t=this.container.find(".select2-search-choice-focus");t.length&&e&&e[0]==t[0]||(t.length&&this.opts.element.trigger("choice-deselected",t),t.removeClass("select2-search-choice-focus"),e&&e.length&&(this.close(),e.addClass("select2-search-choice-focus"),this.opts.element.trigger("choice-selected",e)))},destroy:function(){e("label[for='"+this.search.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),D.call(this,"searchContainer","selection")},initContainer:function(){var t,n=".select2-choices";this.searchContainer=this.container.find(".select2-search-field"),this.selection=t=this.container.find(n);var i=this;this.selection.on("click",".select2-search-choice:not(.select2-locked)",function(t){i.search[0].focus(),i.selectChoice(e(this))}),this.search.attr("id","s2id_autogen"+N()),this.search.prev().text(e("label[for='"+this.opts.element.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("input paste",this.bind(function(){this.search.attr("placeholder")&&0==this.search.val().length||this.isInterfaceEnabled()&&(this.opened()||this.open())})),this.search.attr("tabindex",this.elementTabIndex),this.keydowns=0,this.search.on("keydown",this.bind(function(e){if(this.isInterfaceEnabled()){++this.keydowns;var n=t.find(".select2-search-choice-focus"),i=n.prev(".select2-search-choice:not(.select2-locked)"),r=n.next(".select2-search-choice:not(.select2-locked)"),o=h(this.search);if(n.length&&(e.which==M.LEFT||e.which==M.RIGHT||e.which==M.BACKSPACE||e.which==M.DELETE||e.which==M.ENTER)){var a=n;return e.which==M.LEFT&&i.length?a=i:e.which==M.RIGHT?a=r.length?r:null:e.which===M.BACKSPACE?this.unselect(n.first())&&(this.search.width(10),a=i.length?i:r):e.which==M.DELETE?this.unselect(n.first())&&(this.search.width(10),a=r.length?r:null):e.which==M.ENTER&&(a=null),this.selectChoice(a),g(e),void(a&&a.length||this.open())}if((e.which===M.BACKSPACE&&1==this.keydowns||e.which==M.LEFT)&&0==o.offset&&!o.length)return this.selectChoice(t.find(".select2-search-choice:not(.select2-locked)").last()),void g(e);if(this.selectChoice(null),this.opened())switch(e.which){case M.UP:case M.DOWN:return this.moveHighlight(e.which===M.UP?-1:1),void g(e);case M.ENTER:return this.selectHighlighted(),void g(e);case M.TAB:return this.selectHighlighted({noFocus:!0}),void this.close();case M.ESC:return this.cancel(e),void g(e)}if(e.which!==M.TAB&&!M.isControl(e)&&!M.isFunctionKey(e)&&e.which!==M.BACKSPACE&&e.which!==M.ESC){if(e.which===M.ENTER){if(!1===this.opts.openOnEnter)return;if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return}this.open(),e.which!==M.PAGE_UP&&e.which!==M.PAGE_DOWN||g(e),e.which===M.ENTER&&g(e)}}})),this.search.on("keyup",this.bind(function(e){this.keydowns=0,this.resizeSearch()})),this.search.on("blur",this.bind(function(t){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.selectChoice(null),this.opened()||this.clearSearch(),t.stopImmediatePropagation(),this.opts.element.trigger(e.Event("select2-blur"))})),this.container.on("click",n,this.bind(function(t){this.isInterfaceEnabled()&&(e(t.target).closest(".select2-search-choice").length>0||(this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.open(),this.focusSearch(),t.preventDefault()))})),this.container.on("focus",n,this.bind(function(){
+this.isInterfaceEnabled()&&(this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop("disabled",!this.isInterfaceEnabled())},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||""!==this.opts.element.val()){var e=this;this.opts.initSelection.call(null,this.opts.element,function(n){n!==t&&null!==n&&(e.updateSelection(n),e.close(),e.clearSearch())})}},clearSearch:function(){var e=this.getPlaceholder(),n=this.getMaxSearchWidth();e!==t&&0===this.getVal().length&&!1===this.search.hasClass("select2-focused")?(this.search.val(e).addClass("select2-default"),this.search.width(n>0?n:this.container.css("width"))):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.clearPlaceholder(),this.resizeSearch(),this.parent.opening.apply(this,arguments),this.focusSearch(),""===this.search.val()&&this.nextSearchTerm!=t&&(this.search.val(this.nextSearchTerm),this.search.select()),this.updateResults(!0),this.opts.shouldFocusInput(this)&&this.search.focus(),this.opts.element.trigger(e.Event("select2-open"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(t){var n=[],i=[],o=this;e(t).each(function(){r(o.id(this),n)<0&&(n.push(o.id(this)),i.push(this))}),t=i,this.selection.find(".select2-search-choice").remove(),e(t).each(function(){o.addSelectedChoice(this)}),o.postprocessResults()},tokenize:function(){var e=this.search.val();null!=(e=this.opts.tokenizer.call(this,e,this.data(),this.bind(this.onSelect),this.opts))&&e!=t&&(this.search.val(e),e.length>0&&this.open())},onSelect:function(e,n){this.triggerSelect(e)&&""!==e.text&&(this.addSelectedChoice(e),this.opts.element.trigger({type:"selected",val:this.id(e),choice:e}),this.nextSearchTerm=this.opts.nextSearchTerm(e,this.search.val()),this.clearSearch(),this.updateResults(),!this.select&&this.opts.closeOnSelect||this.postprocessResults(e,!1,!0===this.opts.closeOnSelect),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()?this.updateResults(!0):this.nextSearchTerm!=t&&(this.search.val(this.nextSearchTerm),this.updateResults(),this.search.select()),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:e}),n&&n.noFocus||this.focusSearch())},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(n){var i,r,o=!n.locked,a=e("<li class='select2-search-choice'> <div></div> <a href='#' class='select2-search-choice-close' tabindex='-1'></a></li>"),s=e("<li class='select2-search-choice select2-locked'><div></div></li>"),l=o?a:s,c=this.id(n),u=this.getVal();i=this.opts.formatSelection(n,l.find("div"),this.opts.escapeMarkup),i!=t&&l.find("div").replaceWith("<div>"+i+"</div>"),r=this.opts.formatSelectionCssClass(n,l.find("div")),r!=t&&l.addClass(r),o&&l.find(".select2-search-choice-close").on("mousedown",g).on("click dblclick",this.bind(function(t){this.isInterfaceEnabled()&&(this.unselect(e(t.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),g(t),this.close(),this.focusSearch())})).on("focus",this.bind(function(){this.isInterfaceEnabled()&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))})),l.data("select2-data",n),l.insertBefore(this.searchContainer),u.push(c),this.setVal(u)},unselect:function(t){var n,i,o=this.getVal();if(t=t.closest(".select2-search-choice"),0===t.length)throw"Invalid argument: "+t+". Must be .select2-search-choice";if(n=t.data("select2-data")){var a=e.Event("select2-removing");if(a.val=this.id(n),a.choice=n,this.opts.element.trigger(a),a.isDefaultPrevented())return!1;for(;(i=r(this.id(n),o))>=0;)o.splice(i,1),this.setVal(o),this.select&&this.postprocessResults();return t.remove(),this.opts.element.trigger({type:"select2-removed",val:this.id(n),choice:n}),this.triggerChange({removed:n}),!0}},postprocessResults:function(e,t,n){var i=this.getVal(),o=this.results.find(".select2-result"),a=this.results.find(".select2-result-with-children"),s=this;o.each2(function(e,t){r(s.id(t.data("select2-data")),i)>=0&&(t.addClass("select2-selected"),t.find(".select2-result-selectable").addClass("select2-selected"))}),a.each2(function(e,t){t.is(".select2-result-selectable")||0!==t.find(".select2-result-selectable:not(.select2-selected)").length||t.addClass("select2-selected")}),-1==this.highlight()&&!1!==n&&s.highlight(0),!this.opts.createSearchChoice&&!o.filter(".select2-result:not(.select2-selected)").length>0&&(!e||e&&!e.more&&0===this.results.find(".select2-no-results").length)&&k(s.opts.formatNoMatches,"formatNoMatches")&&this.results.append("<li class='select2-no-results'>"+S(s.opts.formatNoMatches,s.opts.element,s.search.val())+"</li>")},getMaxSearchWidth:function(){return this.selection.width()-l(this.search)},resizeSearch:function(){var e,t,n,i,r,o=l(this.search);e=v(this.search)+10,t=this.search.offset().left,n=this.selection.width(),i=this.selection.offset().left,r=n-(t-i)-o,r<e&&(r=n-o),r<40&&(r=n-o),r<=0&&(r=e),this.search.width(Math.floor(r))},getVal:function(){var e;return this.select?(e=this.select.val(),null===e?[]:e):(e=this.opts.element.val(),s(e,this.opts.separator))},setVal:function(t){var n;this.select?this.select.val(t):(n=[],e(t).each(function(){r(this,n)<0&&n.push(this)}),this.opts.element.val(0===n.length?"":n.join(this.opts.separator)))},buildChangeDetails:function(e,t){for(var t=t.slice(0),e=e.slice(0),n=0;n<t.length;n++)for(var i=0;i<e.length;i++)a(this.opts.id(t[n]),this.opts.id(e[i]))&&(t.splice(n,1),n>0&&n--,e.splice(i,1),i--);return{added:t,removed:e}},val:function(n,i){var r,o=this;if(0===arguments.length)return this.getVal();if(r=this.data(),r.length||(r=[]),!n&&0!==n)return this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),void(i&&this.triggerChange({added:this.data(),removed:r}));if(this.setVal(n),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),i&&this.triggerChange(this.buildChangeDetails(r,this.data()));else{if(this.opts.initSelection===t)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(t){var n=e.map(t,o.id);o.setVal(n),o.updateSelection(t),o.clearSearch(),i&&o.triggerChange(o.buildChangeDetails(r,o.data()))})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var t=[],n=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){t.push(n.opts.id(e(this).data("select2-data")))}),this.setVal(t),this.triggerChange()},data:function(t,n){var i,r,o=this;if(0===arguments.length)return this.selection.children(".select2-search-choice").map(function(){return e(this).data("select2-data")}).get();r=this.data(),t||(t=[]),i=e.map(t,function(e){return o.opts.id(e)}),this.setVal(i),this.updateSelection(t),this.clearSearch(),n&&this.triggerChange(this.buildChangeDetails(r,this.data()))}}),e.fn.select2=function(){var n,i,o,a,s,l=Array.prototype.slice.call(arguments,0),c=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],u=["opened","isFocused","container","dropdown"],d=["val","data"],f={search:"externalSearch"};return this.each(function(){if(0===l.length||"object"==typeof l[0])n=0===l.length?{}:e.extend({},l[0]),n.element=e(this),"select"===n.element.get(0).tagName.toLowerCase()?s=n.element.prop("multiple"):(s=n.multiple||!1,"tags"in n&&(n.multiple=s=!0)),i=s?new window.Select2.class.multi:new window.Select2.class.single,i.init(n);else{if("string"!=typeof l[0])throw"Invalid arguments to select2 plugin: "+l;if(r(l[0],c)<0)throw"Unknown method: "+l[0];if(a=t,(i=e(this).data("select2"))===t)return;if(o=l[0],"container"===o?a=i.container:"dropdown"===o?a=i.dropdown:(f[o]&&(o=f[o]),a=i[o].apply(i,l.slice(1))),r(l[0],u)>=0||r(l[0],d)>=0&&1==l.length)return!1}}),a===t?this:a},e.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(e,t,n,i){var r=[];return y(e.text,n.term,r,i),r.join("")},formatSelection:function(e,n,i){return e?i(e.text):t},sortResults:function(e,t,n){return e},formatResultCssClass:function(e){return e.css},formatSelectionCssClass:function(e,n){return t},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(e){return e==t?null:e.id},matcher:function(e,t){return i(""+t).toUpperCase().indexOf(i(""+e).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:T,escapeMarkup:b,blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(e){return e},adaptDropdownCssClass:function(e){return null},nextSearchTerm:function(e,n){return t},searchInputPlaceholder:"",createSearchChoicePosition:"top",shouldFocusInput:function(e){return!(("ontouchstart"in window||navigator.msMaxTouchPoints>0)&&e.opts.minimumResultsForSearch<0)}},e.fn.select2.locales=[],e.fn.select2.locales.en={formatMatches:function(e){return 1===e?"One result is available, press enter to select it.":e+" results are available, use up and down arrow keys to navigate."},formatNoMatches:function(){return"No matches found"},formatAjaxError:function(e,t,n){return"Loading failed"},formatInputTooShort:function(e,t){var n=t-e.length;return"Please enter "+n+" or more character"+(1==n?"":"s")},formatInputTooLong:function(e,t){var n=e.length-t;return"Please delete "+n+" character"+(1==n?"":"s")},formatSelectionTooBig:function(e){return"You can only select "+e+" item"+(1==e?"":"s")},formatLoadMore:function(e){return"Loading more results…"},formatSearching:function(){return"Searching…"}},e.extend(e.fn.select2.defaults,e.fn.select2.locales.en),e.fn.select2.ajaxDefaults={transport:e.ajax,params:{type:"GET",cache:!1,dataType:"json"}},window.Select2={query:{ajax:w,local:x,tags:C},util:{debounce:d,markMatch:y,escapeMarkup:b,stripDiacritics:i},class:{abstract:O,single:I,multi:P}}}}(jQuery),function(){"use strict";var e={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,COMMAND:91,MAP:{91:"COMMAND",8:"BACKSPACE",9:"TAB",13:"ENTER",16:"SHIFT",17:"CTRL",18:"ALT",19:"PAUSEBREAK",20:"CAPSLOCK",27:"ESC",32:"SPACE",33:"PAGE_UP",34:"PAGE_DOWN",35:"END",36:"HOME",37:"LEFT",38:"UP",39:"RIGHT",40:"DOWN",43:"+",44:"PRINTSCREEN",45:"INSERT",46:"DELETE",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NUMLOCK",145:"SCROLLLOCK",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},isControl:function(t){switch(t.which){case e.COMMAND:case e.SHIFT:case e.CTRL:case e.ALT:return!0}return!!t.metaKey},isFunctionKey:function(e){return(e=e.which?e.which:e)>=112&&e<=123},isVerticalMovement:function(t){return~[e.UP,e.DOWN].indexOf(t)},isHorizontalMovement:function(t){return~[e.LEFT,e.RIGHT,e.BACKSPACE,e.DELETE].indexOf(t)}};void 0===angular.element.prototype.querySelectorAll&&(angular.element.prototype.querySelectorAll=function(e){return angular.element(this[0].querySelectorAll(e))}),void 0===angular.element.prototype.closest&&(angular.element.prototype.closest=function(e){for(var t=this[0],n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;t;){if(n.bind(t)(e))return t;t=t.parentElement}return!1});var t=0,n=angular.module("ui.select",[]).constant("uiSelectConfig",{theme:"bootstrap",searchEnabled:!0,sortable:!1,placeholder:"",refreshDelay:1e3,closeOnSelect:!0,generateId:function(){return t++},appendToBody:!1}).service("uiSelectMinErr",function(){var e=angular.$$minErr("ui.select");return function(){var t=e.apply(this,arguments),n=t.message.replace(new RegExp("\nhttp://errors.angularjs.org/.*"),"");return new Error(n)}}).directive("uisTranscludeAppend",function(){return{link:function(e,t,n,i,r){r(e,function(e){t.append(e)})}}}).filter("highlight",function(){function e(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(t,n){return n&&t?t.replace(new RegExp(e(n),"gi"),'<span class="ui-select-highlight">$&</span>'):t}}).factory("uisOffset",["$document","$window",function(e,t){return function(n){var i=n[0].getBoundingClientRect();return{width:i.width||n.prop("offsetWidth"),height:i.height||n.prop("offsetHeight"),top:i.top+(t.pageYOffset||e[0].documentElement.scrollTop),left:i.left+(t.pageXOffset||e[0].documentElement.scrollLeft)}}}]);n.directive("uiSelectChoices",["uiSelectConfig","uisRepeatParser","uiSelectMinErr","$compile",function(e,t,n,i){return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(t){return(t.parent().attr("theme")||e.theme)+"/choices.tpl.html"},compile:function(r,o){if(!o.repeat)throw n("repeat","Expected 'repeat' expression.");return function(r,o,a,s,l){var c=a.groupBy,u=a.groupFilter;if(s.parseRepeatAttr(a.repeat,c,u),s.disableChoiceExpression=a.uiDisableChoice,s.onHighlightCallback=a.onHighlight,c){var d=o.querySelectorAll(".ui-select-choices-group");if(1!==d.length)throw n("rows","Expected 1 .ui-select-choices-group but got '{0}'.",d.length);d.attr("ng-repeat",t.getGroupNgRepeatExpression())}var f=o.querySelectorAll(".ui-select-choices-row");if(1!==f.length)throw n("rows","Expected 1 .ui-select-choices-row but got '{0}'.",f.length);f.attr("ng-repeat",t.getNgRepeatExpression(s.parserResult.itemName,"$select.items",s.parserResult.trackByExp,c)).attr("ng-if","$select.open").attr("ng-mouseenter","$select.setActiveItem("+s.parserResult.itemName+")").attr("ng-click","$select.select("+s.parserResult.itemName+",false,$event)");var p=o.querySelectorAll(".ui-select-choices-row-inner");if(1!==p.length)throw n("rows","Expected 1 .ui-select-choices-row-inner but got '{0}'.",p.length);p.attr("uis-transclude-append",""),i(o,l)(r),r.$watch("$select.search",function(e){e&&!s.open&&s.multiple&&s.activate(!1,!0),s.activeIndex=s.tagging.isActivated?-1:0,s.refresh(a.refresh)}),a.$observe("refreshDelay",function(){var t=r.$eval(a.refreshDelay);s.refreshDelay=void 0!==t?t:e.refreshDelay})}}}}]),n.controller("uiSelectCtrl",["$scope","$element","$timeout","$filter","uisRepeatParser","uiSelectMinErr","uiSelectConfig",function(t,n,i,r,o,a,s){function l(){(f.resetSearchInput||void 0===f.resetSearchInput&&s.resetSearchInput)&&(f.search=p,f.selected&&f.items.length&&!f.multiple&&(f.activeIndex=f.items.indexOf(f.selected)))}function c(e,t){var n,i,r=[];for(n=0;n<t.length;n++)for(i=0;i<e.length;i++)e[i].name==[t[n]]&&r.push(e[i]);return r}function u(t){var n=!0;switch(t){case e.DOWN:!f.open&&f.multiple?f.activate(!1,!0):f.activeIndex<f.items.length-1&&f.activeIndex++;break;case e.UP:!f.open&&f.multiple?f.activate(!1,!0):(f.activeIndex>0||0===f.search.length&&f.tagging.isActivated&&f.activeIndex>-1)&&f.activeIndex--;break;case e.TAB:f.multiple&&!f.open||f.select(f.items[f.activeIndex],!0);break;case e.ENTER:f.open&&(f.tagging.isActivated||f.activeIndex>=0)?f.select(f.items[f.activeIndex]):f.activate(!1,!0);break;case e.ESC:f.close();break;default:n=!1}return n}function d(){var e=n.querySelectorAll(".ui-select-choices-content"),t=e.querySelectorAll(".ui-select-choices-row");if(t.length<1)throw a("choices","Expected multiple .ui-select-choices-row but got '{0}'.",t.length);if(!(f.activeIndex<0)){var i=t[f.activeIndex],r=i.offsetTop+i.clientHeight-e[0].scrollTop,o=e[0].offsetHeight;r>o?e[0].scrollTop+=r-o:r<i.clientHeight&&(f.isGrouped&&0===f.activeIndex?e[0].scrollTop=0:e[0].scrollTop-=i.clientHeight-r)}}var f=this,p="";if(f.placeholder=s.placeholder,f.searchEnabled=s.searchEnabled,f.sortable=s.sortable,f.refreshDelay=s.refreshDelay,f.removeSelected=!1,f.closeOnSelect=!0,f.search=p,f.activeIndex=0,f.items=[],f.open=!1,f.focus=!1,f.disabled=!1,f.selected=void 0,f.focusser=void 0,f.resetSearchInput=!0,f.multiple=void 0,f.disableChoiceExpression=void 0,f.tagging={isActivated:!1,fct:void 0},f.taggingTokens={isActivated:!1,tokens:void 0},f.lockChoiceExpression=void 0,f.clickTriggeredSelect=!1,f.$filter=r,f.searchInput=n.querySelectorAll("input.ui-select-search"),1!==f.searchInput.length)throw a("searchInput","Expected 1 input.ui-select-search but got '{0}'.",f.searchInput.length);f.isEmpty=function(){return angular.isUndefined(f.selected)||null===f.selected||""===f.selected},f.activate=function(e,n){f.disabled||f.open||(n||l(),t.$broadcast("uis:activate"),f.open=!0,f.activeIndex=f.activeIndex>=f.items.length?0:f.activeIndex,-1===f.activeIndex&&!1!==f.taggingLabel&&(f.activeIndex=0),i(function(){f.search=e||f.search,f.searchInput[0].focus()}))},f.findGroupByName=function(e){return f.groups&&f.groups.filter(function(t){return t.name===e})[0]},f.parseRepeatAttr=function(e,n,i){function r(e){var r=t.$eval(n);if(f.groups=[],angular.forEach(e,function(e){var t=angular.isFunction(r)?r(e):e[r],n=f.findGroupByName(t);n?n.items.push(e):f.groups.push({name:t,items:[e]})}),i){var o=t.$eval(i);angular.isFunction(o)?f.groups=o(f.groups):angular.isArray(o)&&(f.groups=c(f.groups,o))}f.items=[],f.groups.forEach(function(e){f.items=f.items.concat(e.items)})}function s(e){f.items=e}f.setItemsFn=n?r:s,f.parserResult=o.parse(e),f.isGrouped=!!n,f.itemProperty=f.parserResult.itemName,f.refreshItems=function(e){e=e||f.parserResult.source(t);var n=f.selected;if(angular.isArray(n)&&!n.length||!f.removeSelected)f.setItemsFn(e);else if(void 0!==e){var i=e.filter(function(e){return n.indexOf(e)<0});f.setItemsFn(i)}},t.$watchCollection(f.parserResult.source,function(e){if(void 0===e||null===e)f.items=[];else{if(!angular.isArray(e))throw a("items","Expected an array but got '{0}'.",e);f.refreshItems(e),f.ngModel.$modelValue=null}})};var h;f.refresh=function(e){void 0!==e&&(h&&i.cancel(h),h=i(function(){t.$eval(e)},f.refreshDelay))},f.setActiveItem=function(e){f.activeIndex=f.items.indexOf(e)},f.isActive=function(e){if(!f.open)return!1;var t=f.items.indexOf(e[f.itemProperty]),n=t===f.activeIndex;return!(!n||t<0&&!1!==f.taggingLabel||t<0&&!1===f.taggingLabel)&&(n&&!angular.isUndefined(f.onHighlightCallback)&&e.$eval(f.onHighlightCallback),n)},f.isDisabled=function(e){if(f.open){var t,n=f.items.indexOf(e[f.itemProperty]),i=!1;return n>=0&&!angular.isUndefined(f.disableChoiceExpression)&&(t=f.items[n],i=!!e.$eval(f.disableChoiceExpression),t._uiSelectChoiceDisabled=i),i}},f.select=function(e,n,r){if(void 0===e||!e._uiSelectChoiceDisabled){if(!f.items&&!f.search)return;if(!e||!e._uiSelectChoiceDisabled){if(f.tagging.isActivated){if(!1===f.taggingLabel)if(f.activeIndex<0){if(!(e=void 0!==f.tagging.fct?f.tagging.fct(f.search):f.search)||angular.equals(f.items[0],e))return}else e=f.items[f.activeIndex];else if(0===f.activeIndex){if(void 0===e)return;if(void 0!==f.tagging.fct&&"string"==typeof e){if(!(e=f.tagging.fct(f.search)))return}else"string"==typeof e&&(e=e.replace(f.taggingLabel,"").trim())}if(f.selected&&angular.isArray(f.selected)&&f.selected.filter(function(t){return angular.equals(t,e)}).length>0)return void f.close(n)}t.$broadcast("uis:select",e);var o={};o[f.parserResult.itemName]=e,i(function(){f.onSelectCallback(t,{$item:e,$model:f.parserResult.modelMapper(t,o)})}),f.closeOnSelect&&f.close(n),r&&"click"===r.type&&(f.clickTriggeredSelect=!0)}}},f.close=function(e){f.open&&(f.ngModel&&f.ngModel.$setTouched&&f.ngModel.$setTouched(),l(),f.open=!1,t.$broadcast("uis:close",e))},f.setFocus=function(){f.focus||f.focusInput[0].focus()},f.clear=function(e){f.select(void 0),e.stopPropagation(),i(function(){f.focusser[0].focus()},0,!1)},f.toggle=function(e){f.open?(f.close(),e.preventDefault(),e.stopPropagation()):f.activate()},f.isLocked=function(e,t){var n,i=f.selected[t];return i&&!angular.isUndefined(f.lockChoiceExpression)&&(n=!!e.$eval(f.lockChoiceExpression),i._uiSelectChoiceLocked=n),n};var g=null;f.sizeSearchInput=function(){var e=f.searchInput[0],n=f.searchInput.parent().parent()[0],r=function(){return n.clientWidth*!!e.offsetParent},o=function(t){if(0===t)return!1;var n=t-e.offsetLeft-10;return n<50&&(n=t),f.searchInput.css("width",n+"px"),!0};f.searchInput.css("width","10px"),i(function(){null!==g||o(r())||(g=t.$watch(r,function(e){o(e)&&(g(),g=null)}))})},f.searchInput.on("keydown",function(n){var r=n.which;t.$apply(function(){var t=!1;if((f.items.length>0||f.tagging.isActivated)&&(u(r),f.taggingTokens.isActivated)){for(var o=0;o<f.taggingTokens.tokens.length;o++)f.taggingTokens.tokens[o]===e.MAP[n.keyCode]&&f.search.length>0&&(t=!0);t&&i(function(){f.searchInput.triggerHandler("tagged");var t=f.search.replace(e.MAP[n.keyCode],"").trim();f.tagging.fct&&(t=f.tagging.fct(t)),t&&f.select(t,!0)})}}),e.isVerticalMovement(r)&&f.items.length>0&&d(),r!==e.ENTER&&r!==e.ESC||(n.preventDefault(),n.stopPropagation())}),f.searchInput.on("paste",function(e){var t=e.originalEvent.clipboardData.getData("text/plain");if(t&&t.length>0&&f.taggingTokens.isActivated&&f.tagging.fct){var n=t.split(f.taggingTokens.tokens[0]);n&&n.length>0&&(angular.forEach(n,function(e){var t=f.tagging.fct(e);t&&f.select(t,!0)}),e.preventDefault(),e.stopPropagation())}}),f.searchInput.on("tagged",function(){i(function(){l()})}),t.$on("$destroy",function(){f.searchInput.off("keyup keydown tagged blur paste")})}]),n.directive("uiSelect",["$document","uiSelectConfig","uiSelectMinErr","uisOffset","$compile","$parse","$timeout",function(e,t,n,i,r,o,a){return{restrict:"EA",templateUrl:function(e,n){return(n.theme||t.theme)+(angular.isDefined(n.multiple)?"/select-multiple.tpl.html":"/select.tpl.html")},replace:!0,transclude:!0,require:["uiSelect","^ngModel"],scope:!0,controller:"uiSelectCtrl",controllerAs:"$select",compile:function(r,s){return angular.isDefined(s.multiple)?r.append("<ui-select-multiple/>").removeAttr("multiple"):r.append("<ui-select-single/>"),function(r,s,l,c,u){function d(e){if(h.open){if(!(window.jQuery?window.jQuery.contains(s[0],e.target):s[0].contains(e.target))&&!h.clickTriggeredSelect){var t=["input","button","textarea"],n=angular.element(e.target).scope(),i=n&&n.$select&&n.$select!==h;i||(i=~t.indexOf(e.target.tagName.toLowerCase())),h.close(i),r.$digest()}h.clickTriggeredSelect=!1}}function f(){var t=i(s);v=angular.element('<div class="ui-select-placeholder"></div>'),v[0].style.width=t.width+"px",v[0].style.height=t.height+"px",s.after(v),$=s[0].style.width,e.find("body").append(s),s[0].style.position="absolute",s[0].style.left=t.left+"px",s[0].style.top=t.top+"px",s[0].style.width=t.width+"px"}function p(){null!==v&&(v.replaceWith(s),v=null,s[0].style.position="",s[0].style.left="",s[0].style.top="",s[0].style.width=$)}var h=c[0],g=c[1];h.generatedId=t.generateId(),h.baseTitle=l.title||"Select box",h.focusserTitle=h.baseTitle+" focus",h.focusserId="focusser-"+h.generatedId,h.closeOnSelect=function(){return angular.isDefined(l.closeOnSelect)?o(l.closeOnSelect)():t.closeOnSelect}(),h.onSelectCallback=o(l.onSelect),h.onRemoveCallback=o(l.onRemove),h.ngModel=g,h.choiceGrouped=function(e){return h.isGrouped&&e&&e.name},l.tabindex&&l.$observe("tabindex",function(e){h.focusInput.attr("tabindex",e),s.removeAttr("tabindex")}),r.$watch("searchEnabled",function(){var e=r.$eval(l.searchEnabled);h.searchEnabled=void 0!==e?e:t.searchEnabled}),r.$watch("sortable",function(){var e=r.$eval(l.sortable);h.sortable=void 0!==e?e:t.sortable}),l.$observe("disabled",function(){h.disabled=void 0!==l.disabled&&l.disabled}),l.$observe("resetSearchInput",function(){var e=r.$eval(l.resetSearchInput);h.resetSearchInput=void 0===e||e}),l.$observe("tagging",function(){if(void 0!==l.tagging){var e=r.$eval(l.tagging);h.tagging={isActivated:!0,fct:!0!==e?e:void 0}}else h.tagging={isActivated:!1,fct:void 0}}),l.$observe("taggingLabel",function(){void 0!==l.tagging&&("false"===l.taggingLabel?h.taggingLabel=!1:h.taggingLabel=void 0!==l.taggingLabel?l.taggingLabel:"(new)")}),l.$observe("taggingTokens",function(){if(void 0!==l.tagging){var e=void 0!==l.taggingTokens?l.taggingTokens.split("|"):[",","ENTER"];h.taggingTokens={isActivated:!0,tokens:e}}}),angular.isDefined(l.autofocus)&&a(function(){h.setFocus()}),angular.isDefined(l.focusOn)&&r.$on(l.focusOn,function(){a(function(){h.setFocus()})}),e.on("click",d),r.$on("$destroy",function(){e.off("click",d)}),u(r,function(e){var t=angular.element("<div>").append(e),i=t.querySelectorAll(".ui-select-match");if(i.removeAttr("ui-select-match"),i.removeAttr("data-ui-select-match"),1!==i.length)throw n("transcluded","Expected 1 .ui-select-match but got '{0}'.",i.length);s.querySelectorAll(".ui-select-match").replaceWith(i);var r=t.querySelectorAll(".ui-select-choices");if(r.removeAttr("ui-select-choices"),r.removeAttr("data-ui-select-choices"),1!==r.length)throw n("transcluded","Expected 1 .ui-select-choices but got '{0}'.",r.length);s.querySelectorAll(".ui-select-choices").replaceWith(r)});var m=r.$eval(l.appendToBody);(void 0!==m?m:t.appendToBody)&&(r.$watch("$select.open",function(e){e?f():p()}),r.$on("$destroy",function(){p()}));var v=null,$="",y=null;r.$watch("$select.open",function(t){if(t){if(null===(y=angular.element(s).querySelectorAll(".ui-select-dropdown")))return;y[0].style.opacity=0,a(function(){var t=i(s),n=i(y);t.top+t.height+n.height>e[0].documentElement.scrollTop+e[0].documentElement.clientHeight&&(y[0].style.position="absolute",y[0].style.top=-1*n.height+"px",s.addClass("direction-up")),y[0].style.opacity=1})}else{if(null===y)return;y[0].style.position="",y[0].style.top="",s.removeClass("direction-up")}})}}}}]),n.directive("uiSelectMatch",["uiSelectConfig",function(e){return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(t){return(t.parent().attr("theme")||e.theme)+(t.parent().attr("multiple")?"/match-multiple.tpl.html":"/match.tpl.html")},link:function(t,n,i,r){function o(e){r.allowClear=!!angular.isDefined(e)&&(""===e||"true"===e.toLowerCase())}r.lockChoiceExpression=i.uiLockChoice,i.$observe("placeholder",function(t){r.placeholder=void 0!==t?t:e.placeholder}),i.$observe("allowClear",o),o(i.allowClear),r.multiple&&r.sizeSearchInput()}}}]),n.directive("uiSelectMultiple",["uiSelectMinErr","$timeout",function(t,n){return{restrict:"EA",require:["^uiSelect","^ngModel"],controller:["$scope","$timeout",function(e,t){var n,i=this,r=e.$select;e.$evalAsync(function(){n=e.ngModel}),i.activeMatchIndex=-1,i.updateModel=function(){n.$setViewValue(Date.now()),i.refreshComponent()},i.refreshComponent=function(){r.refreshItems(),r.sizeSearchInput()},i.removeChoice=function(n){var o=r.selected[n];if(!o._uiSelectChoiceLocked){var a={};a[r.parserResult.itemName]=o,r.selected.splice(n,1),i.activeMatchIndex=-1,r.sizeSearchInput(),t(function(){r.onRemoveCallback(e,{$item:o,$model:r.parserResult.modelMapper(e,a)})}),i.updateModel()}},i.getPlaceholder=function(){if(!r.selected.length)return r.placeholder}}],controllerAs:"$selectMultiple",link:function(i,r,o,a){function s(e){return angular.isNumber(e.selectionStart)?e.selectionStart:e.value.length}function l(t){var n=s(d.searchInput[0]),i=d.selected.length,r=i-1,o=p.activeMatchIndex,a=p.activeMatchIndex+1,l=p.activeMatchIndex-1,c=o;return!(n>0||d.search.length&&t==e.RIGHT)&&(d.close(),c=function(){switch(t){case e.LEFT:return~p.activeMatchIndex?l:r;case e.RIGHT:return~p.activeMatchIndex&&o!==r?a:(d.activate(),!1);case e.BACKSPACE:return~p.activeMatchIndex?(p.removeChoice(o),l):r;case e.DELETE:return!!~p.activeMatchIndex&&(p.removeChoice(p.activeMatchIndex),o)}}(),d.selected.length&&!1!==c?p.activeMatchIndex=Math.min(r,Math.max(0,c)):p.activeMatchIndex=-1,!0)}function c(e){return void 0!==e&&void 0!==d.search&&e.filter(function(e){return void 0!==d.search.toUpperCase()&&void 0!==e&&e.toUpperCase()===d.search.toUpperCase()}).length>0}function u(e,t){var n=-1;if(angular.isArray(e))for(var i=angular.copy(e),r=0;r<i.length;r++)if(void 0===d.tagging.fct)i[r]+" "+d.taggingLabel===t&&(n=r);else{var o=i[r];o.isTag=!0,angular.equals(o,t)&&(n=r)}return n}var d=a[0],f=i.ngModel=a[1],p=i.$selectMultiple;d.multiple=!0,d.removeSelected=!0,d.focusInput=d.searchInput,f.$parsers.unshift(function(){for(var e,t={},n=[],r=d.selected.length-1;r>=0;r--)t={},t[d.parserResult.itemName]=d.selected[r],e=d.parserResult.modelMapper(i,t),n.unshift(e);return n}),f.$formatters.unshift(function(e){var t,n=d.parserResult.source(i,{$select:{search:""}}),r={};if(!n)return e;var o=[],a=function(e,n){if(e&&e.length){for(var a=e.length-1;a>=0;a--){if(r[d.parserResult.itemName]=e[a],t=d.parserResult.modelMapper(i,r),d.parserResult.trackByExp){var s=/\.(.+)/.exec(d.parserResult.trackByExp);if(s.length>0&&t[s[1]]==n[s[1]])return o.unshift(e[a]),!0}if(angular.equals(t,n))return o.unshift(e[a]),!0}return!1}};if(!e)return o;for(var s=e.length-1;s>=0;s--)a(d.selected,e[s])||a(n,e[s])||o.unshift(e[s]);return o}),i.$watchCollection(function(){return f.$modelValue},function(e,t){t!=e&&(f.$modelValue=null,p.refreshComponent())}),f.$render=function(){if(!angular.isArray(f.$viewValue)){if(!angular.isUndefined(f.$viewValue)&&null!==f.$viewValue)throw t("multiarr","Expected model value to be array but got '{0}'",f.$viewValue);d.selected=[]}d.selected=f.$viewValue,i.$evalAsync()},i.$on("uis:select",function(e,t){d.selected.push(t),p.updateModel()}),i.$on("uis:activate",function(){p.activeMatchIndex=-1}),i.$watch("$select.disabled",function(e,t){t&&!e&&d.sizeSearchInput()}),d.searchInput.on("keydown",function(t){var n=t.which;i.$apply(function(){var i=!1;e.isHorizontalMovement(n)&&(i=l(n)),i&&n!=e.TAB&&(t.preventDefault(),t.stopPropagation())})}),d.searchInput.on("keyup",function(t){if(e.isVerticalMovement(t.which)||i.$evalAsync(function(){d.activeIndex=!1===d.taggingLabel?-1:0}),d.tagging.isActivated&&d.search.length>0){if(t.which===e.TAB||e.isControl(t)||e.isFunctionKey(t)||t.which===e.ESC||e.isVerticalMovement(t.which))return;if(d.activeIndex=!1===d.taggingLabel?-1:0,!1===d.taggingLabel)return;var n,r,o,a,s=angular.copy(d.items),l=angular.copy(d.items),f=!1,p=-1;if(void 0!==d.tagging.fct){if(o=d.$filter("filter")(s,{isTag:!0}),o.length>0&&(a=o[0]),s.length>0&&a&&(f=!0,s=s.slice(1,s.length),l=l.slice(1,l.length)),n=d.tagging.fct(d.search),n.isTag=!0,l.filter(function(e){return angular.equals(e,d.tagging.fct(d.search))}).length>0)return;n.isTag=!0}else{if(o=d.$filter("filter")(s,function(e){return e.match(d.taggingLabel)}),o.length>0&&(a=o[0]),r=s[0],void 0!==r&&s.length>0&&a&&(f=!0,s=s.slice(1,s.length),l=l.slice(1,l.length)),n=d.search+" "+d.taggingLabel,u(d.selected,d.search)>-1)return;if(c(l.concat(d.selected)))return void(f&&(s=l,i.$evalAsync(function(){d.activeIndex=0,d.items=s})))
+;if(c(l))return void(f&&(d.items=l.slice(1,l.length)))}f&&(p=u(d.selected,n)),p>-1?s=s.slice(p+1,s.length-1):(s=[],s.push(n),s=s.concat(l)),i.$evalAsync(function(){d.activeIndex=0,d.items=s})}}),d.searchInput.on("blur",function(){n(function(){p.activeMatchIndex=-1})})}}}]),n.directive("uiSelectSingle",["$timeout","$compile",function(t,n){return{restrict:"EA",require:["^uiSelect","^ngModel"],link:function(i,r,o,a){var s=a[0],l=a[1];l.$parsers.unshift(function(e){var t={};return t[s.parserResult.itemName]=e,s.parserResult.modelMapper(i,t)}),l.$formatters.unshift(function(e){var t,n=s.parserResult.source(i,{$select:{search:""}}),r={};if(n){var o=function(n){return r[s.parserResult.itemName]=n,(t=s.parserResult.modelMapper(i,r))==e};if(s.selected&&o(s.selected))return s.selected;for(var a=n.length-1;a>=0;a--)if(o(n[a]))return n[a]}return e}),i.$watch("$select.selected",function(e){l.$viewValue!==e&&l.$setViewValue(e)}),l.$render=function(){s.selected=l.$viewValue},i.$on("uis:select",function(e,t){s.selected=t}),i.$on("uis:close",function(e,n){t(function(){s.focusser.prop("disabled",!1),n||s.focusser[0].focus()},0,!1)}),i.$on("uis:activate",function(){c.prop("disabled",!0)});var c=angular.element("<input ng-disabled='$select.disabled' class='ui-select-focusser ui-select-offscreen' type='text' id='{{ $select.focusserId }}' aria-label='{{ $select.focusserTitle }}' aria-haspopup='true' role='button' />");n(c)(i),s.focusser=c,s.focusInput=c,r.parent().append(c),c.bind("focus",function(){i.$evalAsync(function(){s.focus=!0})}),c.bind("blur",function(){i.$evalAsync(function(){s.focus=!1})}),c.bind("keydown",function(t){if(t.which===e.BACKSPACE)return t.preventDefault(),t.stopPropagation(),s.select(void 0),void i.$apply();t.which===e.TAB||e.isControl(t)||e.isFunctionKey(t)||t.which===e.ESC||(t.which!=e.DOWN&&t.which!=e.UP&&t.which!=e.ENTER&&t.which!=e.SPACE||(t.preventDefault(),t.stopPropagation(),s.activate()),i.$digest())}),c.bind("keyup input",function(t){t.which===e.TAB||e.isControl(t)||e.isFunctionKey(t)||t.which===e.ESC||t.which==e.ENTER||t.which===e.BACKSPACE||(s.activate(c.val()),c.val(""),i.$digest())})}}}]),n.directive("uiSelectSort",["$timeout","uiSelectConfig","uiSelectMinErr",function(e,t,n){return{require:"^uiSelect",link:function(t,i,r,o){if(null===t[r.uiSelectSort])throw n("sort","Expected a list to sort");var a=angular.extend({axis:"horizontal"},t.$eval(r.uiSelectSortOptions)),s=a.axis;t.$watch(function(){return o.sortable},function(e){e?i.attr("draggable",!0):i.removeAttr("draggable")}),i.on("dragstart",function(e){i.addClass("dragging"),(e.dataTransfer||e.originalEvent.dataTransfer).setData("text/plain",t.$index)}),i.on("dragend",function(){i.removeClass("dragging")});var l,c=function(e,t){this.splice(t,0,this.splice(e,1)[0])},u=function(e){e.preventDefault(),("vertical"===s?e.offsetY||e.layerY||(e.originalEvent?e.originalEvent.offsetY:0):e.offsetX||e.layerX||(e.originalEvent?e.originalEvent.offsetX:0))<this["vertical"===s?"offsetHeight":"offsetWidth"]/2?(i.removeClass("dropping-after"),i.addClass("dropping-before")):(i.removeClass("dropping-before"),i.addClass("dropping-after"))},d=function(t){t.preventDefault();var n=parseInt((t.dataTransfer||t.originalEvent.dataTransfer).getData("text/plain"),10);e.cancel(l),l=e(function(){f(n)},20)},f=function(e){var n=t.$eval(r.uiSelectSort),o=n[e],a=null;a=i.hasClass("dropping-before")?e<t.$index?t.$index-1:t.$index:e<t.$index?t.$index:t.$index+1,c.apply(n,[e,a]),t.$apply(function(){t.$emit("uiSelectSort:change",{array:n,item:o,from:e,to:a})}),i.removeClass("dropping"),i.removeClass("dropping-before"),i.removeClass("dropping-after"),i.off("drop",d)};i.on("dragenter",function(){i.hasClass("dragging")||(i.addClass("dropping"),i.on("dragover",u),i.on("drop",d))}),i.on("dragleave",function(e){e.target==i&&(i.removeClass("dropping"),i.removeClass("dropping-before"),i.removeClass("dropping-after"),i.off("dragover",u),i.off("drop",d))})}}}]),n.service("uisRepeatParser",["uiSelectMinErr","$parse",function(e,t){var n=this;n.parse=function(n){var i=n.match(/^\s*(?:([\s\S]+?)\s+as\s+)?([\S]+?)\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!i)throw e("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",n);return{itemName:i[2],source:t(i[3]),trackByExp:i[4],modelMapper:t(i[1]||i[2])}},n.getGroupNgRepeatExpression=function(){return"$group in $select.groups"},n.getNgRepeatExpression=function(e,t,n,i){var r=e+" in "+(i?"$group.items":t);return n&&(r+=" track by "+n),r}}])}(),angular.module("ui.select").run(["$templateCache",function(e){e.put("bootstrap/choices.tpl.html",'<ul class="ui-select-choices ui-select-choices-content ui-select-dropdown dropdown-menu" role="listbox" ng-show="$select.items.length > 0"><li class="ui-select-choices-group" id="ui-select-choices-{{ $select.generatedId }}"><div class="divider" ng-show="$select.isGrouped && $index > 0"></div><div ng-show="$select.isGrouped" class="ui-select-choices-group-label dropdown-header" ng-bind="$group.name"></div><div id="ui-select-choices-row-{{ $select.generatedId }}-{{$index}}" class="ui-select-choices-row" ng-class="{active: $select.isActive(this), disabled: $select.isDisabled(this)}" role="option"><a href="javascript:void(0)" class="ui-select-choices-row-inner"></a></div></li></ul>'),e.put("bootstrap/match-multiple.tpl.html",'<span class="ui-select-match"><span ng-repeat="$item in $select.selected"><span class="ui-select-match-item btn btn-default btn-xs" tabindex="-1" type="button" ng-disabled="$select.disabled" ng-click="$selectMultiple.activeMatchIndex = $index;" ng-class="{\'btn-primary\':$selectMultiple.activeMatchIndex === $index, \'select-locked\':$select.isLocked(this, $index)}" ui-select-sort="$select.selected"><span class="close ui-select-match-close" ng-hide="$select.disabled" ng-click="$selectMultiple.removeChoice($index)">&nbsp;&times;</span> <span uis-transclude-append=""></span></span></span></span>'),e.put("bootstrap/match.tpl.html",'<div class="ui-select-match" ng-hide="$select.open" ng-disabled="$select.disabled" ng-class="{\'btn-default-focus\':$select.focus}"><span tabindex="-1" class="btn btn-default form-control ui-select-toggle" aria-label="{{ $select.baseTitle }} activate" ng-disabled="$select.disabled" ng-click="$select.activate()" style="outline: 0;"><span ng-show="$select.isEmpty()" class="ui-select-placeholder text-muted">{{$select.placeholder}}</span> <span ng-hide="$select.isEmpty()" class="ui-select-match-text pull-left" ng-class="{\'ui-select-allow-clear\': $select.allowClear && !$select.isEmpty()}" ng-transclude=""></span> <i class="caret pull-right" ng-click="$select.toggle($event)"></i> <a ng-show="$select.allowClear && !$select.isEmpty()" aria-label="{{ $select.baseTitle }} clear" style="margin-right: 10px" ng-click="$select.clear($event)" class="btn btn-xs btn-link pull-right"><i class="glyphicon glyphicon-remove" aria-hidden="true"></i></a></span></div>'),e.put("bootstrap/select-multiple.tpl.html",'<div class="ui-select-container ui-select-multiple ui-select-bootstrap dropdown form-control" ng-class="{open: $select.open}"><div><div class="ui-select-match"></div><input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" class="ui-select-search input-xs" placeholder="{{$selectMultiple.getPlaceholder()}}" ng-disabled="$select.disabled" ng-hide="$select.disabled" ng-click="$select.activate()" ng-model="$select.search" role="combobox" aria-label="{{ $select.baseTitle }}" ondrop="return false;"></div><div class="ui-select-choices"></div></div>'),e.put("bootstrap/select.tpl.html",'<div class="ui-select-container ui-select-bootstrap dropdown" ng-class="{open: $select.open}"><div class="ui-select-match"></div><input type="text" autocomplete="off" tabindex="-1" aria-expanded="true" aria-label="{{ $select.baseTitle }}" aria-owns="ui-select-choices-{{ $select.generatedId }}" aria-activedescendant="ui-select-choices-row-{{ $select.generatedId }}-{{ $select.activeIndex }}" class="form-control ui-select-search" placeholder="{{$select.placeholder}}" ng-model="$select.search" ng-show="$select.searchEnabled && $select.open"><div class="ui-select-choices"></div></div>'),e.put("select2/choices.tpl.html",'<ul class="ui-select-choices ui-select-choices-content select2-results"><li class="ui-select-choices-group" ng-class="{\'select2-result-with-children\': $select.choiceGrouped($group) }"><div ng-show="$select.choiceGrouped($group)" class="ui-select-choices-group-label select2-result-label" ng-bind="$group.name"></div><ul role="listbox" id="ui-select-choices-{{ $select.generatedId }}" ng-class="{\'select2-result-sub\': $select.choiceGrouped($group), \'select2-result-single\': !$select.choiceGrouped($group) }"><li role="option" id="ui-select-choices-row-{{ $select.generatedId }}-{{$index}}" class="ui-select-choices-row" ng-class="{\'select2-highlighted\': $select.isActive(this), \'select2-disabled\': $select.isDisabled(this)}"><div class="select2-result-label ui-select-choices-row-inner"></div></li></ul></li></ul>'),e.put("select2/match-multiple.tpl.html",'<span class="ui-select-match"><li class="ui-select-match-item select2-search-choice" ng-repeat="$item in $select.selected" ng-class="{\'select2-search-choice-focus\':$selectMultiple.activeMatchIndex === $index, \'select2-locked\':$select.isLocked(this, $index)}" ui-select-sort="$select.selected"><span uis-transclude-append=""></span> <a href="javascript:;" class="ui-select-match-close select2-search-choice-close" ng-click="$selectMultiple.removeChoice($index)" tabindex="-1"></a></li></span>'),e.put("select2/match.tpl.html",'<a class="select2-choice ui-select-match" ng-class="{\'select2-default\': $select.isEmpty()}" ng-click="$select.toggle($event)" aria-label="{{ $select.baseTitle }} select"><span ng-show="$select.isEmpty()" class="select2-chosen">{{$select.placeholder}}</span> <span ng-hide="$select.isEmpty()" class="select2-chosen" ng-transclude=""></span> <abbr ng-if="$select.allowClear && !$select.isEmpty()" class="select2-search-choice-close" ng-click="$select.clear($event)"></abbr> <span class="select2-arrow ui-select-toggle"><b></b></span></a>'),e.put("select2/select-multiple.tpl.html",'<div class="ui-select-container ui-select-multiple select2 select2-container select2-container-multi" ng-class="{\'select2-container-active select2-dropdown-open open\': $select.open, \'select2-container-disabled\': $select.disabled}"><ul class="select2-choices"><span class="ui-select-match"></span><li class="select2-search-field"><input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="combobox" aria-expanded="true" aria-owns="ui-select-choices-{{ $select.generatedId }}" aria-label="{{ $select.baseTitle }}" aria-activedescendant="ui-select-choices-row-{{ $select.generatedId }}-{{ $select.activeIndex }}" class="select2-input ui-select-search" placeholder="{{$selectMultiple.getPlaceholder()}}" ng-disabled="$select.disabled" ng-hide="$select.disabled" ng-model="$select.search" ng-click="$select.activate()" style="width: 34px;" ondrop="return false;"></li></ul><div class="ui-select-dropdown select2-drop select2-with-searchbox select2-drop-active" ng-class="{\'select2-display-none\': !$select.open}"><div class="ui-select-choices"></div></div></div>'),e.put("select2/select.tpl.html",'<div class="ui-select-container select2 select2-container" ng-class="{\'select2-container-active select2-dropdown-open open\': $select.open, \'select2-container-disabled\': $select.disabled, \'select2-container-active\': $select.focus, \'select2-allowclear\': $select.allowClear && !$select.isEmpty()}"><div class="ui-select-match"></div><div class="ui-select-dropdown select2-drop select2-with-searchbox select2-drop-active" ng-class="{\'select2-display-none\': !$select.open}"><div class="select2-search" ng-show="$select.searchEnabled"><input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="combobox" aria-expanded="true" aria-owns="ui-select-choices-{{ $select.generatedId }}" aria-label="{{ $select.baseTitle }}" aria-activedescendant="ui-select-choices-row-{{ $select.generatedId }}-{{ $select.activeIndex }}" class="ui-select-search select2-input" ng-model="$select.search"></div><div class="ui-select-choices"></div></div></div>'),e.put("selectize/choices.tpl.html",'<div ng-show="$select.open" class="ui-select-choices ui-select-dropdown selectize-dropdown single"><div class="ui-select-choices-content selectize-dropdown-content"><div class="ui-select-choices-group optgroup" role="listbox"><div ng-show="$select.isGrouped" class="ui-select-choices-group-label optgroup-header" ng-bind="$group.name"></div><div role="option" class="ui-select-choices-row" ng-class="{active: $select.isActive(this), disabled: $select.isDisabled(this)}"><div class="option ui-select-choices-row-inner" data-selectable=""></div></div></div></div></div>'),e.put("selectize/match.tpl.html",'<div ng-hide="($select.open || $select.isEmpty())" class="ui-select-match" ng-transclude=""></div>'),e.put("selectize/select.tpl.html",'<div class="ui-select-container selectize-control single" ng-class="{\'open\': $select.open}"><div class="selectize-input" ng-class="{\'focus\': $select.open, \'disabled\': $select.disabled, \'selectize-focus\' : $select.focus}" ng-click="$select.activate()"><div class="ui-select-match"></div><input type="text" autocomplete="off" tabindex="-1" class="ui-select-search ui-select-toggle" ng-click="$select.toggle($event)" placeholder="{{$select.placeholder}}" ng-model="$select.search" ng-hide="!$select.searchEnabled || ($select.selected && !$select.open)" ng-disabled="$select.disabled" aria-label="{{ $select.baseTitle }}"></div><div class="ui-select-choices"></div></div>')}]),require.modules={},require.aliases={},require.resolve=function(e){"/"===e.charAt(0)&&(e=e.slice(1));for(var t=[e,e+".js",e+".json",e+"/index.js",e+"/index.json"],n=0;n<t.length;n++){var e=t[n];if(require.modules.hasOwnProperty(e))return e;if(require.aliases.hasOwnProperty(e))return require.aliases[e]}},require.normalize=function(e,t){var n=[];if("."!=t.charAt(0))return t;e=e.split("/"),t=t.split("/");for(var i=0;i<t.length;++i)".."==t[i]?e.pop():"."!=t[i]&&""!=t[i]&&n.push(t[i]);return e.concat(n).join("/")},require.register=function(e,t){require.modules[e]=t},require.alias=function(e,t){if(!require.modules.hasOwnProperty(e))throw new Error('Failed to alias "'+e+'", it does not exist');require.aliases[t]=e},require.relative=function(e){function t(e,t){for(var n=e.length;n--;)if(e[n]===t)return n;return-1}function n(t){return require(n.resolve(t),e,t)}var i=require.normalize(e,"..");return n.resolve=function(n){var r=n.charAt(0);if("/"==r)return n.slice(1);if("."==r)return require.normalize(i,n);var o=e.split("/"),a=t(o,"deps")+1;return a||(a=0),n=o.slice(0,a+1).join("/")+"/deps/"+n},n.exists=function(e){return require.modules.hasOwnProperty(n.resolve(e))},n},require.register("switchery/switchery.js",function(e,t,n){function i(e,t){if(!(this instanceof i))return new i(t);this.element=e,this.options=t||{};for(var n in r)n in this.options||(this.options[n]=r[n]);"checkbox"==this.element.type&&this.init()}n.exports=i;var r={color:"#64bd63",className:"switchery",disabled:!1,speed:"0.1s"};i.prototype.hide=function(){this.element.style.display="none"},i.prototype.show=function(){var e=this.create();this.element.parentNode.appendChild(e)},i.prototype.create=function(){return this.switcher=document.createElement("span"),this.jack=document.createElement("small"),this.switcher.appendChild(this.jack),this.switcher.className=this.options.className,this.switcher},i.prototype.isChecked=function(){return this.element.checked},i.prototype.isDisabled=function(){return this.options.disabled||this.element.disabled},i.prototype.setPosition=function(e){var t=this.isChecked(),n=this.switcher,i=this.jack;e&&t?t=!1:e&&!t&&(t=!0),!0===t?(this.element.checked=!0,window.getComputedStyle?i.style.left=parseInt(window.getComputedStyle(n).width)-i.offsetWidth+"px":i.style.left=parseInt(n.currentStyle.width)-i.offsetWidth+"px",this.options.color&&this.colorize()):(i.style.left="0",this.element.checked=!1,this.switcher.style.backgroundColor="",this.switcher.style.borderColor="")},i.prototype.setSpeed=function(){this.switcher.style.transitionDuration=this.options.speed,this.jack.style.transitionDuration=this.options.speed},i.prototype.setAttributes=function(){var e=this.element.getAttribute("id"),t=this.element.getAttribute("name");e&&this.switcher.setAttribute("id",e),t&&this.switcher.setAttribute("name",t)},i.prototype.colorize=function(){this.switcher.style.backgroundColor=this.options.color,this.switcher.style.borderColor=this.options.color},i.prototype.handleClick=function(){var e=this,t=this.switcher;!1===this.isDisabled()?t.addEventListener?t.addEventListener("click",function(){e.setPosition(!0)}):t.attachEvent("onclick",function(){e.setPosition(!0)}):this.element.disabled=!0},i.prototype.init=function(){this.hide(),this.show(),this.setSpeed(),this.setPosition(),this.setAttributes(),this.handleClick()}}),require.alias("switchery/switchery.js","switchery/index.js"),!function(){function e(t){var n=e.modules[t];if(!n)throw new Error('failed to require "'+t+'"');return"exports"in n||"function"!=typeof n.definition||(n.client=n.component=!0,n.definition.call(this,n.exports={},n),delete n.definition),n.exports}e.loader="component",e.helper={},e.helper.semVerSort=function(e,t){for(var n=e.version.split("."),i=t.version.split("."),r=0;r<n.length;++r){var o=parseInt(n[r],10),a=parseInt(i[r],10);if(o!==a)return o>a?1:-1;var s=n[r].substr((""+o).length),l=i[r].substr((""+a).length);if(""===s&&""!==l)return 1;if(""!==s&&""===l)return-1;if(""!==s&&""!==l)return s>l?1:-1}return 0},e.latest=function(t,n){function i(e){throw new Error('failed to find latest module of "'+e+'"')}var r=/(.*)~(.*)@v?(\d+\.\d+\.\d+[^\/]*)$/;/(.*)~(.*)/.test(t)||i(t);for(var o=Object.keys(e.modules),a=[],s=[],l=0;l<o.length;l++){var c=o[l];if(new RegExp(t+"@").test(c)){var u=c.substr(t.length+1);null!=r.exec(c)?a.push({version:u,name:c}):s.push({version:u,name:c})}}if(0===a.concat(s).length&&i(t),a.length>0){var d=a.sort(e.helper.semVerSort).pop().name;return!0===n?d:e(d)}var d=s.sort(function(e,t){return e.name>t.name})[0].name;return!0===n?d:e(d)},e.modules={},e.register=function(t,n){e.modules[t]={definition:n}},e.define=function(t,n){e.modules[t]={exports:n}},e.register("abpetkov~transitionize@0.0.3",function(e,t){function n(e,t){return this instanceof n?(this.element=e,this.props=t||{},void this.init()):new n(e,t)}t.exports=n,n.prototype.isSafari=function(){return/Safari/.test(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor)},n.prototype.init=function(){var e=[];for(var t in this.props)e.push(t+" "+this.props[t]);this.element.style.transition=e.join(", "),this.isSafari()&&(this.element.style.webkitTransition=e.join(", "))}}),e.register("ftlabs~fastclick@v0.6.11",function(e,t){function n(e){"use strict";var t,i=this;if(this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=10,this.layer=e,!e||!e.nodeType)throw new TypeError("Layer must be a document node");this.onClick=function(){return n.prototype.onClick.apply(i,arguments)},this.onMouse=function(){return n.prototype.onMouse.apply(i,arguments)},this.onTouchStart=function(){return n.prototype.onTouchStart.apply(i,arguments)},this.onTouchMove=function(){return n.prototype.onTouchMove.apply(i,arguments)},this.onTouchEnd=function(){return n.prototype.onTouchEnd.apply(i,arguments)},this.onTouchCancel=function(){return n.prototype.onTouchCancel.apply(i,arguments)},n.notNeeded(e)||(this.deviceIsAndroid&&(e.addEventListener("mouseover",this.onMouse,!0),e.addEventListener("mousedown",this.onMouse,!0),e.addEventListener("mouseup",this.onMouse,!0)),e.addEventListener("click",this.onClick,!0),e.addEventListener("touchstart",this.onTouchStart,!1),e.addEventListener("touchmove",this.onTouchMove,!1),e.addEventListener("touchend",this.onTouchEnd,!1),e.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(e.removeEventListener=function(t,n,i){var r=Node.prototype.removeEventListener;"click"===t?r.call(e,t,n.hijacked||n,i):r.call(e,t,n,i)},e.addEventListener=function(t,n,i){var r=Node.prototype.addEventListener;"click"===t?r.call(e,t,n.hijacked||(n.hijacked=function(e){e.propagationStopped||n(e)}),i):r.call(e,t,n,i)}),"function"==typeof e.onclick&&(t=e.onclick,e.addEventListener("click",function(e){t(e)},!1),e.onclick=null))}n.prototype.deviceIsAndroid=navigator.userAgent.indexOf("Android")>0,n.prototype.deviceIsIOS=/iP(ad|hone|od)/.test(navigator.userAgent),n.prototype.deviceIsIOS4=n.prototype.deviceIsIOS&&/OS 4_\d(_\d)?/.test(navigator.userAgent),n.prototype.deviceIsIOSWithBadTarget=n.prototype.deviceIsIOS&&/OS ([6-9]|\d{2})_\d/.test(navigator.userAgent),n.prototype.needsClick=function(e){"use strict";switch(e.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(e.disabled)return!0;break;case"input":if(this.deviceIsIOS&&"file"===e.type||e.disabled)return!0;break;case"label":case"video":return!0}return/\bneedsclick\b/.test(e.className)},n.prototype.needsFocus=function(e){"use strict";switch(e.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!this.deviceIsAndroid;case"input":switch(e.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!e.disabled&&!e.readOnly;default:return/\bneedsfocus\b/.test(e.className)}},n.prototype.sendClick=function(e,t){"use strict";var n,i;document.activeElement&&document.activeElement!==e&&document.activeElement.blur(),i=t.changedTouches[0],n=document.createEvent("MouseEvents"),n.initMouseEvent(this.determineEventType(e),!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),n.forwardedTouchEvent=!0,e.dispatchEvent(n)},n.prototype.determineEventType=function(e){"use strict";return this.deviceIsAndroid&&"select"===e.tagName.toLowerCase()?"mousedown":"click"},n.prototype.focus=function(e){"use strict";var t;this.deviceIsIOS&&e.setSelectionRange&&0!==e.type.indexOf("date")&&"time"!==e.type?(t=e.value.length,e.setSelectionRange(t,t)):e.focus()},n.prototype.updateScrollParent=function(e){"use strict";var t,n;if(!(t=e.fastClickScrollParent)||!t.contains(e)){n=e;do{if(n.scrollHeight>n.offsetHeight){t=n,e.fastClickScrollParent=n;break}n=n.parentElement}while(n)}t&&(t.fastClickLastScrollTop=t.scrollTop)},n.prototype.getTargetElementFromEventTarget=function(e){"use strict";return e.nodeType===Node.TEXT_NODE?e.parentNode:e},n.prototype.onTouchStart=function(e){"use strict";var t,n,i;if(e.targetTouches.length>1)return!0;if(t=this.getTargetElementFromEventTarget(e.target),n=e.targetTouches[0],this.deviceIsIOS){if(i=window.getSelection(),i.rangeCount&&!i.isCollapsed)return!0;if(!this.deviceIsIOS4){if(n.identifier===this.lastTouchIdentifier)return e.preventDefault(),!1;this.lastTouchIdentifier=n.identifier,this.updateScrollParent(t)}}return this.trackingClick=!0,this.trackingClickStart=e.timeStamp,this.targetElement=t,this.touchStartX=n.pageX,this.touchStartY=n.pageY,e.timeStamp-this.lastClickTime<200&&e.preventDefault(),!0},n.prototype.touchHasMoved=function(e){"use strict";var t=e.changedTouches[0],n=this.touchBoundary;return Math.abs(t.pageX-this.touchStartX)>n||Math.abs(t.pageY-this.touchStartY)>n},n.prototype.onTouchMove=function(e){"use strict";return!this.trackingClick||((this.targetElement!==this.getTargetElementFromEventTarget(e.target)||this.touchHasMoved(e))&&(this.trackingClick=!1,this.targetElement=null),!0)},n.prototype.findControl=function(e){"use strict";return void 0!==e.control?e.control:e.htmlFor?document.getElementById(e.htmlFor):e.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},n.prototype.onTouchEnd=function(e){"use strict";var t,n,i,r,o,a=this.targetElement;if(!this.trackingClick)return!0;if(e.timeStamp-this.lastClickTime<200)return this.cancelNextClick=!0,!0;if(this.cancelNextClick=!1,this.lastClickTime=e.timeStamp,n=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,this.deviceIsIOSWithBadTarget&&(o=e.changedTouches[0],a=document.elementFromPoint(o.pageX-window.pageXOffset,o.pageY-window.pageYOffset)||a,a.fastClickScrollParent=this.targetElement.fastClickScrollParent),"label"===(i=a.tagName.toLowerCase())){if(t=this.findControl(a)){if(this.focus(a),this.deviceIsAndroid)return!1;a=t}}else if(this.needsFocus(a))return e.timeStamp-n>100||this.deviceIsIOS&&window.top!==window&&"input"===i?(this.targetElement=null,!1):(this.focus(a),this.deviceIsIOS4&&"select"===i||(this.targetElement=null,e.preventDefault()),!1);return!(!this.deviceIsIOS||this.deviceIsIOS4||!(r=a.fastClickScrollParent)||r.fastClickLastScrollTop===r.scrollTop)||(this.needsClick(a)||(e.preventDefault(),this.sendClick(a,e)),!1)},n.prototype.onTouchCancel=function(){"use strict";this.trackingClick=!1,this.targetElement=null},n.prototype.onMouse=function(e){"use strict";return!this.targetElement||(!!e.forwardedTouchEvent||(!(e.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick))||(e.stopImmediatePropagation?e.stopImmediatePropagation():e.propagationStopped=!0,e.stopPropagation(),e.preventDefault(),!1)))},n.prototype.onClick=function(e){"use strict";var t;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===e.target.type&&0===e.detail||(t=this.onMouse(e),t||(this.targetElement=null),t)},n.prototype.destroy=function(){"use strict";var e=this.layer;this.deviceIsAndroid&&(e.removeEventListener("mouseover",this.onMouse,!0),e.removeEventListener("mousedown",this.onMouse,!0),e.removeEventListener("mouseup",this.onMouse,!0)),e.removeEventListener("click",this.onClick,!0),e.removeEventListener("touchstart",this.onTouchStart,!1),e.removeEventListener("touchmove",this.onTouchMove,!1),e.removeEventListener("touchend",this.onTouchEnd,!1),e.removeEventListener("touchcancel",this.onTouchCancel,!1)},n.notNeeded=function(e){"use strict";var t,i;if(void 0===window.ontouchstart)return!0;if(i=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!n.prototype.deviceIsAndroid)return!0;if(t=document.querySelector("meta[name=viewport]")){if(-1!==t.content.indexOf("user-scalable=no"))return!0;if(i>31&&window.innerWidth<=window.screen.width)return!0}}return"none"===e.style.msTouchAction},n.attach=function(e){"use strict";return new n(e)},"undefined"!=typeof define&&define.amd?define(function(){"use strict";return n}):void 0!==t&&t.exports?(t.exports=n.attach,t.exports.FastClick=n):window.FastClick=n}),e.register("component~indexof@0.0.3",function(e,t){t.exports=function(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0;n<e.length;++n)if(e[n]===t)return n;return-1}}),e.register("component~classes@1.2.1",function(t,n){function i(e){if(!e)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}var r=e("component~indexof@0.0.3"),o=/\s+/,a=Object.prototype.toString;n.exports=function(e){return new i(e)},i.prototype.add=function(e){if(this.list)return this.list.add(e),this;var t=this.array();return~r(t,e)||t.push(e),this.el.className=t.join(" "),this},i.prototype.remove=function(e){if("[object RegExp]"==a.call(e))return this.removeMatching(e);if(this.list)return this.list.remove(e),this;var t=this.array(),n=r(t,e);return~n&&t.splice(n,1),this.el.className=t.join(" "),this},i.prototype.removeMatching=function(e){for(var t=this.array(),n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},i.prototype.toggle=function(e,t){return this.list?(void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this):(void 0!==t?t?this.add(e):this.remove(e):this.has(e)?this.remove(e):this.add(e),this)},i.prototype.array=function(){var e=this.el.className.replace(/^\s+|\s+$/g,""),t=e.split(o);return""===t[0]&&t.shift(),t},i.prototype.has=i.prototype.contains=function(e){return this.list?this.list.contains(e):!!~r(this.array(),e)}}),e.register("component~event@0.1.4",function(e,t){var n=window.addEventListener?"addEventListener":"attachEvent",i=window.removeEventListener?"removeEventListener":"detachEvent",r="addEventListener"!==n?"on":"";e.bind=function(e,t,i,o){return e[n](r+t,i,o||!1),i},e.unbind=function(e,t,n,o){return e[i](r+t,n,o||!1),n}}),e.register("component~query@0.0.3",function(e,t){function n(e,t){return t.querySelector(e)}e=t.exports=function(e,t){return t=t||document,n(e,t)},e.all=function(e,t){return t=t||document,t.querySelectorAll(e)},e.engine=function(t){if(!t.one)throw new Error(".one callback required");if(!t.all)throw new Error(".all callback required");return n=t.one,e.all=t.all,e}}),e.register("component~matches-selector@0.1.5",function(t,n){function i(e,t){if(!e||1!==e.nodeType)return!1;if(a)return a.call(e,t);for(var n=r.all(t,e.parentNode),i=0;i<n.length;++i)if(n[i]==e)return!0;return!1}var r=e("component~query@0.0.3"),o=Element.prototype,a=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.msMatchesSelector||o.oMatchesSelector;n.exports=i}),e.register("component~closest@0.1.4",function(t,n){var i=e("component~matches-selector@0.1.5");n.exports=function(e,t,n,r){for(e=n?{parentNode:e}:e,r=r||document;(e=e.parentNode)&&e!==document;){if(i(e,t))return e;if(e===r)return}}}),e.register("component~delegate@0.2.3",function(t,n){var i=e("component~closest@0.1.4"),r=e("component~event@0.1.4");t.bind=function(e,t,n,o,a){return r.bind(e,n,function(n){var r=n.target||n.srcElement;n.delegateTarget=i(r,t,!0,e),n.delegateTarget&&o.call(e,n)},a)},t.unbind=function(e,t,n,i){r.unbind(e,t,n,i)}}),e.register("component~events@1.0.9",function(t,n){function i(e,t){if(!(this instanceof i))return new i(e,t);if(!e)throw new Error("element required");if(!t)throw new Error("object required");this.el=e,this.obj=t,this._events={}}function r(e){var t=e.split(/ +/);return{name:t.shift(),selector:t.join(" ")}}var o=e("component~event@0.1.4"),a=e("component~delegate@0.2.3");n.exports=i,i.prototype.sub=function(e,t,n){this._events[e]=this._events[e]||{},this._events[e][t]=n},i.prototype.bind=function(e,t){function n(){var e=[].slice.call(arguments).concat(u);l[t].apply(l,e)}var i=r(e),s=this.el,l=this.obj,c=i.name,t=t||"on"+c,u=[].slice.call(arguments,2);return i.selector?n=a.bind(s,i.selector,c,n):o.bind(s,c,n),this.sub(c,t,n),n},i.prototype.unbind=function(e,t){if(0==arguments.length)return this.unbindAll();if(1==arguments.length)return this.unbindAllOf(e);var n=this._events[e];if(n){var i=n[t];i&&o.unbind(this.el,e,i)}},i.prototype.unbindAll=function(){for(var e in this._events)this.unbindAllOf(e)},i.prototype.unbindAllOf=function(e){var t=this._events[e];if(t)for(var n in t)this.unbind(e,n)}}),e.register("switchery",function(t,n){function i(e,t){if(!(this instanceof i))return new i(e,t);this.element=e,this.options=t||{};for(var n in l)null==this.options[n]&&(this.options[n]=l[n]);null!=this.element&&"checkbox"==this.element.type&&this.init(),!0===this.isDisabled()&&this.disable()}var r=e("abpetkov~transitionize@0.0.3"),o=e("ftlabs~fastclick@v0.6.11"),a=e("component~classes@1.2.1"),s=e("component~events@1.0.9");n.exports=i;var l={color:"#64bd63",secondaryColor:"#dfdfdf",jackColor:"#fff",jackSecondaryColor:null,className:"switchery",disabled:!1,disabledOpacity:.5,speed:"0.4s",size:"default"};i.prototype.hide=function(){this.element.style.display="none"},i.prototype.show=function(){var e=this.create();this.insertAfter(this.element,e)},i.prototype.create=function(){return this.switcher=document.createElement("span"),this.jack=document.createElement("small"),this.switcher.appendChild(this.jack),this.switcher.className=this.options.className,this.events=s(this.switcher,this),this.switcher},i.prototype.insertAfter=function(e,t){
+e.parentNode.insertBefore(t,e.nextSibling)},i.prototype.setPosition=function(e){var t=this.isChecked(),n=this.switcher,i=this.jack;e&&t?t=!1:e&&!t&&(t=!0),!0===t?(this.element.checked=!0,i.style.left=window.getComputedStyle?parseInt(window.getComputedStyle(n).width)-parseInt(window.getComputedStyle(i).width)+"px":parseInt(n.currentStyle.width)-parseInt(i.currentStyle.width)+"px",this.options.color&&this.colorize(),this.setSpeed()):(i.style.left=0,this.element.checked=!1,this.switcher.style.boxShadow="inset 0 0 0 0 "+this.options.secondaryColor,this.switcher.style.borderColor=this.options.secondaryColor,this.switcher.style.backgroundColor=this.options.secondaryColor!==l.secondaryColor?this.options.secondaryColor:"#fff",this.jack.style.backgroundColor=this.options.jackSecondaryColor!==this.options.jackColor?this.options.jackSecondaryColor:this.options.jackColor,this.setSpeed())},i.prototype.setSpeed=function(){var e={},t={"background-color":this.options.speed,left:this.options.speed.replace(/[a-z]/,"")/2+"s"};e=this.isChecked()?{border:this.options.speed,"box-shadow":this.options.speed,"background-color":3*this.options.speed.replace(/[a-z]/,"")+"s"}:{border:this.options.speed,"box-shadow":this.options.speed},r(this.switcher,e),r(this.jack,t)},i.prototype.setSize=function(){switch(this.options.size){case"small":a(this.switcher).add("switchery-small");break;case"large":a(this.switcher).add("switchery-large");break;default:a(this.switcher).add("switchery-default")}},i.prototype.colorize=function(){var e=this.switcher.offsetHeight/2;this.switcher.style.backgroundColor=this.options.color,this.switcher.style.borderColor=this.options.color,this.switcher.style.boxShadow="inset 0 0 0 "+e+"px "+this.options.color,this.jack.style.backgroundColor=this.options.jackColor},i.prototype.handleOnchange=function(e){if(document.dispatchEvent){var t=document.createEvent("HTMLEvents");t.initEvent("change",!0,!0),this.element.dispatchEvent(t)}else this.element.fireEvent("onchange")},i.prototype.handleChange=function(){var e=this,t=this.element;t.addEventListener?t.addEventListener("change",function(){e.setPosition()}):t.attachEvent("onchange",function(){e.setPosition()})},i.prototype.handleClick=function(){var e=this.switcher;o(e),this.events.bind("click","bindClick")},i.prototype.bindClick=function(){var e=this.element.parentNode.tagName.toLowerCase(),t="label"!==e;this.setPosition(t),this.handleOnchange(this.element.checked)},i.prototype.markAsSwitched=function(){this.element.setAttribute("data-switchery",!0)},i.prototype.markedAsSwitched=function(){return this.element.getAttribute("data-switchery")},i.prototype.init=function(){this.hide(),this.show(),this.setSize(),this.setPosition(),this.markAsSwitched(),this.handleChange(),this.handleClick()},i.prototype.isChecked=function(){return this.element.checked},i.prototype.isDisabled=function(){return this.options.disabled||this.element.disabled||this.element.readOnly},i.prototype.destroy=function(){this.events.unbind()},i.prototype.enable=function(){this.options.disabled&&(this.options.disabled=!1),this.element.disabled&&(this.element.disabled=!1),this.element.readOnly&&(this.element.readOnly=!1),this.switcher.style.opacity=1,this.events.bind("click","bindClick")},i.prototype.disable=function(){this.options.disabled||(this.options.disabled=!0),this.element.disabled||(this.element.disabled=!0),this.element.readOnly||(this.element.readOnly=!0),this.switcher.style.opacity=this.options.disabledOpacity,this.destroy()}}),"object"==typeof exports?module.exports=e("switchery"):"function"==typeof define&&define.amd?define("Switchery",[],function(){return e("switchery")}):(this||window).Switchery=e("switchery")}(),angular.module("NgSwitchery",[]).directive("uiSwitch",["$window","$timeout","$log","$parse",function(e,t,n,i){function r(n,r,o,a){function s(){t(function(){c&&angular.element(c.switcher).remove(),c=new e.Switchery(r[0],l);var t=c.element;t.checked=n.initValue,c.setPosition(!1),t.addEventListener("change",function(e){n.$apply(function(){a.$setViewValue(t.checked)})})},0)}if(!a)return!1;var l={};try{l=i(o.uiSwitch)(n)}catch(e){}var c,u;o.$observe("disabled",function(e){void 0!=e&&e!=u&&(u=e,s())}),s()}return{require:"ngModel",restrict:"AE",scope:{initValue:"=ngModel"},link:r}}]),function(){function e(e){return["$rootScope","$window",function(t,n){for(var i,r,o,a=n[e]||(console.warn("This browser does not support Web Storage!"),{}),s={$default:function(e){for(var t in e)angular.isDefined(s[t])||(s[t]=e[t]);return s},$reset:function(e){for(var t in s)"$"===t[0]||delete s[t];return s.$default(e)}},l=0;l<a.length;l++)(o=a.key(l))&&"ngStorage-"===o.slice(0,10)&&(s[o.slice(10)]=angular.fromJson(a.getItem(o)));return i=angular.copy(s),t.$watch(function(){r||(r=setTimeout(function(){if(r=null,!angular.equals(s,i)){angular.forEach(s,function(e,t){angular.isDefined(e)&&"$"!==t[0]&&a.setItem("ngStorage-"+t,angular.toJson(e)),delete i[t]});for(var e in i)a.removeItem("ngStorage-"+e);i=angular.copy(s)}},100))}),"localStorage"===e&&n.addEventListener&&n.addEventListener("storage",function(e){"ngStorage-"===e.key.slice(0,10)&&(e.newValue?s[e.key.slice(10)]=angular.fromJson(e.newValue):delete s[e.key.slice(10)],i=angular.copy(s),t.$apply())}),s}]}angular.module("ngStorage",[]).factory("$localStorage",e("localStorage")).factory("$sessionStorage",e("sessionStorage"))}(); \ No newline at end of file
diff --git a/moon_gui/package.json b/moon_gui/package.json
index cfb51078..599452e4 100644
--- a/moon_gui/package.json
+++ b/moon_gui/package.json
@@ -18,7 +18,7 @@
"angular-motion": "0.3.4",
"angular-resource": "1.3.0",
"angular-route": "1.3.0",
- "angular-strap": "2.1.2",
+ "angular-strap": "2.3.8",
"angular-translate": "2.4.1",
"angular-translate-loader-static-files": "2.7.0",
"angular-translate-storage-cookie": "2.7.0",
diff --git a/moon_gui/static/app/common/header/header.tpl.html b/moon_gui/static/app/common/header/header.tpl.html
index f703fa79..7c7633d1 100755
--- a/moon_gui/static/app/common/header/header.tpl.html
+++ b/moon_gui/static/app/common/header/header.tpl.html
@@ -40,10 +40,10 @@
<div class="row" ng-if="connected">
<ul class="nav nav-tabs">
- <li ng-class="{active: header.isProjectTabActive()}"><a ui-sref="moon.project.list" data-translate="moon.menu.project">Projects</a></li>
<li ng-class="{active: header.isModelTabActive()}"><a ui-sref="moon.model.list" data-translate="moon.menu.model">Models</a></li>
<li ng-class="{active: header.isPolicyTabActive()}"><a ui-sref="moon.policy.list" data-translate="moon.menu.policy">Policy</a></li>
<li ng-class="{active: header.isPDPTabActive()}"><a ui-sref="moon.pdp.list" data-translate="moon.menu.pdp">PDP</a></li>
+ <li ng-class="{active: header.isProjectTabActive()}"><a ui-sref="moon.project.list" data-translate="moon.menu.project">Projects</a></li>
<!--<li ng-class="{active: header.isLogsTabActive()}"><a ui-sref="moon.logs" data-translate="moon.menu.logs">Logs</a></li>-->
</ul>
diff --git a/moon_gui/static/app/model/edit/metadata/metadata.edit.dir.js b/moon_gui/static/app/model/edit/metadata/metadata.edit.dir.js
index 10df83b0..ab79b5db 100755
--- a/moon_gui/static/app/model/edit/metadata/metadata.edit.dir.js
+++ b/moon_gui/static/app/model/edit/metadata/metadata.edit.dir.js
@@ -42,8 +42,6 @@
edit.fromList = true;
- edit.laoading = false;
-
edit.form = {};
edit.metaData = { name: null, description: null};
@@ -106,7 +104,7 @@
}
- var metaRuleToSend = edit.metaRule;
+ var metaRuleToSend = angular.copy(edit.metaRule);
switch(edit.metaDataType){
@@ -138,7 +136,9 @@
metaRuleToSend = utilService.transformOne(data, 'meta_rules');
- $scope.$emit('event:updateMetaRuleFromMetaDataAddSuccess', metaRuleToSend);
+ angular.copy(metaRuleToSend, edit.metaRule)
+
+ $scope.$emit('event:updateMetaRuleFromMetaDataAddSuccess', edit.metaRule);
stopLoading();
@@ -278,7 +278,7 @@
metaRuleService.findOneWithMetaData(edit.metaRule.id).then( function(metaRule){
- edit.metaRule = metaRule;
+ angular.copy(metaRule, edit.metaRule)
cleanSelectedValue();
diff --git a/moon_gui/static/app/model/edit/metadata/metadata.list.dir.js b/moon_gui/static/app/model/edit/metadata/metadata.list.dir.js
index beb2ed86..305192b6 100755
--- a/moon_gui/static/app/model/edit/metadata/metadata.list.dir.js
+++ b/moon_gui/static/app/model/edit/metadata/metadata.list.dir.js
@@ -19,7 +19,7 @@
metaRule: '=',
editMode: '=',
// shortDisplay : boolean value
- shortDisplay: '='
+ //shortDisplay: '='
},
restrict : 'E',
replace : true
@@ -80,7 +80,6 @@
$scope.$on('$destroy', rootListeners[unbind]);
}
-
function manageSubjectCategories(){
list.loadingCatSub = true;
@@ -140,7 +139,8 @@
alertService.alertSuccess(translatedValue);
});
- list.metaRule = metaRuleService.findMetaDataFromMetaRule(utilService.transformOne(data, 'meta_rules'));
+ metaRuleToSend = metaRuleService.findMetaDataFromMetaRule(utilService.transformOne(data, 'meta_rules'));
+ angular.copy(metaRuleToSend, list.metaRule);
activate();
@@ -176,7 +176,8 @@
alertService.alertSuccess(translatedValue);
});
- list.metaRule = metaRuleService.findMetaDataFromMetaRule(utilService.transformOne(data, 'meta_rules'));
+ metaRuleToSend = metaRuleService.findMetaDataFromMetaRule(utilService.transformOne(data, 'meta_rules'));
+ angular.copy(metaRuleToSend, list.metaRule);
activate();
@@ -212,7 +213,8 @@
alertService.alertSuccess(translatedValue);
});
- list.metaRule = metaRuleService.findMetaDataFromMetaRule(utilService.transformOne(data, 'meta_rules'));
+ metaRuleToSend = metaRuleService.findMetaDataFromMetaRule(utilService.transformOne(data, 'meta_rules'));
+ angular.copy(metaRuleToSend, list.metaRule);
activate();
diff --git a/moon_gui/static/app/model/edit/metarules/action/metarules.controller.edit.js b/moon_gui/static/app/model/edit/metarules/action/metarules.controller.edit.js
index b2ebc45d..de6965d0 100755
--- a/moon_gui/static/app/model/edit/metarules/action/metarules.controller.edit.js
+++ b/moon_gui/static/app/model/edit/metarules/action/metarules.controller.edit.js
@@ -40,7 +40,7 @@
*/
function metaRuleUpdatedSuccess(event, metaRule){
- edit.metaRule = metaRule;
+ angular.copy(metaRule, edit.metaRule);
}
diff --git a/moon_gui/static/app/model/edit/metarules/action/metarules.edit.basic.dir.js b/moon_gui/static/app/model/edit/metarules/action/metarules.edit.basic.dir.js
index 603e7a33..b9dcd19c 100755
--- a/moon_gui/static/app/model/edit/metarules/action/metarules.edit.basic.dir.js
+++ b/moon_gui/static/app/model/edit/metarules/action/metarules.edit.basic.dir.js
@@ -67,13 +67,15 @@
var updatedMetaRule = utilService.transformOne(data, 'meta_rules');
+ angular.copy(updatedMetaRule, edit.metaRule);
+
$translate('moon.model.metarules.edit.basic.success', { metaRuleName: updatedMetaRule.name }).then( function(translatedValue) {
alertService.alertSuccess(translatedValue);
});
edit.loading = false;
- $scope.$emit('event:metaRuleBasicUpdatedSuccess', updatedMetaRule);
+ $scope.$emit('event:metaRuleBasicUpdatedSuccess', edit.metaRule);
}
diff --git a/moon_gui/static/app/model/edit/metarules/metarules.list.dir.js b/moon_gui/static/app/model/edit/metarules/metarules.list.dir.js
index 120b6a8b..9c1bc72e 100755
--- a/moon_gui/static/app/model/edit/metarules/metarules.list.dir.js
+++ b/moon_gui/static/app/model/edit/metarules/metarules.list.dir.js
@@ -86,7 +86,8 @@
'event:metaRuleMapToModelSuccess': $rootScope.$on('event:metaRuleMapToModelSuccess', updateModelFromMapSuccess),
'event:metaRuleUnMappedToModelSuccess': $rootScope.$on('event:metaRuleUnMappedToModelSuccess', modelUnmappedSuccess),
- 'event:metaRuleUnMappedToModelError': $rootScope.$on('event:metaRuleUnMappedToModelError', modelUnmappedError)
+ 'event:metaRuleUnMappedToModelError': $rootScope.$on('event:metaRuleUnMappedToModelError', modelUnmappedError),
+
};
diff --git a/moon_gui/static/app/moon.module.js b/moon_gui/static/app/moon.module.js
index a653f8f3..cc374f24 100755
--- a/moon_gui/static/app/moon.module.js
+++ b/moon_gui/static/app/moon.module.js
@@ -68,8 +68,8 @@
* routes
*/
- $urlRouterProvider.when('', '/project');
- $urlRouterProvider.when('/', '/project');
+ $urlRouterProvider.when('', '/model');
+ $urlRouterProvider.when('/', '/model');
$urlRouterProvider.otherwise('/404');
configureDefaultRoutes($stateProvider);
diff --git a/moon_gui/static/app/policy/edit/parameter/data/data-edit.tpl.html b/moon_gui/static/app/policy/edit/parameter/data/data-edit.tpl.html
index 3f11a641..fae647e3 100755
--- a/moon_gui/static/app/policy/edit/parameter/data/data-edit.tpl.html
+++ b/moon_gui/static/app/policy/edit/parameter/data/data-edit.tpl.html
@@ -36,33 +36,6 @@
</div>
<div class="form-group"
- ng-class="{'has-error': edit.form.policyList.$invalid && edit.form.policyList.$dirty}">
-
- <label for="policyList" class="col-sm-3 control-label" data-translate="moon.policy.data.edit.policies">Policy
- List </label>
-
- <div class="col-sm-6">
-
- <ui-select ng-model="edit.selectedPolicy" name="policyList" id="policyList" required>
-
- <ui-select-match placeholder="(None)" ng-bind="$select.selected.name"></ui-select-match>
- <ui-select-choices repeat="aPolicy in edit.policyList">
- <div ng-value="aPolicy" ng-bind="aPolicy.name"></div>
- </ui-select-choices>
-
- </ui-select>
-
- <div class="help-block" ng-show="edit.form.policyList.$dirty && edit.form.policyList.$invalid">
- <small class="error" ng-show="edit.form.policyList.$error.required"
- data-translate="moon.policy.data.edit.check.policy.required">Policy is required
- </small>
- </div>
-
- </div>
-
- </div>
-
- <div class="form-group"
ng-class="{'has-error': edit.form.categoryList.$invalid && edit.form.categoryList.$dirty}">
<label for="categoryList" class="col-sm-3 control-label"
diff --git a/moon_gui/static/app/policy/edit/parameter/data/data.edit.dir.js b/moon_gui/static/app/policy/edit/parameter/data/data.edit.dir.js
index 57ad0c9b..2ae08177 100755
--- a/moon_gui/static/app/policy/edit/parameter/data/data.edit.dir.js
+++ b/moon_gui/static/app/policy/edit/parameter/data/data.edit.dir.js
@@ -31,10 +31,10 @@
.controller('moonDataEditController', moonDataEditController);
moonDataEditController.$inject = ['$scope', 'dataService', 'DATA_CST', 'alertService', '$translate',
- 'formService', 'policyService', 'utilService', 'metaDataService'];
+ 'formService', 'policyService', 'utilService', 'metaDataService', 'modelService', 'metaRuleService'];
function moonDataEditController($scope, dataService, DATA_CST, alertService, $translate,
- formService, policyService, utilService, metaDataService) {
+ formService, policyService, utilService, metaDataService, modelService, metaRuleService) {
var edit = this;
@@ -50,7 +50,6 @@
edit.data = { name: null, description: null};
edit.list = [];
- edit.policyList = [];
edit.categoriesToBeSelected = [];
edit.create = createData;
@@ -64,7 +63,6 @@
function activate(){
loadAllCategories();
- loadAllPolicies();
switch(edit.dataType){
@@ -105,58 +103,54 @@
}
- function loadAllCategories(){
-
- switch(edit.dataType){
-
- case DATA_CST.TYPE.SUBJECT:
-
- metaDataService.subject.findAllWithCallback(callBackList);
- break;
-
- case DATA_CST.TYPE.OBJECT:
-
- metaDataService.object.findAllWithCallback(callBackList);
- break;
-
- case DATA_CST.TYPE.ACTION:
-
- metaDataService.action.findAllWithCallback(callBackList);
- break;
-
- default :
-
- edit.categoriesToBeSelected = [];
- break;
-
- }
-
- function callBackList(list){
-
- edit.categoriesToBeSelected = list;
-
- }
- }
- function loadAllPolicies() {
-
- edit.policyList = [];
-
- policyService.findAllWithCallback( function(data) {
-
- _.each(data, function(element){
+ function loadAllCategories(){
- if(element.id === edit.policy.id){
- edit.selectedPolicy = element;
+ modelService.findOneWithCallback(edit.policy.model_id, function(model){
+
+ metaRuleService.findSomeWithCallback(model.meta_rules, function(metaRules){
+
+ switch(edit.dataType){
+
+ case DATA_CST.TYPE.SUBJECT:
+ var subjectCategoryList = _.reduce(metaRules, function(result, metaRule) {
+ return result.concat(metaRule.subject_categories);
+ }, [])
+ metaDataService.subject.findSomeWithCallback(subjectCategoryList, callBackList);
+ break;
+
+ case DATA_CST.TYPE.OBJECT:
+ var objectCategoryList = _.reduce(metaRules, function(result, metaRule) {
+ return result.concat(metaRule.object_categories);
+ }, [])
+ metaDataService.object.findSomeWithCallback(objectCategoryList, callBackList);
+ break;
+
+ case DATA_CST.TYPE.ACTION:
+ var actionCategoryList = _.reduce(metaRules, function(result, metaRule) {
+ return result.concat(metaRule.action_categories);
+ }, [])
+ metaDataService.action.findSomeWithCallback(actionCategoryList, callBackList);
+ break;
+
+ default :
+
+ edit.categoriesToBeSelected = [];
+ break;
+
+ }
+
+ function callBackList(list){
+
+ edit.categoriesToBeSelected = list;
+
}
-
});
- edit.policyList = data;
-
});
- }
+
+ }
/**
* Create
@@ -200,26 +194,30 @@
function createSuccess(data) {
var created = {};
+ var name = '';
switch(edit.dataType){
case DATA_CST.TYPE.SUBJECT:
created = utilService.transformOne(data['subject_data'], 'data');
+ name = created.name;
break;
case DATA_CST.TYPE.OBJECT:
created = utilService.transformOne(data['object_data'], 'data');
+ name = created.value.name;
break;
case DATA_CST.TYPE.ACTION:
created = utilService.transformOne(data['action_data'], 'data');
+ name = created.value.name;
break;
}
- $translate('moon.policy.data.edit.create.success', { name: created.name }).then(function (translatedValue) {
+ $translate('moon.policy.data.edit.create.success', { name: name }).then(function (translatedValue) {
alertService.alertSuccess(translatedValue);
});
diff --git a/moon_gui/static/app/policy/edit/parameter/perimeter/perimeter.edit.dir.js b/moon_gui/static/app/policy/edit/parameter/perimeter/perimeter.edit.dir.js
index a96741fe..d72e23b7 100755
--- a/moon_gui/static/app/policy/edit/parameter/perimeter/perimeter.edit.dir.js
+++ b/moon_gui/static/app/policy/edit/parameter/perimeter/perimeter.edit.dir.js
@@ -394,7 +394,7 @@
}
function cleanSelectedValue() {
-
+ edit.list = _.without(edit.list, edit.selectedPerimeter);
delete edit.selectedPerimeter;
}
diff --git a/moon_gui/static/app/policy/edit/parameter/rules/rules-list.tpl.html b/moon_gui/static/app/policy/edit/parameter/rules/rules-list.tpl.html
index 76ac4365..7f556f93 100755
--- a/moon_gui/static/app/policy/edit/parameter/rules/rules-list.tpl.html
+++ b/moon_gui/static/app/policy/edit/parameter/rules/rules-list.tpl.html
@@ -119,7 +119,7 @@
<div class="panel-heading">
- <h4 data-translate="moon.policy.rules.edit.action.add.title">Add a Rules</h4>
+ <h4 data-translate="moon.policy.rules.edit.action.add.title">Add a Rule</h4>
</div>
diff --git a/moon_gui/static/app/policy/edit/policy-edit.tpl.html b/moon_gui/static/app/policy/edit/policy-edit.tpl.html
index a1a6a54a..60841168 100755
--- a/moon_gui/static/app/policy/edit/policy-edit.tpl.html
+++ b/moon_gui/static/app/policy/edit/policy-edit.tpl.html
@@ -64,7 +64,7 @@
<span data-translate="moon.policy.edit.perimeter.title" >Perimeters</span>
- <a href="" ng-click="edit.showPerimeters = !edit.showPerimeters">
+ <a href="" ng-click="edit.showPart('showPerimeters')">
<span ng-if="!edit.showPerimeters">
<span data-translate="moon.policy.edit.show.open">Show</span>
@@ -99,7 +99,7 @@
<span data-translate="moon.policy.edit.data.title" >Data</span>
- <a href="" ng-click="edit.showData = !edit.showData">
+ <a href="" ng-click="edit.showPart('showData')">
<span ng-if="!edit.showData">
<span data-translate="moon.policy.edit.show.open">Show</span>
@@ -134,7 +134,7 @@
<span data-translate="moon.policy.edit.rules.title" >Rules</span>
- <a href="" ng-click="edit.showRules = !edit.showRules">
+ <a href="" ng-click="edit.showPart('showRules')">
<span ng-if="!edit.showRules">
<span data-translate="moon.policy.edit.show.open">Show</span>
@@ -170,7 +170,7 @@
<span data-translate="moon.policy.edit.assignments.title" >Assignments</span>
- <a href="" ng-click="edit.showAssignments = !edit.showAssignments">
+ <a href="" ng-click="edit.showPart('showAssignments')">
<span ng-if="!edit.showAssignments">
<span data-translate="moon.policy.edit.show.open">Show</span>
diff --git a/moon_gui/static/app/policy/edit/policy.controller.edit.js b/moon_gui/static/app/policy/edit/policy.controller.edit.js
index 123ee58b..cd6e429b 100755
--- a/moon_gui/static/app/policy/edit/policy.controller.edit.js
+++ b/moon_gui/static/app/policy/edit/policy.controller.edit.js
@@ -21,9 +21,23 @@
edit.showRules = false;
edit.showAssignments = false;
+ edit.showPart = showPart;
+
activate();
+ function showPart(partName) {
+ var state = edit[partName];
+
+ edit.showPerimeters = false;
+ edit.showData = false;
+ edit.showRules = false;
+ edit.showAssignments = false;
+
+ edit[partName] = !state;
+ }
+
+
function activate(){
manageModel();
diff --git a/moon_gui/static/app/services/moon/rule/metarule.service.js b/moon_gui/static/app/services/moon/rule/metarule.service.js
index 2679fc5b..05167849 100755
--- a/moon_gui/static/app/services/moon/rule/metarule.service.js
+++ b/moon_gui/static/app/services/moon/rule/metarule.service.js
@@ -81,7 +81,7 @@
var _self = this;
if(metaRuleListId.length === 0){
- return [];
+ return callback([]);
}
var promises = _(metaRuleListId).map(function(objectId) {
diff --git a/moon_gui/static/i18n/en.json b/moon_gui/static/i18n/en.json
index dd54e112..4dc7cea5 100755
--- a/moon_gui/static/i18n/en.json
+++ b/moon_gui/static/i18n/en.json
@@ -387,7 +387,7 @@
"success": "Rules `{{rulesName}}` successfully deleted"
},
"add": {
- "title": "Add a Rules",
+ "title": "Add a Rule",
"policies": "Select a policy",
"instructions": "Instruction",
"metarules" : "Select one of the associated MetaRules",
@@ -420,7 +420,7 @@
"required": "{{number}} Object(s) are required"
},
"action":{
- "required": "{{number}} a(s) are required"
+ "required": "{{number}} Action(s) are required"
}
},
"create":{
diff --git a/moon_gui/static/version.json b/moon_gui/static/version.json
index ec74a2db..4f228d2b 100755
--- a/moon_gui/static/version.json
+++ b/moon_gui/static/version.json
@@ -1,3 +1,3 @@
{
- "version": "1.0.0"
-} \ No newline at end of file
+ "version": "1.1.0"
+}
diff --git a/moon_interface/moon_interface/authz_requests.py b/moon_interface/moon_interface/authz_requests.py
index 12c190c7..2ef0e0a1 100644
--- a/moon_interface/moon_interface/authz_requests.py
+++ b/moon_interface/moon_interface/authz_requests.py
@@ -33,7 +33,7 @@ class AuthzRequest:
raise exceptions.KeystoneProjectError("Unknown Project ID {}".format(ctx['project_id']))
self.container_chaining = CACHE.container_chaining[ctx['project_id']]
- if len(self.container_chaining) == 0 or not all(k in self.container_data for k in ("container_id", "hostname", "hostip", "port")):
+ if len(self.container_chaining) == 0 or not all(k in self.container_chaining[0] for k in ("container_id", "hostname", "hostip", "port")):
raise exceptions.MoonError('Void container chaining')
self.pdp_container = self.container_chaining[0]["container_id"]
diff --git a/moon_manager/moon_manager/__init__.py b/moon_manager/moon_manager/__init__.py
index 6f964a63..85c245e0 100644
--- a/moon_manager/moon_manager/__init__.py
+++ b/moon_manager/moon_manager/__init__.py
@@ -3,4 +3,4 @@
# license which can be found in the file 'LICENSE' in this package distribution
# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-__version__ = "4.3.2"
+__version__ = "4.4.0"
diff --git a/moon_manager/moon_manager/api/slaves.py b/moon_manager/moon_manager/api/slaves.py
new file mode 100644
index 00000000..f5b3fa14
--- /dev/null
+++ b/moon_manager/moon_manager/api/slaves.py
@@ -0,0 +1,110 @@
+# Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
+# This software is distributed under the terms and conditions of the 'Apache-2.0'
+# license which can be found in the file 'LICENSE' in this package distribution
+# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
+"""
+PDP are Policy Decision Point.
+
+"""
+
+from flask import request
+from flask_restful import Resource
+import logging
+import requests
+import time
+from python_moonutilities.security_functions import check_auth
+from python_moondb.core import PDPManager
+from python_moondb.core import PolicyManager
+from python_moondb.core import ModelManager
+from python_moonutilities import configuration, exceptions
+
+__version__ = "4.3.0"
+
+logger = logging.getLogger("moon.manager.api." + __name__)
+
+
+class Slaves(Resource):
+ """
+ Endpoint for pdp requests
+ """
+
+ __urls__ = (
+ "/slaves",
+ "/slaves/",
+ "/slaves/<string:uuid>",
+ "/slaves/<string:uuid>/",
+ )
+
+ def __init__(self, **kwargs):
+ conf = configuration.get_configuration("components/orchestrator")
+ self.orchestrator_hostname = conf["components/orchestrator"].get("hostname",
+ "orchestrator")
+ self.orchestrator_port = conf["components/orchestrator"].get("port",
+ 80)
+
+ @check_auth
+ def get(self, uuid=None, user_id=None):
+ """Retrieve all slaves
+
+ :param uuid: uuid of the slave
+ :param user_id: user ID who do the request
+ :return: {
+ "slaves": {
+ "XXX": {
+ "name": "...",
+ "installed": True
+ },
+ "YYY": {
+ "name": "...",
+ "installed": False
+ }
+ }
+ }
+ """
+ req = requests.get("http://{}:{}/slaves".format(
+ self.orchestrator_hostname, self.orchestrator_port
+ ))
+ return {"slaves": req.json().get("slaves", dict())}
+
+ @check_auth
+ def patch(self, uuid=None, user_id=None):
+ """Update a slave
+
+ :param uuid: uuid of the slave to update
+ :param user_id: user ID who do the request
+ :request body: {
+ "op": "replace",
+ "variable": "configured",
+ "value": True,
+ }
+ :return: 204
+ :internal_api: add_pdp
+ """
+ logger.info("Will made a request for {}".format(uuid))
+ if request.json.get("op") == "replace" \
+ and request.json.get("variable") == "configured" \
+ and request.json.get("value"):
+ req = requests.post("http://{}:{}/pods".format(
+ self.orchestrator_hostname, self.orchestrator_port,
+ ),
+ json={"slave_name": uuid}
+ )
+ if req.status_code != 200:
+ logger.warning("Get error from Orchestrator {} {}".format(
+ req.reason, req.status_code
+ ))
+ return "Orchestrator: " + str(req.reason), req.status_code
+ elif request.json.get("op") == "replace" \
+ and request.json.get("variable") == "configured" \
+ and not request.json.get("value"):
+ req = requests.delete("http://{}:{}/pods/{}".format(
+ self.orchestrator_hostname, self.orchestrator_port, uuid
+ ))
+ if req.status_code != 200:
+ logger.warning("Get error from Orchestrator {} {}".format(
+ req.reason, req.status_code
+ ))
+ return "Orchestrator: " + str(req.reason), req.status_code
+ else:
+ return "Malformed request", 400
+ return {"slaves": req.json()}
diff --git a/moon_manager/moon_manager/http_server.py b/moon_manager/moon_manager/http_server.py
index d67e1121..a98cab43 100644
--- a/moon_manager/moon_manager/http_server.py
+++ b/moon_manager/moon_manager/http_server.py
@@ -14,6 +14,7 @@ from moon_manager.api.generic import Status, Logs, API
from moon_manager.api.models import Models
from moon_manager.api.policies import Policies
from moon_manager.api.pdp import PDP
+from moon_manager.api.slaves import Slaves
from moon_manager.api.meta_rules import MetaRules
from moon_manager.api.meta_data import SubjectCategories, ObjectCategories, ActionCategories
from moon_manager.api.perimeter import Subjects, Objects, Actions
@@ -32,7 +33,7 @@ __API__ = (
Subjects, Objects, Actions, Rules,
SubjectAssignments, ObjectAssignments, ActionAssignments,
SubjectData, ObjectData, ActionData,
- Models, Policies, PDP
+ Models, Policies, PDP, Slaves
)
diff --git a/moon_manager/tests/functional_pod/conftest.py b/moon_manager/tests/functional_pod/conftest.py
new file mode 100644
index 00000000..b5811755
--- /dev/null
+++ b/moon_manager/tests/functional_pod/conftest.py
@@ -0,0 +1,12 @@
+import pytest
+
+print("ANALYSING CONFTEST")
+
+
+@pytest.fixture
+def context():
+ print("CREATING CONTEXT")
+ yield {
+ "hostname": "manager",
+ "port": 8082,
+ }
diff --git a/moon_manager/tests/functional_pod/run_functional_tests.sh b/moon_manager/tests/functional_pod/run_functional_tests.sh
index c80bf15d..7a95a491 100644
--- a/moon_manager/tests/functional_pod/run_functional_tests.sh
+++ b/moon_manager/tests/functional_pod/run_functional_tests.sh
@@ -1,11 +1,4 @@
#!/usr/bin/env bash
-set -x
-
-kubectl create -n moon -f tools/moon_kubernetes/templates/moon_forming.yaml
-
-echo Waiting for jobs forming
-sleep 5
-kubectl get jobs -n moon
-kubectl logs -n moon jobs/forming
-
+cd /data/tests/functional_pod
+pytest .
diff --git a/moon_manager/tests/functional_pod/test_manager.py b/moon_manager/tests/functional_pod/test_manager.py
new file mode 100644
index 00000000..aab5fba4
--- /dev/null
+++ b/moon_manager/tests/functional_pod/test_manager.py
@@ -0,0 +1,77 @@
+import json
+import requests
+
+
+def get_json(data):
+ return json.loads(data.decode("utf-8"))
+
+
+def get_pdp(context):
+ req = requests.get("http://{}:{}/pdp".format(
+ context.get("hostname"),
+ context.get("port")),
+ timeout=3)
+ pdp = req.json()
+ return req, pdp
+
+
+def add_pdp(context, data):
+ req = requests.post("http://{}:{}/pdp".format(
+ context.get("hostname"),
+ context.get("port")),
+ data=json.dumps(data),
+ headers={'Content-Type': 'application/json'},
+ timeout=3)
+ pdp = req.json()
+ return req, pdp
+
+
+def delete_pdp(context, key):
+ req = requests.delete("http://{}:{}/pdp/{}".format(
+ context.get("hostname"),
+ context.get("port"), key),
+ timeout=3)
+ return req
+
+
+def delete_pdp_without_id(context):
+ req = requests.delete("http://{}:{}/pdp/{}".format(
+ context.get("hostname"),
+ context.get("port"), ""),
+ timeout=3)
+ return req
+
+
+def test_get_pdp(context):
+ req, pdp = get_pdp(context)
+ assert req.status_code == 200
+ assert isinstance(pdp, dict)
+ assert "pdps" in pdp
+
+
+def test_add_pdp(context):
+ data = {
+ "name": "testuser",
+ "security_pipeline": ["policy_id_1", "policy_id_2"],
+ "keystone_project_id": "keystone_project_id",
+ "description": "description of testuser"
+ }
+ req, pdp = add_pdp(context, data)
+ assert req.status_code == 200
+ assert isinstance(pdp, dict)
+ value = list(pdp["pdps"].values())[0]
+ assert "pdps" in pdp
+ assert value['name'] == "testuser"
+ assert value["description"] == "description of {}".format("testuser")
+ assert value["keystone_project_id"] == "keystone_project_id"
+
+
+def test_delete_pdp(context):
+ request, pdp = get_pdp(context)
+ success_req = None
+ for key, value in pdp['pdps'].items():
+ if value['name'] == "testuser":
+ success_req = delete_pdp(context, key)
+ break
+ assert success_req
+ assert success_req.status_code == 200
diff --git a/moon_manager/tests/functional_pod/test_models.py b/moon_manager/tests/functional_pod/test_models.py
new file mode 100644
index 00000000..dcda9f32
--- /dev/null
+++ b/moon_manager/tests/functional_pod/test_models.py
@@ -0,0 +1,78 @@
+import json
+import requests
+
+
+def get_models(context):
+ req = requests.get("http://{}:{}/models".format(
+ context.get("hostname"),
+ context.get("port")),
+ timeout=3)
+ models = req.json()
+ return req, models
+
+
+def add_models(context, name):
+ data = {
+ "name": name,
+ "description": "description of {}".format(name),
+ "meta_rules": ["meta_rule_id1", "meta_rule_id2"]
+ }
+ req = requests.post("http://{}:{}/models".format(
+ context.get("hostname"),
+ context.get("port")),
+ data=json.dumps(data),
+ headers={'Content-Type': 'application/json'},
+ timeout=3)
+ models = req.json()
+ return req, models
+
+
+def delete_models(context, name):
+ _, models = get_models(context)
+ request = None
+ for key, value in models['models'].items():
+ if value['name'] == name:
+ request = requests.delete("http://{}:{}/models/{}".format(key,
+ context.get("hostname"),
+ context.get("port")),
+ timeout=3)
+ break
+ return request
+
+
+def delete_models_without_id(context):
+ req = requests.delete("http://{}:{}/models/{}".format(
+ context.get("hostname"),
+ context.get("port"),
+ ""),
+ timeout=3)
+ return req
+
+
+def test_get_models(context):
+ req, models = get_models(context)
+ assert req.status_code == 200
+ assert isinstance(models, dict)
+ assert "models" in models
+
+
+def test_add_models(context):
+ req, models = add_models(context, "testuser")
+ assert req.status_code == 200
+ assert isinstance(models, dict)
+ value = list(models["models"].values())[0]
+ assert "models" in models
+ assert value['name'] == "testuser"
+ assert value["description"] == "description of {}".format("testuser")
+ assert value["meta_rules"][0] == "meta_rule_id1"
+
+
+def test_delete_models(context):
+ req = delete_models(context, "testuser")
+ assert req.status_code == 200
+
+
+def test_delete_models_without_id(context):
+ req = delete_models_without_id(context)
+ assert req.status_code == 500
+
diff --git a/moon_manager/tests/unit_python/api/test_assignemnt.py b/moon_manager/tests/unit_python/api/test_assignemnt.py
new file mode 100644
index 00000000..08688e04
--- /dev/null
+++ b/moon_manager/tests/unit_python/api/test_assignemnt.py
@@ -0,0 +1,174 @@
+import api.utilities as utilities
+import json
+
+
+# subject_categories_test
+
+
+def get_subject_assignment(client, policy_id):
+ req = client.get("/policies/{}/subject_assignments".format(policy_id))
+ subject_assignment = utilities.get_json(req.data)
+ return req, subject_assignment
+
+
+def add_subject_assignment(client, policy_id, category_id):
+ data = {
+ "id": "id1",
+ "category_id": category_id,
+ "data_id": "data_id1"
+ }
+ req = client.post("/policies/{}/subject_assignments/{}".format(policy_id, category_id), data=json.dumps(data),
+ headers={'Content-Type': 'application/json'})
+ subject_assignment = utilities.get_json(req.data)
+ return req, subject_assignment
+
+
+def delete_subject_assignment(client, policy_id):
+ req = client.delete("/policies/{}/subject_assignments".format(policy_id))
+ return req
+
+
+def test_get_subject_assignment():
+ policy_id = utilities.get_policy_id()
+ client = utilities.register_client()
+ req, subject_assignment = get_subject_assignment(client, policy_id)
+ assert req.status_code == 200
+ assert isinstance(subject_assignment, dict)
+ assert "subject_assignments" in subject_assignment
+
+
+def test_add_subject_assignment():
+ policy_id = utilities.get_policy_id()
+ client = utilities.register_client()
+ req, subject_assignment = add_subject_assignment(client, policy_id, "111")
+ assert req.status_code == 200
+ assert isinstance(subject_assignment, dict)
+ value = subject_assignment["subject_assignments"]
+ assert "subject_assignments" in subject_assignment
+ id = list(value.keys())[0]
+ assert value[id]['policy_id'] == policy_id
+ assert value[id]['category_id'] == "111"
+ assert value[id]['subject_id'] == "id1"
+
+
+def test_delete_subject_assignment():
+ client = utilities.register_client()
+ policy_id = utilities.get_policy_id()
+ success_req = delete_subject_assignment(client, policy_id)
+ assert success_req.status_code == 200
+
+# ---------------------------------------------------------------------------
+
+# object_categories_test
+
+
+def get_object_assignment(client, policy_id):
+ req = client.get("/policies/{}/object_assignments".format(policy_id))
+ object_assignment = utilities.get_json(req.data)
+ return req, object_assignment
+
+
+def add_object_assignment(client, policy_id, category_id):
+ data = {
+ "id": "id1",
+ "category_id": category_id,
+ "data_id": "data_id1"
+ }
+ req = client.post("/policies/{}/object_assignments/{}".format(policy_id, category_id), data=json.dumps(data),
+ headers={'Content-Type': 'application/json'})
+ object_assignment = utilities.get_json(req.data)
+ return req, object_assignment
+
+
+def delete_object_assignment(client, policy_id):
+ req = client.delete("/policies/{}/object_assignments".format(policy_id))
+ return req
+
+
+def test_get_object_assignment():
+ policy_id = utilities.get_policy_id()
+ client = utilities.register_client()
+ req, object_assignment = get_object_assignment(client, policy_id)
+ assert req.status_code == 200
+ assert isinstance(object_assignment, dict)
+ assert "object_assignments" in object_assignment
+
+
+def test_add_object_assignment():
+ policy_id = utilities.get_policy_id()
+ client = utilities.register_client()
+ req, object_assignment = add_object_assignment(client, policy_id, "111")
+ assert req.status_code == 200
+ assert isinstance(object_assignment, dict)
+ value = object_assignment["object_assignments"]
+ assert "object_assignments" in object_assignment
+ id = list(value.keys())[0]
+ assert value[id]['policy_id'] == policy_id
+ assert value[id]['category_id'] == "111"
+ assert value[id]['object_id'] == "id1"
+
+
+def test_delete_object_assignment():
+ client = utilities.register_client()
+ policy_id = utilities.get_policy_id()
+ success_req = delete_object_assignment(client, policy_id)
+ assert success_req.status_code == 200
+
+# ---------------------------------------------------------------------------
+
+# action_categories_test
+
+
+def get_action_assignment(client, policy_id):
+ req = client.get("/policies/{}/action_assignments".format(policy_id))
+ action_assignment = utilities.get_json(req.data)
+ return req, action_assignment
+
+
+def add_action_assignment(client, policy_id, category_id):
+ data = {
+ "id": "id1",
+ "category_id": category_id,
+ "data_id": "data_id1"
+ }
+ req = client.post("/policies/{}/action_assignments/{}".format(policy_id, category_id), data=json.dumps(data),
+ headers={'Content-Type': 'application/json'})
+ action_assignment = utilities.get_json(req.data)
+ return req, action_assignment
+
+
+def delete_action_assignment(client, policy_id):
+ req = client.delete("/policies/{}/action_assignments".format(policy_id))
+ return req
+
+
+def test_get_action_assignment():
+ policy_id = utilities.get_policy_id()
+ client = utilities.register_client()
+ req, action_assignment = get_action_assignment(client, policy_id)
+ assert req.status_code == 200
+ assert isinstance(action_assignment, dict)
+ assert "action_assignments" in action_assignment
+
+
+def test_add_action_assignment():
+ policy_id = utilities.get_policy_id()
+ client = utilities.register_client()
+ req, action_assignment = add_action_assignment(client, policy_id, "111")
+ assert req.status_code == 200
+ assert isinstance(action_assignment, dict)
+ value = action_assignment["action_assignments"]
+ assert "action_assignments" in action_assignment
+ id = list(value.keys())[0]
+ assert value[id]['policy_id'] == policy_id
+ assert value[id]['category_id'] == "111"
+ assert value[id]['action_id'] == "id1"
+
+
+def test_delete_action_assignment():
+ client = utilities.register_client()
+ policy_id = utilities.get_policy_id()
+ success_req = delete_action_assignment(client, policy_id)
+ assert success_req.status_code == 200
+
+# --------------------------------------------------------------------------- \ No newline at end of file
diff --git a/moon_manager/tests/unit_python/api/test_data.py b/moon_manager/tests/unit_python/api/test_data.py
new file mode 100644
index 00000000..87a80c69
--- /dev/null
+++ b/moon_manager/tests/unit_python/api/test_data.py
@@ -0,0 +1,168 @@
+import api.utilities as utilities
+import json
+
+
+# subject_categories_test
+
+
+def get_subject_data(client, policy_id):
+ req = client.get("/policies/{}/subject_data".format(policy_id))
+ subject_data = utilities.get_json(req.data)
+ return req, subject_data
+
+
+def add_subject_data(client, name, policy_id, category_id):
+ data = {
+ "name": name,
+ "description": "description of {}".format(name)
+ }
+ req = client.post("/policies/{}/subject_data/{}".format(policy_id, category_id), data=json.dumps(data),
+ headers={'Content-Type': 'application/json'})
+ subject_data = utilities.get_json(req.data)
+ return req, subject_data
+
+
+def delete_subject_data(client, policy_id):
+ req = client.delete("/policies/{}/subject_data".format(policy_id))
+ return req
+
+
+def test_get_subject_data():
+ policy_id = utilities.get_policy_id()
+ client = utilities.register_client()
+ req, subject_data = get_subject_data(client, policy_id)
+ assert req.status_code == 200
+ assert isinstance(subject_data, dict)
+ assert "subject_data" in subject_data
+
+
+def test_add_subject_data():
+ policy_id = utilities.get_policy_id()
+ client = utilities.register_client()
+ req, subject_data = add_subject_data(client, "testuser", policy_id, "111")
+ assert req.status_code == 200
+ assert isinstance(subject_data, dict)
+ value = subject_data["subject_data"]['data']
+ assert "subject_data" in subject_data
+ id = list(value.keys())[0]
+ assert value[id]['name'] == "testuser"
+ assert value[id]['description'] == "description of {}".format("testuser")
+
+
+def test_delete_subject_data():
+ client = utilities.register_client()
+ policy_id = utilities.get_policy_id()
+ success_req = delete_subject_data(client, policy_id)
+ assert success_req.status_code == 200
+
+# ---------------------------------------------------------------------------
+
+# object_categories_test
+
+
+def get_object_data(client, policy_id):
+ req = client.get("/policies/{}/object_data".format(policy_id))
+ object_data = utilities.get_json(req.data)
+ return req, object_data
+
+
+def add_object_data(client, name, policy_id, category_id):
+ data = {
+ "name": name,
+ "description": "description of {}".format(name)
+ }
+ req = client.post("/policies/{}/object_data/{}".format(policy_id, category_id), data=json.dumps(data),
+ headers={'Content-Type': 'application/json'})
+ object_data = utilities.get_json(req.data)
+ return req, object_data
+
+
+def delete_object_data(client, policy_id):
+ req = client.delete("/policies/{}/object_data".format(policy_id))
+ return req
+
+
+def test_get_object_data():
+ policy_id = utilities.get_policy_id()
+ client = utilities.register_client()
+ req, object_data = get_object_data(client, policy_id)
+ assert req.status_code == 200
+ assert isinstance(object_data, dict)
+ assert "object_data" in object_data
+
+
+def test_add_object_data():
+ policy_id = utilities.get_policy_id()
+ client = utilities.register_client()
+ req, object_data = add_object_data(client, "testuser", policy_id, "111")
+ assert req.status_code == 200
+ assert isinstance(object_data, dict)
+ value = object_data["object_data"]['data']
+ assert "object_data" in object_data
+ id = list(value.keys())[0]
+ assert value[id]['value']['name'] == "testuser"
+ assert value[id]['value']['description'] == "description of {}".format("testuser")
+
+
+def test_delete_object_data():
+ client = utilities.register_client()
+ policy_id = utilities.get_policy_id()
+ success_req = delete_object_data(client, policy_id)
+ assert success_req.status_code == 200
+
+# ---------------------------------------------------------------------------
+
+# action_categories_test
+
+
+def get_action_data(client, policy_id):
+ req = client.get("/policies/{}/action_data".format(policy_id))
+ action_data = utilities.get_json(req.data)
+ return req, action_data
+
+
+def add_action_data(client, name, policy_id, category_id):
+ data = {
+ "name": name,
+ "description": "description of {}".format(name)
+ }
+ req = client.post("/policies/{}/action_data/{}".format(policy_id, category_id), data=json.dumps(data),
+ headers={'Content-Type': 'application/json'})
+ action_data = utilities.get_json(req.data)
+ return req, action_data
+
+
+def delete_action_data(client, policy_id):
+ req = client.delete("/policies/{}/action_data".format(policy_id))
+ return req
+
+
+def test_get_action_data():
+ policy_id = utilities.get_policy_id()
+ client = utilities.register_client()
+ req, action_data = get_action_data(client, policy_id)
+ assert req.status_code == 200
+ assert isinstance(action_data, dict)
+ assert "action_data" in action_data
+
+
+def test_add_action_data():
+ policy_id = utilities.get_policy_id()
+ client = utilities.register_client()
+ req, action_data = add_action_data(client, "testuser", policy_id, "111")
+ assert req.status_code == 200
+ assert isinstance(action_data, dict)
+ value = action_data["action_data"]['data']
+ assert "action_data" in action_data
+ id = list(value.keys())[0]
+ assert value[id]['value']['name'] == "testuser"
+ assert value[id]['value']['description'] == "description of {}".format("testuser")
+
+
+def test_delete_action_data():
+ client = utilities.register_client()
+ policy_id = utilities.get_policy_id()
+ success_req = delete_action_data(client, policy_id)
+ assert success_req.status_code == 200
+
+# --------------------------------------------------------------------------- \ No newline at end of file
diff --git a/moon_manager/tests/unit_python/api/test_pdp.py b/moon_manager/tests/unit_python/api/test_pdp.py
new file mode 100644
index 00000000..a2d0cb5a
--- /dev/null
+++ b/moon_manager/tests/unit_python/api/test_pdp.py
@@ -0,0 +1,62 @@
+import json
+import api.utilities as utilities
+import pytest
+
+
+def get_pdp(client):
+ req = client.get("/pdp")
+ pdp = utilities.get_json(req.data)
+ return req, pdp
+
+
+def add_pdp(client, data):
+ req = client.post("/pdp", data=json.dumps(data),
+ headers={'Content-Type': 'application/json'})
+ pdp = utilities.get_json(req.data)
+ return req, pdp
+
+
+def delete_pdp(client, key):
+ req = client.delete("/pdp/{}".format(key))
+ return req
+
+
+def delete_pdp_without_id(client):
+ req = client.delete("/pdp/{}".format(""))
+ return req
+
+
+def test_get_pdp():
+ client = utilities.register_client()
+ req, pdp = get_pdp(client)
+ assert req.status_code == 200
+ assert isinstance(pdp, dict)
+ assert "pdps" in pdp
+
+
+def test_add_pdp():
+ data = {
+ "name": "testuser",
+ "security_pipeline": ["policy_id_1", "policy_id_2"],
+ "keystone_project_id": "keystone_project_id",
+ "description": "description of testuser"
+ }
+ client = utilities.register_client()
+ req, pdp = add_pdp(client, data)
+ assert req.status_code == 200
+ assert isinstance(pdp, dict)
+ value = list(pdp["pdps"].values())[0]
+ assert "pdps" in pdp
+ assert value['name'] == "testuser"
+ assert value["description"] == "description of {}".format("testuser")
+ assert value["keystone_project_id"] == "keystone_project_id"
+
+
+def test_delete_pdp():
+ client = utilities.register_client()
+ request, pdp = get_pdp(client)
+ for key, value in pdp['pdps'].items():
+ if value['name'] == "testuser":
+ success_req = delete_pdp(client, key)
+ break
+ assert success_req.status_code == 200
diff --git a/moon_manager/tests/unit_python/api/test_rules.py b/moon_manager/tests/unit_python/api/test_rules.py
new file mode 100644
index 00000000..86a3d390
--- /dev/null
+++ b/moon_manager/tests/unit_python/api/test_rules.py
@@ -0,0 +1,58 @@
+import api.utilities as utilities
+import json
+
+
+def get_rules(client, policy_id):
+ req = client.get("/policies/{}/rules".format(policy_id))
+ rules = utilities.get_json(req.data)
+ return req, rules
+
+
+def add_rules(client, policy_id):
+ data = {
+ "meta_rule_id": "meta_rule_id1",
+ "rule": ["subject_data_id2", "object_data_id2", "action_data_id2"],
+ "instructions": (
+ {"decision": "grant"},
+ ),
+ "enabled": True
+ }
+ req = client.post("/policies/{}/rules".format(policy_id), data=json.dumps(data),
+ headers={'Content-Type': 'application/json'})
+ rules = utilities.get_json(req.data)
+ return req, rules
+
+
+def delete_rules(client, policy_id, meta_rule_id):
+ req = client.delete("/policies/{}/rules/{}".format(policy_id, meta_rule_id))
+ return req
+
+
+def test_get_rules():
+ policy_id = utilities.get_policy_id()
+ client = utilities.register_client()
+ req, rules = get_rules(client, policy_id)
+ assert req.status_code == 200
+ assert isinstance(rules, dict)
+ assert "rules" in rules
+
+
+def test_add_rules():
+ policy_id = utilities.get_policy_id()
+ client = utilities.register_client()
+ req, rules = add_rules(client, policy_id)
+ assert req.status_code == 200
+ assert isinstance(rules, dict)
+ value = rules["rules"]
+ assert "rules" in rules
+ id = list(value.keys())[0]
+ assert value[id]["meta_rule_id"] == "meta_rule_id1"
+
+
+def test_delete_rules():
+ client = utilities.register_client()
+ policy_id = utilities.get_policy_id()
+ req, added_rules = get_rules(client, policy_id)
+ id = added_rules["rules"]['rules'][0]['id']
+ rules = delete_rules(client, policy_id, id)
+ assert rules.status_code == 200
diff --git a/moon_manager/tests/unit_python/api/utilities.py b/moon_manager/tests/unit_python/api/utilities.py
index a2b0689b..66ca30c5 100644
--- a/moon_manager/tests/unit_python/api/utilities.py
+++ b/moon_manager/tests/unit_python/api/utilities.py
@@ -9,4 +9,18 @@ def register_client():
import moon_manager.server
server = moon_manager.server.create_server()
client = server.app.test_client()
- return client \ No newline at end of file
+ return client
+
+
+def get_policy_id():
+ import api.test_policies as policies
+ client = register_client()
+ policy_id = ''
+ req, policy = policies.get_policies(client)
+ for id in policy['policies']:
+ if id:
+ policy_id = id
+ break
+ if not policy_id:
+ policies.add_policies(client, "testuser")
+ return policy_id
diff --git a/moon_manager/tests/unit_python/conftest.py b/moon_manager/tests/unit_python/conftest.py
index 3f73f2da..902a41a2 100644
--- a/moon_manager/tests/unit_python/conftest.py
+++ b/moon_manager/tests/unit_python/conftest.py
@@ -35,7 +35,7 @@ CONF = {
"bind": "0.0.0.0",
"port": 8083,
"container": "wukongsun/moon_orchestrator:v4.3",
- "hostname": "interface"
+ "hostname": "orchestrator"
},
"pipeline": {
"interface": {
@@ -114,7 +114,7 @@ CONF = {
},
"messenger": {
"url": "rabbit://moon:p4sswOrd1@messenger:5672/moon"
- }
+ },
}
COMPONENTS = (
@@ -123,22 +123,50 @@ COMPONENTS = (
"database",
"slave",
"components/manager",
+ "components/orchestrator"
)
+PODS = {
+ "pods": {
+ "721760dd-de5f-11e7-8001-3863bbb766f3": [
+ {
+ "pdp_id": "b3d3e18abf3340e8b635fd49e6634ccd",
+ "port": 8080,
+ "genre": "interface",
+ "name": "interface-paltry",
+ "keystone_project_id": "a64beb1cc224474fb4badd43173e7101",
+ "namespace": "moon",
+ "container": "wukongsun/moon_interface:v4.3"
+ },
+ {
+ "pdp_id": "b3d3e18abf3340e8b635fd49e6634ccd",
+ "meta_rule_id": "f8f49a779ceb47b3ac810f01ef71b4e0",
+ "port": 8081,
+ "genre": "authz",
+ "name": "authz-economic",
+ "policy_id": "f8f49a779ceb47b3ac810f01ef71b4e0",
+ "keystone_project_id": "a64beb1cc224474fb4badd43173e7101",
+ "namespace": "moon",
+ "container": "wukongsun/moon_authz:v4.3"
+ }
+ ]
+ }
+}
+
def get_b64_conf(component=None):
if component in CONF:
return base64.b64encode(
json.dumps(
- CONF[component]).encode('utf-8')+b"\n").decode('utf-8')
+ CONF[component]).encode('utf-8') + b"\n").decode('utf-8')
elif "/" in component:
key1, _, key2 = component.partition("/")
return base64.b64encode(
json.dumps(
- CONF[key1][key2]).encode('utf-8')+b"\n").decode('utf-8')
+ CONF[key1][key2]).encode('utf-8') + b"\n").decode('utf-8')
else:
return base64.b64encode(
- json.dumps(CONF).encode('utf-8')+b"\n").decode('utf-8')
+ json.dumps(CONF).encode('utf-8') + b"\n").decode('utf-8')
@pytest.fixture(autouse=True)
@@ -150,7 +178,7 @@ def no_requests(monkeypatch):
m.register_uri(
'GET', 'http://consul:8500/v1/kv/{}'.format(component),
json=[{'Key': component, 'Value': get_b64_conf(component)}]
- )
+ )
m.register_uri(
'POST', 'http://keystone:5000/v3/auth/tokens',
headers={'X-Subject-Token': "111111111"}
@@ -169,10 +197,22 @@ def no_requests(monkeypatch):
)
m.register_uri(
'POST', 'http://keystone:5000/v3/users/',
- json={"users": [{
- "id": "1111111111111"
- }]}
+ json={"users": [{"id": "1111111111111"}]}
)
+ m.register_uri(
+ 'POST', 'http://orchestrator:8083/pods',
+ json=PODS,
+ headers={"content-type": "application/json"}
+ )
+ m.register_uri(
+ 'GET', 'http://orchestrator:8083/pods',
+ json=PODS
+ )
+ m.register_uri(
+ 'DELETE', 'http://orchestrator:8083/pods/{}'.format(list([PODS['pods'].keys()])[0]),
+ headers={"content-type": "application/json"}
+ )
+
print("Start populating the DB.")
from python_moondb.db_manager import init_engine, main
engine = init_engine()
@@ -181,7 +221,6 @@ def no_requests(monkeypatch):
print("End populating the DB.")
yield m
-
# @pytest.fixture(autouse=True, scope="session")
# def manage_database():
# from moon_db.db_manager import init_engine, run
@@ -189,5 +228,3 @@ def no_requests(monkeypatch):
# run("upgrade", logging.getLogger("db_manager"), engine)
# yield
# print("Will close the DB")
-
-
diff --git a/moon_orchestrator/moon_orchestrator/__init__.py b/moon_orchestrator/moon_orchestrator/__init__.py
index 3276f42d..85c245e0 100644
--- a/moon_orchestrator/moon_orchestrator/__init__.py
+++ b/moon_orchestrator/moon_orchestrator/__init__.py
@@ -3,4 +3,4 @@
# license which can be found in the file 'LICENSE' in this package distribution
# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-__version__ = "4.3.1"
+__version__ = "4.4.0"
diff --git a/moon_orchestrator/moon_orchestrator/api/pods.py b/moon_orchestrator/moon_orchestrator/api/pods.py
index a83ca9ae..3a01c3a9 100644
--- a/moon_orchestrator/moon_orchestrator/api/pods.py
+++ b/moon_orchestrator/moon_orchestrator/api/pods.py
@@ -6,6 +6,7 @@
from flask import request
from flask_restful import Resource
from python_moonutilities.security_functions import check_auth
+from python_moonutilities import exceptions
import logging
logger = logging.getLogger("moon.orchestrator.api.pods")
@@ -17,6 +18,7 @@ class Pods(Resource):
"""
__version__ = "4.3.1"
+ POD_TYPES = ("authz", "wrapper")
__urls__ = (
"/pods",
@@ -44,15 +46,33 @@ class Pods(Resource):
:internal_api: get_pdp
"""
pods = {}
- if uuid:
- return {"pods": self.driver.get_pods(uuid)}
- for _pod_key, _pod_values in self.driver.get_pods().items():
- pods[_pod_key] = []
- for _pod_value in _pod_values:
- if _pod_value['namespace'] != "moon":
- continue
- pods[_pod_key].append(_pod_value)
- return {"pods": pods}
+ try:
+ if uuid:
+ return {"pods": self.driver.get_pods(uuid)}
+ for _pod_key, _pod_values in self.driver.get_pods().items():
+ pods[_pod_key] = []
+ for _pod_value in _pod_values:
+ if _pod_value['namespace'] != "moon":
+ continue
+ pods[_pod_key].append(_pod_value)
+ return {"pods": pods}
+ except Exception as e:
+ return {"result": False, "message": str(e)}, 500
+
+ def __get_pod_with_keystone_pid(self, keystone_pid):
+ for pod_key, pod_values in self.driver.get_pods().items():
+ if pod_values[0]['keystone_project_id'] == keystone_pid:
+ return True
+
+ def __get_wrapper(self, slave_name):
+ for slave in self.driver.get_slaves():
+ if slave_name == slave["name"] \
+ and slave["configured"]:
+ return True
+
+ def __get_slave_names(self):
+ for slave in self.driver.get_slaves():
+ yield slave["name"]
@check_auth
def post(self, uuid=None, user_id=None):
@@ -61,9 +81,14 @@ class Pods(Resource):
:param uuid: uuid of the pod (not used here)
:param user_id: user ID who do the request
:request body: {
- "name": "...",
- "description": "...",
- "type": "plugin_name"
+ "pdp_id": "fa2323f7055d4a88b1b85d31fe5e8369",
+ "name": "pdp_rbac3",
+ "keystone_project_id": "ceacbb5564cc48ad929dd4f00e52bf63",
+ "models": {...},
+ "policies": {...},
+ "description": "test",
+ "security_pipeline": [...],
+ "slave_name": ""
}
:return: {
"pdp_id1": {
@@ -73,22 +98,35 @@ class Pods(Resource):
}
}
"""
- logger.debug("POST param={}".format(request.json))
- self.driver.create_pipeline(
- request.json.get("keystone_project_id"),
- request.json.get("pdp_id"),
- request.json.get("security_pipeline"),
- manager_data=request.json,
- active_context=None,
- active_context_name=None)
pods = {}
- for _pod_key, _pod_values in self.driver.get_pods().items():
- pods[_pod_key] = []
- for _pod_value in _pod_values:
- if _pod_value['namespace'] != "moon":
- continue
- pods[_pod_key].append(_pod_value)
- return {"pods": pods}
+ if "security_pipeline" in request.json:
+ if self.__get_pod_with_keystone_pid(request.json.get("keystone_project_id")):
+ raise exceptions.PipelineConflict
+ self.driver.create_pipeline(
+ request.json.get("keystone_project_id"),
+ request.json.get("pdp_id"),
+ request.json.get("security_pipeline"),
+ manager_data=request.json,
+ slave_name=request.json.get("slave_name"))
+ for _pod_key, _pod_values in self.driver.get_pods().items():
+ pods[_pod_key] = []
+ for _pod_value in _pod_values:
+ if _pod_value['namespace'] != "moon":
+ continue
+ pods[_pod_key].append(_pod_value)
+ else:
+ logger.info("------------------------------------")
+ logger.info(list(self.__get_slave_names()))
+ logger.info("------------------------------------")
+ if self.__get_wrapper(request.json.get("slave_name")):
+ raise exceptions.WrapperConflict
+ if request.json.get("slave_name") not in self.__get_slave_names():
+ raise exceptions.SlaveNameUnknown
+ slave_name = request.json.get("slave_name")
+ if not slave_name:
+ slave_name = self.driver.get_slaves(active=True)
+ self.driver.create_wrappers(slave_name)
+ return {"pods": self.driver.get_pods()}
@check_auth
def delete(self, uuid=None, user_id=None):
@@ -104,28 +142,31 @@ class Pods(Resource):
try:
self.driver.delete_pipeline(uuid)
return {'result': True}
+ except exceptions.PipelineUnknown:
+ for slave in self.driver.get_slaves():
+ if uuid in (slave['name'], slave["wrapper_name"]):
+ self.driver.delete_wrapper(name=slave["wrapper_name"])
except Exception as e:
return {"result": False, "message": str(e)}, 500
- @check_auth
- def patch(self, uuid=None, user_id=None):
- """Update a pod
-
- :param uuid: uuid of the pdp to update
- :param user_id: user ID who do the request
- :request body: {
- "name": "...",
- "replicas": "...",
- "description": "...",
- }
- :return: {
- "pod_id1": {
- "name": "...",
- "replicas": "...",
- "description": "...",
- }
- }
- :internal_api: update_pdp
- """
- return {"pods": None}
-
+ # @check_auth
+ # def patch(self, uuid=None, user_id=None):
+ # """Update a pod
+ #
+ # :param uuid: uuid of the pdp to update
+ # :param user_id: user ID who do the request
+ # :request body: {
+ # "name": "...",
+ # "replicas": "...",
+ # "description": "...",
+ # }
+ # :return: {
+ # "pod_id1": {
+ # "name": "...",
+ # "replicas": "...",
+ # "description": "...",
+ # }
+ # }
+ # :internal_api: update_pdp
+ # """
+ # return {"pods": None}
diff --git a/moon_orchestrator/moon_orchestrator/api/slaves.py b/moon_orchestrator/moon_orchestrator/api/slaves.py
new file mode 100644
index 00000000..7453d305
--- /dev/null
+++ b/moon_orchestrator/moon_orchestrator/api/slaves.py
@@ -0,0 +1,46 @@
+# Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
+# This software is distributed under the terms and conditions of the 'Apache-2.0'
+# license which can be found in the file 'LICENSE' in this package distribution
+# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
+
+from flask import request
+from flask_restful import Resource
+from python_moonutilities.security_functions import check_auth
+import logging
+
+logger = logging.getLogger("moon.orchestrator.api.slaves")
+
+
+class Slaves(Resource):
+ """
+ Endpoint for slaves requests
+ """
+
+ __version__ = "4.3.1"
+
+ __urls__ = (
+ "/slaves",
+ "/slaves/",
+ "/slaves/<string:uuid>",
+ "/slaves/<string:uuid>/",
+ )
+
+ def __init__(self, **kwargs):
+ self.driver = kwargs.get("driver")
+
+ @check_auth
+ def get(self, uuid=None, user_id=None):
+ """Retrieve all pods
+
+ :param uuid: uuid of the pod
+ :param user_id: user ID who do the request
+ :return: {
+ "pod_id1": {
+ "name": "...",
+ "replicas": "...",
+ "description": "...",
+ }
+ }
+ """
+ slaves = self.driver.get_slaves()
+ return {"slaves": slaves}
diff --git a/moon_orchestrator/moon_orchestrator/drivers.py b/moon_orchestrator/moon_orchestrator/drivers.py
index b21f2639..bb0d0c2c 100644
--- a/moon_orchestrator/moon_orchestrator/drivers.py
+++ b/moon_orchestrator/moon_orchestrator/drivers.py
@@ -159,17 +159,17 @@ class K8S(Driver):
resp = client.create_namespaced_service(namespace="moon",
body=service_manifest)
logger.info("Service {} created!".format(data.get('name')))
- return resp
+ return service_manifest
def load_deployment_and_service(self, data, api_client=None, ext_client=None, expose=False):
_client = api_client if api_client else self.client
+ manifest = self.__create_service(client=_client, data=data[0],
+ expose=expose)
+ data[0]["external_port"] = manifest['spec']['ports'][0].get('nodePort')
pod = self.__create_deployment(client=ext_client, data=data)
- self.__create_service(client=_client, data=data[0],
- expose=expose)
self.cache[pod.metadata.uid] = data
- @staticmethod
- def delete_deployment(name=None, namespace="moon", ext_client=None):
+ def delete_deployment(self, name=None, namespace="moon", ext_client=None):
logger.info("Deleting deployment {}".format(name))
body = client.V1DeleteOptions(propagation_policy='Foreground')
ret = ext_client.delete_namespaced_deployment(
@@ -177,7 +177,16 @@ class K8S(Driver):
namespace=namespace,
body=body
)
- logger.info(ret)
+ logger.debug(ret)
+ _uid = None
+ for uid, value in self.cache.items():
+ if value[0]['name'] == name:
+ _uid = uid
+ break
+ if _uid:
+ self.cache.pop(_uid)
+ else:
+ raise exceptions.DockerError("Cannot find and delete pod named {}".format(name))
def delete_service(self, name, namespace="moon", api_client=None):
if not api_client:
@@ -185,12 +194,45 @@ class K8S(Driver):
ret = api_client.delete_namespaced_service(name=name, namespace=namespace)
logger.debug("delete_service {}".format(ret))
- def get_slaves(self):
+ def get_slaves(self, active=False):
+ contexts, active_context = self.get_contexts()
+ pods = self.get_pods()
+ # logger.info("pods = {}".format(pods))
+ slaves = []
+ if active:
+ for key, value in pods.items():
+ # logger.info("ctx={}".format(active_context))
+ # logger.info("value={}".format(value))
+ if active_context["name"] == value[0].get('slave_name'):
+ data = dict(active_context)
+ data["wrapper_name"] = value[0]['name']
+ data["ip"] = value[0].get("ip", "NC")
+ data["port"] = value[0].get("external_port", "NC")
+ slaves.append(data)
+ break
+ return slaves
+ for ctx in contexts:
+ data = dict(ctx)
+ data["configured"] = False
+ for key, value in pods.items():
+ # logger.info("ctx={}".format(ctx))
+ # logger.info("value={}".format(value))
+ if ctx["name"] == value[0].get('slave_name'):
+ data["wrapper_name"] = value[0]['name']
+ data["ip"] = value[0].get("ip", "NC")
+ data["port"] = value[0].get("external_port", "NC")
+ data["configured"] = True
+ break
+ slaves.append(data)
+ return slaves
+
+ @staticmethod
+ def get_contexts():
contexts, active_context = config.list_kube_config_contexts()
return contexts, active_context
- def create_wrappers(self):
- contexts, active_context = self.get_slaves()
+ def create_wrappers(self, slave_name=None):
+ contexts, active_context = self.get_contexts()
logger.debug("contexts: {}".format(contexts))
logger.debug("active_context: {}".format(active_context))
conf = configuration.get_configuration("components/wrapper")
@@ -201,6 +243,8 @@ class K8S(Driver):
"container",
"wukongsun/moon_wrapper:v4.3")
for _ctx in contexts:
+ if slave_name and slave_name != _ctx['name']:
+ continue
_config = config.new_client_from_config(context=_ctx['name'])
logger.debug("_config={}".format(_config))
api_client = client.CoreV1Api(_config)
@@ -209,14 +253,56 @@ class K8S(Driver):
"name": hostname + "-" + get_random_name(),
"container": container,
"port": port,
- "namespace": "moon"
+ "namespace": "moon",
+ "slave_name": _ctx['name']
}, ]
self.load_deployment_and_service(data, api_client, ext_client, expose=True)
+ def delete_wrapper(self, uuid=None, name=None, namespace="moon",
+ active_context=None,
+ active_context_name=None):
+ name_to_delete = None
+ if uuid and uuid in self.get_pods():
+ name_to_delete = self.get_pods()[uuid][0]['name']
+ elif name:
+ for pod_key, pod_list in self.get_pods().items():
+ for pod_value in pod_list:
+ if pod_value.get("name") == name:
+ name_to_delete = pod_value.get("name")
+ break
+ if not name_to_delete:
+ raise exceptions.WrapperUnknown
+ contexts, _active_context = self.get_contexts()
+ if active_context_name:
+ for _context in contexts:
+ if _context["name"] == active_context_name:
+ active_context = _context
+ break
+ if active_context:
+ active_context = _active_context
+ _config = config.new_client_from_config(
+ context=active_context['name'])
+ logger.debug("_config={}".format(_config))
+ api_client = client.CoreV1Api(_config)
+ ext_client = client.ExtensionsV1beta1Api(_config)
+ self.delete_deployment(name=name_to_delete, namespace=namespace,
+ ext_client=ext_client)
+ self.delete_service(name=name_to_delete, api_client=api_client)
+ return
+ logger.debug("contexts={}".format(contexts))
+ for _ctx in contexts:
+ _config = config.new_client_from_config(context=_ctx['name'])
+ logger.debug("_config={}".format(_config))
+ api_client = client.CoreV1Api(_config)
+ ext_client = client.ExtensionsV1beta1Api(_config)
+ self.delete_deployment(name=name_to_delete, namespace=namespace,
+ ext_client=ext_client)
+ self.delete_service(name=name_to_delete, api_client=api_client)
+
def create_pipeline(self, keystone_project_id,
pdp_id, policy_ids, manager_data=None,
active_context=None,
- active_context_name=None):
+ slave_name=None):
""" Create security functions
:param keystone_project_id: the Keystone project id
@@ -225,7 +311,7 @@ class K8S(Driver):
:param manager_data: data needed to create pods
:param active_context: if present, add the security function in this
context
- :param active_context_name: if present, add the security function in
+ :param slave_name: if present, add the security function in
this context name
if active_context_name and active_context are not present, add the
security function in all context (ie, in all slaves)
@@ -259,6 +345,8 @@ class K8S(Driver):
},
]
logger.debug("data={}".format(data))
+ # When policies and models are empty, is it right that it returns 200 ?
+ # Should it return no found policies or models ?
policies = manager_data.get('policies')
if not policies:
logger.info("No policy data from Manager, trying to get them")
@@ -274,6 +362,8 @@ class K8S(Driver):
"models", dict())
logger.debug("models={}".format(models))
+ if not policy_ids:
+ raise exceptions.PolicyUnknown
for policy_id in policy_ids:
if policy_id in policies:
genre = policies[policy_id].get("genre", "authz")
@@ -291,12 +381,12 @@ class K8S(Driver):
"namespace": "moon"
})
logger.debug("data={}".format(data))
- contexts, _active_context = self.get_slaves()
- logger.debug("active_context_name={}".format(active_context_name))
+ contexts, _active_context = self.get_contexts()
+ logger.debug("active_context_name={}".format(slave_name))
logger.debug("active_context={}".format(active_context))
- if active_context_name:
+ if slave_name:
for _context in contexts:
- if _context["name"] == active_context_name:
+ if _context["name"] == slave_name:
active_context = _context
break
if active_context:
@@ -310,6 +400,8 @@ class K8S(Driver):
return
logger.debug("contexts={}".format(contexts))
for _ctx in contexts:
+ if slave_name and slave_name != _ctx['name']:
+ continue
_config = config.new_client_from_config(context=_ctx['name'])
logger.debug("_config={}".format(_config))
api_client = client.CoreV1Api(_config)
@@ -338,9 +430,9 @@ class K8S(Driver):
name_to_delete = pod_value.get("name")
break
if not name_to_delete:
- raise exceptions.MoonError("Cannot find pipeline")
+ raise exceptions.PipelineUnknown
logger.info("Will delete deployment and service named {}".format(name_to_delete))
- contexts, _active_context = self.get_slaves()
+ contexts, _active_context = self.get_contexts()
if active_context_name:
for _context in contexts:
if _context["name"] == active_context_name:
diff --git a/moon_orchestrator/moon_orchestrator/http_server.py b/moon_orchestrator/moon_orchestrator/http_server.py
index fa5308d0..85e29cd0 100644
--- a/moon_orchestrator/moon_orchestrator/http_server.py
+++ b/moon_orchestrator/moon_orchestrator/http_server.py
@@ -10,6 +10,7 @@ import requests
import time
from moon_orchestrator import __version__
from moon_orchestrator.api.pods import Pods
+from moon_orchestrator.api.slaves import Slaves
from moon_orchestrator.api.generic import Status
from moon_orchestrator.drivers import get_driver
from python_moonutilities import configuration, exceptions
@@ -122,7 +123,7 @@ class HTTPServer(Server):
if "pdps" in pdp.json():
break
logger.debug("pdp={}".format(pdp))
- self.driver.create_wrappers()
+ # self.driver.create_wrappers()
for _pdp_key, _pdp_value in pdp.json()['pdps'].items():
if _pdp_value.get('keystone_project_id'):
# TODO: select context to add security function
@@ -151,6 +152,10 @@ class HTTPServer(Server):
resource_class_kwargs={
"driver": self.driver
})
+ self.api.add_resource(Slaves, *Slaves.__urls__,
+ resource_class_kwargs={
+ "driver": self.driver
+ })
def run(self):
self.app.run(host=self._host, port=self._port) # nosec
diff --git a/moon_orchestrator/tests/unit_python/test_pods.py b/moon_orchestrator/tests/unit_python/test_pods.py
index 0a5a5ba5..678645be 100644
--- a/moon_orchestrator/tests/unit_python/test_pods.py
+++ b/moon_orchestrator/tests/unit_python/test_pods.py
@@ -17,7 +17,21 @@ def test_get_pods(context, monkeypatch):
assert "pods" in data
-def test_add_pods(context, monkeypatch):
+def test_get_pods_failure(context, monkeypatch):
+ patch_k8s(monkeypatch)
+
+ import moon_orchestrator.server
+ server = moon_orchestrator.server.create_server()
+ _client = server.app.test_client()
+ req = _client.get("/pods/invalid")
+ assert req.status_code == 200
+ assert req.data
+ data = get_json(req.data)
+ assert isinstance(data, dict)
+ assert not data["pods"]
+
+
+def test_add_pods_with_pipeline(context, monkeypatch):
patch_k8s(monkeypatch)
import moon_orchestrator.server
@@ -38,6 +52,94 @@ def test_add_pods(context, monkeypatch):
assert data["pods"]
+def test_add_pods_without_pipeline_with_bad_slave_name(context, monkeypatch):
+ patch_k8s(monkeypatch)
+
+ import moon_orchestrator.server
+ server = moon_orchestrator.server.create_server()
+ _client = server.app.test_client()
+ data = {
+ "slave_name": "test",
+ }
+ req = _client.post("/pods", data=json.dumps(data),
+ headers={'Content-Type': 'application/json'})
+ assert req.status_code == 400
+ assert req.data
+ data = get_json(req.data)
+ assert isinstance(data, dict)
+ assert 'The slave is unknown.' in data['message']
+
+
+def test_add_pods_without_pipeline_with_good_slave_name(context, monkeypatch):
+ patch_k8s(monkeypatch)
+
+ import moon_orchestrator.server
+ server = moon_orchestrator.server.create_server()
+ _client = server.app.test_client()
+ data = {
+ "slave_name": "active_context",
+ }
+ req = _client.post("/pods", data=json.dumps(data),
+ headers={'Content-Type': 'application/json'})
+ assert req.status_code == 200
+ assert req.data
+ data = get_json(req.data)
+ assert isinstance(data, dict)
+ assert "pods" in data
+ assert data["pods"]
+
+
+def test_add_pods_without_pipeline_without_slave_name(context, monkeypatch):
+ patch_k8s(monkeypatch)
+
+ import moon_orchestrator.server
+ server = moon_orchestrator.server.create_server()
+ _client = server.app.test_client()
+ data = {
+ }
+ req = _client.post("/pods", data=json.dumps(data),
+ headers={'Content-Type': 'application/json'})
+ assert req.status_code == 400
+ assert req.data
+ data = get_json(req.data)
+ assert isinstance(data, dict)
+ assert 'The slave is unknown.' in data['message']
+
+
+def test_add_pods_with_no_data(context, monkeypatch):
+ patch_k8s(monkeypatch)
+ import moon_orchestrator.server
+ server = moon_orchestrator.server.create_server()
+ _client = server.app.test_client()
+ req = _client.post("/pods", data=json.dumps({}),
+ headers={'Content-Type': 'application/json'})
+ assert req.status_code == 400
+ assert req.data
+ data = get_json(req.data)
+ assert 'The slave is unknown.' in data['message']
+
+
+def test_add_pods_with_no_policies_no_models(context, monkeypatch, no_requests):
+ patch_k8s(monkeypatch)
+
+ import moon_orchestrator.server
+ server = moon_orchestrator.server.create_server()
+ _client = server.app.test_client()
+ no_requests.get("http://manager:8082/policies",
+ json={'policies': {}})
+
+ no_requests.get("http://manager:8082/models",
+ json={'models': {}})
+ data = {
+ "keystone_project_id": context.get('project_id'),
+ "pdp_id": context.get('pdp_id'),
+ "security_pipeline": context.get('security_pipeline'),
+ }
+ req = _client.post("/pods", data=json.dumps(data),
+ headers={'Content-Type': 'application/json'})
+ assert req.status_code == 200
+
+
def test_delete_pods(context, monkeypatch):
# TODO
pass
diff --git a/moon_orchestrator/tests/unit_python/test_slaves.py b/moon_orchestrator/tests/unit_python/test_slaves.py
new file mode 100644
index 00000000..88ff7e55
--- /dev/null
+++ b/moon_orchestrator/tests/unit_python/test_slaves.py
@@ -0,0 +1,17 @@
+import json
+from mock_pods import patch_k8s
+from utilities import get_json
+
+
+def test_get_slaves(context, monkeypatch):
+ patch_k8s(monkeypatch)
+
+ import moon_orchestrator.server
+ server = moon_orchestrator.server.create_server()
+ _client = server.app.test_client()
+ req = _client.get("/slaves")
+ assert req.status_code == 200
+ assert req.data
+ data = get_json(req.data)
+ assert isinstance(data, dict)
+ assert "slaves" in data
diff --git a/python_moonclient/Changelog b/python_moonclient/Changelog
index f6f6c3a4..64ae76ba 100644
--- a/python_moonclient/Changelog
+++ b/python_moonclient/Changelog
@@ -30,3 +30,10 @@ CHANGES
- moon_create_pdp
- moon_send_authz_to_wrapper
- Fix a bug in pdp library
+
+1.2.0
+-----
+- Add some commands:
+ - moon_get_slaves
+ - moon_set_slave
+ - moon_delete_slave
diff --git a/python_moonclient/python_moonclient/__init__.py b/python_moonclient/python_moonclient/__init__.py
index 2302dea9..2c7f8f5c 100644
--- a/python_moonclient/python_moonclient/__init__.py
+++ b/python_moonclient/python_moonclient/__init__.py
@@ -3,4 +3,4 @@
# license which can be found in the file 'LICENSE' in this package distribution
# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-__version__ = "1.1.0"
+__version__ = "1.2.0"
diff --git a/python_moonclient/python_moonclient/scripts.py b/python_moonclient/python_moonclient/scripts.py
index c880e497..74ed47fc 100644
--- a/python_moonclient/python_moonclient/scripts.py
+++ b/python_moonclient/python_moonclient/scripts.py
@@ -1,6 +1,6 @@
import logging
from importlib.machinery import SourceFileLoader
-from . import parse, models, policies, pdp, authz
+from . import parse, models, policies, pdp, authz, slaves
logger = logging.getLogger("moonclient.scripts")
@@ -161,3 +161,75 @@ def map_pdp_to_project():
logger.info("Mapping: {}=>{}".format(args.filename[0], args.filename[1]))
# TODO: check if pdp_id and keystone_project_id exist
pdp.map_to_keystone(pdp_id=args.filename[0], keystone_project_id=args.filename[1])
+
+
+def get_slaves():
+ requests_log = logging.getLogger("requests.packages.urllib3")
+ requests_log.setLevel(logging.WARNING)
+ requests_log.propagate = True
+
+ args = parse.parse()
+ consul_host = args.consul_host
+ consul_port = args.consul_port
+
+ models.init(consul_host, consul_port)
+ policies.init(consul_host, consul_port)
+ pdp.init(consul_host, consul_port)
+ slaves.init(consul_host, consul_port)
+
+ for value in slaves.get_slaves().get('slaves', dict()):
+ if value['configured']:
+ print(" {} (configured)".format(value['name']))
+ else:
+ print(" {} (not configured)".format(value['name']))
+
+
+def set_slave():
+ requests_log = logging.getLogger("requests.packages.urllib3")
+ requests_log.setLevel(logging.WARNING)
+ requests_log.propagate = True
+
+ args = parse.parse()
+ consul_host = args.consul_host
+ consul_port = args.consul_port
+
+ models.init(consul_host, consul_port)
+ policies.init(consul_host, consul_port)
+ pdp.init(consul_host, consul_port)
+ slaves.init(consul_host, consul_port)
+
+ slave_name = "kubernetes-admin@kubernetes"
+ if args.filename:
+ slave_name = args.filename
+ for value in slaves.set_slave(slave_name).get('slaves', dict()):
+ if value['configured']:
+ print(" {} (configured)".format(value['name']))
+ else:
+ print(" {} (not configured)".format(value['name']))
+
+
+def delete_slave():
+ requests_log = logging.getLogger("requests.packages.urllib3")
+ requests_log.setLevel(logging.WARNING)
+ requests_log.propagate = True
+
+ args = parse.parse()
+ consul_host = args.consul_host
+ consul_port = args.consul_port
+
+ models.init(consul_host, consul_port)
+ policies.init(consul_host, consul_port)
+ pdp.init(consul_host, consul_port)
+ slaves.init(consul_host, consul_port)
+
+ slave_name = "kubernetes-admin@kubernetes"
+ if args.filename:
+ slave_name = args.filename
+ for value in slaves.delete_slave(slave_name).get('slaves', dict()):
+ if value['configured']:
+ print(" {} (configured)".format(value['name']))
+ else:
+ print(" {} (not configured)".format(value['name']))
+
+
+
diff --git a/python_moonclient/python_moonclient/slaves.py b/python_moonclient/python_moonclient/slaves.py
new file mode 100644
index 00000000..3554341d
--- /dev/null
+++ b/python_moonclient/python_moonclient/slaves.py
@@ -0,0 +1,61 @@
+import logging
+import requests
+import copy
+from . import config
+
+logger = logging.getLogger("moonclient.slaves")
+
+
+URL = None
+HEADERS = None
+
+
+def init(consul_host, consul_port):
+ conf_data = config.get_config_data(consul_host, consul_port)
+ global URL, HEADERS
+ URL = "http://{}:{}".format(
+ conf_data['manager_host'],
+ conf_data['manager_port'])
+ URL = URL + "{}"
+ HEADERS = {"content-type": "application/json"}
+
+
+def get_slaves():
+ req = requests.get(URL.format("/slaves"))
+ assert req.status_code == 200
+ result = req.json()
+ assert type(result) is dict
+ assert "slaves" in result
+ return result
+
+
+def set_slave(name):
+ slaves = get_slaves().get("slaves", [])
+ names = map(lambda x: x['name'], slaves)
+ assert name in names
+ req = requests.patch(URL.format("/slaves/{}".format(name)),
+ headers=HEADERS,
+ json={
+ "op": "replace",
+ "variable": "configured",
+ "value": True
+ })
+ assert req.status_code == 200
+ result = req.json()
+ assert type(result) is dict
+ assert "slaves" in result
+ return get_slaves()
+
+
+def delete_slave(name):
+ slaves = get_slaves().get("slaves", [])
+ names = map(lambda x: x['name'], slaves)
+ assert name in names
+ req = requests.patch(URL.format("/slaves/{}".format(name)),
+ headers=HEADERS,
+ json={
+ "op": "replace",
+ "variable": "configured",
+ "value": False
+ })
+ return get_slaves()
diff --git a/python_moonclient/setup.py b/python_moonclient/setup.py
index 709e3ffa..dcb90365 100644
--- a/python_moonclient/setup.py
+++ b/python_moonclient/setup.py
@@ -48,7 +48,10 @@ setup(
'moon_delete_pdp = python_moonclient.scripts:delete_pdp',
'moon_delete_policy = python_moonclient.scripts:delete_policy',
'moon_map_pdp_to_project = python_moonclient.scripts:map_pdp_to_project',
- 'moon_send_authz_to_wrapper = python_moonclient.scripts:send_authz_to_wrapper'
+ 'moon_send_authz_to_wrapper = python_moonclient.scripts:send_authz_to_wrapper',
+ 'moon_get_slaves = python_moonclient.scripts:get_slaves',
+ 'moon_set_slave = python_moonclient.scripts:set_slave',
+ 'moon_delete_slave = python_moonclient.scripts:delete_slave'
],
}
diff --git a/python_moonclient/tests/unit_python/__init__.py b/python_moonclient/tests/unit_python/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/python_moonclient/tests/unit_python/__init__.py
diff --git a/python_moondb/python_moondb/api/policy.py b/python_moondb/python_moondb/api/policy.py
index 97866bfd..ca313f9a 100644
--- a/python_moondb/python_moondb/api/policy.py
+++ b/python_moondb/python_moondb/api/policy.py
@@ -22,12 +22,16 @@ class PolicyManager(Managers):
policies = self.PolicyManager.get_policies("admin")
models = self.ModelManager.get_models("admin")
for pdp_key, pdp_value in self.PDPManager.get_pdp(user_id).items():
+ if 'security_pipeline' not in pdp_value:
+ raise exceptions.PdpContentError
for policy_id in pdp_value["security_pipeline"]:
- if not policies:
+ if not policies or policy_id not in policies:
raise exceptions.PolicyUnknown
model_id = policies[policy_id]["model_id"]
if not models:
raise exceptions.ModelUnknown
+ if model_id not in models:
+ raise exceptions.ModelUnknown
if meta_rule_id in models[model_id]["meta_rules"]:
return policy_id
@@ -78,6 +82,8 @@ class PolicyManager(Managers):
value.get('name'))
perimeter_id = uuid4().hex
value.update(k_user['users'][0])
+ if not self.get_policies(user_id=user_id, policy_id=policy_id):
+ raise exceptions.PolicyUnknown
return self.driver.set_subject(policy_id=policy_id, perimeter_id=perimeter_id, value=value)
@enforce(("read", "write"), "perimeter")
@@ -90,6 +96,8 @@ class PolicyManager(Managers):
@enforce(("read", "write"), "perimeter")
def add_object(self, user_id, policy_id, perimeter_id=None, value=None):
+ if not self.get_policies(user_id=user_id, policy_id=policy_id):
+ raise exceptions.PolicyUnknown
if not perimeter_id:
perimeter_id = uuid4().hex
return self.driver.set_object(policy_id=policy_id, perimeter_id=perimeter_id, value=value)
@@ -104,6 +112,8 @@ class PolicyManager(Managers):
@enforce(("read", "write"), "perimeter")
def add_action(self, user_id, policy_id, perimeter_id=None, value=None):
+ if not self.get_policies(user_id=user_id, policy_id=policy_id):
+ raise exceptions.PolicyUnknown
if not perimeter_id:
perimeter_id = uuid4().hex
return self.driver.set_action(policy_id=policy_id, perimeter_id=perimeter_id, value=value)
@@ -127,6 +137,10 @@ class PolicyManager(Managers):
@enforce(("read", "write"), "data")
def set_subject_data(self, user_id, policy_id, data_id=None, category_id=None, value=None):
+ if not category_id:
+ raise Exception('Invalid category id')
+ if not self.get_policies(user_id=user_id, policy_id=policy_id):
+ raise exceptions.PolicyUnknown
if not data_id:
data_id = uuid4().hex
return self.driver.set_subject_data(policy_id=policy_id, data_id=data_id, category_id=category_id, value=value)
@@ -151,6 +165,10 @@ class PolicyManager(Managers):
@enforce(("read", "write"), "data")
def add_object_data(self, user_id, policy_id, data_id=None, category_id=None, value=None):
+ if not category_id:
+ raise Exception('Invalid category id')
+ if not self.get_policies(user_id=user_id, policy_id=policy_id):
+ raise exceptions.PolicyUnknown
if not data_id:
data_id = uuid4().hex
return self.driver.set_object_data(policy_id=policy_id, data_id=data_id, category_id=category_id, value=value)
@@ -167,14 +185,18 @@ class PolicyManager(Managers):
if not category_id:
for cat in available_metadata["action"]:
results.append(self.driver.get_action_data(policy_id=policy_id, data_id=data_id,
- category_id=cat))
+ category_id=cat))
if category_id and category_id in available_metadata["action"]:
results.append(self.driver.get_action_data(policy_id=policy_id, data_id=data_id,
- category_id=category_id))
+ category_id=category_id))
return results
@enforce(("read", "write"), "data")
def add_action_data(self, user_id, policy_id, data_id=None, category_id=None, value=None):
+ if not category_id:
+ raise Exception('Invalid category id')
+ if not self.get_policies(user_id=user_id, policy_id=policy_id):
+ raise exceptions.PolicyUnknown
if not data_id:
data_id = uuid4().hex
return self.driver.set_action_data(policy_id=policy_id, data_id=data_id, category_id=category_id, value=value)
@@ -190,6 +212,8 @@ class PolicyManager(Managers):
@enforce(("read", "write"), "assignments")
def add_subject_assignment(self, user_id, policy_id, subject_id, category_id, data_id):
+ if not self.get_policies(user_id=user_id, policy_id=policy_id):
+ raise exceptions.PolicyUnknown
return self.driver.add_subject_assignment(policy_id=policy_id, subject_id=subject_id,
category_id=category_id, data_id=data_id)
@@ -204,6 +228,8 @@ class PolicyManager(Managers):
@enforce(("read", "write"), "assignments")
def add_object_assignment(self, user_id, policy_id, object_id, category_id, data_id):
+ if not self.get_policies(user_id=user_id, policy_id=policy_id):
+ raise exceptions.PolicyUnknown
return self.driver.add_object_assignment(policy_id=policy_id, object_id=object_id,
category_id=category_id, data_id=data_id)
@@ -218,6 +244,8 @@ class PolicyManager(Managers):
@enforce(("read", "write"), "assignments")
def add_action_assignment(self, user_id, policy_id, action_id, category_id, data_id):
+ if not self.get_policies(user_id=user_id, policy_id=policy_id):
+ raise exceptions.PolicyUnknown
return self.driver.add_action_assignment(policy_id=policy_id, action_id=action_id,
category_id=category_id, data_id=data_id)
@@ -232,6 +260,8 @@ class PolicyManager(Managers):
@enforce(("read", "write"), "rules")
def add_rule(self, user_id, policy_id, meta_rule_id, value):
+ if not self.get_policies(user_id=user_id, policy_id=policy_id):
+ raise exceptions.PolicyUnknown
return self.driver.add_rule(policy_id=policy_id, meta_rule_id=meta_rule_id, value=value)
@enforce(("read", "write"), "rules")
diff --git a/python_moondb/tests/unit_python/policies/test_assignments.py b/python_moondb/tests/unit_python/policies/test_assignments.py
index ccac205a..707632b0 100755
--- a/python_moondb/tests/unit_python/policies/test_assignments.py
+++ b/python_moondb/tests/unit_python/policies/test_assignments.py
@@ -1,3 +1,6 @@
+import policies.mock_data as mock_data
+
+
def get_action_assignments(policy_id, action_id=None, category_id=None):
from python_moondb.core import PolicyManager
return PolicyManager.get_action_assignments("", policy_id, action_id, category_id)
@@ -44,7 +47,7 @@ def delete_subject_assignment(policy_id, subject_id, category_id, data_id):
def test_get_action_assignments(db):
- policy_id = "admin"
+ policy_id = mock_data.get_policy_id()
action_id = "action_id_1"
category_id = "category_id_1"
data_id = "data_id_1"
@@ -59,7 +62,7 @@ def test_get_action_assignments(db):
def test_get_action_assignments_by_policy_id(db):
- policy_id = "admin"
+ policy_id = mock_data.get_policy_id()
action_id = "action_id_1"
category_id = "category_id_1"
data_id = "data_id_1"
@@ -77,7 +80,7 @@ def test_get_action_assignments_by_policy_id(db):
def test_add_action_assignments(db):
- policy_id = "admin"
+ policy_id = mock_data.get_policy_id()
action_id = "action_id_1"
category_id = "category_id_1"
data_id = "data_id_1"
@@ -92,9 +95,9 @@ def test_add_action_assignments(db):
def test_delete_action_assignment(db):
- policy_id = "admin_1"
+ policy_id = mock_data.get_policy_id()
add_action_assignment(policy_id, "", "", "")
- policy_id = "admin_2"
+ policy_id = mock_data.get_policy_id()
action_id = "action_id_2"
category_id = "category_id_2"
data_id = "data_id_2"
@@ -112,7 +115,7 @@ def test_delete_action_assignment_with_invalid_policy_id(db):
def test_get_object_assignments(db):
- policy_id = "admin"
+ policy_id = mock_data.get_policy_id()
object_id = "object_id_1"
category_id = "category_id_1"
data_id = "data_id_1"
@@ -127,7 +130,7 @@ def test_get_object_assignments(db):
def test_get_object_assignments_by_policy_id(db):
- policy_id = "admin"
+ policy_id = mock_data.get_policy_id()
object_id_1 = "object_id_1"
category_id_1 = "category_id_1"
data_id = "data_id_1"
@@ -145,7 +148,7 @@ def test_get_object_assignments_by_policy_id(db):
def test_add_object_assignments(db):
- policy_id = "admin"
+ policy_id = mock_data.get_policy_id()
object_id = "object_id_1"
category_id = "category_id_1"
data_id = "data_id_1"
@@ -160,7 +163,7 @@ def test_add_object_assignments(db):
def test_delete_object_assignment(db):
- policy_id = "admin_1"
+ policy_id = mock_data.get_policy_id()
add_object_assignment(policy_id, "", "", "")
object_id = "action_id_2"
category_id = "category_id_2"
@@ -179,7 +182,7 @@ def test_delete_object_assignment_with_invalid_policy_id(db):
def test_get_subject_assignments(db):
- policy_id = "admin"
+ policy_id = mock_data.get_policy_id()
subject_id = "object_id_1"
category_id = "category_id_1"
data_id = "data_id_1"
@@ -194,7 +197,7 @@ def test_get_subject_assignments(db):
def test_get_subject_assignments_by_policy_id(db):
- policy_id = "admin"
+ policy_id = mock_data.get_policy_id()
subject_id_1 = "subject_id_1"
category_id_1 = "category_id_1"
data_id = "data_id_1"
@@ -212,7 +215,7 @@ def test_get_subject_assignments_by_policy_id(db):
def test_add_subject_assignments(db):
- policy_id = "admin"
+ policy_id = mock_data.get_policy_id()
subject_id = "subject_id_1"
category_id = "category_id_1"
data_id = "data_id_1"
@@ -227,7 +230,7 @@ def test_add_subject_assignments(db):
def test_delete_subject_assignment(db):
- policy_id = "admin_1"
+ policy_id = mock_data.get_policy_id()
add_subject_assignment(policy_id, "", "", "")
subject_id = "subject_id_2"
category_id = "category_id_2"
diff --git a/python_moondb/tests/unit_python/policies/test_data.py b/python_moondb/tests/unit_python/policies/test_data.py
index 875121eb..67fa44fb 100755
--- a/python_moondb/tests/unit_python/policies/test_data.py
+++ b/python_moondb/tests/unit_python/policies/test_data.py
@@ -117,8 +117,6 @@ def test_get_action_data(db):
def test_get_action_data_with_invalid_category_id(db):
policy_id = mock_data.get_policy_id()
get_available_metadata(policy_id)
-
- policy_id = policy_id
data_id = "data_id_1"
category_id = "action_category_id1"
value = {
@@ -132,7 +130,7 @@ def test_get_action_data_with_invalid_category_id(db):
def test_add_action_data(db):
- policy_id = "policy_id_1"
+ policy_id = mock_data.get_policy_id()
data_id = "data_id_1"
category_id = "category_id_1"
value = {
@@ -145,6 +143,18 @@ def test_add_action_data(db):
assert action_data[action_data_id].get('policy_id') == policy_id
+def test_add_action_data_with_invalid_category_id(db):
+ policy_id = mock_data.get_policy_id()
+ data_id = "data_id_1"
+ value = {
+ "name": "action-type",
+ "description": {"vm-action": "", "storage-action": "", },
+ }
+ with pytest.raises(Exception) as exception_info:
+ add_action_data(policy_id=policy_id, data_id=data_id, value=value).get('data')
+ assert str(exception_info.value) == 'Invalid category id'
+
+
def test_delete_action_data(db):
policy_id = mock_data.get_policy_id()
get_available_metadata(policy_id)
@@ -164,8 +174,6 @@ def test_delete_action_data(db):
def test_get_object_data(db):
policy_id = mock_data.get_policy_id()
get_available_metadata(policy_id)
-
- policy_id = policy_id
data_id = "data_id_1"
category_id = "object_category_id1"
value = {
@@ -181,8 +189,6 @@ def test_get_object_data(db):
def test_get_object_data_with_invalid_category_id(db):
policy_id = mock_data.get_policy_id()
get_available_metadata(policy_id)
-
- policy_id = policy_id
data_id = "data_id_1"
category_id = "object_category_id1"
value = {
@@ -196,7 +202,7 @@ def test_get_object_data_with_invalid_category_id(db):
def test_add_object_data(db):
- policy_id = "policy_id_1"
+ policy_id = mock_data.get_policy_id()
data_id = "data_id_1"
category_id = "object_category_id1"
value = {
@@ -209,6 +215,18 @@ def test_add_object_data(db):
assert object_data[object_data_id].get('policy_id') == policy_id
+def test_add_object_data_with_invalid_category_id(db):
+ policy_id = mock_data.get_policy_id()
+ data_id = "data_id_1"
+ value = {
+ "name": "object-security-level",
+ "description": {"low": "", "medium": "", "high": ""},
+ }
+ with pytest.raises(Exception) as exception_info:
+ add_object_data(policy_id=policy_id, data_id=data_id, value=value).get('data')
+ assert str(exception_info.value) == 'Invalid category id'
+
+
def test_delete_object_data(db):
policy_id = mock_data.get_policy_id()
get_available_metadata(policy_id)
@@ -228,8 +246,6 @@ def test_delete_object_data(db):
def test_get_subject_data(db):
policy_id = mock_data.get_policy_id()
get_available_metadata(policy_id)
-
- policy_id = policy_id
data_id = "data_id_1"
category_id = "subject_category_id1"
value = {
@@ -245,8 +261,6 @@ def test_get_subject_data(db):
def test_get_subject_data_with_invalid_category_id(db):
policy_id = mock_data.get_policy_id()
get_available_metadata(policy_id)
-
- policy_id = policy_id
data_id = "data_id_1"
category_id = "subject_category_id1"
value = {
@@ -260,19 +274,31 @@ def test_get_subject_data_with_invalid_category_id(db):
def test_add_subject_data(db):
- policy_id = "policy_id_1"
+ policy_id = mock_data.get_policy_id()
data_id = "data_id_1"
category_id = "subject_category_id1"
value = {
"name": "subject-security-level",
"description": {"low": "", "medium": "", "high": ""},
}
- subject_data = add_object_data(policy_id, data_id, category_id, value).get('data')
+ subject_data = add_subject_data(policy_id, data_id, category_id, value).get('data')
assert subject_data
subject_data_id = list(subject_data.keys())[0]
assert subject_data[subject_data_id].get('policy_id') == policy_id
+def test_add_subject_data_with_no_category_id(db):
+ policy_id = mock_data.get_policy_id()
+ data_id = "data_id_1"
+ value = {
+ "name": "subject-security-level",
+ "description": {"low": "", "medium": "", "high": ""},
+ }
+ with pytest.raises(Exception) as exception_info:
+ add_subject_data(policy_id=policy_id, data_id=data_id, value=value).get('data')
+ assert str(exception_info.value) == 'Invalid category id'
+
+
def test_delete_subject_data(db):
policy_id = mock_data.get_policy_id()
get_available_metadata(policy_id)
@@ -290,7 +316,7 @@ def test_delete_subject_data(db):
def test_get_actions(db):
- policy_id = "policy_id_1"
+ policy_id = mock_data.get_policy_id()
value = {
"name": "test_action",
"description": "test",
@@ -304,7 +330,7 @@ def test_get_actions(db):
def test_add_action(db):
- policy_id = "policy_id_1"
+ policy_id = mock_data.get_policy_id()
value = {
"name": "test_action",
"description": "test",
@@ -316,7 +342,7 @@ def test_add_action(db):
def test_add_action_multiple_times(db):
- policy_id = "policy_id_1"
+ policy_id = mock_data.get_policy_id()
value = {
"name": "test_action",
"description": "test",
@@ -330,14 +356,14 @@ def test_add_action_multiple_times(db):
"description": "test",
"policy_list": ['policy_id_3', 'policy_id_4']
}
- action = add_action('policy_id_7', perimeter_id, value)
+ action = add_action(mock_data.get_policy_id(), perimeter_id, value)
assert action
action_id = list(action.keys())[0]
assert len(action[action_id].get('policy_list')) == 2
def test_delete_action(db):
- policy_id = "policy_id_1"
+ policy_id = mock_data.get_policy_id()
value = {
"name": "test_action",
"description": "test",
@@ -358,7 +384,7 @@ def test_delete_action_with_invalid_perimeter_id(db):
def test_get_objects(db):
- policy_id = "policy_id_1"
+ policy_id = mock_data.get_policy_id()
value = {
"name": "test_object",
"description": "test",
@@ -372,7 +398,7 @@ def test_get_objects(db):
def test_add_object(db):
- policy_id = "policy_id_1"
+ policy_id = mock_data.get_policy_id()
value = {
"name": "test_object",
"description": "test",
@@ -384,7 +410,7 @@ def test_add_object(db):
def test_add_objects_multiple_times(db):
- policy_id = "policy_id_1"
+ policy_id = mock_data.get_policy_id()
value = {
"name": "test_object",
"description": "test",
@@ -398,14 +424,14 @@ def test_add_objects_multiple_times(db):
"description": "test",
"policy_list": ['policy_id_3', 'policy_id_4']
}
- added_object = add_object('policy_id_7', perimeter_id, value)
+ added_object = add_object(mock_data.get_policy_id(), perimeter_id, value)
assert added_object
object_id = list(added_object.keys())[0]
assert len(added_object[object_id].get('policy_list')) == 2
def test_delete_object(db):
- policy_id = "policy_id_1"
+ policy_id = mock_data.get_policy_id()
value = {
"name": "test_object",
"description": "test",
@@ -426,7 +452,7 @@ def test_delete_object_with_invalid_perimeter_id(db):
def test_get_subjects(db):
- policy_id = "policy_id_1"
+ policy_id = mock_data.get_policy_id()
value = {
"name": "testuser",
"description": "test",
@@ -440,7 +466,7 @@ def test_get_subjects(db):
def test_add_subject(db):
- policy_id = "policy_id_1"
+ policy_id = mock_data.get_policy_id()
value = {
"name": "testuser",
"description": "test",
@@ -452,7 +478,7 @@ def test_add_subject(db):
def test_add_subjects_multiple_times(db):
- policy_id = "policy_id_1"
+ policy_id = mock_data.get_policy_id()
value = {
"name": "testuser",
"description": "test",
@@ -466,14 +492,14 @@ def test_add_subjects_multiple_times(db):
"description": "test",
"policy_list": ['policy_id_3', 'policy_id_4']
}
- subject = add_subject('policy_id_7', perimeter_id, value)
+ subject = add_subject(mock_data.get_policy_id(), perimeter_id, value)
assert subject
subject_id = list(subject.keys())[0]
assert len(subject[subject_id].get('policy_list')) == 2
def test_delete_subject(db):
- policy_id = "policy_id_1"
+ policy_id = mock_data.get_policy_id()
value = {
"name": "testuser",
"description": "test",
diff --git a/python_moondb/tests/unit_python/policies/test_policies.py b/python_moondb/tests/unit_python/policies/test_policies.py
index 487cb6a1..148034ef 100755
--- a/python_moondb/tests/unit_python/policies/test_policies.py
+++ b/python_moondb/tests/unit_python/policies/test_policies.py
@@ -231,7 +231,7 @@ def test_get_rules(db):
"instructions": ({"decision": "grant"}),
"enabled": "",
}
- policy_id = "1"
+ policy_id = mock_data.get_policy_id()
meta_rule_id = "1"
add_rule(policy_id, meta_rule_id, value)
value = {
@@ -239,7 +239,6 @@ def test_get_rules(db):
"instructions": ({"decision": "grant"}),
"enabled": "",
}
- policy_id = "1"
meta_rule_id = "1"
add_rule(policy_id, meta_rule_id, value)
rules = get_rules(policy_id, meta_rule_id)
@@ -261,7 +260,7 @@ def test_add_rule(db):
"instructions": ({"decision": "grant"}),
"enabled": "",
}
- policy_id = "1"
+ policy_id = mock_data.get_policy_id()
meta_rule_id = "1"
rules = add_rule(policy_id, meta_rule_id, value)
assert rules
@@ -279,7 +278,7 @@ def test_delete_rule(db):
"instructions": ({"decision": "grant"}),
"enabled": "",
}
- policy_id = "2"
+ policy_id = mock_data.get_policy_id()
meta_rule_id = "2"
rules = add_rule(policy_id, meta_rule_id, value)
rule_id = list(rules.keys())[0]
diff --git a/python_moonutilities/Changelog b/python_moonutilities/Changelog
index 2c4c02a8..ffc03809 100644
--- a/python_moonutilities/Changelog
+++ b/python_moonutilities/Changelog
@@ -78,3 +78,7 @@ CHANGES
1.4.5
-----
- Add PdpKeystoneMappingConflict exception
+
+1.4.6
+-----
+- Add WrapperConflict, PipelineConflict, SlaveNameUnknown exceptions
diff --git a/python_moonutilities/python_moonutilities/__init__.py b/python_moonutilities/python_moonutilities/__init__.py
index bcd7e545..741ba4f6 100644
--- a/python_moonutilities/python_moonutilities/__init__.py
+++ b/python_moonutilities/python_moonutilities/__init__.py
@@ -3,6 +3,6 @@
# license which can be found in the file 'LICENSE' in this package distribution
# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-__version__ = "1.4.5"
+__version__ = "1.4.6"
diff --git a/python_moonutilities/python_moonutilities/configuration.py b/python_moonutilities/python_moonutilities/configuration.py
index 4a072de4..0516274c 100644
--- a/python_moonutilities/python_moonutilities/configuration.py
+++ b/python_moonutilities/python_moonutilities/configuration.py
@@ -91,7 +91,10 @@ def get_plugins():
pipeline = get_configuration("components/pipeline")
logger.debug("pipeline={}".format(pipeline))
components = pipeline.get("components/pipeline")
- components.pop('interface')
+ if 'interface' in components:
+ components.pop('interface')
+ else:
+ raise exceptions.ConsulComponentContentError("error= Components pipeline has no interface")
return components
diff --git a/python_moonutilities/python_moonutilities/exceptions.py b/python_moonutilities/python_moonutilities/exceptions.py
index 6db7bf01..1298f9e4 100644
--- a/python_moonutilities/python_moonutilities/exceptions.py
+++ b/python_moonutilities/python_moonutilities/exceptions.py
@@ -535,6 +535,41 @@ class ContainerMissing(DockerError):
logger = "ERROR"
+class WrapperConflict(MoonError):
+ description = _("A Wrapper already exist for the specified slave.")
+ code = 409
+ title = 'Wrapper conflict'
+ logger = "ERROR"
+
+
+class PipelineConflict(MoonError):
+ description = _("A Pipeline already exist for the specified slave.")
+ code = 409
+ title = 'Pipeline conflict'
+ logger = "ERROR"
+
+
+class PipelineUnknown(MoonError):
+ description = _("This Pipeline is unknown from the system.")
+ code = 400
+ title = 'Pipeline Unknown'
+ logger = "ERROR"
+
+
+class WrapperUnknown(MoonError):
+ description = _("This Wrapper is unknown from the system.")
+ code = 400
+ title = 'Wrapper Unknown'
+ logger = "ERROR"
+
+
+class SlaveNameUnknown(MoonError):
+ description = _("The slave is unknown.")
+ code = 400
+ title = 'Slave Unknown'
+ logger = "Error"
+
+
class PdpUnknown(MoonError):
description = _("The pdp is unknown.")
code = 400
diff --git a/python_moonutilities/tests/unit_python/mock_repo/urls.py b/python_moonutilities/tests/unit_python/mock_repo/urls.py
index 634f07b1..41fd1eec 100644
--- a/python_moonutilities/tests/unit_python/mock_repo/urls.py
+++ b/python_moonutilities/tests/unit_python/mock_repo/urls.py
@@ -8,10 +8,7 @@ def register_components(m):
'GET', 'http://consul:8500/v1/kv/{}'.format(component),
json=[{'Key': component, 'Value': comp_util.get_b64_conf(component)}]
)
- m.register_uri(
- 'GET', 'http://consul:8500/v1/kv/components/port_start',
- json=[{'Key': 'components/port_start', 'Value': comp_util.get_b64_conf("components/port_start")}]
- )
+
m.register_uri(
'PUT', 'http://consul:8500/v1/kv/components/port_start',
json=[]
diff --git a/python_moonutilities/tests/unit_python/test_configuration.py b/python_moonutilities/tests/unit_python/test_configuration.py
index 5267179e..d5d83f7a 100644
--- a/python_moonutilities/tests/unit_python/test_configuration.py
+++ b/python_moonutilities/tests/unit_python/test_configuration.py
@@ -98,7 +98,15 @@ def test_get_plugins_success():
plugin = configuration.get_plugins()
assert plugin is not None
-
+def test_get_plugins_failure(no_requests):
+ from python_moonutilities import configuration
+ no_requests.register_uri(
+ 'GET', 'http://consul:8500/v1/kv/components/pipeline',
+ json=[{'Key': 'components/pipeline', 'Value': 'eyJjb250YWluZXIiOiAid3Vrb25nc3VuL21vb25fYXV0aHo6djQuMyIsICJwb3J0IjogODA4MX0='}]
+ )
+ with pytest.raises(Exception) as exception_info:
+ configuration.get_plugins()
+ assert str(exception_info.value) == '500: Consul Content error'
################################ component ####################################
def test_get_components():
from python_moonutilities import configuration
diff --git a/tests/README.md b/tests/README.md
deleted file mode 100644
index c1437a2d..00000000
--- a/tests/README.md
+++ /dev/null
@@ -1,77 +0,0 @@
-# Moon Tests
-## Functional Tests
-### Test Platform Setup
-#### Docker Installation
-```bash
-apt update
-apt install -y docker.io
-```
-
-#### Kubeadm Installation
-see: https://kubernetes.io/docs/setup/independent/install-kubeadm/
-```bash
-apt-get update && apt-get install -y apt-transport-https
-curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
-cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
-deb http://apt.kubernetes.io/ kubernetes-xenial main
-EOF
-apt-get update
-apt-get install -y kubelet kubeadm kubectl
-```
-
-#### K8S Initialisation
-```bash
-cd $MOON_HOME
-bash tools/moon_kubernetes/init_k8s.sh
-```
-
-Wait until all the kubeadm containers are in the `running` state:
-```bash
-watch kubectl get po --namespace=kube-system
-```
-
-You must see something like this:
-
- $ kubectl get po --namespace=kube-system
- NAME READY STATUS RESTARTS AGE
- calico-etcd-7qgjb 1/1 Running 0 1h
- calico-node-f8zvm 2/2 Running 1 1h
- calico-policy-controller-59fc4f7888-ns9kv 1/1 Running 0 1h
- etcd-varuna 1/1 Running 0 1h
- kube-apiserver-varuna 1/1 Running 0 1h
- kube-controller-manager-varuna 1/1 Running 0 1h
- kube-dns-bfbb49cd7-rgqxn 3/3 Running 0 1h
- kube-proxy-x88wg 1/1 Running 0 1h
- kube-scheduler-varuna 1/1 Running 0 1h
-
-
-#### Deploy Moon
-```bash
-cd $MOON_HOME
-sudo bash tools/moon_kubernetes/start_moon.sh
-```
-
-Wait until all the Moon containers are in the `running` state:
-```bash
-watch kubectl get po --namespace=moon
-```
-
-You must see something like this:
-
- $ kubectl get po --namespace=moon
- NAME READY STATUS RESTARTS AGE
- consul-57b6d66975-9qnfx 1/1 Running 0 52m
- db-867f9c6666-bq8cf 1/1 Running 0 52m
- gui-bc9878b58-q288x 1/1 Running 0 51m
- keystone-7d9cdbb69f-bl6ln 1/1 Running 0 52m
- manager-5bfbb96988-2nvhd 1/1 Running 0 51m
- manager-5bfbb96988-fg8vj 1/1 Running 0 51m
- manager-5bfbb96988-w9wnk 1/1 Running 0 51m
- orchestrator-65d8fb4574-tnfx2 1/1 Running 0 51m
- wrapper-astonishing-748b7dcc4f-ngsvp 1/1 Running 0 51m
-
-### Launch Functional for Target Module
-```bash
-cd $MOON_HOME
-sudo bash $TARGET_MODULE/tests/functional_pod/run_functional_tests.sh
-```
diff --git a/tests/functional/README.md b/tests/functional/README.md
new file mode 100644
index 00000000..4cac22b6
--- /dev/null
+++ b/tests/functional/README.md
@@ -0,0 +1,27 @@
+# Moon Functional Test
+
+[Test Platform Setup](../../tools/moon_kubernetes/README.md)
+
+
+### Pod Functional Test
+Launch functional [test scenario](tests/functional/scenario_enabled) :
+```bash
+sudo pip install python_moonclient --upgrade
+cd $MOON_HOME/tests/functional/scenario_tests
+moon_create_pdp --consul-host=$MOON_HOST --consul-port=30005 -v rbac_large.py
+moon_get_keystone_project --consul-host=$MOON_HOST --consul-port=30005
+moon_get_pdp --consul-host=$MOON_HOST --consul-port=30005
+moon_map_pdp_to_project "<pdp_id>" "<keystone_project_id>"
+moon_send_authz_to_wrapper --consul-host=$MOON_HOST --consul-port=30005 --authz-host=$WRAPPER_HOST --authz-port=$WRAPPER_PORT -v rbac_large.py
+```
+
+To retrieve the wrapper information, use the following command:
+```bash
+kubectl get -n moon services | grep wrapper
+```
+
+Launch functional tests:
+```bash
+cd $MOON_HOME
+sudo bash $TARGET_MODULE/tests/functional_pod/run_functional_tests.sh
+```
diff --git a/tests/functional/run_tests.sh b/tests/functional/run_tests.sh
new file mode 100644
index 00000000..c5cbabbb
--- /dev/null
+++ b/tests/functional/run_tests.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+
+echo "starting Moon Functional Tests"
+
+COMPONENTS="moon_authz, moon_interface, moon_manager, moon_orchestrator, moon_wrapper"
+
+for dir in ${COMPONENTS}; do
+ echo "Testing component ${dir}"
+ cd ${MOON_HOME}/${dir}
+ docker run --rm --volume $(pwd):/data wukongsun/moon_forming:latest /bin/bash /root/switch.sh functest
+done
+
+# TODO: download tests results
diff --git a/tests/functional/run_tests_for_component.sh b/tests/functional/run_tests_for_component.sh
new file mode 100644
index 00000000..fd9ab7fa
--- /dev/null
+++ b/tests/functional/run_tests_for_component.sh
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+
+CUR_PWD=$(pwd)
+INPUT_FILE=../tools/moon_kubernetes/templates/moon_forming_functest.yaml
+OUTPUT_FILE=tests/functional_pod/moon_forming_functest.yaml
+
+echo current working directory: ${CUR_PWD}
+
+cat ${INPUT_FILE} | sed "s|{{PATH}}|${CUR_PWD}|" > ${OUTPUT_FILE}
+
+kubectl create -f ${OUTPUT_FILE}
+
+sleep 5
+kubectl get -n moon jobs
+echo OUTPUT is $?
+if [ "$?" -ne 0 ]
+then
+ sleep 5
+ kubectl get -n moon jobs
+fi
+
+echo "waiting for FuncTests (it may takes time)..."
+echo -e "\033[35m"
+sed '/<END OF JOB>/q' <(kubectl logs -n moon jobs/functest -f)
+echo -e "\033[m"
+
+kubectl delete -f ${OUTPUT_FILE}
diff --git a/tests/python_unit/README.md b/tests/python_unit/README.md
new file mode 100644
index 00000000..a399f834
--- /dev/null
+++ b/tests/python_unit/README.md
@@ -0,0 +1,5 @@
+# Python Unit Test
+
+```bash
+bash run_tests.sh
+```
diff --git a/tests/python_unit/run_tests.sh b/tests/python_unit/run_tests.sh
new file mode 100644
index 00000000..33c1ab98
--- /dev/null
+++ b/tests/python_unit/run_tests.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+
+echo "starting Moon Functional Tests"
+
+cd python_moonutilities
+docker run --rm --volume $(pwd):/data wukongsun/moon_python_unit_test:latest
+
+cd ../python_moondb
+docker run --rm --volume $(pwd):/data wukongsun/moon_python_unit_test:latest
+
+cd ../python_moonclient
+docker run --rm --volume $(pwd):/data wukongsun/moon_python_unit_test:latest \ No newline at end of file
diff --git a/tools/moon_jenkins/Dockerfile b/tools/moon_jenkins/Dockerfile
new file mode 100644
index 00000000..058f388c
--- /dev/null
+++ b/tools/moon_jenkins/Dockerfile
@@ -0,0 +1,8 @@
+FROM jenkinsci/blueocean
+
+ENV JAVA_OPTS="-Djenkins.install.runSetupWizard=false"
+
+COPY security.groovy /usr/share/jenkins/ref/init.groovy.d/security.groovy
+
+COPY plugins.txt /usr/share/jenkins/ref/plugins.txt
+RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/plugins.txt \ No newline at end of file
diff --git a/tools/moon_jenkins/README.md b/tools/moon_jenkins/README.md
new file mode 100644
index 00000000..684b351c
--- /dev/null
+++ b/tools/moon_jenkins/README.md
@@ -0,0 +1,37 @@
+# Moon Jenkins
+The aim of this repo is to give a quick way to start with jenkins in containers.
+These were the aims of the automation:
+- minimal interaction with Jenkins GUI - the plugins in plugins.txt are installed automatically, the admin user is setup based on environment variables, proxy variables are inherited from environment
+- the build of the custom image is integrated in the same workflow
+
+## Prerequisites
+- one host running a newer version of the docker-engine
+- docker-compose 1.18.0
+
+## Usage
+- Setup secrets:
+```bash
+export JENKINS_USER=admin
+export JENKINS_PASSWORD=admin
+```
+- Deploy jenkins:
+```bash
+docker-compose up -d
+ ```
+- Test: Jenkins GUI can be available on `http://<docker host IP>:8080`
+
+
+## Pipeline Creation
+You may find bellow an example of pipeline creation using BlueOcean interface.
+As example I used a clone (https://github.com/brutus333/moon.git) of the moon project (https://git.opnfv.org/moon/)
+
+Click on "Create a new job" in the classical Jenkins UI and follow the steps highlighted bellow:
+
+![Create Multibranch Pipeline](images/Create%20Multibranch%20Pipeline.png)
+![Select Source](images/Select%20Source%20Multibranch%20Pipeline.png)
+![Configure Source](images/Git%20Source%20Multibranch%20Pipeline.png)
+![Multibranch Pipeline Log](images/Multibranch%20Pipeline%20Log.png)
+
+Clicking on BlueOcean shows the pipeline in the blueocean interface:
+
+![Blue Ocean Pipeline success](images/blue%20ocean%20success%20pipeline.png)
diff --git a/tools/moon_jenkins/docker-compose.yml b/tools/moon_jenkins/docker-compose.yml
new file mode 100644
index 00000000..eb9354ce
--- /dev/null
+++ b/tools/moon_jenkins/docker-compose.yml
@@ -0,0 +1,20 @@
+version: '3.1'
+
+services:
+ jenkins:
+ build:
+ context: .
+ image: blueocean:v0.4
+ ports:
+ - 8080:8080
+ - 50000:50000
+ environment:
+ - jenkins_user=${JENKINS_USER}
+ - jenkins_password=${JENKINS_PASSWORD}
+ volumes:
+ - jenkins-data:/var/jenkins_home
+ - /var/run/docker.sock:/var/run/docker.sock
+ user: root
+
+volumes:
+ jenkins-data: \ No newline at end of file
diff --git a/tools/moon_jenkins/images/Create Multibranch Pipeline.png b/tools/moon_jenkins/images/Create Multibranch Pipeline.png
new file mode 100644
index 00000000..c71415c0
--- /dev/null
+++ b/tools/moon_jenkins/images/Create Multibranch Pipeline.png
Binary files differ
diff --git a/tools/moon_jenkins/images/Git Source Multibranch Pipeline.png b/tools/moon_jenkins/images/Git Source Multibranch Pipeline.png
new file mode 100644
index 00000000..dd37f217
--- /dev/null
+++ b/tools/moon_jenkins/images/Git Source Multibranch Pipeline.png
Binary files differ
diff --git a/tools/moon_jenkins/images/Multibranch Pipeline Log.png b/tools/moon_jenkins/images/Multibranch Pipeline Log.png
new file mode 100644
index 00000000..a1905934
--- /dev/null
+++ b/tools/moon_jenkins/images/Multibranch Pipeline Log.png
Binary files differ
diff --git a/tools/moon_jenkins/images/Select Source Multibranch Pipeline.png b/tools/moon_jenkins/images/Select Source Multibranch Pipeline.png
new file mode 100644
index 00000000..eadbe916
--- /dev/null
+++ b/tools/moon_jenkins/images/Select Source Multibranch Pipeline.png
Binary files differ
diff --git a/tools/moon_jenkins/plugins.txt b/tools/moon_jenkins/plugins.txt
new file mode 100644
index 00000000..65bae872
--- /dev/null
+++ b/tools/moon_jenkins/plugins.txt
@@ -0,0 +1,100 @@
+ssh-credentials
+git
+blueocean-dashboard
+pipeline-model-api
+pipeline-graph-analysis
+workflow-support
+display-url-api
+blueocean-config
+workflow-cps
+branch-api
+blueocean-i18n
+workflow-job
+blueocean-bitbucket-pipeline
+favorite
+docker-commons
+pipeline-input-step
+blueocean-pipeline-api-impl
+workflow-api
+jackson2-api
+git-client
+blueocean-pipeline-scm-api
+blueocean
+pipeline-build-step
+jquery-detached
+matrix-project
+antisamy-markup-formatter
+pipeline-model-extensions
+docker-workflow
+github
+git-server
+authentication-tokens
+workflow-cps-global-lib
+pipeline-model-definition
+workflow-scm-step
+pipeline-model-declarative-agent
+cloudbees-bitbucket-branch-source
+script-security
+scm-api
+blueocean-rest
+variant
+sse-gateway
+htmlpublisher
+matrix-auth
+pubsub-light
+blueocean-github-pipeline
+token-macro
+credentials
+mercurial
+plain-credentials
+blueocean-events
+github-api
+blueocean-git-pipeline
+structs
+durable-task
+pipeline-milestone-step
+blueocean-pipeline-editor
+blueocean-web
+pipeline-stage-tags-metadata
+ace-editor
+blueocean-commons
+blueocean-jira
+blueocean-rest-impl
+workflow-step-api
+blueocean-personalization
+workflow-basic-steps
+blueocean-display-url
+jira
+pipeline-stage-step
+jsch
+blueocean-jwt
+cloudbees-folder
+credentials-binding
+github-branch-source
+apache-httpcomponents-client-4-api
+blueocean-autofavorite
+workflow-multibranch
+mailer
+workflow-durable-task-step
+junit
+command-launcher
+bouncycastle-api
+build-timeout
+timestamper
+resource-disposer
+ws-cleanup
+ant
+gradle
+pipeline-rest-api
+handlebars
+momentjs
+pipeline-stage-view
+workflow-aggregator
+pipeline-github-lib
+mapdb-api
+subversion
+ssh-slaves
+pam-auth
+ldap
+email-ext
+locale \ No newline at end of file
diff --git a/tools/moon_jenkins/security.groovy b/tools/moon_jenkins/security.groovy
new file mode 100644
index 00000000..0fb5ff6e
--- /dev/null
+++ b/tools/moon_jenkins/security.groovy
@@ -0,0 +1,20 @@
+#!groovy
+
+import jenkins.model.*
+import hudson.security.*
+
+def instance = Jenkins.getInstance()
+
+def user = System.getenv()['jenkins_user']
+def pass = System.getenv()['jenkins_password']
+// Create user account
+def hudsonRealm = new HudsonPrivateSecurityRealm(false)
+hudsonRealm.createAccount(user,pass)
+instance.setSecurityRealm(hudsonRealm)
+
+// Enable matrix auth strategy and set my_user as admin
+def strategy = new GlobalMatrixAuthorizationStrategy()
+strategy.add(Jenkins.ADMINISTER, user)
+instance.setAuthorizationStrategy(strategy)
+
+instance.save()
diff --git a/tools/moon_kubernetes/README.md b/tools/moon_kubernetes/README.md
index 73d342fa..2077e580 100644
--- a/tools/moon_kubernetes/README.md
+++ b/tools/moon_kubernetes/README.md
@@ -78,6 +78,39 @@ You must see something like this:
manager-5bfbb96988-w9wnk 1/1 Running 0 51m
orchestrator-65d8fb4574-tnfx2 1/1 Running 0 51m
wrapper-astonishing-748b7dcc4f-ngsvp 1/1 Running 0 51m
+
+
+### Troubleshoot
+check *Consul* for:
+- *Components/Manager*, e.g.
+```json
+{
+ "port": 8082,
+ "bind": "0.0.0.0",
+ "hostname": "manager",
+ "container": "wukongsun/moon_manager:v4.3.1",
+ "external": {
+ "port": 30001,
+ "hostname": "$MOON_HOST"
+ }
+}
+```
+- *OpenStack/Keystone*: e.g.
+```json
+{
+ "url": "http://keystone:5000/v3",
+ "user": "admin",
+ "password": "p4ssw0rd",
+ "domain": "default",
+ "project": "admin",
+ "check_token": false,
+ "certificate": false,
+ "external": {
+ "url": "http://$MOON_HOST:30006/v3"
+ }
+}
+```
+
### Docker-K8S Port Mapping
```yamlex
diff --git a/tools/moon_kubernetes/templates/moon_forming_functest.yaml b/tools/moon_kubernetes/templates/moon_forming_functest.yaml
new file mode 100644
index 00000000..4cb2c3a0
--- /dev/null
+++ b/tools/moon_kubernetes/templates/moon_forming_functest.yaml
@@ -0,0 +1,30 @@
+apiVersion: batch/v1
+kind: Job
+metadata:
+ name: functest
+ namespace: moon
+spec:
+ template:
+ metadata:
+ name: functest
+ spec:
+ containers:
+ - name: functest
+ image: wukongsun/moon_forming:dev
+ env:
+ - name: COMMAND
+ value: "functest"
+ volumeMounts:
+ - name: config-volume
+ mountPath: /etc/moon
+ - name: tests-volume
+ mountPath: /data
+ volumes:
+ - name: config-volume
+ configMap:
+ name: moon-config
+ - name: tests-volume
+ hostPath:
+ path: "{{PATH}}"
+ restartPolicy: Never
+ #backoffLimit: 4 \ No newline at end of file
diff --git a/tools/moon_kubernetes/templates/moon_gui.yaml b/tools/moon_kubernetes/templates/moon_gui.yaml
index 2d355216..7c6ab732 100644
--- a/tools/moon_kubernetes/templates/moon_gui.yaml
+++ b/tools/moon_kubernetes/templates/moon_gui.yaml
@@ -13,7 +13,7 @@ spec:
hostname: gui
containers:
- name: gui
- image: wukongsun/moon_gui:v4.3.1
+ image: wukongsun/moon_gui:latest
env:
- name: MANAGER_HOST
value: "127.0.0.1"