text
stringlengths 3
1.05M
|
|---|
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],e):e(jQuery)}(function(l){"use strict";return l.effects.define("bounce",function(e,r){var t,i,n=l(this),o=e.mode,c="hide"===o,o="show"===o,f=e.direction||"up",u=e.distance,d=e.times||5,p=2*d+(o||c?1:0),s=e.duration/p,h=e.easing,a="up"===f||"down"===f?"top":"left",m="up"===f||"left"===f,y=0,e=n.queue().length;for(l.effects.createPlaceholder(n),f=n.css(a),u=u||n["top"==a?"outerHeight":"outerWidth"]()/3,o&&((i={opacity:1})[a]=f,n.css("opacity",0).css(a,m?2*-u:2*u).animate(i,s,h)),c&&(u/=Math.pow(2,d-1)),(i={})[a]=f;y<d;y++)(t={})[a]=(m?"-=":"+=")+u,n.animate(t,s,h).animate(i,s,h),u=c?2*u:u/2;c&&((t={opacity:0})[a]=(m?"-=":"+=")+u,n.animate(t,s,h)),n.queue(r),l.effects.unshift(n,e,1+p)})});
|
import template from './template.html!text';
const { clipboard } = require('electron');
export default [() => {
return {
controller: ['shadertoy', '$scope', (shadertoy, $scope) => {
$scope.shadertoy = shadertoy;
const text = clipboard.readText();
if (shadertoy.isValidURL(text)) {
$scope.url = text;
shadertoy.goToURL(text);
}
}],
restrict: 'C',
template: template,
};
}];
|
import numpy as np
def load_file(fn):
result = np.load(fn)
print(result.shape)
if __name__ == '__main__':
load_file('./feature/4944644486.npy')
|
/*
* Copyright (c) 2020 Squirrel Chat, All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the names of its contributors
* may be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
const { join } = require('path')
const { existsSync, readdirSync, unlinkSync } = require('fs')
const TerserJSPlugin = require('terser-webpack-plugin')
const ManifestPlugin = require('webpack-manifest-plugin')
const MiniCSSExtractPlugin = require('mini-css-extract-plugin')
const FriendlyErrorsWebpackPlugin = require('friendly-errors-webpack-plugin')
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin')
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin')
const { DefinePlugin, optimize: { LimitChunkCountPlugin } } = require('webpack')
// Env vars
const commitHash = null
try { require('child_process').execSync('git rev-parse HEAD').toString().trim() } catch (e) {}
const isDev = process.env.NODE_ENV === 'development'
const src = join(__dirname, 'src')
const baseConfig = {
mode: isDev ? 'development' : 'production',
entry: join(src, 'main.jsx'),
output: {
filename: isDev ? '[name].js' : '[contenthash].js',
chunkFilename: isDev ? '[name].chk.js' : '[contenthash].js',
path: join(__dirname, 'dist'),
publicPath: '/dist/'
},
resolve: {
extensions: [ '.js', '.jsx' ],
alias: {
'@components': join(__dirname, 'src', 'components'),
'@styles': join(__dirname, 'src', 'styles'),
'@assets': join(__dirname, 'src', 'assets'),
'@docs': join(__dirname, '..', 'docs')
}
},
module: {
strictExportPresence: true,
rules: [
{
test: /\.jsx?$/,
use: [
{
loader: 'babel-loader',
options: {
cacheDirectory: true,
cacheCompression: true,
compact: true,
presets: [ '@babel/preset-react' ],
plugins: [
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-proposal-object-rest-spread',
isDev ? require.resolve('react-refresh/babel') : null
].filter(Boolean)
}
}
]
},
{
test: /\.s?css$/,
use: [
{
loader: MiniCSSExtractPlugin.loader,
options: { hmr: isDev }
},
{
loader: 'css-loader',
options: {
modules: {
exportLocalsConvention: 'camelCaseOnly',
localIdentName: '[local]-[hash:7]'
}
}
},
{
loader: 'postcss-loader',
options: { plugins: [ require('autoprefixer') ] }
},
'sass-loader'
]
},
{
test: /\.(svg|mp4|webm|woff2?|eot|ttf|otf|wav|ico)$/,
use: [
{
loader: 'file-loader',
options: { name: '[hash:20].[ext]' }
}
]
},
{
test: /\.txt$/,
use: 'raw-loader'
},
{
test: /\.(png|jpe?g|gif)$/,
use: [
{
loader: 'file-loader',
options: { name: '[hash:20].[ext]' }
},
{
loader: 'image-webpack-loader',
options: {
disable: isDev,
mozjpeg: {
progressive: true,
quality: 95
},
optipng: { enabled: false },
pngquant: {
quality: [ 0.9, 1 ],
speed: 4
},
gifsicle: {
interlaced: true,
optimizationLevel: 2
}
}
}
]
},
{
test: /\.md$/,
use: join(__dirname, 'src/markdown-loader.js')
}
]
},
plugins: [
new ManifestPlugin({
writeToFileEmit: true,
fileName: join(__dirname, 'http', 'dist', 'manifest.json')
}),
new MiniCSSExtractPlugin({
filename: isDev ? '[name].css' : '[contenthash].css',
chunkFilename: isDev ? '[name].css' : '[contenthash].css'
}),
new DefinePlugin({
WEBPACK: {
GIT_REVISION: JSON.stringify(commitHash)
},
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV)
})
],
optimization: {
minimize: !isDev,
minimizer: [
new TerserJSPlugin({
extractComments: false,
parallel: true,
cache: true
}),
new OptimizeCSSAssetsPlugin({
cssProcessorPluginOptions: {
preset: [ 'default', {
cssDeclarationSorter: true,
discardUnused: true,
mergeIdents: true,
reduceIdents: true
} ]
}
})
],
splitChunks: {
cacheGroups: {
styles: {
name: 'styles',
test: /\.s?css$/,
chunks: 'all',
enforce: true
}
}
}
},
devServer: {
quiet: true,
historyApiFallback: true,
allowedHosts: [ 'localhost', '.ngrok.io' ], // Learn more about ngrok here: https://ngrok.com/
proxy: { '/': `http://localhost:${process.env.PORT || 6969}` }
}
}
if (isDev) {
baseConfig.plugins.push(new FriendlyErrorsWebpackPlugin(), new ReactRefreshWebpackPlugin())
module.exports = baseConfig
} else {
baseConfig.plugins.push({
apply: (compiler) =>
compiler.hooks.compile.tap('cleanBuild', () => {
if (existsSync(compiler.options.output.path)) {
for (const filename of readdirSync(compiler.options.output.path)) {
if (filename !== 'manifest.json') {
unlinkSync(join(compiler.options.output.path, filename))
}
}
}
})
})
const nodeCfg = {
...baseConfig,
entry: join(src, 'components', 'App.jsx'),
output: {
filename: 'App.js',
chunkFilename: '[name].chk.js',
libraryTarget: 'commonjs2',
path: join(__dirname, 'http', 'dist'),
publicPath: '/dist/'
},
plugins: [
...baseConfig.plugins.slice(1),
new LimitChunkCountPlugin({ maxChunks: 1 }),
new DefinePlugin({ 'process.env.BUILD_SIDE': JSON.stringify('server') })
],
optimization: {
...baseConfig.optimization,
minimize: false
},
target: 'node',
externals: Object.keys(require('./package.json').dependencies),
node: {
__dirname: false,
__filename: false
}
}
module.exports = [ baseConfig, nodeCfg ]
}
|
/*!build time : 2014-03-31 10:55:57 AM*/
KISSY.add("gallery/uploader/1.5/plugins/paste/paste",function(a,b,c){function d(a){var b=this;d.superclass.constructor.call(b,a)}var e=b.all;return a.extend(d,c,{pluginInitializer:function(b){if(!b)return!1;var c=this,d=c.get("target");return d.length?(d.on("paste",function(c){var d=c.originalEvent&&c.originalEvent.clipboardData&&c.originalEvent.clipboardData.items;if(d&&d.length){var e=b.get("queue");a.each(d,function(c){var d=c.getAsFile&&c.getAsFile();if(a.isObject(d)){d.name="file-"+a.guid()+".png";var d={name:d.name,type:d.type,size:d.size,data:d};d=e.add(d);var f=e.getFileIndex(d.id);b.upload(f)}})}}),void 0):!1}},{ATTRS:{pluginId:{value:"paste"},target:{value:e(document)}}}),d},{requires:["node","base"]});
|
from typing import List
import xml.etree.ElementTree as et
from pathlib import Path
import os
import json
import platform
import sys
import traceback
def exit_with_err(err: Exception):
"""
Exit the current step and display the err.
:param: err, the error/exception encountered.
"""
traceback.print_exc()
sys.exit(1)
def check_svgs(svg_file_paths: List[Path]):
"""
Check the width, height, viewBox and style of each svgs passed in.
The viewBox must be '0 0 128 128'.
If the svg has a width and height attr, ensure it's '128px'.
The style must not contain any 'fill' declarations.
If any error is found, they will be thrown.
:param: svg_file_paths, the file paths to the svg to check for.
:return: None if there no errors. If there is, return a JSON.stringified
list with the error messages in it.
"""
# batch err messages together so user can fix everything at once
err_msgs = []
for svg_path in svg_file_paths:
tree = et.parse(svg_path)
root = tree.getroot()
namespace = "{http://www.w3.org/2000/svg}"
err_msg = [f"{svg_path.name}:"]
if root.tag != f"{namespace}svg":
err_msg.append(f"-root is '{root.tag}'. Root must be an 'svg' element")
if root.get("viewBox") != "0 0 128 128":
err_msg.append("-'viewBox' is not '0 0 128 128' -> Set it or scale the file using https://www.iloveimg.com/resize-image/resize-svg")
acceptable_size = [None, "128px", "128"]
if root.get("height") not in acceptable_size:
err_msg.append("-'height' is present in svg element but is not '128' or '128px' -> Remove it or set it to '128' or '128px'")
if root.get("width") not in acceptable_size:
err_msg.append("-'width' is present in svg element but is not '128' or '128px' -> Remove it or set it to '128' or '128px'")
if root.get("style") is not None and "enable-background" in root.get("style"):
err_msg.append("-deprecated 'enable-background' in style attribute -> Remove it")
if root.get("x") is not None:
err_msg.append("-unneccessary 'x' attribute in svg element -> Remove it")
if root.get("y") is not None:
err_msg.append("-unneccessary 'y' attribute in svg element -> Remove it")
style = root.findtext(f".//{namespace}style")
if style != None and "fill" in style:
err_msg.append("-contains style declaration using 'fill' -> Replace classes with the 'fill' attribute instead")
if len(err_msg) > 1:
err_msgs.append("\n".join(err_msg))
if len(err_msgs) > 0:
return "\n\n".join(err_msgs)
return 'None'
def set_env_var(key: str, value: str, delimiter: str='~'):
"""
Set the GitHub env variable of 'key' to 'value' using
the method specified here:
https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
Support both Windows and Ubuntu machines provided by GitHub Actions.
:param: key, the name of the env variable.
:param: value, the value of the env variable.
:param: delimiter, the delimiter that you want to use
to write to the file. Only applicable if the 'value' contains
'\n' character aka a multiline string.
"""
if platform.system() == "Windows":
if "\n" in value:
os.system(f'echo "{key}<<{delimiter}" >> %GITHUB_ENV%')
os.system(f'echo "{value}" >> %GITHUB_ENV%')
os.system(f'echo "{delimiter}" >> %GITHUB_ENV%')
else:
os.system(f'echo "{key}={value}" >> %GITHUB_ENV%')
elif platform.system() == "Linux":
if "\n" in value:
os.system(f'echo "{key}<<{delimiter}" >> $GITHUB_ENV')
os.system(f'echo "{value}" >> $GITHUB_ENV')
os.system(f'echo "{delimiter}" >> $GITHUB_ENV')
else:
os.system(f'echo "{key}={value}" >> $GITHUB_ENV')
else:
raise Exception("This function doesn't support this platform: " + platform.system())
|
# -*- coding:utf-8 -*-
# Copyright (c) 2013, Theo Crevon
# Copyright (c) 2013, Greg Leclercq
#
# See the file LICENSE for copying permission.
from swf.models.base import BaseModel # NOQA
from swf.models.activity import ActivityType, ActivityTask # NOQA
from swf.models.domain import Domain # NOQA
from swf.models.workflow import WorkflowType, WorkflowExecution # NOQA
from swf.models.history import History # NOQA
|
import React from 'react';
import ReactDOM from 'react-dom';
import * as serviceWorker from './serviceWorker';
import { Provider } from 'react-redux';
// import thunk from 'redux-thunk';
// import { createStore, applyMiddleware } from 'redux';
// import reducer from './reducer';
import store from './store';
import { AppContainer } from 'react-hot-loader';
import Page from './Page';
import './style/lib/animate.css';
import './style/antd/index.less';
import './style/index.less';
// // redux 注入操作
// const middleware = [thunk];
// const store = createStore(reducer, applyMiddleware(...middleware));
// console.log(store.getState());
// const render = Component => { // 增加react-hot-loader保持状态刷新操作,如果不需要可去掉并把下面注释的打开
// ReactDOM.render(
// <AppContainer>
// <Provider store={store}>
// <Component store={store} />
// </Provider>
// </AppContainer>
// ,
// document.getElementById('root')
// );
// };
// render(Page);
// Webpack Hot Module Replacement API
// if (module.hot) {
// // 隐藏You cannot change <Router routes>; it will be ignored 错误提示
// // react-hot-loader 使用在react-router 3.x上引起的提示,react-router 4.x不存在
// // 详情可参照https://github.com/gaearon/react-hot-loader/issues/298
// const orgError = console.error; // eslint-disable-line no-console
// console.error = (...args) => { // eslint-disable-line no-console
// if (args && args.length === 1 && typeof args[0] === 'string' && args[0].indexOf('You cannot change <Router routes>;') > -1) {
// // React route changed
// } else {
// // Log the error as normally
// orgError.apply(console, args);
// }
// };
// module.hot.accept('./Page', () => {
// render(Page);
// })
// }
ReactDOM.render(
<AppContainer>
<Provider store={store}>
<Page store={store} />
</Provider>
</AppContainer>
,
document.getElementById('root')
);
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: http://bit.ly/CRA-PWA
// serviceWorker.unregister();
serviceWorker.register();
|
import math
import numpy as np
def compute_change(x, y):
return np.abs(x-y)
import httplib, urllib, base64
headers = {
# Request headers. Replace the placeholder key below with your subscription key.
'Content-Type': 'application/json',
'Ocp-Apim-Subscription-Key': '217bc233c2864995bd51a1f3f9710aef',
}
params = urllib.urlencode({
})
# Replace the example URL below with the URL of the image you want to analyze.
body = "{ 'url': '' }"
try:
# NOTE: You must use the same region in your REST call as you used to obtain your subscription keys.
# For example, if you obtained your subscription keys from westcentralus, replace "westus" in the
# URL below with "westcentralus".
conn = httplib.HTTPSConnection('westus.api.cognitive.microsoft.com')
conn.request("POST", "/emotion/v1.0/recognize?%s" % params, body, headers)
response = conn.getresponse()
data = response.read()
print(data)
conn.close()
except Exception as e:
print("[Errno {0}] {1}".format(e.errno, e.strerror))
#a_diff = 0
#b_diff = 0
#for key, value in real_dict.iteritems():
# print key
# a_diff += compute_change(Gsoftmax4070_dict[key], real_dict[key])
# b_diff += compute_change(rf70_dict[key], real_dict[key])
#print a_diff
#print b_diff
|
import axios from "axios";
import { toastOnError } from "../../utils/Utils";
import { GET_NOTES, ADD_NOTE, DELETE_NOTE, UPDATE_NOTE } from "./NoteTypes";
export const getNotes = () => dispatch => {
axios
.get("/api/v1/notes/")
.then(response => {
dispatch({
type: GET_NOTES,
payload: response.data
});
})
.catch(error => {
toastOnError(error);
});
};
export const addNote = note => dispatch => {
axios
.post("/api/v1/notes/", note)
.then(response => {
dispatch({
type: ADD_NOTE,
payload: response.data
});
})
.catch(error => {
toastOnError(error);
});
};
export const deleteNote = id => dispatch => {
axios
.delete(`/api/v1/notes/${id}/`)
.then(response => {
dispatch({
type: DELETE_NOTE,
payload: id
});
})
.catch(error => {
toastOnError(error);
});
};
export const updateNote = (id, note) => dispatch => {
axios
.patch(`/api/v1/notes/${id}/`, note)
.then(response => {
dispatch({
type: UPDATE_NOTE,
payload: response.data
});
})
.catch(error => {
toastOnError(error);
});
};
|
import requests
import string
def get_names():
input('Separate each name with Space:')
names = input()
return names.split(' ')
def check_repos(names):
repo_api = 'https://api.github.com/search/repositories?q='
ecosys_api = 'https://api.github.com/search/repositories?q=topic:'
for name in names:
repo_info = requests.get(repo_api + name).json()['items'][0]
stars = repo_info['stargazers_count']
forks = repo_info['forks_count']
ecosys_info = requests.get(ecosys_api + name).json()['total_count']
print('\033[36m')
print(string.capwords((name)))
print('\033[0m')
print('Starts:' + str(stars))
print('Forks:' + str(forks))
print('Ecosys:' + str(ecosys_info))
print('---------------')
names = get_names()
check_repos(names)
|
# 035 - Write a Python program that will return true if the two given integer values are equal or their sum or difference is 5.
def verifyValues(pNum1, pNum2):
return (pNum1 == pNum2) or (pNum1 + pNum2) == 5 or abs(pNum1 - pNum2) == 5
print(verifyValues(7, 2), verifyValues(3, 2), verifyValues(2, 2))
|
class QueryComponentType {
static typeName = 'Query';
static injectTypeWhitelist = [];
static verify() {
}
}
export default QueryComponentType;
|
import pytest
from pytest import mark
from pytest import raises
def test_single(benchmark):
runs = []
benchmark.pedantic(runs.append, args=[123])
assert runs == [123]
def test_setup(benchmark):
runs = []
def stuff(foo, bar=123):
runs.append((foo, bar))
def setup():
return [1], {"bar": 2}
benchmark.pedantic(stuff, setup=setup)
assert runs == [(1, 2)]
@pytest.mark.benchmark(cprofile=True)
def test_setup_cprofile(benchmark):
runs = []
def stuff(foo, bar=123):
runs.append((foo, bar))
def setup():
return [1], {"bar": 2}
benchmark.pedantic(stuff, setup=setup)
assert runs == [(1, 2), (1, 2)]
def test_args_kwargs(benchmark):
runs = []
def stuff(foo, bar=123):
runs.append((foo, bar))
benchmark.pedantic(stuff, args=[1], kwargs={"bar": 2})
assert runs == [(1, 2)]
def test_iterations(benchmark):
runs = []
benchmark.pedantic(runs.append, args=[1], iterations=10)
assert runs == [1] * 11
def test_rounds_iterations(benchmark):
runs = []
benchmark.pedantic(runs.append, args=[1], iterations=10, rounds=15)
assert runs == [1] * 151
def test_rounds(benchmark):
runs = []
benchmark.pedantic(runs.append, args=[1], rounds=15)
assert runs == [1] * 15
def test_warmup_rounds(benchmark):
runs = []
benchmark.pedantic(runs.append, args=[1], warmup_rounds=15, rounds=5)
assert runs == [1] * 20
@mark.parametrize("value", [0, "x"])
def test_rounds_must_be_int(benchmark, value):
runs = []
raises(ValueError, benchmark.pedantic, runs.append, args=[1], rounds=value)
assert runs == []
@mark.parametrize("value", [-15, "x"])
def test_warmup_rounds_must_be_int(benchmark, value):
runs = []
raises(ValueError, benchmark.pedantic, runs.append, args=[1], warmup_rounds=value)
assert runs == []
def test_setup_many_rounds(benchmark):
runs = []
def stuff(foo, bar=123):
runs.append((foo, bar))
def setup():
return [1], {"bar": 2}
benchmark.pedantic(stuff, setup=setup, rounds=10)
assert runs == [(1, 2)] * 10
def test_cant_use_both_args_and_setup_with_return(benchmark):
runs = []
def stuff(foo, bar=123):
runs.append((foo, bar))
def setup():
return [1], {"bar": 2}
raises(TypeError, benchmark.pedantic, stuff, setup=setup, args=[123])
assert runs == []
def test_can_use_both_args_and_setup_without_return(benchmark):
runs = []
def stuff(foo, bar=123):
runs.append((foo, bar))
benchmark.pedantic(stuff, setup=lambda: None, args=[123])
assert runs == [(123, 123)]
def test_cant_use_setup_with_many_iterations(benchmark):
raises(ValueError, benchmark.pedantic, None, setup=lambda: None, iterations=2)
@mark.parametrize("value", [0, -1, "asdf"])
def test_iterations_must_be_positive_int(benchmark, value):
raises(ValueError, benchmark.pedantic, None, setup=lambda: None, iterations=value)
|
import WorkCard from './subcomponents/WorkCard';
function Work ({ projects }) {
return <div className="flex flex-col items-start w-full">
<div className="w-full flex justify-between items-baseline">
<h1 className="text-lg text-black dark:text-cullen font-medium mb-4 mt-6">Work</h1>
<div className="flex items-center px-2 py-1 justify-center text-cullen bg-dracula rounded-md text-md font-medium">Create Card</div>
</div>
{projects.map((project, key) => {
return <WorkCard {...project} />
})}
</div>
}
export default Work;
|
# -*- coding: utf-8 -*-
import pytest
import offshoot
from pluggable import TestPluggable
from plugins.TestPlugin.plugin import TestPlugin
from plugins.TestPlugin2.plugin import TestPlugin2
from plugins.TestInvalidPlugin.plugin import TestInvalidPlugin
import yaml
import subprocess
import types
import os
import os.path
import inspect
import json
# Tests
def test_setup():
os.symlink("tests/unit/offshoot/plugins", "plugins")
os.symlink("tests/unit/offshoot/config", "config")
os.symlink("tests/unit/offshoot/libraries", "libraries")
def test_importing_the_module_should_expose_a_config_variable():
assert hasattr(offshoot, "config")
assert isinstance(offshoot.config, dict)
def test_importing_the_module_should_expose_a_lambda_to_map_pluggable_classes():
assert hasattr(offshoot, "pluggable_classes")
assert isinstance(offshoot.pluggable_classes, types.LambdaType)
def test_importing_the_module_should_expose_the_functions_from_base():
assert hasattr(offshoot, "validate_plugin_file")
assert hasattr(offshoot, "installed_plugins")
assert hasattr(offshoot, "discover")
assert isinstance(offshoot.validate_plugin_file, types.FunctionType)
assert isinstance(offshoot.installed_plugins, types.FunctionType)
assert isinstance(offshoot.discover, types.FunctionType)
def test_base_should_provide_a_function_to_get_a_default_and_complete_configuration():
assert hasattr(offshoot, "default_configuration")
assert isinstance(offshoot.default_configuration, types.FunctionType)
config = offshoot.default_configuration()
assert isinstance(config, dict)
assert "modules" in config
assert "file_paths" in config
assert "allow" in config
assert "sandbox_configuration_keys" in config
def test_base_should_be_able_to_load_a_configuration_from_an_existing_file():
config = offshoot.default_configuration()
config["modules"].append("test")
config["sandbox_configuration_keys"] = False
config["allow"]["callbacks"] = False
with open("offshoot.test.yml", "w") as f:
yaml.dump(config, f)
loaded_config = offshoot.load_configuration("offshoot.test.yml")
assert isinstance(loaded_config, dict)
assert "test" in loaded_config["modules"]
assert loaded_config["sandbox_configuration_keys"] is False
assert loaded_config["allow"]["callbacks"] is False
subprocess.call(["rm", "-f", "offshoot.test.yml"])
def test_base_should_load_the_default_configuration_if_the_configuration_file_does_not_exist():
config = offshoot.load_configuration("offshoot.test.yml")
assert isinstance(config, dict)
assert len(config["modules"]) == 0
assert config["sandbox_configuration_keys"] is True
assert config["allow"]["callbacks"] is True
def test_base_should_be_able_to_generate_a_configuration_file():
offshoot.generate_configuration_file()
assert os.path.isfile("offshoot.yml")
config = offshoot.load_configuration("offshoot.yml")
assert isinstance(config, dict)
assert len(config["modules"]) == 0
assert config["sandbox_configuration_keys"] is True
assert config["allow"]["callbacks"] is True
subprocess.call(["rm", "-f", "offshoot.yml"])
def test_base_should_be_able_to_extract_pluggable_classes_according_to_the_configuration():
config = offshoot.default_configuration()
assert isinstance(offshoot.map_pluggable_classes(config), dict)
assert len(offshoot.map_pluggable_classes(config)) == 0
config["modules"].append("pluggable")
pluggable_classes = offshoot.map_pluggable_classes(config)
assert isinstance(pluggable_classes, dict)
assert "TestPluggable" in pluggable_classes
assert "TestPluggableInvalid" not in pluggable_classes
assert inspect.isclass(pluggable_classes["TestPluggable"])
def test_base_should_be_able_to_validate_a_plugin_file_according_to_its_pluggable():
config = offshoot.default_configuration()
config["modules"].append("pluggable")
pluggable_classes = offshoot.map_pluggable_classes(config)
validation_result = offshoot.validate_plugin_file(
"tests/unit/offshoot/plugins/TestPlugin/files/test_plugin_pluggable.py",
"TestPluggable",
pluggable_classes["TestPluggable"].method_directives()
)
assert validation_result[0] is False
assert "expected methods are missing" in validation_result[1][0]
validation_result = offshoot.validate_plugin_file(
"tests/unit/offshoot/plugins/TestPlugin/files/test_plugin_pluggable_expected.py",
"TestPluggable",
pluggable_classes["TestPluggable"].method_directives()
)
assert validation_result[0] is True
assert len(validation_result[1]) == 0
validation_result = offshoot.validate_plugin_file(
"tests/unit/offshoot/plugins/TestPlugin/files/test_plugin_pluggable_accepted.py",
"TestPluggable",
pluggable_classes["TestPluggable"].method_directives()
)
assert validation_result[0] is False
assert "expected methods are missing" in validation_result[1][0]
validation_result = offshoot.validate_plugin_file(
"tests/unit/offshoot/plugins/TestPlugin/files/test_plugin_pluggable_forbidden.py",
"TestPluggable",
pluggable_classes["TestPluggable"].method_directives()
)
assert validation_result[0] is False
expected_messages = {
"expected methods are missing",
"method should not appear in the class"
}
for validation_message in validation_result[1]:
for expected_message in list(expected_messages):
if expected_message in validation_message:
expected_messages.remove(expected_message)
assert len(expected_messages) == 0
def test_base_should_be_able_to_return_a_list_of_installed_plugins():
offshoot.config["allow"]["files"] = False
offshoot.config["allow"]["config"] = False
offshoot.config["allow"]["libraries"] = False
offshoot.config["allow"]["callbacks"] = False
TestPlugin.uninstall()
assert len(offshoot.installed_plugins()) == 0
TestPlugin.install()
assert len(offshoot.installed_plugins()) == 1
assert "TestPlugin - 0.1.0" in offshoot.installed_plugins()
TestPlugin.uninstall()
assert len(offshoot.installed_plugins()) == 0
offshoot.config["allow"]["files"] = True
offshoot.config["allow"]["config"] = True
offshoot.config["allow"]["libraries"] = True
offshoot.config["allow"]["callbacks"] = True
def test_base_should_be_able_to_discover_installed_plugins_for_a_specified_pluggable():
offshoot.config["allow"]["config"] = False
offshoot.config["allow"]["libraries"] = False
offshoot.config["allow"]["callbacks"] = False
offshoot.config["modules"].append("pluggable")
TestPlugin.install()
class_mapping = offshoot.discover("TestPluggable", globals())
assert isinstance(class_mapping, dict)
assert len(class_mapping) == 0
assert inspect.isclass(TestPluginPluggableExpected)
TestPlugin.uninstall()
offshoot.config["allow"]["config"] = True
offshoot.config["allow"]["libraries"] = True
offshoot.config["allow"]["callbacks"] = True
def test_base_should_be_able_to_discover_installed_plugins_for_a_specified_pluggable_with_no_scope_passed_along():
offshoot.config["allow"]["config"] = False
offshoot.config["allow"]["libraries"] = False
offshoot.config["allow"]["callbacks"] = False
offshoot.config["modules"].append("pluggable")
TestPlugin.install()
class_mapping = offshoot.discover("TestPluggable")
assert isinstance(class_mapping, dict)
assert len(class_mapping) == 1
assert "TestPluginPluggableExpected" in class_mapping
assert inspect.isclass(class_mapping["TestPluginPluggableExpected"])
TestPlugin.uninstall()
offshoot.config["allow"]["config"] = True
offshoot.config["allow"]["libraries"] = True
offshoot.config["allow"]["callbacks"] = True
def test_base_should_be_able_to_discover_installed_plugins_for_a_specified_pluggable_with_selection_passed_along():
offshoot.config["allow"]["config"] = False
offshoot.config["allow"]["libraries"] = False
offshoot.config["allow"]["callbacks"] = False
offshoot.config["modules"].append("pluggable")
TestPlugin.install()
class_mapping = offshoot.discover("TestPluggable", selection="123")
assert isinstance(class_mapping, dict)
assert len(class_mapping) == 0
class_mapping = offshoot.discover("TestPluggable", selection=["123"])
assert isinstance(class_mapping, dict)
assert len(class_mapping) == 0
class_mapping = offshoot.discover("TestPluggable", selection=["TestPluginPluggableExpected"])
assert isinstance(class_mapping, dict)
assert len(class_mapping) == 1
assert "TestPluginPluggableExpected" in class_mapping
assert inspect.isclass(class_mapping["TestPluginPluggableExpected"])
TestPlugin.uninstall()
offshoot.config["allow"]["config"] = True
offshoot.config["allow"]["libraries"] = True
offshoot.config["allow"]["callbacks"] = True
def test_base_should_be_able_to_determine_if_a_file_implements_a_specified_pluggable():
offshoot.config["allow"]["config"] = False
offshoot.config["allow"]["libraries"] = False
offshoot.config["allow"]["callbacks"] = False
offshoot.config["modules"].append("pluggable")
TestPlugin.install()
manifest = offshoot.Manifest()
files = manifest.plugin_files_for_pluggable("TestPluggable")
valid, plugin_class = offshoot.file_contains_pluggable(files[0][0], "TestPluggable")
assert valid is True
assert plugin_class == "TestPluginPluggableExpected"
valid, plugin_class = offshoot.file_contains_pluggable("INVALID.txt", "TestPluggable")
assert valid is False
assert plugin_class is None
valid, plugin_class = offshoot.file_contains_pluggable(files[0][0], "InvalidPluggable")
assert valid is False
assert plugin_class is None
TestPlugin.uninstall()
offshoot.config["allow"]["config"] = True
offshoot.config["allow"]["libraries"] = True
offshoot.config["allow"]["callbacks"] = True
def test_base_magic_decorators_should_not_do_anything():
func = "I AM FUNCTION"
assert offshoot.accepted(func) == "I AM FUNCTION"
assert offshoot.expected(func) == "I AM FUNCTION"
assert offshoot.forbidden(func) == "I AM FUNCTION"
def test_manifest_should_create_manifest_file_if_it_does_not_exist_on_initialization():
os.remove("offshoot.manifest.json")
offshoot.Manifest()
assert os.path.isfile("offshoot.manifest.json")
with open("offshoot.manifest.json", "r") as f:
assert "plugins" in json.loads(f.read())
def test_manifest_should_be_able_to_list_installed_plugins_along_with_their_metadata():
offshoot.config["allow"]["files"] = False
offshoot.config["allow"]["config"] = False
offshoot.config["allow"]["libraries"] = False
offshoot.config["allow"]["callbacks"] = False
TestPlugin.install()
manifest = offshoot.Manifest()
plugins = manifest.list_plugins()
assert "TestPlugin" in plugins
assert plugins["TestPlugin"].get("name") == "TestPlugin"
assert plugins["TestPlugin"].get("version") == "0.1.0"
assert "files" in plugins["TestPlugin"]
assert "config" in plugins["TestPlugin"]
assert "libraries" in plugins["TestPlugin"]
TestPlugin.uninstall()
offshoot.config["allow"]["files"] = True
offshoot.config["allow"]["config"] = True
offshoot.config["allow"]["libraries"] = True
offshoot.config["allow"]["callbacks"] = True
def test_manifest_should_be_able_to_determine_if_a_specific_plugin_is_installed():
offshoot.config["allow"]["files"] = False
offshoot.config["allow"]["config"] = False
offshoot.config["allow"]["libraries"] = False
offshoot.config["allow"]["callbacks"] = False
TestPlugin.install()
manifest = offshoot.Manifest()
assert manifest.contains_plugin("TestPlugin")
TestPlugin.uninstall()
offshoot.config["allow"]["files"] = True
offshoot.config["allow"]["config"] = True
offshoot.config["allow"]["libraries"] = True
offshoot.config["allow"]["callbacks"] = True
def test_manifest_should_be_able_to_add_a_plugin_and_its_metadata():
os.remove("offshoot.manifest.json")
manifest = offshoot.Manifest()
manifest.add_plugin("TestPlugin")
plugins = manifest.list_plugins()
assert "TestPlugin" in plugins
assert plugins["TestPlugin"].get("name") == "TestPlugin"
assert plugins["TestPlugin"].get("version") == "0.1.0"
assert "files" in plugins["TestPlugin"]
assert "config" in plugins["TestPlugin"]
assert "libraries" in plugins["TestPlugin"]
def test_manifest_should_be_able_to_remove_a_plugin_and_its_metadata():
manifest = offshoot.Manifest()
plugins = manifest.list_plugins()
assert "TestPlugin" in plugins
assert plugins["TestPlugin"].get("name") == "TestPlugin"
assert plugins["TestPlugin"].get("version") == "0.1.0"
assert "files" in plugins["TestPlugin"]
assert "config" in plugins["TestPlugin"]
assert "libraries" in plugins["TestPlugin"]
manifest.remove_plugin("TestPlugin")
assert len(manifest.list_plugins()) == 0
os.remove("offshoot.manifest.json")
def test_manifest_should_be_able_to_return_all_file_names_containing_a_specific_pluggable():
offshoot.config["allow"]["files"] = False
offshoot.config["allow"]["config"] = False
offshoot.config["allow"]["libraries"] = False
offshoot.config["allow"]["callbacks"] = False
TestPlugin.install()
manifest = offshoot.Manifest()
plugin_files = manifest.plugin_files_for_pluggable("TestPluggable")
assert len(plugin_files) == 1
assert plugin_files[0][0] == "plugins/TestPlugin/files/test_plugin_pluggable_expected.py"
assert plugin_files[0][1] == "TestPluggable"
TestPlugin.uninstall()
offshoot.config["allow"]["files"] = True
offshoot.config["allow"]["config"] = True
offshoot.config["allow"]["libraries"] = True
offshoot.config["allow"]["callbacks"] = True
def test_pluggable_should_be_able_to_return_its_method_directives():
method_directives = TestPluggable.method_directives()
assert "expected" in method_directives
assert "accepted" in method_directives
assert "forbidden" in method_directives
assert "expected_function" in method_directives["expected"]
assert "accepted_function" in method_directives["accepted"]
assert "forbidden_function" in method_directives["forbidden"]
def test_pluggable_should_be_able_to_determine_the_methods_tagged_with_a_specific_decorator():
assert "expected_function" in TestPluggable.methods_with_decorator("expected")
assert "accepted_function" not in TestPluggable.methods_with_decorator("expected")
assert "forbidden_function" not in TestPluggable.methods_with_decorator("expected")
assert "expected_function" not in TestPluggable.methods_with_decorator("accepted")
assert "accepted_function" in TestPluggable.methods_with_decorator("accepted")
assert "forbidden_function" not in TestPluggable.methods_with_decorator("accepted")
assert "expected_function" not in TestPluggable.methods_with_decorator("forbidden")
assert "accepted_function" not in TestPluggable.methods_with_decorator("forbidden")
assert "forbidden_function" in TestPluggable.methods_with_decorator("forbidden")
def test_pluggable_should_trigger_a_callback_on_file_install(mocker):
offshoot.config["allow"]["config"] = False
offshoot.config["allow"]["libraries"] = False
mocker.spy(TestPluggable, "on_file_install")
TestPlugin.install()
assert TestPluggable.on_file_install.call_count == 1
TestPlugin.uninstall()
offshoot.config["allow"]["config"] = True
offshoot.config["allow"]["libraries"] = True
def test_pluggable_should_trigger_a_callback_on_file_uninstall(mocker):
offshoot.config["allow"]["config"] = False
offshoot.config["allow"]["libraries"] = False
mocker.spy(TestPluggable, "on_file_uninstall")
TestPlugin.install()
TestPlugin.uninstall()
assert TestPluggable.on_file_uninstall.call_count == 1
offshoot.config["allow"]["config"] = True
offshoot.config["allow"]["libraries"] = True
def test_plugin_respects_configuration_allow_flags_on_install(mocker):
offshoot.config["allow"]["files"] = False
offshoot.config["allow"]["config"] = False
offshoot.config["allow"]["libraries"] = False
offshoot.config["allow"]["callbacks"] = False
mocker.spy(TestPlugin, "install_files")
mocker.spy(TestPlugin, "install_configuration")
mocker.spy(TestPlugin, "install_libraries")
mocker.spy(TestPlugin, "on_install")
TestPlugin.install()
assert TestPlugin.install_files.call_count == 0
assert TestPlugin.install_configuration.call_count == 0
assert TestPlugin.install_libraries.call_count == 0
assert TestPlugin.on_install.call_count == 0
TestPlugin.uninstall()
offshoot.config["allow"]["files"] = True
offshoot.config["allow"]["config"] = True
offshoot.config["allow"]["libraries"] = True
offshoot.config["allow"]["callbacks"] = True
TestPlugin.install()
assert TestPlugin.install_files.call_count == 1
assert TestPlugin.install_configuration.call_count == 1
assert TestPlugin.install_libraries.call_count == 1
assert TestPlugin.on_install.call_count == 1
TestPlugin.uninstall()
def test_plugin_adds_a_manifest_entry_on_install(monkeypatch):
offshoot.config["allow"]["files"] = False
offshoot.config["allow"]["config"] = False
offshoot.config["allow"]["libraries"] = False
offshoot.config["allow"]["callbacks"] = False
global add_plugin_called
add_plugin_called = False
class MockManifest:
def add_plugin(self, name):
global add_plugin_called
add_plugin_called = True
manifest = MockManifest()
monkeypatch.setattr(offshoot.Manifest, "add_plugin", manifest.add_plugin)
TestPlugin.install()
assert add_plugin_called
TestPlugin.uninstall()
offshoot.config["allow"]["files"] = True
offshoot.config["allow"]["config"] = True
offshoot.config["allow"]["libraries"] = True
offshoot.config["allow"]["callbacks"] = True
def test_plugin_respects_configuration_allow_flags_on_uninstall(mocker):
offshoot.config["allow"]["files"] = False
offshoot.config["allow"]["config"] = False
offshoot.config["allow"]["libraries"] = False
offshoot.config["allow"]["callbacks"] = False
mocker.spy(TestPlugin, "uninstall_files")
mocker.spy(TestPlugin, "uninstall_configuration")
mocker.spy(TestPlugin, "uninstall_libraries")
mocker.spy(TestPlugin, "on_uninstall")
TestPlugin.install()
TestPlugin.uninstall()
assert TestPlugin.uninstall_files.call_count == 0
assert TestPlugin.uninstall_configuration.call_count == 0
assert TestPlugin.uninstall_libraries.call_count == 0
assert TestPlugin.on_uninstall.call_count == 0
offshoot.config["allow"]["files"] = True
offshoot.config["allow"]["config"] = True
offshoot.config["allow"]["libraries"] = True
offshoot.config["allow"]["callbacks"] = True
TestPlugin.install()
TestPlugin.uninstall()
assert TestPlugin.uninstall_files.call_count == 1
assert TestPlugin.uninstall_configuration.call_count == 1
assert TestPlugin.uninstall_libraries.call_count == 1
assert TestPlugin.on_uninstall.call_count == 1
def test_plugin_removes_a_manifest_entry_on_uninstall(monkeypatch):
offshoot.config["allow"]["files"] = False
offshoot.config["allow"]["config"] = False
offshoot.config["allow"]["libraries"] = False
offshoot.config["allow"]["callbacks"] = False
global remove_plugin_called
remove_plugin_called = False
class MockManifest:
def remove_plugin(self, name):
global remove_plugin_called
remove_plugin_called = True
manifest = MockManifest()
monkeypatch.setattr(offshoot.Manifest, "remove_plugin", manifest.remove_plugin)
TestPlugin.install()
TestPlugin.uninstall()
assert remove_plugin_called
offshoot.config["allow"]["files"] = True
offshoot.config["allow"]["config"] = True
offshoot.config["allow"]["libraries"] = True
offshoot.config["allow"]["callbacks"] = True
def test_plugin_files_are_validated_against_the_pluggable_specification_on_file_install(mocker):
offshoot.config["allow"]["config"] = False
offshoot.config["allow"]["libraries"] = False
offshoot.config["allow"]["callbacks"] = False
mocker.spy(TestPlugin, "_validate_file_for_pluggable")
TestPlugin.install()
TestPlugin._validate_file_for_pluggable.assert_called_once_with(
"plugins/TestPlugin/files/test_plugin_pluggable_expected.py",
"TestPluggable"
)
TestPlugin.uninstall()
offshoot.config["allow"]["config"] = True
offshoot.config["allow"]["libraries"] = True
offshoot.config["allow"]["callbacks"] = True
def test_plugin_files_are_uninstalled_on_file_install_error(mocker, monkeypatch):
offshoot.config["allow"]["config"] = False
offshoot.config["allow"]["libraries"] = False
offshoot.config["allow"]["callbacks"] = False
mocker.spy(TestPluggable, "on_file_uninstall")
global remove_plugin_called
remove_plugin_called = False
class MockManifest:
def remove_plugin(self, name):
global remove_plugin_called
remove_plugin_called = True
manifest = MockManifest()
monkeypatch.setattr(offshoot.Manifest, "remove_plugin", manifest.remove_plugin)
with pytest.raises(offshoot.PluginError):
TestInvalidPlugin.install()
assert TestPluggable.on_file_uninstall.call_count == 1
assert remove_plugin_called
offshoot.config["allow"]["config"] = True
offshoot.config["allow"]["libraries"] = True
offshoot.config["allow"]["callbacks"] = True
def test_plugin_file_install_callbacks_are_sent_on_file_install(mocker):
offshoot.config["allow"]["config"] = False
offshoot.config["allow"]["libraries"] = False
offshoot.config["allow"]["callbacks"] = False
mocker.spy(TestPluggable, "on_file_install")
TestPlugin.install()
assert TestPluggable.on_file_install.call_count == 1
TestPluggable.on_file_install.assert_called_once_with(
path="test_plugin_pluggable_expected.py",
pluggable="TestPluggable"
)
TestPlugin.uninstall()
offshoot.config["allow"]["config"] = True
offshoot.config["allow"]["libraries"] = True
offshoot.config["allow"]["callbacks"] = True
def test_plugin_file_uninstall_callbacks_are_sent_on_file_uninstall(mocker):
offshoot.config["allow"]["config"] = False
offshoot.config["allow"]["libraries"] = False
offshoot.config["allow"]["callbacks"] = False
mocker.spy(TestPluggable, "on_file_uninstall")
TestPlugin.install()
TestPlugin.uninstall()
assert TestPluggable.on_file_uninstall.call_count == 1
TestPluggable.on_file_uninstall.assert_called_once_with(
path="test_plugin_pluggable_expected.py",
pluggable="TestPluggable"
)
offshoot.config["allow"]["config"] = True
offshoot.config["allow"]["libraries"] = True
offshoot.config["allow"]["callbacks"] = True
def test_plugin_an_error_should_be_raised_on_configuration_install_if_the_configuration_directory_is_absent():
offshoot.config["allow"]["files"] = False
offshoot.config["allow"]["libraries"] = False
offshoot.config["allow"]["callbacks"] = False
os.remove("config")
with pytest.raises(offshoot.PluginError):
TestPlugin.install()
os.symlink("tests/unit/offshoot/config", "config")
offshoot.config["allow"]["files"] = True
offshoot.config["allow"]["libraries"] = True
offshoot.config["allow"]["callbacks"] = True
def test_plugin_nothing_should_happen_if_the_plugin_has_no_configuration_on_configuration_install():
offshoot.config["allow"]["files"] = False
offshoot.config["allow"]["libraries"] = False
offshoot.config["allow"]["callbacks"] = False
TestPlugin.config = None
assert TestPlugin.install_configuration() is None
TestPlugin.config = {}
assert TestPlugin.install_configuration() is None
TestPlugin.config = {
"is_test": True
}
offshoot.config["allow"]["files"] = True
offshoot.config["allow"]["libraries"] = True
offshoot.config["allow"]["callbacks"] = True
def test_plugin_the_configuration_keys_should_be_written_as_is_if_the_configuration_file_does_not_exist_on_configuration_install():
if os.path.isfile(offshoot.config["file_paths"]["config"]):
os.remove(offshoot.config["file_paths"]["config"])
offshoot.config["allow"]["files"] = False
offshoot.config["allow"]["libraries"] = False
offshoot.config["allow"]["callbacks"] = False
offshoot.config["sandbox_configuration_keys"] = False
TestPlugin.install()
with open(offshoot.config["file_paths"]["config"], "r") as f:
config = yaml.safe_load(f)
assert "is_test" in config
assert config["is_test"] is True
offshoot.config["allow"]["files"] = True
offshoot.config["allow"]["libraries"] = True
offshoot.config["allow"]["callbacks"] = True
offshoot.config["sandbox_configuration_keys"] = True
def test_plugin_the_configuration_keys_should_be_merged_properly_with_an_existing_configuration_file_on_configuration_install():
offshoot.config["allow"]["files"] = False
offshoot.config["allow"]["libraries"] = False
offshoot.config["allow"]["callbacks"] = False
offshoot.config["sandbox_configuration_keys"] = False
with open(offshoot.config["file_paths"]["config"], "r") as f:
config = yaml.safe_load(f)
config["is_extra"] = True
with open(offshoot.config["file_paths"]["config"], "w") as f:
yaml.dump(config, f)
TestPlugin.install()
with open(offshoot.config["file_paths"]["config"], "r") as f:
config = yaml.safe_load(f)
assert "is_test" in config
assert config["is_test"] is True
assert "is_extra" in config
assert config["is_extra"] is True
TestPlugin.uninstall()
offshoot.config["allow"]["files"] = True
offshoot.config["allow"]["libraries"] = True
offshoot.config["allow"]["callbacks"] = True
offshoot.config["sandbox_configuration_keys"] = True
def test_plugin_the_configuration_keys_should_be_sandboxed_if_the_option_is_set_on_configuration_install():
offshoot.config["allow"]["files"] = False
offshoot.config["allow"]["libraries"] = False
offshoot.config["allow"]["callbacks"] = False
TestPlugin.install()
with open(offshoot.config["file_paths"]["config"], "r") as f:
config = yaml.safe_load(f)
assert "TestPlugin" in config
assert "is_test" in config["TestPlugin"]
assert config["TestPlugin"]["is_test"] is True
TestPlugin.uninstall()
offshoot.config["allow"]["files"] = True
offshoot.config["allow"]["libraries"] = True
offshoot.config["allow"]["callbacks"] = True
def test_plugin_an_error_should_be_raised_on_configuration_uninstall_if_the_configuration_directory_is_absent():
offshoot.config["allow"]["files"] = False
offshoot.config["allow"]["libraries"] = False
offshoot.config["allow"]["callbacks"] = False
os.remove("config")
with pytest.raises(offshoot.PluginError):
TestPlugin.uninstall()
os.symlink("tests/unit/offshoot/config", "config")
offshoot.config["allow"]["files"] = True
offshoot.config["allow"]["libraries"] = True
offshoot.config["allow"]["callbacks"] = True
def test_plugin_nothing_should_happen_if_the_plugin_has_no_configuration_on_configuration_uninstall():
offshoot.config["allow"]["files"] = False
offshoot.config["allow"]["libraries"] = False
offshoot.config["allow"]["callbacks"] = False
TestPlugin.config = None
assert TestPlugin.uninstall_configuration() is None
TestPlugin.config = {}
assert TestPlugin.uninstall_configuration() is None
TestPlugin.config = {
"is_test": True
}
offshoot.config["allow"]["files"] = True
offshoot.config["allow"]["libraries"] = True
offshoot.config["allow"]["callbacks"] = True
def test_plugin_nothing_should_happen_if_the_plugin_configuration_file_does_not_exist_on_configuration_uninstall():
if os.path.isfile(offshoot.config["file_paths"]["config"]):
os.remove(offshoot.config["file_paths"]["config"])
offshoot.config["allow"]["files"] = False
offshoot.config["allow"]["libraries"] = False
offshoot.config["allow"]["callbacks"] = False
assert TestPlugin.uninstall_configuration() is None
TestPlugin.install()
TestPlugin.uninstall()
offshoot.config["allow"]["files"] = True
offshoot.config["allow"]["libraries"] = True
offshoot.config["allow"]["callbacks"] = True
def test_plugin_the_configuration_keys_should_be_removed_properly_on_configuration_uninstall():
offshoot.config["allow"]["files"] = False
offshoot.config["allow"]["libraries"] = False
offshoot.config["allow"]["callbacks"] = False
offshoot.config["sandbox_configuration_keys"] = False
with open(offshoot.config["file_paths"]["config"], "r") as f:
config = yaml.safe_load(f)
config["is_extra"] = True
with open(offshoot.config["file_paths"]["config"], "w") as f:
yaml.dump(config, f)
TestPlugin.install()
TestPlugin.uninstall()
with open(offshoot.config["file_paths"]["config"], "r") as f:
config = yaml.safe_load(f)
assert "is_test" not in config
assert "is_extra" in config
assert config["is_extra"] is True
offshoot.config["allow"]["files"] = True
offshoot.config["allow"]["libraries"] = True
offshoot.config["allow"]["callbacks"] = True
offshoot.config["sandbox_configuration_keys"] = True
def test_plugin_the_configuration_keys_should_be_removed_properly_if_the_sandbox_keys_option_is_set_on_configuration_uninstall():
offshoot.config["allow"]["files"] = False
offshoot.config["allow"]["libraries"] = False
offshoot.config["allow"]["callbacks"] = False
TestPlugin.install()
TestPlugin.uninstall()
with open(offshoot.config["file_paths"]["config"], "r") as f:
config = yaml.safe_load(f)
assert "TestPlugin" not in config
assert "is_extra" in config
assert config["is_extra"] is True
offshoot.config["allow"]["files"] = True
offshoot.config["allow"]["libraries"] = True
offshoot.config["allow"]["callbacks"] = True
def test_plugin_an_error_should_be_raised_on_libraries_install_if_the_libraries_directory_is_absent():
offshoot.config["allow"]["files"] = False
offshoot.config["allow"]["config"] = False
offshoot.config["allow"]["callbacks"] = False
offshoot.config["file_paths"]["libraries"] = "libraries/requirements.plugins.txt"
os.remove("libraries")
with pytest.raises(offshoot.PluginError):
TestPlugin.install()
os.symlink("tests/unit/offshoot/libraries", "libraries")
offshoot.config["allow"]["files"] = True
offshoot.config["allow"]["config"] = True
offshoot.config["allow"]["callbacks"] = True
offshoot.config["file_paths"]["libraries"] = "requirements.plugins.txt"
def test_plugin_nothing_should_happen_if_the_plugin_has_no_libraries_on_libraries_install():
offshoot.config["allow"]["files"] = False
offshoot.config["allow"]["config"] = False
offshoot.config["allow"]["callbacks"] = False
TestPlugin.libraries = None
assert TestPlugin.install_libraries() is None
TestPlugin.libraries = []
assert TestPlugin.install_libraries() is None
TestPlugin.libraries = ["requests"]
offshoot.config["allow"]["files"] = True
offshoot.config["allow"]["config"] = True
offshoot.config["allow"]["callbacks"] = True
def test_plugin_should_add_a_libraries_block_on_libraries_install(mocker):
offshoot.config["allow"]["files"] = False
offshoot.config["allow"]["config"] = False
offshoot.config["allow"]["callbacks"] = False
mocker.spy(TestPlugin, "_write_plugin_requirement_blocks_to")
TestPlugin.install()
TestPlugin._write_plugin_requirement_blocks_to.assert_called_once_with(
offshoot.config["file_paths"]["libraries"]
)
TestPlugin.uninstall()
offshoot.config["allow"]["files"] = True
offshoot.config["allow"]["config"] = True
offshoot.config["allow"]["callbacks"] = True
def test_plugin_an_error_should_be_raised_on_libraries_uninstall_if_the_libraries_directory_is_absent():
offshoot.config["allow"]["files"] = False
offshoot.config["allow"]["config"] = False
offshoot.config["allow"]["callbacks"] = False
offshoot.config["file_paths"]["libraries"] = "libraries/requirements.plugins.txt"
os.remove("libraries")
with pytest.raises(offshoot.PluginError):
TestPlugin.uninstall()
os.symlink("tests/unit/offshoot/libraries", "libraries")
offshoot.config["allow"]["files"] = True
offshoot.config["allow"]["config"] = True
offshoot.config["allow"]["callbacks"] = True
offshoot.config["file_paths"]["libraries"] = "requirements.plugins.txt"
def test_plugin_nothing_should_happen_if_the_plugin_has_no_libraries_on_libraries_uninstall():
offshoot.config["allow"]["files"] = True
offshoot.config["allow"]["config"] = False
offshoot.config["allow"]["callbacks"] = False
TestPlugin.libraries = None
assert TestPlugin.uninstall_libraries() is None
TestPlugin.libraries = []
assert TestPlugin.uninstall_libraries() is None
TestPlugin.libraries = ["requests"]
offshoot.config["allow"]["files"] = True
offshoot.config["allow"]["config"] = True
offshoot.config["allow"]["callbacks"] = True
def test_plugin_should_remove_a_libraries_block_on_libraries_uninstall(mocker):
offshoot.config["allow"]["files"] = False
offshoot.config["allow"]["config"] = False
offshoot.config["allow"]["callbacks"] = False
mocker.spy(TestPlugin, "_remove_plugin_requirement_block_from")
TestPlugin.install()
TestPlugin.uninstall()
TestPlugin._remove_plugin_requirement_block_from.assert_called_once_with(
offshoot.config["file_paths"]["libraries"]
)
offshoot.config["allow"]["files"] = True
offshoot.config["allow"]["config"] = True
offshoot.config["allow"]["callbacks"] = True
def test_plugin_should_be_able_to_validate_a_file_against_a_pluggable_specification(mocker):
mocker.spy(offshoot, "validate_plugin_file")
TestPlugin._validate_file_for_pluggable(
"plugins/TestPlugin/files/test_plugin_pluggable_expected.py",
"TestPluggable"
)
offshoot.validate_plugin_file.assert_called_once_with(
"plugins/TestPlugin/files/test_plugin_pluggable_expected.py",
"TestPluggable",
TestPluggable.method_directives()
)
def test_plugin_should_be_able_to_generate_a_requirements_block_for_its_libraries():
assert TestPlugin._generate_plugin_requirement_block() == ["### TestPlugin Requirements ###", "requests", "######"]
assert TestInvalidPlugin._generate_plugin_requirement_block() == ["### TestInvalidPlugin Requirements ###", "requests", "######"]
def test_plugin_should_be_able_to_extract_all_requirement_blocks_from_its_libraries_file():
TestPlugin.install_libraries()
TestInvalidPlugin.install_libraries()
requirement_blocks = TestPlugin._extract_plugin_requirement_blocks_from(offshoot.config["file_paths"]["libraries"])
assert "TestPlugin Requirements" in requirement_blocks
assert "TestInvalidPlugin Requirements" in requirement_blocks
assert requirement_blocks["TestPlugin Requirements"] == TestPlugin._generate_plugin_requirement_block()
assert requirement_blocks["TestInvalidPlugin Requirements"] == TestInvalidPlugin._generate_plugin_requirement_block()
TestPlugin.uninstall_libraries()
TestInvalidPlugin.uninstall_libraries()
def test_plugin_should_be_able_to_write_all_requirement_blocks_to_its_libraries_file():
TestPlugin._write_plugin_requirement_blocks_to(offshoot.config["file_paths"]["libraries"])
TestInvalidPlugin._write_plugin_requirement_blocks_to(offshoot.config["file_paths"]["libraries"])
requirement_blocks = TestPlugin._extract_plugin_requirement_blocks_from(offshoot.config["file_paths"]["libraries"])
assert "TestPlugin Requirements" in requirement_blocks
assert "TestInvalidPlugin Requirements" in requirement_blocks
assert requirement_blocks["TestPlugin Requirements"] == TestPlugin._generate_plugin_requirement_block()
assert requirement_blocks["TestInvalidPlugin Requirements"] == TestInvalidPlugin._generate_plugin_requirement_block()
def test_plugin_should_be_able_to_remove_a_requirement_block_from_its_libraries_file():
TestPlugin._remove_plugin_requirement_block_from(offshoot.config["file_paths"]["libraries"])
requirement_blocks = TestPlugin._extract_plugin_requirement_blocks_from(offshoot.config["file_paths"]["libraries"])
assert "TestPlugin Requirements" not in requirement_blocks
assert "TestInvalidPlugin Requirements" in requirement_blocks
TestInvalidPlugin._remove_plugin_requirement_block_from(offshoot.config["file_paths"]["libraries"])
requirement_blocks = TestPlugin._extract_plugin_requirement_blocks_from(offshoot.config["file_paths"]["libraries"])
assert "TestPlugin Requirements" not in requirement_blocks
assert "TestInvalidPlugin Requirements" not in requirement_blocks
def test_plugin_global_on_install_callback_should_be_called_after_a_successful_installation(mocker):
offshoot.config["allow"]["files"] = False
offshoot.config["allow"]["config"] = False
offshoot.config["allow"]["libraries"] = False
mocker.spy(TestPlugin, "on_install")
TestPlugin.install()
assert TestPlugin.on_install.call_count == 1
TestPlugin.uninstall()
offshoot.config["allow"]["files"] = True
offshoot.config["allow"]["config"] = True
offshoot.config["allow"]["libraries"] = True
def test_plugin_global_on_uninstall_callback_should_be_called_after_a_successful_uninstallation(mocker):
offshoot.config["allow"]["files"] = False
offshoot.config["allow"]["config"] = False
offshoot.config["allow"]["libraries"] = False
mocker.spy(TestPlugin, "on_uninstall")
TestPlugin.uninstall()
assert TestPlugin.on_uninstall.call_count == 1
offshoot.config["allow"]["files"] = True
offshoot.config["allow"]["config"] = True
offshoot.config["allow"]["libraries"] = True
def test_plugin_an_error_should_be_raised_if_a_plugin_dependency_is_not_installed():
offshoot.config["allow"]["files"] = False
offshoot.config["allow"]["config"] = False
offshoot.config["allow"]["libraries"] = False
offshoot.config["allow"]["callbacks"] = False
with pytest.raises(offshoot.PluginError):
TestPlugin2.install()
offshoot.config["allow"]["files"] = True
offshoot.config["allow"]["config"] = True
offshoot.config["allow"]["libraries"] = True
offshoot.config["allow"]["callbacks"] = True
def test_plugin_should_pass_plugin_dependency_verification_if_all_dependencies_are_present():
offshoot.config["allow"]["files"] = False
offshoot.config["allow"]["config"] = False
offshoot.config["allow"]["libraries"] = False
offshoot.config["allow"]["callbacks"] = False
TestPlugin.install()
TestPlugin2.install()
TestPlugin.uninstall()
TestPlugin2.uninstall()
offshoot.config["allow"]["files"] = True
offshoot.config["allow"]["config"] = True
offshoot.config["allow"]["libraries"] = True
offshoot.config["allow"]["callbacks"] = True
def test_teardown():
os.remove("plugins")
os.remove("config")
os.remove("libraries")
if os.path.isfile("offshoot.manifest.json"):
os.remove("offshoot.manifest.json")
if os.path.isfile("requirements.plugins.txt"):
os.remove("requirements.plugins.txt")
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TPV = void 0;
const mongoose_1 = require("mongoose");
class TPV {
constructor() {
const EmpleadoSchema = new mongoose_1.Schema({
nombre: { type: String, requiered: true },
apellidos: { type: String, requiered: true },
dni: { type: String, requiered: true },
email: { type: String, requiered: true },
fechaAlta: { type: Date, required: false },
genero: { type: String, requiered: false },
hashPassword: { type: String, requiered: false },
horasPorSemana: { type: Number, requiered: false },
rol: { type: String, requiered: true },
}, { strict: true, timestamps: false });
const TPVSchema = new mongoose_1.Schema({
nombre: { type: String, requiered: true },
enUsoPor: { type: EmpleadoSchema, requiered: true },
libre: { type: Boolean, requiered: true },
cajaInicial: { type: Number, requiered: true }
}, { strict: true, timestamps: true });
this.modelo = (0, mongoose_1.model)('TPV', TPVSchema);
}
get Model() {
return this.modelo;
}
}
exports.TPV = TPV;
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from .baseagent import BaseAgent
from .maze import ACTION as ACTION
from .maze import SHOW as SHOW
from .maze import Maze as Maze
# from .maze import ActionProbsTable
from .maze import ProbsRoulette as ProbsRoulette
from .gym_wrapper import InfEasyMaze
from .gym_wrapper import EasyMaze
from .gym_wrapper import MDPMaze
from .gym_wrapper import HardMaze
from .gym_wrapper import InfHardMaze
from .gym_wrapper import EasyMazeEnv
__all__ = ['Maze', 'SHOW', 'ACTION', 'BaseAgent', 'ProbsRoulet']
|
var Reflux = require("reflux");
var SurveyActions = Reflux.createActions([
"load", // initial data load
"blockDropped", // when block is dropped
"questionDropped", // when question is dropped
"optionGroupDropped", // when optionGroup is dropped
"optionAdded", // when option is added
"toggleModal", // when a modal is toggled
"showAlert", // when the alert box needs to be shown
"saveSurvey", // when a survey save is called
"loadSurvey", // when a survey load is called
"toggleLoadModal", // when the load modal is clicked
"clearSurvey", // when a survey clear is called
"toggleParam", // when a config param is toggled for any type
"itemDelete", // when an item (option/question/block) is called to be deleted
"itemCopy", // when an item (question/block) is called to be copied
"saveEditText", // when question text is changed
"saveFreeText", // when freeText's default text is changed
"undoSurvey", // when the undo button is clicked
"scrollToItem", // when an item needs to be scrolled to
"updateOptionGroup", // when the default option group is changed
"addOptionGroup", // when an option group is added to the list
"moveQuestion", // when a question is moved in the treeview
"moveBlock" // when a block is moved in the treeview
]);
module.exports = SurveyActions;
|
export function timeFix() {
const time = new Date()
const hour = time.getHours()
return hour < 9 ? '早上好' : hour <= 11 ? '上午好' : hour <= 13 ? '中午好' : hour < 20 ? '下午好' : '晚上好'
}
export function welcome() {
const arr = ['休息一会儿吧', '准备吃什么呢?', '要不要打一把 DOTA', '我猜你可能累了']
const index = Math.floor(Math.random() * arr.length)
return arr[index]
}
/**
* 触发 window.resize
*/
export function triggerWindowResizeEvent() {
const event = document.createEvent('HTMLEvents')
event.initEvent('resize', true, true)
event.eventType = 'message'
window.dispatchEvent(event)
}
export function handleScrollHeader(callback) {
let timer = 0
let beforeScrollTop = window.pageYOffset
callback = callback || function() {}
window.addEventListener(
'scroll',
event => {
clearTimeout(timer)
timer = setTimeout(() => {
let direction = 'up'
const afterScrollTop = window.pageYOffset
const delta = afterScrollTop - beforeScrollTop
if (delta === 0) {
return false
}
direction = delta > 0 ? 'down' : 'up'
callback(direction)
beforeScrollTop = afterScrollTop
}, 50)
},
false
)
}
export function isIE() {
const bw = window.navigator.userAgent
const compare = (s) => bw.indexOf(s) >= 0
const ie11 = (() => 'ActiveXObject' in window)()
return compare('MSIE') || ie11
}
/**
* Remove loading animate
* @param id parent element id or class
* @param timeout
*/
export function removeLoadingAnimate(id = '', timeout = 1500) {
if (id === '') {
return
}
setTimeout(() => {
document.body.removeChild(document.getElementById(id))
}, timeout)
}
|
"use strict";(self.webpackChunkmy_project=self.webpackChunkmy_project||[]).push([[6460],{63490:e=>{e.exports=JSON.parse('{"BoundRoute.title":"Bound route to","EditForm.inputSelect.description.role":"It will attach the new authenticated user to the selected role.","EditForm.inputSelect.label.role":"Default role for authenticated users","EditForm.inputToggle.description.email":"Disallow the user to create multiple accounts using the same email address with different authentication providers.","EditForm.inputToggle.description.email-confirmation":"When enabled (ON), new registered users receive a confirmation email.","EditForm.inputToggle.description.email-confirmation-redirection":"After you confirmed your email, choose where you will be redirected.","EditForm.inputToggle.description.email-reset-password":"URL of your application\'s reset password page","EditForm.inputToggle.description.sign-up":"When disabled (OFF), the registration process is forbidden. No one can subscribe anymore no matter the used provider.","EditForm.inputToggle.label.email":"One account per email address","EditForm.inputToggle.label.email-confirmation":"Enable email confirmation","EditForm.inputToggle.label.email-confirmation-redirection":"Redirection url","EditForm.inputToggle.label.email-reset-password":"Reset password page","EditForm.inputToggle.label.sign-up":"Enable sign-ups","EditForm.inputToggle.placeholder.email-confirmation-redirection":"ex: https://yourfrontend.com/reset-password","EditForm.inputToggle.placeholder.email-reset-password":"ex: https://yourfrontend.com/reset-password","EditPage.form.roles":"Role details","Email.template.data.loaded":"Email templates has been loaded","Email.template.email_confirmation":"Email address confirmation","Email.template.form.edit.label":"Edit a template","Email.template.reset_password":"Reset password","Email.template.table.action.label":"action","Email.template.table.icon.label":"icon","Email.template.table.name.label":"name","Form.advancedSettings.data.loaded":"Advanced settings data has been loaded","Form.save":"Save","Form.title.advancedSettings":"Settings","HeaderNav.link.advancedSettings":"Advanced settings","HeaderNav.link.emailTemplates":"Email templates","HeaderNav.link.providers":"Providers","HeaderNav.link.roles":"Roles","Plugin.permissions.plugins.description":"Define all allowed actions for the {name} plugin.","Plugins.header.description":"Only actions bound by a route are listed below.","Plugins.header.title":"Permissions","Policies.header.hint":"Select the application\'s actions or the plugin\'s actions and click on the cog icon to display the bound route","Policies.header.title":"Advanced settings","PopUpForm.Email.email_templates.inputDescription":"If you\'re unsure how to use variables, {link}","PopUpForm.Email.link.documentation":"check out our documentation.","PopUpForm.Email.options.from.email.label":"Shipper email","PopUpForm.Email.options.from.email.placeholder":"kai@doe.com","PopUpForm.Email.options.from.name.label":"Shipper name","PopUpForm.Email.options.from.name.placeholder":"Kai Doe","PopUpForm.Email.options.message.label":"Message","PopUpForm.Email.options.object.label":"Subject","PopUpForm.Email.options.object.placeholder":"Please confirm your email address for %APP_NAME%","PopUpForm.Email.options.response_email.label":"Response email","PopUpForm.Email.options.response_email.placeholder":"kai@doe.com","PopUpForm.Providers.enabled.description":"If disabled, users won\'t be able to use this provider.","PopUpForm.Providers.enabled.label":"Enable","PopUpForm.Providers.key.label":"Client ID","PopUpForm.Providers.key.placeholder":"TEXT","PopUpForm.Providers.redirectURL.front-end.label":"The redirect URL to your front-end app","PopUpForm.Providers.redirectURL.label":"The redirect URL to add in your {provider} application configurations","PopUpForm.Providers.secret.label":"Client Secret","PopUpForm.Providers.secret.placeholder":"TEXT","PopUpForm.Providers.subdomain.label":"Host URI (Subdomain)","PopUpForm.Providers.subdomain.placeholder":"my.subdomain.com","PopUpForm.header.edit.email-templates":"Edit email template","PopUpForm.header.edit.providers":"Edit Provider","Providers.data.loaded":"Providers have been loaded","Providers.disabled":"Disabled","Providers.enabled":"Enabled","Providers.image":"Image","Providers.name":"Name","Providers.settings":"Settings","Providers.status":"Status","Roles.description":"Description","Roles.empty":"You don\'t have any roles yet.","Roles.empty.search":"No roles match the search.","Roles.name":"Name","Roles.users":"Users","Settings.roles.deleted":"Role deleted","Settings.roles.edited":"Role edited","Settings.section-label":"Users & Permissions plugin","components.Input.error.validation.email":"This is an invalid email","components.Input.error.validation.json":"This doesn\'t match the JSON format","components.Input.error.validation.max":"The value is too high.","components.Input.error.validation.maxLength":"The value is too long.","components.Input.error.validation.min":"The value is too low.","components.Input.error.validation.minLength":"The value is too short.","components.Input.error.validation.minSupMax":"Can\'t be superior","components.Input.error.validation.regex":"The value does not match the regex.","components.Input.error.validation.required":"This value is required.","components.Input.error.validation.unique":"This value is already used.","notification.success.submit":"Settings have been updated","page.title":"Settings - Roles","plugin.description.long":"Protect your API with a full authentication process based on JWT. This plugin comes also with an ACL strategy that allows you to manage the permissions between the groups of users.","plugin.description.short":"Protect your API with a full authentication process based on JWT.","plugin.name":"Users & Permissions Plugin","popUpWarning.button.cancel":"Cancel","popUpWarning.button.confirm":"Confirm","popUpWarning.title":"Please confirm","popUpWarning.warning.cancel":"Are you sure you want to cancel your modifications?"}')}}]);
|
/*
* Copyright (C) 2018 Synopsys, Inc. All rights reserved.
* Author: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <config.h>
#include <linux/printk.h>
#include <linux/kernel.h>
#include <linux/io.h>
#include <asm/arcregs.h>
#include <fdt_support.h>
#include <dwmmc.h>
#include <malloc.h>
#include <usb.h>
#include "clk-lib.h"
#include "env-lib.h"
DECLARE_GLOBAL_DATA_PTR;
#define ALL_CPU_MASK GENMASK(NR_CPUS - 1, 0)
#define MASTER_CPU_ID 0
#define APERTURE_SHIFT 28
#define NO_CCM 0x10
#define SLAVE_CPU_READY 0x12345678
#define BOOTSTAGE_1 1 /* after SP, FP setup, before HW init */
#define BOOTSTAGE_2 2 /* after HW init, before self halt */
#define BOOTSTAGE_3 3 /* after self halt */
#define BOOTSTAGE_4 4 /* before app launch */
#define BOOTSTAGE_5 5 /* after app launch, unreachable */
#define RESET_VECTOR_ADDR 0x0
#define CREG_BASE (ARC_PERIPHERAL_BASE + 0x1000)
#define CREG_CPU_START (CREG_BASE + 0x400)
#define CREG_CPU_START_MASK 0xF
#define SDIO_BASE (ARC_PERIPHERAL_BASE + 0xA000)
#define SDIO_UHS_REG_EXT (SDIO_BASE + 0x108)
#define SDIO_UHS_REG_EXT_DIV_2 (2 << 30)
/* Uncached access macros */
#define arc_read_uncached_32(ptr) \
({ \
unsigned int __ret; \
__asm__ __volatile__( \
" ld.di %0, [%1] \n" \
: "=r"(__ret) \
: "r"(ptr)); \
__ret; \
})
#define arc_write_uncached_32(ptr, data)\
({ \
__asm__ __volatile__( \
" st.di %0, [%1] \n" \
: \
: "r"(data), "r"(ptr)); \
})
struct hsdk_env_core_ctl {
u32_env entry[NR_CPUS];
u32_env iccm[NR_CPUS];
u32_env dccm[NR_CPUS];
};
struct hsdk_env_common_ctl {
bool halt_on_boot;
u32_env core_mask;
u32_env cpu_freq;
u32_env axi_freq;
u32_env tun_freq;
u32_env nvlim;
u32_env icache;
u32_env dcache;
};
/*
* Uncached cross-cpu structure. All CPUs must access to this structure fields
* only with arc_read_uncached_32() / arc_write_uncached_32() accessors (which
* implement ld.di / st.di instructions). Simultaneous cached and uncached
* access to this area will lead to data loss.
* We flush all data caches in board_early_init_r() as we don't want to have
* any dirty line in L1d$ or SL$ in this area.
*/
struct hsdk_cross_cpu {
/* slave CPU ready flag */
u32 ready_flag;
/* address of the area, which can be used for stack by slave CPU */
u32 stack_ptr;
/* slave CPU status - bootstage number */
s32 status[NR_CPUS];
/*
* Slave CPU data - it is copy of corresponding fields in
* hsdk_env_core_ctl and hsdk_env_common_ctl structures which are
* required for slave CPUs initialization.
* This fields can be populated by copying from hsdk_env_core_ctl
* and hsdk_env_common_ctl structures with sync_cross_cpu_data()
* function.
*/
u32 entry[NR_CPUS];
u32 iccm[NR_CPUS];
u32 dccm[NR_CPUS];
u32 core_mask;
u32 icache;
u32 dcache;
u8 cache_padding[ARCH_DMA_MINALIGN];
} __aligned(ARCH_DMA_MINALIGN);
/* Place for slave CPUs temporary stack */
static u32 slave_stack[256 * NR_CPUS] __aligned(ARCH_DMA_MINALIGN);
static struct hsdk_env_common_ctl env_common = {};
static struct hsdk_env_core_ctl env_core = {};
static struct hsdk_cross_cpu cross_cpu_data;
static const struct env_map_common env_map_common[] = {
{ "core_mask", ENV_HEX, true, 0x1, 0xF, &env_common.core_mask },
{ "non_volatile_limit", ENV_HEX, true, 0, 0xF, &env_common.nvlim },
{ "icache_ena", ENV_HEX, true, 0, 1, &env_common.icache },
{ "dcache_ena", ENV_HEX, true, 0, 1, &env_common.dcache },
{}
};
static const struct env_map_common env_map_clock[] = {
{ "cpu_freq", ENV_DEC, false, 100, 1000, &env_common.cpu_freq },
{ "axi_freq", ENV_DEC, false, 200, 800, &env_common.axi_freq },
{ "tun_freq", ENV_DEC, false, 0, 150, &env_common.tun_freq },
{}
};
static const struct env_map_percpu env_map_core[] = {
{ "core_iccm", ENV_HEX, true, {NO_CCM, 0, NO_CCM, 0}, {NO_CCM, 0xF, NO_CCM, 0xF}, &env_core.iccm },
{ "core_dccm", ENV_HEX, true, {NO_CCM, 0, NO_CCM, 0}, {NO_CCM, 0xF, NO_CCM, 0xF}, &env_core.dccm },
{}
};
static const struct env_map_common env_map_mask[] = {
{ "core_mask", ENV_HEX, false, 0x1, 0xF, &env_common.core_mask },
{}
};
static const struct env_map_percpu env_map_go[] = {
{ "core_entry", ENV_HEX, true, {0, 0, 0, 0}, {U32_MAX, U32_MAX, U32_MAX, U32_MAX}, &env_core.entry },
{}
};
static void sync_cross_cpu_data(void)
{
u32 value;
for (u32 i = 0; i < NR_CPUS; i++) {
value = env_core.entry[i].val;
arc_write_uncached_32(&cross_cpu_data.entry[i], value);
}
for (u32 i = 0; i < NR_CPUS; i++) {
value = env_core.iccm[i].val;
arc_write_uncached_32(&cross_cpu_data.iccm[i], value);
}
for (u32 i = 0; i < NR_CPUS; i++) {
value = env_core.dccm[i].val;
arc_write_uncached_32(&cross_cpu_data.dccm[i], value);
}
value = env_common.core_mask.val;
arc_write_uncached_32(&cross_cpu_data.core_mask, value);
value = env_common.icache.val;
arc_write_uncached_32(&cross_cpu_data.icache, value);
value = env_common.dcache.val;
arc_write_uncached_32(&cross_cpu_data.dcache, value);
}
/* Can be used only on master CPU */
static bool is_cpu_used(u32 cpu_id)
{
return !!(env_common.core_mask.val & BIT(cpu_id));
}
/* TODO: add ICCM BCR and DCCM BCR runtime check */
static void init_slave_cpu_func(u32 core)
{
u32 val;
/* Remap ICCM to another memory region if it exists */
val = arc_read_uncached_32(&cross_cpu_data.iccm[core]);
if (val != NO_CCM)
write_aux_reg(ARC_AUX_ICCM_BASE, val << APERTURE_SHIFT);
/* Remap DCCM to another memory region if it exists */
val = arc_read_uncached_32(&cross_cpu_data.dccm[core]);
if (val != NO_CCM)
write_aux_reg(ARC_AUX_DCCM_BASE, val << APERTURE_SHIFT);
if (arc_read_uncached_32(&cross_cpu_data.icache))
icache_enable();
else
icache_disable();
if (arc_read_uncached_32(&cross_cpu_data.dcache))
dcache_enable();
else
dcache_disable();
}
static void init_cluster_nvlim(void)
{
u32 val = env_common.nvlim.val << APERTURE_SHIFT;
flush_dcache_all();
write_aux_reg(ARC_AUX_NON_VOLATILE_LIMIT, val);
write_aux_reg(AUX_AUX_CACHE_LIMIT, val);
flush_n_invalidate_dcache_all();
}
static void init_master_icache(void)
{
if (icache_status()) {
/* I$ is enabled - we need to disable it */
if (!env_common.icache.val)
icache_disable();
} else {
/* I$ is disabled - we need to enable it */
if (env_common.icache.val) {
icache_enable();
/* invalidate I$ right after enable */
invalidate_icache_all();
}
}
}
static void init_master_dcache(void)
{
if (dcache_status()) {
/* D$ is enabled - we need to disable it */
if (!env_common.dcache.val)
dcache_disable();
} else {
/* D$ is disabled - we need to enable it */
if (env_common.dcache.val)
dcache_enable();
/* TODO: probably we need ti invalidate D$ right after enable */
}
}
static int cleanup_before_go(void)
{
disable_interrupts();
sync_n_cleanup_cache_all();
return 0;
}
void slave_cpu_set_boot_addr(u32 addr)
{
/* All cores have reset vector pointing to 0 */
writel(addr, (void __iomem *)RESET_VECTOR_ADDR);
/* Make sure other cores see written value in memory */
sync_n_cleanup_cache_all();
}
static inline void halt_this_cpu(void)
{
__builtin_arc_flag(1);
}
static void smp_kick_cpu_x(u32 cpu_id)
{
int cmd = readl((void __iomem *)CREG_CPU_START);
if (cpu_id > NR_CPUS)
return;
cmd &= ~CREG_CPU_START_MASK;
cmd |= (1 << cpu_id);
writel(cmd, (void __iomem *)CREG_CPU_START);
}
static u32 prepare_cpu_ctart_reg(void)
{
int cmd = readl((void __iomem *)CREG_CPU_START);
cmd &= ~CREG_CPU_START_MASK;
return cmd | env_common.core_mask.val;
}
/* slave CPU entry for configuration */
__attribute__((naked, noreturn, flatten)) noinline void hsdk_core_init_f(void)
{
__asm__ __volatile__(
"ld.di r8, [%0]\n"
"mov %%sp, r8\n"
"mov %%fp, %%sp\n"
: /* no output */
: "r" (&cross_cpu_data.stack_ptr));
invalidate_icache_all();
arc_write_uncached_32(&cross_cpu_data.status[CPU_ID_GET()], BOOTSTAGE_1);
init_slave_cpu_func(CPU_ID_GET());
arc_write_uncached_32(&cross_cpu_data.ready_flag, SLAVE_CPU_READY);
arc_write_uncached_32(&cross_cpu_data.status[CPU_ID_GET()], BOOTSTAGE_2);
/* Halt the processor until the master kick us again */
halt_this_cpu();
/*
* 3 NOPs after FLAG 1 instruction are no longer required for ARCv2
* cores but we leave them for gebug purposes.
*/
__builtin_arc_nop();
__builtin_arc_nop();
__builtin_arc_nop();
arc_write_uncached_32(&cross_cpu_data.status[CPU_ID_GET()], BOOTSTAGE_3);
/* get the updated entry - invalidate i$ */
invalidate_icache_all();
arc_write_uncached_32(&cross_cpu_data.status[CPU_ID_GET()], BOOTSTAGE_4);
/* Run our program */
((void (*)(void))(arc_read_uncached_32(&cross_cpu_data.entry[CPU_ID_GET()])))();
/* This bootstage is unreachable as we don't return from app we launch */
arc_write_uncached_32(&cross_cpu_data.status[CPU_ID_GET()], BOOTSTAGE_5);
/* Something went terribly wrong */
while (true)
halt_this_cpu();
}
static void clear_cross_cpu_data(void)
{
arc_write_uncached_32(&cross_cpu_data.ready_flag, 0);
arc_write_uncached_32(&cross_cpu_data.stack_ptr, 0);
for (u32 i = 0; i < NR_CPUS; i++)
arc_write_uncached_32(&cross_cpu_data.status[i], 0);
}
static noinline void do_init_slave_cpu(u32 cpu_id)
{
/* attempts number for check clave CPU ready_flag */
u32 attempts = 100;
u32 stack_ptr = (u32)(slave_stack + (64 * cpu_id));
if (cpu_id >= NR_CPUS)
return;
arc_write_uncached_32(&cross_cpu_data.ready_flag, 0);
/* Use global unique place for each slave cpu stack */
arc_write_uncached_32(&cross_cpu_data.stack_ptr, stack_ptr);
debug("CPU %u: stack pool base: %p\n", cpu_id, slave_stack);
debug("CPU %u: current slave stack base: %x\n", cpu_id, stack_ptr);
slave_cpu_set_boot_addr((u32)hsdk_core_init_f);
smp_kick_cpu_x(cpu_id);
debug("CPU %u: cross-cpu flag: %x [before timeout]\n", cpu_id,
arc_read_uncached_32(&cross_cpu_data.ready_flag));
while (!arc_read_uncached_32(&cross_cpu_data.ready_flag) && attempts--)
mdelay(10);
/* Just to be sure that slave cpu is halted after it set ready_flag */
mdelay(20);
/*
* Only print error here if we reach timeout as there is no option to
* halt slave cpu (or check that slave cpu is halted)
*/
if (!attempts)
pr_err("CPU %u is not responding after init!\n", cpu_id);
/* Check current stage of slave cpu */
if (arc_read_uncached_32(&cross_cpu_data.status[cpu_id]) != BOOTSTAGE_2)
pr_err("CPU %u status is unexpected: %d\n", cpu_id,
arc_read_uncached_32(&cross_cpu_data.status[cpu_id]));
debug("CPU %u: cross-cpu flag: %x [after timeout]\n", cpu_id,
arc_read_uncached_32(&cross_cpu_data.ready_flag));
debug("CPU %u: status: %d [after timeout]\n", cpu_id,
arc_read_uncached_32(&cross_cpu_data.status[cpu_id]));
}
static void do_init_slave_cpus(void)
{
clear_cross_cpu_data();
sync_cross_cpu_data();
debug("cross_cpu_data location: %#x\n", (u32)&cross_cpu_data);
for (u32 i = MASTER_CPU_ID + 1; i < NR_CPUS; i++)
if (is_cpu_used(i))
do_init_slave_cpu(i);
}
static void do_init_master_cpu(void)
{
/*
* Setup master caches even if master isn't used as we want to use
* same cache configuration on all running CPUs
*/
init_master_icache();
init_master_dcache();
}
enum hsdk_axi_masters {
M_HS_CORE = 0,
M_HS_RTT,
M_AXI_TUN,
M_HDMI_VIDEO,
M_HDMI_AUDIO,
M_USB_HOST,
M_ETHERNET,
M_SDIO,
M_GPU,
M_DMAC_0,
M_DMAC_1,
M_DVFS
};
#define UPDATE_VAL 1
/*
* m master AXI_M_m_SLV0 AXI_M_m_SLV1 AXI_M_m_OFFSET0 AXI_M_m_OFFSET1
* 0 HS (CBU) 0x11111111 0x63111111 0xFEDCBA98 0x0E543210
* 1 HS (RTT) 0x77777777 0x77777777 0xFEDCBA98 0x76543210
* 2 AXI Tunnel 0x88888888 0x88888888 0xFEDCBA98 0x76543210
* 3 HDMI-VIDEO 0x77777777 0x77777777 0xFEDCBA98 0x76543210
* 4 HDMI-ADUIO 0x77777777 0x77777777 0xFEDCBA98 0x76543210
* 5 USB-HOST 0x77777777 0x77999999 0xFEDCBA98 0x76DCBA98
* 6 ETHERNET 0x77777777 0x77999999 0xFEDCBA98 0x76DCBA98
* 7 SDIO 0x77777777 0x77999999 0xFEDCBA98 0x76DCBA98
* 8 GPU 0x77777777 0x77777777 0xFEDCBA98 0x76543210
* 9 DMAC (port #1) 0x77777777 0x77777777 0xFEDCBA98 0x76543210
* 10 DMAC (port #2) 0x77777777 0x77777777 0xFEDCBA98 0x76543210
* 11 DVFS 0x00000000 0x60000000 0x00000000 0x00000000
*
* Please read ARC HS Development IC Specification, section 17.2 for more
* information about apertures configuration.
* NOTE: we intentionally modify default settings in U-boot. Default settings
* are specified in "Table 111 CREG Address Decoder register reset values".
*/
#define CREG_AXI_M_SLV0(m) ((void __iomem *)(CREG_BASE + 0x020 * (m)))
#define CREG_AXI_M_SLV1(m) ((void __iomem *)(CREG_BASE + 0x020 * (m) + 0x004))
#define CREG_AXI_M_OFT0(m) ((void __iomem *)(CREG_BASE + 0x020 * (m) + 0x008))
#define CREG_AXI_M_OFT1(m) ((void __iomem *)(CREG_BASE + 0x020 * (m) + 0x00C))
#define CREG_AXI_M_UPDT(m) ((void __iomem *)(CREG_BASE + 0x020 * (m) + 0x014))
#define CREG_AXI_M_HS_CORE_BOOT ((void __iomem *)(CREG_BASE + 0x010))
#define CREG_PAE ((void __iomem *)(CREG_BASE + 0x180))
#define CREG_PAE_UPDT ((void __iomem *)(CREG_BASE + 0x194))
void init_memory_bridge(void)
{
u32 reg;
/*
* M_HS_CORE has one unic register - BOOT.
* We need to clean boot mirror (BOOT[1:0]) bits in them.
*/
reg = readl(CREG_AXI_M_HS_CORE_BOOT) & (~0x3);
writel(reg, CREG_AXI_M_HS_CORE_BOOT);
writel(0x11111111, CREG_AXI_M_SLV0(M_HS_CORE));
writel(0x63111111, CREG_AXI_M_SLV1(M_HS_CORE));
writel(0xFEDCBA98, CREG_AXI_M_OFT0(M_HS_CORE));
writel(0x0E543210, CREG_AXI_M_OFT1(M_HS_CORE));
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_HS_CORE));
writel(0x77777777, CREG_AXI_M_SLV0(M_HS_RTT));
writel(0x77777777, CREG_AXI_M_SLV1(M_HS_RTT));
writel(0xFEDCBA98, CREG_AXI_M_OFT0(M_HS_RTT));
writel(0x76543210, CREG_AXI_M_OFT1(M_HS_RTT));
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_HS_RTT));
writel(0x88888888, CREG_AXI_M_SLV0(M_AXI_TUN));
writel(0x88888888, CREG_AXI_M_SLV1(M_AXI_TUN));
writel(0xFEDCBA98, CREG_AXI_M_OFT0(M_AXI_TUN));
writel(0x76543210, CREG_AXI_M_OFT1(M_AXI_TUN));
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_AXI_TUN));
writel(0x77777777, CREG_AXI_M_SLV0(M_HDMI_VIDEO));
writel(0x77777777, CREG_AXI_M_SLV1(M_HDMI_VIDEO));
writel(0xFEDCBA98, CREG_AXI_M_OFT0(M_HDMI_VIDEO));
writel(0x76543210, CREG_AXI_M_OFT1(M_HDMI_VIDEO));
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_HDMI_VIDEO));
writel(0x77777777, CREG_AXI_M_SLV0(M_HDMI_AUDIO));
writel(0x77777777, CREG_AXI_M_SLV1(M_HDMI_AUDIO));
writel(0xFEDCBA98, CREG_AXI_M_OFT0(M_HDMI_AUDIO));
writel(0x76543210, CREG_AXI_M_OFT1(M_HDMI_AUDIO));
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_HDMI_AUDIO));
writel(0x77777777, CREG_AXI_M_SLV0(M_USB_HOST));
writel(0x77999999, CREG_AXI_M_SLV1(M_USB_HOST));
writel(0xFEDCBA98, CREG_AXI_M_OFT0(M_USB_HOST));
writel(0x76DCBA98, CREG_AXI_M_OFT1(M_USB_HOST));
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_USB_HOST));
writel(0x77777777, CREG_AXI_M_SLV0(M_ETHERNET));
writel(0x77999999, CREG_AXI_M_SLV1(M_ETHERNET));
writel(0xFEDCBA98, CREG_AXI_M_OFT0(M_ETHERNET));
writel(0x76DCBA98, CREG_AXI_M_OFT1(M_ETHERNET));
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_ETHERNET));
writel(0x77777777, CREG_AXI_M_SLV0(M_SDIO));
writel(0x77999999, CREG_AXI_M_SLV1(M_SDIO));
writel(0xFEDCBA98, CREG_AXI_M_OFT0(M_SDIO));
writel(0x76DCBA98, CREG_AXI_M_OFT1(M_SDIO));
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_SDIO));
writel(0x77777777, CREG_AXI_M_SLV0(M_GPU));
writel(0x77777777, CREG_AXI_M_SLV1(M_GPU));
writel(0xFEDCBA98, CREG_AXI_M_OFT0(M_GPU));
writel(0x76543210, CREG_AXI_M_OFT1(M_GPU));
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_GPU));
writel(0x77777777, CREG_AXI_M_SLV0(M_DMAC_0));
writel(0x77777777, CREG_AXI_M_SLV1(M_DMAC_0));
writel(0xFEDCBA98, CREG_AXI_M_OFT0(M_DMAC_0));
writel(0x76543210, CREG_AXI_M_OFT1(M_DMAC_0));
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_DMAC_0));
writel(0x77777777, CREG_AXI_M_SLV0(M_DMAC_1));
writel(0x77777777, CREG_AXI_M_SLV1(M_DMAC_1));
writel(0xFEDCBA98, CREG_AXI_M_OFT0(M_DMAC_1));
writel(0x76543210, CREG_AXI_M_OFT1(M_DMAC_1));
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_DMAC_1));
writel(0x00000000, CREG_AXI_M_SLV0(M_DVFS));
writel(0x60000000, CREG_AXI_M_SLV1(M_DVFS));
writel(0x00000000, CREG_AXI_M_OFT0(M_DVFS));
writel(0x00000000, CREG_AXI_M_OFT1(M_DVFS));
writel(UPDATE_VAL, CREG_AXI_M_UPDT(M_DVFS));
writel(0x00000000, CREG_PAE);
writel(UPDATE_VAL, CREG_PAE_UPDT);
}
static void setup_clocks(void)
{
ulong rate;
/* Setup CPU clock */
if (env_common.cpu_freq.set) {
rate = env_common.cpu_freq.val;
soc_clk_ctl("cpu-clk", &rate, CLK_ON | CLK_SET | CLK_MHZ);
}
/* Setup TUN clock */
if (env_common.tun_freq.set) {
rate = env_common.tun_freq.val;
if (rate)
soc_clk_ctl("tun-clk", &rate, CLK_ON | CLK_SET | CLK_MHZ);
else
soc_clk_ctl("tun-clk", NULL, CLK_OFF);
}
if (env_common.axi_freq.set) {
rate = env_common.axi_freq.val;
soc_clk_ctl("axi-clk", &rate, CLK_SET | CLK_ON | CLK_MHZ);
}
}
static void do_init_cluster(void)
{
/*
* A multi-core ARC HS configuration always includes only one
* ARC_AUX_NON_VOLATILE_LIMIT register, which is shared by all the
* cores.
*/
init_cluster_nvlim();
}
static int check_master_cpu_id(void)
{
if (CPU_ID_GET() == MASTER_CPU_ID)
return 0;
pr_err("u-boot runs on non-master cpu with id: %lu\n", CPU_ID_GET());
return -ENOENT;
}
static noinline int prepare_cpus(void)
{
int ret;
ret = check_master_cpu_id();
if (ret)
return ret;
ret = envs_process_and_validate(env_map_common, env_map_core, is_cpu_used);
if (ret)
return ret;
printf("CPU start mask is %#x\n", env_common.core_mask.val);
do_init_slave_cpus();
do_init_master_cpu();
do_init_cluster();
return 0;
}
static int hsdk_go_run(u32 cpu_start_reg)
{
/* Cleanup caches, disable interrupts */
cleanup_before_go();
if (env_common.halt_on_boot)
halt_this_cpu();
/*
* 3 NOPs after FLAG 1 instruction are no longer required for ARCv2
* cores but we leave them for gebug purposes.
*/
__builtin_arc_nop();
__builtin_arc_nop();
__builtin_arc_nop();
/* Kick chosen slave CPUs */
writel(cpu_start_reg, (void __iomem *)CREG_CPU_START);
if (is_cpu_used(MASTER_CPU_ID))
((void (*)(void))(env_core.entry[MASTER_CPU_ID].val))();
else
halt_this_cpu();
pr_err("u-boot still runs on cpu [%ld]\n", CPU_ID_GET());
/*
* We will never return after executing our program if master cpu used
* otherwise halt master cpu manually.
*/
while (true)
halt_this_cpu();
return 0;
}
int board_prep_linux(bootm_headers_t *images)
{
int ret, ofst;
char mask[15];
ret = envs_read_validate_common(env_map_mask);
if (ret)
return ret;
/* Rollback to default values */
if (!env_common.core_mask.set) {
env_common.core_mask.val = ALL_CPU_MASK;
env_common.core_mask.set = true;
}
printf("CPU start mask is %#x\n", env_common.core_mask.val);
if (!is_cpu_used(MASTER_CPU_ID))
pr_err("ERR: try to launch linux with CPU[0] disabled! It doesn't work for ARC.\n");
/*
* If we want to launch linux on all CPUs we don't need to patch
* linux DTB as it is default configuration
*/
if (env_common.core_mask.val == ALL_CPU_MASK)
return 0;
if (!IMAGE_ENABLE_OF_LIBFDT || !images->ft_len) {
pr_err("WARN: core_mask setup will work properly only with external DTB!\n");
return 0;
}
/* patch '/possible-cpus' property according to cpu mask */
ofst = fdt_path_offset(images->ft_addr, "/");
sprintf(mask, "%s%s%s%s",
is_cpu_used(0) ? "0," : "",
is_cpu_used(1) ? "1," : "",
is_cpu_used(2) ? "2," : "",
is_cpu_used(3) ? "3," : "");
ret = fdt_setprop_string(images->ft_addr, ofst, "possible-cpus", mask);
/*
* If we failed to patch '/possible-cpus' property we don't need break
* linux loading process: kernel will handle it but linux will print
* warning like "Timeout: CPU1 FAILED to comeup !!!".
* So warn here about error, but return 0 like no error had occurred.
*/
if (ret)
pr_err("WARN: failed to patch '/possible-cpus' property, ret=%d\n",
ret);
return 0;
}
void board_jump_and_run(ulong entry, int zero, int arch, uint params)
{
void (*kernel_entry)(int zero, int arch, uint params);
u32 cpu_start_reg;
kernel_entry = (void (*)(int, int, uint))entry;
/* Prepare CREG_CPU_START for kicking chosen CPUs */
cpu_start_reg = prepare_cpu_ctart_reg();
/* In case of run without hsdk_init */
slave_cpu_set_boot_addr(entry);
/* In case of run with hsdk_init */
for (u32 i = 0; i < NR_CPUS; i++) {
env_core.entry[i].val = entry;
env_core.entry[i].set = true;
}
/* sync cross_cpu struct as we updated core-entry variables */
sync_cross_cpu_data();
/* Kick chosen slave CPUs */
writel(cpu_start_reg, (void __iomem *)CREG_CPU_START);
if (is_cpu_used(0))
kernel_entry(zero, arch, params);
}
static int hsdk_go_prepare_and_run(void)
{
/* Prepare CREG_CPU_START for kicking chosen CPUs */
u32 reg = prepare_cpu_ctart_reg();
if (env_common.halt_on_boot)
printf("CPU will halt before application start, start application with debugger.\n");
return hsdk_go_run(reg);
}
static int do_hsdk_go(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
{
int ret;
/*
* Check for 'halt' parameter. 'halt' = enter halt-mode just before
* starting the application; can be used for debug.
*/
if (argc > 1) {
env_common.halt_on_boot = !strcmp(argv[1], "halt");
if (!env_common.halt_on_boot) {
pr_err("Unrecognised parameter: \'%s\'\n", argv[1]);
return CMD_RET_FAILURE;
}
}
ret = check_master_cpu_id();
if (ret)
return ret;
ret = envs_process_and_validate(env_map_mask, env_map_go, is_cpu_used);
if (ret)
return ret;
/* sync cross_cpu struct as we updated core-entry variables */
sync_cross_cpu_data();
ret = hsdk_go_prepare_and_run();
return ret ? CMD_RET_FAILURE : CMD_RET_SUCCESS;
}
U_BOOT_CMD(
hsdk_go, 3, 0, do_hsdk_go,
"Synopsys HSDK specific command",
" - Boot stand-alone application on HSDK\n"
"hsdk_go halt - Boot stand-alone application on HSDK, halt CPU just before application run\n"
);
static int do_hsdk_init(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
{
static bool done = false;
int ret;
/* hsdk_init can be run only once */
if (done) {
printf("HSDK HW is already initialized! Please reset the board if you want to change the configuration.\n");
return CMD_RET_FAILURE;
}
ret = prepare_cpus();
if (!ret)
done = true;
return ret ? CMD_RET_FAILURE : CMD_RET_SUCCESS;
}
U_BOOT_CMD(
hsdk_init, 1, 0, do_hsdk_init,
"Synopsys HSDK specific command",
"- Init HSDK HW\n"
);
static int do_hsdk_clock_set(cmd_tbl_t *cmdtp, int flag, int argc,
char *const argv[])
{
int ret = 0;
/* Strip off leading subcommand argument */
argc--;
argv++;
envs_cleanup_common(env_map_clock);
if (!argc) {
printf("Set clocks to values specified in environment\n");
ret = envs_read_common(env_map_clock);
} else {
printf("Set clocks to values specified in args\n");
ret = args_envs_enumerate(env_map_clock, 2, argc, argv);
}
if (ret)
return CMD_RET_FAILURE;
ret = envs_validate_common(env_map_clock);
if (ret)
return CMD_RET_FAILURE;
/* Setup clock tree HW */
setup_clocks();
return CMD_RET_SUCCESS;
}
static int do_hsdk_clock_get(cmd_tbl_t *cmdtp, int flag, int argc,
char *const argv[])
{
ulong rate;
if (soc_clk_ctl("cpu-clk", &rate, CLK_GET | CLK_MHZ))
return CMD_RET_FAILURE;
if (env_set_ulong("cpu_freq", rate))
return CMD_RET_FAILURE;
if (soc_clk_ctl("tun-clk", &rate, CLK_GET | CLK_MHZ))
return CMD_RET_FAILURE;
if (env_set_ulong("tun_freq", rate))
return CMD_RET_FAILURE;
if (soc_clk_ctl("axi-clk", &rate, CLK_GET | CLK_MHZ))
return CMD_RET_FAILURE;
if (env_set_ulong("axi_freq", rate))
return CMD_RET_FAILURE;
printf("Clock values are saved to environment\n");
return CMD_RET_SUCCESS;
}
static int do_hsdk_clock_print(cmd_tbl_t *cmdtp, int flag, int argc,
char *const argv[])
{
/* Main clocks */
soc_clk_ctl("cpu-clk", NULL, CLK_PRINT | CLK_MHZ);
soc_clk_ctl("tun-clk", NULL, CLK_PRINT | CLK_MHZ);
soc_clk_ctl("axi-clk", NULL, CLK_PRINT | CLK_MHZ);
soc_clk_ctl("ddr-clk", NULL, CLK_PRINT | CLK_MHZ);
return CMD_RET_SUCCESS;
}
static int do_hsdk_clock_print_all(cmd_tbl_t *cmdtp, int flag, int argc,
char *const argv[])
{
/*
* NOTE: as of today we don't use some peripherals like HDMI / EBI
* so we don't want to print their clocks ("hdmi-sys-clk", "hdmi-pll",
* "hdmi-clk", "ebi-clk"). Nevertheless their clock subsystems is fully
* functional and we can print their clocks if it is required
*/
/* CPU clock domain */
soc_clk_ctl("cpu-pll", NULL, CLK_PRINT | CLK_MHZ);
soc_clk_ctl("cpu-clk", NULL, CLK_PRINT | CLK_MHZ);
printf("\n");
/* SYS clock domain */
soc_clk_ctl("sys-pll", NULL, CLK_PRINT | CLK_MHZ);
soc_clk_ctl("apb-clk", NULL, CLK_PRINT | CLK_MHZ);
soc_clk_ctl("axi-clk", NULL, CLK_PRINT | CLK_MHZ);
soc_clk_ctl("eth-clk", NULL, CLK_PRINT | CLK_MHZ);
soc_clk_ctl("usb-clk", NULL, CLK_PRINT | CLK_MHZ);
soc_clk_ctl("sdio-clk", NULL, CLK_PRINT | CLK_MHZ);
/* soc_clk_ctl("hdmi-sys-clk", NULL, CLK_PRINT | CLK_MHZ); */
soc_clk_ctl("gfx-core-clk", NULL, CLK_PRINT | CLK_MHZ);
soc_clk_ctl("gfx-dma-clk", NULL, CLK_PRINT | CLK_MHZ);
soc_clk_ctl("gfx-cfg-clk", NULL, CLK_PRINT | CLK_MHZ);
soc_clk_ctl("dmac-core-clk", NULL, CLK_PRINT | CLK_MHZ);
soc_clk_ctl("dmac-cfg-clk", NULL, CLK_PRINT | CLK_MHZ);
soc_clk_ctl("sdio-ref-clk", NULL, CLK_PRINT | CLK_MHZ);
soc_clk_ctl("spi-clk", NULL, CLK_PRINT | CLK_MHZ);
soc_clk_ctl("i2c-clk", NULL, CLK_PRINT | CLK_MHZ);
/* soc_clk_ctl("ebi-clk", NULL, CLK_PRINT | CLK_MHZ); */
soc_clk_ctl("uart-clk", NULL, CLK_PRINT | CLK_MHZ);
printf("\n");
/* DDR clock domain */
soc_clk_ctl("ddr-clk", NULL, CLK_PRINT | CLK_MHZ);
printf("\n");
/* HDMI clock domain */
/* soc_clk_ctl("hdmi-pll", NULL, CLK_PRINT | CLK_MHZ); */
/* soc_clk_ctl("hdmi-clk", NULL, CLK_PRINT | CLK_MHZ); */
/* printf("\n"); */
/* TUN clock domain */
soc_clk_ctl("tun-pll", NULL, CLK_PRINT | CLK_MHZ);
soc_clk_ctl("tun-clk", NULL, CLK_PRINT | CLK_MHZ);
soc_clk_ctl("rom-clk", NULL, CLK_PRINT | CLK_MHZ);
soc_clk_ctl("pwm-clk", NULL, CLK_PRINT | CLK_MHZ);
printf("\n");
return CMD_RET_SUCCESS;
}
cmd_tbl_t cmd_hsdk_clock[] = {
U_BOOT_CMD_MKENT(set, 3, 0, do_hsdk_clock_set, "", ""),
U_BOOT_CMD_MKENT(get, 3, 0, do_hsdk_clock_get, "", ""),
U_BOOT_CMD_MKENT(print, 4, 0, do_hsdk_clock_print, "", ""),
U_BOOT_CMD_MKENT(print_all, 4, 0, do_hsdk_clock_print_all, "", ""),
};
static int do_hsdk_clock(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
{
cmd_tbl_t *c;
if (argc < 2)
return CMD_RET_USAGE;
/* Strip off leading 'hsdk_clock' command argument */
argc--;
argv++;
c = find_cmd_tbl(argv[0], cmd_hsdk_clock, ARRAY_SIZE(cmd_hsdk_clock));
if (!c)
return CMD_RET_USAGE;
return c->cmd(cmdtp, flag, argc, argv);
}
U_BOOT_CMD(
hsdk_clock, CONFIG_SYS_MAXARGS, 0, do_hsdk_clock,
"Synopsys HSDK specific clock command",
"set - Set clock to values specified in environment / command line arguments\n"
"hsdk_clock get - Save clock values to environment\n"
"hsdk_clock print - Print main clock values to console\n"
"hsdk_clock print_all - Print all clock values to console\n"
);
/* init calls */
int board_early_init_f(void)
{
/*
* Setup AXI apertures unconditionally as we want to have DDR
* in 0x00000000 region when we are kicking slave cpus.
*/
init_memory_bridge();
return 0;
}
int board_early_init_r(void)
{
/*
* TODO: Init USB here to be able read environment from USB MSD.
* It can be done with usb_init() call. We can't do it right now
* due to brocken USB IP SW reset and lack of USB IP HW reset in
* linux kernel (if we init USB here we will break USB in linux)
*/
/*
* Flush all d$ as we want to use uncached area with st.di / ld.di
* instructions and we don't want to have any dirty line in L1d$ or SL$
* in this area. It is enough to flush all d$ once here as we access to
* uncached area with regular st (non .di) instruction only when we copy
* data during u-boot relocation.
*/
flush_dcache_all();
printf("Relocation Offset is: %08lx\n", gd->reloc_off);
return 0;
}
int board_late_init(void)
{
/*
* Populate environment with clock frequency values -
* run hsdk_clock get callback without uboot command run.
*/
do_hsdk_clock_get(NULL, 0, 0, NULL);
return 0;
}
int board_mmc_init(bd_t *bis)
{
struct dwmci_host *host = NULL;
host = malloc(sizeof(struct dwmci_host));
if (!host) {
printf("dwmci_host malloc fail!\n");
return 1;
}
/*
* Switch SDIO external ciu clock divider from default div-by-8 to
* minimum possible div-by-2.
*/
writel(SDIO_UHS_REG_EXT_DIV_2, (void __iomem *)SDIO_UHS_REG_EXT);
memset(host, 0, sizeof(struct dwmci_host));
host->name = "Synopsys Mobile storage";
host->ioaddr = (void *)ARC_DWMMC_BASE;
host->buswidth = 4;
host->dev_index = 0;
host->bus_hz = 50000000;
add_dwmci(host, host->bus_hz / 2, 400000);
return 0;
}
|
# -*- coding: utf-8 -*-
import datetime
import math
import arrow
import pandas as pd
import tzlocal
from zvdata import IntervalLevel
CHINA_TZ = 'Asia/Shanghai'
TIME_FORMAT_ISO8601 = "YYYY-MM-DDTHH:mm:ss.SSS"
TIME_FORMAT_DAY = 'YYYY-MM-DD'
TIME_FORMAT_DAY1 = 'YYYYMMDD'
TIME_FORMAT_MINUTE = 'YYYYMMDDHHmm'
TIME_FORMAT_MINUTE1 = 'HH:mm'
TIME_FORMAT_MINUTE2 = "YYYY-MM-DD HH:mm:ss"
# ms(int) or second(float) or str
def to_pd_timestamp(the_time):
if the_time is None:
return None
if type(the_time) == int:
return pd.Timestamp.fromtimestamp(the_time / 1000)
if type(the_time) == float:
return pd.Timestamp.fromtimestamp(the_time)
return pd.Timestamp(the_time)
def to_timestamp(the_time):
return int(to_pd_timestamp(the_time).tz_localize(tzlocal.get_localzone()).timestamp() * 1000)
def now_timestamp():
return int(pd.Timestamp.utcnow().timestamp() * 1000)
def now_pd_timestamp():
return pd.Timestamp.now()
def to_time_str(the_time, fmt=TIME_FORMAT_DAY):
try:
return arrow.get(to_pd_timestamp(the_time)).format(fmt)
except Exception as e:
return the_time
def now_time_str(fmt=TIME_FORMAT_DAY):
return to_time_str(the_time=now_pd_timestamp(), fmt=fmt)
def next_date(the_time, days=1):
return to_pd_timestamp(the_time) + datetime.timedelta(days=days)
def is_same_date(one, two):
return to_pd_timestamp(one).date() == to_pd_timestamp(two).date()
def is_same_time(one, two):
return to_timestamp(one) == to_timestamp(two)
def get_year_quarter(time):
time = to_pd_timestamp(time)
return time.year, ((time.month - 1) // 3) + 1
def day_offset_today(offset=0):
return now_pd_timestamp() + datetime.timedelta(days=offset)
def get_year_quarters(start, end=pd.Timestamp.now()):
start_year_quarter = get_year_quarter(start)
current_year_quarter = get_year_quarter(end)
if current_year_quarter[0] == start_year_quarter[0]:
return [(current_year_quarter[0], x) for x in range(start_year_quarter[1], current_year_quarter[1] + 1)]
elif current_year_quarter[0] - start_year_quarter[0] == 1:
return [(start_year_quarter[0], x) for x in range(start_year_quarter[1], 5)] + \
[(current_year_quarter[0], x) for x in range(1, current_year_quarter[1] + 1)]
elif current_year_quarter[0] - start_year_quarter[0] > 1:
return [(start_year_quarter[0], x) for x in range(start_year_quarter[1], 5)] + \
[(x, y) for x in range(start_year_quarter[0] + 1, current_year_quarter[0]) for y in range(1, 5)] + \
[(current_year_quarter[0], x) for x in range(1, current_year_quarter[1] + 1)]
else:
raise Exception("wrong start time:{}".format(start))
def date_and_time(the_date, the_time):
time_str = '{}T{}:00.000'.format(to_time_str(the_date), the_time)
return to_pd_timestamp(time_str)
def next_timestamp(current_timestamp: pd.Timestamp, level: IntervalLevel) -> pd.Timestamp:
current_timestamp = to_pd_timestamp(current_timestamp)
return current_timestamp + pd.Timedelta(seconds=level.to_second())
def evaluate_size_from_timestamp(start_timestamp,
level: IntervalLevel,
one_day_trading_minutes,
end_timestamp: pd.Timestamp = None):
"""
given from timestamp,level,one_day_trading_minutes,this func evaluate size of kdata to current.
it maybe a little bigger than the real size for fetching all the kdata.
:param start_timestamp:
:type start_timestamp: pd.Timestamp
:param level:
:type level: IntervalLevel
:param one_day_trading_minutes:
:type one_day_trading_minutes: int
"""
if not end_timestamp:
end_timestamp = pd.Timestamp.now()
else:
end_timestamp = to_pd_timestamp(end_timestamp)
time_delta = end_timestamp - to_pd_timestamp(start_timestamp)
one_day_trading_seconds = one_day_trading_minutes * 60
if level == IntervalLevel.LEVEL_1DAY:
return time_delta.days + 1
if level == IntervalLevel.LEVEL_1WEEK:
return int(math.ceil(time_delta.days / 7)) + 1
if level == IntervalLevel.LEVEL_1MON:
return int(math.ceil(time_delta.days / 30)) + 1
if time_delta.days > 0:
seconds = (time_delta.days + 1) * one_day_trading_seconds
return int(math.ceil(seconds / level.to_second())) + 1
else:
seconds = time_delta.total_seconds()
return min(int(math.ceil(seconds / level.to_second())) + 1,
one_day_trading_seconds / level.to_second() + 1)
def is_finished_kdata_timestamp(timestamp, level: IntervalLevel):
timestamp = to_pd_timestamp(timestamp)
if level.floor_timestamp(timestamp) == timestamp:
return True
return False
def is_in_same_interval(t1: pd.Timestamp, t2: pd.Timestamp, level: IntervalLevel):
t1 = to_pd_timestamp(t1)
t2 = to_pd_timestamp(t2)
if level == IntervalLevel.LEVEL_1WEEK:
return t1.week == t2.week
if level == IntervalLevel.LEVEL_1MON:
return t1.month == t2.month
return level.floor_timestamp(t1) == level.floor_timestamp(t2)
if __name__ == '__main__':
print(date_and_time('2019-10-01', '10:00'))
|
#Crie um programa que leia dois valores e mostre um menu na tela:
'''[ 1 ] somar
[ 2 ] multiplicar
[ 3 ] maior
[ 4 ] novos números
[ 5 ] sair do programa'''
#Seu programa deverá realizar a operação solicitada em cada caso.
from time import sleep
print('MENU')
v1 = float(input('Digite um valor:'))
v2 = float(input('Digite outro valor:'))
resposta = 0
#n = [v1,v2]
multiplica = 0
while resposta != 5:
resposta = int(input('''[ 1 ] somar\n[ 2 ] multiplicar\n[ 3 ] maior\n[ 4 ] novos números\n[ 5 ] sair do programa\n>>>>O que voce que fazer?'''))#essas opções poderiam ser num print(), ue tb ira funcionar
if resposta == 1:
soma = v1 + v2
print('a soma de {} + {} é {}'.format(v1, v2, soma))
if resposta == 2:
multiplica = v1 * v2
print('O número {} x {} = {:.2f}'.format(v1,v2,multiplica))
if resposta == 3:
if v1 > v2:
print('{} é maior'.format(v1))
else:
print('{} é maior'.format(v2))
if resposta == 4:
v1 = float(input('Digite um valor:'))
v2 = float(input('Digite outro valor:'))
elif resposta == 5:
print('FINALIZANDO...')
sleep(1)
print('==='*10)
sleep(1)
print('OK! FIM DO PROGRAMA.')
|
#!/usr/bin/env python
import shutil
from framesource import VideoFrameSource
import tempfile
import decimal
import rateconverter
import os
"""
extractframes package - extract frames from a video.
The top level module contains only one function, extract() which is the main
way you'd accomplish frame extractions.
"""
# maybe refactor this part so that the file movement is also testable
# separately from the extraction?
def extract(infile, outfile, ratio=None, in_frames=None, quiet=True,
out_count=None, out_offset=0):
outdir = os.path.dirname(outfile)
if len(outdir) == 0:
outdir = '.'
if not os.path.isdir(outdir):
raise IOError('Destination directory %s does not exist!' % os.path.dirname(outfile))
if ratio is not None and out_count is not None:
raise ValueError('You can only specify one of ratio and out_count')
elif ratio is None and out_count is None:
ratio = 1
frame_source = VideoFrameSource(infile, quiet=quiet)
if not in_frames:
# xrange is half-open interval. For closed interval, would be
# [0, get_num_frames() - 1]
in_frames = xrange(0, frame_source.get_num_frames())
if in_frames[0] < 0 or in_frames[-1] > frame_source.get_num_frames() - 1:
raise ValueError("Requested bounds %s don't fit in %d-frame video file"
% (in_frames, frame_source.get_num_frames()))
in_count = in_frames[-1] - in_frames[0] + 1
if out_count is not None:
ratio = rateconverter.ratio_for_number(in_count, out_count)
iterator = rateconverter.convert_integers_by_iterator_ratio(ratio, in_frames,
dest_offset=out_offset)
if not quiet:
try:
import progressbar
pbar = progressbar.ProgressBar(widgets=['Copying frames to destination',
progressbar.Bar(), progressbar.ETA()])
test = pbar([1])
iterator = pbar(list(iterator))
except (ImportError, TypeError):
print "(For a progress bar, install python-progressbar v. 2.3)"
for src, dst in iterator:
source = frame_source.get_frame_file(src)
dest = outfile % dst
shutil.copy(source, dest)
|
// users-model.js - The users model
//
// See http://mongoosejs.com/docs/models.html
// for more of what you can do here.
module.exports = function (app) {
const mongooseClient = app.get('mongooseClient');
const { Schema } = mongooseClient;
const users = new Schema({
fName: { type: String, required: true },
lName: { type: String, required: true },
email: { type: String, required: true },
password: { type: String, required: true },
title: { type: String, required: true },
mbtiType: { type: String, enum: [
'INTJ', 'INTP', 'ENTJ', 'ENTJ', 'ENTP', 'INFJ', 'INFP', 'ENFJ', 'ENFP', 'ISTJ', 'ISFJ', 'ESTJ', 'ESFJ', 'ISTP', 'ISFP', 'ESTP', 'ESFP'
] },
roles: { type: [String], enum: ['member', 'admin'], default: 'member' }
}, {
timestamps: true
});
return mongooseClient.model('users', users);
};
|
#!/usr/bin/python
"""
test_functional.py
Functional tests for homebysix-recipes.
"""
import os
import plistlib
import shutil
import subprocess
from nose.tools import * # pylint: disable=W0401, W0614
# Desired identifier prefix, with few exceptions.
IDENTIFIER_PREFIX = "com.github.homebysix."
IDENTIFIER_EXEMPTIONS = (
"com.github.jps3.download.Kitematic",
"com.github.jps3.pkg.Kitematic",
)
# Path to the AutoPkg cache.
AUTOPKG_CACHE = os.path.expanduser("~/Library/AutoPkg/Cache")
def check_recipe(relpath, recipe):
"""Parse the recipe and make sure it's valid."""
assert_is_instance(recipe, dict, "{}: recipe is not a dict".format(relpath))
assert_in("Identifier", recipe, "{}: no Identifier key".format(relpath))
assert_true(
recipe["Identifier"].startswith(IDENTIFIER_PREFIX)
or recipe["Identifier"] in IDENTIFIER_EXEMPTIONS,
"{}: does not start with {}".format(relpath, IDENTIFIER_PREFIX),
)
assert_in("Input", recipe, "{}: no Input key".format(relpath))
assert_in("Process", recipe, "{}: no Process key".format(relpath))
assert_not_in(
"ParentRecipeTrustInfo",
recipe,
"{}: has ParentRecipeTrustInfo key".format(relpath),
)
def clear_cache(identifier):
"""Clear AutoPkg cache for a specific recipe."""
recipe_cache = os.path.join(AUTOPKG_CACHE, identifier)
if os.path.isdir(recipe_cache):
shutil.rmtree(recipe_cache, ignore_errors=True)
def run_recipe(relpath):
"""Run the recipe and check the exit code."""
retcode = subprocess.call(
["/usr/local/bin/autopkg", "run", relpath, "--report-plist=test/report.plist"]
)
assert_equal(retcode, 0, "{}: autopkg exited with code {}".format(relpath, retcode))
def test_functional():
"""Functional tests"""
# Types of recipes we are targeting for testing. (Recommend "download" and "pkg" only.)
recipe_types = ("download", "pkg")
# Walk our repo and collect each recipe matching the above types.
recipe_paths = []
for root, dirs, files in os.walk("."):
dirs[:] = [d for d in dirs if not d.startswith(".")]
for filename in files:
if filename.endswith(tuple("." + x + ".recipe" for x in recipe_types)):
recipe_paths.append(os.path.join(root, filename))
# Check and run each recipe we found.
for index, recipe_path in enumerate(recipe_paths):
print(
"Testing {} ({} of {})...".format(recipe_path, index + 1, len(recipe_paths))
)
recipe = plistlib.readPlist(recipe_path)
yield check_recipe, recipe_path, recipe
clear_cache(recipe["Identifier"])
yield run_recipe, recipe_path
clear_cache(recipe["Identifier"])
|
module.exports = {
env: {
browser: true,
es6: true,
},
extends: [
'standard',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly'
},
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
},
rules: {
'no-unused-vars': ['warn', {
vars: 'all', args: 'none', ignoreRestSiblings: true
}],
camelcase: 'off',
'comma-dangle': ['error', 'always-multiline'],
'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 1 }],
},
overrides: [
{
files: ['*.html'],
plugins : ['html'],
rules: {
'import/first': 'off',
'import/no-duplicates': 'off',
'import/no-mutable-exports': 'off',
'import/no-unresolved': 'off',
}
},
],
}
|
import React, { useState } from "react"
import GetStartDataArlingtonDental from "../../data/getStart/arlingtonDental/index"
import GetStartDataCrownDental from "../../data/getStart/crownDental/index"
import GetStartDataCrystalCreek from "../../data/getStart/crystalCreek/index"
import GetStartDataDenstar from "../../data/getStart/denstar/index"
import GetStartDataFairview from "../../data/getStart/fairview/index"
import GetStartDataPrimeDDS from "../../data/getStart/primeDDS"
import GetStartDataPrimeDentalGarland from "../../data/getStart/primeDentalGarland/index"
import GetStartDataPrimeDentalGP from "../../data/getStart/primeDentalGP/index"
import GetStartDataPrimeDentalPlano from "../../data/getStart/primeDentalPlano/index"
import GetStartDataShare from "../../data/getStart/share/index"
import GetStartDataWhiteRock from "../../data/getStart/whiteRock/index"
import { Container, Row, Col } from "reactstrap"
function GetStart(props) {
let [typeOfPage] = useState(props.typeOfPage)
let GetStartDataPrefix = GetStartDataPrimeDDS
if (typeOfPage === "arlingtonDental") {
GetStartDataPrefix = GetStartDataArlingtonDental
} else if (typeOfPage === "crownDental") {
GetStartDataPrefix = GetStartDataCrownDental
} else if (typeOfPage === "crystalCreek") {
GetStartDataPrefix = GetStartDataCrystalCreek
} else if (typeOfPage === "denstar") {
GetStartDataPrefix = GetStartDataDenstar
} else if (typeOfPage === "fairview") {
GetStartDataPrefix = GetStartDataFairview
} else if (typeOfPage === "primeDentalGarland") {
GetStartDataPrefix = GetStartDataPrimeDentalGarland
} else if (typeOfPage === "primeDentalGP") {
GetStartDataPrefix = GetStartDataPrimeDentalGP
} else if (typeOfPage === "primeDentalPlano") {
GetStartDataPrefix = GetStartDataPrimeDentalPlano
} else if (typeOfPage === "share") {
GetStartDataPrefix = GetStartDataShare
} else if (typeOfPage === "whiteRock") {
GetStartDataPrefix = GetStartDataWhiteRock
} else {
GetStartDataPrefix = GetStartDataPrimeDDS
}
return (
<section className="section section-lg bg-get-start">
<Container>
<Row>
<Col lg={{ size: 8, offset: 2 }} className="text-center">
<h2 className="get-started-title" dangerouslySetInnerHTML={{__html: GetStartDataPrefix[0].title}} />
<div className="section-title-border margin-t-20 bg-white"></div>
<div className="section-subtitle font-secondary text-muted text-center padding-t-30" dangerouslySetInnerHTML={{__html: GetStartDataPrefix[1].title}} />
{/* <a
href="#"
className="btn btn-bg-white waves-effect margin-t-20 mb-4"
>
{GetStartDataPrefix[2].title}{" "}
<i className="mdi mdi-arrow-right"></i>{" "}
</a> */}
</Col>
</Row>
</Container>
<div className="bg-pattern-effect"></div>
</section>
)
}
export default GetStart
|
webpackJsonp([1],{150:function(n,t,e){"use strict";function sequence(n,t){return void 0===t&&(t=null),{type:2,steps:n,options:t}}function style(n){return{type:6,styles:n,offset:null}}function scheduleMicroTask(n){Promise.resolve(null).then(n)}e.d(t,"b",function(){return r}),e.d(t,"c",function(){return o}),e.d(t,"g",function(){return i}),e.d(t,"a",function(){return sequence}),e.d(t,"h",function(){return style}),e.d(t,"d",function(){return a}),e.d(t,"e",function(){return s}),e.d(t,"f",function(){return l});var r=function(){function AnimationBuilder(){}return AnimationBuilder.prototype.build=function(n){},AnimationBuilder}(),o=function(){function AnimationFactory(){}return AnimationFactory.prototype.create=function(n,t){},AnimationFactory}(),i="*",a=function(){function NoopAnimationPlayer(){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this.parentPlayer=null,this.totalTime=0}return NoopAnimationPlayer.prototype._onFinish=function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(n){return n()}),this._onDoneFns=[])},NoopAnimationPlayer.prototype.onStart=function(n){this._onStartFns.push(n)},NoopAnimationPlayer.prototype.onDone=function(n){this._onDoneFns.push(n)},NoopAnimationPlayer.prototype.onDestroy=function(n){this._onDestroyFns.push(n)},NoopAnimationPlayer.prototype.hasStarted=function(){return this._started},NoopAnimationPlayer.prototype.init=function(){},NoopAnimationPlayer.prototype.play=function(){this.hasStarted()||(this.triggerMicrotask(),this._onStart()),this._started=!0},NoopAnimationPlayer.prototype.triggerMicrotask=function(){var n=this;scheduleMicroTask(function(){return n._onFinish()})},NoopAnimationPlayer.prototype._onStart=function(){this._onStartFns.forEach(function(n){return n()}),this._onStartFns=[]},NoopAnimationPlayer.prototype.pause=function(){},NoopAnimationPlayer.prototype.restart=function(){},NoopAnimationPlayer.prototype.finish=function(){this._onFinish()},NoopAnimationPlayer.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(function(n){return n()}),this._onDestroyFns=[])},NoopAnimationPlayer.prototype.reset=function(){},NoopAnimationPlayer.prototype.setPosition=function(n){},NoopAnimationPlayer.prototype.getPosition=function(){return 0},NoopAnimationPlayer}(),s=function(){function AnimationGroupPlayer(n){var t=this;this._players=n,this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0;var e=0,r=0,o=0,i=this._players.length;0==i?scheduleMicroTask(function(){return t._onFinish()}):this._players.forEach(function(n){n.parentPlayer=t,n.onDone(function(){++e>=i&&t._onFinish()}),n.onDestroy(function(){++r>=i&&t._onDestroy()}),n.onStart(function(){++o>=i&&t._onStart()})}),this.totalTime=this._players.reduce(function(n,t){return Math.max(n,t.totalTime)},0)}return AnimationGroupPlayer.prototype._onFinish=function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(n){return n()}),this._onDoneFns=[])},AnimationGroupPlayer.prototype.init=function(){this._players.forEach(function(n){return n.init()})},AnimationGroupPlayer.prototype.onStart=function(n){this._onStartFns.push(n)},AnimationGroupPlayer.prototype._onStart=function(){this.hasStarted()||(this._onStartFns.forEach(function(n){return n()}),this._onStartFns=[],this._started=!0)},AnimationGroupPlayer.prototype.onDone=function(n){this._onDoneFns.push(n)},AnimationGroupPlayer.prototype.onDestroy=function(n){this._onDestroyFns.push(n)},AnimationGroupPlayer.prototype.hasStarted=function(){return this._started},AnimationGroupPlayer.prototype.play=function(){this.parentPlayer||this.init(),this._onStart(),this._players.forEach(function(n){return n.play()})},AnimationGroupPlayer.prototype.pause=function(){this._players.forEach(function(n){return n.pause()})},AnimationGroupPlayer.prototype.restart=function(){this._players.forEach(function(n){return n.restart()})},AnimationGroupPlayer.prototype.finish=function(){this._onFinish(),this._players.forEach(function(n){return n.finish()})},AnimationGroupPlayer.prototype.destroy=function(){this._onDestroy()},AnimationGroupPlayer.prototype._onDestroy=function(){this._destroyed||(this._destroyed=!0,this._onFinish(),this._players.forEach(function(n){return n.destroy()}),this._onDestroyFns.forEach(function(n){return n()}),this._onDestroyFns=[])},AnimationGroupPlayer.prototype.reset=function(){this._players.forEach(function(n){return n.reset()}),this._destroyed=!1,this._finished=!1,this._started=!1},AnimationGroupPlayer.prototype.setPosition=function(n){var t=n*this.totalTime;this._players.forEach(function(n){var e=n.totalTime?Math.min(1,t/n.totalTime):1;n.setPosition(e)})},AnimationGroupPlayer.prototype.getPosition=function(){var n=0;return this._players.forEach(function(t){var e=t.getPosition();n=Math.min(e,n)}),n},Object.defineProperty(AnimationGroupPlayer.prototype,"players",{get:function(){return this._players},enumerable:!0,configurable:!0}),AnimationGroupPlayer.prototype.beforeDestroy=function(){this.players.forEach(function(n){n.beforeDestroy&&n.beforeDestroy()})},AnimationGroupPlayer}(),l="!"},151:function(n,t,e){"use strict";function paramParser(n,t){var e=new Map;if(n.length>0){n.split("&").forEach(function(n){var r=n.indexOf("="),o=-1==r?[t.decodeKey(n),""]:[t.decodeKey(n.slice(0,r)),t.decodeValue(n.slice(r+1))],i=o[0],a=o[1],s=e.get(i)||[];s.push(a),e.set(i,s)})}return e}function standardEncoding(n){return encodeURIComponent(n).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}function mightHaveBody(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function isArrayBuffer(n){return"undefined"!=typeof ArrayBuffer&&n instanceof ArrayBuffer}function isBlob(n){return"undefined"!=typeof Blob&&n instanceof Blob}function isFormData(n){return"undefined"!=typeof FormData&&n instanceof FormData}function addBody(n,t){return{body:t,headers:n.headers,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials}}function getResponseUrl(n){return"responseURL"in n&&n.responseURL?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):null}function interceptingHandler(n,t){return void 0===t&&(t=[]),t?t.reduceRight(function(n,t){return new E(n,t)},n):n}function jsonpCallbackContext(){return"object"==typeof window?window:{}}Object.defineProperty(t,"__esModule",{value:!0}),e.d(t,"HttpBackend",function(){return m}),e.d(t,"HttpHandler",function(){return c}),e.d(t,"HttpClient",function(){return _}),e.d(t,"HttpHeaders",function(){return g}),e.d(t,"HTTP_INTERCEPTORS",function(){return T}),e.d(t,"JsonpClientBackend",function(){return C}),e.d(t,"JsonpInterceptor",function(){return O}),e.d(t,"HttpClientJsonpModule",function(){return z}),e.d(t,"HttpClientModule",function(){return F}),e.d(t,"HttpClientXsrfModule",function(){return M}),e.d(t,"ɵinterceptingHandler",function(){return interceptingHandler}),e.d(t,"HttpParams",function(){return f}),e.d(t,"HttpUrlEncodingCodec",function(){return u}),e.d(t,"HttpRequest",function(){return h}),e.d(t,"HttpErrorResponse",function(){return w}),e.d(t,"HttpEventType",function(){return b}),e.d(t,"HttpHeaderResponse",function(){return v}),e.d(t,"HttpResponse",function(){return x}),e.d(t,"HttpResponseBase",function(){return y}),e.d(t,"HttpXhrBackend",function(){return D}),e.d(t,"XhrFactory",function(){return N}),e.d(t,"HttpXsrfTokenExtractor",function(){return L}),e.d(t,"ɵa",function(){return A}),e.d(t,"ɵb",function(){return S}),e.d(t,"ɵc",function(){return jsonpCallbackContext}),e.d(t,"ɵd",function(){return I}),e.d(t,"ɵg",function(){return B}),e.d(t,"ɵh",function(){return j}),e.d(t,"ɵe",function(){return R}),e.d(t,"ɵf",function(){return H});var r=e(27),o=e(18),i=e(88),a=(e.n(i),e(128)),s=(e.n(a),e(129)),l=(e.n(s),e(89)),d=(e.n(l),e(60)),p=e(0),c=(e.n(p),function(){function HttpHandler(){}return HttpHandler.prototype.handle=function(n){},HttpHandler}()),m=function(){function HttpBackend(){}return HttpBackend.prototype.handle=function(n){},HttpBackend}(),u=function(){function HttpUrlEncodingCodec(){}return HttpUrlEncodingCodec.prototype.encodeKey=function(n){return standardEncoding(n)},HttpUrlEncodingCodec.prototype.encodeValue=function(n){return standardEncoding(n)},HttpUrlEncodingCodec.prototype.decodeKey=function(n){return decodeURIComponent(n)},HttpUrlEncodingCodec.prototype.decodeValue=function(n){return decodeURIComponent(n)},HttpUrlEncodingCodec}(),f=function(){function HttpParams(n){void 0===n&&(n={}),this.updates=null,this.cloneFrom=null,this.encoder=n.encoder||new u,this.map=n.fromString?paramParser(n.fromString,this.encoder):null}return HttpParams.prototype.has=function(n){return this.init(),this.map.has(n)},HttpParams.prototype.get=function(n){this.init();var t=this.map.get(n);return t?t[0]:null},HttpParams.prototype.getAll=function(n){return this.init(),this.map.get(n)||null},HttpParams.prototype.keys=function(){return this.init(),Array.from(this.map.keys())},HttpParams.prototype.append=function(n,t){return this.clone({param:n,value:t,op:"a"})},HttpParams.prototype.set=function(n,t){return this.clone({param:n,value:t,op:"s"})},HttpParams.prototype.delete=function(n,t){return this.clone({param:n,value:t,op:"d"})},HttpParams.prototype.toString=function(){var n=this;return this.init(),this.keys().map(function(t){var e=n.encoder.encodeKey(t);return n.map.get(t).map(function(t){return e+"="+n.encoder.encodeValue(t)}).join("&")}).join("&")},HttpParams.prototype.clone=function(n){var t=new HttpParams({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat([n]),t},HttpParams.prototype.init=function(){var n=this;null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(function(t){return n.map.set(t,n.cloneFrom.map.get(t))}),this.updates.forEach(function(t){switch(t.op){case"a":case"s":var e=("a"===t.op?n.map.get(t.param):void 0)||[];e.push(t.value),n.map.set(t.param,e);break;case"d":if(void 0===t.value){n.map.delete(t.param);break}var r=n.map.get(t.param)||[],o=r.indexOf(t.value);-1!==o&&r.splice(o,1),r.length>0?n.map.set(t.param,r):n.map.delete(t.param)}}),this.cloneFrom=null)},HttpParams}(),g=function(){function HttpHeaders(n){var t=this;this.normalizedNames=new Map,this.lazyUpdate=null,n?this.lazyInit="string"==typeof n?function(){t.headers=new Map,n.split("\n").forEach(function(n){var e=n.indexOf(":");if(e>0){var r=n.slice(0,e),o=r.toLowerCase(),i=n.slice(e+1).trim();t.maybeSetNormalizedName(r,o),t.headers.has(o)?t.headers.get(o).push(i):t.headers.set(o,[i])}})}:function(){t.headers=new Map,Object.keys(n).forEach(function(e){var r=n[e],o=e.toLowerCase();"string"==typeof r&&(r=[r]),r.length>0&&(t.headers.set(o,r),t.maybeSetNormalizedName(e,o))})}:this.headers=new Map}return HttpHeaders.prototype.has=function(n){return this.init(),this.headers.has(n.toLowerCase())},HttpHeaders.prototype.get=function(n){this.init();var t=this.headers.get(n.toLowerCase());return t&&t.length>0?t[0]:null},HttpHeaders.prototype.keys=function(){return this.init(),Array.from(this.normalizedNames.values())},HttpHeaders.prototype.getAll=function(n){return this.init(),this.headers.get(n.toLowerCase())||null},HttpHeaders.prototype.append=function(n,t){return this.clone({name:n,value:t,op:"a"})},HttpHeaders.prototype.set=function(n,t){return this.clone({name:n,value:t,op:"s"})},HttpHeaders.prototype.delete=function(n,t){return this.clone({name:n,value:t,op:"d"})},HttpHeaders.prototype.maybeSetNormalizedName=function(n,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,n)},HttpHeaders.prototype.init=function(){var n=this;this.lazyInit&&(this.lazyInit instanceof HttpHeaders?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(function(t){return n.applyUpdate(t)}),this.lazyUpdate=null))},HttpHeaders.prototype.copyFrom=function(n){var t=this;n.init(),Array.from(n.headers.keys()).forEach(function(e){t.headers.set(e,n.headers.get(e)),t.normalizedNames.set(e,n.normalizedNames.get(e))})},HttpHeaders.prototype.clone=function(n){var t=new HttpHeaders;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof HttpHeaders?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([n]),t},HttpHeaders.prototype.applyUpdate=function(n){var t=n.name.toLowerCase();switch(n.op){case"a":case"s":var e=n.value;if("string"==typeof e&&(e=[e]),0===e.length)return;this.maybeSetNormalizedName(n.name,t);var r=("a"===n.op?this.headers.get(t):void 0)||[];r.push.apply(r,e),this.headers.set(t,r);break;case"d":var o=n.value;if(o){var i=this.headers.get(t);if(!i)return;i=i.filter(function(n){return-1===o.indexOf(n)}),0===i.length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,i)}else this.headers.delete(t),this.normalizedNames.delete(t)}},HttpHeaders.prototype.forEach=function(n){var t=this;this.init(),Array.from(this.normalizedNames.keys()).forEach(function(e){return n(t.normalizedNames.get(e),t.headers.get(e))})},HttpHeaders}(),h=function(){function HttpRequest(n,t,e,r){this.url=t,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=n.toUpperCase();var o;if(mightHaveBody(this.method)||r?(this.body=e||null,o=r):o=e,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.params&&(this.params=o.params)),this.headers||(this.headers=new g),this.params){var i=this.params.toString();if(0===i.length)this.urlWithParams=t;else{var a=t.indexOf("?"),s=-1===a?"?":a<t.length-1?"&":"";this.urlWithParams=t+s+i}}else this.params=new f,this.urlWithParams=t}return HttpRequest.prototype.serializeBody=function(){return null===this.body?null:isArrayBuffer(this.body)||isBlob(this.body)||isFormData(this.body)||"string"==typeof this.body?this.body:this.body instanceof f?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()},HttpRequest.prototype.detectContentTypeHeader=function(){return null===this.body?null:isFormData(this.body)?null:isBlob(this.body)?this.body.type||null:isArrayBuffer(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof f?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||Array.isArray(this.body)?"application/json":null},HttpRequest.prototype.clone=function(n){void 0===n&&(n={});var t=n.method||this.method,e=n.url||this.url,r=n.responseType||this.responseType,o=void 0!==n.body?n.body:this.body,i=void 0!==n.withCredentials?n.withCredentials:this.withCredentials,a=void 0!==n.reportProgress?n.reportProgress:this.reportProgress,s=n.headers||this.headers,l=n.params||this.params;return void 0!==n.setHeaders&&(s=Object.keys(n.setHeaders).reduce(function(t,e){return t.set(e,n.setHeaders[e])},s)),n.setParams&&(l=Object.keys(n.setParams).reduce(function(t,e){return t.set(e,n.setParams[e])},l)),new HttpRequest(t,e,o,{params:l,headers:s,reportProgress:a,responseType:r,withCredentials:i})},HttpRequest}(),b={};b.Sent=0,b.UploadProgress=1,b.ResponseHeader=2,b.DownloadProgress=3,b.Response=4,b.User=5,b[b.Sent]="Sent",b[b.UploadProgress]="UploadProgress",b[b.ResponseHeader]="ResponseHeader",b[b.DownloadProgress]="DownloadProgress",b[b.Response]="Response",b[b.User]="User";var y=function(){function HttpResponseBase(n,t,e){void 0===t&&(t=200),void 0===e&&(e="OK"),this.headers=n.headers||new g,this.status=void 0!==n.status?n.status:t,this.statusText=n.statusText||e,this.url=n.url||null,this.ok=this.status>=200&&this.status<300}return HttpResponseBase}(),v=function(n){function HttpHeaderResponse(t){void 0===t&&(t={});var e=n.call(this,t)||this;return e.type=b.ResponseHeader,e}return r.a(HttpHeaderResponse,n),HttpHeaderResponse.prototype.clone=function(n){return void 0===n&&(n={}),new HttpHeaderResponse({headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})},HttpHeaderResponse}(y),x=function(n){function HttpResponse(t){void 0===t&&(t={});var e=n.call(this,t)||this;return e.type=b.Response,e.body=t.body||null,e}return r.a(HttpResponse,n),HttpResponse.prototype.clone=function(n){return void 0===n&&(n={}),new HttpResponse({body:void 0!==n.body?n.body:this.body,headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})},HttpResponse}(y),w=function(n){function HttpErrorResponse(t){var e=n.call(this,t,0,"Unknown Error")||this;return e.name="HttpErrorResponse",e.ok=!1,e.status>=200&&e.status<300?e.message="Http failure during parsing for "+(t.url||"(unknown url)"):e.message="Http failure response for "+(t.url||"(unknown url)")+": "+t.status+" "+t.statusText,e.error=t.error||null,e}return r.a(HttpErrorResponse,n),HttpErrorResponse}(y),_=function(){function HttpClient(n){this.handler=n}return HttpClient.prototype.request=function(n,t,r){var o=this;void 0===r&&(r={});var d;d=n instanceof h?n:new h(n,t,r.body||null,{headers:r.headers,params:r.params,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials});var p=a.concatMap.call(e.i(i.of)(d),function(n){return o.handler.handle(n)});if(n instanceof h||"events"===r.observe)return p;var c=s.filter.call(p,function(n){return n instanceof x});switch(r.observe||"body"){case"body":switch(d.responseType){case"arraybuffer":return l.map.call(c,function(n){if(null!==n.body&&!(n.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return n.body});case"blob":return l.map.call(c,function(n){if(null!==n.body&&!(n.body instanceof Blob))throw new Error("Response is not a Blob.");return n.body});case"text":return l.map.call(c,function(n){if(null!==n.body&&"string"!=typeof n.body)throw new Error("Response is not a string.");return n.body});case"json":default:return l.map.call(c,function(n){return n.body})}case"response":return c;default:throw new Error("Unreachable: unhandled observe type "+r.observe+"}")}},HttpClient.prototype.delete=function(n,t){return void 0===t&&(t={}),this.request("DELETE",n,t)},HttpClient.prototype.get=function(n,t){return void 0===t&&(t={}),this.request("GET",n,t)},HttpClient.prototype.head=function(n,t){return void 0===t&&(t={}),this.request("HEAD",n,t)},HttpClient.prototype.jsonp=function(n,t){return this.request("JSONP",n,{params:(new f).append(t,"JSONP_CALLBACK"),observe:"body",responseType:"json"})},HttpClient.prototype.options=function(n,t){return void 0===t&&(t={}),this.request("OPTIONS",n,t)},HttpClient.prototype.patch=function(n,t,e){return void 0===e&&(e={}),this.request("PATCH",n,addBody(e,t))},HttpClient.prototype.post=function(n,t,e){return void 0===e&&(e={}),this.request("POST",n,addBody(e,t))},HttpClient.prototype.put=function(n,t,e){return void 0===e&&(e={}),this.request("PUT",n,addBody(e,t))},HttpClient}();_.decorators=[{type:o.Injectable}],_.ctorParameters=function(){return[{type:c}]};var E=function(){function HttpInterceptorHandler(n,t){this.next=n,this.interceptor=t}return HttpInterceptorHandler.prototype.handle=function(n){return this.interceptor.intercept(n,this.next)},HttpInterceptorHandler}(),T=new o.InjectionToken("HTTP_INTERCEPTORS"),A=function(){function NoopInterceptor(){}return NoopInterceptor.prototype.intercept=function(n,t){return t.handle(n)},NoopInterceptor}();A.decorators=[{type:o.Injectable}],A.ctorParameters=function(){return[]};var k=0,S=function(){function JsonpCallbackContext(){}return JsonpCallbackContext}(),C=function(){function JsonpClientBackend(n,t){this.callbackMap=n,this.document=t}return JsonpClientBackend.prototype.nextCallback=function(){return"ng_jsonp_callback_"+k++},JsonpClientBackend.prototype.handle=function(n){var t=this;if("JSONP"!==n.method)throw new Error("JSONP requests must use JSONP request method.");if("json"!==n.responseType)throw new Error("JSONP requests must use Json response type.");return new p.Observable(function(e){var r=t.nextCallback(),o=n.urlWithParams.replace(/=JSONP_CALLBACK(&|$)/,"="+r+"$1"),i=t.document.createElement("script");i.src=o;var a=null,s=!1,l=!1;t.callbackMap[r]=function(n){delete t.callbackMap[r],l||(a=n,s=!0)};var d=function(){i.parentNode&&i.parentNode.removeChild(i),delete t.callbackMap[r]},p=function(n){if(!l){if(d(),!s)return void e.error(new w({url:o,status:0,statusText:"JSONP Error",error:new Error("JSONP injected script did not invoke callback.")}));e.next(new x({body:a,status:200,statusText:"OK",url:o})),e.complete()}},c=function(n){l||(d(),e.error(new w({error:n,status:0,statusText:"JSONP Error",url:o})))};return i.addEventListener("load",p),i.addEventListener("error",c),t.document.body.appendChild(i),e.next({type:b.Sent}),function(){l=!0,i.removeEventListener("load",p),i.removeEventListener("error",c),d()}})},JsonpClientBackend}();C.decorators=[{type:o.Injectable}],C.ctorParameters=function(){return[{type:S},{type:void 0,decorators:[{type:o.Inject,args:[d.DOCUMENT]}]}]};var O=function(){function JsonpInterceptor(n){this.jsonp=n}return JsonpInterceptor.prototype.intercept=function(n,t){return"JSONP"===n.method?this.jsonp.handle(n):t.handle(n)},JsonpInterceptor}();O.decorators=[{type:o.Injectable}],O.ctorParameters=function(){return[{type:C}]};var P=/^\)\]\}',?\n/,N=function(){function XhrFactory(){}return XhrFactory.prototype.build=function(){},XhrFactory}(),I=function(){function BrowserXhr(){}return BrowserXhr.prototype.build=function(){return new XMLHttpRequest},BrowserXhr}();I.decorators=[{type:o.Injectable}],I.ctorParameters=function(){return[]};var D=function(){function HttpXhrBackend(n){this.xhrFactory=n}return HttpXhrBackend.prototype.handle=function(n){var t=this;if("JSONP"===n.method)throw new Error("Attempted to construct Jsonp request without JsonpClientModule installed.");return new p.Observable(function(e){var r=t.xhrFactory.build();if(r.open(n.method,n.urlWithParams),n.withCredentials&&(r.withCredentials=!0),n.headers.forEach(function(n,t){return r.setRequestHeader(n,t.join(","))}),n.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!n.headers.has("Content-Type")){var o=n.detectContentTypeHeader();null!==o&&r.setRequestHeader("Content-Type",o)}n.responseType&&(r.responseType=n.responseType.toLowerCase());var i=n.serializeBody(),a=null,s=function(){if(null!==a)return a;var t=1223===r.status?204:r.status,e=r.statusText||"OK",o=new g(r.getAllResponseHeaders()),i=getResponseUrl(r)||n.url;return a=new v({headers:o,status:t,statusText:e,url:i})},l=function(){var t=s(),o=t.headers,i=t.status,a=t.statusText,l=t.url,d=null;204!==i&&"string"==typeof(d=void 0===r.response?r.responseText:r.response)&&(d=d.replace(P,"")),0===i&&(i=d?200:0);var p=i>=200&&i<300;if(p&&"string"==typeof d&&"json"===n.responseType)try{d=JSON.parse(d)}catch(n){p=!1,d={error:n,text:d}}p?(e.next(new x({body:d,headers:o,status:i,statusText:a,url:l||void 0})),e.complete()):e.error(new w({error:d,headers:o,status:i,statusText:a,url:l||void 0}))},d=function(n){var t=new w({error:n,status:r.status||0,statusText:r.statusText||"Unknown Error"});e.error(t)},p=!1,c=function(t){p||(e.next(s()),p=!0);var o={type:b.DownloadProgress,loaded:t.loaded};t.lengthComputable&&(o.total=t.total),"text"===n.responseType&&r.responseText&&(o.partialText=r.responseText),e.next(o)},m=function(n){var t={type:b.UploadProgress,loaded:n.loaded};n.lengthComputable&&(t.total=n.total),e.next(t)};return r.addEventListener("load",l),r.addEventListener("error",d),n.reportProgress&&(r.addEventListener("progress",c),null!==i&&r.upload&&r.upload.addEventListener("progress",m)),r.send(i),e.next({type:b.Sent}),function(){r.removeEventListener("error",d),r.removeEventListener("load",l),n.reportProgress&&(r.removeEventListener("progress",c),null!==i&&r.upload&&r.upload.removeEventListener("progress",m)),r.abort()}})},HttpXhrBackend}();D.decorators=[{type:o.Injectable}],D.ctorParameters=function(){return[{type:N}]};var R=new o.InjectionToken("XSRF_COOKIE_NAME"),H=new o.InjectionToken("XSRF_HEADER_NAME"),L=function(){function HttpXsrfTokenExtractor(){}return HttpXsrfTokenExtractor.prototype.getToken=function(){},HttpXsrfTokenExtractor}(),B=function(){function HttpXsrfCookieExtractor(n,t,e){this.doc=n,this.platform=t,this.cookieName=e,this.lastCookieString="",this.lastToken=null,this.parseCount=0}return HttpXsrfCookieExtractor.prototype.getToken=function(){if("server"===this.platform)return null;var n=this.doc.cookie||"";return n!==this.lastCookieString&&(this.parseCount++,this.lastToken=e.i(d["ɵparseCookieValue"])(n,this.cookieName),this.lastCookieString=n),this.lastToken},HttpXsrfCookieExtractor}();B.decorators=[{type:o.Injectable}],B.ctorParameters=function(){return[{type:void 0,decorators:[{type:o.Inject,args:[d.DOCUMENT]}]},{type:void 0,decorators:[{type:o.Inject,args:[o.PLATFORM_ID]}]},{type:void 0,decorators:[{type:o.Inject,args:[R]}]}]};var j=function(){function HttpXsrfInterceptor(n,t){this.tokenService=n,this.headerName=t}return HttpXsrfInterceptor.prototype.intercept=function(n,t){var e=n.url.toLowerCase();if("GET"===n.method||"HEAD"===n.method||e.startsWith("http://")||e.startsWith("https://"))return t.handle(n);var r=this.tokenService.getToken();return null===r||n.headers.has(this.headerName)||(n=n.clone({headers:n.headers.set(this.headerName,r)})),t.handle(n)},HttpXsrfInterceptor}();j.decorators=[{type:o.Injectable}],j.ctorParameters=function(){return[{type:L},{type:void 0,decorators:[{type:o.Inject,args:[H]}]}]};var M=function(){function HttpClientXsrfModule(){}return HttpClientXsrfModule.disable=function(){return{ngModule:HttpClientXsrfModule,providers:[{provide:j,useClass:A}]}},HttpClientXsrfModule.withOptions=function(n){return void 0===n&&(n={}),{ngModule:HttpClientXsrfModule,providers:[n.cookieName?{provide:R,useValue:n.cookieName}:[],n.headerName?{provide:H,useValue:n.headerName}:[]]}},HttpClientXsrfModule}();M.decorators=[{type:o.NgModule,args:[{providers:[j,{provide:T,useExisting:j,multi:!0},{provide:L,useClass:B},{provide:R,useValue:"XSRF-TOKEN"},{provide:H,useValue:"X-XSRF-TOKEN"}]}]}],M.ctorParameters=function(){return[]};var F=function(){function HttpClientModule(){}return HttpClientModule}();F.decorators=[{type:o.NgModule,args:[{imports:[M.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})],providers:[_,{provide:c,useFactory:interceptingHandler,deps:[m,[new o.Optional,new o.Inject(T)]]},D,{provide:m,useExisting:D},I,{provide:N,useExisting:I}]}]}],F.ctorParameters=function(){return[]};var z=function(){function HttpClientJsonpModule(){}return HttpClientJsonpModule}();z.decorators=[{type:o.NgModule,args:[{providers:[C,{provide:S,useFactory:jsonpCallbackContext},{provide:T,useClass:O,multi:!0}]}]}],z.ctorParameters=function(){return[]}},186:function(n,t){n.exports='<div class="app-container">\n <div class="control-panel">\n <div class="btn-primary btn btn-lg" (click)="fetchMessage()">Fetch Message</div>\n <div class="btn-danger btn btn-lg" (click)="clearMessages()">Clear Messages</div>\n <a href="http://localhost:7865" target="_blank" class="btn btn-info btn-lg">View Zipkin UI</a>\n </div>\n <div class="message-container">\n <div class="messages">\n <ol>\n <li *ngFor="let message of messages"\n [class.success]="message.succeeded"\n [class.failure]="message.failed"\n >{{message.value}}</li>\n </ol>\n </div>\n </div>\n</div>\n'},298:function(n,t,e){"use strict";var r=this&&this.__decorate||function(n,t,e,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,e):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(o=n[s])&&(a=(i<3?o(a):i>3?o(t,e,a):o(t,e))||a);return i>3&&a&&Object.defineProperty(t,e,a),a},o=this&&this.__metadata||function(n,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=e(151),a=e(299),s=e(18),l=function(){function BackendService(n){this.httpClient=n}return BackendService.prototype.fetchMessage=function(){return this.httpClient.get("./get/message",{responseType:"text"}).map(function(n){return new a.Message(n)})},BackendService=r([s.Injectable(),o("design:paramtypes",[i.HttpClient])],BackendService)}();t.BackendService=l},299:function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function Message(n){this.value=n}return Object.defineProperty(Message.prototype,"succeeded",{get:function(){return this.value.indexOf("Try again")<0},enumerable:!0,configurable:!0}),Object.defineProperty(Message.prototype,"failed",{get:function(){return!this.succeeded},enumerable:!0,configurable:!0}),Message}();t.Message=r},306:function(n,t,e){"use strict";var r=this&&this.__decorate||function(n,t,e,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,e):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(o=n[s])&&(a=(i<3?o(a):i>3?o(t,e,a):o(t,e))||a);return i>3&&a&&Object.defineProperty(t,e,a),a};Object.defineProperty(t,"__esModule",{value:!0});var o=e(18),i=e(46),a=e(146),s=e(147),l=e(310),d=e(758),p=e(76),c=e(298),m=e(151),u=function(){function AppModule(){}return AppModule=r([o.NgModule({imports:[i.BrowserModule,a.FormsModule,p.HttpModule,m.HttpClientModule,l.BrowserAnimationsModule],exports:[s.RouterModule],declarations:[d.AppComponent],bootstrap:[d.AppComponent],providers:[c.BackendService]})],AppModule)}();t.AppModule=u},307:function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(473),e(315),e(474)},308:function(n,t,e){"use strict";function optimizeGroupPlayer(n){switch(n.length){case 0:return new o.d;case 1:return n[0];default:return new o.e(n)}}function normalizeKeyframes(n,t,e,r,i,a){void 0===i&&(i={}),void 0===a&&(a={});var s=[],l=[],d=-1,p=null;if(r.forEach(function(n){var e=n.offset,r=e==d,c=r&&p||{};Object.keys(n).forEach(function(e){var r=e,l=n[e];if("offset"!==e)switch(r=t.normalizePropertyName(r,s),l){case o.f:l=i[e];break;case o.g:l=a[e];break;default:l=t.normalizeStyleValue(e,r,l,s)}c[r]=l}),r||l.push(c),p=c,d=e}),s.length){throw new Error("Unable to animate due to the following errors:\n - "+s.join("\n - "))}return l}function listenOnPlayer(n,t,e,r){switch(t){case"start":n.onStart(function(){return r(e&©AnimationEvent(e,"start",n.totalTime))});break;case"done":n.onDone(function(){return r(e&©AnimationEvent(e,"done",n.totalTime))});break;case"destroy":n.onDestroy(function(){return r(e&©AnimationEvent(e,"destroy",n.totalTime))})}}function copyAnimationEvent(n,t,e){var r=makeAnimationEvent(n.element,n.triggerName,n.fromState,n.toState,t||n.phaseName,void 0==e?n.totalTime:e),o=n._data;return null!=o&&(r._data=o),r}function makeAnimationEvent(n,t,e,r,o,i){return void 0===o&&(o=""),void 0===i&&(i=0),{element:n,triggerName:t,fromState:e,toState:r,phaseName:o,totalTime:i}}function getOrSetAsInMap(n,t,e){var r;return n instanceof Map?(r=n.get(t))||n.set(t,r=e):(r=n[t])||(r=n[t]=e),r}function parseTimelineCommand(n){var t=n.indexOf(":");return[n.substring(1,t),n.substr(t+1)]}function resolveTimingValue(n){if("number"==typeof n)return n;var t=n.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:_convertTimeValueToMS(parseFloat(t[1]),t[2])}function _convertTimeValueToMS(n,t){switch(t){case"s":return n*g;default:return n}}function resolveTiming(n,t,e){return n.hasOwnProperty("duration")?n:parseTimeExpression(n,t,e)}function parseTimeExpression(n,t,e){var r,o=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,i=0,a="";if("string"==typeof n){var s=n.match(o);if(null===s)return t.push('The provided timing value "'+n+'" is invalid.'),{duration:0,delay:0,easing:""};r=_convertTimeValueToMS(parseFloat(s[1]),s[2]);var l=s[3];null!=l&&(i=_convertTimeValueToMS(Math.floor(parseFloat(l)),s[4]));var d=s[5];d&&(a=d)}else r=n;if(!e){var p=!1,c=t.length;r<0&&(t.push("Duration values below 0 are not allowed for this animation step."),p=!0),i<0&&(t.push("Delay values below 0 are not allowed for this animation step."),p=!0),p&&t.splice(c,0,'The provided timing value "'+n+'" is invalid.')}return{duration:r,delay:i,easing:a}}function copyObj(n,t){return void 0===t&&(t={}),Object.keys(n).forEach(function(e){t[e]=n[e]}),t}function normalizeStyles(n){var t={};return Array.isArray(n)?n.forEach(function(n){return copyStyles(n,!1,t)}):copyStyles(n,!1,t),t}function copyStyles(n,t,e){if(void 0===e&&(e={}),t)for(var r in n)e[r]=n[r];else copyObj(n,e);return e}function setStyles(n,t){n.style&&Object.keys(t).forEach(function(e){var r=dashCaseToCamelCase(e);n.style[r]=t[e]})}function eraseStyles(n,t){n.style&&Object.keys(t).forEach(function(t){var e=dashCaseToCamelCase(t);n.style[e]=""})}function normalizeAnimationEntry(n){return Array.isArray(n)?1==n.length?n[0]:e.i(o.a)(n):n}function validateStyleParams(n,t,e){var r=t.params||{},o=extractStyleParams(n);o.length&&o.forEach(function(n){r.hasOwnProperty(n)||e.push("Unable to resolve the local animation param "+n+" in the given list of values")})}function extractStyleParams(n){var t=[];if("string"==typeof n){for(var e=n.toString(),r=void 0;r=x.exec(e);)t.push(r[1]);x.lastIndex=0}return t}function interpolateParams(n,t,e){var r=n.toString(),o=r.replace(x,function(n,r){var o=t[r];return t.hasOwnProperty(r)||(e.push("Please provide a value for the animation param "+r),o=""),o.toString()});return o==r?n:o}function iteratorToArray(n){for(var t=[],e=n.next();!e.done;)t.push(e.value),e=n.next();return t}function dashCaseToCamelCase(n){return n.replace(w,function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n[1].toUpperCase()})}function allowPreviousPlayerStylesMerge(n,t){return 0===n||0===t}function visitAnimationNode(n,t,e){switch(t.type){case 7:return n.visitTrigger(t,e);case 0:return n.visitState(t,e);case 1:return n.visitTransition(t,e);case 2:return n.visitSequence(t,e);case 3:return n.visitGroup(t,e);case 4:return n.visitAnimate(t,e);case 5:return n.visitKeyframes(t,e);case 6:return n.visitStyle(t,e);case 8:return n.visitReference(t,e);case 9:return n.visitAnimateChild(t,e);case 10:return n.visitAnimateRef(t,e);case 11:return n.visitQuery(t,e);case 12:return n.visitStagger(t,e);default:throw new Error("Unable to resolve animation metadata node #"+t.type)}}function parseTransitionExpr(n,t){var e=[];return"string"==typeof n?n.split(/\s*,\s*/).forEach(function(n){return parseInnerTransitionStr(n,e,t)}):e.push(n),e}function parseInnerTransitionStr(n,t,e){":"==n[0]&&(n=parseAnimationAlias(n,e));var r=n.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==r||r.length<4)return e.push('The provided transition expression "'+n+'" is not supported'),t;var o=r[1],i=r[2],a=r[3];t.push(makeLambdaFromStates(o,a));var s=o==M&&a==M;"<"!=i[0]||s||t.push(makeLambdaFromStates(a,o))}function parseAnimationAlias(n,t){switch(n){case":enter":return"void => *";case":leave":return"* => void";default:return t.push('The transition alias value "'+n+'" is not supported'),"* => *"}}function makeLambdaFromStates(n,t){return function(e,r){var o=n==M||n==e,i=t==M||t==r;return o||"boolean"!=typeof e||(o=e?"true"===n:"false"===n),i||"boolean"!=typeof r||(i=r?"true"===t:"false"===t),o&&i}}function buildAnimationAst(n,t){return(new V).build(n,t)}function normalizeSelector(n){var t=!!n.split(/\s*,\s*/).find(function(n){return n==F});return t&&(n=n.replace(z,"")),n=n.replace(U,h).replace(W,b).replace(/@\*/g,y).replace(/@\w+/g,function(n){return y+"-"+n.substr(1)}).replace(/:animating/g,v),[n,t]}function normalizeParams(n){return n?copyObj(n):null}function consumeOffset(n){if("string"==typeof n)return null;var t=null;if(Array.isArray(n))n.forEach(function(n){if(isObject(n)&&n.hasOwnProperty("offset")){var e=n;t=parseFloat(e.offset),delete e.offset}});else if(isObject(n)&&n.hasOwnProperty("offset")){var e=n;t=parseFloat(e.offset),delete e.offset}return t}function isObject(n){return!Array.isArray(n)&&"object"==typeof n}function constructTimingAst(n,t){var e=null;if(n.hasOwnProperty("duration"))e=n;else if("number"==typeof n){resolveTiming(n,t).duration;return new B(n,0,"")}var r=n;return r.split(/\s+/).some(function(n){return"{"==n.charAt(0)&&"{"==n.charAt(1)})?new j(r):(e=e||resolveTiming(r,t),new B(e.duration,e.delay,e.easing))}function normalizeAnimationOptions(n){return n?(n=copyObj(n),n.params&&(n.params=normalizeParams(n.params))):n={},n}function createTimelineInstruction(n,t,e,r,o,i,a,s){return void 0===a&&(a=null),void 0===s&&(s=!1),{type:1,element:n,keyframes:t,preStyleProps:e,postStyleProps:r,duration:o,delay:i,totalTime:o+i,easing:a,subTimeline:s}}function buildAnimationTimelines(n,t,e,r,o,i,a,s){return void 0===r&&(r={}),void 0===o&&(o={}),void 0===s&&(s=[]),(new G).buildKeyframes(n,t,e,r,o,i,a,s)}function roundOffset(n,t){void 0===t&&(t=3);var e=Math.pow(10,t-1);return Math.round(n*e)/e}function flattenStyles(n,t){var e,r={};return n.forEach(function(n){"*"===n?(e=e||Object.keys(t),e.forEach(function(n){r[n]=o.g})):copyStyles(n,!1,r)}),r}function createTransitionInstruction(n,t,e,r,o,i,a,s,l,d,p,c){return{type:0,element:n,triggerName:t,isRemovalTransition:o,fromState:e,fromStyles:i,toState:r,toStyles:a,timelines:s,queriedElements:l,preStyleProps:d,postStyleProps:p,errors:c}}function oneOrMoreTransitionsMatch(n,t,e){return n.some(function(n){return n(t,e)})}function buildTrigger(n,t){return new on(n,t)}function createFallbackTransition(n,t){var e=[function(n,t){return!0}],r=new S([]),o=new k(e,r);return new en(n,o,t)}function balanceProperties(n,t,e){n.hasOwnProperty(t)?n.hasOwnProperty(e)||(n[e]=n[t]):n.hasOwnProperty(e)&&(n[t]=n[e])}function deleteOrUnsetInMap(n,t,e){var r;if(n instanceof Map){if(r=n.get(t)){if(r.length){var o=r.indexOf(e);r.splice(o,1)}0==r.length&&n.delete(t)}}else if(r=n[t]){if(r.length){var o=r.indexOf(e);r.splice(o,1)}0==r.length&&delete n[t]}return r}function normalizeTriggerValue(n){switch(typeof n){case"boolean":return n?"1":"0";default:return null!=n?n.toString():null}}function isElementNode(n){return n&&1===n.nodeType}function isTriggerEventValid(n){return"start"==n||"done"==n}function cloakElement(n,t){var e=n.style.display;return n.style.display=null!=t?t:"none",e}function cloakAndComputeStyles(n,t,e,r){var o=t.map(function(n){return cloakElement(n)}),i=new Map,a=[];return e.forEach(function(t,e){var o={};t.forEach(function(t){var i=o[t]=n.computeStyle(e,t,r);i&&0!=i.length||(e[cn]=pn,a.push(e))}),i.set(e,o)}),t.forEach(function(n,t){return cloakElement(n,o[t])}),[i,a]}function createIsRootFilterFn(n){var t,e=new Set(n),r=new Set;return t=function(n){return!n||!e.has(n.parentNode)&&(!!r.has(n.parentNode)||!!t(n.parentNode)&&(r.add(n),!0))}}function containsClass(n,t){if(n.classList)return n.classList.contains(t);var e=n[yn];return e&&e[t]}function addClass(n,t){if(n.classList)n.classList.add(t);else{var e=n[yn];e||(e=n[yn]={}),e[t]=!0}}function removeClass(n,t){if(n.classList)n.classList.remove(t);else{var e=n[yn];e&&delete e[t]}}function getBodyNode(){return"undefined"!=typeof document?document.body:null}function removeNodesAfterAnimationDone(n,t,e){optimizeGroupPlayer(e).onDone(function(){return n.processLeaveNode(t)})}function flattenGroupPlayers(n){var t=[];return _flattenGroupPlayersRecur(n,t),t}function _flattenGroupPlayersRecur(n,t){for(var e=0;e<n.length;e++){var r=n[e];r instanceof o.e?_flattenGroupPlayersRecur(r.players,t):t.push(r)}}function objEquals(n,t){var e=Object.keys(n),r=Object.keys(t);if(e.length!=r.length)return!1;for(var o=0;o<e.length;o++){var i=e[o];if(!t.hasOwnProperty(i)||n[i]!==t[i])return!1}return!0}function replacePostStylesAsPre(n,t,e){var r=e.get(n);if(!r)return!1;var o=t.get(n);return o?r.forEach(function(n){return o.add(n)}):t.set(n,r),e.delete(n),!0}function _computeStyle(n,t){return window.getComputedStyle(n)[t]}function supportsWebAnimations(){return"undefined"!=typeof Element&&"function"==typeof Element.prototype.animate}e.d(t,"b",function(){return f}),e.d(t,"c",function(){return $}),e.d(t,"g",function(){return Z}),e.d(t,"f",function(){return u}),e.d(t,"a",function(){return vn}),e.d(t,"e",function(){return wn}),e.d(t,"d",function(){return supportsWebAnimations});var r=e(27),o=e(150),i=function(n,t){return!1},a=function(n,t){return!1},s=function(n,t,e){return[]};if("undefined"!=typeof Element){if(i=function(n,t){return n.contains(t)},Element.prototype.matches)a=function(n,t){return n.matches(t)};else{var l=Element.prototype,d=l.matchesSelector||l.mozMatchesSelector||l.msMatchesSelector||l.oMatchesSelector||l.webkitMatchesSelector;d&&(a=function(n,t){return d.apply(n,[t])})}s=function(n,t,e){var r=[];if(e)r.push.apply(r,n.querySelectorAll(t));else{var o=n.querySelector(t);o&&r.push(o)}return r}}var p=a,c=i,m=s,u=function(){function NoopAnimationDriver(){}return NoopAnimationDriver.prototype.matchesElement=function(n,t){return p(n,t)},NoopAnimationDriver.prototype.containsElement=function(n,t){return c(n,t)},NoopAnimationDriver.prototype.query=function(n,t,e){return m(n,t,e)},NoopAnimationDriver.prototype.computeStyle=function(n,t,e){return e||""},NoopAnimationDriver.prototype.animate=function(n,t,e,r,i,a){return void 0===a&&(a=[]),new o.d},NoopAnimationDriver}(),f=function(){function AnimationDriver(){}return AnimationDriver}();f.NOOP=new u;var g=1e3,h=".ng-enter",b=".ng-leave",y=".ng-trigger",v=".ng-animating",x=new RegExp("{{\\s*(.+?)\\s*}}","g"),w=/-+([a-z0-9])/g,_={},E=function(){function Ast(){this.options=_}return Ast.prototype.visit=function(n,t){},Object.defineProperty(Ast.prototype,"params",{get:function(){return this.options.params||null},enumerable:!0,configurable:!0}),Ast}(),T=function(n){function TriggerAst(t,e,r){var o=n.call(this)||this;return o.name=t,o.states=e,o.transitions=r,o.queryCount=0,o.depCount=0,o}return r.a(TriggerAst,n),TriggerAst.prototype.visit=function(n,t){return n.visitTrigger(this,t)},TriggerAst}(E),A=function(n){function StateAst(t,e){var r=n.call(this)||this;return r.name=t,r.style=e,r}return r.a(StateAst,n),StateAst.prototype.visit=function(n,t){return n.visitState(this,t)},StateAst}(E),k=function(n){function TransitionAst(t,e){var r=n.call(this)||this;return r.matchers=t,r.animation=e,r.queryCount=0,r.depCount=0,r}return r.a(TransitionAst,n),TransitionAst.prototype.visit=function(n,t){return n.visitTransition(this,t)},TransitionAst}(E),S=function(n){function SequenceAst(t){var e=n.call(this)||this;return e.steps=t,e}return r.a(SequenceAst,n),SequenceAst.prototype.visit=function(n,t){return n.visitSequence(this,t)},SequenceAst}(E),C=function(n){function GroupAst(t){var e=n.call(this)||this;return e.steps=t,e}return r.a(GroupAst,n),GroupAst.prototype.visit=function(n,t){return n.visitGroup(this,t)},GroupAst}(E),O=function(n){function AnimateAst(t,e){var r=n.call(this)||this;return r.timings=t,r.style=e,r}return r.a(AnimateAst,n),AnimateAst.prototype.visit=function(n,t){return n.visitAnimate(this,t)},AnimateAst}(E),P=function(n){function StyleAst(t,e,r){var o=n.call(this)||this;return o.styles=t,o.easing=e,o.offset=r,o.isEmptyStep=!1,o.containsDynamicStyles=!1,o}return r.a(StyleAst,n),StyleAst.prototype.visit=function(n,t){return n.visitStyle(this,t)},StyleAst}(E),N=function(n){function KeyframesAst(t){var e=n.call(this)||this;return e.styles=t,e}return r.a(KeyframesAst,n),KeyframesAst.prototype.visit=function(n,t){return n.visitKeyframes(this,t)},KeyframesAst}(E),I=function(n){function ReferenceAst(t){var e=n.call(this)||this;return e.animation=t,e}return r.a(ReferenceAst,n),ReferenceAst.prototype.visit=function(n,t){return n.visitReference(this,t)},ReferenceAst}(E),D=function(n){function AnimateChildAst(){return n.call(this)||this}return r.a(AnimateChildAst,n),AnimateChildAst.prototype.visit=function(n,t){return n.visitAnimateChild(this,t)},AnimateChildAst}(E),R=function(n){function AnimateRefAst(t){var e=n.call(this)||this;return e.animation=t,e}return r.a(AnimateRefAst,n),AnimateRefAst.prototype.visit=function(n,t){return n.visitAnimateRef(this,t)},AnimateRefAst}(E),H=function(n){function QueryAst(t,e,r,o,i){var a=n.call(this)||this;return a.selector=t,a.limit=e,a.optional=r,a.includeSelf=o,a.animation=i,a}return r.a(QueryAst,n),QueryAst.prototype.visit=function(n,t){return n.visitQuery(this,t)},QueryAst}(E),L=function(n){function StaggerAst(t,e){var r=n.call(this)||this;return r.timings=t,r.animation=e,r}return r.a(StaggerAst,n),StaggerAst.prototype.visit=function(n,t){return n.visitStagger(this,t)},StaggerAst}(E),B=function(n){function TimingAst(t,e,r){void 0===e&&(e=0),void 0===r&&(r=null);var o=n.call(this)||this;return o.duration=t,o.delay=e,o.easing=r,o}return r.a(TimingAst,n),TimingAst.prototype.visit=function(n,t){return n.visitTiming(this,t)},TimingAst}(E),j=function(n){function DynamicTimingAst(t){var e=n.call(this,0,0,"")||this;return e.value=t,e}return r.a(DynamicTimingAst,n),DynamicTimingAst.prototype.visit=function(n,t){return n.visitTiming(this,t)},DynamicTimingAst}(B),M="*",F=":self",z=new RegExp("s*"+F+"s*,?","g"),W=new RegExp(":leave","g"),U=new RegExp(":enter","g"),V=function(){function AnimationAstBuilderVisitor(){}return AnimationAstBuilderVisitor.prototype.build=function(n,t){var e=new K(t);return this._resetContextStyleTimingState(e),visitAnimationNode(this,normalizeAnimationEntry(n),e)},AnimationAstBuilderVisitor.prototype._resetContextStyleTimingState=function(n){n.currentQuerySelector="",n.collectedStyles={},n.collectedStyles[""]={},n.currentTime=0},AnimationAstBuilderVisitor.prototype.visitTrigger=function(n,t){var e=this,r=t.queryCount=0,o=t.depCount=0,i=[],a=[];n.definitions.forEach(function(n){if(e._resetContextStyleTimingState(t),0==n.type){var s=n,l=s.name;l.split(/\s*,\s*/).forEach(function(n){s.name=n,i.push(e.visitState(s,t))}),s.name=l}else if(1==n.type){var d=e.visitTransition(n,t);r+=d.queryCount,o+=d.depCount,a.push(d)}else t.errors.push("only state() and transition() definitions can sit inside of a trigger()")});var s=new T(n.name,i,a);return s.options=normalizeAnimationOptions(n.options),s.queryCount=r,s.depCount=o,s},AnimationAstBuilderVisitor.prototype.visitState=function(n,t){var e=this.visitStyle(n.styles,t),r=n.options&&n.options.params||null;if(e.containsDynamicStyles){var o=new Set,i=r||{};if(e.styles.forEach(function(n){if(isObject(n)){var t=n;Object.keys(t).forEach(function(n){extractStyleParams(t[n]).forEach(function(n){i.hasOwnProperty(n)||o.add(n)})})}}),o.size){var a=iteratorToArray(o.values());t.errors.push('state("'+n.name+'", ...) must define default values for all the following style substitutions: '+a.join(", "))}}var s=new A(n.name,e);return r&&(s.options={params:r}),s},AnimationAstBuilderVisitor.prototype.visitTransition=function(n,t){t.queryCount=0,t.depCount=0;var e=visitAnimationNode(this,normalizeAnimationEntry(n.animation),t),r=parseTransitionExpr(n.expr,t.errors),o=new k(r,e);return o.options=normalizeAnimationOptions(n.options),o.queryCount=t.queryCount,o.depCount=t.depCount,o},AnimationAstBuilderVisitor.prototype.visitSequence=function(n,t){var e=this,r=new S(n.steps.map(function(n){return visitAnimationNode(e,n,t)}));return r.options=normalizeAnimationOptions(n.options),r},AnimationAstBuilderVisitor.prototype.visitGroup=function(n,t){var e=this,r=t.currentTime,o=0,i=n.steps.map(function(n){t.currentTime=r;var i=visitAnimationNode(e,n,t);return o=Math.max(o,t.currentTime),i});t.currentTime=o;var a=new C(i);return a.options=normalizeAnimationOptions(n.options),a},AnimationAstBuilderVisitor.prototype.visitAnimate=function(n,t){var r=constructTimingAst(n.timings,t.errors);t.currentAnimateTimings=r;var i,a=n.styles?n.styles:e.i(o.h)({});if(5==a.type)i=this.visitKeyframes(a,t);else{var s=n.styles,l=!1;if(!s){l=!0;var d={};r.easing&&(d.easing=r.easing),s=e.i(o.h)(d)}t.currentTime+=r.duration+r.delay;var p=this.visitStyle(s,t);p.isEmptyStep=l,i=p}return t.currentAnimateTimings=null,new O(r,i)},AnimationAstBuilderVisitor.prototype.visitStyle=function(n,t){var e=this._makeStyleAst(n,t);return this._validateStyleAst(e,t),e},AnimationAstBuilderVisitor.prototype._makeStyleAst=function(n,t){var e=[];Array.isArray(n.styles)?n.styles.forEach(function(n){"string"==typeof n?n==o.g?e.push(n):t.errors.push("The provided style string value "+n+" is not allowed."):e.push(n)}):e.push(n.styles);var r=!1,i=null;e.forEach(function(n){if(isObject(n)){var t=n,e=t.easing;if(e&&(i=e,delete t.easing),!r)for(var o in t){var a=t[o];if(a.toString().indexOf("{{")>=0){r=!0;break}}}});var a=new P(e,i,n.offset);return a.containsDynamicStyles=r,a},AnimationAstBuilderVisitor.prototype._validateStyleAst=function(n,t){var e=t.currentAnimateTimings,r=t.currentTime,o=t.currentTime;e&&o>0&&(o-=e.duration+e.delay),n.styles.forEach(function(n){"string"!=typeof n&&Object.keys(n).forEach(function(e){var i=t.collectedStyles[t.currentQuerySelector],a=i[e],s=!0;a&&(o!=r&&o>=a.startTime&&r<=a.endTime&&(t.errors.push('The CSS property "'+e+'" that exists between the times of "'+a.startTime+'ms" and "'+a.endTime+'ms" is also being animated in a parallel animation between the times of "'+o+'ms" and "'+r+'ms"'),s=!1),o=a.startTime),s&&(i[e]={startTime:o,endTime:r}),t.options&&validateStyleParams(n[e],t.options,t.errors)})})},AnimationAstBuilderVisitor.prototype.visitKeyframes=function(n,t){var e=this;if(!t.currentAnimateTimings)return t.errors.push("keyframes() must be placed inside of a call to animate()"),new N([]);var r=0,o=[],i=!1,a=!1,s=0,l=n.steps.map(function(n){var l=e._makeStyleAst(n,t),d=null!=l.offset?l.offset:consumeOffset(l.styles),p=0;return null!=d&&(r++,p=l.offset=d),a=a||p<0||p>1,i=i||p<s,s=p,o.push(p),l});a&&t.errors.push("Please ensure that all keyframe offsets are between 0 and 1"),i&&t.errors.push("Please ensure that all keyframe offsets are in order");var d=n.steps.length,p=0;r>0&&r<d?t.errors.push("Not all style() steps within the declared keyframes() contain offsets"):0==r&&(p=1/(d-1));var c=d-1,m=t.currentTime,u=t.currentAnimateTimings,f=u.duration;return l.forEach(function(n,r){var i=p>0?r==c?1:p*r:o[r],a=i*f;t.currentTime=m+u.delay+a,u.duration=a,e._validateStyleAst(n,t),n.offset=i}),new N(l)},AnimationAstBuilderVisitor.prototype.visitReference=function(n,t){var e=visitAnimationNode(this,normalizeAnimationEntry(n.animation),t),r=new I(e);return r.options=normalizeAnimationOptions(n.options),r},AnimationAstBuilderVisitor.prototype.visitAnimateChild=function(n,t){t.depCount++;var e=new D;return e.options=normalizeAnimationOptions(n.options),e},AnimationAstBuilderVisitor.prototype.visitAnimateRef=function(n,t){var e=this.visitReference(n.animation,t),r=new R(e);return r.options=normalizeAnimationOptions(n.options),r},AnimationAstBuilderVisitor.prototype.visitQuery=function(n,t){var e=t.currentQuerySelector,r=n.options||{};t.queryCount++,t.currentQuery=n;var o=normalizeSelector(n.selector),i=o[0],a=o[1];t.currentQuerySelector=e.length?e+" "+i:i,getOrSetAsInMap(t.collectedStyles,t.currentQuerySelector,{});var s=visitAnimationNode(this,normalizeAnimationEntry(n.animation),t);t.currentQuery=null,t.currentQuerySelector=e;var l=new H(i,r.limit||0,!!r.optional,a,s);return l.originalSelector=n.selector,l.options=normalizeAnimationOptions(n.options),l},AnimationAstBuilderVisitor.prototype.visitStagger=function(n,t){t.currentQuery||t.errors.push("stagger() can only be used inside of query()");var e="full"===n.timings?{duration:0,delay:0,easing:"full"}:resolveTiming(n.timings,t.errors,!0),r=visitAnimationNode(this,normalizeAnimationEntry(n.animation),t);return new L(e,r)},AnimationAstBuilderVisitor}(),K=function(){function AnimationAstBuilderContext(n){this.errors=n,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null}return AnimationAstBuilderContext}(),q=function(){function ElementInstructionMap(){this._map=new Map}return ElementInstructionMap.prototype.consume=function(n){var t=this._map.get(n);return t?this._map.delete(n):t=[],t},ElementInstructionMap.prototype.append=function(n,t){var e=this._map.get(n);e||this._map.set(n,e=[]),e.push.apply(e,t)},ElementInstructionMap.prototype.has=function(n){return this._map.has(n)},ElementInstructionMap.prototype.clear=function(){this._map.clear()},ElementInstructionMap}(),G=function(){function AnimationTimelineBuilderVisitor(){}return AnimationTimelineBuilderVisitor.prototype.buildKeyframes=function(n,t,e,r,o,i,a,s){void 0===s&&(s=[]),a=a||new q;var l=new X(n,t,a,s,[]);l.options=i,l.currentTimeline.setStyles([r],null,l.errors,i),e.visit(this,l);var d=l.timelines.filter(function(n){return n.containsAnimation()});if(d.length&&Object.keys(o).length){var p=d[d.length-1];p.allowOnlyTimelineStyles()||p.setStyles([o],null,l.errors,i)}return d.length?d.map(function(n){return n.buildKeyframes()}):[createTimelineInstruction(t,[],[],[],0,0,"",!1)]},AnimationTimelineBuilderVisitor.prototype.visitTrigger=function(n,t){},AnimationTimelineBuilderVisitor.prototype.visitState=function(n,t){},AnimationTimelineBuilderVisitor.prototype.visitTransition=function(n,t){},AnimationTimelineBuilderVisitor.prototype.visitAnimateChild=function(n,t){var e=t.subInstructions.consume(t.element);if(e){var r=t.createSubContext(n.options),o=t.currentTimeline.currentTime,i=this._visitSubInstructions(e,r,r.options);o!=i&&t.transformIntoNewTimeline(i)}t.previousNode=n},AnimationTimelineBuilderVisitor.prototype.visitAnimateRef=function(n,t){var e=t.createSubContext(n.options);e.transformIntoNewTimeline(),this.visitReference(n.animation,e),t.transformIntoNewTimeline(e.currentTimeline.currentTime),t.previousNode=n},AnimationTimelineBuilderVisitor.prototype._visitSubInstructions=function(n,t,e){var r=t.currentTimeline.currentTime,o=r,i=null!=e.duration?resolveTimingValue(e.duration):null,a=null!=e.delay?resolveTimingValue(e.delay):null;return 0!==i&&n.forEach(function(n){var e=t.appendInstructionToTimeline(n,i,a);o=Math.max(o,e.duration+e.delay)}),o},AnimationTimelineBuilderVisitor.prototype.visitReference=function(n,t){t.updateOptions(n.options,!0),n.animation.visit(this,t),t.previousNode=n},AnimationTimelineBuilderVisitor.prototype.visitSequence=function(n,t){var e=this,r=t.subContextCount,o=t,i=n.options;if(i&&(i.params||i.delay)&&(o=t.createSubContext(i),o.transformIntoNewTimeline(),null!=i.delay)){o.previousNode instanceof P&&(o.currentTimeline.snapshotCurrentStyles(),o.previousNode=Q);var a=resolveTimingValue(i.delay);o.delayNextStep(a)}n.steps.length&&(n.steps.forEach(function(n){return n.visit(e,o)}),o.currentTimeline.applyStylesToKeyframe(),o.subContextCount>r&&o.transformIntoNewTimeline()),t.previousNode=n},AnimationTimelineBuilderVisitor.prototype.visitGroup=function(n,t){var e=this,r=[],o=t.currentTimeline.currentTime,i=n.options&&n.options.delay?resolveTimingValue(n.options.delay):0;n.steps.forEach(function(a){var s=t.createSubContext(n.options);i&&s.delayNextStep(i),a.visit(e,s),o=Math.max(o,s.currentTimeline.currentTime),r.push(s.currentTimeline)}),r.forEach(function(n){return t.currentTimeline.mergeTimelineCollectedStyles(n)}),t.transformIntoNewTimeline(o),t.previousNode=n},AnimationTimelineBuilderVisitor.prototype.visitTiming=function(n,t){if(n instanceof j){return resolveTiming(t.params?interpolateParams(n.value,t.params,t.errors):n.value.toString(),t.errors)}return{duration:n.duration,delay:n.delay,easing:n.easing}},AnimationTimelineBuilderVisitor.prototype.visitAnimate=function(n,t){var e=t.currentAnimateTimings=this.visitTiming(n.timings,t),r=t.currentTimeline;e.delay&&(t.incrementTime(e.delay),r.snapshotCurrentStyles());var o=n.style;o instanceof N?this.visitKeyframes(o,t):(t.incrementTime(e.duration),this.visitStyle(o,t),r.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=n},AnimationTimelineBuilderVisitor.prototype.visitStyle=function(n,t){var e=t.currentTimeline,r=t.currentAnimateTimings;!r&&e.getCurrentStyleProperties().length&&e.forwardFrame();var o=r&&r.easing||n.easing;n.isEmptyStep?e.applyEmptyStep(o):e.setStyles(n.styles,o,t.errors,t.options),t.previousNode=n},AnimationTimelineBuilderVisitor.prototype.visitKeyframes=function(n,t){var e=t.currentAnimateTimings,r=t.currentTimeline.duration,o=e.duration,i=t.createSubContext(),a=i.currentTimeline;a.easing=e.easing,n.styles.forEach(function(n){var e=n.offset||0;a.forwardTime(e*o),a.setStyles(n.styles,n.easing,t.errors,t.options),a.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(a),t.transformIntoNewTimeline(r+o),t.previousNode=n},AnimationTimelineBuilderVisitor.prototype.visitQuery=function(n,t){var e=this,r=t.currentTimeline.currentTime,o=n.options||{},i=o.delay?resolveTimingValue(o.delay):0;i&&(t.previousNode instanceof P||0==r&&t.currentTimeline.getCurrentStyleProperties().length)&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=Q);var a=r,s=t.invokeQuery(n.selector,n.originalSelector,n.limit,n.includeSelf,!!o.optional,t.errors);t.currentQueryTotal=s.length;var l=null;s.forEach(function(r,o){t.currentQueryIndex=o;var s=t.createSubContext(n.options,r);i&&s.delayNextStep(i),r===t.element&&(l=s.currentTimeline),n.animation.visit(e,s),s.currentTimeline.applyStylesToKeyframe();var d=s.currentTimeline.currentTime;a=Math.max(a,d)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(a),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=n},AnimationTimelineBuilderVisitor.prototype.visitStagger=function(n,t){var e=t.parentContext,r=t.currentTimeline,o=n.timings,i=Math.abs(o.duration),a=i*(t.currentQueryTotal-1),s=i*t.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":s=a-s;break;case"full":s=e.currentStaggerTime}var l=t.currentTimeline;s&&l.delayNextStep(s);var d=l.currentTime;n.animation.visit(this,t),t.previousNode=n,e.currentStaggerTime=r.currentTime-d+(r.startTime-e.currentTimeline.startTime)},AnimationTimelineBuilderVisitor}(),Q={},X=function(){function AnimationTimelineContext(n,t,e,r,o,i){this._driver=n,this.element=t,this.subInstructions=e,this.errors=r,this.timelines=o,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Q,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=i||new J(t,0),o.push(this.currentTimeline)}return Object.defineProperty(AnimationTimelineContext.prototype,"params",{get:function(){return this.options.params},enumerable:!0,configurable:!0}),AnimationTimelineContext.prototype.updateOptions=function(n,t){var e=this;if(n){var r=n,o=this.options;null!=r.duration&&(o.duration=resolveTimingValue(r.duration)),null!=r.delay&&(o.delay=resolveTimingValue(r.delay));var i=r.params;if(i){var a=o.params;a||(a=this.options.params={}),Object.keys(i).forEach(function(n){t&&a.hasOwnProperty(n)||(a[n]=interpolateParams(i[n],a,e.errors))})}}},AnimationTimelineContext.prototype._copyOptions=function(){var n={};if(this.options){var t=this.options.params;if(t){var e=n.params={};Object.keys(this.options.params).forEach(function(n){e[n]=t[n]})}}return n},AnimationTimelineContext.prototype.createSubContext=function(n,t,e){void 0===n&&(n=null);var r=t||this.element,o=new AnimationTimelineContext(this._driver,r,this.subInstructions,this.errors,this.timelines,this.currentTimeline.fork(r,e||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(n),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o},AnimationTimelineContext.prototype.transformIntoNewTimeline=function(n){return this.previousNode=Q,this.currentTimeline=this.currentTimeline.fork(this.element,n),this.timelines.push(this.currentTimeline),this.currentTimeline},AnimationTimelineContext.prototype.appendInstructionToTimeline=function(n,t,e){var r={duration:null!=t?t:n.duration,delay:this.currentTimeline.currentTime+(null!=e?e:0)+n.delay,easing:""},o=new Y(n.element,n.keyframes,n.preStyleProps,n.postStyleProps,r,n.stretchStartingKeyframe);return this.timelines.push(o),r},AnimationTimelineContext.prototype.incrementTime=function(n){this.currentTimeline.forwardTime(this.currentTimeline.duration+n)},AnimationTimelineContext.prototype.delayNextStep=function(n){n>0&&this.currentTimeline.delayNextStep(n)},AnimationTimelineContext.prototype.invokeQuery=function(n,t,e,r,o,i){var a=[];if(r&&a.push(this.element),n.length>0){var s=1!=e;a.push.apply(a,this._driver.query(this.element,n,s))}return o||0!=a.length||i.push('`query("'+t+'")` returned zero elements. (Use `query("'+t+'", { optional: true })` if you wish to allow this.)'),a},AnimationTimelineContext}(),J=function(){function TimelineBuilder(n,t,e){this.element=n,this.startTime=t,this._elementTimelineStylesLookup=e,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(n),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(n,this._localTimelineStyles)),this._loadKeyframe()}return TimelineBuilder.prototype.containsAnimation=function(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}},TimelineBuilder.prototype.getCurrentStyleProperties=function(){return Object.keys(this._currentKeyframe)},Object.defineProperty(TimelineBuilder.prototype,"currentTime",{get:function(){return this.startTime+this.duration},enumerable:!0,configurable:!0}),TimelineBuilder.prototype.delayNextStep=function(n){var t=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||t?(this.forwardTime(this.currentTime+n),t&&this.snapshotCurrentStyles()):this.startTime+=n},TimelineBuilder.prototype.fork=function(n,t){return this.applyStylesToKeyframe(),new TimelineBuilder(n,t||this.currentTime,this._elementTimelineStylesLookup)},TimelineBuilder.prototype._loadKeyframe=function(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))},TimelineBuilder.prototype.forwardFrame=function(){this.duration+=1,this._loadKeyframe()},TimelineBuilder.prototype.forwardTime=function(n){this.applyStylesToKeyframe(),this.duration=n,this._loadKeyframe()},TimelineBuilder.prototype._updateStyle=function(n,t){this._localTimelineStyles[n]=t,this._globalTimelineStyles[n]=t,this._styleSummary[n]={time:this.currentTime,value:t}},TimelineBuilder.prototype.allowOnlyTimelineStyles=function(){return this._currentEmptyStepKeyframe!==this._currentKeyframe},TimelineBuilder.prototype.applyEmptyStep=function(n){var t=this;n&&(this._previousKeyframe.easing=n),Object.keys(this._globalTimelineStyles).forEach(function(n){t._backFill[n]=t._globalTimelineStyles[n]||o.g,t._currentKeyframe[n]=o.g}),this._currentEmptyStepKeyframe=this._currentKeyframe},TimelineBuilder.prototype.setStyles=function(n,t,e,r){var i=this;t&&(this._previousKeyframe.easing=t);var a=r&&r.params||{},s=flattenStyles(n,this._globalTimelineStyles);Object.keys(s).forEach(function(n){var t=interpolateParams(s[n],a,e);i._pendingStyles[n]=t,i._localTimelineStyles.hasOwnProperty(n)||(i._backFill[n]=i._globalTimelineStyles.hasOwnProperty(n)?i._globalTimelineStyles[n]:o.g),i._updateStyle(n,t)})},TimelineBuilder.prototype.applyStylesToKeyframe=function(){var n=this,t=this._pendingStyles,e=Object.keys(t);0!=e.length&&(this._pendingStyles={},e.forEach(function(e){var r=t[e];n._currentKeyframe[e]=r}),Object.keys(this._localTimelineStyles).forEach(function(t){n._currentKeyframe.hasOwnProperty(t)||(n._currentKeyframe[t]=n._localTimelineStyles[t])}))},TimelineBuilder.prototype.snapshotCurrentStyles=function(){var n=this;Object.keys(this._localTimelineStyles).forEach(function(t){var e=n._localTimelineStyles[t];n._pendingStyles[t]=e,n._updateStyle(t,e)})},TimelineBuilder.prototype.getFinalKeyframe=function(){return this._keyframes.get(this.duration)},Object.defineProperty(TimelineBuilder.prototype,"properties",{get:function(){var n=[];for(var t in this._currentKeyframe)n.push(t);return n},enumerable:!0,configurable:!0}),TimelineBuilder.prototype.mergeTimelineCollectedStyles=function(n){var t=this;Object.keys(n._styleSummary).forEach(function(e){var r=t._styleSummary[e],o=n._styleSummary[e];(!r||o.time>r.time)&&t._updateStyle(e,o.value)})},TimelineBuilder.prototype.buildKeyframes=function(){var n=this;this.applyStylesToKeyframe();var t=new Set,e=new Set,r=1===this._keyframes.size&&0===this.duration,i=[];this._keyframes.forEach(function(a,s){var l=copyStyles(a,!0);Object.keys(l).forEach(function(n){var r=l[n];r==o.f?t.add(n):r==o.g&&e.add(n)}),r||(l.offset=s/n.duration),i.push(l)});var a=t.size?iteratorToArray(t.values()):[],s=e.size?iteratorToArray(e.values()):[];if(r){var l=i[0],d=copyObj(l);l.offset=0,d.offset=1,i=[l,d]}return createTimelineInstruction(this.element,i,a,s,this.duration,this.startTime,this.easing,!1)},TimelineBuilder}(),Y=function(n){function SubTimelineBuilder(t,e,r,o,i,a){void 0===a&&(a=!1);var s=n.call(this,t,i.delay)||this;return s.element=t,s.keyframes=e,s.preStyleProps=r,s.postStyleProps=o,s._stretchStartingKeyframe=a,s.timings={duration:i.duration,delay:i.delay,easing:i.easing},s}return r.a(SubTimelineBuilder,n),SubTimelineBuilder.prototype.containsAnimation=function(){return this.keyframes.length>1},SubTimelineBuilder.prototype.buildKeyframes=function(){var n=this.keyframes,t=this.timings,e=t.delay,r=t.duration,o=t.easing;if(this._stretchStartingKeyframe&&e){var i=[],a=r+e,s=e/a,l=copyStyles(n[0],!1);l.offset=0,i.push(l);var d=copyStyles(n[0],!1);d.offset=roundOffset(s),i.push(d);for(var p=n.length-1,c=1;c<=p;c++){var m=copyStyles(n[c],!1),u=m.offset,f=e+u*r;m.offset=roundOffset(f/a),i.push(m)}r=a,e=0,o="",n=i}return createTimelineInstruction(this.element,n,this.preStyleProps,this.postStyleProps,r,e,o,!0)},SubTimelineBuilder}(J),$=(function(){function Animation(n,t){this._driver=n;var e=[],r=buildAnimationAst(t,e);if(e.length){var o="animation validation failed:\n"+e.join("\n");throw new Error(o)}this._animationAst=r}Animation.prototype.buildTimelines=function(n,t,e,r,o){var i=Array.isArray(t)?normalizeStyles(t):t,a=Array.isArray(e)?normalizeStyles(e):e,s=[];o=o||new q;var l=buildAnimationTimelines(this._driver,n,this._animationAst,i,a,r,o,s);if(s.length){var d="animation building failed:\n"+s.join("\n");throw new Error(d)}return l}}(),function(){function AnimationStyleNormalizer(){}return AnimationStyleNormalizer}()),Z=(function(){function NoopAnimationStyleNormalizer(){}NoopAnimationStyleNormalizer.prototype.normalizePropertyName=function(n,t){return n},NoopAnimationStyleNormalizer.prototype.normalizeStyleValue=function(n,t,e,r){return e}}(),function(n){function WebAnimationsStyleNormalizer(){return null!==n&&n.apply(this,arguments)||this}return r.a(WebAnimationsStyleNormalizer,n),WebAnimationsStyleNormalizer.prototype.normalizePropertyName=function(n,t){return dashCaseToCamelCase(n)},WebAnimationsStyleNormalizer.prototype.normalizeStyleValue=function(n,t,e,r){var o="",i=e.toString().trim();if(nn[t]&&0!==e&&"0"!==e)if("number"==typeof e)o="px";else{var a=e.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push("Please provide a CSS unit value for "+n+":"+e)}return i+o},WebAnimationsStyleNormalizer}($)),nn=function(n){var t={};return n.forEach(function(n){return t[n]=!0}),t}("width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(",")),tn={},en=function(){function AnimationTransitionFactory(n,t,e){this._triggerName=n,this.ast=t,this._stateStyles=e}return AnimationTransitionFactory.prototype.match=function(n,t){return oneOrMoreTransitionsMatch(this.ast.matchers,n,t)},AnimationTransitionFactory.prototype.buildStyles=function(n,t,e){var r=this._stateStyles["*"],o=this._stateStyles[n],i=r?r.buildStyles(t,e):{};return o?o.buildStyles(t,e):i},AnimationTransitionFactory.prototype.build=function(n,t,e,r,o,i,a){var s=[],l=this.ast.options&&this.ast.options.params||tn,d=o&&o.params||tn,p=this.buildStyles(e,d,s),c=i&&i.params||tn,m=this.buildStyles(r,c,s),u=new Set,f=new Map,g=new Map,h="void"===r,b={params:Object.assign({},l,c)},y=buildAnimationTimelines(n,t,this.ast.animation,p,m,b,a,s);if(s.length)return createTransitionInstruction(t,this._triggerName,e,r,h,p,m,[],[],f,g,s);y.forEach(function(n){var e=n.element,r=getOrSetAsInMap(f,e,{});n.preStyleProps.forEach(function(n){return r[n]=!0});var o=getOrSetAsInMap(g,e,{});n.postStyleProps.forEach(function(n){return o[n]=!0}),e!==t&&u.add(e)});var v=iteratorToArray(u.values());return createTransitionInstruction(t,this._triggerName,e,r,h,p,m,y,v,f,g)},AnimationTransitionFactory}(),rn=function(){function AnimationStateStyles(n,t){this.styles=n,this.defaultParams=t}return AnimationStateStyles.prototype.buildStyles=function(n,t){var e={},r=copyObj(this.defaultParams);return Object.keys(n).forEach(function(t){var e=n[t];null!=e&&(r[t]=e)}),this.styles.styles.forEach(function(n){if("string"!=typeof n){var o=n;Object.keys(o).forEach(function(n){var i=o[n];i.length>1&&(i=interpolateParams(i,r,t)),e[n]=i})}}),e},AnimationStateStyles}(),on=function(){function AnimationTrigger(n,t){var e=this;this.name=n,this.ast=t,this.transitionFactories=[],this.states={},t.states.forEach(function(n){var t=n.options&&n.options.params||{};e.states[n.name]=new rn(n.style,t)}),balanceProperties(this.states,"true","1"),balanceProperties(this.states,"false","0"),t.transitions.forEach(function(t){e.transitionFactories.push(new en(n,t,e.states))}),this.fallbackTransition=createFallbackTransition(n,this.states)}return Object.defineProperty(AnimationTrigger.prototype,"containsQueries",{get:function(){return this.ast.queryCount>0},enumerable:!0,configurable:!0}),AnimationTrigger.prototype.matchTransition=function(n,t){return this.transitionFactories.find(function(e){return e.match(n,t)})||null},AnimationTrigger.prototype.matchStyles=function(n,t,e){return this.fallbackTransition.buildStyles(n,t,e)},AnimationTrigger}(),an=new q,sn=function(){function TimelineAnimationEngine(n,t){this._driver=n,this._normalizer=t,this._animations={},this._playersById={},this.players=[]}return TimelineAnimationEngine.prototype.register=function(n,t){var e=[],r=buildAnimationAst(t,e);if(e.length)throw new Error("Unable to build the animation due to the following errors: "+e.join("\n"));this._animations[n]=r},TimelineAnimationEngine.prototype._buildPlayer=function(n,t,e){var r=n.element,o=normalizeKeyframes(this._driver,this._normalizer,r,n.keyframes,t,e);return this._driver.animate(r,o,n.duration,n.delay,n.easing,[])},TimelineAnimationEngine.prototype.create=function(n,t,e){var r=this;void 0===e&&(e={});var i,a=[],s=this._animations[n],l=new Map;if(s?(i=buildAnimationTimelines(this._driver,t,s,{},{},e,an,a),i.forEach(function(n){var t=getOrSetAsInMap(l,n.element,{});n.postStyleProps.forEach(function(n){return t[n]=null})})):(a.push("The requested animation doesn't exist or has already been destroyed"),i=[]),a.length)throw new Error("Unable to create the animation due to the following errors: "+a.join("\n"));l.forEach(function(n,t){Object.keys(n).forEach(function(e){n[e]=r._driver.computeStyle(t,e,o.g)})});var d=i.map(function(n){var t=l.get(n.element);return r._buildPlayer(n,{},t)}),p=optimizeGroupPlayer(d);return this._playersById[n]=p,p.onDestroy(function(){return r.destroy(n)}),this.players.push(p),p},TimelineAnimationEngine.prototype.destroy=function(n){var t=this._getPlayer(n);t.destroy(),delete this._playersById[n];var e=this.players.indexOf(t);e>=0&&this.players.splice(e,1)},TimelineAnimationEngine.prototype._getPlayer=function(n){var t=this._playersById[n];if(!t)throw new Error("Unable to find the timeline player referenced by "+n);return t},TimelineAnimationEngine.prototype.listen=function(n,t,e,r){var o=makeAnimationEvent(t,"","","");return listenOnPlayer(this._getPlayer(n),e,o,r),function(){}},TimelineAnimationEngine.prototype.command=function(n,t,e,r){if("register"==e)return void this.register(n,r[0]);if("create"==e){var o=r[0]||{};return void this.create(n,t,o)}var i=this._getPlayer(n);switch(e){case"play":i.play();break;case"pause":i.pause();break;case"reset":i.reset();break;case"restart":i.restart();break;case"finish":i.finish();break;case"init":i.init();break;case"setPosition":i.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(n)}},TimelineAnimationEngine}(),ln=[],dn={namespaceId:"",setForRemoval:null,hasAnimation:!1,removedBeforeQueried:!1},pn={namespaceId:"",setForRemoval:null,hasAnimation:!1,removedBeforeQueried:!0},cn="__ng_removed",mn=function(){function StateValue(n){var t=n&&n.hasOwnProperty("value"),e=t?n.value:n;if(this.value=normalizeTriggerValue(e),t){var r=copyObj(n);delete r.value,this.options=r}else this.options={};this.options.params||(this.options.params={})}return Object.defineProperty(StateValue.prototype,"params",{get:function(){return this.options.params},enumerable:!0,configurable:!0}),StateValue.prototype.absorbOptions=function(n){var t=n.params;if(t){var e=this.options.params;Object.keys(t).forEach(function(n){null==e[n]&&(e[n]=t[n])})}},StateValue}(),un=new mn("void"),fn=new mn("DELETED"),gn=function(){function AnimationTransitionNamespace(n,t,e){this.id=n,this.hostElement=t,this._engine=e,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+n,addClass(t,this._hostClassName)}return AnimationTransitionNamespace.prototype.listen=function(n,t,e,r){var o=this;if(!this._triggers.hasOwnProperty(t))throw new Error('Unable to listen on the animation trigger event "'+e+'" because the animation trigger "'+t+"\" doesn't exist!");if(null==e||0==e.length)throw new Error('Unable to listen on the animation trigger "'+t+'" because the provided event is undefined!');if(!isTriggerEventValid(e))throw new Error('The provided animation trigger event "'+e+'" for the animation trigger "'+t+'" is not supported!');var i=getOrSetAsInMap(this._elementListeners,n,[]),a={name:t,phase:e,callback:r};i.push(a);var s=getOrSetAsInMap(this._engine.statesByElement,n,{});return s.hasOwnProperty(t)||(addClass(n,"ng-trigger"),addClass(n,"ng-trigger-"+t),s[t]=null),function(){o._engine.afterFlush(function(){var n=i.indexOf(a);n>=0&&i.splice(n,1),o._triggers[t]||delete s[t]})}},AnimationTransitionNamespace.prototype.register=function(n,t){return!this._triggers[n]&&(this._triggers[n]=t,!0)},AnimationTransitionNamespace.prototype._getTrigger=function(n){var t=this._triggers[n];if(!t)throw new Error('The provided animation trigger "'+n+'" has not been registered!');return t},AnimationTransitionNamespace.prototype.trigger=function(n,t,e,r){var o=this;void 0===r&&(r=!0);var i=this._getTrigger(t),a=new bn(this.id,t,n),s=this._engine.statesByElement.get(n);s||(addClass(n,"ng-trigger"),addClass(n,"ng-trigger-"+t),this._engine.statesByElement.set(n,s={}));var l=s[t],d=new mn(e);if(!(e&&e.hasOwnProperty("value"))&&l&&d.absorbOptions(l.options),s[t]=d,l){if(l===fn)return a}else l=un;if("void"===d.value||l.value!==d.value){var p=getOrSetAsInMap(this._engine.playersByElement,n,[]);p.forEach(function(n){n.namespaceId==o.id&&n.triggerName==t&&n.queued&&n.destroy()});var c=i.matchTransition(l.value,d.value),m=!1;if(!c){if(!r)return;c=i.fallbackTransition,m=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:t,transition:c,fromState:l,toState:d,player:a,isFallbackTransition:m}),m||(addClass(n,"ng-animate-queued"),a.onStart(function(){removeClass(n,"ng-animate-queued")})),a.onDone(function(){var t=o.players.indexOf(a);t>=0&&o.players.splice(t,1);var e=o._engine.playersByElement.get(n);if(e){var r=e.indexOf(a);r>=0&&e.splice(r,1)}}),this.players.push(a),p.push(a),a}if(!objEquals(l.params,d.params)){var u=[],f=i.matchStyles(l.value,l.params,u),g=i.matchStyles(d.value,d.params,u);u.length?this._engine.reportError(u):this._engine.afterFlush(function(){eraseStyles(n,f),setStyles(n,g)})}},AnimationTransitionNamespace.prototype.deregister=function(n){var t=this;delete this._triggers[n],this._engine.statesByElement.forEach(function(t,e){delete t[n]}),this._elementListeners.forEach(function(e,r){t._elementListeners.set(r,e.filter(function(t){return t.name!=n}))})},AnimationTransitionNamespace.prototype.clearElementCache=function(n){this._engine.statesByElement.delete(n),this._elementListeners.delete(n);var t=this._engine.playersByElement.get(n);t&&(t.forEach(function(n){return n.destroy()}),this._engine.playersByElement.delete(n))},AnimationTransitionNamespace.prototype._destroyInnerNodes=function(n,t,e){var r=this;void 0===e&&(e=!1),this._engine.driver.query(n,y,!0).forEach(function(n){if(e&&containsClass(n,r._hostClassName)){var o=r._engine.namespacesByHostElement.get(n);o&&o.removeNode(n,t,!0),r.removeNode(n,t,!0)}else r.clearElementCache(n)})},AnimationTransitionNamespace.prototype.removeNode=function(n,t,e){var r=this,o=this._engine;!e&&n.childElementCount&&this._destroyInnerNodes(n,t,!0);var i=o.statesByElement.get(n);if(i){var a=[];if(Object.keys(i).forEach(function(t){if(r._triggers[t]){var e=r.trigger(n,t,"void",!1);e&&a.push(e)}}),a.length)return o.markElementAsRemoved(this.id,n,!0,t),void optimizeGroupPlayer(a).onDone(function(){return o.processLeaveNode(n)})}var s=!1;if(o.totalAnimations){var l=o.players.length?o.playersByQueriedElement.get(n):[];if(l&&l.length)s=!0;else for(var d=n;d=d.parentNode;){var p=o.statesByElement.get(d);if(p){s=!0;break}}}var c=this._elementListeners.get(n);if(c){var m=new Set;c.forEach(function(t){var e=t.name;if(!m.has(e)){m.add(e);var i=r._triggers[e],a=i.fallbackTransition,s=o.statesByElement.get(n),l=s[e]||un,d=new mn("void"),p=new bn(r.id,e,n);r._engine.totalQueuedPlayers++,r._queue.push({element:n,triggerName:e,transition:a,fromState:l,toState:d,player:p,isFallbackTransition:!0})}})}s?o.markElementAsRemoved(this.id,n,!1,t):(o.afterFlush(function(){return r.clearElementCache(n)}),o.destroyInnerAnimations(n),o._onRemovalComplete(n,t))},AnimationTransitionNamespace.prototype.insertNode=function(n,t){addClass(n,this._hostClassName)},AnimationTransitionNamespace.prototype.drainQueuedTransitions=function(n){var t=this,e=[];return this._queue.forEach(function(r){var o=r.player;if(!o.destroyed){var i=r.element,a=t._elementListeners.get(i);a&&a.forEach(function(t){if(t.name==r.triggerName){var e=makeAnimationEvent(i,r.triggerName,r.fromState.value,r.toState.value);e._data=n,listenOnPlayer(r.player,t.phase,e,t.callback)}}),o.markedForDestroy?t._engine.afterFlush(function(){o.destroy()}):e.push(r)}}),this._queue=[],e.sort(function(n,e){var r=n.transition.ast.depCount,o=e.transition.ast.depCount;return 0==r||0==o?r-o:t._engine.driver.containsElement(n.element,e.element)?1:-1})},AnimationTransitionNamespace.prototype.destroy=function(n){this.players.forEach(function(n){return n.destroy()}),this._destroyInnerNodes(this.hostElement,n)},AnimationTransitionNamespace.prototype.elementContainsData=function(n){var t=!1;return this._elementListeners.has(n)&&(t=!0),t=!!this._queue.find(function(t){return t.element===n})||t},AnimationTransitionNamespace}(),hn=function(){function TransitionAnimationEngine(n,t){this.driver=n,this._normalizer=t,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=function(n,t){}}return TransitionAnimationEngine.prototype._onRemovalComplete=function(n,t){this.onRemovalComplete(n,t)},Object.defineProperty(TransitionAnimationEngine.prototype,"queuedPlayers",{get:function(){var n=[];return this._namespaceList.forEach(function(t){t.players.forEach(function(t){t.queued&&n.push(t)})}),n},enumerable:!0,configurable:!0}),TransitionAnimationEngine.prototype.createNamespace=function(n,t){var e=new gn(n,t,this);return t.parentNode?this._balanceNamespaceList(e,t):(this.newHostElements.set(t,e),this.collectEnterElement(t)),this._namespaceLookup[n]=e},TransitionAnimationEngine.prototype._balanceNamespaceList=function(n,t){var e=this._namespaceList.length-1;if(e>=0){for(var r=!1,o=e;o>=0;o--){var i=this._namespaceList[o];if(this.driver.containsElement(i.hostElement,t)){this._namespaceList.splice(o+1,0,n),r=!0;break}}r||this._namespaceList.splice(0,0,n)}else this._namespaceList.push(n);return this.namespacesByHostElement.set(t,n),n},TransitionAnimationEngine.prototype.register=function(n,t){var e=this._namespaceLookup[n];return e||(e=this.createNamespace(n,t)),e},TransitionAnimationEngine.prototype.registerTrigger=function(n,t,e){var r=this._namespaceLookup[n];r&&r.register(t,e)&&this.totalAnimations++},TransitionAnimationEngine.prototype.destroy=function(n,t){var e=this;if(n){var r=this._fetchNamespace(n);this.afterFlush(function(){e.namespacesByHostElement.delete(r.hostElement),delete e._namespaceLookup[n];var t=e._namespaceList.indexOf(r);t>=0&&e._namespaceList.splice(t,1)}),this.afterFlushAnimationsDone(function(){return r.destroy(t)})}},TransitionAnimationEngine.prototype._fetchNamespace=function(n){return this._namespaceLookup[n]},TransitionAnimationEngine.prototype.trigger=function(n,t,e,r){return!!isElementNode(t)&&(this._fetchNamespace(n).trigger(t,e,r),!0)},TransitionAnimationEngine.prototype.insertNode=function(n,t,e,r){if(isElementNode(t)){var o=t[cn];o&&o.setForRemoval&&(o.setForRemoval=!1),n&&this._fetchNamespace(n).insertNode(t,e),r&&this.collectEnterElement(t)}},TransitionAnimationEngine.prototype.collectEnterElement=function(n){this.collectedEnterElements.push(n)},TransitionAnimationEngine.prototype.markElementAsDisabled=function(n,t){t?this.disabledNodes.has(n)||(this.disabledNodes.add(n),addClass(n,"ng-animate-disabled")):this.disabledNodes.has(n)&&(this.disabledNodes.delete(n),removeClass(n,"ng-animate-disabled"))},TransitionAnimationEngine.prototype.removeNode=function(n,t,e,r){if(!isElementNode(t))return void this._onRemovalComplete(t,e);var o=n?this._fetchNamespace(n):null;o?o.removeNode(t,e,r):this.markElementAsRemoved(n,t,!1,e)},TransitionAnimationEngine.prototype.markElementAsRemoved=function(n,t,e,r){this.collectedLeaveElements.push(t),t[cn]={namespaceId:n,setForRemoval:r,hasAnimation:e,removedBeforeQueried:!1}},TransitionAnimationEngine.prototype.listen=function(n,t,e,r,o){return isElementNode(t)?this._fetchNamespace(n).listen(t,e,r,o):function(){}},TransitionAnimationEngine.prototype._buildInstruction=function(n,t){return n.transition.build(this.driver,n.element,n.fromState.value,n.toState.value,n.fromState.options,n.toState.options,t)},TransitionAnimationEngine.prototype.destroyInnerAnimations=function(n){var t=this,e=this.driver.query(n,y,!0);e.forEach(function(n){var e=t.playersByElement.get(n);e&&e.forEach(function(n){n.queued?n.markedForDestroy=!0:n.destroy()});var r=t.statesByElement.get(n);r&&Object.keys(r).forEach(function(n){return r[n]=fn})}),0!=this.playersByQueriedElement.size&&(e=this.driver.query(n,v,!0),e.length&&e.forEach(function(n){var e=t.playersByQueriedElement.get(n);e&&e.forEach(function(n){return n.finish()})}))},TransitionAnimationEngine.prototype.whenRenderingDone=function(){var n=this;return new Promise(function(t){if(n.players.length)return optimizeGroupPlayer(n.players).onDone(function(){return t()});t()})},TransitionAnimationEngine.prototype.processLeaveNode=function(n){var t=this,e=n[cn];if(e&&e.setForRemoval){if(n[cn]=dn,e.namespaceId){this.destroyInnerAnimations(n);var r=this._fetchNamespace(e.namespaceId);r&&r.clearElementCache(n)}this._onRemovalComplete(n,e.setForRemoval)}this.driver.matchesElement(n,".ng-animate-disabled")&&this.markElementAsDisabled(n,!1),this.driver.query(n,".ng-animate-disabled",!0).forEach(function(e){t.markElementAsDisabled(n,!1)})},TransitionAnimationEngine.prototype.flush=function(n){var t=this;void 0===n&&(n=-1);var e=[];if(this.newHostElements.size&&(this.newHostElements.forEach(function(n,e){return t._balanceNamespaceList(n,e)}),this.newHostElements.clear()),this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){var r=[];try{e=this._flushAnimations(r,n)}finally{for(var o=0;o<r.length;o++)r[o]()}}else for(var o=0;o<this.collectedLeaveElements.length;o++){var i=this.collectedLeaveElements[o];this.processLeaveNode(i)}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(function(n){return n()}),this._flushFns=[],this._whenQuietFns.length){var a=this._whenQuietFns;this._whenQuietFns=[],e.length?optimizeGroupPlayer(e).onDone(function(){a.forEach(function(n){return n()})}):a.forEach(function(n){return n()})}},TransitionAnimationEngine.prototype.reportError=function(n){throw new Error("Unable to process animations due to the following failed trigger transitions\n "+n.join("\n"))},TransitionAnimationEngine.prototype._flushAnimations=function(n,t){var e=this,r=new q,i=[],a=new Map,s=[],l=new Map,d=new Map,p=new Map,c=new Set;this.disabledNodes.forEach(function(n){c.add(n);for(var t=e.driver.query(n,".ng-animate-queued",!0),r=0;r<t.length;r++)c.add(t[r])});for(var m=getBodyNode(),u=this.collectedEnterElements.length?this.collectedEnterElements.filter(createIsRootFilterFn(this.collectedEnterElements)):[],f=0;f<u.length;f++)addClass(u[f],"ng-enter");for(var g=[],h=[],f=0;f<this.collectedLeaveElements.length;f++){var b=this.collectedLeaveElements[f],y=b[cn];y&&y.setForRemoval&&(addClass(b,"ng-leave"),g.push(b),y.hasAnimation||h.push(b))}n.push(function(){u.forEach(function(n){return removeClass(n,"ng-enter")}),g.forEach(function(n){removeClass(n,"ng-leave"),e.processLeaveNode(n)})});for(var x=[],w=[],f=this._namespaceList.length-1;f>=0;f--){this._namespaceList[f].drainQueuedTransitions(t).forEach(function(n){var t=n.player;x.push(t);var o=n.element;if(!m||!e.driver.containsElement(m,o))return void t.destroy();var a=e._buildInstruction(n,r);if(a.errors&&a.errors.length)return void w.push(a);if(n.isFallbackTransition)return t.onStart(function(){return eraseStyles(o,a.fromStyles)}),t.onDestroy(function(){return setStyles(o,a.toStyles)}),void i.push(t);a.timelines.forEach(function(n){return n.stretchStartingKeyframe=!0}),r.append(o,a.timelines);var c={instruction:a,player:t,element:o};s.push(c),a.queriedElements.forEach(function(n){return getOrSetAsInMap(l,n,[]).push(t)}),a.preStyleProps.forEach(function(n,t){var e=Object.keys(n);if(e.length){var r=d.get(t);r||d.set(t,r=new Set),e.forEach(function(n){return r.add(n)})}}),a.postStyleProps.forEach(function(n,t){var e=Object.keys(n),r=p.get(t);r||p.set(t,r=new Set),e.forEach(function(n){return r.add(n)})})})}if(w.length){var _=[];w.forEach(function(n){_.push("@"+n.triggerName+" has failed due to:\n"),n.errors.forEach(function(n){return _.push("- "+n+"\n")})}),x.forEach(function(n){return n.destroy()}),this.reportError(_)}for(var E=[],f=0;f<u.length;f++){var b=u[f];r.has(b)||E.push(b)}var T=new Map,A=[];s.forEach(function(n){var t=n.element;r.has(t)&&(A.unshift(t),e._beforeAnimationBuild(n.player.namespaceId,n.instruction,T))}),i.forEach(function(n){var t=n.element;e._getPreviousPlayers(t,!1,n.namespaceId,n.triggerName,null).forEach(function(n){getOrSetAsInMap(T,t,[]).push(n),n.destroy()})});var k=g.filter(function(n){return replacePostStylesAsPre(n,d,p)}),S=cloakAndComputeStyles(this.driver,h,p,o.g),C=S[0];S[1].forEach(function(n){replacePostStylesAsPre(n,d,p)&&k.push(n)});var O=(d.size?cloakAndComputeStyles(this.driver,E,d,o.f):[new Map])[0];k.forEach(function(n){var t=C.get(n),e=O.get(n);C.set(n,Object.assign({},t,e))});var P=[],N=[];s.forEach(function(n){var t=n.element,o=n.player,s=n.instruction;if(r.has(t)){if(c.has(t))return void i.push(o);var l=e._buildAnimation(o.namespaceId,s,T,a,O,C);o.setRealPlayer(l);for(var d=null,p=0;p<A.length;p++){var m=A[p];if(m===t)break;if(e.driver.containsElement(m,t)){d=m;break}}if(d){var u=e.playersByElement.get(d);u&&u.length&&(o.parentPlayer=optimizeGroupPlayer(u)),i.push(o)}else P.push(o)}else eraseStyles(t,s.fromStyles),o.onDestroy(function(){return setStyles(t,s.toStyles)}),N.push(o),c.has(t)&&i.push(o)}),N.forEach(function(n){var t=a.get(n.element);if(t&&t.length){var e=optimizeGroupPlayer(t);n.setRealPlayer(e)}}),i.forEach(function(n){n.parentPlayer?n.parentPlayer.onDestroy(function(){return n.destroy()}):n.destroy()});for(var f=0;f<g.length;f++){var b=g[f],y=b[cn];if(removeClass(b,"ng-leave"),!y||!y.hasAnimation){var I=[];if(l.size){var D=l.get(b);D&&D.length&&I.push.apply(I,D);for(var R=this.driver.query(b,v,!0),H=0;H<R.length;H++){var L=l.get(R[H]);L&&L.length&&I.push.apply(I,L)}}var B=I.filter(function(n){return!n.destroyed});B.length?removeNodesAfterAnimationDone(this,b,B):this.processLeaveNode(b)}}return g.length=0,P.forEach(function(n){e.players.push(n),n.onDone(function(){n.destroy();var t=e.players.indexOf(n);e.players.splice(t,1)}),n.play()}),P},TransitionAnimationEngine.prototype.elementContainsData=function(n,t){var e=!1,r=t[cn];return r&&r.setForRemoval&&(e=!0),this.playersByElement.has(t)&&(e=!0),this.playersByQueriedElement.has(t)&&(e=!0),this.statesByElement.has(t)&&(e=!0),this._fetchNamespace(n).elementContainsData(t)||e},TransitionAnimationEngine.prototype.afterFlush=function(n){this._flushFns.push(n)},TransitionAnimationEngine.prototype.afterFlushAnimationsDone=function(n){this._whenQuietFns.push(n)},TransitionAnimationEngine.prototype._getPreviousPlayers=function(n,t,e,r,o){var i=[];if(t){var a=this.playersByQueriedElement.get(n);a&&(i=a)}else{var s=this.playersByElement.get(n);if(s){var l=!o||"void"==o;s.forEach(function(n){n.queued||(l||n.triggerName==r)&&i.push(n)})}}return(e||r)&&(i=i.filter(function(n){return(!e||e==n.namespaceId)&&(!r||r==n.triggerName)})),i},TransitionAnimationEngine.prototype._beforeAnimationBuild=function(n,t,e){var r=this,o=t.triggerName,i=t.element,a=t.isRemovalTransition?void 0:n,s=t.isRemovalTransition?void 0:o;t.timelines.map(function(n){var o=n.element,l=o!==i,d=getOrSetAsInMap(e,o,[]);r._getPreviousPlayers(o,l,a,s,t.toState).forEach(function(n){var t=n.getRealPlayer();t.beforeDestroy&&t.beforeDestroy(),n.destroy(),d.push(n)})}),eraseStyles(i,t.fromStyles)},TransitionAnimationEngine.prototype._buildAnimation=function(n,t,e,r,i,a){var s=this,l=t.triggerName,d=t.element,p=[],c=new Set,m=new Set,u=t.timelines.map(function(t){var u=t.element;c.add(u);var f=u[cn];if(f&&f.removedBeforeQueried)return new o.d;var g=u!==d,h=flattenGroupPlayers((e.get(u)||ln).map(function(n){return n.getRealPlayer()})).filter(function(n){var t=n;return!!t.element&&t.element===u}),b=i.get(u),y=a.get(u),v=normalizeKeyframes(s.driver,s._normalizer,u,t.keyframes,b,y),x=s._buildPlayer(t,v,h);if(t.subTimeline&&r&&m.add(u),g){var w=new bn(n,l,u);w.setRealPlayer(x),p.push(w)}return x});p.forEach(function(n){getOrSetAsInMap(s.playersByQueriedElement,n.element,[]).push(n),n.onDone(function(){return deleteOrUnsetInMap(s.playersByQueriedElement,n.element,n)})}),c.forEach(function(n){return addClass(n,"ng-animating")});var f=optimizeGroupPlayer(u);return f.onDestroy(function(){c.forEach(function(n){return removeClass(n,"ng-animating")}),setStyles(d,t.toStyles)}),m.forEach(function(n){getOrSetAsInMap(r,n,[]).push(f)}),f},TransitionAnimationEngine.prototype._buildPlayer=function(n,t,e){return t.length>0?this.driver.animate(n.element,t,n.duration,n.delay,n.easing,e):new o.d},TransitionAnimationEngine}(),bn=function(){function TransitionAnimationPlayer(n,t,e){this.namespaceId=n,this.triggerName=t,this.element=e,this._player=new o.d,this._containsRealPlayer=!1,this._queuedCallbacks={},this._destroyed=!1,this.markedForDestroy=!1}return Object.defineProperty(TransitionAnimationPlayer.prototype,"queued",{get:function(){return 0==this._containsRealPlayer},enumerable:!0,configurable:!0}),Object.defineProperty(TransitionAnimationPlayer.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!0,configurable:!0}),TransitionAnimationPlayer.prototype.setRealPlayer=function(n){var t=this;this._containsRealPlayer||(this._player=n,Object.keys(this._queuedCallbacks).forEach(function(e){t._queuedCallbacks[e].forEach(function(t){return listenOnPlayer(n,e,void 0,t)})}),this._queuedCallbacks={},this._containsRealPlayer=!0)},TransitionAnimationPlayer.prototype.getRealPlayer=function(){return this._player},TransitionAnimationPlayer.prototype._queueEvent=function(n,t){getOrSetAsInMap(this._queuedCallbacks,n,[]).push(t)},TransitionAnimationPlayer.prototype.onDone=function(n){this.queued&&this._queueEvent("done",n),this._player.onDone(n)},TransitionAnimationPlayer.prototype.onStart=function(n){this.queued&&this._queueEvent("start",n),this._player.onStart(n)},TransitionAnimationPlayer.prototype.onDestroy=function(n){this.queued&&this._queueEvent("destroy",n),this._player.onDestroy(n)},TransitionAnimationPlayer.prototype.init=function(){this._player.init()},TransitionAnimationPlayer.prototype.hasStarted=function(){return!this.queued&&this._player.hasStarted()},TransitionAnimationPlayer.prototype.play=function(){!this.queued&&this._player.play()},TransitionAnimationPlayer.prototype.pause=function(){!this.queued&&this._player.pause()},TransitionAnimationPlayer.prototype.restart=function(){!this.queued&&this._player.restart()},TransitionAnimationPlayer.prototype.finish=function(){this._player.finish()},TransitionAnimationPlayer.prototype.destroy=function(){this._destroyed=!0,this._player.destroy()},TransitionAnimationPlayer.prototype.reset=function(){!this.queued&&this._player.reset()},TransitionAnimationPlayer.prototype.setPosition=function(n){this.queued||this._player.setPosition(n)},TransitionAnimationPlayer.prototype.getPosition=function(){return this.queued?0:this._player.getPosition()},Object.defineProperty(TransitionAnimationPlayer.prototype,"totalTime",{get:function(){return this._player.totalTime},enumerable:!0,configurable:!0}),TransitionAnimationPlayer}(),yn="$$classes",vn=function(){function AnimationEngine(n,t){var e=this;this._triggerCache={},this.onRemovalComplete=function(n,t){},this._transitionEngine=new hn(n,t),this._timelineEngine=new sn(n,t),this._transitionEngine.onRemovalComplete=function(n,t){return e.onRemovalComplete(n,t)}}return AnimationEngine.prototype.registerTrigger=function(n,t,e,r,o){var i=n+"-"+r,a=this._triggerCache[i];if(!a){var s=[],l=buildAnimationAst(o,s);if(s.length)throw new Error('The animation trigger "'+r+'" has failed to build due to the following errors:\n - '+s.join("\n - "));a=buildTrigger(r,l),this._triggerCache[i]=a}this._transitionEngine.registerTrigger(t,r,a)},AnimationEngine.prototype.register=function(n,t){this._transitionEngine.register(n,t)},AnimationEngine.prototype.destroy=function(n,t){this._transitionEngine.destroy(n,t)},AnimationEngine.prototype.onInsert=function(n,t,e,r){this._transitionEngine.insertNode(n,t,e,r)},AnimationEngine.prototype.onRemove=function(n,t,e){this._transitionEngine.removeNode(n,t,e)},AnimationEngine.prototype.disableAnimations=function(n,t){this._transitionEngine.markElementAsDisabled(n,t)},AnimationEngine.prototype.process=function(n,t,e,r){if("@"==e.charAt(0)){var o=parseTimelineCommand(e),i=o[0],a=o[1],s=r;this._timelineEngine.command(i,t,a,s)}else this._transitionEngine.trigger(n,t,e,r)},AnimationEngine.prototype.listen=function(n,t,e,r,o){if("@"==e.charAt(0)){var i=parseTimelineCommand(e),a=i[0],s=i[1];return this._timelineEngine.listen(a,t,s,o)}return this._transitionEngine.listen(n,t,e,r,o)},AnimationEngine.prototype.flush=function(n){void 0===n&&(n=-1),this._transitionEngine.flush(n)},Object.defineProperty(AnimationEngine.prototype,"players",{get:function(){return this._transitionEngine.players.concat(this._timelineEngine.players)},enumerable:!0,configurable:!0}),AnimationEngine.prototype.whenRenderingDone=function(){return this._transitionEngine.whenRenderingDone()},AnimationEngine}(),xn=function(){function WebAnimationsPlayer(n,t,e,r){void 0===r&&(r=[]);var o=this;this.element=n,this.keyframes=t,this.options=e,this.previousPlayers=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.previousStyles={},this.currentSnapshot={},this._duration=e.duration,this._delay=e.delay||0,this.time=this._duration+this._delay,allowPreviousPlayerStylesMerge(this._duration,this._delay)&&r.forEach(function(n){var t=n.currentSnapshot;Object.keys(t).forEach(function(n){return o.previousStyles[n]=t[n]})})}return WebAnimationsPlayer.prototype._onFinish=function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(n){return n()}),this._onDoneFns=[])},WebAnimationsPlayer.prototype.init=function(){this._buildPlayer(),this._preparePlayerBeforeStart()},WebAnimationsPlayer.prototype._buildPlayer=function(){var n=this;if(!this._initialized){this._initialized=!0;var t=this.keyframes.map(function(n){return copyStyles(n,!1)}),e=Object.keys(this.previousStyles);if(e.length){var r=t[0],o=[];if(e.forEach(function(t){r.hasOwnProperty(t)||o.push(t),r[t]=n.previousStyles[t]}),o.length)for(var i=this,a=1;a<t.length;a++)!function(){var n=t[a];o.forEach(function(t){n[t]=_computeStyle(i.element,t)})}()}this._player=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:{},this._player.addEventListener("finish",function(){return n._onFinish()})}},WebAnimationsPlayer.prototype._preparePlayerBeforeStart=function(){this._delay?this._resetDomPlayerState():this._player.pause()},WebAnimationsPlayer.prototype._triggerWebAnimation=function(n,t,e){return n.animate(t,e)},Object.defineProperty(WebAnimationsPlayer.prototype,"domPlayer",{get:function(){return this._player},enumerable:!0,configurable:!0}),WebAnimationsPlayer.prototype.onStart=function(n){this._onStartFns.push(n)},WebAnimationsPlayer.prototype.onDone=function(n){this._onDoneFns.push(n)},WebAnimationsPlayer.prototype.onDestroy=function(n){this._onDestroyFns.push(n)},WebAnimationsPlayer.prototype.play=function(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(function(n){return n()}),this._onStartFns=[],this._started=!0),this._player.play()},WebAnimationsPlayer.prototype.pause=function(){this.init(),this._player.pause()},WebAnimationsPlayer.prototype.finish=function(){this.init(),this._onFinish(),this._player.finish()},WebAnimationsPlayer.prototype.reset=function(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1},WebAnimationsPlayer.prototype._resetDomPlayerState=function(){this._player&&this._player.cancel()},WebAnimationsPlayer.prototype.restart=function(){this.reset(),this.play()},WebAnimationsPlayer.prototype.hasStarted=function(){return this._started},WebAnimationsPlayer.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._onDestroyFns.forEach(function(n){return n()}),this._onDestroyFns=[])},WebAnimationsPlayer.prototype.setPosition=function(n){this._player.currentTime=n*this.time},WebAnimationsPlayer.prototype.getPosition=function(){return this._player.currentTime/this.time},Object.defineProperty(WebAnimationsPlayer.prototype,"totalTime",{get:function(){return this._delay+this._duration},enumerable:!0,configurable:!0}),WebAnimationsPlayer.prototype.beforeDestroy=function(){var n=this,t={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(function(e){"offset"!=e&&(t[e]=n._finished?n._finalKeyframe[e]:_computeStyle(n.element,e))}),this.currentSnapshot=t},WebAnimationsPlayer}(),wn=function(){function WebAnimationsDriver(){}return WebAnimationsDriver.prototype.matchesElement=function(n,t){return p(n,t)},WebAnimationsDriver.prototype.containsElement=function(n,t){return c(n,t)},WebAnimationsDriver.prototype.query=function(n,t,e){return m(n,t,e)},WebAnimationsDriver.prototype.computeStyle=function(n,t,e){return window.getComputedStyle(n)[t]},WebAnimationsDriver.prototype.animate=function(n,t,e,r,o,i){void 0===i&&(i=[]);var a=0==r?"both":"forwards",s={duration:e,delay:r,fill:a};o&&(s.easing=o);var l=i.filter(function(n){return n instanceof xn});return new xn(n,t,s,l)},WebAnimationsDriver}()},310:function(n,t,e){"use strict";function issueAnimationCommand(n,t,e,r,o){return n.setProperty(t,"@@"+e+":"+r,o)}function resolveElementFromTarget(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}function parseTriggerCallbackName(n){var t=n.indexOf(".");return[n.substring(0,t),n.substr(t+1)]}function instantiateSupportedAnimationDriver(){return e.i(s.d)()?new s.e:new s.f}function instantiateDefaultStyleNormalizer(){return new s.g}function instantiateRendererFactory(n,t,e){return new c(n,t,e)}Object.defineProperty(t,"__esModule",{value:!0}),e.d(t,"BrowserAnimationsModule",function(){return y}),e.d(t,"NoopAnimationsModule",function(){return v}),e.d(t,"ɵBrowserAnimationBuilder",function(){return l}),e.d(t,"ɵBrowserAnimationFactory",function(){return d}),e.d(t,"ɵAnimationRenderer",function(){return u}),e.d(t,"ɵAnimationRendererFactory",function(){return c}),e.d(t,"ɵa",function(){return m}),e.d(t,"ɵf",function(){return h}),e.d(t,"ɵg",function(){return b}),e.d(t,"ɵb",function(){return f}),e.d(t,"ɵd",function(){return instantiateDefaultStyleNormalizer}),e.d(t,"ɵe",function(){return instantiateRendererFactory}),e.d(t,"ɵc",function(){return instantiateSupportedAnimationDriver});var r=e(27),o=e(18),i=e(46),a=e(150),s=e(308),l=function(n){function BrowserAnimationBuilder(t,e){var r=n.call(this)||this;r._nextAnimationId=0;var i={id:"0",encapsulation:o.ViewEncapsulation.None,styles:[],data:{animation:[]}};return r._renderer=t.createRenderer(e.body,i),r}return r.a(BrowserAnimationBuilder,n),BrowserAnimationBuilder.prototype.build=function(n){var t=this._nextAnimationId.toString();this._nextAnimationId++;var r=Array.isArray(n)?e.i(a.a)(n):n;return issueAnimationCommand(this._renderer,null,t,"register",[r]),new d(t,this._renderer)},BrowserAnimationBuilder}(a.b);l.decorators=[{type:o.Injectable}],l.ctorParameters=function(){return[{type:o.RendererFactory2},{type:void 0,decorators:[{type:o.Inject,args:[i.DOCUMENT]}]}]};var d=function(n){function BrowserAnimationFactory(t,e){var r=n.call(this)||this;return r._id=t,r._renderer=e,r}return r.a(BrowserAnimationFactory,n),BrowserAnimationFactory.prototype.create=function(n,t){return new p(this._id,n,t||{},this._renderer)},BrowserAnimationFactory}(a.c),p=function(){function RendererAnimationPlayer(n,t,e,r){this.id=n,this.element=t,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",e)}return RendererAnimationPlayer.prototype._listen=function(n,t){return this._renderer.listen(this.element,"@@"+this.id+":"+n,t)},RendererAnimationPlayer.prototype._command=function(n){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return issueAnimationCommand(this._renderer,this.element,this.id,n,t)},RendererAnimationPlayer.prototype.onDone=function(n){this._listen("done",n)},RendererAnimationPlayer.prototype.onStart=function(n){this._listen("start",n)},RendererAnimationPlayer.prototype.onDestroy=function(n){this._listen("destroy",n)},RendererAnimationPlayer.prototype.init=function(){this._command("init")},RendererAnimationPlayer.prototype.hasStarted=function(){return this._started},RendererAnimationPlayer.prototype.play=function(){this._command("play"),this._started=!0},RendererAnimationPlayer.prototype.pause=function(){this._command("pause")},RendererAnimationPlayer.prototype.restart=function(){this._command("restart")},RendererAnimationPlayer.prototype.finish=function(){this._command("finish")},RendererAnimationPlayer.prototype.destroy=function(){this._command("destroy")},RendererAnimationPlayer.prototype.reset=function(){this._command("reset")},RendererAnimationPlayer.prototype.setPosition=function(n){this._command("setPosition",n)},RendererAnimationPlayer.prototype.getPosition=function(){return 0},RendererAnimationPlayer}(),c=function(){function AnimationRendererFactory(n,t,e){this.delegate=n,this.engine=t,this._zone=e,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,t.onRemovalComplete=function(n,t){t&&t.parentNode(n)&&t.removeChild(n.parentNode,n)}}return AnimationRendererFactory.prototype.createRenderer=function(n,t){var e=this,r=this.delegate.createRenderer(n,t);if(!(n&&t&&t.data&&t.data.animation)){var o=this._rendererCache.get(r);return o||(o=new m("",r,this.engine),this._rendererCache.set(r,o)),o}var i=t.id,a=t.id+"-"+this._currentId;return this._currentId++,this.engine.register(a,n),t.data.animation.forEach(function(t){return e.engine.registerTrigger(i,a,n,t.name,t)}),new u(this,a,r,this.engine)},AnimationRendererFactory.prototype.begin=function(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()},AnimationRendererFactory.prototype._scheduleCountTask=function(){var n=this;Zone.current.scheduleMicroTask("incremenet the animation microtask",function(){return n._microtaskId++})},AnimationRendererFactory.prototype.scheduleListenerCallback=function(n,t,e){var r=this;if(n>=0&&n<this._microtaskId)return void this._zone.run(function(){return t(e)});0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(function(){r._zone.run(function(){r._animationCallbacksBuffer.forEach(function(n){(0,n[0])(n[1])}),r._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([t,e])},AnimationRendererFactory.prototype.end=function(){var n=this;this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(function(){n._scheduleCountTask(),n.engine.flush(n._microtaskId)}),this.delegate.end&&this.delegate.end()},AnimationRendererFactory.prototype.whenRenderingDone=function(){return this.engine.whenRenderingDone()},AnimationRendererFactory}();c.decorators=[{type:o.Injectable}],c.ctorParameters=function(){return[{type:o.RendererFactory2},{type:s.a},{type:o.NgZone}]};var m=function(){function BaseAnimationRenderer(n,t,e){this.namespaceId=n,this.delegate=t,this.engine=e,this.destroyNode=this.delegate.destroyNode?function(n){return t.destroyNode(n)}:null}return Object.defineProperty(BaseAnimationRenderer.prototype,"data",{get:function(){return this.delegate.data},enumerable:!0,configurable:!0}),BaseAnimationRenderer.prototype.destroy=function(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()},BaseAnimationRenderer.prototype.createElement=function(n,t){return this.delegate.createElement(n,t)},BaseAnimationRenderer.prototype.createComment=function(n){return this.delegate.createComment(n)},BaseAnimationRenderer.prototype.createText=function(n){return this.delegate.createText(n)},BaseAnimationRenderer.prototype.appendChild=function(n,t){this.delegate.appendChild(n,t),this.engine.onInsert(this.namespaceId,t,n,!1)},BaseAnimationRenderer.prototype.insertBefore=function(n,t,e){this.delegate.insertBefore(n,t,e),this.engine.onInsert(this.namespaceId,t,n,!0)},BaseAnimationRenderer.prototype.removeChild=function(n,t){this.engine.onRemove(this.namespaceId,t,this.delegate)},BaseAnimationRenderer.prototype.selectRootElement=function(n){return this.delegate.selectRootElement(n)},BaseAnimationRenderer.prototype.parentNode=function(n){return this.delegate.parentNode(n)},BaseAnimationRenderer.prototype.nextSibling=function(n){return this.delegate.nextSibling(n)},BaseAnimationRenderer.prototype.setAttribute=function(n,t,e,r){this.delegate.setAttribute(n,t,e,r)},BaseAnimationRenderer.prototype.removeAttribute=function(n,t,e){this.delegate.removeAttribute(n,t,e)},BaseAnimationRenderer.prototype.addClass=function(n,t){this.delegate.addClass(n,t)},BaseAnimationRenderer.prototype.removeClass=function(n,t){this.delegate.removeClass(n,t)},BaseAnimationRenderer.prototype.setStyle=function(n,t,e,r){this.delegate.setStyle(n,t,e,r)},BaseAnimationRenderer.prototype.removeStyle=function(n,t,e){this.delegate.removeStyle(n,t,e)},BaseAnimationRenderer.prototype.setProperty=function(n,t,e){"@"==t.charAt(0)&&"@.disabled"==t?this.disableAnimations(n,!!e):this.delegate.setProperty(n,t,e)},BaseAnimationRenderer.prototype.setValue=function(n,t){this.delegate.setValue(n,t)},BaseAnimationRenderer.prototype.listen=function(n,t,e){return this.delegate.listen(n,t,e)},BaseAnimationRenderer.prototype.disableAnimations=function(n,t){this.engine.disableAnimations(n,t)},BaseAnimationRenderer}(),u=function(n){function AnimationRenderer(t,e,r,o){var i=n.call(this,e,r,o)||this;return i.factory=t,i.namespaceId=e,i}return r.a(AnimationRenderer,n),AnimationRenderer.prototype.setProperty=function(n,t,e){"@"==t.charAt(0)?"."==t.charAt(1)&&"@.disabled"==t?(e=void 0===e||!!e,this.disableAnimations(n,e)):this.engine.process(this.namespaceId,n,t.substr(1),e):this.delegate.setProperty(n,t,e)},AnimationRenderer.prototype.listen=function(n,t,e){var r=this;if("@"==t.charAt(0)){var o=resolveElementFromTarget(n),i=t.substr(1),a="";return"@"!=i.charAt(0)&&(s=parseTriggerCallbackName(i),i=s[0],a=s[1]),this.engine.listen(this.namespaceId,o,i,a,function(n){var t=n._data||-1;r.factory.scheduleListenerCallback(t,e,n)})}return this.delegate.listen(n,t,e);var s},AnimationRenderer}(m),f=function(n){function InjectableAnimationEngine(t,e){return n.call(this,t,e)||this}return r.a(InjectableAnimationEngine,n),InjectableAnimationEngine}(s.a);f.decorators=[{type:o.Injectable}],f.ctorParameters=function(){return[{type:s.b},{type:s.c}]};var g=[{provide:a.b,useClass:l},{provide:s.c,useFactory:instantiateDefaultStyleNormalizer},{provide:s.a,useClass:f},{provide:o.RendererFactory2,useFactory:instantiateRendererFactory,deps:[i["ɵDomRendererFactory2"],s.a,o.NgZone]}],h=[{provide:s.b,useFactory:instantiateSupportedAnimationDriver}].concat(g),b=[{provide:s.b,useClass:s.f}].concat(g),y=function(){function BrowserAnimationsModule(){}return BrowserAnimationsModule}();y.decorators=[{type:o.NgModule,args:[{exports:[i.BrowserModule],providers:h}]}],y.ctorParameters=function(){return[]};var v=function(){function NoopAnimationsModule(){}return NoopAnimationsModule}();v.decorators=[{type:o.NgModule,args:[{exports:[i.BrowserModule],providers:b}]}],v.ctorParameters=function(){return[]}},312:function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e(100),o=e(306);e(307),r.platformBrowserDynamic().bootstrapModule(o.AppModule)},315:function(n,t,e){(function(n,t){!function(n,t,e){"use strict";function _defineProperties(n,t){for(var e=0;e<t.length;e++){var r=t[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}function _createClass(n,t,e){return t&&_defineProperties(n.prototype,t),e&&_defineProperties(n,e),n}function _inheritsLoose(n,t){n.prototype=Object.create(t.prototype),n.prototype.constructor=n,n.__proto__=t}t=t&&t.hasOwnProperty("default")?t.default:t,e=e&&e.hasOwnProperty("default")?e.default:e;var r=function(){function toType(n){return{}.toString.call(n).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function getSpecialTransitionEndEvent(){return{bindType:n.end,delegateType:n.end,handle:function(n){if(t(n.target).is(this))return n.handleObj.handler.apply(this,arguments)}}}function transitionEndTest(){if(window.QUnit)return!1;var n=document.createElement("bootstrap");for(var t in e)if(void 0!==n.style[t])return{end:e[t]};return!1}function transitionEndEmulator(n){var e=this,o=!1;return t(this).one(r.TRANSITION_END,function(){o=!0}),setTimeout(function(){o||r.triggerTransitionEnd(e)},n),this}var n=!1,e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},r={TRANSITION_END:"bsTransitionEnd",getUID:function(n){do{n+=~~(1e6*Math.random())}while(document.getElementById(n));return n},getSelectorFromElement:function(n){var e=n.getAttribute("data-target");e&&"#"!==e||(e=n.getAttribute("href")||"");try{return t(document).find(e).length>0?e:null}catch(n){return null}},reflow:function(n){return n.offsetHeight},triggerTransitionEnd:function(e){t(e).trigger(n.end)},supportsTransitionEnd:function(){return Boolean(n)},isElement:function(n){return(n[0]||n).nodeType},typeCheckConfig:function(n,t,e){for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=e[o],a=t[o],s=a&&r.isElement(a)?"element":toType(a);if(!new RegExp(i).test(s))throw new Error(n.toUpperCase()+': Option "'+o+'" provided type "'+s+'" but expected type "'+i+'".')}}};return function(){n=transitionEndTest(),t.fn.emulateTransitionEnd=transitionEndEmulator,r.supportsTransitionEnd()&&(t.event.special[r.TRANSITION_END]=getSpecialTransitionEndEvent())}(),r}(),o=_createClass,i=_inheritsLoose,a=function(){var n="alert",e=t.fn[n],i={DISMISS:'[data-dismiss="alert"]'},a={CLOSE:"close.bs.alert",CLOSED:"closed.bs.alert",CLICK_DATA_API:"click.bs.alert.data-api"},s={ALERT:"alert",FADE:"fade",SHOW:"show"},l=function(){function Alert(n){this._element=n}var n=Alert.prototype;return n.close=function(n){n=n||this._element;var t=this._getRootElement(n);this._triggerCloseEvent(t).isDefaultPrevented()||this._removeElement(t)},n.dispose=function(){t.removeData(this._element,"bs.alert"),this._element=null},n._getRootElement=function(n){var e=r.getSelectorFromElement(n),o=!1;return e&&(o=t(e)[0]),o||(o=t(n).closest("."+s.ALERT)[0]),o},n._triggerCloseEvent=function(n){var e=t.Event(a.CLOSE);return t(n).trigger(e),e},n._removeElement=function(n){var e=this;if(t(n).removeClass(s.SHOW),!r.supportsTransitionEnd()||!t(n).hasClass(s.FADE))return void this._destroyElement(n);t(n).one(r.TRANSITION_END,function(t){return e._destroyElement(n,t)}).emulateTransitionEnd(150)},n._destroyElement=function(n){t(n).detach().trigger(a.CLOSED).remove()},Alert._jQueryInterface=function(n){return this.each(function(){var e=t(this),r=e.data("bs.alert");r||(r=new Alert(this),e.data("bs.alert",r)),"close"===n&&r[n](this)})},Alert._handleDismiss=function(n){return function(t){t&&t.preventDefault(),n.close(this)}},o(Alert,null,[{key:"VERSION",get:function(){return"4.0.0-beta.2"}}]),Alert}();return t(document).on(a.CLICK_DATA_API,i.DISMISS,l._handleDismiss(new l)),t.fn[n]=l._jQueryInterface,t.fn[n].Constructor=l,t.fn[n].noConflict=function(){return t.fn[n]=e,l._jQueryInterface},l}(),s=function(){var n="button",e=t.fn[n],r={ACTIVE:"active",BUTTON:"btn",FOCUS:"focus"},i={DATA_TOGGLE_CARROT:'[data-toggle^="button"]',DATA_TOGGLE:'[data-toggle="buttons"]',INPUT:"input",ACTIVE:".active",BUTTON:".btn"},a={CLICK_DATA_API:"click.bs.button.data-api",FOCUS_BLUR_DATA_API:"focus.bs.button.data-api blur.bs.button.data-api"},s=function(){function Button(n){this._element=n}var n=Button.prototype;return n.toggle=function(){var n=!0,e=!0,o=t(this._element).closest(i.DATA_TOGGLE)[0];if(o){var a=t(this._element).find(i.INPUT)[0];if(a){if("radio"===a.type)if(a.checked&&t(this._element).hasClass(r.ACTIVE))n=!1;else{var s=t(o).find(i.ACTIVE)[0];s&&t(s).removeClass(r.ACTIVE)}if(n){if(a.hasAttribute("disabled")||o.hasAttribute("disabled")||a.classList.contains("disabled")||o.classList.contains("disabled"))return;a.checked=!t(this._element).hasClass(r.ACTIVE),t(a).trigger("change")}a.focus(),e=!1}}e&&this._element.setAttribute("aria-pressed",!t(this._element).hasClass(r.ACTIVE)),n&&t(this._element).toggleClass(r.ACTIVE)},n.dispose=function(){t.removeData(this._element,"bs.button"),this._element=null},Button._jQueryInterface=function(n){return this.each(function(){var e=t(this).data("bs.button");e||(e=new Button(this),t(this).data("bs.button",e)),"toggle"===n&&e[n]()})},o(Button,null,[{key:"VERSION",get:function(){return"4.0.0-beta.2"}}]),Button}();return t(document).on(a.CLICK_DATA_API,i.DATA_TOGGLE_CARROT,function(n){n.preventDefault();var e=n.target;t(e).hasClass(r.BUTTON)||(e=t(e).closest(i.BUTTON)),s._jQueryInterface.call(t(e),"toggle")}).on(a.FOCUS_BLUR_DATA_API,i.DATA_TOGGLE_CARROT,function(n){var e=t(n.target).closest(i.BUTTON)[0];t(e).toggleClass(r.FOCUS,/^focus(in)?$/.test(n.type))}),t.fn[n]=s._jQueryInterface,t.fn[n].Constructor=s,t.fn[n].noConflict=function(){return t.fn[n]=e,s._jQueryInterface},s}(),l=function(){var n="carousel",e="bs.carousel",i="."+e,a=t.fn[n],s={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},l={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},d={NEXT:"next",PREV:"prev",LEFT:"left",RIGHT:"right"},p={SLIDE:"slide"+i,SLID:"slid"+i,KEYDOWN:"keydown"+i,MOUSEENTER:"mouseenter"+i,MOUSELEAVE:"mouseleave"+i,TOUCHEND:"touchend"+i,LOAD_DATA_API:"load.bs.carousel.data-api",CLICK_DATA_API:"click.bs.carousel.data-api"},c={CAROUSEL:"carousel",ACTIVE:"active",SLIDE:"slide",RIGHT:"carousel-item-right",LEFT:"carousel-item-left",NEXT:"carousel-item-next",PREV:"carousel-item-prev",ITEM:"carousel-item"},m={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",NEXT_PREV:".carousel-item-next, .carousel-item-prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-slide], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},u=function(){function Carousel(n,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this._config=this._getConfig(e),this._element=t(n)[0],this._indicatorsElement=t(this._element).find(m.INDICATORS)[0],this._addEventListeners()}var a=Carousel.prototype;return a.next=function(){this._isSliding||this._slide(d.NEXT)},a.nextWhenVisible=function(){!document.hidden&&t(this._element).is(":visible")&&"hidden"!==t(this._element).css("visibility")&&this.next()},a.prev=function(){this._isSliding||this._slide(d.PREV)},a.pause=function(n){n||(this._isPaused=!0),t(this._element).find(m.NEXT_PREV)[0]&&r.supportsTransitionEnd()&&(r.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},a.cycle=function(n){n||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},a.to=function(n){var e=this;this._activeElement=t(this._element).find(m.ACTIVE_ITEM)[0];var r=this._getItemIndex(this._activeElement);if(!(n>this._items.length-1||n<0)){if(this._isSliding)return void t(this._element).one(p.SLID,function(){return e.to(n)});if(r===n)return this.pause(),void this.cycle();var o=n>r?d.NEXT:d.PREV;this._slide(o,this._items[n])}},a.dispose=function(){t(this._element).off(i),t.removeData(this._element,e),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},a._getConfig=function(e){return e=t.extend({},s,e),r.typeCheckConfig(n,e,l),e},a._addEventListeners=function(){var n=this;this._config.keyboard&&t(this._element).on(p.KEYDOWN,function(t){return n._keydown(t)}),"hover"===this._config.pause&&(t(this._element).on(p.MOUSEENTER,function(t){return n.pause(t)}).on(p.MOUSELEAVE,function(t){return n.cycle(t)}),"ontouchstart"in document.documentElement&&t(this._element).on(p.TOUCHEND,function(){n.pause(),n.touchTimeout&&clearTimeout(n.touchTimeout),n.touchTimeout=setTimeout(function(t){return n.cycle(t)},500+n._config.interval)}))},a._keydown=function(n){if(!/input|textarea/i.test(n.target.tagName))switch(n.which){case 37:n.preventDefault(),this.prev();break;case 39:n.preventDefault(),this.next();break;default:return}},a._getItemIndex=function(n){return this._items=t.makeArray(t(n).parent().find(m.ITEM)),this._items.indexOf(n)},a._getItemByDirection=function(n,t){var e=n===d.NEXT,r=n===d.PREV,o=this._getItemIndex(t),i=this._items.length-1;if((r&&0===o||e&&o===i)&&!this._config.wrap)return t;var a=n===d.PREV?-1:1,s=(o+a)%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},a._triggerSlideEvent=function(n,e){var r=this._getItemIndex(n),o=this._getItemIndex(t(this._element).find(m.ACTIVE_ITEM)[0]),i=t.Event(p.SLIDE,{relatedTarget:n,direction:e,from:o,to:r});return t(this._element).trigger(i),i},a._setActiveIndicatorElement=function(n){if(this._indicatorsElement){t(this._indicatorsElement).find(m.ACTIVE).removeClass(c.ACTIVE);var e=this._indicatorsElement.children[this._getItemIndex(n)];e&&t(e).addClass(c.ACTIVE)}},a._slide=function(n,e){var o,i,a,s=this,l=t(this._element).find(m.ACTIVE_ITEM)[0],u=this._getItemIndex(l),f=e||l&&this._getItemByDirection(n,l),g=this._getItemIndex(f),h=Boolean(this._interval);if(n===d.NEXT?(o=c.LEFT,i=c.NEXT,a=d.LEFT):(o=c.RIGHT,i=c.PREV,a=d.RIGHT),f&&t(f).hasClass(c.ACTIVE))return void(this._isSliding=!1);if(!this._triggerSlideEvent(f,a).isDefaultPrevented()&&l&&f){this._isSliding=!0,h&&this.pause(),this._setActiveIndicatorElement(f);var b=t.Event(p.SLID,{relatedTarget:f,direction:a,from:u,to:g});r.supportsTransitionEnd()&&t(this._element).hasClass(c.SLIDE)?(t(f).addClass(i),r.reflow(f),t(l).addClass(o),t(f).addClass(o),t(l).one(r.TRANSITION_END,function(){t(f).removeClass(o+" "+i).addClass(c.ACTIVE),t(l).removeClass(c.ACTIVE+" "+i+" "+o),s._isSliding=!1,setTimeout(function(){return t(s._element).trigger(b)},0)}).emulateTransitionEnd(600)):(t(l).removeClass(c.ACTIVE),t(f).addClass(c.ACTIVE),this._isSliding=!1,t(this._element).trigger(b)),h&&this.cycle()}},Carousel._jQueryInterface=function(n){return this.each(function(){var r=t(this).data(e),o=t.extend({},s,t(this).data());"object"==typeof n&&t.extend(o,n);var i="string"==typeof n?n:o.slide;if(r||(r=new Carousel(this,o),t(this).data(e,r)),"number"==typeof n)r.to(n);else if("string"==typeof i){if(void 0===r[i])throw new Error('No method named "'+i+'"');r[i]()}else o.interval&&(r.pause(),r.cycle())})},Carousel._dataApiClickHandler=function(n){var o=r.getSelectorFromElement(this);if(o){var i=t(o)[0];if(i&&t(i).hasClass(c.CAROUSEL)){var a=t.extend({},t(i).data(),t(this).data()),s=this.getAttribute("data-slide-to");s&&(a.interval=!1),Carousel._jQueryInterface.call(t(i),a),s&&t(i).data(e).to(s),n.preventDefault()}}},o(Carousel,null,[{key:"VERSION",get:function(){return"4.0.0-beta.2"}},{key:"Default",get:function(){return s}}]),Carousel}();return t(document).on(p.CLICK_DATA_API,m.DATA_SLIDE,u._dataApiClickHandler),t(window).on(p.LOAD_DATA_API,function(){t(m.DATA_RIDE).each(function(){var n=t(this);u._jQueryInterface.call(n,n.data())})}),t.fn[n]=u._jQueryInterface,t.fn[n].Constructor=u,t.fn[n].noConflict=function(){return t.fn[n]=a,u._jQueryInterface},u}(),d=function(){var n="collapse",e="bs.collapse",i=t.fn[n],a={toggle:!0,parent:""},s={toggle:"boolean",parent:"(string|element)"},l={SHOW:"show.bs.collapse",SHOWN:"shown.bs.collapse",HIDE:"hide.bs.collapse",HIDDEN:"hidden.bs.collapse",CLICK_DATA_API:"click.bs.collapse.data-api"},d={SHOW:"show",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},p={WIDTH:"width",HEIGHT:"height"},c={ACTIVES:".show, .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},m=function(){function Collapse(n,e){this._isTransitioning=!1,this._element=n,this._config=this._getConfig(e),this._triggerArray=t.makeArray(t('[data-toggle="collapse"][href="#'+n.id+'"],[data-toggle="collapse"][data-target="#'+n.id+'"]'));for(var o=t(c.DATA_TOGGLE),i=0;i<o.length;i++){var a=o[i],s=r.getSelectorFromElement(a);null!==s&&t(s).filter(n).length>0&&this._triggerArray.push(a)}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var i=Collapse.prototype;return i.toggle=function(){t(this._element).hasClass(d.SHOW)?this.hide():this.show()},i.show=function(){var n=this;if(!this._isTransitioning&&!t(this._element).hasClass(d.SHOW)){var o,i;if(this._parent&&(o=t.makeArray(t(this._parent).children().children(c.ACTIVES)),o.length||(o=null)),!(o&&(i=t(o).data(e))&&i._isTransitioning)){var a=t.Event(l.SHOW);if(t(this._element).trigger(a),!a.isDefaultPrevented()){o&&(Collapse._jQueryInterface.call(t(o),"hide"),i||t(o).data(e,null));var s=this._getDimension();t(this._element).removeClass(d.COLLAPSE).addClass(d.COLLAPSING),this._element.style[s]=0,this._triggerArray.length&&t(this._triggerArray).removeClass(d.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var p=function(){t(n._element).removeClass(d.COLLAPSING).addClass(d.COLLAPSE).addClass(d.SHOW),n._element.style[s]="",n.setTransitioning(!1),t(n._element).trigger(l.SHOWN)};if(!r.supportsTransitionEnd())return void p();var m=s[0].toUpperCase()+s.slice(1),u="scroll"+m;t(this._element).one(r.TRANSITION_END,p).emulateTransitionEnd(600),this._element.style[s]=this._element[u]+"px"}}}},i.hide=function(){var n=this;if(!this._isTransitioning&&t(this._element).hasClass(d.SHOW)){var e=t.Event(l.HIDE);if(t(this._element).trigger(e),!e.isDefaultPrevented()){var o=this._getDimension();if(this._element.style[o]=this._element.getBoundingClientRect()[o]+"px",r.reflow(this._element),t(this._element).addClass(d.COLLAPSING).removeClass(d.COLLAPSE).removeClass(d.SHOW),this._triggerArray.length)for(var i=0;i<this._triggerArray.length;i++){var a=this._triggerArray[i],s=r.getSelectorFromElement(a);if(null!==s){var p=t(s);p.hasClass(d.SHOW)||t(a).addClass(d.COLLAPSED).attr("aria-expanded",!1)}}this.setTransitioning(!0);var c=function(){n.setTransitioning(!1),t(n._element).removeClass(d.COLLAPSING).addClass(d.COLLAPSE).trigger(l.HIDDEN)};if(this._element.style[o]="",!r.supportsTransitionEnd())return void c();t(this._element).one(r.TRANSITION_END,c).emulateTransitionEnd(600)}}},i.setTransitioning=function(n){this._isTransitioning=n},i.dispose=function(){t.removeData(this._element,e),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},i._getConfig=function(e){return e=t.extend({},a,e),e.toggle=Boolean(e.toggle),r.typeCheckConfig(n,e,s),e},i._getDimension=function(){return t(this._element).hasClass(p.WIDTH)?p.WIDTH:p.HEIGHT},i._getParent=function(){var n=this,e=null;r.isElement(this._config.parent)?(e=this._config.parent,void 0!==this._config.parent.jquery&&(e=this._config.parent[0])):e=t(this._config.parent)[0];var o='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return t(e).find(o).each(function(t,e){n._addAriaAndCollapsedClass(Collapse._getTargetFromElement(e),[e])}),e},i._addAriaAndCollapsedClass=function(n,e){if(n){var r=t(n).hasClass(d.SHOW);e.length&&t(e).toggleClass(d.COLLAPSED,!r).attr("aria-expanded",r)}},Collapse._getTargetFromElement=function(n){var e=r.getSelectorFromElement(n);return e?t(e)[0]:null},Collapse._jQueryInterface=function(n){return this.each(function(){var r=t(this),o=r.data(e),i=t.extend({},a,r.data(),"object"==typeof n&&n);if(!o&&i.toggle&&/show|hide/.test(n)&&(i.toggle=!1),o||(o=new Collapse(this,i),r.data(e,o)),"string"==typeof n){if(void 0===o[n])throw new Error('No method named "'+n+'"');o[n]()}})},o(Collapse,null,[{key:"VERSION",get:function(){return"4.0.0-beta.2"}},{key:"Default",get:function(){return a}}]),Collapse}();return t(document).on(l.CLICK_DATA_API,c.DATA_TOGGLE,function(n){"A"===n.currentTarget.tagName&&n.preventDefault();var o=t(this),i=r.getSelectorFromElement(this);t(i).each(function(){var n=t(this),r=n.data(e),i=r?"toggle":o.data();m._jQueryInterface.call(n,i)})}),t.fn[n]=m._jQueryInterface,t.fn[n].Constructor=m,t.fn[n].noConflict=function(){return t.fn[n]=i,m._jQueryInterface},m}(),p=function(){if(void 0===e)throw new Error("Bootstrap dropdown require Popper.js (https://popper.js.org)");var n="dropdown",i="bs.dropdown",a="."+i,s=t.fn[n],l=new RegExp("38|40|27"),d={HIDE:"hide"+a,HIDDEN:"hidden"+a,SHOW:"show"+a,SHOWN:"shown"+a,CLICK:"click"+a,CLICK_DATA_API:"click.bs.dropdown.data-api",KEYDOWN_DATA_API:"keydown.bs.dropdown.data-api",KEYUP_DATA_API:"keyup.bs.dropdown.data-api"},p={DISABLED:"disabled",SHOW:"show",DROPUP:"dropup",MENURIGHT:"dropdown-menu-right",MENULEFT:"dropdown-menu-left"},c={DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:".dropdown form",MENU:".dropdown-menu",NAVBAR_NAV:".navbar-nav",VISIBLE_ITEMS:".dropdown-menu .dropdown-item:not(.disabled)"},m={TOP:"top-start",TOPEND:"top-end",BOTTOM:"bottom-start",BOTTOMEND:"bottom-end"},u={offset:0,flip:!0},f={offset:"(number|string|function)",flip:"boolean"},g=function(){function Dropdown(n,t){this._element=n,this._popper=null,this._config=this._getConfig(t),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var s=Dropdown.prototype;return s.toggle=function(){if(!this._element.disabled&&!t(this._element).hasClass(p.DISABLED)){var n=Dropdown._getParentFromElement(this._element),r=t(this._menu).hasClass(p.SHOW);if(Dropdown._clearMenus(),!r){var o={relatedTarget:this._element},i=t.Event(d.SHOW,o);if(t(n).trigger(i),!i.isDefaultPrevented()){var a=this._element;t(n).hasClass(p.DROPUP)&&(t(this._menu).hasClass(p.MENULEFT)||t(this._menu).hasClass(p.MENURIGHT))&&(a=n),this._popper=new e(a,this._menu,this._getPopperConfig()),"ontouchstart"in document.documentElement&&!t(n).closest(c.NAVBAR_NAV).length&&t("body").children().on("mouseover",null,t.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),t(this._menu).toggleClass(p.SHOW),t(n).toggleClass(p.SHOW).trigger(t.Event(d.SHOWN,o))}}}},s.dispose=function(){t.removeData(this._element,i),t(this._element).off(a),this._element=null,this._menu=null,null!==this._popper&&this._popper.destroy(),this._popper=null},s.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},s._addEventListeners=function(){var n=this;t(this._element).on(d.CLICK,function(t){t.preventDefault(),t.stopPropagation(),n.toggle()})},s._getConfig=function(e){return e=t.extend({},this.constructor.Default,t(this._element).data(),e),r.typeCheckConfig(n,e,this.constructor.DefaultType),e},s._getMenuElement=function(){if(!this._menu){var n=Dropdown._getParentFromElement(this._element);this._menu=t(n).find(c.MENU)[0]}return this._menu},s._getPlacement=function(){var n=t(this._element).parent(),e=m.BOTTOM;return n.hasClass(p.DROPUP)?(e=m.TOP,t(this._menu).hasClass(p.MENURIGHT)&&(e=m.TOPEND)):t(this._menu).hasClass(p.MENURIGHT)&&(e=m.BOTTOMEND),e},s._detectNavbar=function(){return t(this._element).closest(".navbar").length>0},s._getPopperConfig=function(){var n=this,e={};"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=t.extend({},e.offsets,n._config.offset(e.offsets)||{}),e}:e.offset=this._config.offset;var r={placement:this._getPlacement(),modifiers:{offset:e,flip:{enabled:this._config.flip}}};return this._inNavbar&&(r.modifiers.applyStyle={enabled:!this._inNavbar}),r},Dropdown._jQueryInterface=function(n){return this.each(function(){var e=t(this).data(i),r="object"==typeof n?n:null;if(e||(e=new Dropdown(this,r),t(this).data(i,e)),"string"==typeof n){if(void 0===e[n])throw new Error('No method named "'+n+'"');e[n]()}})},Dropdown._clearMenus=function(n){if(!n||3!==n.which&&("keyup"!==n.type||9===n.which))for(var e=t.makeArray(t(c.DATA_TOGGLE)),r=0;r<e.length;r++){var o=Dropdown._getParentFromElement(e[r]),a=t(e[r]).data(i),s={relatedTarget:e[r]};if(a){var l=a._menu;if(t(o).hasClass(p.SHOW)&&!(n&&("click"===n.type&&/input|textarea/i.test(n.target.tagName)||"keyup"===n.type&&9===n.which)&&t.contains(o,n.target))){var m=t.Event(d.HIDE,s);t(o).trigger(m),m.isDefaultPrevented()||("ontouchstart"in document.documentElement&&t("body").children().off("mouseover",null,t.noop),e[r].setAttribute("aria-expanded","false"),t(l).removeClass(p.SHOW),t(o).removeClass(p.SHOW).trigger(t.Event(d.HIDDEN,s)))}}}},Dropdown._getParentFromElement=function(n){var e,o=r.getSelectorFromElement(n);return o&&(e=t(o)[0]),e||n.parentNode},Dropdown._dataApiKeydownHandler=function(n){if(!(!l.test(n.which)||/button/i.test(n.target.tagName)&&32===n.which||/input|textarea/i.test(n.target.tagName)||(n.preventDefault(),n.stopPropagation(),this.disabled||t(this).hasClass(p.DISABLED)))){var e=Dropdown._getParentFromElement(this),r=t(e).hasClass(p.SHOW);if(!r&&(27!==n.which||32!==n.which)||r&&(27===n.which||32===n.which)){if(27===n.which){var o=t(e).find(c.DATA_TOGGLE)[0];t(o).trigger("focus")}return void t(this).trigger("click")}var i=t(e).find(c.VISIBLE_ITEMS).get();if(i.length){var a=i.indexOf(n.target);38===n.which&&a>0&&a--,40===n.which&&a<i.length-1&&a++,a<0&&(a=0),i[a].focus()}}},o(Dropdown,null,[{key:"VERSION",get:function(){return"4.0.0-beta.2"}},{key:"Default",get:function(){return u}},{key:"DefaultType",get:function(){return f}}]),Dropdown}();return t(document).on(d.KEYDOWN_DATA_API,c.DATA_TOGGLE,g._dataApiKeydownHandler).on(d.KEYDOWN_DATA_API,c.MENU,g._dataApiKeydownHandler).on(d.CLICK_DATA_API+" "+d.KEYUP_DATA_API,g._clearMenus).on(d.CLICK_DATA_API,c.DATA_TOGGLE,function(n){n.preventDefault(),n.stopPropagation(),g._jQueryInterface.call(t(this),"toggle")}).on(d.CLICK_DATA_API,c.FORM_CHILD,function(n){n.stopPropagation()}),t.fn[n]=g._jQueryInterface,t.fn[n].Constructor=g,t.fn[n].noConflict=function(){return t.fn[n]=s,g._jQueryInterface},g}(),c=function(){var n="modal",e=".bs.modal",i=t.fn[n],a={backdrop:!0,keyboard:!0,focus:!0,show:!0},s={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},l={HIDE:"hide.bs.modal",HIDDEN:"hidden.bs.modal",SHOW:"show.bs.modal",SHOWN:"shown.bs.modal",FOCUSIN:"focusin.bs.modal",RESIZE:"resize.bs.modal",CLICK_DISMISS:"click.dismiss.bs.modal",KEYDOWN_DISMISS:"keydown.dismiss.bs.modal",MOUSEUP_DISMISS:"mouseup.dismiss.bs.modal",MOUSEDOWN_DISMISS:"mousedown.dismiss.bs.modal",CLICK_DATA_API:"click.bs.modal.data-api"},d={SCROLLBAR_MEASURER:"modal-scrollbar-measure",BACKDROP:"modal-backdrop",OPEN:"modal-open",FADE:"fade",SHOW:"show"},p={DIALOG:".modal-dialog",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"},c=function(){function Modal(n,e){this._config=this._getConfig(e),this._element=n,this._dialog=t(n).find(p.DIALOG)[0],this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._originalBodyPadding=0,this._scrollbarWidth=0}var i=Modal.prototype;return i.toggle=function(n){return this._isShown?this.hide():this.show(n)},i.show=function(n){var e=this;if(!this._isTransitioning&&!this._isShown){r.supportsTransitionEnd()&&t(this._element).hasClass(d.FADE)&&(this._isTransitioning=!0);var o=t.Event(l.SHOW,{relatedTarget:n});t(this._element).trigger(o),this._isShown||o.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),t(document.body).addClass(d.OPEN),this._setEscapeEvent(),this._setResizeEvent(),t(this._element).on(l.CLICK_DISMISS,p.DATA_DISMISS,function(n){return e.hide(n)}),t(this._dialog).on(l.MOUSEDOWN_DISMISS,function(){t(e._element).one(l.MOUSEUP_DISMISS,function(n){t(n.target).is(e._element)&&(e._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return e._showElement(n)}))}},i.hide=function(n){var e=this;if(n&&n.preventDefault(),!this._isTransitioning&&this._isShown){var o=t.Event(l.HIDE);if(t(this._element).trigger(o),this._isShown&&!o.isDefaultPrevented()){this._isShown=!1;var i=r.supportsTransitionEnd()&&t(this._element).hasClass(d.FADE);i&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),t(document).off(l.FOCUSIN),t(this._element).removeClass(d.SHOW),t(this._element).off(l.CLICK_DISMISS),t(this._dialog).off(l.MOUSEDOWN_DISMISS),i?t(this._element).one(r.TRANSITION_END,function(n){return e._hideModal(n)}).emulateTransitionEnd(300):this._hideModal()}}},i.dispose=function(){t.removeData(this._element,"bs.modal"),t(window,document,this._element,this._backdrop).off(e),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._scrollbarWidth=null},i.handleUpdate=function(){this._adjustDialog()},i._getConfig=function(e){return e=t.extend({},a,e),r.typeCheckConfig(n,e,s),e},i._showElement=function(n){var e=this,o=r.supportsTransitionEnd()&&t(this._element).hasClass(d.FADE);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.scrollTop=0,o&&r.reflow(this._element),t(this._element).addClass(d.SHOW),this._config.focus&&this._enforceFocus();var i=t.Event(l.SHOWN,{relatedTarget:n}),a=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,t(e._element).trigger(i)};o?t(this._dialog).one(r.TRANSITION_END,a).emulateTransitionEnd(300):a()},i._enforceFocus=function(){var n=this;t(document).off(l.FOCUSIN).on(l.FOCUSIN,function(e){document===e.target||n._element===e.target||t(n._element).has(e.target).length||n._element.focus()})},i._setEscapeEvent=function(){var n=this;this._isShown&&this._config.keyboard?t(this._element).on(l.KEYDOWN_DISMISS,function(t){27===t.which&&(t.preventDefault(),n.hide())}):this._isShown||t(this._element).off(l.KEYDOWN_DISMISS)},i._setResizeEvent=function(){var n=this;this._isShown?t(window).on(l.RESIZE,function(t){return n.handleUpdate(t)}):t(window).off(l.RESIZE)},i._hideModal=function(){var n=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1,this._showBackdrop(function(){t(document.body).removeClass(d.OPEN),n._resetAdjustments(),n._resetScrollbar(),t(n._element).trigger(l.HIDDEN)})},i._removeBackdrop=function(){this._backdrop&&(t(this._backdrop).remove(),this._backdrop=null)},i._showBackdrop=function(n){var e=this,o=t(this._element).hasClass(d.FADE)?d.FADE:"";if(this._isShown&&this._config.backdrop){var i=r.supportsTransitionEnd()&&o;if(this._backdrop=document.createElement("div"),this._backdrop.className=d.BACKDROP,o&&t(this._backdrop).addClass(o),t(this._backdrop).appendTo(document.body),t(this._element).on(l.CLICK_DISMISS,function(n){if(e._ignoreBackdropClick)return void(e._ignoreBackdropClick=!1);n.target===n.currentTarget&&("static"===e._config.backdrop?e._element.focus():e.hide())}),i&&r.reflow(this._backdrop),t(this._backdrop).addClass(d.SHOW),!n)return;if(!i)return void n();t(this._backdrop).one(r.TRANSITION_END,n).emulateTransitionEnd(150)}else if(!this._isShown&&this._backdrop){t(this._backdrop).removeClass(d.SHOW);var a=function(){e._removeBackdrop(),n&&n()};r.supportsTransitionEnd()&&t(this._element).hasClass(d.FADE)?t(this._backdrop).one(r.TRANSITION_END,a).emulateTransitionEnd(150):a()}else n&&n()},i._adjustDialog=function(){var n=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&n&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!n&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},i._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},i._checkScrollbar=function(){var n=document.body.getBoundingClientRect();this._isBodyOverflowing=n.left+n.right<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},i._setScrollbar=function(){var n=this;if(this._isBodyOverflowing){t(p.FIXED_CONTENT).each(function(e,r){var o=t(r)[0].style.paddingRight,i=t(r).css("padding-right");t(r).data("padding-right",o).css("padding-right",parseFloat(i)+n._scrollbarWidth+"px")}),t(p.STICKY_CONTENT).each(function(e,r){var o=t(r)[0].style.marginRight,i=t(r).css("margin-right");t(r).data("margin-right",o).css("margin-right",parseFloat(i)-n._scrollbarWidth+"px")}),t(p.NAVBAR_TOGGLER).each(function(e,r){var o=t(r)[0].style.marginRight,i=t(r).css("margin-right");t(r).data("margin-right",o).css("margin-right",parseFloat(i)+n._scrollbarWidth+"px")});var e=document.body.style.paddingRight,r=t("body").css("padding-right");t("body").data("padding-right",e).css("padding-right",parseFloat(r)+this._scrollbarWidth+"px")}},i._resetScrollbar=function(){t(p.FIXED_CONTENT).each(function(n,e){var r=t(e).data("padding-right");void 0!==r&&t(e).css("padding-right",r).removeData("padding-right")}),t(p.STICKY_CONTENT+", "+p.NAVBAR_TOGGLER).each(function(n,e){var r=t(e).data("margin-right");void 0!==r&&t(e).css("margin-right",r).removeData("margin-right")});var n=t("body").data("padding-right");void 0!==n&&t("body").css("padding-right",n).removeData("padding-right")},i._getScrollbarWidth=function(){var n=document.createElement("div");n.className=d.SCROLLBAR_MEASURER,document.body.appendChild(n);var t=n.getBoundingClientRect().width-n.clientWidth;return document.body.removeChild(n),t},Modal._jQueryInterface=function(n,e){return this.each(function(){var r=t(this).data("bs.modal"),o=t.extend({},Modal.Default,t(this).data(),"object"==typeof n&&n);if(r||(r=new Modal(this,o),t(this).data("bs.modal",r)),"string"==typeof n){if(void 0===r[n])throw new Error('No method named "'+n+'"');r[n](e)}else o.show&&r.show(e)})},o(Modal,null,[{key:"VERSION",get:function(){return"4.0.0-beta.2"}},{key:"Default",get:function(){return a}}]),Modal}();return t(document).on(l.CLICK_DATA_API,p.DATA_TOGGLE,function(n){var e,o=this,i=r.getSelectorFromElement(this);i&&(e=t(i)[0]);var a=t(e).data("bs.modal")?"toggle":t.extend({},t(e).data(),t(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||n.preventDefault();var s=t(e).one(l.SHOW,function(n){n.isDefaultPrevented()||s.one(l.HIDDEN,function(){t(o).is(":visible")&&o.focus()})});c._jQueryInterface.call(t(e),a,this)}),t.fn[n]=c._jQueryInterface,t.fn[n].Constructor=c,t.fn[n].noConflict=function(){return t.fn[n]=i,c._jQueryInterface},c}(),m=function(){if(void 0===e)throw new Error("Bootstrap tooltips require Popper.js (https://popper.js.org)");var n="tooltip",i=".bs.tooltip",a=t.fn[n],s=new RegExp("(^|\\s)bs-tooltip\\S+","g"),l={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)"},d={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},p={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip"},c={SHOW:"show",OUT:"out"},m={HIDE:"hide"+i,HIDDEN:"hidden"+i,SHOW:"show"+i,SHOWN:"shown"+i,INSERTED:"inserted"+i,CLICK:"click"+i,FOCUSIN:"focusin"+i,FOCUSOUT:"focusout"+i,MOUSEENTER:"mouseenter"+i,MOUSELEAVE:"mouseleave"+i},u={FADE:"fade",SHOW:"show"},f={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner",ARROW:".arrow"},g={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},h=function(){function Tooltip(n,t){this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=n,this.config=this._getConfig(t),this.tip=null,this._setListeners()}var a=Tooltip.prototype;return a.enable=function(){this._isEnabled=!0},a.disable=function(){this._isEnabled=!1},a.toggleEnabled=function(){this._isEnabled=!this._isEnabled},a.toggle=function(n){if(this._isEnabled)if(n){var e=this.constructor.DATA_KEY,r=t(n.currentTarget).data(e);r||(r=new this.constructor(n.currentTarget,this._getDelegateConfig()),t(n.currentTarget).data(e,r)),r._activeTrigger.click=!r._activeTrigger.click,r._isWithActiveTrigger()?r._enter(null,r):r._leave(null,r)}else{if(t(this.getTipElement()).hasClass(u.SHOW))return void this._leave(null,this);this._enter(null,this)}},a.dispose=function(){clearTimeout(this._timeout),t.removeData(this.element,this.constructor.DATA_KEY),t(this.element).off(this.constructor.EVENT_KEY),t(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&t(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,null!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},a.show=function(){var n=this;if("none"===t(this.element).css("display"))throw new Error("Please use show on visible elements");var o=t.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){t(this.element).trigger(o);var i=t.contains(this.element.ownerDocument.documentElement,this.element);if(o.isDefaultPrevented()||!i)return;var a=this.getTipElement(),s=r.getUID(this.constructor.NAME);a.setAttribute("id",s),this.element.setAttribute("aria-describedby",s),this.setContent(),this.config.animation&&t(a).addClass(u.FADE);var l="function"==typeof this.config.placement?this.config.placement.call(this,a,this.element):this.config.placement,d=this._getAttachment(l);this.addAttachmentClass(d);var p=!1===this.config.container?document.body:t(this.config.container);t(a).data(this.constructor.DATA_KEY,this),t.contains(this.element.ownerDocument.documentElement,this.tip)||t(a).appendTo(p),t(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new e(this.element,a,{placement:d,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:f.ARROW}},onCreate:function(t){t.originalPlacement!==t.placement&&n._handlePopperPlacementChange(t)},onUpdate:function(t){n._handlePopperPlacementChange(t)}}),t(a).addClass(u.SHOW),"ontouchstart"in document.documentElement&&t("body").children().on("mouseover",null,t.noop);var m=function(){n.config.animation&&n._fixTransition();var e=n._hoverState;n._hoverState=null,t(n.element).trigger(n.constructor.Event.SHOWN),e===c.OUT&&n._leave(null,n)};r.supportsTransitionEnd()&&t(this.tip).hasClass(u.FADE)?t(this.tip).one(r.TRANSITION_END,m).emulateTransitionEnd(Tooltip._TRANSITION_DURATION):m()}},a.hide=function(n){var e=this,o=this.getTipElement(),i=t.Event(this.constructor.Event.HIDE),a=function(){e._hoverState!==c.SHOW&&o.parentNode&&o.parentNode.removeChild(o),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),t(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),n&&n()};t(this.element).trigger(i),i.isDefaultPrevented()||(t(o).removeClass(u.SHOW),"ontouchstart"in document.documentElement&&t("body").children().off("mouseover",null,t.noop),this._activeTrigger[g.CLICK]=!1,this._activeTrigger[g.FOCUS]=!1,this._activeTrigger[g.HOVER]=!1,r.supportsTransitionEnd()&&t(this.tip).hasClass(u.FADE)?t(o).one(r.TRANSITION_END,a).emulateTransitionEnd(150):a(),this._hoverState="")},a.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},a.isWithContent=function(){return Boolean(this.getTitle())},a.addAttachmentClass=function(n){t(this.getTipElement()).addClass("bs-tooltip-"+n)},a.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},a.setContent=function(){var n=t(this.getTipElement());this.setElementContent(n.find(f.TOOLTIP_INNER),this.getTitle()),n.removeClass(u.FADE+" "+u.SHOW)},a.setElementContent=function(n,e){var r=this.config.html;"object"==typeof e&&(e.nodeType||e.jquery)?r?t(e).parent().is(n)||n.empty().append(e):n.text(t(e).text()):n[r?"html":"text"](e)},a.getTitle=function(){var n=this.element.getAttribute("data-original-title");return n||(n="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),n},a._getAttachment=function(n){return d[n.toUpperCase()]},a._setListeners=function(){var n=this;this.config.trigger.split(" ").forEach(function(e){if("click"===e)t(n.element).on(n.constructor.Event.CLICK,n.config.selector,function(t){return n.toggle(t)});else if(e!==g.MANUAL){var r=e===g.HOVER?n.constructor.Event.MOUSEENTER:n.constructor.Event.FOCUSIN,o=e===g.HOVER?n.constructor.Event.MOUSELEAVE:n.constructor.Event.FOCUSOUT;t(n.element).on(r,n.config.selector,function(t){return n._enter(t)}).on(o,n.config.selector,function(t){return n._leave(t)})}t(n.element).closest(".modal").on("hide.bs.modal",function(){return n.hide()})}),this.config.selector?this.config=t.extend({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},a._fixTitle=function(){var n=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==n)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},a._enter=function(n,e){var r=this.constructor.DATA_KEY;return e=e||t(n.currentTarget).data(r),e||(e=new this.constructor(n.currentTarget,this._getDelegateConfig()),t(n.currentTarget).data(r,e)),n&&(e._activeTrigger["focusin"===n.type?g.FOCUS:g.HOVER]=!0),t(e.getTipElement()).hasClass(u.SHOW)||e._hoverState===c.SHOW?void(e._hoverState=c.SHOW):(clearTimeout(e._timeout),e._hoverState=c.SHOW,e.config.delay&&e.config.delay.show?void(e._timeout=setTimeout(function(){e._hoverState===c.SHOW&&e.show()},e.config.delay.show)):void e.show())},a._leave=function(n,e){var r=this.constructor.DATA_KEY;if(e=e||t(n.currentTarget).data(r),e||(e=new this.constructor(n.currentTarget,this._getDelegateConfig()),t(n.currentTarget).data(r,e)),n&&(e._activeTrigger["focusout"===n.type?g.FOCUS:g.HOVER]=!1),!e._isWithActiveTrigger()){if(clearTimeout(e._timeout),e._hoverState=c.OUT,!e.config.delay||!e.config.delay.hide)return void e.hide();e._timeout=setTimeout(function(){e._hoverState===c.OUT&&e.hide()},e.config.delay.hide)}},a._isWithActiveTrigger=function(){for(var n in this._activeTrigger)if(this._activeTrigger[n])return!0;return!1},a._getConfig=function(e){return e=t.extend({},this.constructor.Default,t(this.element).data(),e),"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),r.typeCheckConfig(n,e,this.constructor.DefaultType),e},a._getDelegateConfig=function(){var n={};if(this.config)for(var t in this.config)this.constructor.Default[t]!==this.config[t]&&(n[t]=this.config[t]);return n},a._cleanTipClass=function(){var n=t(this.getTipElement()),e=n.attr("class").match(s);null!==e&&e.length>0&&n.removeClass(e.join(""))},a._handlePopperPlacementChange=function(n){this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(n.placement))},a._fixTransition=function(){var n=this.getTipElement(),e=this.config.animation;null===n.getAttribute("x-placement")&&(t(n).removeClass(u.FADE),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},Tooltip._jQueryInterface=function(n){return this.each(function(){var e=t(this).data("bs.tooltip"),r="object"==typeof n&&n;if((e||!/dispose|hide/.test(n))&&(e||(e=new Tooltip(this,r),t(this).data("bs.tooltip",e)),"string"==typeof n)){if(void 0===e[n])throw new Error('No method named "'+n+'"');e[n]()}})},o(Tooltip,null,[{key:"VERSION",get:function(){return"4.0.0-beta.2"}},{key:"Default",get:function(){return p}},{key:"NAME",get:function(){return n}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return m}},{key:"EVENT_KEY",get:function(){return i}},{key:"DefaultType",get:function(){return l}}]),Tooltip}();return t.fn[n]=h._jQueryInterface,t.fn[n].Constructor=h,t.fn[n].noConflict=function(){return t.fn[n]=a,h._jQueryInterface},h}(),u=function(){var n="popover",e=".bs.popover",r=t.fn[n],a=new RegExp("(^|\\s)bs-popover\\S+","g"),s=t.extend({},m.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),l=t.extend({},m.DefaultType,{content:"(string|element|function)"}),d={FADE:"fade",SHOW:"show"},p={TITLE:".popover-header",CONTENT:".popover-body"},c={HIDE:"hide"+e,HIDDEN:"hidden"+e,SHOW:"show"+e,SHOWN:"shown"+e,INSERTED:"inserted"+e,CLICK:"click"+e,FOCUSIN:"focusin"+e,FOCUSOUT:"focusout"+e,MOUSEENTER:"mouseenter"+e,MOUSELEAVE:"mouseleave"+e},u=function(r){function Popover(){return r.apply(this,arguments)||this}i(Popover,r);var m=Popover.prototype;return m.isWithContent=function(){return this.getTitle()||this._getContent()},m.addAttachmentClass=function(n){t(this.getTipElement()).addClass("bs-popover-"+n)},m.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},m.setContent=function(){var n=t(this.getTipElement());this.setElementContent(n.find(p.TITLE),this.getTitle()),this.setElementContent(n.find(p.CONTENT),this._getContent()),n.removeClass(d.FADE+" "+d.SHOW)},m._getContent=function(){return this.element.getAttribute("data-content")||("function"==typeof this.config.content?this.config.content.call(this.element):this.config.content)},m._cleanTipClass=function(){var n=t(this.getTipElement()),e=n.attr("class").match(a);null!==e&&e.length>0&&n.removeClass(e.join(""))},Popover._jQueryInterface=function(n){return this.each(function(){var e=t(this).data("bs.popover"),r="object"==typeof n?n:null;if((e||!/destroy|hide/.test(n))&&(e||(e=new Popover(this,r),t(this).data("bs.popover",e)),"string"==typeof n)){if(void 0===e[n])throw new Error('No method named "'+n+'"');e[n]()}})},o(Popover,null,[{key:"VERSION",get:function(){return"4.0.0-beta.2"}},{key:"Default",get:function(){return s}},{key:"NAME",get:function(){return n}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return c}},{key:"EVENT_KEY",get:function(){return e}},{key:"DefaultType",get:function(){return l}}]),Popover}(m);return t.fn[n]=u._jQueryInterface,t.fn[n].Constructor=u,t.fn[n].noConflict=function(){return t.fn[n]=r,u._jQueryInterface},u}(),f=function(){var n="scrollspy",e=t.fn[n],i={offset:10,method:"auto",target:""},a={offset:"number",method:"string",target:"(string|element)"},s={ACTIVATE:"activate.bs.scrollspy",SCROLL:"scroll.bs.scrollspy",LOAD_DATA_API:"load.bs.scrollspy.data-api"},l={DROPDOWN_ITEM:"dropdown-item",DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active"},d={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",NAV_LIST_GROUP:".nav, .list-group",NAV_LINKS:".nav-link",NAV_ITEMS:".nav-item",LIST_ITEMS:".list-group-item",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},p={OFFSET:"offset",POSITION:"position"},c=function(){function ScrollSpy(n,e){var r=this;this._element=n,this._scrollElement="BODY"===n.tagName?window:n,this._config=this._getConfig(e),this._selector=this._config.target+" "+d.NAV_LINKS+","+this._config.target+" "+d.LIST_ITEMS+","+this._config.target+" "+d.DROPDOWN_ITEMS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,t(this._scrollElement).on(s.SCROLL,function(n){return r._process(n)}),this.refresh(),this._process()}var e=ScrollSpy.prototype;return e.refresh=function(){var n=this,e=this._scrollElement!==this._scrollElement.window?p.POSITION:p.OFFSET,o="auto"===this._config.method?e:this._config.method,i=o===p.POSITION?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),t.makeArray(t(this._selector)).map(function(n){var e,a=r.getSelectorFromElement(n);if(a&&(e=t(a)[0]),e){var s=e.getBoundingClientRect();if(s.width||s.height)return[t(e)[o]().top+i,a]}return null}).filter(function(n){return n}).sort(function(n,t){return n[0]-t[0]}).forEach(function(t){n._offsets.push(t[0]),n._targets.push(t[1])})},e.dispose=function(){t.removeData(this._element,"bs.scrollspy"),t(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},e._getConfig=function(e){if(e=t.extend({},i,e),"string"!=typeof e.target){var o=t(e.target).attr("id");o||(o=r.getUID(n),t(e.target).attr("id",o)),e.target="#"+o}return r.typeCheckConfig(n,e,a),e},e._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},e._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},e._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},e._process=function(){var n=this._getScrollTop()+this._config.offset,t=this._getScrollHeight(),e=this._config.offset+t-this._getOffsetHeight();if(this._scrollHeight!==t&&this.refresh(),n>=e){var r=this._targets[this._targets.length-1];return void(this._activeTarget!==r&&this._activate(r))}if(this._activeTarget&&n<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;){this._activeTarget!==this._targets[o]&&n>=this._offsets[o]&&(void 0===this._offsets[o+1]||n<this._offsets[o+1])&&this._activate(this._targets[o])}},e._activate=function(n){this._activeTarget=n,this._clear();var e=this._selector.split(",");e=e.map(function(t){return t+'[data-target="'+n+'"],'+t+'[href="'+n+'"]'});var r=t(e.join(","));r.hasClass(l.DROPDOWN_ITEM)?(r.closest(d.DROPDOWN).find(d.DROPDOWN_TOGGLE).addClass(l.ACTIVE),r.addClass(l.ACTIVE)):(r.addClass(l.ACTIVE),r.parents(d.NAV_LIST_GROUP).prev(d.NAV_LINKS+", "+d.LIST_ITEMS).addClass(l.ACTIVE),r.parents(d.NAV_LIST_GROUP).prev(d.NAV_ITEMS).children(d.NAV_LINKS).addClass(l.ACTIVE)),t(this._scrollElement).trigger(s.ACTIVATE,{relatedTarget:n})},e._clear=function(){t(this._selector).filter(d.ACTIVE).removeClass(l.ACTIVE)},ScrollSpy._jQueryInterface=function(n){return this.each(function(){var e=t(this).data("bs.scrollspy"),r="object"==typeof n&&n;if(e||(e=new ScrollSpy(this,r),t(this).data("bs.scrollspy",e)),"string"==typeof n){if(void 0===e[n])throw new Error('No method named "'+n+'"');e[n]()}})},o(ScrollSpy,null,[{key:"VERSION",get:function(){return"4.0.0-beta.2"}},{key:"Default",get:function(){return i}}]),ScrollSpy}();return t(window).on(s.LOAD_DATA_API,function(){for(var n=t.makeArray(t(d.DATA_SPY)),e=n.length;e--;){var r=t(n[e]);c._jQueryInterface.call(r,r.data())}}),t.fn[n]=c._jQueryInterface,t.fn[n].Constructor=c,t.fn[n].noConflict=function(){return t.fn[n]=e,c._jQueryInterface},c}(),g=function(){var n=t.fn.tab,e={HIDE:"hide.bs.tab",HIDDEN:"hidden.bs.tab",SHOW:"show.bs.tab",SHOWN:"shown.bs.tab",CLICK_DATA_API:"click.bs.tab.data-api"},i={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",DISABLED:"disabled",FADE:"fade",SHOW:"show"},a={DROPDOWN:".dropdown",NAV_LIST_GROUP:".nav, .list-group",ACTIVE:".active",ACTIVE_UL:"> li > .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},s=function(){function Tab(n){this._element=n}var n=Tab.prototype;return n.show=function(){var n=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&t(this._element).hasClass(i.ACTIVE)||t(this._element).hasClass(i.DISABLED))){var o,s,l=t(this._element).closest(a.NAV_LIST_GROUP)[0],d=r.getSelectorFromElement(this._element);if(l){var p="UL"===l.nodeName?a.ACTIVE_UL:a.ACTIVE;s=t.makeArray(t(l).find(p)),s=s[s.length-1]}var c=t.Event(e.HIDE,{relatedTarget:this._element}),m=t.Event(e.SHOW,{relatedTarget:s});if(s&&t(s).trigger(c),t(this._element).trigger(m),!m.isDefaultPrevented()&&!c.isDefaultPrevented()){d&&(o=t(d)[0]),this._activate(this._element,l);var u=function(){var r=t.Event(e.HIDDEN,{relatedTarget:n._element}),o=t.Event(e.SHOWN,{relatedTarget:s});t(s).trigger(r),t(n._element).trigger(o)};o?this._activate(o,o.parentNode,u):u()}}},n.dispose=function(){t.removeData(this._element,"bs.tab"),this._element=null},n._activate=function(n,e,o){var s,l=this;s="UL"===e.nodeName?t(e).find(a.ACTIVE_UL):t(e).children(a.ACTIVE);var d=s[0],p=o&&r.supportsTransitionEnd()&&d&&t(d).hasClass(i.FADE),c=function(){return l._transitionComplete(n,d,p,o)};d&&p?t(d).one(r.TRANSITION_END,c).emulateTransitionEnd(150):c(),d&&t(d).removeClass(i.SHOW)},n._transitionComplete=function(n,e,o,s){if(e){t(e).removeClass(i.ACTIVE);var l=t(e.parentNode).find(a.DROPDOWN_ACTIVE_CHILD)[0];l&&t(l).removeClass(i.ACTIVE),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}if(t(n).addClass(i.ACTIVE),"tab"===n.getAttribute("role")&&n.setAttribute("aria-selected",!0),o?(r.reflow(n),t(n).addClass(i.SHOW)):t(n).removeClass(i.FADE),n.parentNode&&t(n.parentNode).hasClass(i.DROPDOWN_MENU)){var d=t(n).closest(a.DROPDOWN)[0];d&&t(d).find(a.DROPDOWN_TOGGLE).addClass(i.ACTIVE),n.setAttribute("aria-expanded",!0)}s&&s()},Tab._jQueryInterface=function(n){return this.each(function(){var e=t(this),r=e.data("bs.tab");if(r||(r=new Tab(this),e.data("bs.tab",r)),"string"==typeof n){if(void 0===r[n])throw new Error('No method named "'+n+'"');r[n]()}})},o(Tab,null,[{key:"VERSION",get:function(){return"4.0.0-beta.2"}}]),Tab}();return t(document).on(e.CLICK_DATA_API,a.DATA_TOGGLE,function(n){n.preventDefault(),s._jQueryInterface.call(t(this),"show")}),t.fn.tab=s._jQueryInterface,t.fn.tab.Constructor=s,t.fn.tab.noConflict=function(){return t.fn.tab=n,s._jQueryInterface},s}();(function(){if(void 0===t)throw new Error("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var n=t.fn.jquery.split(" ")[0].split(".");if(n[0]<2&&n[1]<9||1===n[0]&&9===n[1]&&n[2]<1||n[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")})(),n.Util=r,n.Alert=a,n.Button=s,n.Carousel=l,n.Collapse=d,n.Dropdown=p,n.Modal=c,n.Popover=u,n.Scrollspy=f,n.Tab=g,n.Tooltip=m}({},n,t)}).call(t,e(148),e(477).default)},470:function(n,t,e){t=n.exports=e(471)(void 0),t.push([n.i,'/*!\n * Bootstrap v4.0.0-beta.2 (https://getbootstrap.com)\n * Copyright 2011-2017 The Bootstrap Authors\n * Copyright 2011-2017 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n:root {\n --blue: #007bff;\n --indigo: #6610f2;\n --purple: #6f42c1;\n --pink: #e83e8c;\n --red: #dc3545;\n --orange: #fd7e14;\n --yellow: #ffc107;\n --green: #28a745;\n --teal: #20c997;\n --cyan: #17a2b8;\n --white: #fff;\n --gray: #868e96;\n --gray-dark: #343a40;\n --primary: #007bff;\n --secondary: #868e96;\n --success: #28a745;\n --info: #17a2b8;\n --warning: #ffc107;\n --danger: #dc3545;\n --light: #f8f9fa;\n --dark: #343a40;\n --breakpoint-xs: 0;\n --breakpoint-sm: 576px;\n --breakpoint-md: 768px;\n --breakpoint-lg: 992px;\n --breakpoint-xl: 1200px;\n --font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n --font-family-monospace: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }\n\n@media print {\n *,\n *::before,\n *::after {\n text-shadow: none !important;\n box-shadow: none !important; }\n a,\n a:visited {\n text-decoration: underline; }\n abbr[title]::after {\n content: " (" attr(title) ")"; }\n pre {\n white-space: pre-wrap !important; }\n pre,\n blockquote {\n border: 1px solid #999;\n page-break-inside: avoid; }\n thead {\n display: table-header-group; }\n tr,\n img {\n page-break-inside: avoid; }\n p,\n h2,\n h3 {\n orphans: 3;\n widows: 3; }\n h2,\n h3 {\n page-break-after: avoid; }\n .navbar {\n display: none; }\n .badge {\n border: 1px solid #000; }\n .table {\n border-collapse: collapse !important; }\n .table td,\n .table th {\n background-color: #fff !important; }\n .table-bordered th,\n .table-bordered td {\n border: 1px solid #ddd !important; } }\n\n*,\n*::before,\n*::after {\n box-sizing: border-box; }\n\nhtml {\n font-family: sans-serif;\n line-height: 1.15;\n -webkit-text-size-adjust: 100%;\n -ms-text-size-adjust: 100%;\n -ms-overflow-style: scrollbar;\n -webkit-tap-highlight-color: transparent; }\n\n@-ms-viewport {\n width: device-width; }\n\narticle, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section {\n display: block; }\n\nbody {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.5;\n color: #212529;\n text-align: left;\n background-color: #fff; }\n\n[tabindex="-1"]:focus {\n outline: none !important; }\n\nhr {\n box-sizing: content-box;\n height: 0;\n overflow: visible; }\n\nh1, h2, h3, h4, h5, h6 {\n margin-top: 0;\n margin-bottom: 0.5rem; }\n\np {\n margin-top: 0;\n margin-bottom: 1rem; }\n\nabbr[title],\nabbr[data-original-title] {\n text-decoration: underline;\n text-decoration: underline dotted;\n cursor: help;\n border-bottom: 0; }\n\naddress {\n margin-bottom: 1rem;\n font-style: normal;\n line-height: inherit; }\n\nol,\nul,\ndl {\n margin-top: 0;\n margin-bottom: 1rem; }\n\nol ol,\nul ul,\nol ul,\nul ol {\n margin-bottom: 0; }\n\ndt {\n font-weight: 700; }\n\ndd {\n margin-bottom: .5rem;\n margin-left: 0; }\n\nblockquote {\n margin: 0 0 1rem; }\n\ndfn {\n font-style: italic; }\n\nb,\nstrong {\n font-weight: bolder; }\n\nsmall {\n font-size: 80%; }\n\nsub,\nsup {\n position: relative;\n font-size: 75%;\n line-height: 0;\n vertical-align: baseline; }\n\nsub {\n bottom: -.25em; }\n\nsup {\n top: -.5em; }\n\na {\n color: #007bff;\n text-decoration: none;\n background-color: transparent;\n -webkit-text-decoration-skip: objects; }\n a:hover {\n color: #0056b3;\n text-decoration: underline; }\n\na:not([href]):not([tabindex]) {\n color: inherit;\n text-decoration: none; }\n a:not([href]):not([tabindex]):focus, a:not([href]):not([tabindex]):hover {\n color: inherit;\n text-decoration: none; }\n a:not([href]):not([tabindex]):focus {\n outline: 0; }\n\npre,\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em; }\n\npre {\n margin-top: 0;\n margin-bottom: 1rem;\n overflow: auto;\n -ms-overflow-style: scrollbar; }\n\nfigure {\n margin: 0 0 1rem; }\n\nimg {\n vertical-align: middle;\n border-style: none; }\n\nsvg:not(:root) {\n overflow: hidden; }\n\na,\narea,\nbutton,\n[role="button"],\ninput:not([type="range"]),\nlabel,\nselect,\nsummary,\ntextarea {\n touch-action: manipulation; }\n\ntable {\n border-collapse: collapse; }\n\ncaption {\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n color: #868e96;\n text-align: left;\n caption-side: bottom; }\n\nth {\n text-align: inherit; }\n\nlabel {\n display: inline-block;\n margin-bottom: .5rem; }\n\nbutton {\n border-radius: 0; }\n\nbutton:focus {\n outline: 1px dotted;\n outline: 5px auto -webkit-focus-ring-color; }\n\ninput,\nbutton,\nselect,\noptgroup,\ntextarea {\n margin: 0;\n font-family: inherit;\n font-size: inherit;\n line-height: inherit; }\n\nbutton,\ninput {\n overflow: visible; }\n\nbutton,\nselect {\n text-transform: none; }\n\nbutton,\nhtml [type="button"],\n[type="reset"],\n[type="submit"] {\n -webkit-appearance: button; }\n\nbutton::-moz-focus-inner,\n[type="button"]::-moz-focus-inner,\n[type="reset"]::-moz-focus-inner,\n[type="submit"]::-moz-focus-inner {\n padding: 0;\n border-style: none; }\n\ninput[type="radio"],\ninput[type="checkbox"] {\n box-sizing: border-box;\n padding: 0; }\n\ninput[type="date"],\ninput[type="time"],\ninput[type="datetime-local"],\ninput[type="month"] {\n -webkit-appearance: listbox; }\n\ntextarea {\n overflow: auto;\n resize: vertical; }\n\nfieldset {\n min-width: 0;\n padding: 0;\n margin: 0;\n border: 0; }\n\nlegend {\n display: block;\n width: 100%;\n max-width: 100%;\n padding: 0;\n margin-bottom: .5rem;\n font-size: 1.5rem;\n line-height: inherit;\n color: inherit;\n white-space: normal; }\n\nprogress {\n vertical-align: baseline; }\n\n[type="number"]::-webkit-inner-spin-button,\n[type="number"]::-webkit-outer-spin-button {\n height: auto; }\n\n[type="search"] {\n outline-offset: -2px;\n -webkit-appearance: none; }\n\n[type="search"]::-webkit-search-cancel-button,\n[type="search"]::-webkit-search-decoration {\n -webkit-appearance: none; }\n\n::-webkit-file-upload-button {\n font: inherit;\n -webkit-appearance: button; }\n\noutput {\n display: inline-block; }\n\nsummary {\n display: list-item; }\n\ntemplate {\n display: none; }\n\n[hidden] {\n display: none !important; }\n\nh1, h2, h3, h4, h5, h6,\n.h1, .h2, .h3, .h4, .h5, .h6 {\n margin-bottom: 0.5rem;\n font-family: inherit;\n font-weight: 500;\n line-height: 1.2;\n color: inherit; }\n\nh1, .h1 {\n font-size: 2.5rem; }\n\nh2, .h2 {\n font-size: 2rem; }\n\nh3, .h3 {\n font-size: 1.75rem; }\n\nh4, .h4 {\n font-size: 1.5rem; }\n\nh5, .h5 {\n font-size: 1.25rem; }\n\nh6, .h6 {\n font-size: 1rem; }\n\n.lead {\n font-size: 1.25rem;\n font-weight: 300; }\n\n.display-1 {\n font-size: 6rem;\n font-weight: 300;\n line-height: 1.2; }\n\n.display-2 {\n font-size: 5.5rem;\n font-weight: 300;\n line-height: 1.2; }\n\n.display-3 {\n font-size: 4.5rem;\n font-weight: 300;\n line-height: 1.2; }\n\n.display-4 {\n font-size: 3.5rem;\n font-weight: 300;\n line-height: 1.2; }\n\nhr {\n margin-top: 1rem;\n margin-bottom: 1rem;\n border: 0;\n border-top: 1px solid rgba(0, 0, 0, 0.1); }\n\nsmall,\n.small {\n font-size: 80%;\n font-weight: 400; }\n\nmark,\n.mark {\n padding: 0.2em;\n background-color: #fcf8e3; }\n\n.list-unstyled {\n padding-left: 0;\n list-style: none; }\n\n.list-inline {\n padding-left: 0;\n list-style: none; }\n\n.list-inline-item {\n display: inline-block; }\n .list-inline-item:not(:last-child) {\n margin-right: 5px; }\n\n.initialism {\n font-size: 90%;\n text-transform: uppercase; }\n\n.blockquote {\n margin-bottom: 1rem;\n font-size: 1.25rem; }\n\n.blockquote-footer {\n display: block;\n font-size: 80%;\n color: #868e96; }\n .blockquote-footer::before {\n content: "\\2014 \\A0"; }\n\n.img-fluid {\n max-width: 100%;\n height: auto; }\n\n.img-thumbnail {\n padding: 0.25rem;\n background-color: #fff;\n border: 1px solid #ddd;\n border-radius: 0.25rem;\n transition: all 0.2s ease-in-out;\n max-width: 100%;\n height: auto; }\n\n.figure {\n display: inline-block; }\n\n.figure-img {\n margin-bottom: 0.5rem;\n line-height: 1; }\n\n.figure-caption {\n font-size: 90%;\n color: #868e96; }\n\ncode,\nkbd,\npre,\nsamp {\n font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }\n\ncode {\n padding: 0.2rem 0.4rem;\n font-size: 90%;\n color: #bd4147;\n background-color: #f8f9fa;\n border-radius: 0.25rem; }\n a > code {\n padding: 0;\n color: inherit;\n background-color: inherit; }\n\nkbd {\n padding: 0.2rem 0.4rem;\n font-size: 90%;\n color: #fff;\n background-color: #212529;\n border-radius: 0.2rem; }\n kbd kbd {\n padding: 0;\n font-size: 100%;\n font-weight: 700; }\n\npre {\n display: block;\n margin-top: 0;\n margin-bottom: 1rem;\n font-size: 90%;\n color: #212529; }\n pre code {\n padding: 0;\n font-size: inherit;\n color: inherit;\n background-color: transparent;\n border-radius: 0; }\n\n.pre-scrollable {\n max-height: 340px;\n overflow-y: scroll; }\n\n.container {\n width: 100%;\n padding-right: 15px;\n padding-left: 15px;\n margin-right: auto;\n margin-left: auto; }\n @media (min-width: 576px) {\n .container {\n max-width: 540px; } }\n @media (min-width: 768px) {\n .container {\n max-width: 720px; } }\n @media (min-width: 992px) {\n .container {\n max-width: 960px; } }\n @media (min-width: 1200px) {\n .container {\n max-width: 1140px; } }\n\n.container-fluid {\n width: 100%;\n padding-right: 15px;\n padding-left: 15px;\n margin-right: auto;\n margin-left: auto; }\n\n.row {\n display: flex;\n flex-wrap: wrap;\n margin-right: -15px;\n margin-left: -15px; }\n\n.no-gutters {\n margin-right: 0;\n margin-left: 0; }\n .no-gutters > .col,\n .no-gutters > [class*="col-"] {\n padding-right: 0;\n padding-left: 0; }\n\n.col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12, .col,\n.col-auto, .col-sm-1, .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-sm-10, .col-sm-11, .col-sm-12, .col-sm,\n.col-sm-auto, .col-md-1, .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-md-10, .col-md-11, .col-md-12, .col-md,\n.col-md-auto, .col-lg-1, .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-lg-10, .col-lg-11, .col-lg-12, .col-lg,\n.col-lg-auto, .col-xl-1, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-10, .col-xl-11, .col-xl-12, .col-xl,\n.col-xl-auto {\n position: relative;\n width: 100%;\n min-height: 1px;\n padding-right: 15px;\n padding-left: 15px; }\n\n.col {\n flex-basis: 0;\n flex-grow: 1;\n max-width: 100%; }\n\n.col-auto {\n flex: 0 0 auto;\n width: auto;\n max-width: none; }\n\n.col-1 {\n flex: 0 0 8.33333%;\n max-width: 8.33333%; }\n\n.col-2 {\n flex: 0 0 16.66667%;\n max-width: 16.66667%; }\n\n.col-3 {\n flex: 0 0 25%;\n max-width: 25%; }\n\n.col-4 {\n flex: 0 0 33.33333%;\n max-width: 33.33333%; }\n\n.col-5 {\n flex: 0 0 41.66667%;\n max-width: 41.66667%; }\n\n.col-6 {\n flex: 0 0 50%;\n max-width: 50%; }\n\n.col-7 {\n flex: 0 0 58.33333%;\n max-width: 58.33333%; }\n\n.col-8 {\n flex: 0 0 66.66667%;\n max-width: 66.66667%; }\n\n.col-9 {\n flex: 0 0 75%;\n max-width: 75%; }\n\n.col-10 {\n flex: 0 0 83.33333%;\n max-width: 83.33333%; }\n\n.col-11 {\n flex: 0 0 91.66667%;\n max-width: 91.66667%; }\n\n.col-12 {\n flex: 0 0 100%;\n max-width: 100%; }\n\n.order-first {\n order: -1; }\n\n.order-1 {\n order: 1; }\n\n.order-2 {\n order: 2; }\n\n.order-3 {\n order: 3; }\n\n.order-4 {\n order: 4; }\n\n.order-5 {\n order: 5; }\n\n.order-6 {\n order: 6; }\n\n.order-7 {\n order: 7; }\n\n.order-8 {\n order: 8; }\n\n.order-9 {\n order: 9; }\n\n.order-10 {\n order: 10; }\n\n.order-11 {\n order: 11; }\n\n.order-12 {\n order: 12; }\n\n.offset-1 {\n margin-left: 8.33333%; }\n\n.offset-2 {\n margin-left: 16.66667%; }\n\n.offset-3 {\n margin-left: 25%; }\n\n.offset-4 {\n margin-left: 33.33333%; }\n\n.offset-5 {\n margin-left: 41.66667%; }\n\n.offset-6 {\n margin-left: 50%; }\n\n.offset-7 {\n margin-left: 58.33333%; }\n\n.offset-8 {\n margin-left: 66.66667%; }\n\n.offset-9 {\n margin-left: 75%; }\n\n.offset-10 {\n margin-left: 83.33333%; }\n\n.offset-11 {\n margin-left: 91.66667%; }\n\n@media (min-width: 576px) {\n .col-sm {\n flex-basis: 0;\n flex-grow: 1;\n max-width: 100%; }\n .col-sm-auto {\n flex: 0 0 auto;\n width: auto;\n max-width: none; }\n .col-sm-1 {\n flex: 0 0 8.33333%;\n max-width: 8.33333%; }\n .col-sm-2 {\n flex: 0 0 16.66667%;\n max-width: 16.66667%; }\n .col-sm-3 {\n flex: 0 0 25%;\n max-width: 25%; }\n .col-sm-4 {\n flex: 0 0 33.33333%;\n max-width: 33.33333%; }\n .col-sm-5 {\n flex: 0 0 41.66667%;\n max-width: 41.66667%; }\n .col-sm-6 {\n flex: 0 0 50%;\n max-width: 50%; }\n .col-sm-7 {\n flex: 0 0 58.33333%;\n max-width: 58.33333%; }\n .col-sm-8 {\n flex: 0 0 66.66667%;\n max-width: 66.66667%; }\n .col-sm-9 {\n flex: 0 0 75%;\n max-width: 75%; }\n .col-sm-10 {\n flex: 0 0 83.33333%;\n max-width: 83.33333%; }\n .col-sm-11 {\n flex: 0 0 91.66667%;\n max-width: 91.66667%; }\n .col-sm-12 {\n flex: 0 0 100%;\n max-width: 100%; }\n .order-sm-first {\n order: -1; }\n .order-sm-1 {\n order: 1; }\n .order-sm-2 {\n order: 2; }\n .order-sm-3 {\n order: 3; }\n .order-sm-4 {\n order: 4; }\n .order-sm-5 {\n order: 5; }\n .order-sm-6 {\n order: 6; }\n .order-sm-7 {\n order: 7; }\n .order-sm-8 {\n order: 8; }\n .order-sm-9 {\n order: 9; }\n .order-sm-10 {\n order: 10; }\n .order-sm-11 {\n order: 11; }\n .order-sm-12 {\n order: 12; }\n .offset-sm-0 {\n margin-left: 0; }\n .offset-sm-1 {\n margin-left: 8.33333%; }\n .offset-sm-2 {\n margin-left: 16.66667%; }\n .offset-sm-3 {\n margin-left: 25%; }\n .offset-sm-4 {\n margin-left: 33.33333%; }\n .offset-sm-5 {\n margin-left: 41.66667%; }\n .offset-sm-6 {\n margin-left: 50%; }\n .offset-sm-7 {\n margin-left: 58.33333%; }\n .offset-sm-8 {\n margin-left: 66.66667%; }\n .offset-sm-9 {\n margin-left: 75%; }\n .offset-sm-10 {\n margin-left: 83.33333%; }\n .offset-sm-11 {\n margin-left: 91.66667%; } }\n\n@media (min-width: 768px) {\n .col-md {\n flex-basis: 0;\n flex-grow: 1;\n max-width: 100%; }\n .col-md-auto {\n flex: 0 0 auto;\n width: auto;\n max-width: none; }\n .col-md-1 {\n flex: 0 0 8.33333%;\n max-width: 8.33333%; }\n .col-md-2 {\n flex: 0 0 16.66667%;\n max-width: 16.66667%; }\n .col-md-3 {\n flex: 0 0 25%;\n max-width: 25%; }\n .col-md-4 {\n flex: 0 0 33.33333%;\n max-width: 33.33333%; }\n .col-md-5 {\n flex: 0 0 41.66667%;\n max-width: 41.66667%; }\n .col-md-6 {\n flex: 0 0 50%;\n max-width: 50%; }\n .col-md-7 {\n flex: 0 0 58.33333%;\n max-width: 58.33333%; }\n .col-md-8 {\n flex: 0 0 66.66667%;\n max-width: 66.66667%; }\n .col-md-9 {\n flex: 0 0 75%;\n max-width: 75%; }\n .col-md-10 {\n flex: 0 0 83.33333%;\n max-width: 83.33333%; }\n .col-md-11 {\n flex: 0 0 91.66667%;\n max-width: 91.66667%; }\n .col-md-12 {\n flex: 0 0 100%;\n max-width: 100%; }\n .order-md-first {\n order: -1; }\n .order-md-1 {\n order: 1; }\n .order-md-2 {\n order: 2; }\n .order-md-3 {\n order: 3; }\n .order-md-4 {\n order: 4; }\n .order-md-5 {\n order: 5; }\n .order-md-6 {\n order: 6; }\n .order-md-7 {\n order: 7; }\n .order-md-8 {\n order: 8; }\n .order-md-9 {\n order: 9; }\n .order-md-10 {\n order: 10; }\n .order-md-11 {\n order: 11; }\n .order-md-12 {\n order: 12; }\n .offset-md-0 {\n margin-left: 0; }\n .offset-md-1 {\n margin-left: 8.33333%; }\n .offset-md-2 {\n margin-left: 16.66667%; }\n .offset-md-3 {\n margin-left: 25%; }\n .offset-md-4 {\n margin-left: 33.33333%; }\n .offset-md-5 {\n margin-left: 41.66667%; }\n .offset-md-6 {\n margin-left: 50%; }\n .offset-md-7 {\n margin-left: 58.33333%; }\n .offset-md-8 {\n margin-left: 66.66667%; }\n .offset-md-9 {\n margin-left: 75%; }\n .offset-md-10 {\n margin-left: 83.33333%; }\n .offset-md-11 {\n margin-left: 91.66667%; } }\n\n@media (min-width: 992px) {\n .col-lg {\n flex-basis: 0;\n flex-grow: 1;\n max-width: 100%; }\n .col-lg-auto {\n flex: 0 0 auto;\n width: auto;\n max-width: none; }\n .col-lg-1 {\n flex: 0 0 8.33333%;\n max-width: 8.33333%; }\n .col-lg-2 {\n flex: 0 0 16.66667%;\n max-width: 16.66667%; }\n .col-lg-3 {\n flex: 0 0 25%;\n max-width: 25%; }\n .col-lg-4 {\n flex: 0 0 33.33333%;\n max-width: 33.33333%; }\n .col-lg-5 {\n flex: 0 0 41.66667%;\n max-width: 41.66667%; }\n .col-lg-6 {\n flex: 0 0 50%;\n max-width: 50%; }\n .col-lg-7 {\n flex: 0 0 58.33333%;\n max-width: 58.33333%; }\n .col-lg-8 {\n flex: 0 0 66.66667%;\n max-width: 66.66667%; }\n .col-lg-9 {\n flex: 0 0 75%;\n max-width: 75%; }\n .col-lg-10 {\n flex: 0 0 83.33333%;\n max-width: 83.33333%; }\n .col-lg-11 {\n flex: 0 0 91.66667%;\n max-width: 91.66667%; }\n .col-lg-12 {\n flex: 0 0 100%;\n max-width: 100%; }\n .order-lg-first {\n order: -1; }\n .order-lg-1 {\n order: 1; }\n .order-lg-2 {\n order: 2; }\n .order-lg-3 {\n order: 3; }\n .order-lg-4 {\n order: 4; }\n .order-lg-5 {\n order: 5; }\n .order-lg-6 {\n order: 6; }\n .order-lg-7 {\n order: 7; }\n .order-lg-8 {\n order: 8; }\n .order-lg-9 {\n order: 9; }\n .order-lg-10 {\n order: 10; }\n .order-lg-11 {\n order: 11; }\n .order-lg-12 {\n order: 12; }\n .offset-lg-0 {\n margin-left: 0; }\n .offset-lg-1 {\n margin-left: 8.33333%; }\n .offset-lg-2 {\n margin-left: 16.66667%; }\n .offset-lg-3 {\n margin-left: 25%; }\n .offset-lg-4 {\n margin-left: 33.33333%; }\n .offset-lg-5 {\n margin-left: 41.66667%; }\n .offset-lg-6 {\n margin-left: 50%; }\n .offset-lg-7 {\n margin-left: 58.33333%; }\n .offset-lg-8 {\n margin-left: 66.66667%; }\n .offset-lg-9 {\n margin-left: 75%; }\n .offset-lg-10 {\n margin-left: 83.33333%; }\n .offset-lg-11 {\n margin-left: 91.66667%; } }\n\n@media (min-width: 1200px) {\n .col-xl {\n flex-basis: 0;\n flex-grow: 1;\n max-width: 100%; }\n .col-xl-auto {\n flex: 0 0 auto;\n width: auto;\n max-width: none; }\n .col-xl-1 {\n flex: 0 0 8.33333%;\n max-width: 8.33333%; }\n .col-xl-2 {\n flex: 0 0 16.66667%;\n max-width: 16.66667%; }\n .col-xl-3 {\n flex: 0 0 25%;\n max-width: 25%; }\n .col-xl-4 {\n flex: 0 0 33.33333%;\n max-width: 33.33333%; }\n .col-xl-5 {\n flex: 0 0 41.66667%;\n max-width: 41.66667%; }\n .col-xl-6 {\n flex: 0 0 50%;\n max-width: 50%; }\n .col-xl-7 {\n flex: 0 0 58.33333%;\n max-width: 58.33333%; }\n .col-xl-8 {\n flex: 0 0 66.66667%;\n max-width: 66.66667%; }\n .col-xl-9 {\n flex: 0 0 75%;\n max-width: 75%; }\n .col-xl-10 {\n flex: 0 0 83.33333%;\n max-width: 83.33333%; }\n .col-xl-11 {\n flex: 0 0 91.66667%;\n max-width: 91.66667%; }\n .col-xl-12 {\n flex: 0 0 100%;\n max-width: 100%; }\n .order-xl-first {\n order: -1; }\n .order-xl-1 {\n order: 1; }\n .order-xl-2 {\n order: 2; }\n .order-xl-3 {\n order: 3; }\n .order-xl-4 {\n order: 4; }\n .order-xl-5 {\n order: 5; }\n .order-xl-6 {\n order: 6; }\n .order-xl-7 {\n order: 7; }\n .order-xl-8 {\n order: 8; }\n .order-xl-9 {\n order: 9; }\n .order-xl-10 {\n order: 10; }\n .order-xl-11 {\n order: 11; }\n .order-xl-12 {\n order: 12; }\n .offset-xl-0 {\n margin-left: 0; }\n .offset-xl-1 {\n margin-left: 8.33333%; }\n .offset-xl-2 {\n margin-left: 16.66667%; }\n .offset-xl-3 {\n margin-left: 25%; }\n .offset-xl-4 {\n margin-left: 33.33333%; }\n .offset-xl-5 {\n margin-left: 41.66667%; }\n .offset-xl-6 {\n margin-left: 50%; }\n .offset-xl-7 {\n margin-left: 58.33333%; }\n .offset-xl-8 {\n margin-left: 66.66667%; }\n .offset-xl-9 {\n margin-left: 75%; }\n .offset-xl-10 {\n margin-left: 83.33333%; }\n .offset-xl-11 {\n margin-left: 91.66667%; } }\n\n.table {\n width: 100%;\n max-width: 100%;\n margin-bottom: 1rem;\n background-color: transparent; }\n .table th,\n .table td {\n padding: 0.75rem;\n vertical-align: top;\n border-top: 1px solid #e9ecef; }\n .table thead th {\n vertical-align: bottom;\n border-bottom: 2px solid #e9ecef; }\n .table tbody + tbody {\n border-top: 2px solid #e9ecef; }\n .table .table {\n background-color: #fff; }\n\n.table-sm th,\n.table-sm td {\n padding: 0.3rem; }\n\n.table-bordered {\n border: 1px solid #e9ecef; }\n .table-bordered th,\n .table-bordered td {\n border: 1px solid #e9ecef; }\n .table-bordered thead th,\n .table-bordered thead td {\n border-bottom-width: 2px; }\n\n.table-striped tbody tr:nth-of-type(odd) {\n background-color: rgba(0, 0, 0, 0.05); }\n\n.table-hover tbody tr:hover {\n background-color: rgba(0, 0, 0, 0.075); }\n\n.table-primary,\n.table-primary > th,\n.table-primary > td {\n background-color: #b8daff; }\n\n.table-hover .table-primary:hover {\n background-color: #9fcdff; }\n .table-hover .table-primary:hover > td,\n .table-hover .table-primary:hover > th {\n background-color: #9fcdff; }\n\n.table-secondary,\n.table-secondary > th,\n.table-secondary > td {\n background-color: #dddfe2; }\n\n.table-hover .table-secondary:hover {\n background-color: #cfd2d6; }\n .table-hover .table-secondary:hover > td,\n .table-hover .table-secondary:hover > th {\n background-color: #cfd2d6; }\n\n.table-success,\n.table-success > th,\n.table-success > td {\n background-color: #c3e6cb; }\n\n.table-hover .table-success:hover {\n background-color: #b1dfbb; }\n .table-hover .table-success:hover > td,\n .table-hover .table-success:hover > th {\n background-color: #b1dfbb; }\n\n.table-info,\n.table-info > th,\n.table-info > td {\n background-color: #bee5eb; }\n\n.table-hover .table-info:hover {\n background-color: #abdde5; }\n .table-hover .table-info:hover > td,\n .table-hover .table-info:hover > th {\n background-color: #abdde5; }\n\n.table-warning,\n.table-warning > th,\n.table-warning > td {\n background-color: #ffeeba; }\n\n.table-hover .table-warning:hover {\n background-color: #ffe8a1; }\n .table-hover .table-warning:hover > td,\n .table-hover .table-warning:hover > th {\n background-color: #ffe8a1; }\n\n.table-danger,\n.table-danger > th,\n.table-danger > td {\n background-color: #f5c6cb; }\n\n.table-hover .table-danger:hover {\n background-color: #f1b0b7; }\n .table-hover .table-danger:hover > td,\n .table-hover .table-danger:hover > th {\n background-color: #f1b0b7; }\n\n.table-light,\n.table-light > th,\n.table-light > td {\n background-color: #fdfdfe; }\n\n.table-hover .table-light:hover {\n background-color: #ececf6; }\n .table-hover .table-light:hover > td,\n .table-hover .table-light:hover > th {\n background-color: #ececf6; }\n\n.table-dark,\n.table-dark > th,\n.table-dark > td {\n background-color: #c6c8ca; }\n\n.table-hover .table-dark:hover {\n background-color: #b9bbbe; }\n .table-hover .table-dark:hover > td,\n .table-hover .table-dark:hover > th {\n background-color: #b9bbbe; }\n\n.table-active,\n.table-active > th,\n.table-active > td {\n background-color: rgba(0, 0, 0, 0.075); }\n\n.table-hover .table-active:hover {\n background-color: rgba(0, 0, 0, 0.075); }\n .table-hover .table-active:hover > td,\n .table-hover .table-active:hover > th {\n background-color: rgba(0, 0, 0, 0.075); }\n\n.table .thead-dark th {\n color: #fff;\n background-color: #212529;\n border-color: #32383e; }\n\n.table .thead-light th {\n color: #495057;\n background-color: #e9ecef;\n border-color: #e9ecef; }\n\n.table-dark {\n color: #fff;\n background-color: #212529; }\n .table-dark th,\n .table-dark td,\n .table-dark thead th {\n border-color: #32383e; }\n .table-dark.table-bordered {\n border: 0; }\n .table-dark.table-striped tbody tr:nth-of-type(odd) {\n background-color: rgba(255, 255, 255, 0.05); }\n .table-dark.table-hover tbody tr:hover {\n background-color: rgba(255, 255, 255, 0.075); }\n\n@media (max-width: 575px) {\n .table-responsive-sm {\n display: block;\n width: 100%;\n overflow-x: auto;\n -webkit-overflow-scrolling: touch;\n -ms-overflow-style: -ms-autohiding-scrollbar; }\n .table-responsive-sm.table-bordered {\n border: 0; } }\n\n@media (max-width: 767px) {\n .table-responsive-md {\n display: block;\n width: 100%;\n overflow-x: auto;\n -webkit-overflow-scrolling: touch;\n -ms-overflow-style: -ms-autohiding-scrollbar; }\n .table-responsive-md.table-bordered {\n border: 0; } }\n\n@media (max-width: 991px) {\n .table-responsive-lg {\n display: block;\n width: 100%;\n overflow-x: auto;\n -webkit-overflow-scrolling: touch;\n -ms-overflow-style: -ms-autohiding-scrollbar; }\n .table-responsive-lg.table-bordered {\n border: 0; } }\n\n@media (max-width: 1199px) {\n .table-responsive-xl {\n display: block;\n width: 100%;\n overflow-x: auto;\n -webkit-overflow-scrolling: touch;\n -ms-overflow-style: -ms-autohiding-scrollbar; }\n .table-responsive-xl.table-bordered {\n border: 0; } }\n\n.table-responsive {\n display: block;\n width: 100%;\n overflow-x: auto;\n -webkit-overflow-scrolling: touch;\n -ms-overflow-style: -ms-autohiding-scrollbar; }\n .table-responsive.table-bordered {\n border: 0; }\n\n.form-control {\n display: block;\n width: 100%;\n padding: 0.375rem 0.75rem;\n font-size: 1rem;\n line-height: 1.5;\n color: #495057;\n background-color: #fff;\n background-image: none;\n background-clip: padding-box;\n border: 1px solid #ced4da;\n border-radius: 0.25rem;\n transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; }\n .form-control::-ms-expand {\n background-color: transparent;\n border: 0; }\n .form-control:focus {\n color: #495057;\n background-color: #fff;\n border-color: #80bdff;\n outline: none;\n box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); }\n .form-control::placeholder {\n color: #868e96;\n opacity: 1; }\n .form-control:disabled, .form-control[readonly] {\n background-color: #e9ecef;\n opacity: 1; }\n\nselect.form-control:not([size]):not([multiple]) {\n height: calc(2.25rem + 2px); }\n\nselect.form-control:focus::-ms-value {\n color: #495057;\n background-color: #fff; }\n\n.form-control-file,\n.form-control-range {\n display: block; }\n\n.col-form-label {\n padding-top: calc(0.375rem + 1px);\n padding-bottom: calc(0.375rem + 1px);\n margin-bottom: 0;\n line-height: 1.5; }\n\n.col-form-label-lg {\n padding-top: calc(0.5rem + 1px);\n padding-bottom: calc(0.5rem + 1px);\n font-size: 1.25rem;\n line-height: 1.5; }\n\n.col-form-label-sm {\n padding-top: calc(0.25rem + 1px);\n padding-bottom: calc(0.25rem + 1px);\n font-size: 0.875rem;\n line-height: 1.5; }\n\n.col-form-legend {\n padding-top: 0.375rem;\n padding-bottom: 0.375rem;\n margin-bottom: 0;\n font-size: 1rem; }\n\n.form-control-plaintext {\n padding-top: 0.375rem;\n padding-bottom: 0.375rem;\n margin-bottom: 0;\n line-height: 1.5;\n background-color: transparent;\n border: solid transparent;\n border-width: 1px 0; }\n .form-control-plaintext.form-control-sm, .input-group-sm > .form-control-plaintext.form-control,\n .input-group-sm > .form-control-plaintext.input-group-addon,\n .input-group-sm > .input-group-btn > .form-control-plaintext.btn, .form-control-plaintext.form-control-lg, .input-group-lg > .form-control-plaintext.form-control,\n .input-group-lg > .form-control-plaintext.input-group-addon,\n .input-group-lg > .input-group-btn > .form-control-plaintext.btn {\n padding-right: 0;\n padding-left: 0; }\n\n.form-control-sm, .input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n padding: 0.25rem 0.5rem;\n font-size: 0.875rem;\n line-height: 1.5;\n border-radius: 0.2rem; }\n\nselect.form-control-sm:not([size]):not([multiple]), .input-group-sm > select.form-control:not([size]):not([multiple]),\n.input-group-sm > select.input-group-addon:not([size]):not([multiple]),\n.input-group-sm > .input-group-btn > select.btn:not([size]):not([multiple]) {\n height: calc(1.8125rem + 2px); }\n\n.form-control-lg, .input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n padding: 0.5rem 1rem;\n font-size: 1.25rem;\n line-height: 1.5;\n border-radius: 0.3rem; }\n\nselect.form-control-lg:not([size]):not([multiple]), .input-group-lg > select.form-control:not([size]):not([multiple]),\n.input-group-lg > select.input-group-addon:not([size]):not([multiple]),\n.input-group-lg > .input-group-btn > select.btn:not([size]):not([multiple]) {\n height: calc(2.875rem + 2px); }\n\n.form-group {\n margin-bottom: 1rem; }\n\n.form-text {\n display: block;\n margin-top: 0.25rem; }\n\n.form-row {\n display: flex;\n flex-wrap: wrap;\n margin-right: -5px;\n margin-left: -5px; }\n .form-row > .col,\n .form-row > [class*="col-"] {\n padding-right: 5px;\n padding-left: 5px; }\n\n.form-check {\n position: relative;\n display: block;\n margin-bottom: 0.5rem; }\n .form-check.disabled .form-check-label {\n color: #868e96; }\n\n.form-check-label {\n padding-left: 1.25rem;\n margin-bottom: 0; }\n\n.form-check-input {\n position: absolute;\n margin-top: 0.25rem;\n margin-left: -1.25rem; }\n\n.form-check-inline {\n display: inline-block;\n margin-right: 0.75rem; }\n .form-check-inline .form-check-label {\n vertical-align: middle; }\n\n.valid-feedback {\n display: none;\n margin-top: .25rem;\n font-size: .875rem;\n color: #28a745; }\n\n.valid-tooltip {\n position: absolute;\n top: 100%;\n z-index: 5;\n display: none;\n width: 250px;\n padding: .5rem;\n margin-top: .1rem;\n font-size: .875rem;\n line-height: 1;\n color: #fff;\n background-color: rgba(40, 167, 69, 0.8);\n border-radius: .2rem; }\n\n.was-validated .form-control:valid, .form-control.is-valid, .was-validated\n.custom-select:valid,\n.custom-select.is-valid {\n border-color: #28a745; }\n .was-validated .form-control:valid:focus, .form-control.is-valid:focus, .was-validated\n .custom-select:valid:focus,\n .custom-select.is-valid:focus {\n box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25); }\n .was-validated .form-control:valid ~ .valid-feedback,\n .was-validated .form-control:valid ~ .valid-tooltip, .form-control.is-valid ~ .valid-feedback,\n .form-control.is-valid ~ .valid-tooltip, .was-validated\n .custom-select:valid ~ .valid-feedback,\n .was-validated\n .custom-select:valid ~ .valid-tooltip,\n .custom-select.is-valid ~ .valid-feedback,\n .custom-select.is-valid ~ .valid-tooltip {\n display: block; }\n\n.was-validated .form-check-input:valid + .form-check-label, .form-check-input.is-valid + .form-check-label {\n color: #28a745; }\n\n.was-validated .custom-control-input:valid ~ .custom-control-indicator, .custom-control-input.is-valid ~ .custom-control-indicator {\n background-color: rgba(40, 167, 69, 0.25); }\n\n.was-validated .custom-control-input:valid ~ .custom-control-description, .custom-control-input.is-valid ~ .custom-control-description {\n color: #28a745; }\n\n.was-validated .custom-file-input:valid ~ .custom-file-control, .custom-file-input.is-valid ~ .custom-file-control {\n border-color: #28a745; }\n .was-validated .custom-file-input:valid ~ .custom-file-control::before, .custom-file-input.is-valid ~ .custom-file-control::before {\n border-color: inherit; }\n\n.was-validated .custom-file-input:valid:focus, .custom-file-input.is-valid:focus {\n box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25); }\n\n.invalid-feedback {\n display: none;\n margin-top: .25rem;\n font-size: .875rem;\n color: #dc3545; }\n\n.invalid-tooltip {\n position: absolute;\n top: 100%;\n z-index: 5;\n display: none;\n width: 250px;\n padding: .5rem;\n margin-top: .1rem;\n font-size: .875rem;\n line-height: 1;\n color: #fff;\n background-color: rgba(220, 53, 69, 0.8);\n border-radius: .2rem; }\n\n.was-validated .form-control:invalid, .form-control.is-invalid, .was-validated\n.custom-select:invalid,\n.custom-select.is-invalid {\n border-color: #dc3545; }\n .was-validated .form-control:invalid:focus, .form-control.is-invalid:focus, .was-validated\n .custom-select:invalid:focus,\n .custom-select.is-invalid:focus {\n box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25); }\n .was-validated .form-control:invalid ~ .invalid-feedback,\n .was-validated .form-control:invalid ~ .invalid-tooltip, .form-control.is-invalid ~ .invalid-feedback,\n .form-control.is-invalid ~ .invalid-tooltip, .was-validated\n .custom-select:invalid ~ .invalid-feedback,\n .was-validated\n .custom-select:invalid ~ .invalid-tooltip,\n .custom-select.is-invalid ~ .invalid-feedback,\n .custom-select.is-invalid ~ .invalid-tooltip {\n display: block; }\n\n.was-validated .form-check-input:invalid + .form-check-label, .form-check-input.is-invalid + .form-check-label {\n color: #dc3545; }\n\n.was-validated .custom-control-input:invalid ~ .custom-control-indicator, .custom-control-input.is-invalid ~ .custom-control-indicator {\n background-color: rgba(220, 53, 69, 0.25); }\n\n.was-validated .custom-control-input:invalid ~ .custom-control-description, .custom-control-input.is-invalid ~ .custom-control-description {\n color: #dc3545; }\n\n.was-validated .custom-file-input:invalid ~ .custom-file-control, .custom-file-input.is-invalid ~ .custom-file-control {\n border-color: #dc3545; }\n .was-validated .custom-file-input:invalid ~ .custom-file-control::before, .custom-file-input.is-invalid ~ .custom-file-control::before {\n border-color: inherit; }\n\n.was-validated .custom-file-input:invalid:focus, .custom-file-input.is-invalid:focus {\n box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25); }\n\n.form-inline {\n display: flex;\n flex-flow: row wrap;\n align-items: center; }\n .form-inline .form-check {\n width: 100%; }\n @media (min-width: 576px) {\n .form-inline label {\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 0; }\n .form-inline .form-group {\n display: flex;\n flex: 0 0 auto;\n flex-flow: row wrap;\n align-items: center;\n margin-bottom: 0; }\n .form-inline .form-control {\n display: inline-block;\n width: auto;\n vertical-align: middle; }\n .form-inline .form-control-plaintext {\n display: inline-block; }\n .form-inline .input-group {\n width: auto; }\n .form-inline .form-check {\n display: flex;\n align-items: center;\n justify-content: center;\n width: auto;\n margin-top: 0;\n margin-bottom: 0; }\n .form-inline .form-check-label {\n padding-left: 0; }\n .form-inline .form-check-input {\n position: relative;\n margin-top: 0;\n margin-right: 0.25rem;\n margin-left: 0; }\n .form-inline .custom-control {\n display: flex;\n align-items: center;\n justify-content: center;\n padding-left: 0; }\n .form-inline .custom-control-indicator {\n position: static;\n display: inline-block;\n margin-right: 0.25rem;\n vertical-align: text-bottom; }\n .form-inline .has-feedback .form-control-feedback {\n top: 0; } }\n\n.btn {\n display: inline-block;\n font-weight: 400;\n text-align: center;\n white-space: nowrap;\n vertical-align: middle;\n user-select: none;\n border: 1px solid transparent;\n padding: 0.375rem 0.75rem;\n font-size: 1rem;\n line-height: 1.5;\n border-radius: 0.25rem;\n transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; }\n .btn:focus, .btn:hover {\n text-decoration: none; }\n .btn:focus, .btn.focus {\n outline: 0;\n box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); }\n .btn.disabled, .btn:disabled {\n opacity: .65; }\n .btn:not([disabled]):not(.disabled):active, .btn:not([disabled]):not(.disabled).active {\n background-image: none; }\n\na.btn.disabled,\nfieldset[disabled] a.btn {\n pointer-events: none; }\n\n.btn-primary {\n color: #fff;\n background-color: #007bff;\n border-color: #007bff; }\n .btn-primary:hover {\n color: #fff;\n background-color: #0069d9;\n border-color: #0062cc; }\n .btn-primary:focus, .btn-primary.focus {\n box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5); }\n .btn-primary.disabled, .btn-primary:disabled {\n background-color: #007bff;\n border-color: #007bff; }\n .btn-primary:not([disabled]):not(.disabled):active, .btn-primary:not([disabled]):not(.disabled).active,\n .show > .btn-primary.dropdown-toggle {\n color: #fff;\n background-color: #0062cc;\n border-color: #005cbf;\n box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5); }\n\n.btn-secondary {\n color: #fff;\n background-color: #868e96;\n border-color: #868e96; }\n .btn-secondary:hover {\n color: #fff;\n background-color: #727b84;\n border-color: #6c757d; }\n .btn-secondary:focus, .btn-secondary.focus {\n box-shadow: 0 0 0 0.2rem rgba(134, 142, 150, 0.5); }\n .btn-secondary.disabled, .btn-secondary:disabled {\n background-color: #868e96;\n border-color: #868e96; }\n .btn-secondary:not([disabled]):not(.disabled):active, .btn-secondary:not([disabled]):not(.disabled).active,\n .show > .btn-secondary.dropdown-toggle {\n color: #fff;\n background-color: #6c757d;\n border-color: #666e76;\n box-shadow: 0 0 0 0.2rem rgba(134, 142, 150, 0.5); }\n\n.btn-success {\n color: #fff;\n background-color: #28a745;\n border-color: #28a745; }\n .btn-success:hover {\n color: #fff;\n background-color: #218838;\n border-color: #1e7e34; }\n .btn-success:focus, .btn-success.focus {\n box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5); }\n .btn-success.disabled, .btn-success:disabled {\n background-color: #28a745;\n border-color: #28a745; }\n .btn-success:not([disabled]):not(.disabled):active, .btn-success:not([disabled]):not(.disabled).active,\n .show > .btn-success.dropdown-toggle {\n color: #fff;\n background-color: #1e7e34;\n border-color: #1c7430;\n box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5); }\n\n.btn-info {\n color: #fff;\n background-color: #17a2b8;\n border-color: #17a2b8; }\n .btn-info:hover {\n color: #fff;\n background-color: #138496;\n border-color: #117a8b; }\n .btn-info:focus, .btn-info.focus {\n box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.5); }\n .btn-info.disabled, .btn-info:disabled {\n background-color: #17a2b8;\n border-color: #17a2b8; }\n .btn-info:not([disabled]):not(.disabled):active, .btn-info:not([disabled]):not(.disabled).active,\n .show > .btn-info.dropdown-toggle {\n color: #fff;\n background-color: #117a8b;\n border-color: #10707f;\n box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.5); }\n\n.btn-warning {\n color: #111;\n background-color: #ffc107;\n border-color: #ffc107; }\n .btn-warning:hover {\n color: #111;\n background-color: #e0a800;\n border-color: #d39e00; }\n .btn-warning:focus, .btn-warning.focus {\n box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.5); }\n .btn-warning.disabled, .btn-warning:disabled {\n background-color: #ffc107;\n border-color: #ffc107; }\n .btn-warning:not([disabled]):not(.disabled):active, .btn-warning:not([disabled]):not(.disabled).active,\n .show > .btn-warning.dropdown-toggle {\n color: #111;\n background-color: #d39e00;\n border-color: #c69500;\n box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.5); }\n\n.btn-danger {\n color: #fff;\n background-color: #dc3545;\n border-color: #dc3545; }\n .btn-danger:hover {\n color: #fff;\n background-color: #c82333;\n border-color: #bd2130; }\n .btn-danger:focus, .btn-danger.focus {\n box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5); }\n .btn-danger.disabled, .btn-danger:disabled {\n background-color: #dc3545;\n border-color: #dc3545; }\n .btn-danger:not([disabled]):not(.disabled):active, .btn-danger:not([disabled]):not(.disabled).active,\n .show > .btn-danger.dropdown-toggle {\n color: #fff;\n background-color: #bd2130;\n border-color: #b21f2d;\n box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5); }\n\n.btn-light {\n color: #111;\n background-color: #f8f9fa;\n border-color: #f8f9fa; }\n .btn-light:hover {\n color: #111;\n background-color: #e2e6ea;\n border-color: #dae0e5; }\n .btn-light:focus, .btn-light.focus {\n box-shadow: 0 0 0 0.2rem rgba(248, 249, 250, 0.5); }\n .btn-light.disabled, .btn-light:disabled {\n background-color: #f8f9fa;\n border-color: #f8f9fa; }\n .btn-light:not([disabled]):not(.disabled):active, .btn-light:not([disabled]):not(.disabled).active,\n .show > .btn-light.dropdown-toggle {\n color: #111;\n background-color: #dae0e5;\n border-color: #d3d9df;\n box-shadow: 0 0 0 0.2rem rgba(248, 249, 250, 0.5); }\n\n.btn-dark {\n color: #fff;\n background-color: #343a40;\n border-color: #343a40; }\n .btn-dark:hover {\n color: #fff;\n background-color: #23272b;\n border-color: #1d2124; }\n .btn-dark:focus, .btn-dark.focus {\n box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5); }\n .btn-dark.disabled, .btn-dark:disabled {\n background-color: #343a40;\n border-color: #343a40; }\n .btn-dark:not([disabled]):not(.disabled):active, .btn-dark:not([disabled]):not(.disabled).active,\n .show > .btn-dark.dropdown-toggle {\n color: #fff;\n background-color: #1d2124;\n border-color: #171a1d;\n box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5); }\n\n.btn-outline-primary {\n color: #007bff;\n background-color: transparent;\n background-image: none;\n border-color: #007bff; }\n .btn-outline-primary:hover {\n color: #fff;\n background-color: #007bff;\n border-color: #007bff; }\n .btn-outline-primary:focus, .btn-outline-primary.focus {\n box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5); }\n .btn-outline-primary.disabled, .btn-outline-primary:disabled {\n color: #007bff;\n background-color: transparent; }\n .btn-outline-primary:not([disabled]):not(.disabled):active, .btn-outline-primary:not([disabled]):not(.disabled).active,\n .show > .btn-outline-primary.dropdown-toggle {\n color: #fff;\n background-color: #007bff;\n border-color: #007bff;\n box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5); }\n\n.btn-outline-secondary {\n color: #868e96;\n background-color: transparent;\n background-image: none;\n border-color: #868e96; }\n .btn-outline-secondary:hover {\n color: #fff;\n background-color: #868e96;\n border-color: #868e96; }\n .btn-outline-secondary:focus, .btn-outline-secondary.focus {\n box-shadow: 0 0 0 0.2rem rgba(134, 142, 150, 0.5); }\n .btn-outline-secondary.disabled, .btn-outline-secondary:disabled {\n color: #868e96;\n background-color: transparent; }\n .btn-outline-secondary:not([disabled]):not(.disabled):active, .btn-outline-secondary:not([disabled]):not(.disabled).active,\n .show > .btn-outline-secondary.dropdown-toggle {\n color: #fff;\n background-color: #868e96;\n border-color: #868e96;\n box-shadow: 0 0 0 0.2rem rgba(134, 142, 150, 0.5); }\n\n.btn-outline-success {\n color: #28a745;\n background-color: transparent;\n background-image: none;\n border-color: #28a745; }\n .btn-outline-success:hover {\n color: #fff;\n background-color: #28a745;\n border-color: #28a745; }\n .btn-outline-success:focus, .btn-outline-success.focus {\n box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5); }\n .btn-outline-success.disabled, .btn-outline-success:disabled {\n color: #28a745;\n background-color: transparent; }\n .btn-outline-success:not([disabled]):not(.disabled):active, .btn-outline-success:not([disabled]):not(.disabled).active,\n .show > .btn-outline-success.dropdown-toggle {\n color: #fff;\n background-color: #28a745;\n border-color: #28a745;\n box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5); }\n\n.btn-outline-info {\n color: #17a2b8;\n background-color: transparent;\n background-image: none;\n border-color: #17a2b8; }\n .btn-outline-info:hover {\n color: #fff;\n background-color: #17a2b8;\n border-color: #17a2b8; }\n .btn-outline-info:focus, .btn-outline-info.focus {\n box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.5); }\n .btn-outline-info.disabled, .btn-outline-info:disabled {\n color: #17a2b8;\n background-color: transparent; }\n .btn-outline-info:not([disabled]):not(.disabled):active, .btn-outline-info:not([disabled]):not(.disabled).active,\n .show > .btn-outline-info.dropdown-toggle {\n color: #fff;\n background-color: #17a2b8;\n border-color: #17a2b8;\n box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.5); }\n\n.btn-outline-warning {\n color: #ffc107;\n background-color: transparent;\n background-image: none;\n border-color: #ffc107; }\n .btn-outline-warning:hover {\n color: #fff;\n background-color: #ffc107;\n border-color: #ffc107; }\n .btn-outline-warning:focus, .btn-outline-warning.focus {\n box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.5); }\n .btn-outline-warning.disabled, .btn-outline-warning:disabled {\n color: #ffc107;\n background-color: transparent; }\n .btn-outline-warning:not([disabled]):not(.disabled):active, .btn-outline-warning:not([disabled]):not(.disabled).active,\n .show > .btn-outline-warning.dropdown-toggle {\n color: #fff;\n background-color: #ffc107;\n border-color: #ffc107;\n box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.5); }\n\n.btn-outline-danger {\n color: #dc3545;\n background-color: transparent;\n background-image: none;\n border-color: #dc3545; }\n .btn-outline-danger:hover {\n color: #fff;\n background-color: #dc3545;\n border-color: #dc3545; }\n .btn-outline-danger:focus, .btn-outline-danger.focus {\n box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5); }\n .btn-outline-danger.disabled, .btn-outline-danger:disabled {\n color: #dc3545;\n background-color: transparent; }\n .btn-outline-danger:not([disabled]):not(.disabled):active, .btn-outline-danger:not([disabled]):not(.disabled).active,\n .show > .btn-outline-danger.dropdown-toggle {\n color: #fff;\n background-color: #dc3545;\n border-color: #dc3545;\n box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5); }\n\n.btn-outline-light {\n color: #f8f9fa;\n background-color: transparent;\n background-image: none;\n border-color: #f8f9fa; }\n .btn-outline-light:hover {\n color: #212529;\n background-color: #f8f9fa;\n border-color: #f8f9fa; }\n .btn-outline-light:focus, .btn-outline-light.focus {\n box-shadow: 0 0 0 0.2rem rgba(248, 249, 250, 0.5); }\n .btn-outline-light.disabled, .btn-outline-light:disabled {\n color: #f8f9fa;\n background-color: transparent; }\n .btn-outline-light:not([disabled]):not(.disabled):active, .btn-outline-light:not([disabled]):not(.disabled).active,\n .show > .btn-outline-light.dropdown-toggle {\n color: #212529;\n background-color: #f8f9fa;\n border-color: #f8f9fa;\n box-shadow: 0 0 0 0.2rem rgba(248, 249, 250, 0.5); }\n\n.btn-outline-dark {\n color: #343a40;\n background-color: transparent;\n background-image: none;\n border-color: #343a40; }\n .btn-outline-dark:hover {\n color: #fff;\n background-color: #343a40;\n border-color: #343a40; }\n .btn-outline-dark:focus, .btn-outline-dark.focus {\n box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5); }\n .btn-outline-dark.disabled, .btn-outline-dark:disabled {\n color: #343a40;\n background-color: transparent; }\n .btn-outline-dark:not([disabled]):not(.disabled):active, .btn-outline-dark:not([disabled]):not(.disabled).active,\n .show > .btn-outline-dark.dropdown-toggle {\n color: #fff;\n background-color: #343a40;\n border-color: #343a40;\n box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5); }\n\n.btn-link {\n font-weight: 400;\n color: #007bff;\n background-color: transparent; }\n .btn-link:hover {\n color: #0056b3;\n text-decoration: underline;\n background-color: transparent;\n border-color: transparent; }\n .btn-link:focus, .btn-link.focus {\n border-color: transparent;\n box-shadow: none; }\n .btn-link:disabled, .btn-link.disabled {\n color: #868e96; }\n\n.btn-lg, .btn-group-lg > .btn {\n padding: 0.5rem 1rem;\n font-size: 1.25rem;\n line-height: 1.5;\n border-radius: 0.3rem; }\n\n.btn-sm, .btn-group-sm > .btn {\n padding: 0.25rem 0.5rem;\n font-size: 0.875rem;\n line-height: 1.5;\n border-radius: 0.2rem; }\n\n.btn-block {\n display: block;\n width: 100%; }\n\n.btn-block + .btn-block {\n margin-top: 0.5rem; }\n\ninput[type="submit"].btn-block,\ninput[type="reset"].btn-block,\ninput[type="button"].btn-block {\n width: 100%; }\n\n.fade {\n opacity: 0;\n transition: opacity 0.15s linear; }\n .fade.show {\n opacity: 1; }\n\n.collapse {\n display: none; }\n .collapse.show {\n display: block; }\n\ntr.collapse.show {\n display: table-row; }\n\ntbody.collapse.show {\n display: table-row-group; }\n\n.collapsing {\n position: relative;\n height: 0;\n overflow: hidden;\n transition: height 0.35s ease; }\n\n.dropup,\n.dropdown {\n position: relative; }\n\n.dropdown-toggle::after {\n display: inline-block;\n width: 0;\n height: 0;\n margin-left: 0.255em;\n vertical-align: 0.255em;\n content: "";\n border-top: 0.3em solid;\n border-right: 0.3em solid transparent;\n border-bottom: 0;\n border-left: 0.3em solid transparent; }\n\n.dropdown-toggle:empty::after {\n margin-left: 0; }\n\n.dropdown-menu {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: 1000;\n display: none;\n float: left;\n min-width: 10rem;\n padding: 0.5rem 0;\n margin: 0.125rem 0 0;\n font-size: 1rem;\n color: #212529;\n text-align: left;\n list-style: none;\n background-color: #fff;\n background-clip: padding-box;\n border: 1px solid rgba(0, 0, 0, 0.15);\n border-radius: 0.25rem; }\n\n.dropup .dropdown-menu {\n margin-top: 0;\n margin-bottom: 0.125rem; }\n\n.dropup .dropdown-toggle::after {\n display: inline-block;\n width: 0;\n height: 0;\n margin-left: 0.255em;\n vertical-align: 0.255em;\n content: "";\n border-top: 0;\n border-right: 0.3em solid transparent;\n border-bottom: 0.3em solid;\n border-left: 0.3em solid transparent; }\n\n.dropup .dropdown-toggle:empty::after {\n margin-left: 0; }\n\n.dropdown-divider {\n height: 0;\n margin: 0.5rem 0;\n overflow: hidden;\n border-top: 1px solid #e9ecef; }\n\n.dropdown-item {\n display: block;\n width: 100%;\n padding: 0.25rem 1.5rem;\n clear: both;\n font-weight: 400;\n color: #212529;\n text-align: inherit;\n white-space: nowrap;\n background: none;\n border: 0; }\n .dropdown-item:focus, .dropdown-item:hover {\n color: #16181b;\n text-decoration: none;\n background-color: #f8f9fa; }\n .dropdown-item.active, .dropdown-item:active {\n color: #fff;\n text-decoration: none;\n background-color: #007bff; }\n .dropdown-item.disabled, .dropdown-item:disabled {\n color: #868e96;\n background-color: transparent; }\n\n.dropdown-menu.show {\n display: block; }\n\n.dropdown-header {\n display: block;\n padding: 0.5rem 1.5rem;\n margin-bottom: 0;\n font-size: 0.875rem;\n color: #868e96;\n white-space: nowrap; }\n\n.btn-group,\n.btn-group-vertical {\n position: relative;\n display: inline-flex;\n vertical-align: middle; }\n .btn-group > .btn,\n .btn-group-vertical > .btn {\n position: relative;\n flex: 0 1 auto; }\n .btn-group > .btn:hover,\n .btn-group-vertical > .btn:hover {\n z-index: 2; }\n .btn-group > .btn:focus, .btn-group > .btn:active, .btn-group > .btn.active,\n .btn-group-vertical > .btn:focus,\n .btn-group-vertical > .btn:active,\n .btn-group-vertical > .btn.active {\n z-index: 2; }\n .btn-group .btn + .btn,\n .btn-group .btn + .btn-group,\n .btn-group .btn-group + .btn,\n .btn-group .btn-group + .btn-group,\n .btn-group-vertical .btn + .btn,\n .btn-group-vertical .btn + .btn-group,\n .btn-group-vertical .btn-group + .btn,\n .btn-group-vertical .btn-group + .btn-group {\n margin-left: -1px; }\n\n.btn-toolbar {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start; }\n .btn-toolbar .input-group {\n width: auto; }\n\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n border-radius: 0; }\n\n.btn-group > .btn:first-child {\n margin-left: 0; }\n .btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0; }\n\n.btn-group > .btn-group {\n float: left; }\n\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0; }\n\n.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n\n.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0; }\n\n.btn + .dropdown-toggle-split {\n padding-right: 0.5625rem;\n padding-left: 0.5625rem; }\n .btn + .dropdown-toggle-split::after {\n margin-left: 0; }\n\n.btn-sm + .dropdown-toggle-split, .btn-group-sm > .btn + .dropdown-toggle-split {\n padding-right: 0.375rem;\n padding-left: 0.375rem; }\n\n.btn-lg + .dropdown-toggle-split, .btn-group-lg > .btn + .dropdown-toggle-split {\n padding-right: 0.75rem;\n padding-left: 0.75rem; }\n\n.btn-group-vertical {\n flex-direction: column;\n align-items: flex-start;\n justify-content: center; }\n .btn-group-vertical .btn,\n .btn-group-vertical .btn-group {\n width: 100%; }\n .btn-group-vertical > .btn + .btn,\n .btn-group-vertical > .btn + .btn-group,\n .btn-group-vertical > .btn-group + .btn,\n .btn-group-vertical > .btn-group + .btn-group {\n margin-top: -1px;\n margin-left: 0; }\n .btn-group-vertical > .btn:not(:first-child):not(:last-child) {\n border-radius: 0; }\n .btn-group-vertical > .btn:first-child:not(:last-child) {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0; }\n .btn-group-vertical > .btn:last-child:not(:first-child) {\n border-top-left-radius: 0;\n border-top-right-radius: 0; }\n .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0; }\n .btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,\n .btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0; }\n .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n border-top-left-radius: 0;\n border-top-right-radius: 0; }\n\n[data-toggle="buttons"] > .btn input[type="radio"],\n[data-toggle="buttons"] > .btn input[type="checkbox"],\n[data-toggle="buttons"] > .btn-group > .btn input[type="radio"],\n[data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] {\n position: absolute;\n clip: rect(0, 0, 0, 0);\n pointer-events: none; }\n\n.input-group {\n position: relative;\n display: flex;\n align-items: stretch;\n width: 100%; }\n .input-group .form-control {\n position: relative;\n z-index: 2;\n flex: 1 1 auto;\n width: 1%;\n margin-bottom: 0; }\n .input-group .form-control:focus, .input-group .form-control:active, .input-group .form-control:hover {\n z-index: 3; }\n\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n display: flex;\n align-items: center; }\n .input-group-addon:not(:first-child):not(:last-child),\n .input-group-btn:not(:first-child):not(:last-child),\n .input-group .form-control:not(:first-child):not(:last-child) {\n border-radius: 0; }\n\n.input-group-addon,\n.input-group-btn {\n white-space: nowrap; }\n\n.input-group-addon {\n padding: 0.375rem 0.75rem;\n margin-bottom: 0;\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.5;\n color: #495057;\n text-align: center;\n background-color: #e9ecef;\n border: 1px solid #ced4da;\n border-radius: 0.25rem; }\n .input-group-addon.form-control-sm,\n .input-group-sm > .input-group-addon,\n .input-group-sm > .input-group-btn > .input-group-addon.btn {\n padding: 0.25rem 0.5rem;\n font-size: 0.875rem;\n border-radius: 0.2rem; }\n .input-group-addon.form-control-lg,\n .input-group-lg > .input-group-addon,\n .input-group-lg > .input-group-btn > .input-group-addon.btn {\n padding: 0.5rem 1rem;\n font-size: 1.25rem;\n border-radius: 0.3rem; }\n .input-group-addon input[type="radio"],\n .input-group-addon input[type="checkbox"] {\n margin-top: 0; }\n\n.input-group .form-control:not(:last-child),\n.input-group-addon:not(:last-child),\n.input-group-btn:not(:last-child) > .btn,\n.input-group-btn:not(:last-child) > .btn-group > .btn,\n.input-group-btn:not(:last-child) > .dropdown-toggle,\n.input-group-btn:not(:first-child) > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:not(:first-child) > .btn-group:not(:last-child) > .btn {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n\n.input-group-addon:not(:last-child) {\n border-right: 0; }\n\n.input-group .form-control:not(:first-child),\n.input-group-addon:not(:first-child),\n.input-group-btn:not(:first-child) > .btn,\n.input-group-btn:not(:first-child) > .btn-group > .btn,\n.input-group-btn:not(:first-child) > .dropdown-toggle,\n.input-group-btn:not(:last-child) > .btn:not(:first-child),\n.input-group-btn:not(:last-child) > .btn-group:not(:first-child) > .btn {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0; }\n\n.form-control + .input-group-addon:not(:first-child) {\n border-left: 0; }\n\n.input-group-btn {\n position: relative;\n align-items: stretch;\n font-size: 0;\n white-space: nowrap; }\n .input-group-btn > .btn {\n position: relative; }\n .input-group-btn > .btn + .btn {\n margin-left: -1px; }\n .input-group-btn > .btn:focus, .input-group-btn > .btn:active, .input-group-btn > .btn:hover {\n z-index: 3; }\n .input-group-btn:first-child > .btn + .btn {\n margin-left: 0; }\n .input-group-btn:not(:last-child) > .btn,\n .input-group-btn:not(:last-child) > .btn-group {\n margin-right: -1px; }\n .input-group-btn:not(:first-child) > .btn,\n .input-group-btn:not(:first-child) > .btn-group {\n z-index: 2;\n margin-left: 0; }\n .input-group-btn:not(:first-child) > .btn:first-child,\n .input-group-btn:not(:first-child) > .btn-group:first-child {\n margin-left: -1px; }\n .input-group-btn:not(:first-child) > .btn:focus, .input-group-btn:not(:first-child) > .btn:active, .input-group-btn:not(:first-child) > .btn:hover,\n .input-group-btn:not(:first-child) > .btn-group:focus,\n .input-group-btn:not(:first-child) > .btn-group:active,\n .input-group-btn:not(:first-child) > .btn-group:hover {\n z-index: 3; }\n\n.custom-control {\n position: relative;\n display: inline-flex;\n min-height: 1.5rem;\n padding-left: 1.5rem;\n margin-right: 1rem; }\n\n.custom-control-input {\n position: absolute;\n z-index: -1;\n opacity: 0; }\n .custom-control-input:checked ~ .custom-control-indicator {\n color: #fff;\n background-color: #007bff; }\n .custom-control-input:focus ~ .custom-control-indicator {\n box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(0, 123, 255, 0.25); }\n .custom-control-input:active ~ .custom-control-indicator {\n color: #fff;\n background-color: #b3d7ff; }\n .custom-control-input:disabled ~ .custom-control-indicator {\n background-color: #e9ecef; }\n .custom-control-input:disabled ~ .custom-control-description {\n color: #868e96; }\n\n.custom-control-indicator {\n position: absolute;\n top: 0.25rem;\n left: 0;\n display: block;\n width: 1rem;\n height: 1rem;\n pointer-events: none;\n user-select: none;\n background-color: #ddd;\n background-repeat: no-repeat;\n background-position: center center;\n background-size: 50% 50%; }\n\n.custom-checkbox .custom-control-indicator {\n border-radius: 0.25rem; }\n\n.custom-checkbox .custom-control-input:checked ~ .custom-control-indicator {\n background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 8 8\'%3E%3Cpath fill=\'%23fff\' d=\'M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z\'/%3E%3C/svg%3E"); }\n\n.custom-checkbox .custom-control-input:indeterminate ~ .custom-control-indicator {\n background-color: #007bff;\n background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 4 4\'%3E%3Cpath stroke=\'%23fff\' d=\'M0 2h4\'/%3E%3C/svg%3E"); }\n\n.custom-radio .custom-control-indicator {\n border-radius: 50%; }\n\n.custom-radio .custom-control-input:checked ~ .custom-control-indicator {\n background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'-4 -4 8 8\'%3E%3Ccircle r=\'3\' fill=\'%23fff\'/%3E%3C/svg%3E"); }\n\n.custom-controls-stacked {\n display: flex;\n flex-direction: column; }\n .custom-controls-stacked .custom-control {\n margin-bottom: 0.25rem; }\n .custom-controls-stacked .custom-control + .custom-control {\n margin-left: 0; }\n\n.custom-select {\n display: inline-block;\n max-width: 100%;\n height: calc(2.25rem + 2px);\n padding: 0.375rem 1.75rem 0.375rem 0.75rem;\n line-height: 1.5;\n color: #495057;\n vertical-align: middle;\n background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 4 5\'%3E%3Cpath fill=\'%23333\' d=\'M2 0L0 2h4zm0 5L0 3h4z\'/%3E%3C/svg%3E") no-repeat right 0.75rem center;\n background-size: 8px 10px;\n border: 1px solid #ced4da;\n border-radius: 0.25rem;\n appearance: none; }\n .custom-select:focus {\n border-color: #80bdff;\n outline: none; }\n .custom-select:focus::-ms-value {\n color: #495057;\n background-color: #fff; }\n .custom-select[multiple] {\n height: auto;\n background-image: none; }\n .custom-select:disabled {\n color: #868e96;\n background-color: #e9ecef; }\n .custom-select::-ms-expand {\n opacity: 0; }\n\n.custom-select-sm {\n height: calc(1.8125rem + 2px);\n padding-top: 0.375rem;\n padding-bottom: 0.375rem;\n font-size: 75%; }\n\n.custom-file {\n position: relative;\n display: inline-block;\n max-width: 100%;\n height: calc(2.25rem + 2px);\n margin-bottom: 0; }\n\n.custom-file-input {\n min-width: 14rem;\n max-width: 100%;\n height: calc(2.25rem + 2px);\n margin: 0;\n opacity: 0; }\n .custom-file-input:focus ~ .custom-file-control {\n box-shadow: 0 0 0 0.075rem #fff, 0 0 0 0.2rem #007bff; }\n\n.custom-file-control {\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n z-index: 5;\n height: calc(2.25rem + 2px);\n padding: 0.375rem 0.75rem;\n line-height: 1.5;\n color: #495057;\n pointer-events: none;\n user-select: none;\n background-color: #fff;\n border: 1px solid #ced4da;\n border-radius: 0.25rem; }\n .custom-file-control:lang(en):empty::after {\n content: "Choose file..."; }\n .custom-file-control::before {\n position: absolute;\n top: -1px;\n right: -1px;\n bottom: -1px;\n z-index: 6;\n display: block;\n height: calc(2.25rem + 2px);\n padding: 0.375rem 0.75rem;\n line-height: 1.5;\n color: #495057;\n background-color: #e9ecef;\n border: 1px solid #ced4da;\n border-radius: 0 0.25rem 0.25rem 0; }\n .custom-file-control:lang(en)::before {\n content: "Browse"; }\n\n.nav {\n display: flex;\n flex-wrap: wrap;\n padding-left: 0;\n margin-bottom: 0;\n list-style: none; }\n\n.nav-link {\n display: block;\n padding: 0.5rem 1rem; }\n .nav-link:focus, .nav-link:hover {\n text-decoration: none; }\n .nav-link.disabled {\n color: #868e96; }\n\n.nav-tabs {\n border-bottom: 1px solid #ddd; }\n .nav-tabs .nav-item {\n margin-bottom: -1px; }\n .nav-tabs .nav-link {\n border: 1px solid transparent;\n border-top-left-radius: 0.25rem;\n border-top-right-radius: 0.25rem; }\n .nav-tabs .nav-link:focus, .nav-tabs .nav-link:hover {\n border-color: #e9ecef #e9ecef #ddd; }\n .nav-tabs .nav-link.disabled {\n color: #868e96;\n background-color: transparent;\n border-color: transparent; }\n .nav-tabs .nav-link.active,\n .nav-tabs .nav-item.show .nav-link {\n color: #495057;\n background-color: #fff;\n border-color: #ddd #ddd #fff; }\n .nav-tabs .dropdown-menu {\n margin-top: -1px;\n border-top-left-radius: 0;\n border-top-right-radius: 0; }\n\n.nav-pills .nav-link {\n border-radius: 0.25rem; }\n\n.nav-pills .nav-link.active,\n.nav-pills .show > .nav-link {\n color: #fff;\n background-color: #007bff; }\n\n.nav-fill .nav-item {\n flex: 1 1 auto;\n text-align: center; }\n\n.nav-justified .nav-item {\n flex-basis: 0;\n flex-grow: 1;\n text-align: center; }\n\n.tab-content > .tab-pane {\n display: none; }\n\n.tab-content > .active {\n display: block; }\n\n.navbar {\n position: relative;\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: space-between;\n padding: 0.5rem 1rem; }\n .navbar > .container,\n .navbar > .container-fluid {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: space-between; }\n\n.navbar-brand {\n display: inline-block;\n padding-top: 0.3125rem;\n padding-bottom: 0.3125rem;\n margin-right: 1rem;\n font-size: 1.25rem;\n line-height: inherit;\n white-space: nowrap; }\n .navbar-brand:focus, .navbar-brand:hover {\n text-decoration: none; }\n\n.navbar-nav {\n display: flex;\n flex-direction: column;\n padding-left: 0;\n margin-bottom: 0;\n list-style: none; }\n .navbar-nav .nav-link {\n padding-right: 0;\n padding-left: 0; }\n .navbar-nav .dropdown-menu {\n position: static;\n float: none; }\n\n.navbar-text {\n display: inline-block;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem; }\n\n.navbar-collapse {\n flex-basis: 100%;\n flex-grow: 1;\n align-items: center; }\n\n.navbar-toggler {\n padding: 0.25rem 0.75rem;\n font-size: 1.25rem;\n line-height: 1;\n background: transparent;\n border: 1px solid transparent;\n border-radius: 0.25rem; }\n .navbar-toggler:focus, .navbar-toggler:hover {\n text-decoration: none; }\n\n.navbar-toggler-icon {\n display: inline-block;\n width: 1.5em;\n height: 1.5em;\n vertical-align: middle;\n content: "";\n background: no-repeat center center;\n background-size: 100% 100%; }\n\n@media (max-width: 575px) {\n .navbar-expand-sm > .container,\n .navbar-expand-sm > .container-fluid {\n padding-right: 0;\n padding-left: 0; } }\n\n@media (min-width: 576px) {\n .navbar-expand-sm {\n flex-flow: row nowrap;\n justify-content: flex-start; }\n .navbar-expand-sm .navbar-nav {\n flex-direction: row; }\n .navbar-expand-sm .navbar-nav .dropdown-menu {\n position: absolute; }\n .navbar-expand-sm .navbar-nav .dropdown-menu-right {\n right: 0;\n left: auto; }\n .navbar-expand-sm .navbar-nav .nav-link {\n padding-right: .5rem;\n padding-left: .5rem; }\n .navbar-expand-sm > .container,\n .navbar-expand-sm > .container-fluid {\n flex-wrap: nowrap; }\n .navbar-expand-sm .navbar-collapse {\n display: flex !important;\n flex-basis: auto; }\n .navbar-expand-sm .navbar-toggler {\n display: none; }\n .navbar-expand-sm .dropup .dropdown-menu {\n top: auto;\n bottom: 100%; } }\n\n@media (max-width: 767px) {\n .navbar-expand-md > .container,\n .navbar-expand-md > .container-fluid {\n padding-right: 0;\n padding-left: 0; } }\n\n@media (min-width: 768px) {\n .navbar-expand-md {\n flex-flow: row nowrap;\n justify-content: flex-start; }\n .navbar-expand-md .navbar-nav {\n flex-direction: row; }\n .navbar-expand-md .navbar-nav .dropdown-menu {\n position: absolute; }\n .navbar-expand-md .navbar-nav .dropdown-menu-right {\n right: 0;\n left: auto; }\n .navbar-expand-md .navbar-nav .nav-link {\n padding-right: .5rem;\n padding-left: .5rem; }\n .navbar-expand-md > .container,\n .navbar-expand-md > .container-fluid {\n flex-wrap: nowrap; }\n .navbar-expand-md .navbar-collapse {\n display: flex !important;\n flex-basis: auto; }\n .navbar-expand-md .navbar-toggler {\n display: none; }\n .navbar-expand-md .dropup .dropdown-menu {\n top: auto;\n bottom: 100%; } }\n\n@media (max-width: 991px) {\n .navbar-expand-lg > .container,\n .navbar-expand-lg > .container-fluid {\n padding-right: 0;\n padding-left: 0; } }\n\n@media (min-width: 992px) {\n .navbar-expand-lg {\n flex-flow: row nowrap;\n justify-content: flex-start; }\n .navbar-expand-lg .navbar-nav {\n flex-direction: row; }\n .navbar-expand-lg .navbar-nav .dropdown-menu {\n position: absolute; }\n .navbar-expand-lg .navbar-nav .dropdown-menu-right {\n right: 0;\n left: auto; }\n .navbar-expand-lg .navbar-nav .nav-link {\n padding-right: .5rem;\n padding-left: .5rem; }\n .navbar-expand-lg > .container,\n .navbar-expand-lg > .container-fluid {\n flex-wrap: nowrap; }\n .navbar-expand-lg .navbar-collapse {\n display: flex !important;\n flex-basis: auto; }\n .navbar-expand-lg .navbar-toggler {\n display: none; }\n .navbar-expand-lg .dropup .dropdown-menu {\n top: auto;\n bottom: 100%; } }\n\n@media (max-width: 1199px) {\n .navbar-expand-xl > .container,\n .navbar-expand-xl > .container-fluid {\n padding-right: 0;\n padding-left: 0; } }\n\n@media (min-width: 1200px) {\n .navbar-expand-xl {\n flex-flow: row nowrap;\n justify-content: flex-start; }\n .navbar-expand-xl .navbar-nav {\n flex-direction: row; }\n .navbar-expand-xl .navbar-nav .dropdown-menu {\n position: absolute; }\n .navbar-expand-xl .navbar-nav .dropdown-menu-right {\n right: 0;\n left: auto; }\n .navbar-expand-xl .navbar-nav .nav-link {\n padding-right: .5rem;\n padding-left: .5rem; }\n .navbar-expand-xl > .container,\n .navbar-expand-xl > .container-fluid {\n flex-wrap: nowrap; }\n .navbar-expand-xl .navbar-collapse {\n display: flex !important;\n flex-basis: auto; }\n .navbar-expand-xl .navbar-toggler {\n display: none; }\n .navbar-expand-xl .dropup .dropdown-menu {\n top: auto;\n bottom: 100%; } }\n\n.navbar-expand {\n flex-flow: row nowrap;\n justify-content: flex-start; }\n .navbar-expand > .container,\n .navbar-expand > .container-fluid {\n padding-right: 0;\n padding-left: 0; }\n .navbar-expand .navbar-nav {\n flex-direction: row; }\n .navbar-expand .navbar-nav .dropdown-menu {\n position: absolute; }\n .navbar-expand .navbar-nav .dropdown-menu-right {\n right: 0;\n left: auto; }\n .navbar-expand .navbar-nav .nav-link {\n padding-right: .5rem;\n padding-left: .5rem; }\n .navbar-expand > .container,\n .navbar-expand > .container-fluid {\n flex-wrap: nowrap; }\n .navbar-expand .navbar-collapse {\n display: flex !important;\n flex-basis: auto; }\n .navbar-expand .navbar-toggler {\n display: none; }\n .navbar-expand .dropup .dropdown-menu {\n top: auto;\n bottom: 100%; }\n\n.navbar-light .navbar-brand {\n color: rgba(0, 0, 0, 0.9); }\n .navbar-light .navbar-brand:focus, .navbar-light .navbar-brand:hover {\n color: rgba(0, 0, 0, 0.9); }\n\n.navbar-light .navbar-nav .nav-link {\n color: rgba(0, 0, 0, 0.5); }\n .navbar-light .navbar-nav .nav-link:focus, .navbar-light .navbar-nav .nav-link:hover {\n color: rgba(0, 0, 0, 0.7); }\n .navbar-light .navbar-nav .nav-link.disabled {\n color: rgba(0, 0, 0, 0.3); }\n\n.navbar-light .navbar-nav .show > .nav-link,\n.navbar-light .navbar-nav .active > .nav-link,\n.navbar-light .navbar-nav .nav-link.show,\n.navbar-light .navbar-nav .nav-link.active {\n color: rgba(0, 0, 0, 0.9); }\n\n.navbar-light .navbar-toggler {\n color: rgba(0, 0, 0, 0.5);\n border-color: rgba(0, 0, 0, 0.1); }\n\n.navbar-light .navbar-toggler-icon {\n background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox=\'0 0 30 30\' xmlns=\'http://www.w3.org/2000/svg\'%3E%3Cpath stroke=\'rgba(0, 0, 0, 0.5)\' stroke-width=\'2\' stroke-linecap=\'round\' stroke-miterlimit=\'10\' d=\'M4 7h22M4 15h22M4 23h22\'/%3E%3C/svg%3E"); }\n\n.navbar-light .navbar-text {\n color: rgba(0, 0, 0, 0.5); }\n .navbar-light .navbar-text a {\n color: rgba(0, 0, 0, 0.9); }\n .navbar-light .navbar-text a:focus, .navbar-light .navbar-text a:hover {\n color: rgba(0, 0, 0, 0.9); }\n\n.navbar-dark .navbar-brand {\n color: #fff; }\n .navbar-dark .navbar-brand:focus, .navbar-dark .navbar-brand:hover {\n color: #fff; }\n\n.navbar-dark .navbar-nav .nav-link {\n color: rgba(255, 255, 255, 0.5); }\n .navbar-dark .navbar-nav .nav-link:focus, .navbar-dark .navbar-nav .nav-link:hover {\n color: rgba(255, 255, 255, 0.75); }\n .navbar-dark .navbar-nav .nav-link.disabled {\n color: rgba(255, 255, 255, 0.25); }\n\n.navbar-dark .navbar-nav .show > .nav-link,\n.navbar-dark .navbar-nav .active > .nav-link,\n.navbar-dark .navbar-nav .nav-link.show,\n.navbar-dark .navbar-nav .nav-link.active {\n color: #fff; }\n\n.navbar-dark .navbar-toggler {\n color: rgba(255, 255, 255, 0.5);\n border-color: rgba(255, 255, 255, 0.1); }\n\n.navbar-dark .navbar-toggler-icon {\n background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox=\'0 0 30 30\' xmlns=\'http://www.w3.org/2000/svg\'%3E%3Cpath stroke=\'rgba(255, 255, 255, 0.5)\' stroke-width=\'2\' stroke-linecap=\'round\' stroke-miterlimit=\'10\' d=\'M4 7h22M4 15h22M4 23h22\'/%3E%3C/svg%3E"); }\n\n.navbar-dark .navbar-text {\n color: rgba(255, 255, 255, 0.5); }\n .navbar-dark .navbar-text a {\n color: #fff; }\n .navbar-dark .navbar-text a:focus, .navbar-dark .navbar-text a:hover {\n color: #fff; }\n\n.card {\n position: relative;\n display: flex;\n flex-direction: column;\n min-width: 0;\n word-wrap: break-word;\n background-color: #fff;\n background-clip: border-box;\n border: 1px solid rgba(0, 0, 0, 0.125);\n border-radius: 0.25rem; }\n .card > hr {\n margin-right: 0;\n margin-left: 0; }\n .card > .list-group:first-child .list-group-item:first-child {\n border-top-left-radius: 0.25rem;\n border-top-right-radius: 0.25rem; }\n .card > .list-group:last-child .list-group-item:last-child {\n border-bottom-right-radius: 0.25rem;\n border-bottom-left-radius: 0.25rem; }\n\n.card-body {\n flex: 1 1 auto;\n padding: 1.25rem; }\n\n.card-title {\n margin-bottom: 0.75rem; }\n\n.card-subtitle {\n margin-top: -0.375rem;\n margin-bottom: 0; }\n\n.card-text:last-child {\n margin-bottom: 0; }\n\n.card-link:hover {\n text-decoration: none; }\n\n.card-link + .card-link {\n margin-left: 1.25rem; }\n\n.card-header {\n padding: 0.75rem 1.25rem;\n margin-bottom: 0;\n background-color: rgba(0, 0, 0, 0.03);\n border-bottom: 1px solid rgba(0, 0, 0, 0.125); }\n .card-header:first-child {\n border-radius: calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0; }\n .card-header + .list-group .list-group-item:first-child {\n border-top: 0; }\n\n.card-footer {\n padding: 0.75rem 1.25rem;\n background-color: rgba(0, 0, 0, 0.03);\n border-top: 1px solid rgba(0, 0, 0, 0.125); }\n .card-footer:last-child {\n border-radius: 0 0 calc(0.25rem - 1px) calc(0.25rem - 1px); }\n\n.card-header-tabs {\n margin-right: -0.625rem;\n margin-bottom: -0.75rem;\n margin-left: -0.625rem;\n border-bottom: 0; }\n\n.card-header-pills {\n margin-right: -0.625rem;\n margin-left: -0.625rem; }\n\n.card-img-overlay {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n padding: 1.25rem; }\n\n.card-img {\n width: 100%;\n border-radius: calc(0.25rem - 1px); }\n\n.card-img-top {\n width: 100%;\n border-top-left-radius: calc(0.25rem - 1px);\n border-top-right-radius: calc(0.25rem - 1px); }\n\n.card-img-bottom {\n width: 100%;\n border-bottom-right-radius: calc(0.25rem - 1px);\n border-bottom-left-radius: calc(0.25rem - 1px); }\n\n.card-deck {\n display: flex;\n flex-direction: column; }\n .card-deck .card {\n margin-bottom: 15px; }\n @media (min-width: 576px) {\n .card-deck {\n flex-flow: row wrap;\n margin-right: -15px;\n margin-left: -15px; }\n .card-deck .card {\n display: flex;\n flex: 1 0 0%;\n flex-direction: column;\n margin-right: 15px;\n margin-bottom: 0;\n margin-left: 15px; } }\n\n.card-group {\n display: flex;\n flex-direction: column; }\n .card-group .card {\n margin-bottom: 15px; }\n @media (min-width: 576px) {\n .card-group {\n flex-flow: row wrap; }\n .card-group .card {\n flex: 1 0 0%;\n margin-bottom: 0; }\n .card-group .card + .card {\n margin-left: 0;\n border-left: 0; }\n .card-group .card:first-child {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n .card-group .card:first-child .card-img-top {\n border-top-right-radius: 0; }\n .card-group .card:first-child .card-img-bottom {\n border-bottom-right-radius: 0; }\n .card-group .card:last-child {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0; }\n .card-group .card:last-child .card-img-top {\n border-top-left-radius: 0; }\n .card-group .card:last-child .card-img-bottom {\n border-bottom-left-radius: 0; }\n .card-group .card:only-child {\n border-radius: 0.25rem; }\n .card-group .card:only-child .card-img-top {\n border-top-left-radius: 0.25rem;\n border-top-right-radius: 0.25rem; }\n .card-group .card:only-child .card-img-bottom {\n border-bottom-right-radius: 0.25rem;\n border-bottom-left-radius: 0.25rem; }\n .card-group .card:not(:first-child):not(:last-child):not(:only-child) {\n border-radius: 0; }\n .card-group .card:not(:first-child):not(:last-child):not(:only-child) .card-img-top,\n .card-group .card:not(:first-child):not(:last-child):not(:only-child) .card-img-bottom {\n border-radius: 0; } }\n\n.card-columns .card {\n margin-bottom: 0.75rem; }\n\n@media (min-width: 576px) {\n .card-columns {\n column-count: 3;\n column-gap: 1.25rem; }\n .card-columns .card {\n display: inline-block;\n width: 100%; } }\n\n.breadcrumb {\n display: flex;\n flex-wrap: wrap;\n padding: 0.75rem 1rem;\n margin-bottom: 1rem;\n list-style: none;\n background-color: #e9ecef;\n border-radius: 0.25rem; }\n\n.breadcrumb-item + .breadcrumb-item::before {\n display: inline-block;\n padding-right: 0.5rem;\n padding-left: 0.5rem;\n color: #868e96;\n content: "/"; }\n\n.breadcrumb-item + .breadcrumb-item:hover::before {\n text-decoration: underline; }\n\n.breadcrumb-item + .breadcrumb-item:hover::before {\n text-decoration: none; }\n\n.breadcrumb-item.active {\n color: #868e96; }\n\n.pagination {\n display: flex;\n padding-left: 0;\n list-style: none;\n border-radius: 0.25rem; }\n\n.page-item:first-child .page-link {\n margin-left: 0;\n border-top-left-radius: 0.25rem;\n border-bottom-left-radius: 0.25rem; }\n\n.page-item:last-child .page-link {\n border-top-right-radius: 0.25rem;\n border-bottom-right-radius: 0.25rem; }\n\n.page-item.active .page-link {\n z-index: 2;\n color: #fff;\n background-color: #007bff;\n border-color: #007bff; }\n\n.page-item.disabled .page-link {\n color: #868e96;\n pointer-events: none;\n background-color: #fff;\n border-color: #ddd; }\n\n.page-link {\n position: relative;\n display: block;\n padding: 0.5rem 0.75rem;\n margin-left: -1px;\n line-height: 1.25;\n color: #007bff;\n background-color: #fff;\n border: 1px solid #ddd; }\n .page-link:focus, .page-link:hover {\n color: #0056b3;\n text-decoration: none;\n background-color: #e9ecef;\n border-color: #ddd; }\n\n.pagination-lg .page-link {\n padding: 0.75rem 1.5rem;\n font-size: 1.25rem;\n line-height: 1.5; }\n\n.pagination-lg .page-item:first-child .page-link {\n border-top-left-radius: 0.3rem;\n border-bottom-left-radius: 0.3rem; }\n\n.pagination-lg .page-item:last-child .page-link {\n border-top-right-radius: 0.3rem;\n border-bottom-right-radius: 0.3rem; }\n\n.pagination-sm .page-link {\n padding: 0.25rem 0.5rem;\n font-size: 0.875rem;\n line-height: 1.5; }\n\n.pagination-sm .page-item:first-child .page-link {\n border-top-left-radius: 0.2rem;\n border-bottom-left-radius: 0.2rem; }\n\n.pagination-sm .page-item:last-child .page-link {\n border-top-right-radius: 0.2rem;\n border-bottom-right-radius: 0.2rem; }\n\n.badge {\n display: inline-block;\n padding: 0.25em 0.4em;\n font-size: 75%;\n font-weight: 700;\n line-height: 1;\n text-align: center;\n white-space: nowrap;\n vertical-align: baseline;\n border-radius: 0.25rem; }\n .badge:empty {\n display: none; }\n\n.btn .badge {\n position: relative;\n top: -1px; }\n\n.badge-pill {\n padding-right: 0.6em;\n padding-left: 0.6em;\n border-radius: 10rem; }\n\n.badge-primary {\n color: #fff;\n background-color: #007bff; }\n .badge-primary[href]:focus, .badge-primary[href]:hover {\n color: #fff;\n text-decoration: none;\n background-color: #0062cc; }\n\n.badge-secondary {\n color: #fff;\n background-color: #868e96; }\n .badge-secondary[href]:focus, .badge-secondary[href]:hover {\n color: #fff;\n text-decoration: none;\n background-color: #6c757d; }\n\n.badge-success {\n color: #fff;\n background-color: #28a745; }\n .badge-success[href]:focus, .badge-success[href]:hover {\n color: #fff;\n text-decoration: none;\n background-color: #1e7e34; }\n\n.badge-info {\n color: #fff;\n background-color: #17a2b8; }\n .badge-info[href]:focus, .badge-info[href]:hover {\n color: #fff;\n text-decoration: none;\n background-color: #117a8b; }\n\n.badge-warning {\n color: #111;\n background-color: #ffc107; }\n .badge-warning[href]:focus, .badge-warning[href]:hover {\n color: #111;\n text-decoration: none;\n background-color: #d39e00; }\n\n.badge-danger {\n color: #fff;\n background-color: #dc3545; }\n .badge-danger[href]:focus, .badge-danger[href]:hover {\n color: #fff;\n text-decoration: none;\n background-color: #bd2130; }\n\n.badge-light {\n color: #111;\n background-color: #f8f9fa; }\n .badge-light[href]:focus, .badge-light[href]:hover {\n color: #111;\n text-decoration: none;\n background-color: #dae0e5; }\n\n.badge-dark {\n color: #fff;\n background-color: #343a40; }\n .badge-dark[href]:focus, .badge-dark[href]:hover {\n color: #fff;\n text-decoration: none;\n background-color: #1d2124; }\n\n.jumbotron {\n padding: 2rem 1rem;\n margin-bottom: 2rem;\n background-color: #e9ecef;\n border-radius: 0.3rem; }\n @media (min-width: 576px) {\n .jumbotron {\n padding: 4rem 2rem; } }\n\n.jumbotron-fluid {\n padding-right: 0;\n padding-left: 0;\n border-radius: 0; }\n\n.alert {\n position: relative;\n padding: 0.75rem 1.25rem;\n margin-bottom: 1rem;\n border: 1px solid transparent;\n border-radius: 0.25rem; }\n\n.alert-heading {\n color: inherit; }\n\n.alert-link {\n font-weight: 700; }\n\n.alert-dismissible .close {\n position: absolute;\n top: 0;\n right: 0;\n padding: 0.75rem 1.25rem;\n color: inherit; }\n\n.alert-primary {\n color: #004085;\n background-color: #cce5ff;\n border-color: #b8daff; }\n .alert-primary hr {\n border-top-color: #9fcdff; }\n .alert-primary .alert-link {\n color: #002752; }\n\n.alert-secondary {\n color: #464a4e;\n background-color: #e7e8ea;\n border-color: #dddfe2; }\n .alert-secondary hr {\n border-top-color: #cfd2d6; }\n .alert-secondary .alert-link {\n color: #2e3133; }\n\n.alert-success {\n color: #155724;\n background-color: #d4edda;\n border-color: #c3e6cb; }\n .alert-success hr {\n border-top-color: #b1dfbb; }\n .alert-success .alert-link {\n color: #0b2e13; }\n\n.alert-info {\n color: #0c5460;\n background-color: #d1ecf1;\n border-color: #bee5eb; }\n .alert-info hr {\n border-top-color: #abdde5; }\n .alert-info .alert-link {\n color: #062c33; }\n\n.alert-warning {\n color: #856404;\n background-color: #fff3cd;\n border-color: #ffeeba; }\n .alert-warning hr {\n border-top-color: #ffe8a1; }\n .alert-warning .alert-link {\n color: #533f03; }\n\n.alert-danger {\n color: #721c24;\n background-color: #f8d7da;\n border-color: #f5c6cb; }\n .alert-danger hr {\n border-top-color: #f1b0b7; }\n .alert-danger .alert-link {\n color: #491217; }\n\n.alert-light {\n color: #818182;\n background-color: #fefefe;\n border-color: #fdfdfe; }\n .alert-light hr {\n border-top-color: #ececf6; }\n .alert-light .alert-link {\n color: #686868; }\n\n.alert-dark {\n color: #1b1e21;\n background-color: #d6d8d9;\n border-color: #c6c8ca; }\n .alert-dark hr {\n border-top-color: #b9bbbe; }\n .alert-dark .alert-link {\n color: #040505; }\n\n@keyframes progress-bar-stripes {\n from {\n background-position: 1rem 0; }\n to {\n background-position: 0 0; } }\n\n.progress {\n display: flex;\n height: 1rem;\n overflow: hidden;\n font-size: 0.75rem;\n background-color: #e9ecef;\n border-radius: 0.25rem; }\n\n.progress-bar {\n display: flex;\n align-items: center;\n justify-content: center;\n color: #fff;\n background-color: #007bff; }\n\n.progress-bar-striped {\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-size: 1rem 1rem; }\n\n.progress-bar-animated {\n animation: progress-bar-stripes 1s linear infinite; }\n\n.media {\n display: flex;\n align-items: flex-start; }\n\n.media-body {\n flex: 1; }\n\n.list-group {\n display: flex;\n flex-direction: column;\n padding-left: 0;\n margin-bottom: 0; }\n\n.list-group-item-action {\n width: 100%;\n color: #495057;\n text-align: inherit; }\n .list-group-item-action:focus, .list-group-item-action:hover {\n color: #495057;\n text-decoration: none;\n background-color: #f8f9fa; }\n .list-group-item-action:active {\n color: #212529;\n background-color: #e9ecef; }\n\n.list-group-item {\n position: relative;\n display: block;\n padding: 0.75rem 1.25rem;\n margin-bottom: -1px;\n background-color: #fff;\n border: 1px solid rgba(0, 0, 0, 0.125); }\n .list-group-item:first-child {\n border-top-left-radius: 0.25rem;\n border-top-right-radius: 0.25rem; }\n .list-group-item:last-child {\n margin-bottom: 0;\n border-bottom-right-radius: 0.25rem;\n border-bottom-left-radius: 0.25rem; }\n .list-group-item:focus, .list-group-item:hover {\n text-decoration: none; }\n .list-group-item.disabled, .list-group-item:disabled {\n color: #868e96;\n background-color: #fff; }\n .list-group-item.active {\n z-index: 2;\n color: #fff;\n background-color: #007bff;\n border-color: #007bff; }\n\n.list-group-flush .list-group-item {\n border-right: 0;\n border-left: 0;\n border-radius: 0; }\n\n.list-group-flush:first-child .list-group-item:first-child {\n border-top: 0; }\n\n.list-group-flush:last-child .list-group-item:last-child {\n border-bottom: 0; }\n\n.list-group-item-primary {\n color: #004085;\n background-color: #b8daff; }\n\na.list-group-item-primary,\nbutton.list-group-item-primary {\n color: #004085; }\n a.list-group-item-primary:focus, a.list-group-item-primary:hover,\n button.list-group-item-primary:focus,\n button.list-group-item-primary:hover {\n color: #004085;\n background-color: #9fcdff; }\n a.list-group-item-primary.active,\n button.list-group-item-primary.active {\n color: #fff;\n background-color: #004085;\n border-color: #004085; }\n\n.list-group-item-secondary {\n color: #464a4e;\n background-color: #dddfe2; }\n\na.list-group-item-secondary,\nbutton.list-group-item-secondary {\n color: #464a4e; }\n a.list-group-item-secondary:focus, a.list-group-item-secondary:hover,\n button.list-group-item-secondary:focus,\n button.list-group-item-secondary:hover {\n color: #464a4e;\n background-color: #cfd2d6; }\n a.list-group-item-secondary.active,\n button.list-group-item-secondary.active {\n color: #fff;\n background-color: #464a4e;\n border-color: #464a4e; }\n\n.list-group-item-success {\n color: #155724;\n background-color: #c3e6cb; }\n\na.list-group-item-success,\nbutton.list-group-item-success {\n color: #155724; }\n a.list-group-item-success:focus, a.list-group-item-success:hover,\n button.list-group-item-success:focus,\n button.list-group-item-success:hover {\n color: #155724;\n background-color: #b1dfbb; }\n a.list-group-item-success.active,\n button.list-group-item-success.active {\n color: #fff;\n background-color: #155724;\n border-color: #155724; }\n\n.list-group-item-info {\n color: #0c5460;\n background-color: #bee5eb; }\n\na.list-group-item-info,\nbutton.list-group-item-info {\n color: #0c5460; }\n a.list-group-item-info:focus, a.list-group-item-info:hover,\n button.list-group-item-info:focus,\n button.list-group-item-info:hover {\n color: #0c5460;\n background-color: #abdde5; }\n a.list-group-item-info.active,\n button.list-group-item-info.active {\n color: #fff;\n background-color: #0c5460;\n border-color: #0c5460; }\n\n.list-group-item-warning {\n color: #856404;\n background-color: #ffeeba; }\n\na.list-group-item-warning,\nbutton.list-group-item-warning {\n color: #856404; }\n a.list-group-item-warning:focus, a.list-group-item-warning:hover,\n button.list-group-item-warning:focus,\n button.list-group-item-warning:hover {\n color: #856404;\n background-color: #ffe8a1; }\n a.list-group-item-warning.active,\n button.list-group-item-warning.active {\n color: #fff;\n background-color: #856404;\n border-color: #856404; }\n\n.list-group-item-danger {\n color: #721c24;\n background-color: #f5c6cb; }\n\na.list-group-item-danger,\nbutton.list-group-item-danger {\n color: #721c24; }\n a.list-group-item-danger:focus, a.list-group-item-danger:hover,\n button.list-group-item-danger:focus,\n button.list-group-item-danger:hover {\n color: #721c24;\n background-color: #f1b0b7; }\n a.list-group-item-danger.active,\n button.list-group-item-danger.active {\n color: #fff;\n background-color: #721c24;\n border-color: #721c24; }\n\n.list-group-item-light {\n color: #818182;\n background-color: #fdfdfe; }\n\na.list-group-item-light,\nbutton.list-group-item-light {\n color: #818182; }\n a.list-group-item-light:focus, a.list-group-item-light:hover,\n button.list-group-item-light:focus,\n button.list-group-item-light:hover {\n color: #818182;\n background-color: #ececf6; }\n a.list-group-item-light.active,\n button.list-group-item-light.active {\n color: #fff;\n background-color: #818182;\n border-color: #818182; }\n\n.list-group-item-dark {\n color: #1b1e21;\n background-color: #c6c8ca; }\n\na.list-group-item-dark,\nbutton.list-group-item-dark {\n color: #1b1e21; }\n a.list-group-item-dark:focus, a.list-group-item-dark:hover,\n button.list-group-item-dark:focus,\n button.list-group-item-dark:hover {\n color: #1b1e21;\n background-color: #b9bbbe; }\n a.list-group-item-dark.active,\n button.list-group-item-dark.active {\n color: #fff;\n background-color: #1b1e21;\n border-color: #1b1e21; }\n\n.close {\n float: right;\n font-size: 1.5rem;\n font-weight: 700;\n line-height: 1;\n color: #000;\n text-shadow: 0 1px 0 #fff;\n opacity: .5; }\n .close:focus, .close:hover {\n color: #000;\n text-decoration: none;\n opacity: .75; }\n\nbutton.close {\n padding: 0;\n background: transparent;\n border: 0;\n -webkit-appearance: none; }\n\n.modal-open {\n overflow: hidden; }\n\n.modal {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1050;\n display: none;\n overflow: hidden;\n outline: 0; }\n .modal.fade .modal-dialog {\n transition: transform 0.3s ease-out;\n transform: translate(0, -25%); }\n .modal.show .modal-dialog {\n transform: translate(0, 0); }\n\n.modal-open .modal {\n overflow-x: hidden;\n overflow-y: auto; }\n\n.modal-dialog {\n position: relative;\n width: auto;\n margin: 10px;\n pointer-events: none; }\n\n.modal-content {\n position: relative;\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n background-color: #fff;\n background-clip: padding-box;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 0.3rem;\n outline: 0; }\n\n.modal-backdrop {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1040;\n background-color: #000; }\n .modal-backdrop.fade {\n opacity: 0; }\n .modal-backdrop.show {\n opacity: 0.5; }\n\n.modal-header {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n padding: 15px;\n border-bottom: 1px solid #e9ecef;\n border-top-left-radius: 0.3rem;\n border-top-right-radius: 0.3rem; }\n .modal-header .close {\n padding: 15px;\n margin: -15px -15px -15px auto; }\n\n.modal-title {\n margin-bottom: 0;\n line-height: 1.5; }\n\n.modal-body {\n position: relative;\n flex: 1 1 auto;\n padding: 15px; }\n\n.modal-footer {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n padding: 15px;\n border-top: 1px solid #e9ecef; }\n .modal-footer > :not(:first-child) {\n margin-left: .25rem; }\n .modal-footer > :not(:last-child) {\n margin-right: .25rem; }\n\n.modal-scrollbar-measure {\n position: absolute;\n top: -9999px;\n width: 50px;\n height: 50px;\n overflow: scroll; }\n\n@media (min-width: 576px) {\n .modal-dialog {\n max-width: 500px;\n margin: 30px auto; }\n .modal-sm {\n max-width: 300px; } }\n\n@media (min-width: 992px) {\n .modal-lg {\n max-width: 800px; } }\n\n.tooltip {\n position: absolute;\n z-index: 1070;\n display: block;\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n font-style: normal;\n font-weight: 400;\n line-height: 1.5;\n text-align: left;\n text-align: start;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n letter-spacing: normal;\n word-break: normal;\n word-spacing: normal;\n white-space: normal;\n line-break: auto;\n font-size: 0.875rem;\n word-wrap: break-word;\n opacity: 0; }\n .tooltip.show {\n opacity: 0.9; }\n .tooltip .arrow {\n position: absolute;\n display: block;\n width: 5px;\n height: 5px; }\n .tooltip .arrow::before {\n position: absolute;\n border-color: transparent;\n border-style: solid; }\n .tooltip.bs-tooltip-top, .tooltip.bs-tooltip-auto[x-placement^="top"] {\n padding: 5px 0; }\n .tooltip.bs-tooltip-top .arrow, .tooltip.bs-tooltip-auto[x-placement^="top"] .arrow {\n bottom: 0; }\n .tooltip.bs-tooltip-top .arrow::before, .tooltip.bs-tooltip-auto[x-placement^="top"] .arrow::before {\n margin-left: -3px;\n content: "";\n border-width: 5px 5px 0;\n border-top-color: #000; }\n .tooltip.bs-tooltip-right, .tooltip.bs-tooltip-auto[x-placement^="right"] {\n padding: 0 5px; }\n .tooltip.bs-tooltip-right .arrow, .tooltip.bs-tooltip-auto[x-placement^="right"] .arrow {\n left: 0; }\n .tooltip.bs-tooltip-right .arrow::before, .tooltip.bs-tooltip-auto[x-placement^="right"] .arrow::before {\n margin-top: -3px;\n content: "";\n border-width: 5px 5px 5px 0;\n border-right-color: #000; }\n .tooltip.bs-tooltip-bottom, .tooltip.bs-tooltip-auto[x-placement^="bottom"] {\n padding: 5px 0; }\n .tooltip.bs-tooltip-bottom .arrow, .tooltip.bs-tooltip-auto[x-placement^="bottom"] .arrow {\n top: 0; }\n .tooltip.bs-tooltip-bottom .arrow::before, .tooltip.bs-tooltip-auto[x-placement^="bottom"] .arrow::before {\n margin-left: -3px;\n content: "";\n border-width: 0 5px 5px;\n border-bottom-color: #000; }\n .tooltip.bs-tooltip-left, .tooltip.bs-tooltip-auto[x-placement^="left"] {\n padding: 0 5px; }\n .tooltip.bs-tooltip-left .arrow, .tooltip.bs-tooltip-auto[x-placement^="left"] .arrow {\n right: 0; }\n .tooltip.bs-tooltip-left .arrow::before, .tooltip.bs-tooltip-auto[x-placement^="left"] .arrow::before {\n right: 0;\n margin-top: -3px;\n content: "";\n border-width: 5px 0 5px 5px;\n border-left-color: #000; }\n\n.tooltip-inner {\n max-width: 200px;\n padding: 3px 8px;\n color: #fff;\n text-align: center;\n background-color: #000;\n border-radius: 0.25rem; }\n\n.popover {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1060;\n display: block;\n max-width: 276px;\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n font-style: normal;\n font-weight: 400;\n line-height: 1.5;\n text-align: left;\n text-align: start;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n letter-spacing: normal;\n word-break: normal;\n word-spacing: normal;\n white-space: normal;\n line-break: auto;\n font-size: 0.875rem;\n word-wrap: break-word;\n background-color: #fff;\n background-clip: padding-box;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 0.3rem; }\n .popover .arrow {\n position: absolute;\n display: block;\n width: 0.8rem;\n height: 0.4rem; }\n .popover .arrow::before,\n .popover .arrow::after {\n position: absolute;\n display: block;\n border-color: transparent;\n border-style: solid; }\n .popover .arrow::before {\n content: "";\n border-width: 0.8rem; }\n .popover .arrow::after {\n content: "";\n border-width: 0.8rem; }\n .popover.bs-popover-top, .popover.bs-popover-auto[x-placement^="top"] {\n margin-bottom: 0.8rem; }\n .popover.bs-popover-top .arrow, .popover.bs-popover-auto[x-placement^="top"] .arrow {\n bottom: 0; }\n .popover.bs-popover-top .arrow::before, .popover.bs-popover-auto[x-placement^="top"] .arrow::before,\n .popover.bs-popover-top .arrow::after, .popover.bs-popover-auto[x-placement^="top"] .arrow::after {\n border-bottom-width: 0; }\n .popover.bs-popover-top .arrow::before, .popover.bs-popover-auto[x-placement^="top"] .arrow::before {\n bottom: -0.8rem;\n margin-left: -0.8rem;\n border-top-color: rgba(0, 0, 0, 0.25); }\n .popover.bs-popover-top .arrow::after, .popover.bs-popover-auto[x-placement^="top"] .arrow::after {\n bottom: calc((0.8rem - 1px) * -1);\n margin-left: -0.8rem;\n border-top-color: #fff; }\n .popover.bs-popover-right, .popover.bs-popover-auto[x-placement^="right"] {\n margin-left: 0.8rem; }\n .popover.bs-popover-right .arrow, .popover.bs-popover-auto[x-placement^="right"] .arrow {\n left: 0; }\n .popover.bs-popover-right .arrow::before, .popover.bs-popover-auto[x-placement^="right"] .arrow::before,\n .popover.bs-popover-right .arrow::after, .popover.bs-popover-auto[x-placement^="right"] .arrow::after {\n margin-top: -0.8rem;\n border-left-width: 0; }\n .popover.bs-popover-right .arrow::before, .popover.bs-popover-auto[x-placement^="right"] .arrow::before {\n left: -0.8rem;\n border-right-color: rgba(0, 0, 0, 0.25); }\n .popover.bs-popover-right .arrow::after, .popover.bs-popover-auto[x-placement^="right"] .arrow::after {\n left: calc((0.8rem - 1px) * -1);\n border-right-color: #fff; }\n .popover.bs-popover-bottom, .popover.bs-popover-auto[x-placement^="bottom"] {\n margin-top: 0.8rem; }\n .popover.bs-popover-bottom .arrow, .popover.bs-popover-auto[x-placement^="bottom"] .arrow {\n top: 0; }\n .popover.bs-popover-bottom .arrow::before, .popover.bs-popover-auto[x-placement^="bottom"] .arrow::before,\n .popover.bs-popover-bottom .arrow::after, .popover.bs-popover-auto[x-placement^="bottom"] .arrow::after {\n margin-left: -0.8rem;\n border-top-width: 0; }\n .popover.bs-popover-bottom .arrow::before, .popover.bs-popover-auto[x-placement^="bottom"] .arrow::before {\n top: -0.8rem;\n border-bottom-color: rgba(0, 0, 0, 0.25); }\n .popover.bs-popover-bottom .arrow::after, .popover.bs-popover-auto[x-placement^="bottom"] .arrow::after {\n top: calc((0.8rem - 1px) * -1);\n border-bottom-color: #fff; }\n .popover.bs-popover-bottom .popover-header::before, .popover.bs-popover-auto[x-placement^="bottom"] .popover-header::before {\n position: absolute;\n top: 0;\n left: 50%;\n display: block;\n width: 20px;\n margin-left: -10px;\n content: "";\n border-bottom: 1px solid #f7f7f7; }\n .popover.bs-popover-left, .popover.bs-popover-auto[x-placement^="left"] {\n margin-right: 0.8rem; }\n .popover.bs-popover-left .arrow, .popover.bs-popover-auto[x-placement^="left"] .arrow {\n right: 0; }\n .popover.bs-popover-left .arrow::before, .popover.bs-popover-auto[x-placement^="left"] .arrow::before,\n .popover.bs-popover-left .arrow::after, .popover.bs-popover-auto[x-placement^="left"] .arrow::after {\n margin-top: -0.8rem;\n border-right-width: 0; }\n .popover.bs-popover-left .arrow::before, .popover.bs-popover-auto[x-placement^="left"] .arrow::before {\n right: -0.8rem;\n border-left-color: rgba(0, 0, 0, 0.25); }\n .popover.bs-popover-left .arrow::after, .popover.bs-popover-auto[x-placement^="left"] .arrow::after {\n right: calc((0.8rem - 1px) * -1);\n border-left-color: #fff; }\n\n.popover-header {\n padding: 0.5rem 0.75rem;\n margin-bottom: 0;\n font-size: 1rem;\n color: inherit;\n background-color: #f7f7f7;\n border-bottom: 1px solid #ebebeb;\n border-top-left-radius: calc(0.3rem - 1px);\n border-top-right-radius: calc(0.3rem - 1px); }\n .popover-header:empty {\n display: none; }\n\n.popover-body {\n padding: 0.5rem 0.75rem;\n color: #212529; }\n\n.carousel {\n position: relative; }\n\n.carousel-inner {\n position: relative;\n width: 100%;\n overflow: hidden; }\n\n.carousel-item {\n position: relative;\n display: none;\n align-items: center;\n width: 100%;\n transition: transform 0.6s ease;\n backface-visibility: hidden;\n perspective: 1000px; }\n\n.carousel-item.active,\n.carousel-item-next,\n.carousel-item-prev {\n display: block; }\n\n.carousel-item-next,\n.carousel-item-prev {\n position: absolute;\n top: 0; }\n\n.carousel-item-next.carousel-item-left,\n.carousel-item-prev.carousel-item-right {\n transform: translateX(0); }\n @supports (transform-style: preserve-3d) {\n .carousel-item-next.carousel-item-left,\n .carousel-item-prev.carousel-item-right {\n transform: translate3d(0, 0, 0); } }\n\n.carousel-item-next,\n.active.carousel-item-right {\n transform: translateX(100%); }\n @supports (transform-style: preserve-3d) {\n .carousel-item-next,\n .active.carousel-item-right {\n transform: translate3d(100%, 0, 0); } }\n\n.carousel-item-prev,\n.active.carousel-item-left {\n transform: translateX(-100%); }\n @supports (transform-style: preserve-3d) {\n .carousel-item-prev,\n .active.carousel-item-left {\n transform: translate3d(-100%, 0, 0); } }\n\n.carousel-control-prev,\n.carousel-control-next {\n position: absolute;\n top: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 15%;\n color: #fff;\n text-align: center;\n opacity: 0.5; }\n .carousel-control-prev:focus, .carousel-control-prev:hover,\n .carousel-control-next:focus,\n .carousel-control-next:hover {\n color: #fff;\n text-decoration: none;\n outline: 0;\n opacity: .9; }\n\n.carousel-control-prev {\n left: 0; }\n\n.carousel-control-next {\n right: 0; }\n\n.carousel-control-prev-icon,\n.carousel-control-next-icon {\n display: inline-block;\n width: 20px;\n height: 20px;\n background: transparent no-repeat center center;\n background-size: 100% 100%; }\n\n.carousel-control-prev-icon {\n background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' fill=\'%23fff\' viewBox=\'0 0 8 8\'%3E%3Cpath d=\'M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z\'/%3E%3C/svg%3E"); }\n\n.carousel-control-next-icon {\n background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' fill=\'%23fff\' viewBox=\'0 0 8 8\'%3E%3Cpath d=\'M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z\'/%3E%3C/svg%3E"); }\n\n.carousel-indicators {\n position: absolute;\n right: 0;\n bottom: 10px;\n left: 0;\n z-index: 15;\n display: flex;\n justify-content: center;\n padding-left: 0;\n margin-right: 15%;\n margin-left: 15%;\n list-style: none; }\n .carousel-indicators li {\n position: relative;\n flex: 0 1 auto;\n width: 30px;\n height: 3px;\n margin-right: 3px;\n margin-left: 3px;\n text-indent: -999px;\n background-color: rgba(255, 255, 255, 0.5); }\n .carousel-indicators li::before {\n position: absolute;\n top: -10px;\n left: 0;\n display: inline-block;\n width: 100%;\n height: 10px;\n content: ""; }\n .carousel-indicators li::after {\n position: absolute;\n bottom: -10px;\n left: 0;\n display: inline-block;\n width: 100%;\n height: 10px;\n content: ""; }\n .carousel-indicators .active {\n background-color: #fff; }\n\n.carousel-caption {\n position: absolute;\n right: 15%;\n bottom: 20px;\n left: 15%;\n z-index: 10;\n padding-top: 20px;\n padding-bottom: 20px;\n color: #fff;\n text-align: center; }\n\n.align-baseline {\n vertical-align: baseline !important; }\n\n.align-top {\n vertical-align: top !important; }\n\n.align-middle {\n vertical-align: middle !important; }\n\n.align-bottom {\n vertical-align: bottom !important; }\n\n.align-text-bottom {\n vertical-align: text-bottom !important; }\n\n.align-text-top {\n vertical-align: text-top !important; }\n\n.bg-primary {\n background-color: #007bff !important; }\n\na.bg-primary:focus, a.bg-primary:hover {\n background-color: #0062cc !important; }\n\n.bg-secondary {\n background-color: #868e96 !important; }\n\na.bg-secondary:focus, a.bg-secondary:hover {\n background-color: #6c757d !important; }\n\n.bg-success {\n background-color: #28a745 !important; }\n\na.bg-success:focus, a.bg-success:hover {\n background-color: #1e7e34 !important; }\n\n.bg-info {\n background-color: #17a2b8 !important; }\n\na.bg-info:focus, a.bg-info:hover {\n background-color: #117a8b !important; }\n\n.bg-warning {\n background-color: #ffc107 !important; }\n\na.bg-warning:focus, a.bg-warning:hover {\n background-color: #d39e00 !important; }\n\n.bg-danger {\n background-color: #dc3545 !important; }\n\na.bg-danger:focus, a.bg-danger:hover {\n background-color: #bd2130 !important; }\n\n.bg-light {\n background-color: #f8f9fa !important; }\n\na.bg-light:focus, a.bg-light:hover {\n background-color: #dae0e5 !important; }\n\n.bg-dark {\n background-color: #343a40 !important; }\n\na.bg-dark:focus, a.bg-dark:hover {\n background-color: #1d2124 !important; }\n\n.bg-white {\n background-color: #fff !important; }\n\n.bg-transparent {\n background-color: transparent !important; }\n\n.border {\n border: 1px solid #e9ecef !important; }\n\n.border-0 {\n border: 0 !important; }\n\n.border-top-0 {\n border-top: 0 !important; }\n\n.border-right-0 {\n border-right: 0 !important; }\n\n.border-bottom-0 {\n border-bottom: 0 !important; }\n\n.border-left-0 {\n border-left: 0 !important; }\n\n.border-primary {\n border-color: #007bff !important; }\n\n.border-secondary {\n border-color: #868e96 !important; }\n\n.border-success {\n border-color: #28a745 !important; }\n\n.border-info {\n border-color: #17a2b8 !important; }\n\n.border-warning {\n border-color: #ffc107 !important; }\n\n.border-danger {\n border-color: #dc3545 !important; }\n\n.border-light {\n border-color: #f8f9fa !important; }\n\n.border-dark {\n border-color: #343a40 !important; }\n\n.border-white {\n border-color: #fff !important; }\n\n.rounded {\n border-radius: 0.25rem !important; }\n\n.rounded-top {\n border-top-left-radius: 0.25rem !important;\n border-top-right-radius: 0.25rem !important; }\n\n.rounded-right {\n border-top-right-radius: 0.25rem !important;\n border-bottom-right-radius: 0.25rem !important; }\n\n.rounded-bottom {\n border-bottom-right-radius: 0.25rem !important;\n border-bottom-left-radius: 0.25rem !important; }\n\n.rounded-left {\n border-top-left-radius: 0.25rem !important;\n border-bottom-left-radius: 0.25rem !important; }\n\n.rounded-circle {\n border-radius: 50% !important; }\n\n.rounded-0 {\n border-radius: 0 !important; }\n\n.clearfix::after {\n display: block;\n clear: both;\n content: ""; }\n\n.d-none {\n display: none !important; }\n\n.d-inline {\n display: inline !important; }\n\n.d-inline-block {\n display: inline-block !important; }\n\n.d-block {\n display: block !important; }\n\n.d-table {\n display: table !important; }\n\n.d-table-row {\n display: table-row !important; }\n\n.d-table-cell {\n display: table-cell !important; }\n\n.d-flex {\n display: flex !important; }\n\n.d-inline-flex {\n display: inline-flex !important; }\n\n@media (min-width: 576px) {\n .d-sm-none {\n display: none !important; }\n .d-sm-inline {\n display: inline !important; }\n .d-sm-inline-block {\n display: inline-block !important; }\n .d-sm-block {\n display: block !important; }\n .d-sm-table {\n display: table !important; }\n .d-sm-table-row {\n display: table-row !important; }\n .d-sm-table-cell {\n display: table-cell !important; }\n .d-sm-flex {\n display: flex !important; }\n .d-sm-inline-flex {\n display: inline-flex !important; } }\n\n@media (min-width: 768px) {\n .d-md-none {\n display: none !important; }\n .d-md-inline {\n display: inline !important; }\n .d-md-inline-block {\n display: inline-block !important; }\n .d-md-block {\n display: block !important; }\n .d-md-table {\n display: table !important; }\n .d-md-table-row {\n display: table-row !important; }\n .d-md-table-cell {\n display: table-cell !important; }\n .d-md-flex {\n display: flex !important; }\n .d-md-inline-flex {\n display: inline-flex !important; } }\n\n@media (min-width: 992px) {\n .d-lg-none {\n display: none !important; }\n .d-lg-inline {\n display: inline !important; }\n .d-lg-inline-block {\n display: inline-block !important; }\n .d-lg-block {\n display: block !important; }\n .d-lg-table {\n display: table !important; }\n .d-lg-table-row {\n display: table-row !important; }\n .d-lg-table-cell {\n display: table-cell !important; }\n .d-lg-flex {\n display: flex !important; }\n .d-lg-inline-flex {\n display: inline-flex !important; } }\n\n@media (min-width: 1200px) {\n .d-xl-none {\n display: none !important; }\n .d-xl-inline {\n display: inline !important; }\n .d-xl-inline-block {\n display: inline-block !important; }\n .d-xl-block {\n display: block !important; }\n .d-xl-table {\n display: table !important; }\n .d-xl-table-row {\n display: table-row !important; }\n .d-xl-table-cell {\n display: table-cell !important; }\n .d-xl-flex {\n display: flex !important; }\n .d-xl-inline-flex {\n display: inline-flex !important; } }\n\n.d-print-block {\n display: none !important; }\n @media print {\n .d-print-block {\n display: block !important; } }\n\n.d-print-inline {\n display: none !important; }\n @media print {\n .d-print-inline {\n display: inline !important; } }\n\n.d-print-inline-block {\n display: none !important; }\n @media print {\n .d-print-inline-block {\n display: inline-block !important; } }\n\n@media print {\n .d-print-none {\n display: none !important; } }\n\n.embed-responsive {\n position: relative;\n display: block;\n width: 100%;\n padding: 0;\n overflow: hidden; }\n .embed-responsive::before {\n display: block;\n content: ""; }\n .embed-responsive .embed-responsive-item,\n .embed-responsive iframe,\n .embed-responsive embed,\n .embed-responsive object,\n .embed-responsive video {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: 0; }\n\n.embed-responsive-21by9::before {\n padding-top: 42.85714%; }\n\n.embed-responsive-16by9::before {\n padding-top: 56.25%; }\n\n.embed-responsive-4by3::before {\n padding-top: 75%; }\n\n.embed-responsive-1by1::before {\n padding-top: 100%; }\n\n.flex-row {\n flex-direction: row !important; }\n\n.flex-column {\n flex-direction: column !important; }\n\n.flex-row-reverse {\n flex-direction: row-reverse !important; }\n\n.flex-column-reverse {\n flex-direction: column-reverse !important; }\n\n.flex-wrap {\n flex-wrap: wrap !important; }\n\n.flex-nowrap {\n flex-wrap: nowrap !important; }\n\n.flex-wrap-reverse {\n flex-wrap: wrap-reverse !important; }\n\n.justify-content-start {\n justify-content: flex-start !important; }\n\n.justify-content-end {\n justify-content: flex-end !important; }\n\n.justify-content-center {\n justify-content: center !important; }\n\n.justify-content-between {\n justify-content: space-between !important; }\n\n.justify-content-around {\n justify-content: space-around !important; }\n\n.align-items-start {\n align-items: flex-start !important; }\n\n.align-items-end {\n align-items: flex-end !important; }\n\n.align-items-center {\n align-items: center !important; }\n\n.align-items-baseline {\n align-items: baseline !important; }\n\n.align-items-stretch {\n align-items: stretch !important; }\n\n.align-content-start {\n align-content: flex-start !important; }\n\n.align-content-end {\n align-content: flex-end !important; }\n\n.align-content-center {\n align-content: center !important; }\n\n.align-content-between {\n align-content: space-between !important; }\n\n.align-content-around {\n align-content: space-around !important; }\n\n.align-content-stretch {\n align-content: stretch !important; }\n\n.align-self-auto {\n align-self: auto !important; }\n\n.align-self-start {\n align-self: flex-start !important; }\n\n.align-self-end {\n align-self: flex-end !important; }\n\n.align-self-center {\n align-self: center !important; }\n\n.align-self-baseline {\n align-self: baseline !important; }\n\n.align-self-stretch {\n align-self: stretch !important; }\n\n@media (min-width: 576px) {\n .flex-sm-row {\n flex-direction: row !important; }\n .flex-sm-column {\n flex-direction: column !important; }\n .flex-sm-row-reverse {\n flex-direction: row-reverse !important; }\n .flex-sm-column-reverse {\n flex-direction: column-reverse !important; }\n .flex-sm-wrap {\n flex-wrap: wrap !important; }\n .flex-sm-nowrap {\n flex-wrap: nowrap !important; }\n .flex-sm-wrap-reverse {\n flex-wrap: wrap-reverse !important; }\n .justify-content-sm-start {\n justify-content: flex-start !important; }\n .justify-content-sm-end {\n justify-content: flex-end !important; }\n .justify-content-sm-center {\n justify-content: center !important; }\n .justify-content-sm-between {\n justify-content: space-between !important; }\n .justify-content-sm-around {\n justify-content: space-around !important; }\n .align-items-sm-start {\n align-items: flex-start !important; }\n .align-items-sm-end {\n align-items: flex-end !important; }\n .align-items-sm-center {\n align-items: center !important; }\n .align-items-sm-baseline {\n align-items: baseline !important; }\n .align-items-sm-stretch {\n align-items: stretch !important; }\n .align-content-sm-start {\n align-content: flex-start !important; }\n .align-content-sm-end {\n align-content: flex-end !important; }\n .align-content-sm-center {\n align-content: center !important; }\n .align-content-sm-between {\n align-content: space-between !important; }\n .align-content-sm-around {\n align-content: space-around !important; }\n .align-content-sm-stretch {\n align-content: stretch !important; }\n .align-self-sm-auto {\n align-self: auto !important; }\n .align-self-sm-start {\n align-self: flex-start !important; }\n .align-self-sm-end {\n align-self: flex-end !important; }\n .align-self-sm-center {\n align-self: center !important; }\n .align-self-sm-baseline {\n align-self: baseline !important; }\n .align-self-sm-stretch {\n align-self: stretch !important; } }\n\n@media (min-width: 768px) {\n .flex-md-row {\n flex-direction: row !important; }\n .flex-md-column {\n flex-direction: column !important; }\n .flex-md-row-reverse {\n flex-direction: row-reverse !important; }\n .flex-md-column-reverse {\n flex-direction: column-reverse !important; }\n .flex-md-wrap {\n flex-wrap: wrap !important; }\n .flex-md-nowrap {\n flex-wrap: nowrap !important; }\n .flex-md-wrap-reverse {\n flex-wrap: wrap-reverse !important; }\n .justify-content-md-start {\n justify-content: flex-start !important; }\n .justify-content-md-end {\n justify-content: flex-end !important; }\n .justify-content-md-center {\n justify-content: center !important; }\n .justify-content-md-between {\n justify-content: space-between !important; }\n .justify-content-md-around {\n justify-content: space-around !important; }\n .align-items-md-start {\n align-items: flex-start !important; }\n .align-items-md-end {\n align-items: flex-end !important; }\n .align-items-md-center {\n align-items: center !important; }\n .align-items-md-baseline {\n align-items: baseline !important; }\n .align-items-md-stretch {\n align-items: stretch !important; }\n .align-content-md-start {\n align-content: flex-start !important; }\n .align-content-md-end {\n align-content: flex-end !important; }\n .align-content-md-center {\n align-content: center !important; }\n .align-content-md-between {\n align-content: space-between !important; }\n .align-content-md-around {\n align-content: space-around !important; }\n .align-content-md-stretch {\n align-content: stretch !important; }\n .align-self-md-auto {\n align-self: auto !important; }\n .align-self-md-start {\n align-self: flex-start !important; }\n .align-self-md-end {\n align-self: flex-end !important; }\n .align-self-md-center {\n align-self: center !important; }\n .align-self-md-baseline {\n align-self: baseline !important; }\n .align-self-md-stretch {\n align-self: stretch !important; } }\n\n@media (min-width: 992px) {\n .flex-lg-row {\n flex-direction: row !important; }\n .flex-lg-column {\n flex-direction: column !important; }\n .flex-lg-row-reverse {\n flex-direction: row-reverse !important; }\n .flex-lg-column-reverse {\n flex-direction: column-reverse !important; }\n .flex-lg-wrap {\n flex-wrap: wrap !important; }\n .flex-lg-nowrap {\n flex-wrap: nowrap !important; }\n .flex-lg-wrap-reverse {\n flex-wrap: wrap-reverse !important; }\n .justify-content-lg-start {\n justify-content: flex-start !important; }\n .justify-content-lg-end {\n justify-content: flex-end !important; }\n .justify-content-lg-center {\n justify-content: center !important; }\n .justify-content-lg-between {\n justify-content: space-between !important; }\n .justify-content-lg-around {\n justify-content: space-around !important; }\n .align-items-lg-start {\n align-items: flex-start !important; }\n .align-items-lg-end {\n align-items: flex-end !important; }\n .align-items-lg-center {\n align-items: center !important; }\n .align-items-lg-baseline {\n align-items: baseline !important; }\n .align-items-lg-stretch {\n align-items: stretch !important; }\n .align-content-lg-start {\n align-content: flex-start !important; }\n .align-content-lg-end {\n align-content: flex-end !important; }\n .align-content-lg-center {\n align-content: center !important; }\n .align-content-lg-between {\n align-content: space-between !important; }\n .align-content-lg-around {\n align-content: space-around !important; }\n .align-content-lg-stretch {\n align-content: stretch !important; }\n .align-self-lg-auto {\n align-self: auto !important; }\n .align-self-lg-start {\n align-self: flex-start !important; }\n .align-self-lg-end {\n align-self: flex-end !important; }\n .align-self-lg-center {\n align-self: center !important; }\n .align-self-lg-baseline {\n align-self: baseline !important; }\n .align-self-lg-stretch {\n align-self: stretch !important; } }\n\n@media (min-width: 1200px) {\n .flex-xl-row {\n flex-direction: row !important; }\n .flex-xl-column {\n flex-direction: column !important; }\n .flex-xl-row-reverse {\n flex-direction: row-reverse !important; }\n .flex-xl-column-reverse {\n flex-direction: column-reverse !important; }\n .flex-xl-wrap {\n flex-wrap: wrap !important; }\n .flex-xl-nowrap {\n flex-wrap: nowrap !important; }\n .flex-xl-wrap-reverse {\n flex-wrap: wrap-reverse !important; }\n .justify-content-xl-start {\n justify-content: flex-start !important; }\n .justify-content-xl-end {\n justify-content: flex-end !important; }\n .justify-content-xl-center {\n justify-content: center !important; }\n .justify-content-xl-between {\n justify-content: space-between !important; }\n .justify-content-xl-around {\n justify-content: space-around !important; }\n .align-items-xl-start {\n align-items: flex-start !important; }\n .align-items-xl-end {\n align-items: flex-end !important; }\n .align-items-xl-center {\n align-items: center !important; }\n .align-items-xl-baseline {\n align-items: baseline !important; }\n .align-items-xl-stretch {\n align-items: stretch !important; }\n .align-content-xl-start {\n align-content: flex-start !important; }\n .align-content-xl-end {\n align-content: flex-end !important; }\n .align-content-xl-center {\n align-content: center !important; }\n .align-content-xl-between {\n align-content: space-between !important; }\n .align-content-xl-around {\n align-content: space-around !important; }\n .align-content-xl-stretch {\n align-content: stretch !important; }\n .align-self-xl-auto {\n align-self: auto !important; }\n .align-self-xl-start {\n align-self: flex-start !important; }\n .align-self-xl-end {\n align-self: flex-end !important; }\n .align-self-xl-center {\n align-self: center !important; }\n .align-self-xl-baseline {\n align-self: baseline !important; }\n .align-self-xl-stretch {\n align-self: stretch !important; } }\n\n.float-left {\n float: left !important; }\n\n.float-right {\n float: right !important; }\n\n.float-none {\n float: none !important; }\n\n@media (min-width: 576px) {\n .float-sm-left {\n float: left !important; }\n .float-sm-right {\n float: right !important; }\n .float-sm-none {\n float: none !important; } }\n\n@media (min-width: 768px) {\n .float-md-left {\n float: left !important; }\n .float-md-right {\n float: right !important; }\n .float-md-none {\n float: none !important; } }\n\n@media (min-width: 992px) {\n .float-lg-left {\n float: left !important; }\n .float-lg-right {\n float: right !important; }\n .float-lg-none {\n float: none !important; } }\n\n@media (min-width: 1200px) {\n .float-xl-left {\n float: left !important; }\n .float-xl-right {\n float: right !important; }\n .float-xl-none {\n float: none !important; } }\n\n.position-static {\n position: static !important; }\n\n.position-relative {\n position: relative !important; }\n\n.position-absolute {\n position: absolute !important; }\n\n.position-fixed {\n position: fixed !important; }\n\n.position-sticky {\n position: sticky !important; }\n\n.fixed-top {\n position: fixed;\n top: 0;\n right: 0;\n left: 0;\n z-index: 1030; }\n\n.fixed-bottom {\n position: fixed;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1030; }\n\n@supports (position: sticky) {\n .sticky-top {\n position: sticky;\n top: 0;\n z-index: 1020; } }\n\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n clip-path: inset(50%);\n border: 0; }\n\n.sr-only-focusable:active, .sr-only-focusable:focus {\n position: static;\n width: auto;\n height: auto;\n overflow: visible;\n clip: auto;\n white-space: normal;\n clip-path: none; }\n\n.w-25 {\n width: 25% !important; }\n\n.w-50 {\n width: 50% !important; }\n\n.w-75 {\n width: 75% !important; }\n\n.w-100 {\n width: 100% !important; }\n\n.h-25 {\n height: 25% !important; }\n\n.h-50 {\n height: 50% !important; }\n\n.h-75 {\n height: 75% !important; }\n\n.h-100 {\n height: 100% !important; }\n\n.mw-100 {\n max-width: 100% !important; }\n\n.mh-100 {\n max-height: 100% !important; }\n\n.m-0 {\n margin: 0 !important; }\n\n.mt-0,\n.my-0 {\n margin-top: 0 !important; }\n\n.mr-0,\n.mx-0 {\n margin-right: 0 !important; }\n\n.mb-0,\n.my-0 {\n margin-bottom: 0 !important; }\n\n.ml-0,\n.mx-0 {\n margin-left: 0 !important; }\n\n.m-1 {\n margin: 0.25rem !important; }\n\n.mt-1,\n.my-1 {\n margin-top: 0.25rem !important; }\n\n.mr-1,\n.mx-1 {\n margin-right: 0.25rem !important; }\n\n.mb-1,\n.my-1 {\n margin-bottom: 0.25rem !important; }\n\n.ml-1,\n.mx-1 {\n margin-left: 0.25rem !important; }\n\n.m-2 {\n margin: 0.5rem !important; }\n\n.mt-2,\n.my-2 {\n margin-top: 0.5rem !important; }\n\n.mr-2,\n.mx-2 {\n margin-right: 0.5rem !important; }\n\n.mb-2,\n.my-2 {\n margin-bottom: 0.5rem !important; }\n\n.ml-2,\n.mx-2 {\n margin-left: 0.5rem !important; }\n\n.m-3 {\n margin: 1rem !important; }\n\n.mt-3,\n.my-3 {\n margin-top: 1rem !important; }\n\n.mr-3,\n.mx-3 {\n margin-right: 1rem !important; }\n\n.mb-3,\n.my-3 {\n margin-bottom: 1rem !important; }\n\n.ml-3,\n.mx-3 {\n margin-left: 1rem !important; }\n\n.m-4 {\n margin: 1.5rem !important; }\n\n.mt-4,\n.my-4 {\n margin-top: 1.5rem !important; }\n\n.mr-4,\n.mx-4 {\n margin-right: 1.5rem !important; }\n\n.mb-4,\n.my-4 {\n margin-bottom: 1.5rem !important; }\n\n.ml-4,\n.mx-4 {\n margin-left: 1.5rem !important; }\n\n.m-5 {\n margin: 3rem !important; }\n\n.mt-5,\n.my-5 {\n margin-top: 3rem !important; }\n\n.mr-5,\n.mx-5 {\n margin-right: 3rem !important; }\n\n.mb-5,\n.my-5 {\n margin-bottom: 3rem !important; }\n\n.ml-5,\n.mx-5 {\n margin-left: 3rem !important; }\n\n.p-0 {\n padding: 0 !important; }\n\n.pt-0,\n.py-0 {\n padding-top: 0 !important; }\n\n.pr-0,\n.px-0 {\n padding-right: 0 !important; }\n\n.pb-0,\n.py-0 {\n padding-bottom: 0 !important; }\n\n.pl-0,\n.px-0 {\n padding-left: 0 !important; }\n\n.p-1 {\n padding: 0.25rem !important; }\n\n.pt-1,\n.py-1 {\n padding-top: 0.25rem !important; }\n\n.pr-1,\n.px-1 {\n padding-right: 0.25rem !important; }\n\n.pb-1,\n.py-1 {\n padding-bottom: 0.25rem !important; }\n\n.pl-1,\n.px-1 {\n padding-left: 0.25rem !important; }\n\n.p-2 {\n padding: 0.5rem !important; }\n\n.pt-2,\n.py-2 {\n padding-top: 0.5rem !important; }\n\n.pr-2,\n.px-2 {\n padding-right: 0.5rem !important; }\n\n.pb-2,\n.py-2 {\n padding-bottom: 0.5rem !important; }\n\n.pl-2,\n.px-2 {\n padding-left: 0.5rem !important; }\n\n.p-3 {\n padding: 1rem !important; }\n\n.pt-3,\n.py-3 {\n padding-top: 1rem !important; }\n\n.pr-3,\n.px-3 {\n padding-right: 1rem !important; }\n\n.pb-3,\n.py-3 {\n padding-bottom: 1rem !important; }\n\n.pl-3,\n.px-3 {\n padding-left: 1rem !important; }\n\n.p-4 {\n padding: 1.5rem !important; }\n\n.pt-4,\n.py-4 {\n padding-top: 1.5rem !important; }\n\n.pr-4,\n.px-4 {\n padding-right: 1.5rem !important; }\n\n.pb-4,\n.py-4 {\n padding-bottom: 1.5rem !important; }\n\n.pl-4,\n.px-4 {\n padding-left: 1.5rem !important; }\n\n.p-5 {\n padding: 3rem !important; }\n\n.pt-5,\n.py-5 {\n padding-top: 3rem !important; }\n\n.pr-5,\n.px-5 {\n padding-right: 3rem !important; }\n\n.pb-5,\n.py-5 {\n padding-bottom: 3rem !important; }\n\n.pl-5,\n.px-5 {\n padding-left: 3rem !important; }\n\n.m-auto {\n margin: auto !important; }\n\n.mt-auto,\n.my-auto {\n margin-top: auto !important; }\n\n.mr-auto,\n.mx-auto {\n margin-right: auto !important; }\n\n.mb-auto,\n.my-auto {\n margin-bottom: auto !important; }\n\n.ml-auto,\n.mx-auto {\n margin-left: auto !important; }\n\n@media (min-width: 576px) {\n .m-sm-0 {\n margin: 0 !important; }\n .mt-sm-0,\n .my-sm-0 {\n margin-top: 0 !important; }\n .mr-sm-0,\n .mx-sm-0 {\n margin-right: 0 !important; }\n .mb-sm-0,\n .my-sm-0 {\n margin-bottom: 0 !important; }\n .ml-sm-0,\n .mx-sm-0 {\n margin-left: 0 !important; }\n .m-sm-1 {\n margin: 0.25rem !important; }\n .mt-sm-1,\n .my-sm-1 {\n margin-top: 0.25rem !important; }\n .mr-sm-1,\n .mx-sm-1 {\n margin-right: 0.25rem !important; }\n .mb-sm-1,\n .my-sm-1 {\n margin-bottom: 0.25rem !important; }\n .ml-sm-1,\n .mx-sm-1 {\n margin-left: 0.25rem !important; }\n .m-sm-2 {\n margin: 0.5rem !important; }\n .mt-sm-2,\n .my-sm-2 {\n margin-top: 0.5rem !important; }\n .mr-sm-2,\n .mx-sm-2 {\n margin-right: 0.5rem !important; }\n .mb-sm-2,\n .my-sm-2 {\n margin-bottom: 0.5rem !important; }\n .ml-sm-2,\n .mx-sm-2 {\n margin-left: 0.5rem !important; }\n .m-sm-3 {\n margin: 1rem !important; }\n .mt-sm-3,\n .my-sm-3 {\n margin-top: 1rem !important; }\n .mr-sm-3,\n .mx-sm-3 {\n margin-right: 1rem !important; }\n .mb-sm-3,\n .my-sm-3 {\n margin-bottom: 1rem !important; }\n .ml-sm-3,\n .mx-sm-3 {\n margin-left: 1rem !important; }\n .m-sm-4 {\n margin: 1.5rem !important; }\n .mt-sm-4,\n .my-sm-4 {\n margin-top: 1.5rem !important; }\n .mr-sm-4,\n .mx-sm-4 {\n margin-right: 1.5rem !important; }\n .mb-sm-4,\n .my-sm-4 {\n margin-bottom: 1.5rem !important; }\n .ml-sm-4,\n .mx-sm-4 {\n margin-left: 1.5rem !important; }\n .m-sm-5 {\n margin: 3rem !important; }\n .mt-sm-5,\n .my-sm-5 {\n margin-top: 3rem !important; }\n .mr-sm-5,\n .mx-sm-5 {\n margin-right: 3rem !important; }\n .mb-sm-5,\n .my-sm-5 {\n margin-bottom: 3rem !important; }\n .ml-sm-5,\n .mx-sm-5 {\n margin-left: 3rem !important; }\n .p-sm-0 {\n padding: 0 !important; }\n .pt-sm-0,\n .py-sm-0 {\n padding-top: 0 !important; }\n .pr-sm-0,\n .px-sm-0 {\n padding-right: 0 !important; }\n .pb-sm-0,\n .py-sm-0 {\n padding-bottom: 0 !important; }\n .pl-sm-0,\n .px-sm-0 {\n padding-left: 0 !important; }\n .p-sm-1 {\n padding: 0.25rem !important; }\n .pt-sm-1,\n .py-sm-1 {\n padding-top: 0.25rem !important; }\n .pr-sm-1,\n .px-sm-1 {\n padding-right: 0.25rem !important; }\n .pb-sm-1,\n .py-sm-1 {\n padding-bottom: 0.25rem !important; }\n .pl-sm-1,\n .px-sm-1 {\n padding-left: 0.25rem !important; }\n .p-sm-2 {\n padding: 0.5rem !important; }\n .pt-sm-2,\n .py-sm-2 {\n padding-top: 0.5rem !important; }\n .pr-sm-2,\n .px-sm-2 {\n padding-right: 0.5rem !important; }\n .pb-sm-2,\n .py-sm-2 {\n padding-bottom: 0.5rem !important; }\n .pl-sm-2,\n .px-sm-2 {\n padding-left: 0.5rem !important; }\n .p-sm-3 {\n padding: 1rem !important; }\n .pt-sm-3,\n .py-sm-3 {\n padding-top: 1rem !important; }\n .pr-sm-3,\n .px-sm-3 {\n padding-right: 1rem !important; }\n .pb-sm-3,\n .py-sm-3 {\n padding-bottom: 1rem !important; }\n .pl-sm-3,\n .px-sm-3 {\n padding-left: 1rem !important; }\n .p-sm-4 {\n padding: 1.5rem !important; }\n .pt-sm-4,\n .py-sm-4 {\n padding-top: 1.5rem !important; }\n .pr-sm-4,\n .px-sm-4 {\n padding-right: 1.5rem !important; }\n .pb-sm-4,\n .py-sm-4 {\n padding-bottom: 1.5rem !important; }\n .pl-sm-4,\n .px-sm-4 {\n padding-left: 1.5rem !important; }\n .p-sm-5 {\n padding: 3rem !important; }\n .pt-sm-5,\n .py-sm-5 {\n padding-top: 3rem !important; }\n .pr-sm-5,\n .px-sm-5 {\n padding-right: 3rem !important; }\n .pb-sm-5,\n .py-sm-5 {\n padding-bottom: 3rem !important; }\n .pl-sm-5,\n .px-sm-5 {\n padding-left: 3rem !important; }\n .m-sm-auto {\n margin: auto !important; }\n .mt-sm-auto,\n .my-sm-auto {\n margin-top: auto !important; }\n .mr-sm-auto,\n .mx-sm-auto {\n margin-right: auto !important; }\n .mb-sm-auto,\n .my-sm-auto {\n margin-bottom: auto !important; }\n .ml-sm-auto,\n .mx-sm-auto {\n margin-left: auto !important; } }\n\n@media (min-width: 768px) {\n .m-md-0 {\n margin: 0 !important; }\n .mt-md-0,\n .my-md-0 {\n margin-top: 0 !important; }\n .mr-md-0,\n .mx-md-0 {\n margin-right: 0 !important; }\n .mb-md-0,\n .my-md-0 {\n margin-bottom: 0 !important; }\n .ml-md-0,\n .mx-md-0 {\n margin-left: 0 !important; }\n .m-md-1 {\n margin: 0.25rem !important; }\n .mt-md-1,\n .my-md-1 {\n margin-top: 0.25rem !important; }\n .mr-md-1,\n .mx-md-1 {\n margin-right: 0.25rem !important; }\n .mb-md-1,\n .my-md-1 {\n margin-bottom: 0.25rem !important; }\n .ml-md-1,\n .mx-md-1 {\n margin-left: 0.25rem !important; }\n .m-md-2 {\n margin: 0.5rem !important; }\n .mt-md-2,\n .my-md-2 {\n margin-top: 0.5rem !important; }\n .mr-md-2,\n .mx-md-2 {\n margin-right: 0.5rem !important; }\n .mb-md-2,\n .my-md-2 {\n margin-bottom: 0.5rem !important; }\n .ml-md-2,\n .mx-md-2 {\n margin-left: 0.5rem !important; }\n .m-md-3 {\n margin: 1rem !important; }\n .mt-md-3,\n .my-md-3 {\n margin-top: 1rem !important; }\n .mr-md-3,\n .mx-md-3 {\n margin-right: 1rem !important; }\n .mb-md-3,\n .my-md-3 {\n margin-bottom: 1rem !important; }\n .ml-md-3,\n .mx-md-3 {\n margin-left: 1rem !important; }\n .m-md-4 {\n margin: 1.5rem !important; }\n .mt-md-4,\n .my-md-4 {\n margin-top: 1.5rem !important; }\n .mr-md-4,\n .mx-md-4 {\n margin-right: 1.5rem !important; }\n .mb-md-4,\n .my-md-4 {\n margin-bottom: 1.5rem !important; }\n .ml-md-4,\n .mx-md-4 {\n margin-left: 1.5rem !important; }\n .m-md-5 {\n margin: 3rem !important; }\n .mt-md-5,\n .my-md-5 {\n margin-top: 3rem !important; }\n .mr-md-5,\n .mx-md-5 {\n margin-right: 3rem !important; }\n .mb-md-5,\n .my-md-5 {\n margin-bottom: 3rem !important; }\n .ml-md-5,\n .mx-md-5 {\n margin-left: 3rem !important; }\n .p-md-0 {\n padding: 0 !important; }\n .pt-md-0,\n .py-md-0 {\n padding-top: 0 !important; }\n .pr-md-0,\n .px-md-0 {\n padding-right: 0 !important; }\n .pb-md-0,\n .py-md-0 {\n padding-bottom: 0 !important; }\n .pl-md-0,\n .px-md-0 {\n padding-left: 0 !important; }\n .p-md-1 {\n padding: 0.25rem !important; }\n .pt-md-1,\n .py-md-1 {\n padding-top: 0.25rem !important; }\n .pr-md-1,\n .px-md-1 {\n padding-right: 0.25rem !important; }\n .pb-md-1,\n .py-md-1 {\n padding-bottom: 0.25rem !important; }\n .pl-md-1,\n .px-md-1 {\n padding-left: 0.25rem !important; }\n .p-md-2 {\n padding: 0.5rem !important; }\n .pt-md-2,\n .py-md-2 {\n padding-top: 0.5rem !important; }\n .pr-md-2,\n .px-md-2 {\n padding-right: 0.5rem !important; }\n .pb-md-2,\n .py-md-2 {\n padding-bottom: 0.5rem !important; }\n .pl-md-2,\n .px-md-2 {\n padding-left: 0.5rem !important; }\n .p-md-3 {\n padding: 1rem !important; }\n .pt-md-3,\n .py-md-3 {\n padding-top: 1rem !important; }\n .pr-md-3,\n .px-md-3 {\n padding-right: 1rem !important; }\n .pb-md-3,\n .py-md-3 {\n padding-bottom: 1rem !important; }\n .pl-md-3,\n .px-md-3 {\n padding-left: 1rem !important; }\n .p-md-4 {\n padding: 1.5rem !important; }\n .pt-md-4,\n .py-md-4 {\n padding-top: 1.5rem !important; }\n .pr-md-4,\n .px-md-4 {\n padding-right: 1.5rem !important; }\n .pb-md-4,\n .py-md-4 {\n padding-bottom: 1.5rem !important; }\n .pl-md-4,\n .px-md-4 {\n padding-left: 1.5rem !important; }\n .p-md-5 {\n padding: 3rem !important; }\n .pt-md-5,\n .py-md-5 {\n padding-top: 3rem !important; }\n .pr-md-5,\n .px-md-5 {\n padding-right: 3rem !important; }\n .pb-md-5,\n .py-md-5 {\n padding-bottom: 3rem !important; }\n .pl-md-5,\n .px-md-5 {\n padding-left: 3rem !important; }\n .m-md-auto {\n margin: auto !important; }\n .mt-md-auto,\n .my-md-auto {\n margin-top: auto !important; }\n .mr-md-auto,\n .mx-md-auto {\n margin-right: auto !important; }\n .mb-md-auto,\n .my-md-auto {\n margin-bottom: auto !important; }\n .ml-md-auto,\n .mx-md-auto {\n margin-left: auto !important; } }\n\n@media (min-width: 992px) {\n .m-lg-0 {\n margin: 0 !important; }\n .mt-lg-0,\n .my-lg-0 {\n margin-top: 0 !important; }\n .mr-lg-0,\n .mx-lg-0 {\n margin-right: 0 !important; }\n .mb-lg-0,\n .my-lg-0 {\n margin-bottom: 0 !important; }\n .ml-lg-0,\n .mx-lg-0 {\n margin-left: 0 !important; }\n .m-lg-1 {\n margin: 0.25rem !important; }\n .mt-lg-1,\n .my-lg-1 {\n margin-top: 0.25rem !important; }\n .mr-lg-1,\n .mx-lg-1 {\n margin-right: 0.25rem !important; }\n .mb-lg-1,\n .my-lg-1 {\n margin-bottom: 0.25rem !important; }\n .ml-lg-1,\n .mx-lg-1 {\n margin-left: 0.25rem !important; }\n .m-lg-2 {\n margin: 0.5rem !important; }\n .mt-lg-2,\n .my-lg-2 {\n margin-top: 0.5rem !important; }\n .mr-lg-2,\n .mx-lg-2 {\n margin-right: 0.5rem !important; }\n .mb-lg-2,\n .my-lg-2 {\n margin-bottom: 0.5rem !important; }\n .ml-lg-2,\n .mx-lg-2 {\n margin-left: 0.5rem !important; }\n .m-lg-3 {\n margin: 1rem !important; }\n .mt-lg-3,\n .my-lg-3 {\n margin-top: 1rem !important; }\n .mr-lg-3,\n .mx-lg-3 {\n margin-right: 1rem !important; }\n .mb-lg-3,\n .my-lg-3 {\n margin-bottom: 1rem !important; }\n .ml-lg-3,\n .mx-lg-3 {\n margin-left: 1rem !important; }\n .m-lg-4 {\n margin: 1.5rem !important; }\n .mt-lg-4,\n .my-lg-4 {\n margin-top: 1.5rem !important; }\n .mr-lg-4,\n .mx-lg-4 {\n margin-right: 1.5rem !important; }\n .mb-lg-4,\n .my-lg-4 {\n margin-bottom: 1.5rem !important; }\n .ml-lg-4,\n .mx-lg-4 {\n margin-left: 1.5rem !important; }\n .m-lg-5 {\n margin: 3rem !important; }\n .mt-lg-5,\n .my-lg-5 {\n margin-top: 3rem !important; }\n .mr-lg-5,\n .mx-lg-5 {\n margin-right: 3rem !important; }\n .mb-lg-5,\n .my-lg-5 {\n margin-bottom: 3rem !important; }\n .ml-lg-5,\n .mx-lg-5 {\n margin-left: 3rem !important; }\n .p-lg-0 {\n padding: 0 !important; }\n .pt-lg-0,\n .py-lg-0 {\n padding-top: 0 !important; }\n .pr-lg-0,\n .px-lg-0 {\n padding-right: 0 !important; }\n .pb-lg-0,\n .py-lg-0 {\n padding-bottom: 0 !important; }\n .pl-lg-0,\n .px-lg-0 {\n padding-left: 0 !important; }\n .p-lg-1 {\n padding: 0.25rem !important; }\n .pt-lg-1,\n .py-lg-1 {\n padding-top: 0.25rem !important; }\n .pr-lg-1,\n .px-lg-1 {\n padding-right: 0.25rem !important; }\n .pb-lg-1,\n .py-lg-1 {\n padding-bottom: 0.25rem !important; }\n .pl-lg-1,\n .px-lg-1 {\n padding-left: 0.25rem !important; }\n .p-lg-2 {\n padding: 0.5rem !important; }\n .pt-lg-2,\n .py-lg-2 {\n padding-top: 0.5rem !important; }\n .pr-lg-2,\n .px-lg-2 {\n padding-right: 0.5rem !important; }\n .pb-lg-2,\n .py-lg-2 {\n padding-bottom: 0.5rem !important; }\n .pl-lg-2,\n .px-lg-2 {\n padding-left: 0.5rem !important; }\n .p-lg-3 {\n padding: 1rem !important; }\n .pt-lg-3,\n .py-lg-3 {\n padding-top: 1rem !important; }\n .pr-lg-3,\n .px-lg-3 {\n padding-right: 1rem !important; }\n .pb-lg-3,\n .py-lg-3 {\n padding-bottom: 1rem !important; }\n .pl-lg-3,\n .px-lg-3 {\n padding-left: 1rem !important; }\n .p-lg-4 {\n padding: 1.5rem !important; }\n .pt-lg-4,\n .py-lg-4 {\n padding-top: 1.5rem !important; }\n .pr-lg-4,\n .px-lg-4 {\n padding-right: 1.5rem !important; }\n .pb-lg-4,\n .py-lg-4 {\n padding-bottom: 1.5rem !important; }\n .pl-lg-4,\n .px-lg-4 {\n padding-left: 1.5rem !important; }\n .p-lg-5 {\n padding: 3rem !important; }\n .pt-lg-5,\n .py-lg-5 {\n padding-top: 3rem !important; }\n .pr-lg-5,\n .px-lg-5 {\n padding-right: 3rem !important; }\n .pb-lg-5,\n .py-lg-5 {\n padding-bottom: 3rem !important; }\n .pl-lg-5,\n .px-lg-5 {\n padding-left: 3rem !important; }\n .m-lg-auto {\n margin: auto !important; }\n .mt-lg-auto,\n .my-lg-auto {\n margin-top: auto !important; }\n .mr-lg-auto,\n .mx-lg-auto {\n margin-right: auto !important; }\n .mb-lg-auto,\n .my-lg-auto {\n margin-bottom: auto !important; }\n .ml-lg-auto,\n .mx-lg-auto {\n margin-left: auto !important; } }\n\n@media (min-width: 1200px) {\n .m-xl-0 {\n margin: 0 !important; }\n .mt-xl-0,\n .my-xl-0 {\n margin-top: 0 !important; }\n .mr-xl-0,\n .mx-xl-0 {\n margin-right: 0 !important; }\n .mb-xl-0,\n .my-xl-0 {\n margin-bottom: 0 !important; }\n .ml-xl-0,\n .mx-xl-0 {\n margin-left: 0 !important; }\n .m-xl-1 {\n margin: 0.25rem !important; }\n .mt-xl-1,\n .my-xl-1 {\n margin-top: 0.25rem !important; }\n .mr-xl-1,\n .mx-xl-1 {\n margin-right: 0.25rem !important; }\n .mb-xl-1,\n .my-xl-1 {\n margin-bottom: 0.25rem !important; }\n .ml-xl-1,\n .mx-xl-1 {\n margin-left: 0.25rem !important; }\n .m-xl-2 {\n margin: 0.5rem !important; }\n .mt-xl-2,\n .my-xl-2 {\n margin-top: 0.5rem !important; }\n .mr-xl-2,\n .mx-xl-2 {\n margin-right: 0.5rem !important; }\n .mb-xl-2,\n .my-xl-2 {\n margin-bottom: 0.5rem !important; }\n .ml-xl-2,\n .mx-xl-2 {\n margin-left: 0.5rem !important; }\n .m-xl-3 {\n margin: 1rem !important; }\n .mt-xl-3,\n .my-xl-3 {\n margin-top: 1rem !important; }\n .mr-xl-3,\n .mx-xl-3 {\n margin-right: 1rem !important; }\n .mb-xl-3,\n .my-xl-3 {\n margin-bottom: 1rem !important; }\n .ml-xl-3,\n .mx-xl-3 {\n margin-left: 1rem !important; }\n .m-xl-4 {\n margin: 1.5rem !important; }\n .mt-xl-4,\n .my-xl-4 {\n margin-top: 1.5rem !important; }\n .mr-xl-4,\n .mx-xl-4 {\n margin-right: 1.5rem !important; }\n .mb-xl-4,\n .my-xl-4 {\n margin-bottom: 1.5rem !important; }\n .ml-xl-4,\n .mx-xl-4 {\n margin-left: 1.5rem !important; }\n .m-xl-5 {\n margin: 3rem !important; }\n .mt-xl-5,\n .my-xl-5 {\n margin-top: 3rem !important; }\n .mr-xl-5,\n .mx-xl-5 {\n margin-right: 3rem !important; }\n .mb-xl-5,\n .my-xl-5 {\n margin-bottom: 3rem !important; }\n .ml-xl-5,\n .mx-xl-5 {\n margin-left: 3rem !important; }\n .p-xl-0 {\n padding: 0 !important; }\n .pt-xl-0,\n .py-xl-0 {\n padding-top: 0 !important; }\n .pr-xl-0,\n .px-xl-0 {\n padding-right: 0 !important; }\n .pb-xl-0,\n .py-xl-0 {\n padding-bottom: 0 !important; }\n .pl-xl-0,\n .px-xl-0 {\n padding-left: 0 !important; }\n .p-xl-1 {\n padding: 0.25rem !important; }\n .pt-xl-1,\n .py-xl-1 {\n padding-top: 0.25rem !important; }\n .pr-xl-1,\n .px-xl-1 {\n padding-right: 0.25rem !important; }\n .pb-xl-1,\n .py-xl-1 {\n padding-bottom: 0.25rem !important; }\n .pl-xl-1,\n .px-xl-1 {\n padding-left: 0.25rem !important; }\n .p-xl-2 {\n padding: 0.5rem !important; }\n .pt-xl-2,\n .py-xl-2 {\n padding-top: 0.5rem !important; }\n .pr-xl-2,\n .px-xl-2 {\n padding-right: 0.5rem !important; }\n .pb-xl-2,\n .py-xl-2 {\n padding-bottom: 0.5rem !important; }\n .pl-xl-2,\n .px-xl-2 {\n padding-left: 0.5rem !important; }\n .p-xl-3 {\n padding: 1rem !important; }\n .pt-xl-3,\n .py-xl-3 {\n padding-top: 1rem !important; }\n .pr-xl-3,\n .px-xl-3 {\n padding-right: 1rem !important; }\n .pb-xl-3,\n .py-xl-3 {\n padding-bottom: 1rem !important; }\n .pl-xl-3,\n .px-xl-3 {\n padding-left: 1rem !important; }\n .p-xl-4 {\n padding: 1.5rem !important; }\n .pt-xl-4,\n .py-xl-4 {\n padding-top: 1.5rem !important; }\n .pr-xl-4,\n .px-xl-4 {\n padding-right: 1.5rem !important; }\n .pb-xl-4,\n .py-xl-4 {\n padding-bottom: 1.5rem !important; }\n .pl-xl-4,\n .px-xl-4 {\n padding-left: 1.5rem !important; }\n .p-xl-5 {\n padding: 3rem !important; }\n .pt-xl-5,\n .py-xl-5 {\n padding-top: 3rem !important; }\n .pr-xl-5,\n .px-xl-5 {\n padding-right: 3rem !important; }\n .pb-xl-5,\n .py-xl-5 {\n padding-bottom: 3rem !important; }\n .pl-xl-5,\n .px-xl-5 {\n padding-left: 3rem !important; }\n .m-xl-auto {\n margin: auto !important; }\n .mt-xl-auto,\n .my-xl-auto {\n margin-top: auto !important; }\n .mr-xl-auto,\n .mx-xl-auto {\n margin-right: auto !important; }\n .mb-xl-auto,\n .my-xl-auto {\n margin-bottom: auto !important; }\n .ml-xl-auto,\n .mx-xl-auto {\n margin-left: auto !important; } }\n\n.text-justify {\n text-align: justify !important; }\n\n.text-nowrap {\n white-space: nowrap !important; }\n\n.text-truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap; }\n\n.text-left {\n text-align: left !important; }\n\n.text-right {\n text-align: right !important; }\n\n.text-center {\n text-align: center !important; }\n\n@media (min-width: 576px) {\n .text-sm-left {\n text-align: left !important; }\n .text-sm-right {\n text-align: right !important; }\n .text-sm-center {\n text-align: center !important; } }\n\n@media (min-width: 768px) {\n .text-md-left {\n text-align: left !important; }\n .text-md-right {\n text-align: right !important; }\n .text-md-center {\n text-align: center !important; } }\n\n@media (min-width: 992px) {\n .text-lg-left {\n text-align: left !important; }\n .text-lg-right {\n text-align: right !important; }\n .text-lg-center {\n text-align: center !important; } }\n\n@media (min-width: 1200px) {\n .text-xl-left {\n text-align: left !important; }\n .text-xl-right {\n text-align: right !important; }\n .text-xl-center {\n text-align: center !important; } }\n\n.text-lowercase {\n text-transform: lowercase !important; }\n\n.text-uppercase {\n text-transform: uppercase !important; }\n\n.text-capitalize {\n text-transform: capitalize !important; }\n\n.font-weight-light {\n font-weight: 300 !important; }\n\n.font-weight-normal {\n font-weight: 400 !important; }\n\n.font-weight-bold {\n font-weight: 700 !important; }\n\n.font-italic {\n font-style: italic !important; }\n\n.text-white {\n color: #fff !important; }\n\n.text-primary {\n color: #007bff !important; }\n\na.text-primary:focus, a.text-primary:hover {\n color: #0062cc !important; }\n\n.text-secondary {\n color: #868e96 !important; }\n\na.text-secondary:focus, a.text-secondary:hover {\n color: #6c757d !important; }\n\n.text-success {\n color: #28a745 !important; }\n\na.text-success:focus, a.text-success:hover {\n color: #1e7e34 !important; }\n\n.text-info {\n color: #17a2b8 !important; }\n\na.text-info:focus, a.text-info:hover {\n color: #117a8b !important; }\n\n.text-warning {\n color: #ffc107 !important; }\n\na.text-warning:focus, a.text-warning:hover {\n color: #d39e00 !important; }\n\n.text-danger {\n color: #dc3545 !important; }\n\na.text-danger:focus, a.text-danger:hover {\n color: #bd2130 !important; }\n\n.text-light {\n color: #f8f9fa !important; }\n\na.text-light:focus, a.text-light:hover {\n color: #dae0e5 !important; }\n\n.text-dark {\n color: #343a40 !important; }\n\na.text-dark:focus, a.text-dark:hover {\n color: #1d2124 !important; }\n\n.text-muted {\n color: #868e96 !important; }\n\n.text-hide {\n font: 0/0 a;\n color: transparent;\n text-shadow: none;\n background-color: transparent;\n border: 0; }\n\n.visible {\n visibility: visible !important; }\n\n.invisible {\n visibility: hidden !important; }\n\n.boxed-content {\n background: #afafaf;\n z-index: 10000;\n position: relative;\n width: 99.984%;\n border-radius: 5px;\n box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); }\n\nimg {\n max-width: 100%;\n vertical-align: middle; }\n\nbody {\n font-family: Tahoma, Geneva, sans-serif;\n font-size: 16px;\n line-height: 1.5;\n font-weight: 300;\n background-attachment: fixed !important;\n background: #fff2f6 url('+e(475)+");\n -webkit-text-size-adjust: 100%;\n overflow-x: hidden;\n display: block;\n max-width: 1500px;\n margin: auto;\n padding: 40px 50px; }\n\n.control-panel {\n text-align: center;\n padding: 1em;\n box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); }\n\n.message-container {\n box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); }\n\n.messages {\n padding: 1em; }\n\n.success {\n padding: 0.5em;\n background-color: rgba(0, 175, 0, 0.5);\n color: white; }\n\n.failure {\n padding: 0.5em;\n background-color: rgba(175, 0, 0, 0.5);\n color: white; }\n",""])},471:function(n,t){function cssWithMappingToString(n,t){var e=n[1]||"",r=n[3];if(!r)return e;if(t&&"function"==typeof btoa){var o=toComment(r);return[e].concat(r.sources.map(function(n){return"/*# sourceURL="+r.sourceRoot+n+" */"})).concat([o]).join("\n")}return[e].join("\n")}function toComment(n){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"}n.exports=function(n){var t=[];return t.toString=function(){return this.map(function(t){var e=cssWithMappingToString(t,n);return t[2]?"@media "+t[2]+"{"+e+"}":e}).join("")},t.i=function(n,e){"string"==typeof n&&(n=[[null,n,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<n.length;o++){var a=n[o];"number"==typeof a[0]&&r[a[0]]||(e&&!a[2]?a[2]=e:e&&(a[2]="("+a[2]+") and ("+e+")"),t.push(a))}},t}},473:function(n,t){n.exports={"boxed-content":"boxed-content","app-container":"app-container","slider-bro":"slider-bro","dead-mans-switch":"dead-mans-switch","view-container":"view-container","content-container":"content-container"}},474:function(n,t,e){var r=e(470);"string"==typeof r&&(r=[[n.i,r,""]]);var o={};o.transform=void 0;e(756)(r,o);r.locals&&(n.exports=r.locals)},475:function(n,t,e){n.exports=e.p+"stripe.ea57599555451c53af1db0db4f5b2664.png"},477:function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(n){function microtaskDebounce(n){var t=!1;return function(){t||(t=!0,Promise.resolve().then(function(){t=!1,n()}))}}function taskDebounce(n){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,n()},o))}}function isFunction(n){var t={};return n&&"[object Function]"===t.toString.call(n)}function getStyleComputedProperty(n,t){if(1!==n.nodeType)return[];var e=window.getComputedStyle(n,null);return t?e[t]:e}function getParentNode(n){return"HTML"===n.nodeName?n:n.parentNode||n.host}function getScrollParent(n){if(!n)return window.document.body;switch(n.nodeName){case"HTML":case"BODY":return n.ownerDocument.body;case"#document":return n.body}var t=getStyleComputedProperty(n),e=t.overflow,r=t.overflowX;return/(auto|scroll)/.test(e+t.overflowY+r)?n:getScrollParent(getParentNode(n))}function getOffsetParent(n){var t=n&&n.offsetParent,e=t&&t.nodeName;return e&&"BODY"!==e&&"HTML"!==e?-1!==["TD","TABLE"].indexOf(t.nodeName)&&"static"===getStyleComputedProperty(t,"position")?getOffsetParent(t):t:n?n.ownerDocument.documentElement:window.document.documentElement}function isOffsetContainer(n){var t=n.nodeName;return"BODY"!==t&&("HTML"===t||getOffsetParent(n.firstElementChild)===n)}function getRoot(n){return null!==n.parentNode?getRoot(n.parentNode):n}function findCommonOffsetParent(n,t){if(!(n&&n.nodeType&&t&&t.nodeType))return window.document.documentElement;var e=n.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=e?n:t,o=e?t:n,i=document.createRange();i.setStart(r,0),i.setEnd(o,0);var a=i.commonAncestorContainer;if(n!==a&&t!==a||r.contains(o))return isOffsetContainer(a)?a:getOffsetParent(a);var s=getRoot(n);return s.host?findCommonOffsetParent(s.host,t):findCommonOffsetParent(n,getRoot(t).host)}function getScroll(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",e="top"===t?"scrollTop":"scrollLeft",r=n.nodeName;if("BODY"===r||"HTML"===r){var o=n.ownerDocument.documentElement;return(n.ownerDocument.scrollingElement||o)[e]}return n[e]}function includeScroll(n,t){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=getScroll(t,"top"),o=getScroll(t,"left"),i=e?-1:1;return n.top+=r*i,n.bottom+=r*i,n.left+=o*i,n.right+=o*i,n}function getBordersSize(n,t){var e="x"===t?"Left":"Top",r="Left"===e?"Right":"Bottom";return+n["border"+e+"Width"].split("px")[0]+ +n["border"+r+"Width"].split("px")[0]}function getSize(n,t,e,r){return Math.max(t["offset"+n],t["scroll"+n],e["client"+n],e["offset"+n],e["scroll"+n],d()?e["offset"+n]+r["margin"+("Height"===n?"Top":"Left")]+r["margin"+("Height"===n?"Bottom":"Right")]:0)}function getWindowSizes(){var n=window.document.body,t=window.document.documentElement,e=d()&&window.getComputedStyle(t);return{height:getSize("Height",n,t,e),width:getSize("Width",n,t,e)}}function getClientRect(n){return u({},n,{right:n.left+n.width,bottom:n.top+n.height})}function getBoundingClientRect(n){var t={};if(d())try{t=n.getBoundingClientRect();var e=getScroll(n,"top"),r=getScroll(n,"left");t.top+=e,t.left+=r,t.bottom+=e,t.right+=r}catch(n){}else t=n.getBoundingClientRect();var o={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},i="HTML"===n.nodeName?getWindowSizes():{},a=i.width||n.clientWidth||o.right-o.left,s=i.height||n.clientHeight||o.bottom-o.top,l=n.offsetWidth-a,p=n.offsetHeight-s;if(l||p){var c=getStyleComputedProperty(n);l-=getBordersSize(c,"x"),p-=getBordersSize(c,"y"),o.width-=l,o.height-=p}return getClientRect(o)}function getOffsetRectRelativeToArbitraryNode(n,t){var e=d(),r="HTML"===t.nodeName,o=getBoundingClientRect(n),i=getBoundingClientRect(t),a=getScrollParent(n),s=getStyleComputedProperty(t),l=+s.borderTopWidth.split("px")[0],p=+s.borderLeftWidth.split("px")[0],c=getClientRect({top:o.top-i.top-l,left:o.left-i.left-p,width:o.width,height:o.height});if(c.marginTop=0,c.marginLeft=0,!e&&r){var m=+s.marginTop.split("px")[0],u=+s.marginLeft.split("px")[0];c.top-=l-m,c.bottom-=l-m,c.left-=p-u,c.right-=p-u,c.marginTop=m,c.marginLeft=u}return(e?t.contains(a):t===a&&"BODY"!==a.nodeName)&&(c=includeScroll(c,t)),c}function getViewportOffsetRectRelativeToArtbitraryNode(n){var t=n.ownerDocument.documentElement,e=getOffsetRectRelativeToArbitraryNode(n,t),r=Math.max(t.clientWidth,window.innerWidth||0),o=Math.max(t.clientHeight,window.innerHeight||0),i=getScroll(t),a=getScroll(t,"left");return getClientRect({top:i-e.top+e.marginTop,left:a-e.left+e.marginLeft,width:r,height:o})}function isFixed(n){var t=n.nodeName;return"BODY"!==t&&"HTML"!==t&&("fixed"===getStyleComputedProperty(n,"position")||isFixed(getParentNode(n)))}function getBoundaries(n,t,e,r){var o={top:0,left:0},i=findCommonOffsetParent(n,t);if("viewport"===r)o=getViewportOffsetRectRelativeToArtbitraryNode(i);else{var a=void 0;"scrollParent"===r?(a=getScrollParent(getParentNode(n)),"BODY"===a.nodeName&&(a=n.ownerDocument.documentElement)):a="window"===r?n.ownerDocument.documentElement:r;var s=getOffsetRectRelativeToArbitraryNode(a,i);if("HTML"!==a.nodeName||isFixed(i))o=s;else{var l=getWindowSizes(),d=l.height,p=l.width;o.top+=s.top-s.marginTop,o.bottom=d+s.top,o.left+=s.left-s.marginLeft,o.right=p+s.left}}return o.left+=e,o.top+=e,o.right-=e,o.bottom-=e,o}function getArea(n){return n.width*n.height}function computeAutoPlacement(n,t,e,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===n.indexOf("auto"))return n;var a=getBoundaries(e,r,i,o),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},l=Object.keys(s).map(function(n){return u({key:n},s[n],{area:getArea(s[n])})}).sort(function(n,t){return t.area-n.area}),d=l.filter(function(n){var t=n.width,r=n.height;return t>=e.clientWidth&&r>=e.clientHeight}),p=d.length>0?d[0].key:l[0].key,c=n.split("-")[1];return p+(c?"-"+c:"")}function getReferenceOffsets(n,t,e){return getOffsetRectRelativeToArbitraryNode(e,findCommonOffsetParent(t,e))}function getOuterSizes(n){var t=window.getComputedStyle(n),e=parseFloat(t.marginTop)+parseFloat(t.marginBottom),r=parseFloat(t.marginLeft)+parseFloat(t.marginRight);return{width:n.offsetWidth+r,height:n.offsetHeight+e}}function getOppositePlacement(n){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return n.replace(/left|right|bottom|top/g,function(n){return t[n]})}function getPopperOffsets(n,t,e){e=e.split("-")[0];var r=getOuterSizes(n),o={width:r.width,height:r.height},i=-1!==["right","left"].indexOf(e),a=i?"top":"left",s=i?"left":"top",l=i?"height":"width",d=i?"width":"height";return o[a]=t[a]+t[l]/2-r[l]/2,o[s]=e===s?t[s]-r[d]:t[getOppositePlacement(s)],o}function find(n,t){return Array.prototype.find?n.find(t):n.filter(t)[0]}function findIndex(n,t,e){if(Array.prototype.findIndex)return n.findIndex(function(n){return n[t]===e});var r=find(n,function(n){return n[t]===e});return n.indexOf(r)}function runModifiers(n,t,e){return(void 0===e?n:n.slice(0,findIndex(n,"name",e))).forEach(function(n){n.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var e=n.function||n.fn;n.enabled&&isFunction(e)&&(t.offsets.popper=getClientRect(t.offsets.popper),t.offsets.reference=getClientRect(t.offsets.reference),t=e(t,n))}),t}function update(){if(!this.state.isDestroyed){var n={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};n.offsets.reference=getReferenceOffsets(this.state,this.popper,this.reference),n.placement=computeAutoPlacement(this.options.placement,n.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),n.originalPlacement=n.placement,n.offsets.popper=getPopperOffsets(this.popper,n.offsets.reference,n.placement),n.offsets.popper.position="absolute",n=runModifiers(this.modifiers,n),this.state.isCreated?this.options.onUpdate(n):(this.state.isCreated=!0,this.options.onCreate(n))}}function isModifierEnabled(n,t){return n.some(function(n){var e=n.name;return n.enabled&&e===t})}function getSupportedPropertyName(n){for(var t=[!1,"ms","Webkit","Moz","O"],e=n.charAt(0).toUpperCase()+n.slice(1),r=0;r<t.length-1;r++){var o=t[r],i=o?""+o+e:n;if(void 0!==window.document.body.style[i])return i}return null}function destroy(){return this.state.isDestroyed=!0,isModifierEnabled(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.left="",this.popper.style.position="",this.popper.style.top="",this.popper.style[getSupportedPropertyName("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function getWindow(n){var t=n.ownerDocument;return t?t.defaultView:window}function attachToScrollParents(n,t,e,r){var o="BODY"===n.nodeName,i=o?n.ownerDocument.defaultView:n;i.addEventListener(t,e,{passive:!0}),o||attachToScrollParents(getScrollParent(i.parentNode),t,e,r),r.push(i)}function setupEventListeners(n,t,e,r){e.updateBound=r,getWindow(n).addEventListener("resize",e.updateBound,{passive:!0});var o=getScrollParent(n);return attachToScrollParents(o,"scroll",e.updateBound,e.scrollParents),e.scrollElement=o,e.eventsEnabled=!0,e}function enableEventListeners(){this.state.eventsEnabled||(this.state=setupEventListeners(this.reference,this.options,this.state,this.scheduleUpdate))}function removeEventListeners(n,t){return getWindow(n).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(n){n.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function disableEventListeners(){this.state.eventsEnabled&&(window.cancelAnimationFrame(this.scheduleUpdate),this.state=removeEventListeners(this.reference,this.state))}function isNumeric(n){return""!==n&&!isNaN(parseFloat(n))&&isFinite(n)}function setStyles(n,t){Object.keys(t).forEach(function(e){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(e)&&isNumeric(t[e])&&(r="px"),n.style[e]=t[e]+r})}function setAttributes(n,t){Object.keys(t).forEach(function(e){!1!==t[e]?n.setAttribute(e,t[e]):n.removeAttribute(e)})}function applyStyle(n){return setStyles(n.instance.popper,n.styles),setAttributes(n.instance.popper,n.attributes),n.arrowElement&&Object.keys(n.arrowStyles).length&&setStyles(n.arrowElement,n.arrowStyles),n}function applyStyleOnLoad(n,t,e,r,o){var i=getReferenceOffsets(o,t,n),a=computeAutoPlacement(e.placement,i,t,n,e.modifiers.flip.boundariesElement,e.modifiers.flip.padding);return t.setAttribute("x-placement",a),setStyles(t,{position:"absolute"}),e}function computeStyle(n,t){var e=t.x,r=t.y,o=n.offsets.popper,i=find(n.instance.modifiers,function(n){return"applyStyle"===n.name}).gpuAcceleration;void 0!==i&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==i?i:t.gpuAcceleration,s=getOffsetParent(n.instance.popper),l=getBoundingClientRect(s),d={position:o.position},p={left:Math.floor(o.left),top:Math.floor(o.top),bottom:Math.floor(o.bottom),right:Math.floor(o.right)},c="bottom"===e?"top":"bottom",m="right"===r?"left":"right",f=getSupportedPropertyName("transform"),g=void 0,h=void 0;if(h="bottom"===c?-l.height+p.bottom:p.top,g="right"===m?-l.width+p.right:p.left,a&&f)d[f]="translate3d("+g+"px, "+h+"px, 0)",d[c]=0,d[m]=0,d.willChange="transform";else{var b="bottom"===c?-1:1,y="right"===m?-1:1;d[c]=h*b,d[m]=g*y,d.willChange=c+", "+m}var v={"x-placement":n.placement};return n.attributes=u({},v,n.attributes),n.styles=u({},d,n.styles),n.arrowStyles=u({},n.offsets.arrow,n.arrowStyles),n}function isModifierRequired(n,t,e){var r=find(n,function(n){return n.name===t}),o=!!r&&n.some(function(n){return n.name===e&&n.enabled&&n.order<r.order});if(!o){var i="`"+t+"`",a="`"+e+"`";console.warn(a+" modifier is required by "+i+" modifier in order to work, be sure to include it before "+i+"!")}return o}function arrow(n,t){if(!isModifierRequired(n.instance.modifiers,"arrow","keepTogether"))return n;var e=t.element;if("string"==typeof e){if(!(e=n.instance.popper.querySelector(e)))return n}else if(!n.instance.popper.contains(e))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),n;var r=n.placement.split("-")[0],o=n.offsets,i=o.popper,a=o.reference,s=-1!==["left","right"].indexOf(r),l=s?"height":"width",d=s?"Top":"Left",p=d.toLowerCase(),c=s?"left":"top",m=s?"bottom":"right",u=getOuterSizes(e)[l];a[m]-u<i[p]&&(n.offsets.popper[p]-=i[p]-(a[m]-u)),a[p]+u>i[m]&&(n.offsets.popper[p]+=a[p]+u-i[m]);var f=a[p]+a[l]/2-u/2,g=getStyleComputedProperty(n.instance.popper,"margin"+d).replace("px",""),h=f-getClientRect(n.offsets.popper)[p]-g;return h=Math.max(Math.min(i[l]-u,h),0),n.arrowElement=e,n.offsets.arrow={},n.offsets.arrow[p]=Math.round(h),n.offsets.arrow[c]="",n}function getOppositeVariation(n){return"end"===n?"start":"start"===n?"end":n}function clockwise(n){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=g.indexOf(n),r=g.slice(e+1).concat(g.slice(0,e));return t?r.reverse():r}function flip(n,t){if(isModifierEnabled(n.instance.modifiers,"inner"))return n;if(n.flipped&&n.placement===n.originalPlacement)return n;var e=getBoundaries(n.instance.popper,n.instance.reference,t.padding,t.boundariesElement),r=n.placement.split("-")[0],o=getOppositePlacement(r),i=n.placement.split("-")[1]||"",a=[];switch(t.behavior){case h.FLIP:a=[r,o];break;case h.CLOCKWISE:a=clockwise(r);break;case h.COUNTERCLOCKWISE:a=clockwise(r,!0);break;default:a=t.behavior}return a.forEach(function(s,l){if(r!==s||a.length===l+1)return n;r=n.placement.split("-")[0],o=getOppositePlacement(r);var d=n.offsets.popper,p=n.offsets.reference,c=Math.floor,m="left"===r&&c(d.right)>c(p.left)||"right"===r&&c(d.left)<c(p.right)||"top"===r&&c(d.bottom)>c(p.top)||"bottom"===r&&c(d.top)<c(p.bottom),f=c(d.left)<c(e.left),g=c(d.right)>c(e.right),h=c(d.top)<c(e.top),b=c(d.bottom)>c(e.bottom),y="left"===r&&f||"right"===r&&g||"top"===r&&h||"bottom"===r&&b,v=-1!==["top","bottom"].indexOf(r),x=!!t.flipVariations&&(v&&"start"===i&&f||v&&"end"===i&&g||!v&&"start"===i&&h||!v&&"end"===i&&b);(m||y||x)&&(n.flipped=!0,(m||y)&&(r=a[l+1]),x&&(i=getOppositeVariation(i)),n.placement=r+(i?"-"+i:""),n.offsets.popper=u({},n.offsets.popper,getPopperOffsets(n.instance.popper,n.offsets.reference,n.placement)),n=runModifiers(n.instance.modifiers,n,"flip"))}),n}function keepTogether(n){var t=n.offsets,e=t.popper,r=t.reference,o=n.placement.split("-")[0],i=Math.floor,a=-1!==["top","bottom"].indexOf(o),s=a?"right":"bottom",l=a?"left":"top",d=a?"width":"height";return e[s]<i(r[l])&&(n.offsets.popper[l]=i(r[l])-e[d]),e[l]>i(r[s])&&(n.offsets.popper[l]=i(r[s])),n}function toValue(n,t,e,r){var o=n.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+o[1],a=o[2];if(!i)return n;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=e;break;case"%":case"%r":default:s=r}return getClientRect(s)[t]/100*i}if("vh"===a||"vw"===a){return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*i}return i}function parseOffset(n,t,e,r){var o=[0,0],i=-1!==["right","left"].indexOf(r),a=n.split(/(\+|\-)/).map(function(n){return n.trim()}),s=a.indexOf(find(a,function(n){return-1!==n.search(/,|\s/)}));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,d=-1!==s?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return d=d.map(function(n,r){var o=(1===r?!i:i)?"height":"width",a=!1;return n.reduce(function(n,t){return""===n[n.length-1]&&-1!==["+","-"].indexOf(t)?(n[n.length-1]=t,a=!0,n):a?(n[n.length-1]+=t,a=!1,n):n.concat(t)},[]).map(function(n){return toValue(n,o,t,e)})}),d.forEach(function(n,t){n.forEach(function(e,r){isNumeric(e)&&(o[t]+=e*("-"===n[r-1]?-1:1))})}),o}function offset(n,t){var e=t.offset,r=n.placement,o=n.offsets,i=o.popper,a=o.reference,s=r.split("-")[0],l=void 0;return l=isNumeric(+e)?[+e,0]:parseOffset(e,i,a,s),"left"===s?(i.top+=l[0],i.left-=l[1]):"right"===s?(i.top+=l[0],i.left+=l[1]):"top"===s?(i.left+=l[0],i.top-=l[1]):"bottom"===s&&(i.left+=l[0],i.top+=l[1]),n.popper=i,n}function preventOverflow(n,t){var e=t.boundariesElement||getOffsetParent(n.instance.popper);n.instance.reference===e&&(e=getOffsetParent(e));var r=getBoundaries(n.instance.popper,n.instance.reference,t.padding,e);t.boundaries=r;var o=t.priority,i=n.offsets.popper,a={primary:function(n){var e=i[n];return i[n]<r[n]&&!t.escapeWithReference&&(e=Math.max(i[n],r[n])),m({},n,e)},secondary:function(n){var e="right"===n?"left":"top",o=i[e];return i[n]>r[n]&&!t.escapeWithReference&&(o=Math.min(i[e],r[n]-("right"===n?i.width:i.height))),m({},e,o)}};return o.forEach(function(n){var t=-1!==["left","top"].indexOf(n)?"primary":"secondary";i=u({},i,a[t](n))}),n.offsets.popper=i,n}function shift(n){var t=n.placement,e=t.split("-")[0],r=t.split("-")[1];if(r){var o=n.offsets,i=o.reference,a=o.popper,s=-1!==["bottom","top"].indexOf(e),l=s?"left":"top",d=s?"width":"height",p={start:m({},l,i[l]),end:m({},l,i[l]+i[d]-a[d])};n.offsets.popper=u({},a,p[r])}return n}function hide(n){if(!isModifierRequired(n.instance.modifiers,"hide","preventOverflow"))return n;var t=n.offsets.reference,e=find(n.instance.modifiers,function(n){return"preventOverflow"===n.name}).boundaries;if(t.bottom<e.top||t.left>e.right||t.top>e.bottom||t.right<e.left){if(!0===n.hide)return n;n.hide=!0,n.attributes["x-out-of-boundaries"]=""}else{if(!1===n.hide)return n;n.hide=!1,n.attributes["x-out-of-boundaries"]=!1}return n}function inner(n){var t=n.placement,e=t.split("-")[0],r=n.offsets,o=r.popper,i=r.reference,a=-1!==["left","right"].indexOf(e),s=-1===["top","left"].indexOf(e);return o[a?"left":"top"]=i[e]-(s?o[a?"width":"height"]:0),n.placement=getOppositePlacement(t),n.offsets.popper=getClientRect(o),n}for(var e="undefined"!=typeof window&&void 0!==window.document,r=["Edge","Trident","Firefox"],o=0,i=0;i<r.length;i+=1)if(e&&navigator.userAgent.indexOf(r[i])>=0){o=1;break}var a=e&&window.Promise,s=a?microtaskDebounce:taskDebounce,l=void 0,d=function(){return void 0===l&&(l=-1!==navigator.appVersion.indexOf("MSIE 10")),l},p=function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")},c=function(){function defineProperties(n,t){for(var e=0;e<t.length;e++){var r=t[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}return function(n,t,e){return t&&defineProperties(n.prototype,t),e&&defineProperties(n,e),n}}(),m=function(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n},u=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r])}return n},f=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],g=f.slice(3),h={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},b={shift:{order:100,enabled:!0,fn:shift},offset:{order:200,enabled:!0,fn:offset,offset:0},preventOverflow:{order:300,enabled:!0,fn:preventOverflow,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:keepTogether},arrow:{order:500,enabled:!0,fn:arrow,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:flip,behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:inner},hide:{order:800,enabled:!0,fn:hide},computeStyle:{order:850,enabled:!0,fn:computeStyle,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:applyStyle,onLoad:applyStyleOnLoad,gpuAcceleration:void 0}},y={placement:"bottom",eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:b},v=function(){function Popper(n,t){var e=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};p(this,Popper),this.scheduleUpdate=function(){return requestAnimationFrame(e.update)},this.update=s(this.update.bind(this)),this.options=u({},Popper.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=n&&n.jquery?n[0]:n,this.popper=t&&t.jquery?t[0]:t,this.options.modifiers={},Object.keys(u({},Popper.Defaults.modifiers,r.modifiers)).forEach(function(n){e.options.modifiers[n]=u({},Popper.Defaults.modifiers[n]||{},r.modifiers?r.modifiers[n]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(n){return u({name:n},e.options.modifiers[n])}).sort(function(n,t){return n.order-t.order}),this.modifiers.forEach(function(n){n.enabled&&isFunction(n.onLoad)&&n.onLoad(e.reference,e.popper,e.options,n,e.state)}),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return c(Popper,[{key:"update",value:function(){return update.call(this)}},{key:"destroy",value:function(){return destroy.call(this)}},{key:"enableEventListeners",value:function(){return enableEventListeners.call(this)}},{key:"disableEventListeners",value:function(){return disableEventListeners.call(this)}}]),Popper}();v.Utils=("undefined"!=typeof window?window:n).PopperUtils,v.placements=f,v.Defaults=y,t.default=v}.call(t,e(53))},756:function(n,t,e){function addStylesToDom(n,t){for(var e=0;e<n.length;e++){var o=n[e],i=r[o.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](o.parts[a]);for(;a<o.parts.length;a++)i.parts.push(addStyle(o.parts[a],t))}else{for(var s=[],a=0;a<o.parts.length;a++)s.push(addStyle(o.parts[a],t));r[o.id]={id:o.id,refs:1,parts:s}}}}function listToStyles(n,t){for(var e=[],r={},o=0;o<n.length;o++){var i=n[o],a=t.base?i[0]+t.base:i[0],s=i[1],l=i[2],d=i[3],p={css:s,media:l,sourceMap:d};r[a]?r[a].parts.push(p):e.push(r[a]={id:a,parts:[p]})}return e}function insertStyleElement(n,t){var e=i(n.insertInto);if(!e)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=l[l.length-1];if("top"===n.insertAt)r?r.nextSibling?e.insertBefore(t,r.nextSibling):e.appendChild(t):e.insertBefore(t,e.firstChild),l.push(t);else{if("bottom"!==n.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");e.appendChild(t)}}function removeStyleElement(n){if(null===n.parentNode)return!1;n.parentNode.removeChild(n);var t=l.indexOf(n);t>=0&&l.splice(t,1)}function createStyleElement(n){var t=document.createElement("style");return n.attrs.type="text/css",addAttrs(t,n.attrs),insertStyleElement(n,t),t}function createLinkElement(n){var t=document.createElement("link");return n.attrs.type="text/css",n.attrs.rel="stylesheet",addAttrs(t,n.attrs),insertStyleElement(n,t),t}function addAttrs(n,t){Object.keys(t).forEach(function(e){n.setAttribute(e,t[e])})}function addStyle(n,t){var e,r,o,i;if(t.transform&&n.css){if(!(i=t.transform(n.css)))return function(){};n.css=i}if(t.singleton){var l=s++;e=a||(a=createStyleElement(t)),r=applyToSingletonTag.bind(null,e,l,!1),o=applyToSingletonTag.bind(null,e,l,!0)}else n.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(e=createLinkElement(t),r=updateLink.bind(null,e,t),o=function(){removeStyleElement(e),e.href&&URL.revokeObjectURL(e.href)}):(e=createStyleElement(t),r=applyToTag.bind(null,e),o=function(){removeStyleElement(e)});return r(n),function(t){if(t){if(t.css===n.css&&t.media===n.media&&t.sourceMap===n.sourceMap)return;r(n=t)}else o()}}function applyToSingletonTag(n,t,e,r){var o=e?"":r.css;if(n.styleSheet)n.styleSheet.cssText=p(t,o);else{var i=document.createTextNode(o),a=n.childNodes;a[t]&&n.removeChild(a[t]),a.length?n.insertBefore(i,a[t]):n.appendChild(i)}}function applyToTag(n,t){var e=t.css,r=t.media;if(r&&n.setAttribute("media",r),n.styleSheet)n.styleSheet.cssText=e;else{for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(document.createTextNode(e))}}function updateLink(n,t,e){var r=e.css,o=e.sourceMap,i=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||i)&&(r=d(r)),o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),s=n.href;n.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}var r={},o=function(n){var t;return function(){return void 0===t&&(t=n.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),i=function(n){var t={};return function(e){return void 0===t[e]&&(t[e]=n.call(this,e)),t[e]}}(function(n){return document.querySelector(n)}),a=null,s=0,l=[],d=e(757);n.exports=function(n,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");t=t||{},t.attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var e=listToStyles(n,t);return addStylesToDom(e,t),function(n){for(var o=[],i=0;i<e.length;i++){var a=e[i],s=r[a.id];s.refs--,o.push(s)}if(n){addStylesToDom(listToStyles(n,t),t)}for(var i=0;i<o.length;i++){var s=o[i];if(0===s.refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete r[s.id]}}}};var p=function(){var n=[];return function(t,e){return n[t]=e,n.filter(Boolean).join("\n")}}()},757:function(n,t){n.exports=function(n){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!n||"string"!=typeof n)return n;var e=t.protocol+"//"+t.host,r=e+t.pathname.replace(/\/[^\/]*$/,"/");return n.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(n,t){var o=t.trim().replace(/^"(.*)"$/,function(n,t){return t}).replace(/^'(.*)'$/,function(n,t){return t});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(o))return n;var i;return i=0===o.indexOf("//")?o:0===o.indexOf("/")?e+o:r+o.replace(/^\.\//,""),"url("+JSON.stringify(i)+")"})}},758:function(n,t,e){"use strict";var r=this&&this.__decorate||function(n,t,e,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,e):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(o=n[s])&&(a=(i<3?o(a):i>3?o(t,e,a):o(t,e))||a);return i>3&&a&&Object.defineProperty(t,e,a),a},o=this&&this.__metadata||function(n,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=e(18);e(186);var a=e(299),s=e(298),l=function(){function AppComponent(n){this.backendService=n,this.messages=[]}return AppComponent.prototype.fetchMessage=function(){var n=this;this.backendService.fetchMessage().subscribe(function(t){return n.messages.push(t)},function(t){return n.messages.push(new a.Message("Dayyuum, We had issuse even trying to talk to the backend! Try again, maybe it will fix itself."))})},AppComponent.prototype.clearMessages=function(){this.messages=[]},AppComponent=r([i.Component({selector:"angular-application",template:e(186)}),o("design:paramtypes",[s.BackendService])],AppComponent)}();t.AppComponent=l}},[312]);
|
"""
Docstrings with line continuation characters should be handled correctly.
"""
def add(x, y):
"""
Adds two \
values.
>>> add(1, 1)
3
>>> add("ab", "c")
'cab'
"""
return x + y
|
# -*- coding: utf-8 -*-
# Tom van Steijn, Royal HaskoningDHV
# Erik van Onselen, Deltares
from xsboringen.borehole import Borehole, Segment
from collections import namedtuple
class CPT(Borehole):
'''CPT class inherits from borehole'''
_keys = 'cone_resistance', 'friction_ratio'
Row = namedtuple('Row', ('depth',) + _keys)
@property
def complete(self):
return all (k in self.verticals for k in self._keys)
@property
def rows(self):
zipped = zip(
self.verticals['cone_resistance'],
self.verticals['friction_ratio'],
)
for (depth, qc), (depth, rf) in zipped:
if depth is not None:
yield self.Row(depth, qc, rf)
def classify_lithology(self, classifier, admixclassifier=None):
if self.complete:
self.segments = []
for i, row in enumerate(self.rows):
base = row.depth
if i == 0:
top = 0.
blind_segment = Segment(top, base, "O")
self.segments.append(blind_segment)
top = base
continue
lithology = classifier.classify(
row.friction_ratio,
row.cone_resistance,
)
segment = Segment(top, base, lithology)
segment.update(admixclassifier.classify(segment.lithology))
self.segments.append(segment)
top = base
def to_lithology(self, classifier, admixclassifier):
self.classify_lithology(classifier, admixclassifier)
return self
|
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var MashGridCommand = { "sort": 1, "filter": 2 };
var MashGridSortOrder = { "Asc": 1, "Desc": -1 };
var MashGrid = (function (_super) {
__extends(MashGrid, _super);
function MashGrid() {
var _this = _super.call(this) || this;
_this._model = { "grids": [] };
_this._root = _this._getShadowRoot();
_this._config = _this._getExtendedConfig(_this._getDefaultConfig(), {});
return _this;
}
MashGrid.prototype._getShadowRoot = function () {
var $shadowRoot = this.attachShadow({ mode: "open" });
return $shadowRoot;
};
MashGrid.prototype._getDefaultConfig = function () {
return { url: "stub" };
};
MashGrid.prototype.connectedCallback = function () {
this._initModel(this._config);
};
MashGrid.prototype.disconnectedCallback = function () { };
Object.defineProperty(MashGrid, "observedAttributes", {
get: function () {
return ["config"];
},
enumerable: true,
configurable: true
});
MashGrid.prototype.attributeChangedCallback = function (attributeName, oldValue, newValue) {
switch (attributeName) {
case "config":
{
var config = MashGrid.jsonParse(newValue);
this._config = this._getExtendedConfig(this._config, config);
}
break;
default:
break;
}
};
MashGrid.prototype._getExtendedConfig = function (defaultConfig, overrideConfig) {
var ret = defaultConfig;
if (!!overrideConfig) {
this._mutateProp(overrideConfig, ret, "url");
this._mutateProp(overrideConfig, ret, "stubRows");
this._mutateProp(overrideConfig, ret, "stubCols");
}
return ret;
};
MashGrid.prototype._mutateProp = function (source, target, propName) {
if (source[propName] !== undefined) {
target[propName] = source[propName];
}
};
MashGrid.prototype._getInitModel = function (config) {
var imax = 10;
var jmax = 3;
imax = config.stubRows;
jmax = config.stubCols;
var xs = [];
for (var i = 0; i < imax; i++) {
var x = {};
for (var j = 0; j < jmax; j++) {
var val = "a" + i + j;
x["c" + j] = val;
}
xs.push(x);
}
return xs;
};
MashGrid.getRow = function (row) {
var trow = Object.keys(row)
.map(function (key) { return "<td>" + row[key] + "</td>"; })
.reduce(function (acc, val) { return acc + val; }, "<tr>") + "</tr>";
return trow;
};
MashGrid.getVisual = function (model) {
var visual = {};
var $template = document.getElementById("tr-template");
if (!$template) {
var style = "<style></style>";
var thead = Object.keys(model[0])
.map(function (propertyName) { return "<th>" + propertyName + "</th>"; })
.reduce(function (acc, val) { return acc + val; }, "<thead><tr>") + "</tr></thead>";
var tbody = model
.map(function (modelItem) { return MashGrid.getRow(modelItem); })
.reduce(function (acc, val) { return acc + val; }, "<tbody>") + "</tbody>";
var tfoot = "";
var table = "<table>" + thead + tbody + tfoot + "</table>";
var html = "" + style + table;
visual.html = html;
}
if ($template) {
var elements_1 = [];
model.forEach(function (m) {
var $clone = document.importNode($template.content, true);
$clone.querySelectorAll("td")[0].innerText = m["c0"];
$clone.querySelectorAll("td")[1].innerText = m["c1"];
elements_1.push($clone);
});
visual.elements = elements_1;
}
return visual;
};
MashGrid.prototype._view = function (model) {
var visual = MashGrid.getVisual(model, this._config);
return visual;
};
MashGrid.prototype._render = function (visual) {
var _this = this;
if (visual.html) {
this._root.innerHTML = visual.html;
}
var $ths = this._root.querySelectorAll("th");
$ths.forEach(function ($th) {
$th.addEventListener("click", function (event) {
_this._onSortEvent({ "propertyName": event.target.innerText, "ctrlKey": event.ctrlKey });
});
});
var $tds = this._root.querySelectorAll("td");
$tds.forEach(function ($td) {
$td.addEventListener("dblclick", function (event) {
if (event.ctrlKey === true) {
_this._onFilterEvent({ "propertyName": propertyName, "filterValue": filterValue, "ctrlKey": event.ctrlKey, "option": "unset" });
}
else {
var cellIndex = $td.cellIndex;
var $theThOfTheColumnClicked = $ths[cellIndex];
var propertyName = $theThOfTheColumnClicked.innerText;
var filterValue = window.getSelection().toString();
_this._onFilterEvent({ "propertyName": propertyName, "filterValue": filterValue, "ctrlKey": event.ctrlKey, "option": "set" });
}
});
});
};
MashGrid.prototype._setModel = function (model) {
var grid = { "id": model.url, "xs": model.xs, "ys": model.xs };
this._model.grids[0] = grid;
this._visual = this._view(this._model.grids[0].ys);
this._render(this._visual);
};
MashGrid.prototype._getComparator = function (propertyName, sortOrder) {
var stringComparator = function (l, r) {
var ret = 0;
var left = l[propertyName].toUpperCase();
var right = r[propertyName].toUpperCase();
if (left < right) {
ret = -1;
}
if (left > right) {
ret = 1;
}
ret = ret * sortOrder;
return ret;
};
var generalComparator = function (l, r) {
var ret = 0;
var left = l[propertyName];
var right = r[propertyName];
var typeofLeft = typeof left;
var typeofRight = typeof right;
if (typeofLeft !== typeofRight) {
left = (left == null) ? "null" : left;
right = (right == null) ? "null" : right;
left = left.toString();
right = right.toString();
}
if (typeofLeft === "string" && typeofRight === "string") {
if (left < right) {
ret = -1;
}
if (left > right) {
ret = 1;
}
}
else if (typeofLeft === "object" && typeofRight === "object") {
ret = 0;
}
else if (typeofLeft === "boolean" && typeofRight === "boolean") {
if (left < right) {
ret = -1;
}
if (left > right) {
ret = 1;
}
}
else {
ret = left - right;
}
ret = ret * sortOrder;
return ret;
};
var comparator = null;
switch (propertyName) {
case "c3":
comparator = stringComparator;
break;
default:
comparator = generalComparator;
}
return comparator;
};
MashGrid.prototype._update = function (msg, model) {
var newModel = model;
switch (msg.cmd) {
case MashGridCommand.sort:
{
var fieldName = msg.propertyName;
var ys = this._model.grids[0].xs;
var comparator = this._getComparator(fieldName, msg.sortOrder);
ys.sort(comparator);
this._model.grids[0].xs = ys;
this._model.grids[0].ys = ys;
this._visual = this._view(this._model.grids[0].ys);
this._render(this._visual);
}
break;
case MashGridCommand.filter:
{
if (msg.option === "set") {
var ys = this._model.grids[0].xs;
var ysFiltered = ys.filter(function (y) {
var propertyValue = y[msg.propertyName];
var found = propertyValue.indexOf(msg.filterValue);
var ret = (found > -1) ? true : false;
return ret;
});
this._model.grids[0].ys = ysFiltered;
this._visual = this._view(this._model.grids[0].ys);
this._render(this._visual);
}
if (msg.option === "unset") {
var ys = this._model.grids[0].xs;
this._model.grids[0].ys = ys;
this._visual = this._view(this._model.grids[0].ys);
this._render(this._visual);
}
}
break;
default:
break;
}
return newModel;
};
MashGrid.prototype._onFilterEvent = function (event) {
if (event.ctrlKey === true) {
var msg = { "cmd": MashGridCommand.filter, "propertyName": event.propertyName, "filterValue": event.filterValue, "option": event.option };
this._update(msg, this._model);
}
else {
var msg = { "cmd": MashGridCommand.filter, "propertyName": event.propertyName, "filterValue": event.filterValue, "option": event.option };
this._update(msg, this._model);
}
};
MashGrid.prototype._onSortEvent = function (event) {
if (event.ctrlKey === true) {
var msg = { "cmd": MashGridCommand.sort, "propertyName": event.propertyName, "sortOrder": MashGridSortOrder.Desc };
this._update(msg, this._model);
}
else {
var msg = { "cmd": MashGridCommand.sort, "propertyName": event.propertyName, "sortOrder": MashGridSortOrder.Asc };
this._update(msg, this._model);
}
};
MashGrid.prototype._jaxiDone = function (jaxiResponse) {
var xs = jaxiResponse.xs;
var url = jaxiResponse.url;
this._setModel({ url: url, xs: xs });
};
MashGrid.prototype._jaxiFail = function (jaxiResponse) {
};
MashGrid.jsonParse = function (newValue) {
var obj = null;
try {
obj = JSON.parse(newValue);
}
catch (e) {
}
return obj;
};
MashGrid.prototype._jaxi = function (jaxiSettings) {
var url = jaxiSettings.url;
var xhr = new XMLHttpRequest();
xhr.open("GET", url);
xhr.responeType = "json";
xhr.onload = function () {
if (this.status === 200) {
var jsonString = this.response;
var xs = JSON.parse(this.response);
jaxiSettings.done({ jsonString: jsonString, xs: xs, url: url });
}
};
xhr.onerror = function () {
jaxiSettings.fail("jaxi fail");
};
xhr.send();
};
MashGrid.prototype._initModel = function (config) {
if (config) {
var url = config.url;
if (url.indexOf("stub") !== -1) {
}
else {
var jaxiSettings = { "url": url, "done": this._jaxiDone.bind(this), "fail": this._jaxiFail.bind(this) };
this._jaxi(jaxiSettings);
}
}
};
return MashGrid;
}(HTMLElement));
window.customElements.define("mash-grid", MashGrid);
//# sourceMappingURL=mash-grid.UnitTest.js.map
|
import { connect } from 'react-redux'
import { compose } from 'redux'
import { withRouter } from 'react-router-dom'
import {
contractExchangeRateSelector,
transactionFeeSelector,
} from '../../selectors'
import { getTokens } from '../../ducks/tronmask/tronmask'
import {
getTokenData,
} from '../../helpers/utils/transactions.util'
import {
calcTokenAmount,
getTokenAddressParam,
getTokenValueParam,
} from '../../helpers/utils/token-util'
import ConfirmTokenTransactionBase from './confirm-token-transaction-base.component'
const mapStateToProps = (state, ownProps) => {
const { match: { params = {} } } = ownProps
const { id: paramsTransactionId } = params
const {
confirmTransaction,
tronmask: { currentCurrency, conversionRate, currentNetworkTxList },
} = state
const {
txData: { id: transactionId, txParams: { to: tokenAddress, data } = {} } = {},
} = confirmTransaction
const transaction = (
currentNetworkTxList.find(({ id }) => id === (Number(paramsTransactionId) ||
transactionId)) || {}
)
const {
ethTransactionTotal,
fiatTransactionTotal,
} = transactionFeeSelector(state, transaction)
const tokens = getTokens(state)
const currentToken = tokens && tokens.find(({ address }) => tokenAddress === address)
const { decimals, symbol: tokenSymbol } = currentToken || {}
const tokenData = getTokenData(data)
const tokenValue = getTokenValueParam(tokenData)
const toAddress = getTokenAddressParam(tokenData)
const tokenAmount = tokenData && calcTokenAmount(tokenValue, decimals).toNumber()
const contractExchangeRate = contractExchangeRateSelector(state)
return {
toAddress,
tokenAddress,
tokenAmount,
tokenSymbol,
currentCurrency,
conversionRate,
contractExchangeRate,
fiatTransactionTotal,
ethTransactionTotal,
}
}
export default compose(
withRouter,
connect(mapStateToProps),
)(ConfirmTokenTransactionBase)
|
import React, { useEffect, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import Page from 'components/Page';
import InputField from '../../components/InputField';
import Form from 'reactstrap/lib/Form';
import Label from 'reactstrap/lib/Label';
import { adminResetPassword } from '../../apiConstants/apiConstants';
import { resetPassword } from '../../actions/admin/authAction/Users';
import PopupSuccess from '../../components/popup-success';
export default function ResetPassword() {
const [control, setControl] = useState({});
const [confirmPassword, setConfirmPassword] = useState('');
const [dontMatch, setDontMatch] = useState(false);
const [popup, setPopup] = useState(false);
const dispatch = useDispatch();
const adminResetPass = useSelector(state => state.adminResetPassword);
const handleChange = ({ target }) => {
setControl({
...control,
[target.name]: target.value,
});
};
const { newPassword } = control;
const handleSubmit = e => {
e.preventDefault();
if (confirmPassword !== newPassword) {
setDontMatch(true);
} else {
setDontMatch(false);
dispatch(resetPassword(adminResetPassword, control));
}
};
useEffect(() => {
adminResetPass.isSuccessful && setPopup(true);
}, [adminResetPass]);
let border = { border: '1px solid #dee2e6' };
if (confirmPassword && confirmPassword === newPassword) {
border = { border: '2px solid green' };
} else if (confirmPassword && confirmPassword !== newPassword) {
border = { border: '2px solid red' };
}
return (
<Page>
<div className="main">
<h3 className="text-center m-2">Reset Password</h3>
<div className="cont">
<Form className="form mt-3" onSubmit={handleSubmit}>
<div className="my-2">
<Label>Old password</Label>
<InputField
type="password"
name="oldPassword"
className="login__input input input--lg border border-gray-300 block w-100"
placeholder="Old Password"
onChange={handleChange}
required
/>
</div>
<div className="my-2">
<Label>New Password</Label>
<InputField
type="password"
name="newPassword"
className="login__input input input--lg border border-gray-300 block w-100"
placeholder="New Password"
onChange={handleChange}
required
/>
</div>
<div>
<Label>Confirm New Password</Label>
<InputField
style={border}
type="password"
className="login__input input input--lg block w-100"
placeholder="Confirm New Password"
onChange={({ target }) => setConfirmPassword(target.value)}
required
/>
</div>
{dontMatch && (
<p style={{ color: 'red', fontSize: '.8rem' }}>
Passwords don't match
</p>
)}
<InputField
type="submit"
className="button button--lg w-full text-white bg-theme-1 xl:mr-3 mt-4"
value="Reset Password"
/>
</Form>
</div>
</div>
{popup && <PopupSuccess
button
majorText="Changed Password successfully."
text="Please login with new password"
redirect="/admin/login"
/>}
</Page>
)
};
|
import { useState, useEffect, useContext } from 'react';
import { useParams, useNavigate } from 'react-router-dom';
import { AuthContext } from '../../contexts/AuthContext';
import { db } from '../../firebase';
import { getDoc, setDoc, doc, deleteDoc } from 'firebase/firestore'
import MemoryDetailsItem from './MemoryDetailsItem.js';
const Memory = () => {
const navigate = useNavigate();
const { user } = useContext(AuthContext);
const { memoryId } = useParams();
const [memory, setMemory] = useState({});
const [likes, setLikes] = useState(0);
const [name, setName] = useState('...Loading')
useEffect(() => {
const getMemory = async () => {
const docRef = doc(db, "Memories", memoryId);
const docSnap = await getDoc(docRef)
if (docSnap.data() === undefined) {
navigate("/Error404");
return;
}
else {
setMemory(docSnap.data());
setLikes(docSnap.data().Likes.length)
getName(docSnap.data().OwnerId);
}
}
getMemory();
}, [memoryId]);
const getName = async (ownerId) => {
const docRef = doc(db, "Users", ownerId);
const docSnap = await getDoc(docRef);
setName(docSnap.data().DisplayName);
}
const onLikeHandler = async (e) => {
e.preventDefault();
const memoryRef = doc(db, 'Memories', memoryId);
const docSnap = await getDoc(memoryRef);
const _Likes = docSnap.data().Likes;
if (_Likes.includes(user.uid)) {
var index = _Likes.indexOf(user.uid);
if (index !== -1) {
_Likes.splice(index, 1);
}
}
else {
_Likes.push(user.uid);
}
await setDoc(
memoryRef, {
Likes: _Likes
}, { merge: true })
.then(() => {
setLikes(_Likes.length);
})
.catch((error) => {
alert("Unsuccessful operation, error: " + error)
});
}
const onEditHandler = async (e) => {
e.preventDefault();
navigate(`/memory/edit/${memoryId}`);
}
const onDeleteHandler = async (e) => {
e.preventDefault();
await deleteDoc(doc(db, "Memories", memoryId));
navigate("/Memories");
}
return (
<section>
<article>
<MemoryDetailsItem key={memoryId} memory={memory} name={name} />
</article>
{user !== null
? <>
<article className="Memory-Interactions">
<button onClick={onLikeHandler}> {memory.Likes !== undefined ? likes : 0} Like </button>
{user !== null && user.uid === memory.OwnerId
?
<>
<button onClick={onEditHandler}> Edit </button>
<button onClick={onDeleteHandler}> Delete </button>
</>
: <></>
}
</article>
</>
: <></>
}
</section>
);
};
export default Memory;
|
#ifndef NMWORKERBASE_H
#define NMWORKERBASE_H
#include "nmcommanddata.h"
class NmWorkerBase
{
public:
virtual ~NmWorkerBase() {}
virtual NmScope getScope() = 0;
virtual json execCmd(NmCommandData*) = 0;
virtual bool isValidCmd(NmCommandData*) = 0;
};
#endif // NMWORKERBASE_H
|
from typing import List
from connexion.exceptions import OAuthProblem
"""
controller generated to handled auth operation described at:
https://connexion.readthedocs.io/en/latest/security.html
''.join([secrets.choice(string.ascii_letters + string.digits) for _ in range(50)])
"""
def check_ReadKey(api_key, required_scopes):
if api_key == 'ggbTbze1HH9V5WHdctgcA8PKvnE1htlxWyczGHOgQHYHEpO13X':
return {'uid': 200}
raise OAuthProblem('Invalid ReadKey supplied.')
def check_WriteKey(api_key, required_scopes):
if api_key == '1L7g6eq0LXil2xzoEv7CnwvglwWEu9PNgA2vgulNhAZR5HD1MM':
return {'uid': 100}
raise OAuthProblem('Invalid WriteKey supplied.')
|
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from msrest.serialization import Model
class ComponentsschemasmicrosoftGraphThumbnailsetallof1(Model):
"""thumbnailSet.
:param large:
:type large: ~users.models.Microsoftgraphthumbnail
:param medium:
:type medium: ~users.models.Microsoftgraphthumbnail
:param small:
:type small: ~users.models.Microsoftgraphthumbnail
:param source:
:type source: ~users.models.Microsoftgraphthumbnail
"""
_attribute_map = {
'large': {'key': 'large', 'type': 'Microsoftgraphthumbnail'},
'medium': {'key': 'medium', 'type': 'Microsoftgraphthumbnail'},
'small': {'key': 'small', 'type': 'Microsoftgraphthumbnail'},
'source': {'key': 'source', 'type': 'Microsoftgraphthumbnail'},
}
def __init__(self, large=None, medium=None, small=None, source=None):
super(ComponentsschemasmicrosoftGraphThumbnailsetallof1, self).__init__()
self.large = large
self.medium = medium
self.small = small
self.source = source
|
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --no-enable-one-shot-optimization
Debug = debug.Debug
var exception = null;
var object_with_symbol_key = {[Symbol("a")]: 1};
var object_with_callbacks = { toString: () => "string", valueOf: () => 3};
var symbol_for_a = Symbol.for("a");
var typed_array = new Uint8Array([1, 2, 3]);
var array_buffer = new ArrayBuffer(3);
var data_view = new DataView(new ArrayBuffer(8), 0, 8);
var array = [1,2,3];
function listener(event, exec_state, event_data, data) {
if (event != Debug.DebugEvent.Break) return;
try {
function success(expectation, source) {
var result = exec_state.frame(0).evaluate(source, true).value();
if (expectation !== undefined) assertEquals(expectation, result);
}
function fail(source) {
assertThrows(() => exec_state.frame(0).evaluate(source, true),
EvalError);
}
// Test some Object functions.
success({}, `new Object()`);
success({p : 3}, `Object.create({}, { p: { value: 3 } })`);
success("[[\"a\",1],[\"b\",2]]",
`JSON.stringify(Object.entries({a:1, b:2}))`);
success({value: 1, writable: true, enumerable: true, configurable: true},
`Object.getOwnPropertyDescriptor({a: 1}, "a")`);
success("{\"a\":{\"value\":1,\"writable\":true," +
"\"enumerable\":true,\"configurable\":true}}",
`JSON.stringify(Object.getOwnPropertyDescriptors({a: 1}))`);
success(["a"], `Object.getOwnPropertyNames({a: 1})`);
success(undefined, `Object.getOwnPropertySymbols(object_with_symbol_key)`);
success({}, `Object.getPrototypeOf(Object.create({}))`);
success(true, `Object.is(Object, Object)`);
success(true, `Object.isExtensible({})`);
success(false, `Object.isFrozen({})`);
success(false, `Object.isSealed({})`);
success([1, 2], `Object.values({a:1, b:2})`);
fail(`Object.assign({}, {})`);
fail(`Object.defineProperties({}, [{p:{value:3}}])`);
fail(`Object.defineProperty({}, {p:{value:3}})`);
fail(`Object.freeze({})`);
fail(`Object.preventExtensions({})`);
fail(`Object.seal({})`);
fail(`Object.setPrototypeOf({}, {})`);
// Test some Object.prototype functions.
success(true, `({a:1}).hasOwnProperty("a")`);
success(true, `Object.prototype.isPrototypeOf({})`);
success(true, `({a:1}).propertyIsEnumerable("a")`);
success("[object Object]", `({a:1}).toString()`);
success("[object Object]", `({a:1}).toLocaleString()`);
success("string", `(object_with_callbacks).toString()`);
success(3, `(object_with_callbacks).valueOf()`);
// Test Array functions.
success(true, `Array.isArray([1, 2, 3])`);
success([], `new Array()`);
success([undefined, undefined], `new Array(2)`);
success([1, 2], `new Array(1, 2)`);
fail(`Array.from([1, 2, 3])`);
fail(`Array.of(1, 2, 3)`);
var function_param = [
"flatMap", "forEach", "every", "some", "reduce", "reduceRight", "find",
"filter", "map", "findIndex"
];
var fails = ["pop", "push", "reverse", "shift", "unshift", "splice",
"sort", "copyWithin", "fill"];
for (f of Object.getOwnPropertyNames(Array.prototype)) {
if (typeof Array.prototype[f] === "function") {
if (fails.includes(f)) {
if (function_param.includes(f)) {
fail(`array.${f}(()=>{});`);
} else {
fail(`array.${f}();`);
}
} else if (function_param.includes(f)) {
exec_state.frame(0).evaluate(`array.${f}(()=>{});`, true);
} else {
exec_state.frame(0).evaluate(`array.${f}();`, true);
}
}
}
// Test ArrayBuffer functions.
success(3, `array_buffer.byteLength`);
success(2, `array_buffer.slice(1, 3).byteLength`);
success(true, `ArrayBuffer.isView(typed_array)`);
// Test DataView functions.
success(undefined, `new DataView(array_buffer, 1, 2)`);
success(undefined, `data_view.buffer`);
success(undefined, `data_view.byteLength`);
success(undefined, `data_view.byteOffset`);
for (f of Object.getOwnPropertyNames(DataView.prototype)) {
if (typeof data_view[f] === 'function') {
if (f.startsWith('getBig')) {
success(0n, `data_view.${f}()`);
} else if (f.startsWith('get')) {
success(0, `data_view.${f}()`);
}
}
}
// Test TypedArray functions.
success({}, `new Uint8Array()`);
success({0: 0, 1: 0}, `new Uint8Array(2)`);
success({0: 1, 1: 2, 2: 3}, `new Uint8Array(typed_array)`);
success(true, `!!typed_array.buffer`);
success(0, `typed_array.byteOffset`);
success(3, `typed_array.byteLength`);
fail(`Uint8Array.of(1, 2)`);
function_param = [
"forEach", "every", "some", "reduce", "reduceRight", "find", "filter",
"map", "findIndex"
];
fails = ["reverse", "sort", "copyWithin", "fill", "set"];
var typed_proto_proto = Object.getPrototypeOf(Object.getPrototypeOf(new Uint8Array()));
for (f of Object.getOwnPropertyNames(typed_proto_proto)) {
if (typeof typed_array[f] === "function" && f !== "constructor") {
if (fails.includes(f)) {
if (function_param.includes(f)) {
fail(`typed_array.${f}(()=>{});`);
} else {
fail(`typed_array.${f}();`);
}
} else if (function_param.includes(f)) {
exec_state.frame(0).evaluate(`typed_array.${f}(()=>{});`, true);
} else {
exec_state.frame(0).evaluate(`typed_array.${f}();`, true);
}
}
}
// Test Math functions.
for (f of Object.getOwnPropertyNames(Math)) {
if (f !== "random" && typeof Math[f] === "function") {
var result = exec_state.frame(0).evaluate(
`Math.${f}(0.5, -0.5);`, true).value();
assertEquals(Math[f](0.5, -0.5), result);
}
}
fail("Math.random();");
// Test Number functions.
success(new Number(0), `new Number()`);
for (f of Object.getOwnPropertyNames(Number)) {
if (typeof Number[f] === "function") {
success(Number[f](0.5), `Number.${f}(0.5);`);
}
}
for (f of Object.getOwnPropertyNames(Number.prototype)) {
if (typeof Number.prototype[f] === "function") {
if (f == "toLocaleString" && typeof Intl === "undefined") continue;
success(Number(0.5)[f](5), `Number(0.5).${f}(5);`);
}
}
// Test String functions.
success(new String(), `new String()`);
success(" ", "String.fromCodePoint(0x20)");
success(" ", "String.fromCharCode(0x20)");
for (f of Object.getOwnPropertyNames(String.prototype)) {
if (typeof String.prototype[f] === "function") {
// Do not expect locale-specific or regexp-related functions to work.
// {Lower,Upper}Case (Locale-specific or not) do not work either
// if Intl is enabled.
if (f.indexOf("locale") >= 0) continue;
if (f.indexOf("Locale") >= 0) continue;
if (typeof Intl !== 'undefined') {
if (f == "toUpperCase") continue;
if (f == "toLowerCase") continue;
}
if (f == "normalize") continue;
if (f == "match") continue;
if (f == "matchAll") continue;
if (f == "search") continue;
if (f == "split" || f == "replace" || f == "replaceAll") {
fail(`'abcd'.${f}(2)`);
continue;
}
success("abcd"[f](2), `"abcd".${f}(2);`);
}
}
fail("'abCd'.toLocaleLowerCase()");
fail("'abcd'.toLocaleUpperCase()");
if (typeof Intl !== 'undefined') {
fail("'abCd'.toLowerCase()");
fail("'abcd'.toUpperCase()");
}
fail("'abcd'.match(/a/)");
fail("'abcd'.replace(/a/)");
fail("'abcd'.search(/a/)");
// Test RegExp functions.
fail(`/a/.compile()`);
success('a', `/a/.exec('abc')[0]`);
success(true, `/a/.test('abc')`);
fail(`/a/.toString()`);
// Test JSON functions.
success('{"abc":[1,2]}', "JSON.stringify(JSON.parse('{\"abc\":[1,2]}'))");
// Test Symbol functions.
success(undefined, `Symbol("a")`);
fail(`Symbol.for("a")`); // Symbol.for can be observed via Symbol.keyFor.
success("a", `Symbol.keyFor(symbol_for_a)`);
success("Symbol(a)", `symbol_for_a.valueOf().toString()`);
success("Symbol(a)", `symbol_for_a[Symbol.toPrimitive]().toString()`);
} catch (e) {
exception = e;
print(e, e.stack);
};
};
// Add the debug event listener.
Debug.setListener(listener);
function f() {
debugger;
};
f();
assertNull(exception);
|
import os
import sys
import codecs
import glob
base_path = os.path.split(__file__)[0]
if os.path.exists(os.path.join(base_path, 'testdata')):
#release
test_dir = os.path.join(base_path, 'testdata')
else:
#development
test_dir = os.path.abspath(
os.path.join(base_path,
os.path.pardir, os.path.pardir,
os.path.pardir, 'testdata'))
assert os.path.exists(test_dir), "Test data not found"
#import the development html5lib
sys.path.insert(0, os.path.abspath(os.path.join(base_path,
os.path.pardir,
os.path.pardir)))
import html5lib
from html5lib import html5parser, treebuilders
del base_path
#Build a dict of avaliable trees
treeTypes = {"simpletree":treebuilders.getTreeBuilder("simpletree"),
"DOM":treebuilders.getTreeBuilder("dom")}
#Try whatever etree implementations are avaliable from a list that are
#"supposed" to work
try:
import xml.etree.ElementTree as ElementTree
treeTypes['ElementTree'] = treebuilders.getTreeBuilder("etree", ElementTree, fullTree=True)
except ImportError:
try:
import elementtree.ElementTree as ElementTree
treeTypes['ElementTree'] = treebuilders.getTreeBuilder("etree", ElementTree, fullTree=True)
except ImportError:
pass
try:
import xml.etree.cElementTree as cElementTree
treeTypes['cElementTree'] = treebuilders.getTreeBuilder("etree", cElementTree, fullTree=True)
except ImportError:
try:
import cElementTree
treeTypes['cElementTree'] = treebuilders.getTreeBuilder("etree", cElementTree, fullTree=True)
except ImportError:
pass
try:
import lxml.etree as lxml
treeTypes['lxml'] = treebuilders.getTreeBuilder("etree", lxml, fullTree=True)
except ImportError:
pass
try:
import BeautifulSoup
treeTypes["beautifulsoup"] = treebuilders.getTreeBuilder("beautifulsoup", fullTree=True)
except ImportError:
pass
def html5lib_test_files(subdirectory, files='*.dat'):
return glob.glob(os.path.join(test_dir,subdirectory,files))
class DefaultDict(dict):
def __init__(self, default, *args, **kwargs):
self.default = default
dict.__init__(self, *args, **kwargs)
def __getitem__(self, key):
return dict.get(self, key, self.default)
class TestData(object):
def __init__(self, filename, newTestHeading="data"):
self.f = codecs.open(filename, encoding="utf8")
self.newTestHeading = newTestHeading
def __iter__(self):
data = DefaultDict(None)
key=None
for line in self.f:
heading = self.isSectionHeading(line)
if heading:
if data and heading == self.newTestHeading:
#Remove trailing newline
data[key] = data[key][:-1]
yield self.normaliseOutput(data)
data = DefaultDict(None)
key = heading
data[key]=""
elif key is not None:
data[key] += line
if data:
yield self.normaliseOutput(data)
def isSectionHeading(self, line):
"""If the current heading is a test section heading return the heading,
otherwise return False"""
if line.startswith("#"):
return line[1:].strip()
else:
return False
def normaliseOutput(self, data):
#Remove trailing newlines
for key,value in data.iteritems():
if value.endswith("\n"):
data[key] = value[:-1]
return data
def convert(stripChars):
def convertData(data):
"""convert the output of str(document) to the format used in the testcases"""
data = data.split("\n")
rv = []
for line in data:
if line.startswith("|"):
rv.append(line[stripChars:])
else:
rv.append(line)
return "\n".join(rv)
return convertData
convertExpected = convert(2)
|
"""
WSGI config for ddns_clienter project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ddns_clienter.settings")
application = get_wsgi_application()
|
/* Copyright (c) 2017, ARM Limited
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include "config.h"
#include <odp_queue_if.h>
#include <odp_init_internal.h>
#include <odp_debug_internal.h>
#include <stdlib.h>
#include <string.h>
#include <odp/api/align.h>
#include <odp/api/plat/queue_inline_types.h>
#include <odp/visibility_begin.h>
_odp_queue_inline_offset_t ODP_ALIGNED_CACHE _odp_queue_inline_offset;
const _odp_queue_api_fn_t *_odp_queue_api;
#include <odp/visibility_end.h>
extern const _odp_queue_api_fn_t queue_scalable_api;
extern const queue_fn_t queue_scalable_fn;
extern const _odp_queue_api_fn_t queue_basic_api;
extern const queue_fn_t queue_basic_fn;
const queue_fn_t *queue_fn;
odp_queue_t odp_queue_create(const char *name, const odp_queue_param_t *param)
{
return _odp_queue_api->queue_create(name, param);
}
int odp_queue_destroy(odp_queue_t queue)
{
return _odp_queue_api->queue_destroy(queue);
}
odp_queue_t odp_queue_lookup(const char *name)
{
return _odp_queue_api->queue_lookup(name);
}
int odp_queue_capability(odp_queue_capability_t *capa)
{
return _odp_queue_api->queue_capability(capa);
}
int odp_queue_context_set(odp_queue_t queue, void *context, uint32_t len)
{
return _odp_queue_api->queue_context_set(queue, context, len);
}
odp_queue_type_t odp_queue_type(odp_queue_t queue)
{
return _odp_queue_api->queue_type(queue);
}
odp_schedule_sync_t odp_queue_sched_type(odp_queue_t queue)
{
return _odp_queue_api->queue_sched_type(queue);
}
odp_schedule_prio_t odp_queue_sched_prio(odp_queue_t queue)
{
return _odp_queue_api->queue_sched_prio(queue);
}
odp_schedule_group_t odp_queue_sched_group(odp_queue_t queue)
{
return _odp_queue_api->queue_sched_group(queue);
}
uint32_t odp_queue_lock_count(odp_queue_t queue)
{
return _odp_queue_api->queue_lock_count(queue);
}
uint64_t odp_queue_to_u64(odp_queue_t hdl)
{
return _odp_queue_api->queue_to_u64(hdl);
}
void odp_queue_param_init(odp_queue_param_t *param)
{
return _odp_queue_api->queue_param_init(param);
}
int odp_queue_info(odp_queue_t queue, odp_queue_info_t *info)
{
return _odp_queue_api->queue_info(queue, info);
}
int _odp_queue_init_global(void)
{
const char *sched = getenv("ODP_SCHEDULER");
if (sched == NULL || !strcmp(sched, "default"))
sched = ODP_SCHEDULE_DEFAULT;
if (!strcmp(sched, "basic") ||
!strcmp(sched, "sp") ||
!strcmp(sched, "iquery")) {
queue_fn = &queue_basic_fn;
_odp_queue_api = &queue_basic_api;
} else if (!strcmp(sched, "scalable")) {
queue_fn = &queue_scalable_fn;
_odp_queue_api = &queue_scalable_api;
} else {
ODP_ABORT("Unknown scheduler specified via ODP_SCHEDULER\n");
return -1;
}
return queue_fn->init_global();
}
int _odp_queue_term_global(void)
{
return queue_fn->term_global();
}
|
"""
Copyright (c) 2016, Brendan Shillingford
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""
"""
Modified version of torchfile that is py3 and Windows compatible
Fixes provided by @xdaimon https://github.com/bshillingford/python-torchfile/pull/13
----------------------------------------------------------------------
Mostly direct port of the Lua and C serialization implementation to
Python, depending only on `struct`, `array`, and numpy.
Supported types:
* `nil` to Python `None`
* numbers to Python floats, or by default a heuristic changes them to ints or
longs if they are integral
* booleans
* strings: read as byte strings (Python 3) or normal strings (Python 2), like
lua strings which don't support unicode, and that can contain null chars
* tables converted to a special dict (*); if they are list-like (i.e. have
numeric keys from 1 through n) they become a python list by default
* Torch classes: supports Tensors and Storages, and most classes such as
modules. Trivially extensible much like the Torch serialization code.
Trivial torch classes like most `nn.Module` subclasses become
`TorchObject`s. The `type_handlers` dict contains the mapping from class
names to reading functions.
* functions: loaded into the `LuaFunction` `namedtuple`,
which simply wraps the raw serialized data, i.e. upvalues and code.
These are mostly useless, but exist so you can deserialize anything.
(*) Since Lua allows you to index a table with a table but Python does not, we
replace dicts with a subclass that is hashable, and change its
equality comparison behaviour to compare by reference.
See `hashable_uniq_dict`.
Currently, the implementation assumes the system-dependent binary Torch
format, but minor refactoring can give support for the ascii format as well.
"""
import struct
from array import array
import numpy as np
import sys
from collections import namedtuple
TYPE_NIL = 0
TYPE_NUMBER = 1
TYPE_STRING = 2
TYPE_TABLE = 3
TYPE_TORCH = 4
TYPE_BOOLEAN = 5
TYPE_FUNCTION = 6
TYPE_RECUR_FUNCTION = 8
LEGACY_TYPE_RECUR_FUNCTION = 7
LuaFunction = namedtuple('LuaFunction',
['size', 'dumped', 'upvalues'])
class mycontainer():
def __init__(self, val):
self.val = val
def __hash__(self):
return id(self.val)
def __eq__(self, other):
return id(self.val) == id(other.val)
def __ne__(self, other):
return id(self.val) != id(other.val)
class hashable_uniq_dict(dict):
"""
Subclass of dict with equality and hashing semantics changed:
equality and hashing is purely by reference/instance, to match
the behaviour of lua tables.
Supports lua-style dot indexing.
This way, dicts can be keys of other dicts.
"""
def __iter__(self):
return iter(self.keys())
def __getitem__(self, k):
for _k,v in self.items():
if str(_k) == str(k):
return v
def __setitem__(self, k, v):
dict.__setitem__(self, mycontainer(k), v)
def items(self):
return [(k.val, v) for k,v in dict.items(self)]
def keys(self):
return [k.val for k in dict.keys(self)]
def values(self):
return [v for v in dict.values(self)]
def __hash__(self):
return id(self)
def __eq__(self, other):
return id(self) == id(other)
def _disabled_binop(self, other):
raise TypeError(
'hashable_uniq_dict does not support these comparisons')
__cmp__ = __ne__ = __le__ = __gt__ = __lt__ = _disabled_binop
class TorchObject(object):
"""
Simple torch object, used by `add_trivial_class_reader`.
Supports both forms of lua-style indexing, i.e. getattr and getitem.
Use the `torch_typename` method to get the object's torch class name.
Equality is by reference, as usual for lua (and the default for Python
objects).
"""
def __init__(self, typename, obj=None, version_number=0):
self._typename = typename
self._obj = obj
self._version_number = version_number
def __getattr__(self, k):
if k in self._obj.keys():
return self._obj[k]
if isinstance(k, (str, bytes)):
return self._obj[k.encode('utf8')]
def __getitem__(self, k):
if k in self._obj.keys():
return self._obj[k]
if isinstance(k, (str, bytes)):
return self._obj[k.encode('utf8')]
def torch_typename(self):
return self._typename
def __repr__(self):
return "TorchObject(%s, %s)" % (self._typename, repr(self._obj))
def __str__(self):
return repr(self)
def __dir__(self):
keys = self._obj.keys()
keys.append('torch_typename')
return keys
type_handlers = {}
def register_handler(typename):
def do_register(handler):
type_handlers[typename] = handler
return do_register
def add_tensor_reader(typename, dtype):
def read_tensor_generic(reader, version):
# https://github.com/torch/torch7/blob/1e86025/generic/Tensor.c#L1249
ndim = reader.read_int()
size = reader.read_long_array(ndim)
stride = reader.read_long_array(ndim)
storage_offset = reader.read_long() - 1 # 0-indexing
# read storage:
storage = reader.read_obj()
if storage is None or ndim == 0 or len(size) == 0 or len(stride) == 0:
# empty torch tensor
return np.empty((0), dtype=dtype)
# convert stride to numpy style (i.e. in bytes)
stride = [storage.dtype.itemsize * x for x in stride]
# create numpy array that indexes into the storage:
return np.lib.stride_tricks.as_strided(
storage[storage_offset:],
shape=size,
strides=stride)
type_handlers[typename] = read_tensor_generic
add_tensor_reader(b'torch.ByteTensor', dtype=np.uint8)
add_tensor_reader(b'torch.CharTensor', dtype=np.int8)
add_tensor_reader(b'torch.ShortTensor', dtype=np.int16)
add_tensor_reader(b'torch.IntTensor', dtype=np.int32)
add_tensor_reader(b'torch.LongTensor', dtype=np.int64)
add_tensor_reader(b'torch.FloatTensor', dtype=np.float32)
add_tensor_reader(b'torch.DoubleTensor', dtype=np.float64)
add_tensor_reader(b'torch.CudaTensor', dtype=np.float32)
add_tensor_reader(b'torch.CudaByteTensor', dtype=np.uint8)
add_tensor_reader(b'torch.CudaCharTensor', dtype=np.int8)
add_tensor_reader(b'torch.CudaShortTensor', dtype=np.int16)
add_tensor_reader(b'torch.CudaIntTensor', dtype=np.int32)
add_tensor_reader(b'torch.CudaDoubleTensor', dtype=np.float64)
def add_storage_reader(typename, dtype):
def read_storage(reader, version):
# https://github.com/torch/torch7/blob/1e86025/generic/Storage.c#L237
size = reader.read_long()
return np.fromfile(reader.f, dtype=dtype, count=size)
type_handlers[typename] = read_storage
add_storage_reader(b'torch.ByteStorage', dtype=np.uint8)
add_storage_reader(b'torch.CharStorage', dtype=np.int8)
add_storage_reader(b'torch.ShortStorage', dtype=np.int16)
add_storage_reader(b'torch.IntStorage', dtype=np.int32)
add_storage_reader(b'torch.LongStorage', dtype=np.int64)
add_storage_reader(b'torch.FloatStorage', dtype=np.float32)
add_storage_reader(b'torch.DoubleStorage', dtype=np.float64)
add_storage_reader(b'torch.CudaStorage', dtype=np.float32)
add_storage_reader(b'torch.CudaByteStorage', dtype=np.uint8)
add_storage_reader(b'torch.CudaCharStorage', dtype=np.int8)
add_storage_reader(b'torch.CudaShortStorage', dtype=np.int16)
add_storage_reader(b'torch.CudaIntStorage', dtype=np.int32)
add_storage_reader(b'torch.CudaDoubleStorage', dtype=np.float64)
def add_notimpl_reader(typename):
def read_notimpl(reader, version):
raise NotImplementedError('Reader not implemented for: ' + typename)
type_handlers[typename] = read_notimpl
add_notimpl_reader(b'torch.HalfTensor')
add_notimpl_reader(b'torch.HalfStorage')
add_notimpl_reader(b'torch.CudaHalfTensor')
add_notimpl_reader(b'torch.CudaHalfStorage')
@register_handler(b'tds.Vec')
def tds_Vec_reader(reader, version):
size = reader.read_int()
obj = []
_ = reader.read_obj()
for i in range(size):
e = reader.read_obj()
obj.append(e)
return obj
@register_handler(b'tds.Hash')
def tds_Hash_reader(reader, version):
size = reader.read_int()
obj = hashable_uniq_dict()
_ = reader.read_obj()
for i in range(size):
k = reader.read_obj()
v = reader.read_obj()
obj[k] = v
return obj
class T7ReaderException(Exception):
pass
class T7Reader:
def __init__(self,
fileobj,
use_list_heuristic=True,
use_int_heuristic=True,
utf8_decode_strings=False,
force_deserialize_classes=None,
force_8bytes_long=False):
"""
Params:
* `fileobj`: file object to read from, must be an actual file object
as it will be read by `array`, `struct`, and `numpy`. Since
it is only read sequentially, certain objects like pipes or
`sys.stdin` should work as well (untested).
* `use_list_heuristic`: automatically turn tables with only consecutive
positive integral indices into lists
(default True)
* `use_int_heuristic`: cast all whole floats into ints (default True)
* `utf8_decode_strings`: decode all strings as UTF8. By default they
remain as byte strings. Version strings always
are byte strings, but this setting affects
class names. (default False)
* `force_deserialize_classes`: deprecated.
"""
self.f = fileobj
self.objects = {} # read objects so far
if force_deserialize_classes is not None:
raise DeprecationWarning(
'force_deserialize_classes is now always '
'forced to be true, so no longer required')
self.use_list_heuristic = use_list_heuristic
self.use_int_heuristic = use_int_heuristic
self.utf8_decode_strings = utf8_decode_strings
self.force_8bytes_long = force_8bytes_long
def _read(self, fmt):
sz = struct.calcsize(fmt)
return struct.unpack(fmt, self.f.read(sz))
def read_boolean(self):
return self.read_int() == 1
def read_int(self):
return self._read('i')[0]
def read_long(self):
if self.force_8bytes_long:
return self._read('q')[0]
else:
return self._read('l')[0]
def read_long_array(self, n):
if self.force_8bytes_long:
lst = []
for i in range(n):
lst.append(self.read_long())
return lst
else:
arr = array('l')
arr.fromfile(self.f, n)
return arr.tolist()
def read_float(self):
return self._read('f')[0]
def read_double(self):
return self._read('d')[0]
def read_string(self, disable_utf8=False):
size = self.read_int()
s = self.f.read(size)
if disable_utf8 or not self.utf8_decode_strings:
return s
return s.decode('utf8')
def read_obj(self):
typeidx = self.read_int()
if typeidx == TYPE_NIL:
return None
elif typeidx == TYPE_NUMBER:
x = self.read_double()
# Extra checking for integral numbers:
if self.use_int_heuristic and x.is_integer():
return int(x)
return x
elif typeidx == TYPE_BOOLEAN:
return self.read_boolean()
elif typeidx == TYPE_STRING:
return self.read_string()
elif (typeidx == TYPE_TABLE or typeidx == TYPE_TORCH or
typeidx == TYPE_FUNCTION or typeidx == TYPE_RECUR_FUNCTION or
typeidx == LEGACY_TYPE_RECUR_FUNCTION):
# read the object reference index
index = self.read_int()
# check it is loaded already
if index in self.objects:
return self.objects[index]
# otherwise read it
if (typeidx == TYPE_FUNCTION or typeidx == TYPE_RECUR_FUNCTION or
typeidx == LEGACY_TYPE_RECUR_FUNCTION):
size = self.read_int()
dumped = self.f.read(size)
upvalues = self.read_obj()
obj = LuaFunction(size, dumped, upvalues)
self.objects[index] = obj
return obj
elif typeidx == TYPE_TORCH:
version = self.read_string(disable_utf8=True)
if version.startswith(b'V '):
version_number = int(float(version.partition(b' ')[2]))
class_name = self.read_string(disable_utf8=True)
else:
class_name = version
# created before existence of versioning
version_number = 0
if class_name in type_handlers:
# TODO: can custom readers ever be self-referential?
self.objects[index] = None # FIXME: if self-referential
obj = type_handlers[class_name](self, version)
self.objects[index] = obj
else:
# This must be performed in two steps to allow objects
# to be a property of themselves.
obj = TorchObject(
class_name, version_number=version_number)
self.objects[index] = obj
# After self.objects is populated, it's safe to read in
# case self-referential
obj._obj = self.read_obj()
return obj
else: # it is a table: returns a custom dict or a list
size = self.read_int()
# custom hashable dict, so that it can be a key, see above
obj = hashable_uniq_dict()
# For checking if keys are consecutive and positive ints;
# if so, returns a list with indices converted to 0-indices.
key_sum = 0
keys_natural = True
# bugfix: obj must be registered before reading keys and vals
self.objects[index] = obj
for _ in range(size):
k = self.read_obj()
v = self.read_obj()
obj[k] = v
if self.use_list_heuristic:
if not isinstance(k, int) or k <= 0:
keys_natural = False
elif isinstance(k, int):
key_sum += k
if self.use_list_heuristic:
# n(n+1)/2 = sum <=> consecutive and natural numbers
n = len(obj)
if keys_natural and n * (n + 1) == 2 * key_sum:
lst = []
for i in range(len(obj)):
elem = obj[i + 1]
# In case it is self-referential. This is not
# needed in lua torch since the tables are never
# modified as they are here.
if elem == obj:
elem = lst
lst.append(elem)
self.objects[index] = obj = lst
return obj
else:
raise T7ReaderException(
"unknown object type / typeidx: {}".format(typeidx))
def load(filename, **kwargs):
"""
Loads the given t7 file using default settings; kwargs are forwarded
to `T7Reader`.
"""
with open(filename, 'rb') as f:
reader = T7Reader(f, **kwargs)
return reader.read_obj()
|
# 윈도우에서는 한글 인코딩 오류가 발생할 수 있습니다.
# 한글 인코딩 오류가 발생한다면
# Message.log(message_type="info", msg="데이터를 저장했습니다.")
# 위의 코드 부분의 msg를 영어로 수정해서 사용해주세요.
import json
import sys
from eliot import Message, start_action, to_file, write_traceback
import requests
# 로그 출력을 표준 출력으로 설정(터미널에 출력하기)
to_file(sys.stdout)
# 크롤링 대상 URL 리스트
PAGE_URL_LIST = [
'https://eliot.readthedocs.io/en/1.0.0/',
'https://eliot.readthedocs.io/en/1.0.0/generating/index.html',
'https://example.com/notfound.html',
]
def fetch_pages():
"""페이지의 내용을 추출합니다."""
# 어떤 처리의 로그인지는 action_type으로 지정
with start_action(action_type="fetch_pages"):
page_contents = {}
for page_url in PAGE_URL_LIST:
# 어떤 처리의 로그인지 action_type으로 출력
with start_action(action_type="download", url=page_url):
try:
r = requests.get(page_url, timeout=30)
r.raise_for_status()
except requests.exceptions.RequestException as e:
write_traceback() # 예외가 발생하면 트레이스백 출력
continue
page_contents[page_url] = r.text
return page_contents
if __name__ == '__main__':
page_contents = fetch_pages()
with open('page_contents.json', 'w') as f_page_contents:
json.dump(page_contents, f_page_contents, ensure_ascii=False)
# 단순하게 로그 메시지만 출력할 수도 있음
Message.log(message_type="info", msg="데이터를 저장했습니다.")
|
'''Schema class and related code.'''
import keyword
import textwrap
from collections import OrderedDict
from lima import abc
from lima import exc
from lima import registry
from lima import util
# Helper functions ############################################################
def _fields_from_bases(bases):
'''Return fields determined from a list of base classes'''
fields = OrderedDict()
# determine base classes that are actually Schemas by checking if they
# inherit from abc.SchemaABC
schema_bases = [b for b in bases if (issubclass(b, abc.SchemaABC) and
b != abc.SchemaABC)]
# Add fields of base schemas. Bases listed first have precedence (to
# reflect how python inherits class attributes). Their items are also
# placed first in the fields OrderedDict (to reflect the order in which the
# bases are written down in the class definition).
for base in schema_bases:
for k, v in base.__fields__.items():
if k not in fields:
fields[k] = v
return fields
def _fields_include(fields, include):
'''Return a copy of fields with fields in include included.'''
util.ensure_mapping(include)
util.ensure_only_instances_of(include.keys(), str)
util.ensure_only_instances_of(include.values(), abc.FieldABC)
result = fields.copy()
result.update(include)
return result
def _fields_exclude(fields, remove):
'''Return a copy of fields with fields mentioned in exclude missing.'''
util.ensure_only_instances_of(remove, str)
util.ensure_subset_of(remove, fields)
return OrderedDict([(k, v) for k, v in fields.items() if k not in remove])
def _fields_only(fields, only):
'''Return a copy of fields containing only fields mentioned in only.'''
util.ensure_only_instances_of(only, str)
util.ensure_subset_of(only, fields)
return OrderedDict([(k, v) for k, v in fields.items() if k in only])
def _mangle_name(name):
'''Return mangled field name.
Mangled field names have some name prefixes replaced with others (see
mapping in code). This is to allow some field names with special chars in
them to be defined via Schema class attributes.
'''
mapping = dict(at='@', dash='-', dot='.', hash='#', plus='+', nil='')
if '__' not in name:
return name
before, after = name.split('__', 1)
if before not in mapping:
return name
return mapping[before] + after
def _make_function(name, code, globals_=None):
'''Return a function created by executing a code string in a new namespace.
This is not much more than a wrapper around :func:`exec`.
Args:
name: The name of the function to create. Must match the function name
in ``code``.
code: A String containing the function definition code. The name of the
function must match ``name``.
globals_: A dict of globals to mix into the new function's namespace.
``__builtins__`` must be provided explicitly if required.
.. warning:
All pitfalls of using :func:`exec` apply to this function as well.
'''
namespace = dict(__builtins__={})
if globals_:
namespace.update(globals_)
exec(code, namespace)
return namespace[name]
def _field_val_cns(field, field_name, field_num):
'''Return (code, namespace)-tuple for determining a field's value.
Args:
field: A :class:`lima.fields.Field` instance.
field_name: The name (key) of the field.
field_num: A schema-wide unique number for the field
Returns:
A tuple consisting of: a) a fragment of Python code to determine the
field's value for an object called ``obj`` and b) a namespace dict
containing the objects necessary for this code fragment to work.
For a field ``myfield`` that has a ``pack`` and a ``get`` callable defined,
the output of this function could look something like this:
.. code-block:: python
(
'pack3(get3(obj))', # the code
{'get3': myfield.get, 'pack3': myfield.pack} # the namespace
)
'''
namespace = {}
if hasattr(field, 'val'):
# add constant-field-value-shortcut to namespace
name = 'val{}'.format(field_num)
namespace[name] = field.val
# later, get value using this shortcut
val_code = name
elif hasattr(field, 'get'):
# add getter-shortcut to namespace
name = 'get{}'.format(field_num)
namespace[name] = field.get
# later, get value by calling this shortcut
val_code = '{}(obj)'.format(name)
elif hasattr(field, 'key'):
# add key-shortcut to namespace
name = 'key{}'.format(field_num)
namespace[name] = field.key
# later, get value by using this shortcut
val_code = 'obj[{}]'.format(name)
else:
# neither constant val nor getter: try to get value via attr
# (if attr is not specified, use field name as attr)
obj_attr = getattr(field, 'attr', field_name)
if not str.isidentifier(obj_attr) or keyword.iskeyword(obj_attr):
msg = 'Not a valid attribute name: {!r}'
raise ValueError(msg.format(obj_attr))
# later, get value using this attr
val_code = 'obj.{}'.format(obj_attr)
if hasattr(field, 'pack'):
# add pack-shortcut to namespace
name = 'pack{}'.format(field_num)
namespace[name] = field.pack
# later, pass field value to this shortcut
val_code = '{}({})'.format(name, val_code)
return val_code, namespace
def _dump_field_func(field, field_name, many):
'''Return a customized function that dumps a single field.
Args:
field: The field.
field_name: The name (key) of the field.
many: If True(ish), the resulting function will expect collections of
objects, otherwise it will expect a single object.
Returns:
A custom function that expects an object (or a collection of objects
depending on ``many``), and returns a single field's value per object.
'''
val_code, namespace = _field_val_cns(field, field_name, 0)
if many:
func_tpl = 'def dump_field(objs): return [{val_code} for obj in objs]'
else:
func_tpl = 'def dump_field(obj): return {val_code}'
# assemble function code
code = func_tpl.format(val_code=val_code)
# finally create and return function
return _make_function('dump_field', code, namespace)
def _dump_fields_func(fields, ordered, many):
'''Return a customized function that dumps multiple fields.
Args:
fields: An ordered mapping of field names to fields.
ordered: If True(ish), the resulting function will return OrderedDict
objects, otherwise it will return ordinary dicts.
many: If True(ish), the resulting function will expect collections of
objects, otherwise it will expect a single object.
Returns:
A custom function that expects an object (or a collectionof objects
depending on ``many``), and returns multiple fields' values per object.
'''
# Get correct templates & namespace depending on "ordered" and "many" args
if ordered:
if many:
func_tpl = (
'def dump_fields(objs):\n'
' return [OrderedDict([{joined_entries}]) for obj in objs]'
)
else:
func_tpl = (
'def dump_fields(obj):\n'
' return OrderedDict([{joined_entries}])'
)
entry_tpl = '({field_name!r}, {val_code})'
namespace = {'OrderedDict': OrderedDict}
else:
if many:
func_tpl = (
'def dump_fields(objs):\n'
' return [{{{joined_entries}}} for obj in objs]'
)
else:
func_tpl = (
'def dump_fields(obj):\n'
' return {{{joined_entries}}}'
)
entry_tpl = '{field_name!r}: {val_code}'
namespace = {}
# one entry per field
entries = []
# iterate over fields to fill up entries
for field_num, (field_name, field) in enumerate(fields.items()):
val_code, val_ns = _field_val_cns(field, field_name, field_num)
namespace.update(val_ns)
# add entry
entries.append(
entry_tpl.format(field_name=field_name, val_code=val_code)
)
# assemble function code
code = func_tpl.format(joined_entries=', '.join(entries))
# finally create and return function
return _make_function('dump_fields', code, namespace)
# Schema Metaclass ############################################################
class SchemaMeta(type):
'''Metaclass of Schema.
.. note::
The metaclass :class:`SchemaMeta` is used internally to simplify the
configuration of new :class:`Schema` classes. For users of the library
there should be no need to use :class:`SchemaMeta` directly.
When defining a new :class:`Schema` (sub)class, :class:`SchemaMeta` makes
sure that the new class has a class attribute :attr:`__fields__` of type
:class:`collections.OrderedDict` containing the fields for the new
Schema.
:attr:`__fields__` is determined like this:
- The :attr:`__fields__` of all base classes are copied (with base classes
specified first having precedence).
Note that the fields themselves are *not* copied - changing an inherited
field would change this field for all base classes referencing this field
as well. In general it is *strongly* suggested to treat fields as
immutable.
- Fields (Class variables of type :class:`lima.abc.FieldABC`) are moved out
of the class namespace and into :attr:`__fields__`, overriding any fields
of the same name therein.
- If present, the class attribute :attr:`__lima_args__` is removed from the
class namespace and evaluated as follows:
- Fields specified via ``__lima_args__['include']`` (an optional mapping
of field names to fields) are inserted into :attr:`__fields__`.
overriding any fields of the same name therein.
If the order of your fields is important, make sure that
``__lima_args__['include']`` is of type
:class:`collections.OrderedDict` or similar.
New fields in ``__lima_args__['include']__`` are inserted at the
position where ``__lima_args__`` is specified in the class.
- Fields named in an optional sequence ``__lima_args__['exclude']`` are
removed from :attr:`__fields__`. If only one field is to be removed,
it's ok to supply a simple string instead of a list containing only one
string. ``__lima_args__['exclude']`` may not be specified together with
``__lima_args__['only']``.
- If in an optional sequence ``__lima_args__['only']`` is provided, *all
but* the fields mentioned therein are removed from :attr:`__fields__`.
If only one field is to remain, it's ok to supply a simple string
instead of a list containing only one string. ``__lima_args__['only']``
may not be specified together with ``__lima_args__['exclude']``.
Think twice before using ``__lima_args__['only']`` - most of the time
it's better to rethink your Schema than to remove a lot of fields that
maybe shouldn't be there in the first place.
.. versionadded:: 0.3
Support for ``__lima_args__['only']``.
:class:`SchemaMeta` also makes sure the new Schema class is registered with
the lima class registry :mod:`lima.registry` (at least if the Schema isn't
defined inside a local namespace, where we wouldn't find it later on).
'''
def __new__(metacls, name, bases, namespace):
# aggregate fields from base classes
fields = _fields_from_bases(bases)
# get and verify __lima_args__
args = namespace.get('__lima_args__', {})
with util.exception_context('__lima_args__'):
util.ensure_mapping(args)
util.ensure_subset_of(args, {'include', 'exclude', 'only'})
util.ensure_only_one_of(args, {'exclude', 'only'})
# determine individual args (include, exclude, only)
include = args.get('include', {})
exclude = util.vector_context(args.get('exclude', []))
only = util.vector_context(args.get('only', []))
# loop over copy of namespace items (we mutate namespace in this loop)
for k, v in list(namespace.items()):
if k == '__lima_args__':
# at position of __lima_args__: insert include (if specified)
if include:
with util.exception_context("__lima_args__['include']"):
fields = _fields_include(fields, include)
elif isinstance(v, abc.FieldABC):
# if a field was found: move it from namespace into fields
# (also, mangle its name to allow some special field names)
fields[_mangle_name(k)] = namespace.pop(k)
if exclude:
with util.exception_context('__lima_args__["exclude"]'):
fields = _fields_exclude(fields, exclude)
elif only:
with util.exception_context('__lima_args__["only"]'):
fields = _fields_only(fields, only)
# add __fields__ to namespace
namespace['__fields__'] = fields
# remove __lima_args__ from namespace (if present)
namespace.pop('__lima_args__', None)
# Create the new class. Note that the superclass gets the altered
# namespace as a common dict explicitly - we don't need an OrderedDict
# namespace any more at this point.
cls = super().__new__(metacls, name, bases, dict(namespace))
# Try to register the new class. Classes defined in local namespaces
# cannot be registerd. We're ok with this.
with util.suppress(exc.RegisterLocalClassError):
registry.global_registry.register(cls)
# return class
return cls
@classmethod
def __prepare__(metacls, name, bases):
'''Return an OrderedDict as the class namespace.
This allows us to keep track of the order in which fields were defined
for a schema.
'''
return OrderedDict()
# Schema ######################################################################
class Schema(abc.SchemaABC, metaclass=SchemaMeta):
'''Base class for Schemas.
Args:
exclude: An optional sequence of field names to be removed from the
fields of the new :class:`Schema` instance. If only one field is to
be removed, it's ok to supply a simple string instead of a list
containing only one string for ``exclude``. ``exclude`` may not be
specified together with ``only``.
only: An optional sequence of the names of the only fields that shall
remain for the new :class:`Schema` instance. If just one field is
to remain, it's ok to supply a simple string instead of a list
containing only one string for ``only``. ``only`` may not be
specified together with ``exclude``.
include: An optional mapping of field names to fields to additionally
include in the new Schema instance. Think twice before using this
option - most of the time it's better to include fields at class
level rather than at instance level.
ordered: An optional boolean indicating if the :meth:`Schema.dump`
method should output :class:`collections.OrderedDict` objects
instead of simple :class:`dict` objects. Defaults to ``False``.
This does not influence how nested fields are serialized.
many: An optional boolean indicating if the new Schema will be
serializing single objects (``many=False``) or collections of
objects (``many=True``) per default. This can later be overridden
in the :meth:`dump` Method.
.. versionadded:: 0.3
The ``include`` parameter.
.. versionadded:: 0.3
The ``ordered`` parameter.
Upon creation, each Schema object gets an internal mapping of field names
to fields. This mapping starts out as a copy of the class's
:attr:`__fields__` attribute. (For an explanation on how this
:attr:`__fields__` attribute is determined, see :class:`SchemaMeta`.)
Note that the fields themselves are not copied - changing the field of an
instance would change this field for the other instances and classes
referencing this field as well. In general it is *strongly* suggested to
treat fields as immutable.
The internal field mapping is then modified as follows:
- If ``include`` was provided, fields specified therein are added
(overriding any fields of the same name already present)
If the order of your fields is important, make sure that ``include`` is
of type :class:`collections.OrderedDict` or similar.
- If ``exclude`` was provided, fields specified therein are removed.
- If ``only`` was provided, *all but* the fields specified therein are
removed (unless ``exclude`` was provided as well, in which case a
:exc:`ValueError` is raised.)
Also upon creation, each Schema object gets an individually created dump
function that aims to unroll most of the loops and to minimize the number
of attribute lookups, resulting in a little speed gain on serialization.
:class:`Schema` classes defined outside of local namespaces can be
referenced by name (used by :class:`lima.fields.Nested`).
'''
def __init__(self,
*,
exclude=None,
only=None,
include=None,
ordered=False,
many=False):
fields = self.__class__.__fields__.copy()
if exclude and only:
msg = "Can't specify exclude and only at the same time."
raise ValueError(msg)
if include:
with util.exception_context('include'):
fields = _fields_include(fields, include)
if exclude:
with util.exception_context('exclude'):
fields = _fields_exclude(fields, util.vector_context(exclude))
elif only:
with util.exception_context('only'):
fields = _fields_only(fields, util.vector_context(only))
# add instance vars to self
self._fields = fields
self._dump_field_func_cache = {} # dict of funcs dumping single fields
self._ordered = ordered
self._many = many
@property
def many(self):
'''Read-only property: does the dump method expect collections?'''
return self._many
@property
def ordered(self):
'''Read-only property: does the dump method return ordered dicts?'''
return self._ordered
@util.reify
def _dump_fields(self):
'''Return instance-specific dump function for all fields (reified).'''
with util.exception_context('Lazy creation of dump fields function'):
return _dump_fields_func(self._fields, self._ordered, self._many)
def _dump_field_func(self, field_name):
'''Return instance-specific dump function for a single field.
Functions are created when requested for the first time and get cached
for subsequent calls of this method.
'''
if field_name in self._dump_field_func_cache:
return self._dump_field_func_cache[field_name]
with util.exception_context('Lazy creation of dump field function'):
func = _dump_field_func(self._fields[field_name],
field_name, self._many)
self._dump_field_func_cache[field_name] = func
return func
def dump(self, obj):
'''Return a marshalled representation of obj.
Args:
obj: The object (or collection of objects, depending on the
schema's :attr:`many` property) to marshall.
Returns:
A representation of ``obj`` in the form of a JSON-serializable dict
(or :class:`collections.OrderedDict`, depending on the schema's
:attr:`ordered` property), with each entry corresponding to one of
the schema's fields. (Or a list of such dicts in case a collection
of objects was marshalled)
.. versionchanged:: 0.4
Removed the ``many`` parameter of this method.
'''
# call the instance-specific dump function
return self._dump_fields(obj)
|
import csdl.operations as ops
from csdl.core.variable import Variable
from csdl.core.output import Output
def tanh(var):
if not isinstance(var, Variable):
raise TypeError(var, " is not an Variable object")
op = ops.tanh(var)
op.outs = (Output(
None,
op=op,
shape=op.dependencies[0].shape,
), )
# for out in op.outs:
# out.add_dependency_node(op)
return op.outs[0]
|
import tensorflow as tf
from net_util import conv_2d, max_pool_2d, avg_pool_2d, fully_connected
class SiamCRNN(object):
def get_model(self, Input_X, Input_Y, data_format='NHWC', is_training=True):
net_X = self._feature_extract_layer(inputs=Input_X, name='Fea_Ext_',
data_format=data_format,
is_training=is_training)
net_Y = self._feature_extract_layer(inputs=Input_Y, name='Fea_Ext_',
data_format=data_format,
is_training=is_training, is_reuse=True)
fea_1 = tf.squeeze(net_X, axis=1)
fea_2 = tf.squeeze(net_Y, axis=1)
logits, pred = self._change_judge_layer(feature_1=fea_1, feature_2=fea_2, name='Cha_Jud_',
is_training=is_training)
return logits, pred
def _feature_extract_layer(self, inputs, name='Fea_Ext_', data_format='NHWC', is_training=True, is_reuse=False):
with tf.variable_scope(name) as scope:
if is_reuse:
scope.reuse_variables()
# (B, H, W, C) --> (B, H, W, 16)
layer_1 = conv_2d(inputs=inputs, kernel_size=[3, 3], output_channel=16, stride=[1, 1], name='layer_1_conv',
padding='SAME', data_format=data_format, is_training=is_training, is_bn=False,
activation=tf.nn.relu)
layer_2 = conv_2d(inputs=layer_1, kernel_size=[3, 3], output_channel=16, stride=[1, 1], name='layer_2_conv',
padding='SAME', data_format=data_format, is_training=is_training, is_bn=False,
activation=tf.nn.relu)
layer_2 = tf.contrib.layers.dropout(inputs=layer_2, is_training=is_training, keep_prob=0.8)
# (B, H/2, W/2, 16) --> (B, H/2, W/2, 32)
layer_3 = conv_2d(inputs=layer_2, kernel_size=[3, 3], output_channel=32, stride=[1, 1], padding='SAME',
name='layer_3_conv', data_format=data_format, is_training=is_training, is_bn=False,
activation=tf.nn.relu)
layer_4 = conv_2d(inputs=layer_3, kernel_size=[3, 3], output_channel=32, stride=[1, 1], padding='SAME',
name='layer_4_conv', data_format=data_format, is_training=is_training, is_bn=False,
activation=tf.nn.relu)
layer_4 = tf.contrib.layers.dropout(inputs=layer_4, is_training=is_training, keep_prob=0.7)
# # (B, H/2, W/2, 32) --> (B, H/2, W/2, 64)
layer_5 = conv_2d(inputs=layer_4, kernel_size=[3, 3], output_channel=64, stride=[1, 1], padding='SAME',
name='layer_5_conv', data_format=data_format, is_training=is_training, is_bn=False,
activation=tf.nn.relu)
net = conv_2d(inputs=layer_5, kernel_size=[5, 5], output_channel=64, stride=[1, 1], padding='VALID',
name='layer_6_conv', data_format=data_format, is_training=is_training, is_bn=False,
activation=tf.nn.relu)
net = tf.contrib.layers.dropout(inputs=net, is_training=is_training, keep_prob=0.5)
return net
def _change_judge_layer(self, feature_1, feature_2, name='Cha_Jud_', is_training=True,
activation=tf.nn.sigmoid):
with tf.variable_scope(name) as scope:
seq = tf.concat([feature_1, feature_2], axis=1) # (B, 2, 128)
num_units = [128, 64]
cells = [tf.nn.rnn_cell.LSTMCell(num_unit, activation=tf.nn.tanh) for num_unit in num_units]
mul_cells = tf.nn.rnn_cell.MultiRNNCell(cells)
output, cell_state = tf.nn.dynamic_rnn(mul_cells, seq, dtype=tf.float32, time_major=False)
hidden_state = tf.contrib.layers.dropout(inputs=output[:, -1], is_training=is_training, keep_prob=0.5)
logits_0 = fully_connected(hidden_state, num_outputs=32, is_training=is_training, is_bn=False,
activation=tf.nn.tanh)
logits = fully_connected(logits_0, num_outputs=1, is_training=is_training, is_bn=False)
pred = activation(logits)
return logits, pred
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
import { NAME_CARD } from '../../constants/components';
import { SLOT_NAME_DEFAULT, SLOT_NAME_FOOTER, SLOT_NAME_HEADER } from '../../constants/slot-names';
import Vue, { mergeData } from '../../utils/vue';
import { htmlOrText } from '../../utils/html';
import { hasNormalizedSlot, normalizeSlot } from '../../utils/normalize-slot';
import { copyProps, pluckProps, prefixPropName, unprefixPropName } from '../../utils/props';
import cardMixin from '../../mixins/card';
import { BCardBody, props as bodyProps } from './card-body';
import { BCardHeader, props as headerProps } from './card-header';
import { BCardFooter, props as footerProps } from './card-footer';
import { BCardImg, props as imgProps } from './card-img';
var cardImgProps = copyProps(imgProps, prefixPropName.bind(null, 'img'));
cardImgProps.imgSrc.required = false;
export var props = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, bodyProps), headerProps), footerProps), cardImgProps), copyProps(cardMixin.props)), {}, {
align: {
type: String // default: null
},
noBody: {
type: Boolean,
default: false
}
}); // @vue/component
export var BCard = /*#__PURE__*/Vue.extend({
name: NAME_CARD,
functional: true,
props: props,
render: function render(h, _ref) {
var _class;
var props = _ref.props,
data = _ref.data,
slots = _ref.slots,
scopedSlots = _ref.scopedSlots;
var imgLeft = props.imgLeft,
imgRight = props.imgRight,
imgStart = props.imgStart,
imgEnd = props.imgEnd,
header = props.header,
headerHtml = props.headerHtml,
footer = props.footer,
footerHtml = props.footerHtml,
align = props.align,
textVariant = props.textVariant,
bgVariant = props.bgVariant,
borderVariant = props.borderVariant;
var $scopedSlots = scopedSlots || {};
var $slots = slots();
var slotScope = {};
var $imgFirst = h();
var $imgLast = h();
if (props.imgSrc) {
var $img = h(BCardImg, {
props: pluckProps(cardImgProps, props, unprefixPropName.bind(null, 'img'))
});
if (props.imgBottom) {
$imgLast = $img;
} else {
$imgFirst = $img;
}
}
var $header = h();
var hasHeaderSlot = hasNormalizedSlot(SLOT_NAME_HEADER, $scopedSlots, $slots);
if (hasHeaderSlot || header || headerHtml) {
$header = h(BCardHeader, {
props: pluckProps(headerProps, props),
domProps: hasHeaderSlot ? {} : htmlOrText(headerHtml, header)
}, normalizeSlot(SLOT_NAME_HEADER, slotScope, $scopedSlots, $slots));
}
var $content = normalizeSlot(SLOT_NAME_DEFAULT, slotScope, $scopedSlots, $slots); // Wrap content in <card-body> when `noBody` prop set
if (!props.noBody) {
$content = h(BCardBody, {
props: pluckProps(bodyProps, props)
}, $content);
}
var $footer = h();
var hasFooterSlot = hasNormalizedSlot(SLOT_NAME_FOOTER, $scopedSlots, $slots);
if (hasFooterSlot || footer || footerHtml) {
$footer = h(BCardFooter, {
props: pluckProps(footerProps, props),
domProps: hasHeaderSlot ? {} : htmlOrText(footerHtml, footer)
}, normalizeSlot(SLOT_NAME_FOOTER, slotScope, $scopedSlots, $slots));
}
return h(props.tag, mergeData(data, {
staticClass: 'card',
class: (_class = {
'flex-row': imgLeft || imgStart,
'flex-row-reverse': (imgRight || imgEnd) && !(imgLeft || imgStart)
}, _defineProperty(_class, "text-".concat(align), align), _defineProperty(_class, "bg-".concat(bgVariant), bgVariant), _defineProperty(_class, "border-".concat(borderVariant), borderVariant), _defineProperty(_class, "text-".concat(textVariant), textVariant), _class)
}), [$imgFirst, $header, $content, $footer, $imgLast]);
}
});
|
"""
Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""
import logging
import six
from yaml.composer import Composer
from yaml.reader import Reader
from yaml.scanner import Scanner
from yaml.resolver import Resolver
from yaml import ScalarNode
from yaml import SequenceNode
from yaml import MappingNode
from yaml.constructor import SafeConstructor
from yaml.constructor import ConstructorError
import cfnlint
from cfnlint.decode.str_node import str_node
try:
from yaml.cyaml import CParser as Parser # pylint: disable=ungrouped-imports
cyaml = True
except ImportError:
from yaml.parser import Parser # pylint: disable=ungrouped-imports
cyaml = False
UNCONVERTED_SUFFIXES = ['Ref', 'Condition']
FN_PREFIX = 'Fn::'
LOGGER = logging.getLogger(__name__)
class CfnParseError(ConstructorError):
"""
Error thrown when the template contains Cfn Error
"""
def __init__(self, filename, message, line_number, column_number, key=' '):
# Call the base class constructor with the parameters it needs
super(CfnParseError, self).__init__(message)
# Now for your custom code...
self.filename = filename
self.line_number = line_number
self.column_number = column_number
self.message = message
self.match = cfnlint.Match(
line_number + 1, column_number + 1, line_number + 1,
column_number + 1 + len(key), filename, cfnlint.ParseError(), message=message)
class NodeConstructor(SafeConstructor):
"""
Node Constructors for loading different types in Yaml
"""
def __init__(self, filename):
# Call the base class constructor
super(NodeConstructor, self).__init__()
self.filename = filename
# To support lazy loading, the original constructors first yield
# an empty object, then fill them in when iterated. Due to
# laziness we omit this behaviour (and will only do "deep
# construction") by first exhausting iterators, then yielding
# copies.
def construct_yaml_map(self, node):
# Check for duplicate keys on the current level, this is not desirable
# because a dict does not support this. It overwrites it with the last
# occurance, which can give unexpected results
mapping = {}
for key_node, value_node in node.value:
key = self.construct_object(key_node, False)
value = self.construct_object(value_node, False)
if key in mapping:
raise CfnParseError(
self.filename,
'Duplicate resource found "{}" (line {})'.format(key, key_node.start_mark.line + 1),
key_node.start_mark.line, key_node.start_mark.column, key)
mapping[key] = value
obj, = SafeConstructor.construct_yaml_map(self, node)
return obj
def construct_yaml_str(self, node):
obj = SafeConstructor.construct_yaml_str(self, node)
assert isinstance(obj, (six.string_types))
return str_node(obj, node.start_mark, node.end_mark)
def construct_yaml_null_error(self, node):
"""Throw a null error"""
raise CfnParseError(
self.filename,
'Null value at line {0} column {1}'.format(node.start_mark.line, node.start_mark.column),
node.start_mark.line, node.start_mark.column, ' ')
NodeConstructor.add_constructor(
u'tag:yaml.org,2002:map',
NodeConstructor.construct_yaml_map)
NodeConstructor.add_constructor(
u'tag:yaml.org,2002:str',
NodeConstructor.construct_yaml_str)
NodeConstructor.add_constructor(
u'tag:yaml.org,2002:null',
NodeConstructor.construct_yaml_null_error)
class MarkedLoader(Reader, Scanner, Parser, Composer, NodeConstructor, Resolver):
"""
Class for marked loading YAML
"""
# pylint: disable=non-parent-init-called,super-init-not-called
def __init__(self, stream, filename):
Reader.__init__(self, stream)
Scanner.__init__(self)
if cyaml:
Parser.__init__(self, stream)
else:
Parser.__init__(self)
Composer.__init__(self)
SafeConstructor.__init__(self)
Resolver.__init__(self)
NodeConstructor.__init__(self, filename)
def multi_constructor(loader, tag_suffix, node):
"""
Deal with !Ref style function format
"""
if tag_suffix not in UNCONVERTED_SUFFIXES:
tag_suffix = '{}{}'.format(FN_PREFIX, tag_suffix)
constructor = None
if tag_suffix == 'Fn::GetAtt':
constructor = construct_getatt
elif isinstance(node, ScalarNode):
constructor = loader.construct_scalar
elif isinstance(node, SequenceNode):
constructor = loader.construct_sequence
elif isinstance(node, MappingNode):
constructor = loader.construct_mapping
else:
raise 'Bad tag: !{}'.format(tag_suffix)
return {tag_suffix: constructor(node)}
def construct_getatt(node):
"""
Reconstruct !GetAtt into a list
"""
if isinstance(node.value, (six.text_type, six.string_types)):
return node.value.split('.')
if isinstance(node.value, list):
return [s.value for s in node.value]
raise ValueError('Unexpected node type: {}'.format(type(node.value)))
def loads(yaml_string, fname=None):
"""
Load the given YAML string
"""
loader = MarkedLoader(yaml_string, fname)
loader.add_multi_constructor('!', multi_constructor)
template = loader.get_single_data()
# Convert an empty file to an empty dict
if template is None:
template = {}
return template
def load(filename):
"""
Load the given YAML file
"""
with open(filename) as fp:
return loads(fp.read(), filename)
|
angular.module('starter', ['starter.controllers','starter.services','ngIdle', 'ngMap', 'angularUtils.directives.dirPagination','ngCsv','ngFileUpload','ngSanitize'])
.config(function (KeepaliveProvider, IdleProvider) {
IdleProvider.idle(1800); //dalam detik => 5 = 5 detik
IdleProvider.timeout(1800);
KeepaliveProvider.interval(10);
})
.run(function($rootScope, $http, $interval, $timeout, $window, Idle, Keepalive, $templateCache) {
//remove cache for all templates
$rootScope.$on('$viewContentLoaded', function(){
$templateCache.removeAll();
});
//iddle timeout
$rootScope.started = false;
function closeModals() {
$rootScope.warning = null;
$rootScope.timedout = null;
}
$rootScope.$on('IdleStart', function() {
//$("#idleModal").modal('show');
});
$rootScope.$on('IdleEnd', function() {
localStorage.setItem('LoginInfo', '[]');
$("#idleModal").modal('hide');
});
$rootScope.$on('IdleTimeout', function() {
localStorage.setItem('LoginInfo', '[]');
$("#idleModal").modal('hide');
});
$rootScope.start = function() {
Idle.watch();
$rootScope.started = true;
};
$rootScope.stop = function() {
Idle.unwatch();
$rootScope.started = false;
};
Idle.watch();
//======================================================================================//
var protocol = location.protocol;
var host = location.host;
var pathname = location.pathname;
var base_url = protocol + '//' + host + pathname.split("index.php")[0];
var site_url = base_url + 'index.php/';
var url = base_url + 'api/index.php';
var img_url = base_url + 'api/img/';
$rootScope.host = host;
$rootScope.base_url = base_url;
$rootScope.site_url = site_url;
$rootScope.api_url = site_url + "api";
$rootScope.hashKey = "00043eb6617434cc5f357bbf692e53be";
$rootScope.testValue = "hahaha";
$rootScope.online = navigator.onLine;
//login information
$rootScope.parseJson = [];
$rootScope.AllInfo = localStorage.getItem('LoginInfo');
if(!$rootScope.AllInfo || $rootScope.AllInfo == '[]'){
$rootScope.parseJson = [];
}else{
$rootScope.parseJson = JSON.parse($rootScope.AllInfo)[0];
$rootScope.LoginId = $rootScope.parseJson.LoginId;
$rootScope.LoginName = $rootScope.parseJson.LoginName;
$rootScope.LoginPass = $rootScope.parseJson.LoginPass;
$rootScope.LoginLevel = $rootScope.parseJson.LoginLevel;
$rootScope.LoginImage = $rootScope.parseJson.LoginImage;
$rootScope.LoginActive = $rootScope.parseJson.LoginActive;
$rootScope.LoginTitle = $rootScope.parseJson.LoginTitle;
$rootScope.LoginStatus = $rootScope.parseJson.LoginStatus;
}
$rootScope.logout = function(){
localStorage.clear();
$window.location = $rootScope.site_url + "login";
};
//======================================================================================//
$rootScope.times = "00:00:00";
$rootScope.getDateTime = function(){
var currentTime = new Date();
// returns the month (from 0 to 11)
var month = currentTime.getMonth() + 1;
if(month < 10){month = "0"+month;}else{month = month;}
// returns the day of the month (from 1 to 31)
var day = currentTime.getDate();
if(day < 10){day = "0"+day;}else{day = day;}
// returns the year (four digits)
var year = currentTime.getFullYear();
$rootScope.fulldate = year + "-" + month +"-"+ day ;
$rootScope.dateInput = day.toString() + month.toString() + year.toString().substr(2,2);
var jam = currentTime.getHours();
if(jam < 10 ){ jam = "0"+jam;}else{jam = jam;}
var minu = currentTime.getMinutes();
if(minu < 10 ){ minu = "0"+minu; }else{ minu = minu; }
var sec = currentTime.getSeconds();
if(sec < 10 ){ sec = "0"+sec; }else{ sec = sec; }
$rootScope.times = jam+":"+minu+":"+sec;
};
$interval(function(){
$rootScope.getDateTime();
},1000);
$rootScope.getMenu = function(user){
$http.get($rootScope.api_url+'/menus', { "headers": { "x-token": $rootScope.hashKey }})
.then(function(res){
$rootScope.menus = res.data;
});
};
$rootScope.getMenu("");
})
.directive('numberFormat', ['$filter', '$parse', function ($filter, $parse) {
return {
require: 'ngModel',
link: function (scope, element, attrs, ngModelController) {
var decimals = $parse(attrs.decimals)(scope);
ngModelController.$parsers.push(function (data) {
var parsed = parseFloat(data);
return !isNaN(parsed) ? parsed : 0;
});
ngModelController.$formatters.push(function (data) {
//convert data from model format to view format
return $filter('number')(data, decimals); //converted
});
element.bind('focus', function () {
element.val(ngModelController.$modelValue);
});
element.bind('blur', function () {
// Apply formatting on the stored model value for display
var formatted = $filter('number')(ngModelController.$modelValue, decimals);
element.val(formatted);
});
}
};
}])
.directive('chosen', function(){
var linker = function(scope, element, attr){
scope.$watch('list', function(){
element.trigger('chosen:updated');
});
element.chosen();
};
return{
restrict:'A',
link : linker
};
})
.directive('capitalize', function() {
return {
require: 'ngModel',
link: function(scope, element, attrs, modelCtrl) {
var capitalize = function(inputValue) {
if (!inputValue) inputValue = '';
var capitalized = inputValue.toUpperCase();
if (capitalized !== inputValue) {
modelCtrl.$setViewValue(capitalized);
modelCtrl.$render();
}
return capitalized;
};
modelCtrl.$parsers.push(capitalize);
capitalize(scope[attrs.ngModel]); // capitalize initial value
}
};
})
.directive('capitalizeFirst', function() {
return {
require: 'ngModel',
link: function(scope, element, attrs, modelCtrl) {
var capitalize = function(inputValue) {
if (!inputValue) inputValue = '';
//capitalize first sentences
var capitalized = inputValue.charAt(0).toUpperCase() + inputValue.substr(1).toLowerCase();
if (capitalized !== inputValue) {
modelCtrl.$setViewValue(capitalized);
modelCtrl.$render();
}
return capitalized;
};
modelCtrl.$parsers.push(capitalize);
capitalize(scope[attrs.ngModel]); // capitalize initial value
}
};
})
.directive('selectall', ['$window', function ($window) {
return {
restrict: 'A',
link: function (scope, element, attrs) {
element.on('click', function () {
if (!$window.getSelection().toString()) {
// Required for mobile Safari
this.setSelectionRange(0, this.value.length);
}
});
}
};
}])
.filter('split', function() {
return function(input, splitChar, splitIndex) {
// do some bounds checking here to ensure it has that index
return input.split(splitChar)[splitIndex];
};
})
.directive('disallowSpaces', function() {
return {
restrict: 'A',
link: function($scope, $element) {
$element.bind('input', function() {
$(this).val($(this).val().replace(/ /g, ''));
});
}
};
})
;
|
# stdlib
import json
import multiprocessing
import os
workers_per_core_str = os.getenv("WORKERS_PER_CORE", "1")
max_workers_str = os.getenv("MAX_WORKERS")
use_max_workers = None
if max_workers_str:
use_max_workers = int(max_workers_str)
web_concurrency_str = os.getenv("WEB_CONCURRENCY", None)
host = os.getenv("HOST", "0.0.0.0")
port = os.getenv("PORT", "80")
bind_env = os.getenv("BIND", None)
use_loglevel = os.getenv("LOG_LEVEL", "info")
if bind_env:
use_bind = bind_env
else:
use_bind = f"{host}:{port}"
cores = multiprocessing.cpu_count()
workers_per_core = float(workers_per_core_str)
default_web_concurrency = workers_per_core * cores
if web_concurrency_str:
web_concurrency = int(web_concurrency_str)
assert web_concurrency > 0
else:
web_concurrency = max(int(default_web_concurrency), 2)
if use_max_workers:
web_concurrency = min(web_concurrency, use_max_workers)
accesslog_var = os.getenv("ACCESS_LOG", "-")
use_accesslog = accesslog_var or None
errorlog_var = os.getenv("ERROR_LOG", "-")
use_errorlog = errorlog_var or None
graceful_timeout_str = os.getenv("GRACEFUL_TIMEOUT", "120")
timeout_str = os.getenv("TIMEOUT", "120")
keepalive_str = os.getenv("KEEP_ALIVE", "5")
# Gunicorn config variables
loglevel = use_loglevel
workers = web_concurrency
bind = use_bind
errorlog = use_errorlog
worker_tmp_dir = "/dev/shm"
accesslog = use_accesslog
graceful_timeout = int(graceful_timeout_str)
timeout = int(timeout_str)
keepalive = int(keepalive_str)
# For debugging and testing
log_data = {
"loglevel": loglevel,
"workers": workers,
"bind": bind,
"graceful_timeout": graceful_timeout,
"timeout": timeout,
"keepalive": keepalive,
"errorlog": errorlog,
"accesslog": accesslog,
# Additional, non-gunicorn variables
"workers_per_core": workers_per_core,
"use_max_workers": use_max_workers,
"host": host,
"port": port,
}
print(json.dumps(log_data))
# fetched from https://github.com/tiangolo/uvicorn-gunicorn-docker/blob/master/docker-images/gunicorn_conf.py
|
import re
from collections import OrderedDict, defaultdict
from copy import deepcopy
import numpy as np
import pandas as pd
from lib.monomer_alignment_generation.alignment import *
class Species_interact:
def read_species_annotation_table(annotation):
SPECIES_ANNOTATION_COLUMNS = ["OS", "Tax"]
data = annotation
# initialize the column to extract the species information from
annotation_column = None
current_num_annotations = 0
# Determine whether to extract based on the "OS" field
# or the "Tax" field. Generally, OS is for Uniprot
for column in SPECIES_ANNOTATION_COLUMNS:
# if this column contains more non-null values
if column not in data:
continue
num_annotations = sum(data[column].notnull())
if num_annotations > current_num_annotations:
# use that column to extract data
annotation_column = column
current_num_annotations = num_annotations
# if we did not find an annotation column, return an error
if annotation_column is None:
return None
# creates a new column called species with the species annotations
data.loc[:, "species"] = data.loc[:, annotation_column]
return data[["id", "name", "species"]]
def extract_header_annotation(alignment):
columns = [
("GN", "gene"),
("OS", "organism"),
("PE", "existence_evidence"),
("SV", "sequence_version"),
("n", "num_cluster_members"),
("Tax", "taxon"),
("RepID", "representative_member")
]
col_to_descr = OrderedDict(columns)
regex = re.compile("\s({})=".format(
"|".join(col_to_descr.keys()))
)
res = []
for seq_id in alignment.ids:
full_header = alignment.headers[seq_id][0]
anno = None
if ("GS" in alignment.annotation and
seq_id in alignment.annotation["GS"] and
"DE" in alignment.annotation["GS"][seq_id]):
anno = alignment.annotation["GS"][seq_id]["DE"]
else:
split = full_header.split(maxsplit=1)
if len(split) == 2:
_, anno = split
# extract info from line if we got one
if anno is not None:
# do split on known field names o keep things
# simpler than a gigantic full regex to match
# (some fields are allowed to be missing)
pairs = re.split(regex, anno)
pairs = ["id", seq_id, "name"] + pairs
# create feature-value map
feat_map = dict(zip(pairs[::2], pairs[1::2]))
res.append(feat_map)
else:
res.append({"id": seq_id})
df = pd.DataFrame(res)
return df.reindex(
["id", "name"] + list(col_to_descr.keys()),
axis=1
)
def most_similar_by_organism(similarities, id_to_organism):
# merge the two data frames
data = similarities.merge(id_to_organism, on="id")
# find the most similar in every organism
most_similar_in_species = data.sort_values(by="identity_to_query").groupby("species").last()
most_similar_in_species["species"] = most_similar_in_species.index
most_similar_in_species = most_similar_in_species.reset_index(drop=True)
return most_similar_in_species
def find_paralogs(target_id, id_to_organism, similarities, identity_threshold):
"""
Finds all the sequences in the alignment that originate
from the same species as the target_id, if those sequences
are below the identity threshold (ie, are diverged from
the query)
Parameters
----------
target_id : str
Full identifier of the query sequence
similarities : pd.DataFrame
The contents of identities.csv
id_to_organism : pd.DataFrame
The contents of annotation.csv
identity_threshold : float
Sequences above this identity to the query are not considered paralogs
Returns
-------
pd.DataFrame
with columns id, species, identity_to_query
Entries are paralogs found in the same genome as the query id
"""
# get all the rows that have an id that contains the
# query id. This includes the focus sequence and its hit to
# itself in the database.
annotation_data = similarities.merge(id_to_organism, on="id")
contains_annotation = [target_id in x for x in annotation_data.id]
query_hits = annotation_data.loc[contains_annotation, :]
# get the species annotation for the query sequence
query_species = list(query_hits.species.dropna())
# get all rows that are from the query species
paralogs = annotation_data.query("species == @query_species")
# confirm that paralogs are below the similarity threshold
# ie, are diverged in sequence space from the query
paralogs = paralogs.query("identity_to_query < @identity_threshold")
return paralogs
def filter_best_reciprocal(alignment, paralogs, most_similar_in_species, allowed_error=0.02):
"""
Takes in a dictionary of the best hit to each genome
Removes sequences that are not the best reciprocal hit to the query sequence
Parameters
----------
alignment : str
Path to sequence alignment file
paralogs : pd.DataFrame
Rows correspond to paralogs to the query sequence
Created by find_paralogs() function
most_similar_in_species : pd.DataFrame
Contains the id, species name, and percent identity to query
for each sequence that was the best hit to the query in its
respective species
allowed_error : float
In order for a sequence to be filtered out of the alignment,
it must be more identitical to a paralog sequence than the
target sequence by at least this amount
Returns
-------
pd.DataFrame
Contains the id, species name, and percenty identity to query
for each sequence that was the best reciprocal hit to the query sequence
"""
# Create an n_paralogs x n_sequences ndarray
# where entry i,j is percent identity of paralog i to sequence j
# note the identity here will be different than for the unfiltered alignment
# initialize the matrix
identity_mat = np.zeros((len(paralogs), len(alignment.ids)), dtype=float)
for idx, paralog_id in enumerate(paralogs.id):
# calculate the % identity of every seq in the alignment to current paralog
identities = alignment.identities_to(alignment[alignment.id_to_index[paralog_id]])
# save the results
identity_mat[idx, :] = identities
indices_to_keep = []
# for every sequence in the alignment that is the most similar to the query
# in its respective species...
for index, row in most_similar_in_species.iterrows():
# get the index of that sequence in the alignment.
alignment_index = alignment.id_to_index[row.id]
# Keep sequences if they are the best reciprocal hit -
# i.e., that sequence is not more similar to any paralog
# than it is to the query sequence
if np.all(identity_mat[:, alignment_index] < row.identity_to_query + allowed_error):
indices_to_keep.append(index)
return most_similar_in_species.loc[indices_to_keep, :]
def load_monomer_info(alignment):
annotation = Species_interact.extract_header_annotation(alignment)
annotation_table = Species_interact.read_species_annotation_table(annotation)
if annotation_table is None:
return None, None
similarities = alignment.identities_to(alignment.main_seq)
most_similar_in_species = Species_interact.most_similar_by_organism(similarities, annotation_table)
paralogs = Species_interact.find_paralogs(alignment.main_id, annotation_table, similarities, 0.95)
most_similar_in_species = Species_interact.filter_best_reciprocal(alignment, paralogs, most_similar_in_species)
return annotation_table, most_similar_in_species
def get_interactions(alignment1, alignment2):
annotation_table_1, most_similar_in_species_1 = Species_interact.load_monomer_info(alignment1)
annotation_table_2, most_similar_in_species_2 = Species_interact.load_monomer_info(alignment2)
if annotation_table_1 is None or annotation_table_2 is None:
species_intersection = pd.DataFrame({'id_1': [], 'id_2': []})
else:
species_intersection = most_similar_in_species_1.merge(
most_similar_in_species_2,
how="inner", # takes the intersection
on="species", # merges on species identifiers
suffixes=("_1", "_2")
)
return species_intersection
|
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "EUTRA-RRC-Definitions"
* found in "/home/lixh/ue_folder/openair2/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-14.7.0.asn1"
* `asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example -D /home/lixh/ue_folder/cmake_targets/lte_build_oai/build/CMakeFiles/RRC_Rel14`
*/
#ifndef _LTE_MeasObjectId_H_
#define _LTE_MeasObjectId_H_
#include <asn_application.h>
/* Including external dependencies */
#include <NativeInteger.h>
#ifdef __cplusplus
extern "C" {
#endif
/* LTE_MeasObjectId */
typedef long LTE_MeasObjectId_t;
/* Implementation */
extern asn_per_constraints_t asn_PER_type_LTE_MeasObjectId_constr_1;
extern asn_TYPE_descriptor_t asn_DEF_LTE_MeasObjectId;
asn_struct_free_f LTE_MeasObjectId_free;
asn_struct_print_f LTE_MeasObjectId_print;
asn_constr_check_f LTE_MeasObjectId_constraint;
ber_type_decoder_f LTE_MeasObjectId_decode_ber;
der_type_encoder_f LTE_MeasObjectId_encode_der;
xer_type_decoder_f LTE_MeasObjectId_decode_xer;
xer_type_encoder_f LTE_MeasObjectId_encode_xer;
per_type_decoder_f LTE_MeasObjectId_decode_uper;
per_type_encoder_f LTE_MeasObjectId_encode_uper;
per_type_decoder_f LTE_MeasObjectId_decode_aper;
per_type_encoder_f LTE_MeasObjectId_encode_aper;
#ifdef __cplusplus
}
#endif
#endif /* _LTE_MeasObjectId_H_ */
#include <asn_internal.h>
|
# coding:utf-8
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
from paddlehub import TransformerModule
from paddlehub.module.module import moduleinfo
from ernie.model.ernie import ErnieModel, ErnieConfig
@moduleinfo(
name="ernie",
version="1.2.0",
summary="Baidu's ERNIE, Enhanced Representation through kNowledge IntEgration, max_seq_len=512 when predtrained",
author="baidu-nlp",
author_email="",
type="nlp/semantic_model",
)
class Ernie(TransformerModule):
def _initialize(self):
ernie_config_path = os.path.join(self.directory, "assets", "ernie_config.json")
self.ernie_config = ErnieConfig(ernie_config_path)
self.MAX_SEQ_LEN = 512
self.params_path = os.path.join(self.directory, "assets", "params")
self.vocab_path = os.path.join(self.directory, "assets", "vocab.txt")\
def net(self, input_ids, position_ids, segment_ids, input_mask):
"""
create neural network.
Args:
input_ids (tensor): the word ids.
position_ids (tensor): the position ids.
segment_ids (tensor): the segment ids.
input_mask (tensor): the padding mask.
Returns:
pooled_output (tensor): sentence-level output for classification task.
sequence_output (tensor): token-level output for sequence task.
"""
self.ernie_config._config_dict['use_task_id'] = False
ernie = ErnieModel(src_ids=input_ids,
position_ids=position_ids,
sentence_ids=segment_ids,
input_mask=input_mask,
config=self.ernie_config,
use_fp16=False)
pooled_output = ernie.get_pooled_output()
sequence_output = ernie.get_sequence_output()
return pooled_output, sequence_output
def param_prefix(self):
return "@HUB_ernie-stable@"
if __name__ == '__main__':
test_module = Ernie()
|
#ifndef GYM_PUYOPUYO_BITBOARD_H_GUARD
#define GYM_PUYOPUYO_BITBOARD_H_GUARD
#define WIDTH (8)
#define HEIGHT (8)
#define CLEAR_THRESHOLD (4)
#define H_SHIFT (1)
#define V_SHIFT (WIDTH)
#define TOP_TO_BOTTOM (V_SHIFT * (HEIGHT - 1))
#define TOP (0xFFULL)
#define BOTTOM (0xFF00000000000000ULL)
#define RIGHT_BLOCK (0xFEFEFEFEFEFEFEFEULL)
#define RIGHT_HALF (0xF0F0F0F0F0F0F0F0ULL)
#define RIGHT_DELTA_1 (0xCCCCCCCCCCCCCCCCULL)
#define RIGHT_DELTA_2 (0xAAAAAAAAAAAAAAAAULL)
#define FULL (0xFFFFFFFFFFFFFFFFULL)
#define NUM_ACTIONS (4 * WIDTH - 2)
typedef unsigned long long puyos_t;
typedef unsigned long long bitset_t;
int popcount(puyos_t puyos);
puyos_t cross(puyos_t puyos);
puyos_t flood(register puyos_t source, register puyos_t target);
int popcount_2(puyos_t *puyos);
void flood_2(puyos_t *source, puyos_t *target);
void cross_2(puyos_t *puyos);
#endif /* !GYM_PUYOPUYO_BITBOARD_H_GUARD */
|
import React, { Component } from 'react';
import { View } from 'react-native';
import { Topo, Resultado, Painel } from './components';
export default class App extends Component {
constructor(props) {
super(props);
this.state = { num1: '', num2: '', operacao: 'soma', resultado: '' };
this.calcular = this.calcular.bind(this);
this.atualizaValor = this.atualizaValor.bind(this);
this.atualizaOperacao = this.atualizaOperacao.bind(this);
}
calcular() {
let resultado = 0;
switch (this.state.operacao) {
case 'soma':
resultado = parseFloat(this.state.num1) + parseFloat(this.state.num2);
break;
case 'subtracao':
resultado = parseFloat(this.state.num1) - parseFloat(this.state.num2);
break;
default:
resultado = 0;
}
this.setState({ resultado: resultado.toString() })
}
atualizaOperacao(operacao) {
this.setState({ operacao });
}
atualizaValor(nomeCampo, numero) {
const obj = {};
obj[nomeCampo] = numero;
this.setState(obj);
}
render() {
return (
<View>
<Topo />
<Resultado resultado={this.state.resultado} />
<Painel
num1={this.state.num1}
num2={this.state.num2}
operacao={this.state.operacao}
calcular={this.calcular}
atualizaOperacao={this.atualizaOperacao}
atualizaValor={this.atualizaValor}
/>
</View>
);
}
};
|
const Utils = require('../utils');
const Event = require('../core/event');
const Assets = require('./assets');
/*
@BUG: Space has not effect when no letter comes after.
@TODO: <progress value="70" max="100">70 %</progress>
*/
AFRAME.registerComponent('text-label', {
schema: {
value: {
type: "string",
default: ""
},
name: {
type: "string",
default: ""
},
color: {
type: "color",
default: "#000"
},
align: {
type: "string",
default: "left"
},
font: {
type: "string",
default: ""
},
opacity: {
type: "number",
default: 1
},
side: {
type: "string",
default: 'front'
},
tabSize: {
type: "int",
default: 4
},
letterSpacing: {
type: "int",
default: 0
},
lineHeight: {
type: "string",
default: ""
},
maxLength: {
type: "int",
default: 0
},
type: {
type: "string",
default: "raised"
},
width: {
type: "number",
default: 1
},
height: {
type: "number",
default: 0.18
},
radiusScale: {
type: "number",
default: 0.0125
},
backgroundColor: {
type: "color",
default: "#FFF"
},
backgroundOpacity: {
type: "number",
default: 1
}
},
init: function () {
let that = this;
// Assets
Utils.preloadAssets(Assets);
this.shadow = document.createElement('a-image');
this.shadow.setAttribute('height', this.data.height * 1.17);
this.shadow.setAttribute('width', this.data.width * 1.17)
this.shadow.setAttribute('src', '#aframeButtonShadow');
this.shadow.setAttribute('position', `${this.data.width/2} 0 -0.001`);
this.el.appendChild(this.shadow);
this.background = document.createElement('a-rounded');
this.background.setAttribute('radius', Math.max(this.data.width, this.data.height) * this.data.radiusScale);
this.background.setAttribute('height', this.data.height);
this.background.setAttribute('side', 'double')
this.el.appendChild(this.background);
this.text = document.createElement('a-entity');
this.el.appendChild(this.text);
},
update: function () {
let that = this;
let padding = {
left: 0.021,
right: 0.021
};
let props = {
color: this.data.color,
align: this.data.align,
side: this.data.side,
tabSize: this.data.tabSize,
wrapCount: 24 * this.data.width,
width: this.data.width
};
// Max length
if (this.data.maxLength) {
props.value = this.data.value.substring(0, this.data.maxLength);
this.el.setAttribute('value', props.value)
} else {
props.value = this.data.value;
}
if (this.data.font.length) {
props.font = this.data.font
}
if (this.data.letterSpacing) {
props.letterSpacing = this.data.letterSpacing;
}
if (this.data.lineHeight.length) {
props.lineHeight = this.data.lineHeight;
}
this.text.setAttribute("text", props);
if (this.data.align === 'left') {
this.text.setAttribute('position', padding.left - 0.001 + this.data.width / 2 + ' 0 0.002');
} else if (this.data.align === 'center') {
this.text.setAttribute('position', -0.001 + this.data.width / 2 + ' 0 0.002');
} else {
this.text.setAttribute('position', -(padding.right - 0.001) + this.data.width / 2 + ' 0 0.002');
}
this.background.setAttribute('color', this.data.backgroundColor)
this.background.setAttribute('width', this.data.width);
this.background.setAttribute('position', '0 -0.09 0.001');
if (this.data.type === 'flat') {
this.shadow.setAttribute('visible', false);
}
},
tick: function () {},
remove: function () {},
pause: function () {},
play: function () {}
});
AFRAME.registerPrimitive('a-text-label', {
defaultComponents: {
'text-label': {}
},
mappings: {
value: 'text-label.value',
name: 'text-label.name',
color: 'text-label.color',
align: 'text-label.align',
font: 'text-label.font',
'opacity': 'text-label.opacity',
'side': 'text-label.side',
'tab-size': 'text-label.tabSize',
'max-length': 'text-label.maxLength',
type: 'text-label.type',
width: 'text-label.width',
height: 'text-label.height',
'letter-spacing': 'text-label.letterSpacing',
'line-height': 'text-label.lineHeight',
'radius-scale': 'text-label.radiusScale',
'background-color': 'text-label.backgroundColor',
'background-opacity': 'text-label.backgroundOpacity'
}
});
|
/*!
* bootstrap-fileinput v4.4.0
* http://plugins.krajee.com/file-input
*
* Author: Kartik Visweswaran
* Copyright: 2014 - 2017, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
*/
(function (factory) {
"use strict";
//noinspection JSUnresolvedVariable
if (typeof define === 'function' && define.amd) { // jshint ignore:line
// AMD. Register as an anonymous module.
define(['jquery'], factory); // jshint ignore:line
} else { // noinspection JSUnresolvedVariable
if (typeof module === 'object' && module.exports) { // jshint ignore:line
// Node/CommonJS
// noinspection JSUnresolvedVariable
module.exports = factory(require('jquery')); // jshint ignore:line
} else {
// Browser globals
factory(window.jQuery);
}
}
}(function ($) {
"use strict";
$.fn.fileinputLocales = {};
$.fn.fileinputThemes = {};
var $h, FileInput;
// fileinput helper object for all global variables and internal helper methods
//noinspection JSUnresolvedVariable
$h = {
FRAMES: '.kv-preview-thumb',
SORT_CSS: 'file-sortable',
STYLE_SETTING: 'style="width:{width};height:{height};"',
OBJECT_PARAMS: '<param name="controller" value="true" />\n' +
'<param name="allowFullScreen" value="true" />\n' +
'<param name="allowScriptAccess" value="always" />\n' +
'<param name="autoPlay" value="false" />\n' +
'<param name="autoStart" value="false" />\n' +
'<param name="quality" value="high" />\n',
DEFAULT_PREVIEW: '<div class="file-preview-other">\n' +
'<span class="{previewFileIconClass}">{previewFileIcon}</span>\n' +
'</div>',
MODAL_ID: 'kvFileinputModal',
MODAL_EVENTS: ['show', 'shown', 'hide', 'hidden', 'loaded'],
objUrl: window.URL || window.webkitURL,
compare: function (input, str, exact) {
return input !== undefined && (exact ? input === str : input.match(str));
},
isIE: function (ver) {
// check for IE versions < 11
if (navigator.appName !== 'Microsoft Internet Explorer') {
return false;
}
if (ver === 10) {
return new RegExp('msie\\s' + ver, 'i').test(navigator.userAgent);
}
var div = document.createElement("div"), status;
div.innerHTML = "<!--[if IE " + ver + "]> <i></i> <![endif]-->";
status = div.getElementsByTagName("i").length;
document.body.appendChild(div);
div.parentNode.removeChild(div);
return status;
},
initModal: function ($modal) {
var $body = $('body');
if ($body.length) {
$modal.appendTo($body);
}
},
isEmpty: function (value, trim) {
return value === undefined || value === null || value.length === 0 || (trim && $.trim(value) === '');
},
isArray: function (a) {
return Array.isArray(a) || Object.prototype.toString.call(a) === '[object Array]';
},
ifSet: function (needle, haystack, def) {
def = def || '';
return (haystack && typeof haystack === 'object' && needle in haystack) ? haystack[needle] : def;
},
cleanArray: function (arr) {
if (!(arr instanceof Array)) {
arr = [];
}
return arr.filter(function (e) {
return (e !== undefined && e !== null);
});
},
spliceArray: function (arr, index) {
var i, j = 0, out = [];
if (!(arr instanceof Array)) {
return [];
}
for (i = 0; i < arr.length; i++) {
if (i !== index) {
out[j] = arr[i];
j++;
}
}
return out;
},
getNum: function (num, def) {
def = def || 0;
if (typeof num === "number") {
return num;
}
if (typeof num === "string") {
num = parseFloat(num);
}
return isNaN(num) ? def : num;
},
hasFileAPISupport: function () {
return !!(window.File && window.FileReader);
},
hasDragDropSupport: function () {
var div = document.createElement('div');
/** @namespace div.draggable */
/** @namespace div.ondragstart */
/** @namespace div.ondrop */
return !$h.isIE(9) &&
(div.draggable !== undefined || (div.ondragstart !== undefined && div.ondrop !== undefined));
},
hasFileUploadSupport: function () {
return $h.hasFileAPISupport() && window.FormData;
},
addCss: function ($el, css) {
$el.removeClass(css).addClass(css);
},
getElement: function (options, param, value) {
return ($h.isEmpty(options) || $h.isEmpty(options[param])) ? value : $(options[param]);
},
uniqId: function () {
return Math.round(new Date().getTime() + (Math.random() * 100));
},
htmlEncode: function (str) {
return str.replace(/&/g, '&')
.replace(/</g, '<')
.replace(/>/g, '>')
.replace(/"/g, '"')
.replace(/'/g, ''');
},
replaceTags: function (str, tags) {
var out = str;
if (!tags) {
return out;
}
$.each(tags, function (key, value) {
if (typeof value === "function") {
value = value();
}
out = out.split(key).join(value);
});
return out;
},
cleanMemory: function ($thumb) {
var data = $thumb.is('img') ? $thumb.attr('src') : $thumb.find('source').attr('src');
/** @namespace $h.objUrl.revokeObjectURL */
$h.objUrl.revokeObjectURL(data);
},
findFileName: function (filePath) {
var sepIndex = filePath.lastIndexOf('/');
if (sepIndex === -1) {
sepIndex = filePath.lastIndexOf('\\');
}
return filePath.split(filePath.substring(sepIndex, sepIndex + 1)).pop();
},
checkFullScreen: function () {
//noinspection JSUnresolvedVariable
return document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement ||
document.msFullscreenElement;
},
toggleFullScreen: function (maximize) {
var doc = document, de = doc.documentElement;
if (de && maximize && !$h.checkFullScreen()) {
/** @namespace document.requestFullscreen */
/** @namespace document.msRequestFullscreen */
/** @namespace document.mozRequestFullScreen */
/** @namespace document.webkitRequestFullscreen */
/** @namespace Element.ALLOW_KEYBOARD_INPUT */
if (de.requestFullscreen) {
de.requestFullscreen();
} else if (de.msRequestFullscreen) {
de.msRequestFullscreen();
} else if (de.mozRequestFullScreen) {
de.mozRequestFullScreen();
} else if (de.webkitRequestFullscreen) {
de.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
}
} else {
/** @namespace document.exitFullscreen */
/** @namespace document.msExitFullscreen */
/** @namespace document.mozCancelFullScreen */
/** @namespace document.webkitExitFullscreen */
if (doc.exitFullscreen) {
doc.exitFullscreen();
} else if (doc.msExitFullscreen) {
doc.msExitFullscreen();
} else if (doc.mozCancelFullScreen) {
doc.mozCancelFullScreen();
} else if (doc.webkitExitFullscreen) {
doc.webkitExitFullscreen();
}
}
},
moveArray: function (arr, oldIndex, newIndex) {
if (newIndex >= arr.length) {
var k = newIndex - arr.length;
while ((k--) + 1) {
arr.push(undefined);
}
}
arr.splice(newIndex, 0, arr.splice(oldIndex, 1)[0]);
return arr;
},
cleanZoomCache: function ($el) {
var $cache = $el.closest('.kv-zoom-cache-theme');
if (!$cache.length) {
$cache = $el.closest('.kv-zoom-cache');
}
$cache.remove();
}
};
FileInput = function (element, options) {
var self = this;
self.$element = $(element);
if (!self._validate()) {
return;
}
self.isPreviewable = $h.hasFileAPISupport();
self.isIE9 = $h.isIE(9);
self.isIE10 = $h.isIE(10);
if (self.isPreviewable || self.isIE9) {
self._init(options);
self._listen();
} else {
self.$element.removeClass('file-loading');
}
};
FileInput.prototype = {
constructor: FileInput,
_init: function (options) {
var self = this, $el = self.$element, $cont, t;
self.options = options;
$.each(options, function (key, value) {
switch (key) {
case 'minFileCount':
case 'maxFileCount':
case 'minFileSize':
case 'maxFileSize':
case 'maxFilePreviewSize':
case 'resizeImageQuality':
case 'resizeIfSizeMoreThan':
case 'progressUploadThreshold':
case 'initialPreviewCount':
case 'zoomModalHeight':
case 'minImageHeight':
case 'maxImageHeight':
case 'minImageWidth':
case 'maxImageWidth':
self[key] = $h.getNum(value);
break;
default:
self[key] = value;
break;
}
});
self.$form = $el.closest('form');
self._initTemplateDefaults();
self.fileInputCleared = false;
self.fileBatchCompleted = true;
if (!self.isPreviewable) {
self.showPreview = false;
}
self.uploadFileAttr = !$h.isEmpty($el.attr('name')) ? $el.attr('name') : 'file_data';
self.reader = null;
self.formdata = {};
self.clearStack();
self.uploadCount = 0;
self.uploadStatus = {};
self.uploadLog = [];
self.uploadAsyncCount = 0;
self.loadedImages = [];
self.totalImagesCount = 0;
self.ajaxRequests = [];
self.isError = false;
self.ajaxAborted = false;
self.cancelling = false;
t = self._getLayoutTemplate('progress');
self.progressTemplate = t.replace('{class}', self.progressClass);
self.progressCompleteTemplate = t.replace('{class}', self.progressCompleteClass);
self.progressErrorTemplate = t.replace('{class}', self.progressErrorClass);
self.dropZoneEnabled = $h.hasDragDropSupport() && self.dropZoneEnabled;
self.isDisabled = $el.attr('disabled') || $el.attr('readonly');
if (self.isDisabled) {
$el.attr('disabled', true);
}
self.isUploadable = $h.hasFileUploadSupport() && !$h.isEmpty(self.uploadUrl);
self.isClickable = self.browseOnZoneClick && self.showPreview &&
(self.isUploadable && self.dropZoneEnabled || !$h.isEmpty(self.defaultPreviewContent));
self.slug = typeof options.slugCallback === "function" ? options.slugCallback : self._slugDefault;
self.mainTemplate = self.showCaption ? self._getLayoutTemplate('main1') : self._getLayoutTemplate('main2');
self.captionTemplate = self._getLayoutTemplate('caption');
self.previewGenericTemplate = self._getPreviewTemplate('generic');
if (self.resizeImage && (self.maxImageWidth || self.maxImageHeight)) {
self.imageCanvas = document.createElement('canvas');
self.imageCanvasContext = self.imageCanvas.getContext('2d');
}
if ($h.isEmpty($el.attr('id'))) {
$el.attr('id', $h.uniqId());
}
self.namespace = '.fileinput_' + $el.attr('id').replace(/-/g, '_');
if (self.$container === undefined) {
self.$container = self._createContainer();
} else {
self._refreshContainer();
}
$cont = self.$container;
self.$dropZone = $cont.find('.file-drop-zone');
self.$progress = $cont.find('.kv-upload-progress');
self.$btnUpload = $cont.find('.fileinput-upload');
self.$captionContainer = $h.getElement(options, 'elCaptionContainer', $cont.find('.file-caption'));
self.$caption = $h.getElement(options, 'elCaptionText', $cont.find('.file-caption-name'));
self.$previewContainer = $h.getElement(options, 'elPreviewContainer', $cont.find('.file-preview'));
self.$preview = $h.getElement(options, 'elPreviewImage', $cont.find('.file-preview-thumbnails'));
self.$previewStatus = $h.getElement(options, 'elPreviewStatus', $cont.find('.file-preview-status'));
self.$errorContainer = $h.getElement(options, 'elErrorContainer',
self.$previewContainer.find('.kv-fileinput-error'));
if (!$h.isEmpty(self.msgErrorClass)) {
$h.addCss(self.$errorContainer, self.msgErrorClass);
}
self.$errorContainer.hide();
self.previewInitId = "preview-" + $h.uniqId();
self._initPreviewCache();
self._initPreview(true);
self._initPreviewActions();
self._setFileDropZoneTitle();
$el.removeClass('file-loading');
if ($el.attr('disabled')) {
self.disable();
}
self._initZoom();
},
_initTemplateDefaults: function () {
var self = this, tMain1, tMain2, tPreview, tFileIcon, tClose, tCaption, tBtnDefault, tBtnLink, tBtnBrowse,
tModalMain, tModal, tProgress, tSize, tFooter, tActions, tActionDelete, tActionUpload, tActionZoom,
tActionDrag, tTagBef, tTagBef1, tTagBef2, tTagAft, tGeneric, tHtml, tImage, tText, tVideo, tAudio,
tFlash, tObject, tPdf, tOther, tZoomCache, vDefaultDim;
tMain1 = '{preview}\n' +
'<div class="kv-upload-progress hide"></div>\n' +
'<div class="input-group {class}">\n' +
' {caption}\n' +
' <div class="input-group-btn">\n' +
' {remove}\n' +
' {cancel}\n' +
' {upload}\n' +
' {browse}\n' +
' </div>\n' +
'</div>';
tMain2 = '{preview}\n<div class="kv-upload-progress hide"></div>\n{remove}\n{cancel}\n{upload}\n{browse}\n';
tPreview = '<div class="file-preview {class}">\n' +
' {close}' +
' <div class="{dropClass}">\n' +
' <div class="file-preview-thumbnails">\n' +
' </div>\n' +
' <div class="d-block w-100"></div>' +
' <div class="file-preview-status text-center text-success"></div>\n' +
' <div class="kv-fileinput-error"></div>\n' +
' </div>\n' +
'</div>';
tClose = '<div class="close fileinput-remove">×</div>\n';
tFileIcon = '<i class="fa fa-file kv-caption-icon"></i>';
tCaption = '<div tabindex="500" class="form-control file-caption {class}">\n' +
' <div class="file-caption-name"></div>\n' +
'</div>\n';
//noinspection HtmlUnknownAttribute
tBtnDefault = '<button type="{type}" tabindex="500" title="{title}" class="{css}" ' +
'{status}>{icon} {label}</button>';
//noinspection HtmlUnknownAttribute
tBtnLink = '<a href="{href}" tabindex="500" title="{title}" class="{css}" {status}>{icon} {label}</a>';
//noinspection HtmlUnknownAttribute
tBtnBrowse = '<div tabindex="500" class="{css}" {status}>{icon} {label}</div>';
tModalMain = '<div id="' + $h.MODAL_ID + '" class="file-zoom-dialog modal fade" ' +
'tabindex="-1" aria-labelledby="' + $h.MODAL_ID + 'Label"></div>';
tModal = '<div class="modal-dialog modal-lg" role="document">\n' +
' <div class="modal-content">\n' +
' <div class="modal-header">\n' +
' <div class="kv-zoom-actions pull-right">{toggleheader}{fullscreen}{borderless}{close}</div>\n' +
' <h3 class="modal-title">{heading} <small><span class="kv-zoom-title"></span></small></h3>\n' +
' </div>\n' +
' <div class="modal-body">\n' +
' <div class="floating-buttons"></div>\n' +
' <div class="kv-zoom-body file-zoom-content {zoomFrameClass}"></div>\n' + '{prev} {next}\n' +
' </div>\n' +
' </div>\n' +
'</div>\n';
tProgress = '<div class="progress">\n' +
' <div class="{class}" role="progressbar"' +
' aria-valuenow="{percent}" aria-valuemin="0" aria-valuemax="100" style="width:{percent}%;">\n' +
' {status}\n' +
' </div>\n' +
'</div>';
tSize = ' <samp>({sizeText})</samp>';
tFooter = '<div class="file-thumbnail-footer">\n' +
' <div class="file-footer-caption" title="{caption}">{caption}<br>{size}</div>\n' +
' {progress} {actions}\n' +
'</div>';
tActions = '<div class="file-upload-indicator" title="{indicatorTitle}">{indicator}</div>\n' +
'{drag}\n' +
'<div class="file-actions">\n' +
' <div class="file-footer-buttons">\n' +
' {upload} {delete} {zoom} {other}' +
' </div>\n' +
' <div class="d-block w-100"></div>\n' +
'</div>';
//noinspection HtmlUnknownAttribute
tActionDelete = '<button type="button" class="kv-file-remove {removeClass}" ' +
'title="{removeTitle}" {dataUrl}{dataKey}>{removeIcon}</button>\n';
tActionUpload = '<button type="button" class="kv-file-upload {uploadClass}" title="{uploadTitle}">' +
'{uploadIcon}</button>';
tActionZoom = '<button type="button" class="kv-file-zoom {zoomClass}" ' +
'title="{zoomTitle}">{zoomIcon}</button>';
tActionDrag = '<span class="file-drag-handle {dragClass}" title="{dragTitle}">{dragIcon}</span>';
tTagBef = '<div class="file-preview-frame {frameClass}" id="{previewId}" data-fileindex="{fileindex}"' +
' data-template="{template}"';
tTagBef1 = tTagBef + '><div class="kv-file-content">\n';
tTagBef2 = tTagBef + ' title="{caption}"><div class="kv-file-content">\n';
tTagAft = '</div>{footer}\n</div>\n';
tGeneric = '{content}\n';
tHtml = '<div class="kv-preview-data file-preview-html" title="{caption}" ' + $h.STYLE_SETTING +
'>{data}</div>\n';
tImage = '<img src="{data}" class="file-preview-image kv-preview-data" title="{caption}" alt="{caption}" ' +
$h.STYLE_SETTING + '>\n';
tText = '<textarea class="kv-preview-data file-preview-text" title="{caption}" readonly ' +
$h.STYLE_SETTING + '>{data}</textarea>\n';
tVideo = '<video class="kv-preview-data file-preview-video" width="{width}" ' +
'height="{height}" controls>\n' + '<source src="{data}" type="{type}">\n' + $h.DEFAULT_PREVIEW +
'\n</video>\n';
tAudio = '<div class="file-preview-audio"><audio class="kv-preview-data" controls>\n<source src="{data}" ' +
'type="{type}">\n' + $h.DEFAULT_PREVIEW + '\n</audio></div>\n';
tFlash = '<object class="kv-preview-data file-object" type="application/x-shockwave-flash" ' +
'width="{width}" height="{height}" data="{data}">\n' + $h.OBJECT_PARAMS + ' ' + $h.DEFAULT_PREVIEW +
'\n</object>\n';
tObject = '<object class="kv-preview-data file-object {typeCss}" data="{data}" type="{type}" ' +
'width="{width}" height="{height}">\n' + '<param name="movie" value="{caption}" />\n' +
$h.OBJECT_PARAMS + ' ' + $h.DEFAULT_PREVIEW + '\n</object>\n';
tPdf = '<embed class="kv-preview-data" src="{data}" ' +
'width="{width}" height="{height}" type="application/pdf">\n';
tOther = '<div class="kv-preview-data file-preview-other-frame">\n' + $h.DEFAULT_PREVIEW + '\n</div>\n';
tZoomCache = '<div class="kv-zoom-cache" style="display:none">{zoomContent}</div>';
vDefaultDim = {width: "100%", height: "100%", 'min-height': "480px"};
self.defaults = {
layoutTemplates: {
main1: tMain1,
main2: tMain2,
preview: tPreview,
close: tClose,
fileIcon: tFileIcon,
caption: tCaption,
modalMain: tModalMain,
modal: tModal,
progress: tProgress,
size: tSize,
footer: tFooter,
actions: tActions,
actionDelete: tActionDelete,
actionUpload: tActionUpload,
actionZoom: tActionZoom,
actionDrag: tActionDrag,
btnDefault: tBtnDefault,
btnLink: tBtnLink,
btnBrowse: tBtnBrowse,
zoomCache: tZoomCache
},
previewMarkupTags: {
tagBefore1: tTagBef1,
tagBefore2: tTagBef2,
tagAfter: tTagAft
},
previewContentTemplates: {
generic: tGeneric,
html: tHtml,
image: tImage,
text: tText,
video: tVideo,
audio: tAudio,
flash: tFlash,
object: tObject,
pdf: tPdf,
other: tOther
},
allowedPreviewTypes: ['image', 'html', 'text', 'video', 'audio', 'flash', 'pdf', 'object'],
previewTemplates: {},
previewSettings: {
image: {width: "auto", height: "160px"},
html: {width: "213px", height: "160px"},
text: {width: "213px", height: "160px"},
video: {width: "auto", height: "100%", 'max-width': "100%"},
audio: {width: "100%", height: "30px"},
flash: {width: "auto", height: "100%", 'max-width': "100%"},
object: {height: "100%"},
pdf: {width: "160px", height: "160px"},
other: {width: "160px", height: "160px"}
},
previewZoomSettings: {
image: {width: "auto", height: "auto", 'max-width': "100%", 'max-height': "100%"},
html: vDefaultDim,
text: vDefaultDim,
video: {width: "auto", height: "100%", 'max-width': "100%"},
audio: {width: "100%", height: "30px"},
flash: {width: "auto", height: "480px"},
object: {width: "auto", height: "100%", 'max-width': "100%", 'min-height': "480px"},
pdf: vDefaultDim,
other: {width: "auto", height: "100%", 'min-height': "480px"}
},
fileTypeSettings: {
image: function (vType, vName) {
return $h.compare(vType, 'image.*') || $h.compare(vName, /\.(gif|png|jpe?g)$/i);
},
html: function (vType, vName) {
return $h.compare(vType, 'text/html') || $h.compare(vName, /\.(htm|html)$/i);
},
text: function (vType, vName) {
return $h.compare(vType, 'text.*') || $h.compare(vName, /\.(xml|javascript)$/i) ||
$h.compare(vName, /\.(txt|md|csv|nfo|ini|json|php|js|css)$/i);
},
video: function (vType, vName) {
return $h.compare(vType, 'video.*') && ($h.compare(vType, /(ogg|mp4|mp?g|mov|webm|3gp)$/i) ||
$h.compare(vName, /\.(og?|mp4|webm|mp?g|mov|3gp)$/i));
},
audio: function (vType, vName) {
return $h.compare(vType, 'audio.*') && ($h.compare(vName, /(ogg|mp3|mp?g|wav)$/i) ||
$h.compare(vName, /\.(og?|mp3|mp?g|wav)$/i));
},
flash: function (vType, vName) {
return $h.compare(vType, 'application/x-shockwave-flash', true) || $h.compare(vName, /\.(swf)$/i);
},
pdf: function (vType, vName) {
return $h.compare(vType, 'application/pdf', true) || $h.compare(vName, /\.(pdf)$/i);
},
object: function () {
return true;
},
other: function () {
return true;
}
},
fileActionSettings: {
showRemove: true,
showUpload: true,
showZoom: true,
showDrag: true,
removeIcon: '<i class="fa fa-trash text-danger"></i>',
removeClass: 'btn btn-xs btn-default',
removeTitle: 'Remove file',
uploadIcon: '<i class="fa fa-upload text-info"></i>',
uploadClass: 'btn btn-xs btn-default',
uploadTitle: 'Upload file',
zoomIcon: '<i class="fa fa-search-plus"></i>',
zoomClass: 'btn btn-xs btn-default',
zoomTitle: 'View Details',
dragIcon: '<i class="fa fa-bars"></i>',
dragClass: 'text-info',
dragTitle: 'Move / Rearrange',
dragSettings: {},
indicatorNew: '<i class="fa fa-hand-o-down text-warning"></i>',
indicatorSuccess: '<i class="fa fa-check text-success"></i>',
indicatorError: '<i class="fa fa-exclamation text-danger"></i>',
indicatorLoading: '<i class="fa fa-hand-up text-muted"></i>',
indicatorNewTitle: 'Not uploaded yet',
indicatorSuccessTitle: 'Uploaded',
indicatorErrorTitle: 'Upload Error',
indicatorLoadingTitle: 'Uploading ...'
}
};
$.each(self.defaults, function (key, setting) {
if (key === 'allowedPreviewTypes') {
if (self.allowedPreviewTypes === undefined) {
self.allowedPreviewTypes = setting;
}
return;
}
self[key] = $.extend(true, {}, setting, self[key]);
});
self._initPreviewTemplates();
},
_initPreviewTemplates: function () {
var self = this, cfg = self.defaults, tags = self.previewMarkupTags, tagBef, tagAft = tags.tagAfter;
$.each(cfg.previewContentTemplates, function (key, value) {
if ($h.isEmpty(self.previewTemplates[key])) {
tagBef = tags.tagBefore2;
if (key === 'generic' || key === 'image' || key === 'html' || key === 'text') {
tagBef = tags.tagBefore1;
}
self.previewTemplates[key] = tagBef + value + tagAft;
}
});
},
_initPreviewCache: function () {
var self = this;
self.previewCache = {
data: {},
init: function () {
var content = self.initialPreview;
if (content.length > 0 && !$h.isArray(content)) {
content = content.split(self.initialPreviewDelimiter);
}
self.previewCache.data = {
content: content,
config: self.initialPreviewConfig,
tags: self.initialPreviewThumbTags
};
},
fetch: function () {
return self.previewCache.data.content.filter(function (n) {
return n !== null;
});
},
count: function (all) {
return !!self.previewCache.data && !!self.previewCache.data.content ?
(all ? self.previewCache.data.content.length : self.previewCache.fetch().length) : 0;
},
get: function (i, isDisabled) {
var ind = 'init_' + i, data = self.previewCache.data, config = data.config[i],
content = data.content[i], previewId = self.previewInitId + '-' + ind, out, $tmp, cat, ftr,
fname, ftype, frameClass, asData = $h.ifSet('previewAsData', config, self.initialPreviewAsData),
parseTemplate = function (cat, dat, fn, ft, id, ftr, ind, fc, t) {
fc = ' file-preview-initial ' + $h.SORT_CSS + (fc ? ' ' + fc : '');
return self._generatePreviewTemplate(cat, dat, fn, ft, id, false, null, fc, ftr, ind, t);
};
if (!content) {
return '';
}
isDisabled = isDisabled === undefined ? true : isDisabled;
cat = $h.ifSet('type', config, self.initialPreviewFileType || 'generic');
fname = $h.ifSet('filename', config, $h.ifSet('caption', config));
ftype = $h.ifSet('filetype', config, cat);
ftr = self.previewCache.footer(i, isDisabled, (config && config.size || null));
frameClass = $h.ifSet('frameClass', config);
if (asData) {
out = parseTemplate(cat, content, fname, ftype, previewId, ftr, ind, frameClass);
} else {
out = parseTemplate('generic', content, fname, ftype, previewId, ftr, ind, frameClass, cat)
.replace(/\{content}/g, data.content[i]);
}
if (data.tags.length && data.tags[i]) {
out = $h.replaceTags(out, data.tags[i]);
}
/** @namespace config.frameAttr */
if (!$h.isEmpty(config) && !$h.isEmpty(config.frameAttr)) {
$tmp = $(document.createElement('div')).html(out);
$tmp.find('.file-preview-initial').attr(config.frameAttr);
out = $tmp.html();
$tmp.remove();
}
return out;
},
add: function (content, config, tags, append) {
var data = self.previewCache.data, index;
if (!$h.isArray(content)) {
content = content.split(self.initialPreviewDelimiter);
}
if (append) {
index = data.content.push(content) - 1;
data.config[index] = config;
data.tags[index] = tags;
} else {
index = content.length - 1;
data.content = content;
data.config = config;
data.tags = tags;
}
self.previewCache.data = data;
return index;
},
set: function (content, config, tags, append) {
var data = self.previewCache.data, i, chk;
if (!content || !content.length) {
return;
}
if (!$h.isArray(content)) {
content = content.split(self.initialPreviewDelimiter);
}
chk = content.filter(function (n) {
return n !== null;
});
if (!chk.length) {
return;
}
if (data.content === undefined) {
data.content = [];
}
if (data.config === undefined) {
data.config = [];
}
if (data.tags === undefined) {
data.tags = [];
}
if (append) {
for (i = 0; i < content.length; i++) {
if (content[i]) {
data.content.push(content[i]);
}
}
for (i = 0; i < config.length; i++) {
if (config[i]) {
data.config.push(config[i]);
}
}
for (i = 0; i < tags.length; i++) {
if (tags[i]) {
data.tags.push(tags[i]);
}
}
} else {
data.content = content;
data.config = config;
data.tags = tags;
}
self.previewCache.data = data;
},
unset: function (index) {
var chk = self.previewCache.count();
if (!chk) {
return;
}
if (chk === 1) {
self.previewCache.data.content = [];
self.previewCache.data.config = [];
self.previewCache.data.tags = [];
self.initialPreview = [];
self.initialPreviewConfig = [];
self.initialPreviewThumbTags = [];
return;
}
self.previewCache.data.content[index] = null;
self.previewCache.data.config[index] = null;
self.previewCache.data.tags[index] = null;
},
out: function () {
var html = '', caption, len = self.previewCache.count(true), i;
if (len === 0) {
return {content: '', caption: ''};
}
for (i = 0; i < len; i++) {
html += self.previewCache.get(i);
}
caption = self._getMsgSelected(self.previewCache.count());
return {content: html, caption: caption};
},
footer: function (i, isDisabled, size) {
var data = self.previewCache.data;
if (!data || !data.config || data.config.length === 0 || $h.isEmpty(data.config[i])) {
return '';
}
isDisabled = isDisabled === undefined ? true : isDisabled;
var config = data.config[i], caption = $h.ifSet('caption', config), actions = '',
width = $h.ifSet('width', config, 'auto'), url = $h.ifSet('url', config, false),
key = $h.ifSet('key', config, null), fs = self.fileActionSettings,
showDel = $h.ifSet('showDelete', config, true), showZoom = $h.ifSet('showZoom', config, fs.showZoom),
showDrag = $h.ifSet('showDrag', config, fs.showDrag), disabled = (url === false) && isDisabled;
if (self.initialPreviewShowDelete) {
actions = self._renderFileActions(false, showDel, showZoom, showDrag, disabled, url, key, true);
}
return self._getLayoutTemplate('footer').replace(/\{progress}/g, self._renderThumbProgress())
.replace(/\{actions}/g, actions).replace(/\{caption}/g, caption)
.replace(/\{size}/g, self._getSize(size)).replace(/\{width}/g, width)
.replace(/\{indicator}/g, '').replace(/\{indicatorTitle}/g, '');
}
};
self.previewCache.init();
},
_handler: function ($el, event, callback) {
var self = this, ns = self.namespace, ev = event.split(' ').join(ns + ' ') + ns;
if (!$el || !$el.length) {
return;
}
$el.off(ev).on(ev, callback);
},
_log: function (msg) {
var self = this, id = self.$element.attr('id');
if (id) {
msg = '"' + id + '": ' + msg;
}
if (typeof window.console.log !== "undefined") {
window.console.log(msg);
} else {
window.alert(msg);
}
},
_validate: function () {
var self = this, status = self.$element.attr('type') === 'file';
if (!status) {
self._log('The input "type" must be set to "file" for initializing the "bootstrap-fileinput" plugin.');
}
return status;
},
_errorsExist: function () {
var self = this, $err;
if (self.$errorContainer.find('li').length) {
return true;
}
$err = $(document.createElement('div')).html(self.$errorContainer.html());
$err.find('span.kv-error-close').remove();
$err.find('ul').remove();
return $.trim($err.text()).length ? true : false;
},
_errorHandler: function (evt, caption) {
var self = this, err = evt.target.error;
/** @namespace err.NOT_FOUND_ERR */
/** @namespace err.SECURITY_ERR */
/** @namespace err.NOT_READABLE_ERR */
if (err.code === err.NOT_FOUND_ERR) {
self._showError(self.msgFileNotFound.replace('{name}', caption));
} else if (err.code === err.SECURITY_ERR) {
self._showError(self.msgFileSecured.replace('{name}', caption));
} else if (err.code === err.NOT_READABLE_ERR) {
self._showError(self.msgFileNotReadable.replace('{name}', caption));
} else if (err.code === err.ABORT_ERR) {
self._showError(self.msgFilePreviewAborted.replace('{name}', caption));
} else {
self._showError(self.msgFilePreviewError.replace('{name}', caption));
}
},
_addError: function (msg) {
var self = this, $error = self.$errorContainer;
if (msg && $error.length) {
$error.html(self.errorCloseButton + msg);
self._handler($error.find('.kv-error-close'), 'click', function () {
$error.fadeOut('slow');
});
}
},
_resetErrors: function (fade) {
var self = this, $error = self.$errorContainer;
self.isError = false;
self.$container.removeClass('has-error');
$error.html('');
if (fade) {
$error.fadeOut('slow');
} else {
$error.hide();
}
},
_showFolderError: function (folders) {
var self = this, $error = self.$errorContainer, msg;
if (!folders) {
return;
}
msg = self.msgFoldersNotAllowed.replace(/\{n}/g, folders);
self._addError(msg);
$h.addCss(self.$container, 'has-error');
$error.fadeIn(800);
self._raise('filefoldererror', [folders, msg]);
},
_showUploadError: function (msg, params, event) {
var self = this, $error = self.$errorContainer, ev = event || 'fileuploaderror', e = params && params.id ?
'<li data-file-id="' + params.id + '">' + msg + '</li>' : '<li>' + msg + '</li>';
if ($error.find('ul').length === 0) {
self._addError('<ul>' + e + '</ul>');
} else {
$error.find('ul').append(e);
}
$error.fadeIn(800);
self._raise(ev, [params, msg]);
self.$container.removeClass('file-input-new');
$h.addCss(self.$container, 'has-error');
return true;
},
_showError: function (msg, params, event) {
var self = this, $error = self.$errorContainer, ev = event || 'fileerror';
params = params || {};
params.reader = self.reader;
self._addError(msg);
$error.fadeIn(800);
self._raise(ev, [params, msg]);
if (!self.isUploadable) {
self._clearFileInput();
}
self.$container.removeClass('file-input-new');
$h.addCss(self.$container, 'has-error');
self.$btnUpload.attr('disabled', true);
return true;
},
_noFilesError: function (params) {
var self = this, label = self.minFileCount > 1 ? self.filePlural : self.fileSingle,
msg = self.msgFilesTooLess.replace('{n}', self.minFileCount).replace('{files}', label),
$error = self.$errorContainer;
self._addError(msg);
self.isError = true;
self._updateFileDetails(0);
$error.fadeIn(800);
self._raise('fileerror', [params, msg]);
self._clearFileInput();
$h.addCss(self.$container, 'has-error');
},
_parseError: function (operation, jqXHR, errorThrown, fileName) {
/** @namespace jqXHR.responseJSON */
var self = this, errMsg = $.trim(errorThrown + ''), dot = errMsg.slice(-1) === '.' ? '' : '.',
text = jqXHR.responseJSON !== undefined && jqXHR.responseJSON.error !== undefined ?
jqXHR.responseJSON.error : jqXHR.responseText;
if (self.cancelling && self.msgUploadAborted) {
errMsg = self.msgUploadAborted;
}
if (self.showAjaxErrorDetails && text) {
text = $.trim(text.replace(/\n\s*\n/g, '\n'));
text = text.length > 0 ? '<pre>' + text + '</pre>' : '';
errMsg += dot + text;
} else {
errMsg += dot;
}
if (errMsg === dot) {
errMsg = self.msgAjaxError.replace('{operation}', operation);
}
self.cancelling = false;
return fileName ? '<b>' + fileName + ': </b>' + errMsg : errMsg;
},
_parseFileType: function (file) {
var self = this, isValid, vType, cat, i, types = self.allowedPreviewTypes || [];
for (i = 0; i < types.length; i++) {
cat = types[i];
isValid = self.fileTypeSettings[cat];
vType = isValid(file.type, file.name) ? cat : '';
if (!$h.isEmpty(vType)) {
return vType;
}
}
return 'other';
},
_getPreviewIcon: function (fname) {
var self = this, ext, out = null;
if (fname && fname.indexOf('.') > -1) {
ext = fname.split('.').pop();
if (self.previewFileIconSettings && self.previewFileIconSettings[ext]) {
out = self.previewFileIconSettings[ext];
}
if (self.previewFileExtSettings) {
$.each(self.previewFileExtSettings, function (key, func) {
if (self.previewFileIconSettings[key] && func(ext)) {
out = self.previewFileIconSettings[key];
//noinspection UnnecessaryReturnStatementJS
return;
}
});
}
}
return out;
},
_parseFilePreviewIcon: function (content, fname) {
var self = this, icn = self._getPreviewIcon(fname) || self.previewFileIcon;
if (content.indexOf('{previewFileIcon}') > -1) {
content = content.replace(/\{previewFileIconClass}/g, self.previewFileIconClass).replace(
/\{previewFileIcon}/g, icn);
}
return content;
},
_raise: function (event, params) {
var self = this, e = $.Event(event);
if (params !== undefined) {
self.$element.trigger(e, params);
} else {
self.$element.trigger(e);
}
if (e.isDefaultPrevented() || e.result === false) {
return false;
}
switch (event) {
// ignore these events
case 'filebatchuploadcomplete':
case 'filebatchuploadsuccess':
case 'fileuploaded':
case 'fileclear':
case 'filecleared':
case 'filereset':
case 'fileerror':
case 'filefoldererror':
case 'fileuploaderror':
case 'filebatchuploaderror':
case 'filedeleteerror':
case 'filecustomerror':
case 'filesuccessremove':
break;
// receive data response via `filecustomerror` event`
default:
self.ajaxAborted = e.result;
break;
}
return true;
},
_listenFullScreen: function (isFullScreen) {
var self = this, $modal = self.$modal, $btnFull, $btnBord;
if (!$modal || !$modal.length) {
return;
}
$btnFull = $modal && $modal.find('.btn-fullscreen');
$btnBord = $modal && $modal.find('.btn-borderless');
if (!$btnFull.length || !$btnBord.length) {
return;
}
$btnFull.removeClass('active').attr('aria-pressed', 'false');
$btnBord.removeClass('active').attr('aria-pressed', 'false');
if (isFullScreen) {
$btnFull.addClass('active').attr('aria-pressed', 'true');
} else {
$btnBord.addClass('active').attr('aria-pressed', 'true');
}
if ($modal.hasClass('file-zoom-fullscreen')) {
self._maximizeZoomDialog();
} else {
if (isFullScreen) {
self._maximizeZoomDialog();
} else {
$btnBord.removeClass('active').attr('aria-pressed', 'false');
}
}
},
_listen: function () {
var self = this, $el = self.$element, $form = self.$form, $cont = self.$container, fullScreenEvents;
self._handler($el, 'change', $.proxy(self._change, self));
if (self.showBrowse) {
self._handler(self.$btnFile, 'click', $.proxy(self._browse, self));
}
self._handler($cont.find('.fileinput-remove:not([disabled])'), 'click', $.proxy(self.clear, self));
self._handler($cont.find('.fileinput-cancel'), 'click', $.proxy(self.cancel, self));
self._initDragDrop();
self._handler($form, 'reset', $.proxy(self.reset, self));
if (!self.isUploadable) {
self._handler($form, 'submit', $.proxy(self._submitForm, self));
}
self._handler(self.$container.find('.fileinput-upload'), 'click', $.proxy(self._uploadClick, self));
self._handler($(window), 'resize', function () {
self._listenFullScreen(screen.width === window.innerWidth && screen.height === window.innerHeight);
});
fullScreenEvents = 'webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange';
self._handler($(document), fullScreenEvents, function () {
self._listenFullScreen($h.checkFullScreen());
});
self._initClickable();
},
_initClickable: function () {
var self = this, $zone;
if (!self.isClickable) {
return;
}
$zone = self.isUploadable ? self.$dropZone : self.$preview.find('.file-default-preview');
$h.addCss($zone, 'clickable');
$zone.attr('tabindex', -1);
self._handler($zone, 'click', function (e) {
var $tar = $(e.target);
if (!$tar.parents('.file-preview-thumbnails').length || $tar.parents('.file-default-preview').length) {
self.$element.trigger('click');
$zone.blur();
}
});
},
_initDragDrop: function () {
var self = this, $zone = self.$dropZone;
if (self.isUploadable && self.dropZoneEnabled && self.showPreview) {
self._handler($zone, 'dragenter dragover', $.proxy(self._zoneDragEnter, self));
self._handler($zone, 'dragleave', $.proxy(self._zoneDragLeave, self));
self._handler($zone, 'drop', $.proxy(self._zoneDrop, self));
self._handler($(document), 'dragenter dragover drop', self._zoneDragDropInit);
}
},
_zoneDragDropInit: function (e) {
e.stopPropagation();
e.preventDefault();
},
_zoneDragEnter: function (e) {
var self = this, hasFiles = $.inArray('Files', e.originalEvent.dataTransfer.types) > -1;
self._zoneDragDropInit(e);
if (self.isDisabled || !hasFiles) {
e.originalEvent.dataTransfer.effectAllowed = 'none';
e.originalEvent.dataTransfer.dropEffect = 'none';
return;
}
$h.addCss(self.$dropZone, 'file-highlighted');
},
_zoneDragLeave: function (e) {
var self = this;
self._zoneDragDropInit(e);
if (self.isDisabled) {
return;
}
self.$dropZone.removeClass('file-highlighted');
},
_zoneDrop: function (e) {
var self = this;
e.preventDefault();
/** @namespace e.originalEvent.dataTransfer */
if (self.isDisabled || $h.isEmpty(e.originalEvent.dataTransfer.files)) {
return;
}
self._change(e, 'dragdrop');
self.$dropZone.removeClass('file-highlighted');
},
_uploadClick: function (e) {
var self = this, $btn = self.$container.find('.fileinput-upload'), $form,
isEnabled = !$btn.hasClass('disabled') && $h.isEmpty($btn.attr('disabled'));
if (e && e.isDefaultPrevented()) {
return;
}
if (!self.isUploadable) {
if (isEnabled && $btn.attr('type') !== 'submit') {
$form = $btn.closest('form');
// downgrade to normal form submit if possible
if ($form.length) {
$form.trigger('submit');
}
e.preventDefault();
}
return;
}
e.preventDefault();
if (isEnabled) {
self.upload();
}
},
_submitForm: function () {
var self = this, $el = self.$element, files = $el.get(0).files;
if (files && self.minFileCount > 0 && self._getFileCount(files.length) < self.minFileCount) {
self._noFilesError({});
return false;
}
return !self._abort({});
},
_clearPreview: function () {
var self = this, $p = self.$preview,
$thumbs = self.showUploadedThumbs ? $p.find($h.FRAMES + ':not(.file-preview-success)') : $p.find($h.FRAMES);
$thumbs.each(function () {
var $thumb = $(this);
$thumb.remove();
$h.cleanZoomCache($p.find('#zoom-' + $thumb.attr('id')));
});
if (!self.$preview.find($h.FRAMES).length || !self.showPreview) {
self._resetUpload();
}
self._validateDefaultPreview();
},
_initSortable: function () {
var self = this, $el = self.$preview, settings, selector = '.' + $h.SORT_CSS;
if (!window.KvSortable || $el.find(selector).length === 0) {
return;
}
//noinspection JSUnusedGlobalSymbols
settings = {
handle: '.drag-handle-init',
dataIdAttr: 'data-preview-id',
draggable: selector,
onSort: function (e) {
var oldIndex = e.oldIndex, newIndex = e.newIndex, key, $frame;
self.initialPreview = $h.moveArray(self.initialPreview, oldIndex, newIndex);
self.initialPreviewConfig = $h.moveArray(self.initialPreviewConfig, oldIndex, newIndex);
self.previewCache.init();
for (var i = 0; i < self.initialPreviewConfig.length; i++) {
if (self.initialPreviewConfig[i] !== null) {
key = self.initialPreviewConfig[i].key;
$frame = $(".kv-file-remove[data-key='" + key + "']").closest($h.FRAMES);
$frame.attr('data-fileindex', 'init_' + i).data('fileindex', 'init_' + i);
}
}
self._raise('filesorted', {
previewId: $(e.item).attr('id'),
'oldIndex': oldIndex,
'newIndex': newIndex,
stack: self.initialPreviewConfig
});
}
};
if ($el.data('kvsortable')) {
$el.kvsortable('destroy');
}
$.extend(true, settings, self.fileActionSettings.dragSettings);
$el.kvsortable(settings);
},
_initPreview: function (isInit) {
var self = this, cap = self.initialCaption || '', out;
if (!self.previewCache.count()) {
self._clearPreview();
if (isInit) {
self._setCaption(cap);
} else {
self._initCaption();
}
return;
}
out = self.previewCache.out();
cap = isInit && self.initialCaption ? self.initialCaption : out.caption;
self.$preview.html(out.content);
self._setInitThumbAttr();
self._setCaption(cap);
self._initSortable();
if (!$h.isEmpty(out.content)) {
self.$container.removeClass('file-input-new');
}
},
_getZoomButton: function (type) {
var self = this, label = self.previewZoomButtonIcons[type], css = self.previewZoomButtonClasses[type],
title = ' title="' + (self.previewZoomButtonTitles[type] || '') + '" ',
params = title + (type === 'close' ? ' data-dismiss="modal" aria-hidden="true"' : '');
if (type === 'fullscreen' || type === 'borderless' || type === 'toggleheader') {
params += ' data-toggle="button" aria-pressed="false" autocomplete="off"';
}
return '<button type="button" class="' + css + ' btn-' + type + '"' + params + '>' + label + '</button>';
},
_getModalContent: function () {
var self = this;
return self._getLayoutTemplate('modal')
.replace(/\{zoomFrameClass}/g, self.frameClass)
.replace(/\{heading}/g, self.msgZoomModalHeading)
.replace(/\{prev}/g, self._getZoomButton('prev'))
.replace(/\{next}/g, self._getZoomButton('next'))
.replace(/\{toggleheader}/g, self._getZoomButton('toggleheader'))
.replace(/\{fullscreen}/g, self._getZoomButton('fullscreen'))
.replace(/\{borderless}/g, self._getZoomButton('borderless'))
.replace(/\{close}/g, self._getZoomButton('close'));
},
_listenModalEvent: function (event) {
var self = this, $modal = self.$modal, getParams = function (e) {
return {
sourceEvent: e,
previewId: $modal.data('previewId'),
modal: $modal
};
};
$modal.on(event + '.bs.modal', function (e) {
var $btnFull = $modal.find('.btn-fullscreen'), $btnBord = $modal.find('.btn-borderless');
self._raise('filezoom' + event, getParams(e));
if (event === 'shown') {
$btnBord.removeClass('active').attr('aria-pressed', 'false');
$btnFull.removeClass('active').attr('aria-pressed', 'false');
if ($modal.hasClass('file-zoom-fullscreen')) {
self._maximizeZoomDialog();
if ($h.checkFullScreen()) {
$btnFull.addClass('active').attr('aria-pressed', 'true');
} else {
$btnBord.addClass('active').attr('aria-pressed', 'true');
}
}
}
});
},
_initZoom: function () {
var self = this, $dialog, modalMain = self._getLayoutTemplate('modalMain'), modalId = '#' + $h.MODAL_ID;
if (!self.showPreview) {
return;
}
self.$modal = $(modalId);
if (!self.$modal || !self.$modal.length) {
$dialog = $(document.createElement('div')).html(modalMain).insertAfter(self.$container);
self.$modal = $(modalId).insertBefore($dialog);
$dialog.remove();
}
$h.initModal(self.$modal);
self.$modal.html(self._getModalContent());
$.each($h.MODAL_EVENTS, function (key, event) {
self._listenModalEvent(event);
});
},
_initZoomButtons: function () {
var self = this, previewId = self.$modal.data('previewId') || '', $first, $last, $preview = self.$preview,
thumbs = $preview.find($h.FRAMES).toArray(), len = thumbs.length,
$prev = self.$modal.find('.btn-prev'), $next = self.$modal.find('.btn-next');
if (thumbs.length < 2) {
$prev.hide();
$next.hide();
return;
} else {
$prev.show();
$next.show();
}
if (!len) {
return;
}
$first = $(thumbs[0]);
$last = $(thumbs[len - 1]);
$prev.removeAttr('disabled');
$next.removeAttr('disabled');
if ($first.length && $first.attr('id') === previewId) {
$prev.attr('disabled', true);
}
if ($last.length && $last.attr('id') === previewId) {
$next.attr('disabled', true);
}
},
_maximizeZoomDialog: function () {
var self = this, $modal = self.$modal, $head = $modal.find('.modal-header:visible'),
$foot = $modal.find('.modal-footer:visible'), $body = $modal.find('.modal-body'),
h = $(window).height(), diff = 0;
$modal.addClass('file-zoom-fullscreen');
if ($head && $head.length) {
h -= $head.outerHeight(true);
}
if ($foot && $foot.length) {
h -= $foot.outerHeight(true);
}
if ($body && $body.length) {
diff = $body.outerHeight(true) - $body.height();
h -= diff;
}
$modal.find('.kv-zoom-body').height(h);
},
_resizeZoomDialog: function (fullScreen) {
var self = this, $modal = self.$modal, $btnFull = $modal.find('.btn-fullscreen'),
$btnBord = $modal.find('.btn-borderless');
if ($modal.hasClass('file-zoom-fullscreen')) {
$h.toggleFullScreen(false);
if (!fullScreen) {
if (!$btnFull.hasClass('active')) {
$modal.removeClass('file-zoom-fullscreen');
self.$modal.find('.kv-zoom-body').css('height', self.zoomModalHeight);
} else {
$btnFull.removeClass('active').attr('aria-pressed', 'false');
}
} else {
if (!$btnFull.hasClass('active')) {
$modal.removeClass('file-zoom-fullscreen');
self._resizeZoomDialog(true);
if ($btnBord.hasClass('active')) {
$btnBord.removeClass('active').attr('aria-pressed', 'false');
}
}
}
} else {
if (!fullScreen) {
self._maximizeZoomDialog();
return;
}
$h.toggleFullScreen(true);
}
$modal.focus();
},
_setZoomContent: function ($frame, animate) {
var self = this, $content, tmplt, body, title, $body, $dataEl, config, pid = $frame.attr('id'),
$modal = self.$modal, $prev = $modal.find('.btn-prev'), $next = $modal.find('.btn-next'), $tmp,
$btnFull = $modal.find('.btn-fullscreen'), $btnBord = $modal.find('.btn-borderless'), cap, size,
$btnTogh = $modal.find('.btn-toggleheader'), $zoomPreview = self.$preview.find('#zoom-' + pid);
tmplt = $zoomPreview.attr('data-template') || 'generic';
$content = $zoomPreview.find('.kv-file-content');
body = $content.length ? $content.html() : '';
cap = $frame.data('caption') || '';
size = $frame.data('size') || '';
title = cap + ' ' + size;
$modal.find('.kv-zoom-title').html(title);
$body = $modal.find('.kv-zoom-body');
$modal.removeClass('kv-single-content');
if (animate) {
$tmp = $body.addClass('file-thumb-loading').clone().insertAfter($body);
$body.html(body).hide();
$tmp.fadeOut('fast', function () {
$body.fadeIn('fast', function() {
$body.removeClass('file-thumb-loading');
});
$tmp.remove();
});
} else {
$body.html(body);
}
config = self.previewZoomSettings[tmplt];
if (config) {
$dataEl = $body.find('.kv-preview-data');
$h.addCss($dataEl, 'file-zoom-detail');
$.each(config, function (key, value) {
$dataEl.css(key, value);
if (($dataEl.attr('width') && key === 'width') || ($dataEl.attr('height') && key === 'height')) {
$dataEl.removeAttr(key);
}
});
}
$modal.data('previewId', pid);
self._handler($prev, 'click', function () {
self._zoomSlideShow('prev', pid);
});
self._handler($next, 'click', function () {
self._zoomSlideShow('next', pid);
});
self._handler($btnFull, 'click', function () {
self._resizeZoomDialog(true);
});
self._handler($btnBord, 'click', function () {
self._resizeZoomDialog(false);
});
self._handler($btnTogh, 'click', function () {
var $header = $modal.find('.modal-header'), $floatBar = $modal.find('.modal-body .floating-buttons'),
ht, $actions = $header.find('.kv-zoom-actions'), resize = function (height) {
var $body = self.$modal.find('.kv-zoom-body'), h = self.zoomModalHeight;
if ($modal.hasClass('file-zoom-fullscreen')) {
h = $body.outerHeight(true);
if (!height) {
h = h - $header.outerHeight(true);
}
}
$body.css('height', height ? h + height : h);
};
if ($header.is(':visible')) {
ht = $header.outerHeight(true);
$header.slideUp('slow', function () {
$actions.find('.btn').appendTo($floatBar);
resize(ht);
});
} else {
$floatBar.find('.btn').appendTo($actions);
$header.slideDown('slow', function () {
resize();
});
}
$modal.focus();
});
self._handler($modal, 'keydown', function (e) {
var key = e.which || e.keyCode;
if (key === 37 && !$prev.attr('disabled')) {
self._zoomSlideShow('prev', pid);
}
if (key === 39 && !$next.attr('disabled')) {
self._zoomSlideShow('next', pid);
}
});
},
_zoomPreview: function ($btn) {
var self = this, $frame, $modal = self.$modal;
if (!$btn.length) {
throw 'Cannot zoom to detailed preview!';
}
$h.initModal($modal);
$modal.html(self._getModalContent());
$frame = $btn.closest($h.FRAMES);
self._setZoomContent($frame);
$modal.modal('show');
self._initZoomButtons();
},
_zoomSlideShow: function (dir, previewId) {
var self = this, $btn = self.$modal.find('.kv-zoom-actions .btn-' + dir), $targFrame, i,
thumbs = self.$preview.find($h.FRAMES).toArray(), len = thumbs.length, out;
if ($btn.attr('disabled')) {
return;
}
for (i = 0; i < len; i++) {
if ($(thumbs[i]).attr('id') === previewId) {
out = dir === 'prev' ? i - 1 : i + 1;
break;
}
}
if (out < 0 || out >= len || !thumbs[out]) {
return;
}
$targFrame = $(thumbs[out]);
if ($targFrame.length) {
self._setZoomContent($targFrame, true);
}
self._initZoomButtons();
self._raise('filezoom' + dir, {'previewId': previewId, modal: self.$modal});
},
_initZoomButton: function () {
var self = this;
self.$preview.find('.kv-file-zoom').each(function () {
var $el = $(this);
self._handler($el, 'click', function () {
self._zoomPreview($el);
});
});
},
_clearObjects: function ($el) {
$el.find('video audio').each(function () {
this.pause();
$(this).remove();
});
$el.find('img object div').each(function () {
$(this).remove();
});
},
_clearFileInput: function () {
var self = this, $el = self.$element, $srcFrm, $tmpFrm, $tmpEl;
self.fileInputCleared = true;
if ($h.isEmpty($el.val())) {
return;
}
// Fix for IE ver < 11, that does not clear file inputs. Requires a sequence of steps to prevent IE
// crashing but still allow clearing of the file input.
if (self.isIE9 || self.isIE10) {
$srcFrm = $el.closest('form');
$tmpFrm = $(document.createElement('form'));
$tmpEl = $(document.createElement('div'));
$el.before($tmpEl);
if ($srcFrm.length) {
$srcFrm.after($tmpFrm);
} else {
$tmpEl.after($tmpFrm);
}
$tmpFrm.append($el).trigger('reset');
$tmpEl.before($el).remove();
$tmpFrm.remove();
} else { // normal input clear behavior for other sane browsers
$el.val('');
}
},
_resetUpload: function () {
var self = this;
self.uploadCache = {content: [], config: [], tags: [], append: true};
self.uploadCount = 0;
self.uploadStatus = {};
self.uploadLog = [];
self.uploadAsyncCount = 0;
self.loadedImages = [];
self.totalImagesCount = 0;
self.$btnUpload.removeAttr('disabled');
self._setProgress(0);
$h.addCss(self.$progress, 'hide');
self._resetErrors(false);
self.ajaxAborted = false;
self.ajaxRequests = [];
self._resetCanvas();
self.cacheInitialPreview = {};
if (self.overwriteInitial) {
self.initialPreview = [];
self.initialPreviewConfig = [];
self.initialPreviewThumbTags = [];
self.previewCache.data = {
content: [],
config: [],
tags: []
};
}
},
_resetCanvas: function () {
var self = this;
if (self.canvas && self.imageCanvasContext) {
self.imageCanvasContext.clearRect(0, 0, self.canvas.width, self.canvas.height);
}
},
_hasInitialPreview: function () {
var self = this;
return !self.overwriteInitial && self.previewCache.count();
},
_resetPreview: function () {
var self = this, out, cap;
if (self.previewCache.count()) {
out = self.previewCache.out();
self.$preview.html(out.content);
self._setInitThumbAttr();
cap = self.initialCaption ? self.initialCaption : out.caption;
self._setCaption(cap);
} else {
self._clearPreview();
self._initCaption();
}
if (self.showPreview) {
self._initZoom();
self._initSortable();
}
},
_clearDefaultPreview: function () {
var self = this;
self.$preview.find('.file-default-preview').remove();
},
_validateDefaultPreview: function () {
var self = this;
if (!self.showPreview || $h.isEmpty(self.defaultPreviewContent)) {
return;
}
self.$preview.html('<div class="file-default-preview">' + self.defaultPreviewContent + '</div>');
self.$container.removeClass('file-input-new');
self._initClickable();
},
_resetPreviewThumbs: function (isAjax) {
var self = this, out;
if (isAjax) {
self._clearPreview();
self.clearStack();
return;
}
if (self._hasInitialPreview()) {
out = self.previewCache.out();
self.$preview.html(out.content);
self._setInitThumbAttr();
self._setCaption(out.caption);
self._initPreviewActions();
} else {
self._clearPreview();
}
},
_getLayoutTemplate: function (t) {
var self = this, template = self.layoutTemplates[t];
if ($h.isEmpty(self.customLayoutTags)) {
return template;
}
return $h.replaceTags(template, self.customLayoutTags);
},
_getPreviewTemplate: function (t) {
var self = this, template = self.previewTemplates[t];
if ($h.isEmpty(self.customPreviewTags)) {
return template;
}
return $h.replaceTags(template, self.customPreviewTags);
},
_getOutData: function (jqXHR, responseData, filesData) {
var self = this;
jqXHR = jqXHR || {};
responseData = responseData || {};
filesData = filesData || self.filestack.slice(0) || {};
return {
form: self.formdata,
files: filesData,
filenames: self.filenames,
filescount: self.getFilesCount(),
extra: self._getExtraData(),
response: responseData,
reader: self.reader,
jqXHR: jqXHR
};
},
_getMsgSelected: function (n) {
var self = this, strFiles = n === 1 ? self.fileSingle : self.filePlural;
return n > 0 ? self.msgSelected.replace('{n}', n).replace('{files}', strFiles) : self.msgNoFilesSelected;
},
_getThumbs: function (css) {
css = css || '';
return this.$preview.find($h.FRAMES + ':not(.file-preview-initial)' + css);
},
_getExtraData: function (previewId, index) {
var self = this, data = self.uploadExtraData;
if (typeof self.uploadExtraData === "function") {
data = self.uploadExtraData(previewId, index);
}
return data;
},
_initXhr: function (xhrobj, previewId, fileCount) {
var self = this;
if (xhrobj.upload) {
xhrobj.upload.addEventListener('progress', function (event) {
var pct = 0, total = event.total, position = event.loaded || event.position;
/** @namespace event.lengthComputable */
if (event.lengthComputable) {
pct = Math.floor(position / total * 100);
}
if (previewId) {
self._setAsyncUploadStatus(previewId, pct, fileCount);
} else {
self._setProgress(pct);
}
}, false);
}
return xhrobj;
},
_ajaxSubmit: function (fnBefore, fnSuccess, fnComplete, fnError, previewId, index) {
var self = this, settings;
if (!self._raise('filepreajax', [previewId, index])) {
return;
}
self._uploadExtra(previewId, index);
settings = $.extend(true, {}, {
xhr: function () {
var xhrobj = $.ajaxSettings.xhr();
return self._initXhr(xhrobj, previewId, self.getFileStack().length);
},
url: self.uploadUrl,
type: 'POST',
dataType: 'json',
data: self.formdata,
cache: false,
processData: false,
contentType: false,
beforeSend: fnBefore,
success: fnSuccess,
complete: fnComplete,
error: fnError
}, self.ajaxSettings);
self.ajaxRequests.push($.ajax(settings));
},
_mergeArray: function (prop, content) {
var self = this, arr1 = $h.cleanArray(self[prop]), arr2 = $h.cleanArray(content);
self[prop] = arr1.concat(arr2);
},
_initUploadSuccess: function (out, $thumb, allFiles) {
var self = this, append, data, index, $div, $newCache, content, config, tags, i;
if (!self.showPreview || typeof out !== 'object' || $.isEmptyObject(out)) {
return;
}
if (out.initialPreview !== undefined && out.initialPreview.length > 0) {
self.hasInitData = true;
content = out.initialPreview || [];
config = out.initialPreviewConfig || [];
tags = out.initialPreviewThumbTags || [];
append = out.append === undefined || out.append ? true : false;
if (content.length > 0 && !$h.isArray(content)) {
content = content.split(self.initialPreviewDelimiter);
}
self._mergeArray('initialPreview', content);
self._mergeArray('initialPreviewConfig', config);
self._mergeArray('initialPreviewThumbTags', tags);
if ($thumb !== undefined) {
if (!allFiles) {
index = self.previewCache.add(content, config[0], tags[0], append);
data = self.previewCache.get(index, false);
$div = $(document.createElement('div')).html(data).hide().insertAfter($thumb);
$newCache = $div.find('.kv-zoom-cache');
if ($newCache && $newCache.length) {
$newCache.insertAfter($thumb);
}
$thumb.fadeOut('slow', function () {
var $newThumb = $div.find('.file-preview-frame');
if ($newThumb && $newThumb.length) {
$newThumb.insertBefore($thumb).fadeIn('slow').css('display:inline-block');
}
self._initPreviewActions();
self._clearFileInput();
$h.cleanZoomCache(self.$preview.find('#zoom-' + $thumb.attr('id')));
$thumb.remove();
$div.remove();
self._initSortable();
});
} else {
i = $thumb.attr('data-fileindex');
self.uploadCache.content[i] = content[0];
self.uploadCache.config[i] = config[0] || [];
self.uploadCache.tags[i] = tags[0] || [];
self.uploadCache.append = append;
}
} else {
self.previewCache.set(content, config, tags, append);
self._initPreview();
self._initPreviewActions();
}
}
},
_initSuccessThumbs: function () {
var self = this;
if (!self.showPreview) {
return;
}
self._getThumbs($h.FRAMES + '.file-preview-success').each(function () {
var $thumb = $(this), $preview = self.$preview, $remove = $thumb.find('.kv-file-remove');
$remove.removeAttr('disabled');
self._handler($remove, 'click', function () {
var id = $thumb.attr('id'), out = self._raise('filesuccessremove', [id, $thumb.data('fileindex')]);
$h.cleanMemory($thumb);
if (out === false) {
return;
}
$thumb.fadeOut('slow', function () {
$h.cleanZoomCache($preview.find('#zoom-' + id));
$thumb.remove();
if (!$preview.find($h.FRAMES).length) {
self.reset();
}
});
});
});
},
_checkAsyncComplete: function () {
var self = this, previewId, i;
for (i = 0; i < self.filestack.length; i++) {
if (self.filestack[i]) {
previewId = self.previewInitId + "-" + i;
if ($.inArray(previewId, self.uploadLog) === -1) {
return false;
}
}
}
return (self.uploadAsyncCount === self.uploadLog.length);
},
_uploadExtra: function (previewId, index) {
var self = this, data = self._getExtraData(previewId, index);
if (data.length === 0) {
return;
}
$.each(data, function (key, value) {
self.formdata.append(key, value);
});
},
_uploadSingle: function (i, files, allFiles) {
var self = this, total = self.getFileStack().length, formdata = new FormData(), outData,
previewId = self.previewInitId + "-" + i, $thumb, chkComplete, $btnUpload, $btnDelete,
hasPostData = self.filestack.length > 0 || !$.isEmptyObject(self.uploadExtraData),
$prog = $('#' + previewId).find('.file-thumb-progress'),
fnBefore, fnSuccess, fnComplete, fnError, updateUploadLog, params = {id: previewId, index: i};
self.formdata = formdata;
if (self.showPreview) {
$thumb = $('#' + previewId + ':not(.file-preview-initial)');
$btnUpload = $thumb.find('.kv-file-upload');
$btnDelete = $thumb.find('.kv-file-remove');
$prog.removeClass('hide');
}
if (total === 0 || !hasPostData || ($btnUpload && $btnUpload.hasClass('disabled')) || self._abort(params)) {
return;
}
updateUploadLog = function (i, previewId) {
self.updateStack(i, undefined);
self.uploadLog.push(previewId);
if (self._checkAsyncComplete()) {
self.fileBatchCompleted = true;
}
};
chkComplete = function () {
var u = self.uploadCache, $initThumbs, i, j, len = 0, data = self.cacheInitialPreview;
if (!self.fileBatchCompleted) {
return;
}
if (data && data.content) {
len = data.content.length;
}
setTimeout(function () {
if (self.showPreview) {
self.previewCache.set(u.content, u.config, u.tags, u.append);
if (len) {
for (i = 0; i < u.content.length; i++) {
j = i + len;
data.content[j] = u.content[i];
if (data.config.length) {
data.config[j] = u.config[i];
}
if (data.tags.length) {
data.tags[j] = u.tags[i];
}
}
self.initialPreview = $h.cleanArray(data.content);
self.initialPreviewConfig = $h.cleanArray(data.config);
self.initialPreviewThumbTags = $h.cleanArray(data.tags);
} else {
self.initialPreview = u.content;
self.initialPreviewConfig = u.config;
self.initialPreviewThumbTags = u.tags;
}
self.cacheInitialPreview = {};
if (self.hasInitData) {
self._initPreview();
self._initPreviewActions();
}
}
self.unlock();
self._clearFileInput();
$initThumbs = self.$preview.find('.file-preview-initial');
if (self.uploadAsync && $initThumbs.length) {
$h.addCss($initThumbs, $h.SORT_CSS);
self._initSortable();
}
self._raise('filebatchuploadcomplete', [self.filestack, self._getExtraData()]);
self.uploadCount = 0;
self.uploadStatus = {};
self.uploadLog = [];
self._setProgress(101);
}, 100);
};
fnBefore = function (jqXHR) {
outData = self._getOutData(jqXHR);
self.fileBatchCompleted = false;
if (self.showPreview) {
if (!$thumb.hasClass('file-preview-success')) {
self._setThumbStatus($thumb, 'Loading');
$h.addCss($thumb, 'file-uploading');
}
$btnUpload.attr('disabled', true);
$btnDelete.attr('disabled', true);
}
if (!allFiles) {
self.lock();
}
self._raise('filepreupload', [outData, previewId, i]);
$.extend(true, params, outData);
if (self._abort(params)) {
jqXHR.abort();
self._setProgressCancelled();
}
};
fnSuccess = function (data, textStatus, jqXHR) {
var pid = self.showPreview && $thumb.attr('id') ? $thumb.attr('id') : previewId;
outData = self._getOutData(jqXHR, data);
$.extend(true, params, outData);
setTimeout(function () {
if ($h.isEmpty(data) || $h.isEmpty(data.error)) {
if (self.showPreview) {
self._setThumbStatus($thumb, 'Success');
$btnUpload.hide();
self._initUploadSuccess(data, $thumb, allFiles);
self._setProgress(101, $prog);
}
self._raise('fileuploaded', [outData, pid, i]);
if (!allFiles) {
self.updateStack(i, undefined);
} else {
updateUploadLog(i, pid);
}
} else {
self._showUploadError(data.error, params);
self._setPreviewError($thumb, i);
if (allFiles) {
updateUploadLog(i, pid);
}
}
}, 100);
};
fnComplete = function () {
setTimeout(function () {
if (self.showPreview) {
$btnUpload.removeAttr('disabled');
$btnDelete.removeAttr('disabled');
$thumb.removeClass('file-uploading');
}
if (!allFiles) {
self.unlock(false);
self._clearFileInput();
} else {
chkComplete();
}
self._initSuccessThumbs();
}, 100);
};
fnError = function (jqXHR, textStatus, errorThrown) {
var op = self.ajaxOperations.uploadThumb,
errMsg = self._parseError(op, jqXHR, errorThrown, (allFiles ? files[i].name : null));
setTimeout(function () {
if (allFiles) {
updateUploadLog(i, previewId);
}
self.uploadStatus[previewId] = 100;
self._setPreviewError($thumb, i);
$.extend(true, params, self._getOutData(jqXHR));
self._setProgress(101, $prog, self.msgAjaxProgressError.replace('{operation}', op));
self._showUploadError(errMsg, params);
}, 100);
};
formdata.append(self.uploadFileAttr, files[i], self.filenames[i]);
formdata.append('file_id', i);
self._ajaxSubmit(fnBefore, fnSuccess, fnComplete, fnError, previewId, i);
},
_uploadBatch: function () {
var self = this, files = self.filestack, total = files.length, params = {}, fnBefore, fnSuccess, fnError,
fnComplete, hasPostData = self.filestack.length > 0 || !$.isEmptyObject(self.uploadExtraData),
setAllUploaded;
self.formdata = new FormData();
if (total === 0 || !hasPostData || self._abort(params)) {
return;
}
setAllUploaded = function () {
$.each(files, function (key) {
self.updateStack(key, undefined);
});
self._clearFileInput();
};
fnBefore = function (jqXHR) {
self.lock();
var outData = self._getOutData(jqXHR);
if (self.showPreview) {
self._getThumbs().each(function () {
var $thumb = $(this), $btnUpload = $thumb.find('.kv-file-upload'),
$btnDelete = $thumb.find('.kv-file-remove');
if (!$thumb.hasClass('file-preview-success')) {
self._setThumbStatus($thumb, 'Loading');
$h.addCss($thumb, 'file-uploading');
}
$btnUpload.attr('disabled', true);
$btnDelete.attr('disabled', true);
});
}
self._raise('filebatchpreupload', [outData]);
if (self._abort(outData)) {
jqXHR.abort();
self._setProgressCancelled();
}
};
fnSuccess = function (data, textStatus, jqXHR) {
/** @namespace data.errorkeys */
var outData = self._getOutData(jqXHR, data), $thumbs = self._getThumbs(':not(.file-preview-error)'), key = 0,
keys = $h.isEmpty(data) || $h.isEmpty(data.errorkeys) ? [] : data.errorkeys;
if ($h.isEmpty(data) || $h.isEmpty(data.error)) {
self._raise('filebatchuploadsuccess', [outData]);
setAllUploaded();
if (self.showPreview) {
$thumbs.each(function () {
var $thumb = $(this), $btnUpload = $thumb.find('.kv-file-upload');
$thumb.find('.kv-file-upload').hide();
self._setThumbStatus($thumb, 'Success');
$thumb.removeClass('file-uploading');
$btnUpload.removeAttr('disabled');
});
self._initUploadSuccess(data);
} else {
self.reset();
}
self._setProgress(101);
} else {
if (self.showPreview) {
$thumbs.each(function () {
var $thumb = $(this), $btnDelete = $thumb.find('.kv-file-remove'),
$btnUpload = $thumb.find('.kv-file-upload');
$thumb.removeClass('file-uploading');
$btnUpload.removeAttr('disabled');
$btnDelete.removeAttr('disabled');
if (keys.length === 0) {
self._setPreviewError($thumb);
return;
}
if ($.inArray(key, keys) !== -1) {
self._setPreviewError($thumb);
} else {
$thumb.find('.kv-file-upload').hide();
self._setThumbStatus($thumb, 'Success');
self.updateStack(key, undefined);
}
key++;
});
self._initUploadSuccess(data);
}
self._showUploadError(data.error, outData, 'filebatchuploaderror');
}
};
fnComplete = function () {
self.unlock();
self._initSuccessThumbs();
self._clearFileInput();
self._raise('filebatchuploadcomplete', [self.filestack, self._getExtraData()]);
};
fnError = function (jqXHR, textStatus, errorThrown) {
var outData = self._getOutData(jqXHR), op = self.ajaxOperations.uploadBatch,
errMsg = self._parseError(op, jqXHR, errorThrown);
self._showUploadError(errMsg, outData, 'filebatchuploaderror');
self.uploadFileCount = total - 1;
if (!self.showPreview) {
return;
}
self._getThumbs().each(function () {
var $thumb = $(this), key = $thumb.attr('data-fileindex');
$thumb.removeClass('file-uploading');
if (self.filestack[key] !== undefined) {
self._setPreviewError($thumb);
}
});
self._getThumbs().removeClass('file-uploading');
self._getThumbs(' .kv-file-upload').removeAttr('disabled');
self._getThumbs(' .kv-file-delete').removeAttr('disabled');
self._setProgress(101, self.$progress, self.msgAjaxProgressError.replace('{operation}', op));
};
$.each(files, function (key, data) {
if (!$h.isEmpty(files[key])) {
self.formdata.append(self.uploadFileAttr, data, self.filenames[key]);
}
});
self._ajaxSubmit(fnBefore, fnSuccess, fnComplete, fnError);
},
_uploadExtraOnly: function () {
var self = this, params = {}, fnBefore, fnSuccess, fnComplete, fnError;
self.formdata = new FormData();
if (self._abort(params)) {
return;
}
fnBefore = function (jqXHR) {
self.lock();
var outData = self._getOutData(jqXHR);
self._raise('filebatchpreupload', [outData]);
self._setProgress(50);
params.data = outData;
params.xhr = jqXHR;
if (self._abort(params)) {
jqXHR.abort();
self._setProgressCancelled();
}
};
fnSuccess = function (data, textStatus, jqXHR) {
var outData = self._getOutData(jqXHR, data);
if ($h.isEmpty(data) || $h.isEmpty(data.error)) {
self._raise('filebatchuploadsuccess', [outData]);
self._clearFileInput();
self._initUploadSuccess(data);
self._setProgress(101);
} else {
self._showUploadError(data.error, outData, 'filebatchuploaderror');
}
};
fnComplete = function () {
self.unlock();
self._clearFileInput();
self._raise('filebatchuploadcomplete', [self.filestack, self._getExtraData()]);
};
fnError = function (jqXHR, textStatus, errorThrown) {
var outData = self._getOutData(jqXHR), op = self.ajaxOperations.uploadExtra,
errMsg = self._parseError(op, jqXHR, errorThrown);
params.data = outData;
self._showUploadError(errMsg, outData, 'filebatchuploaderror');
self._setProgress(101, self.$progress, self.msgAjaxProgressError.replace('{operation}', op));
};
self._ajaxSubmit(fnBefore, fnSuccess, fnComplete, fnError);
},
_deleteFileIndex: function ($frame) {
var self = this, ind = $frame.attr('data-fileindex');
if (ind.substring(0, 5) === 'init_') {
ind = parseInt(ind.replace('init_', ''));
self.initialPreview = $h.spliceArray(self.initialPreview, ind);
self.initialPreviewConfig = $h.spliceArray(self.initialPreviewConfig, ind);
self.initialPreviewThumbTags = $h.spliceArray(self.initialPreviewThumbTags, ind);
self.$preview.find($h.FRAMES).each(function () {
var $nFrame = $(this), nInd = $nFrame.attr('data-fileindex');
if (nInd.substring(0, 5) === 'init_') {
nInd = parseInt(nInd.replace('init_', ''));
if (nInd > ind) {
nInd--;
$nFrame.attr('data-fileindex', 'init_' + nInd);
}
}
});
if (self.uploadAsync) {
self.cacheInitialPreview = self.getPreview();
}
}
},
_initFileActions: function () {
var self = this, $preview = self.$preview;
if (!self.showPreview) {
return;
}
self._initZoomButton();
$preview.find($h.FRAMES + ' .kv-file-remove').each(function () {
var $el = $(this), $frame = $el.closest($h.FRAMES), hasError, id = $frame.attr('id'),
ind = $frame.attr('data-fileindex'), n, cap, status;
self._handler($el, 'click', function () {
status = self._raise('filepreremove', [id, ind]);
if (status === false || !self._validateMinCount()) {
return false;
}
hasError = $frame.hasClass('file-preview-error');
$h.cleanMemory($frame);
$frame.fadeOut('slow', function () {
$h.cleanZoomCache($preview.find('#zoom-' + id));
self.updateStack(ind, undefined);
self._clearObjects($frame);
$frame.remove();
if (id && hasError) {
self.$errorContainer.find('li[data-file-id="' + id + '"]').fadeOut('fast', function () {
$(this).remove();
if (!self._errorsExist()) {
self._resetErrors();
}
});
}
self._clearFileInput();
var filestack = self.getFileStack(true), chk = self.previewCache.count(),
len = filestack.length,
hasThumb = self.showPreview && $preview.find($h.FRAMES).length;
if (len === 0 && chk === 0 && !hasThumb) {
self.reset();
} else {
n = chk + len;
cap = n > 1 ? self._getMsgSelected(n) : (filestack[0] ? self._getFileNames()[0] : '');
self._setCaption(cap);
}
self._raise('fileremoved', [id, ind]);
});
});
});
self.$preview.find($h.FRAMES + ' .kv-file-upload').each(function () {
var $el = $(this);
self._handler($el, 'click', function () {
var $frame = $el.closest($h.FRAMES), ind = $frame.attr('data-fileindex');
if (!$frame.hasClass('file-preview-error')) {
self._uploadSingle(ind, self.filestack, false);
}
});
});
},
_initPreviewActions: function () {
var self = this, $preview = self.$preview, deleteExtraData = self.deleteExtraData || {},
btnRemove = $h.FRAMES + ' .kv-file-remove',
resetProgress = function () {
var hasFiles = self.isUploadable ? self.previewCache.count() : self.$element.get(0).files.length;
if ($preview.find(btnRemove).length === 0 && !hasFiles) {
self.reset();
self.initialCaption = '';
}
};
self._initZoomButton();
$preview.find(btnRemove).each(function () {
var $el = $(this), vUrl = $el.data('url') || self.deleteUrl, vKey = $el.data('key');
if ($h.isEmpty(vUrl) || vKey === undefined) {
return;
}
var $frame = $el.closest($h.FRAMES), cache = self.previewCache.data,
settings, params, index = $frame.data('fileindex'), config, extraData;
index = parseInt(index.replace('init_', ''));
config = $h.isEmpty(cache.config) && $h.isEmpty(cache.config[index]) ? null : cache.config[index];
extraData = $h.isEmpty(config) || $h.isEmpty(config.extra) ? deleteExtraData : config.extra;
if (typeof extraData === "function") {
extraData = extraData();
}
params = {id: $el.attr('id'), key: vKey, extra: extraData};
settings = $.extend(true, {}, {
url: vUrl,
type: 'POST',
dataType: 'json',
data: $.extend(true, {}, {key: vKey}, extraData),
beforeSend: function (jqXHR) {
self.ajaxAborted = false;
self._raise('filepredelete', [vKey, jqXHR, extraData]);
if (self.ajaxAborted) {
jqXHR.abort();
} else {
$h.addCss($frame, 'file-uploading');
$h.addCss($el, 'disabled');
}
},
success: function (data, textStatus, jqXHR) {
var n, cap;
if ($h.isEmpty(data) || $h.isEmpty(data.error)) {
self.previewCache.init();
index = parseInt(($frame.data('fileindex')).replace('init_', ''));
self.previewCache.unset(index);
n = self.previewCache.count();
cap = n > 0 ? self._getMsgSelected(n) : '';
self._deleteFileIndex($frame);
self._setCaption(cap);
self._raise('filedeleted', [vKey, jqXHR, extraData]);
} else {
params.jqXHR = jqXHR;
params.response = data;
self._showError(data.error, params, 'filedeleteerror');
$frame.removeClass('file-uploading');
$el.removeClass('disabled');
resetProgress();
return;
}
$frame.removeClass('file-uploading').addClass('file-deleted');
$frame.fadeOut('slow', function () {
$h.cleanZoomCache($preview.find('#zoom-' + $frame.attr('id')));
self._clearObjects($frame);
$frame.remove();
resetProgress();
if (!n && self.getFileStack().length === 0) {
self._setCaption('');
self.reset();
}
});
},
error: function (jqXHR, textStatus, errorThrown) {
var op = self.ajaxOperations.deleteThumb, errMsg = self._parseError(op, jqXHR, errorThrown);
params.jqXHR = jqXHR;
params.response = {};
self._showError(errMsg, params, 'filedeleteerror');
$frame.removeClass('file-uploading');
resetProgress();
}
}, self.ajaxDeleteSettings);
self._handler($el, 'click', function () {
if (!self._validateMinCount()) {
return false;
}
$.ajax(settings);
});
});
},
_hideFileIcon: function () {
if (this.overwriteInitial) {
this.$captionContainer.find('.kv-caption-icon').hide();
}
},
_showFileIcon: function () {
this.$captionContainer.find('.kv-caption-icon').show();
},
_getSize: function (bytes) {
var self = this, size = parseFloat(bytes), i, func = self.fileSizeGetter, sizes, out;
if (!$.isNumeric(bytes) || !$.isNumeric(size)) {
return '';
}
if (typeof func === 'function') {
out = func(size);
} else {
if (size === 0) {
out = '0.00 B';
} else {
i = Math.floor(Math.log(size) / Math.log(1024));
sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
out = (size / Math.pow(1024, i)).toFixed(2) * 1 + ' ' + sizes[i];
}
}
return self._getLayoutTemplate('size').replace('{sizeText}', out);
},
_generatePreviewTemplate: function (cat, data, fname, ftype, previewId, isError, size, frameClass, foot, ind, templ) {
var self = this, caption = self.slug(fname), prevContent, zoomContent = '',
config = self.previewSettings[cat] || self.defaults.previewSettings[cat],
w = config && config.width ? config.width : '', h = config && config.height ? config.height : '',
footer = foot || self._renderFileFooter(caption, size, ($h.isEmpty(w) ? 'auto' : w), isError),
hasIconSetting = self._getPreviewIcon(fname), typeCss = 'type-default',
forcePrevIcon = hasIconSetting && self.preferIconicPreview,
forceZoomIcon = hasIconSetting && self.preferIconicZoomPreview,
getContent = function (c, d, zoom, frameCss) {
var id = zoom ? 'zoom-' + previewId : previewId, tmplt = self._getPreviewTemplate(c),
css = (frameClass || '') + ' ' + frameCss;
if (self.frameClass) {
css = self.frameClass + ' ' + css;
}
if (zoom) {
css = css.replace(' ' + $h.SORT_CSS, '');
}
tmplt = self._parseFilePreviewIcon(tmplt, fname);
if (c === 'text') {
d = $h.htmlEncode(d);
}
if (cat === 'object' && !ftype) {
$.each(self.defaults.fileTypeSettings, function (key, func) {
if (key === 'object' || key === 'other') {
return;
}
if (func(fname, ftype)) {
typeCss = 'type-' + key;
}
});
}
return tmplt.replace(/\{previewId}/g, id).replace(/\{caption}/g, caption)
.replace(/\{frameClass}/g, css).replace(/\{type}/g, ftype).replace(/\{fileindex}/g, ind)
.replace(/\{width}/g, w).replace(/\{height}/g, h).replace(/\{typeCss}/g, typeCss)
.replace(/\{footer}/g, footer).replace(/\{data}/g, d).replace(/\{template}/g, templ || cat);
};
ind = ind || previewId.slice(previewId.lastIndexOf('-') + 1);
if (self.fileActionSettings.showZoom) {
zoomContent = getContent((forceZoomIcon ? 'other' : cat), data, true, 'kv-zoom-thumb');
}
zoomContent = '\n' + self._getLayoutTemplate('zoomCache').replace('{zoomContent}', zoomContent);
prevContent = getContent((forcePrevIcon ? 'other' : cat), data, false, 'kv-preview-thumb');
return prevContent + zoomContent;
},
_previewDefault: function (file, previewId, isDisabled) {
var self = this, $preview = self.$preview;
if (!self.showPreview) {
return;
}
var fname = file ? file.name : '', ftype = file ? file.type : '', content, size = file.size || 0,
caption = self.slug(fname), isError = isDisabled === true && !self.isUploadable,
data = $h.objUrl.createObjectURL(file);
self._clearDefaultPreview();
content = self._generatePreviewTemplate('other', data, fname, ftype, previewId, isError, size);
$preview.append("\n" + content);
self._setThumbAttr(previewId, caption, size);
if (isDisabled === true && self.isUploadable) {
self._setThumbStatus($('#' + previewId), 'Error');
}
},
_previewFile: function (i, file, theFile, previewId, data) {
if (!this.showPreview) {
return;
}
var self = this, cat = self._parseFileType(file), fname = file ? file.name : '', caption = self.slug(fname),
types = self.allowedPreviewTypes, mimes = self.allowedPreviewMimeTypes, $preview = self.$preview,
chkTypes = types && types.indexOf(cat) >= 0, size = file.size || 0,
iData = (cat === 'text' || cat === 'html' || cat === 'image') ? theFile.target.result : data, content,
chkMimes = mimes && mimes.indexOf(file.type) !== -1;
/** @namespace window.DOMPurify */
if (cat === 'html' && self.purifyHtml && window.DOMPurify) {
iData = window.DOMPurify.sanitize(iData);
}
if (chkTypes || chkMimes) {
content = self._generatePreviewTemplate(cat, iData, fname, file.type, previewId, false, size);
self._clearDefaultPreview();
$preview.append("\n" + content);
self._validateImage(previewId, caption, file.type, file.size);
} else {
self._previewDefault(file, previewId);
}
self._setThumbAttr(previewId, caption, size);
self._initSortable();
},
_setThumbAttr: function (id, caption, size) {
var self = this, $frame = $('#' + id);
if ($frame.length) {
size = size && size > 0 ? self._getSize(size) : '';
$frame.data({'caption': caption, 'size': size});
}
},
_setInitThumbAttr: function () {
var self = this, data = self.previewCache.data, len = self.previewCache.count(true), config,
caption, size, previewId;
if (len === 0) {
return;
}
for (var i = 0; i < len; i++) {
config = data.config[i];
previewId = self.previewInitId + '-' + 'init_' + i;
caption = $h.ifSet('caption', config, $h.ifSet('filename', config));
size = $h.ifSet('size', config);
self._setThumbAttr(previewId, caption, size);
}
},
_slugDefault: function (text) {
return $h.isEmpty(text) ? '' : String(text).replace(/[\-\[\]\/\{}:;#%=\(\)\*\+\?\\\^\$\|<>&"']/g, '_');
},
_readFiles: function (files) {
this.reader = new FileReader();
var self = this, $el = self.$element, $preview = self.$preview, reader = self.reader,
$container = self.$previewContainer, $status = self.$previewStatus, msgLoading = self.msgLoading,
msgProgress = self.msgProgress, previewInitId = self.previewInitId, numFiles = files.length,
settings = self.fileTypeSettings, ctr = self.filestack.length, readFile,
fileTypes = self.allowedFileTypes, typLen = fileTypes ? fileTypes.length : 0,
fileExt = self.allowedFileExtensions, strExt = $h.isEmpty(fileExt) ? '' : fileExt.join(', '),
maxPreviewSize = self.maxFilePreviewSize && parseFloat(self.maxFilePreviewSize),
canPreview = $preview.length && (!maxPreviewSize || isNaN(maxPreviewSize)),
throwError = function (msg, file, previewId, index) {
var p1 = $.extend(true, {}, self._getOutData({}, {}, files), {id: previewId, index: index}),
p2 = {id: previewId, index: index, file: file, files: files};
self._previewDefault(file, previewId, true);
if (self.isUploadable) {
self.addToStack(undefined);
setTimeout(function () {
readFile(index + 1);
}, 100);
}
self._initFileActions();
if (self.removeFromPreviewOnError) {
$('#' + previewId).remove();
}
return self.isUploadable ? self._showUploadError(msg, p1) : self._showError(msg, p2);
};
self.loadedImages = [];
self.totalImagesCount = 0;
$.each(files, function (key, file) {
var func = self.fileTypeSettings.image;
if (func && func(file.type)) {
self.totalImagesCount++;
}
});
readFile = function (i) {
if ($h.isEmpty($el.attr('multiple'))) {
numFiles = 1;
}
if (i >= numFiles) {
if (self.isUploadable && self.filestack.length > 0) {
self._raise('filebatchselected', [self.getFileStack()]);
} else {
self._raise('filebatchselected', [files]);
}
$container.removeClass('file-thumb-loading');
$status.html('');
return;
}
var node = ctr + i, previewId = previewInitId + "-" + node, isText, isImage, file = files[i], fSizeKB,
caption = file.name ? self.slug(file.name) : '', fileSize = (file.size || 0) / 1000, j, msg,
fileExtExpr = '', previewData = $h.objUrl.createObjectURL(file), typ, chk, typ1, typ2,
fileCount = 0, strTypes = '', func;
if (typLen > 0) {
for (j = 0; j < typLen; j++) {
typ1 = fileTypes[j];
typ2 = self.msgFileTypes[typ1] || typ1;
strTypes += j === 0 ? typ2 : ', ' + typ2;
}
}
if (caption === false) {
readFile(i + 1);
return;
}
if (caption.length === 0) {
msg = self.msgInvalidFileName.replace('{name}', $h.htmlEncode(file.name));
self.isError = throwError(msg, file, previewId, i);
return;
}
if (!$h.isEmpty(fileExt)) {
fileExtExpr = new RegExp('\\.(' + fileExt.join('|') + ')$', 'i');
}
fSizeKB = fileSize.toFixed(2);
if (self.maxFileSize > 0 && fileSize > self.maxFileSize) {
msg = self.msgSizeTooLarge.replace('{name}', caption).replace('{size}', fSizeKB)
.replace('{maxSize}', self.maxFileSize);
self.isError = throwError(msg, file, previewId, i);
return;
}
if (self.minFileSize !== null && fileSize <= $h.getNum(self.minFileSize)) {
msg = self.msgSizeTooSmall.replace('{name}', caption).replace('{size}', fSizeKB)
.replace('{minSize}', self.minFileSize);
self.isError = throwError(msg, file, previewId, i);
return;
}
if (!$h.isEmpty(fileTypes) && $h.isArray(fileTypes)) {
for (j = 0; j < fileTypes.length; j += 1) {
typ = fileTypes[j];
func = settings[typ];
fileCount += !func || (typeof func !== 'function') ? 0 : (func(file.type, file.name) ? 1 : 0);
}
if (fileCount === 0) {
msg = self.msgInvalidFileType.replace('{name}', caption).replace('{types}', strTypes);
self.isError = throwError(msg, file, previewId, i);
return;
}
}
if (fileCount === 0 && !$h.isEmpty(fileExt) && $h.isArray(fileExt) && !$h.isEmpty(fileExtExpr)) {
chk = $h.compare(caption, fileExtExpr);
fileCount += $h.isEmpty(chk) ? 0 : chk.length;
if (fileCount === 0) {
msg = self.msgInvalidFileExtension.replace('{name}', caption).replace('{extensions}', strExt);
self.isError = throwError(msg, file, previewId, i);
return;
}
}
if (!self.showPreview) {
self.addToStack(file);
setTimeout(function () {
readFile(i + 1);
}, 100);
self._raise('fileloaded', [file, previewId, i, reader]);
return;
}
if (!canPreview && fileSize > maxPreviewSize) {
self.addToStack(file);
$container.addClass('file-thumb-loading');
self._previewDefault(file, previewId);
self._initFileActions();
self._updateFileDetails(numFiles);
readFile(i + 1);
return;
}
if ($preview.length && FileReader !== undefined) {
$status.html(msgLoading.replace('{index}', i + 1).replace('{files}', numFiles));
$container.addClass('file-thumb-loading');
reader.onerror = function (evt) {
self._errorHandler(evt, caption);
};
reader.onload = function (theFile) {
self._previewFile(i, file, theFile, previewId, previewData);
self._initFileActions();
};
reader.onloadend = function () {
msg = msgProgress.replace('{index}', i + 1).replace('{files}', numFiles)
.replace('{percent}', 50).replace('{name}', caption);
setTimeout(function () {
$status.html(msg);
self._updateFileDetails(numFiles);
readFile(i + 1);
}, 100);
self._raise('fileloaded', [file, previewId, i, reader]);
};
reader.onprogress = function (data) {
if (data.lengthComputable) {
var fact = (data.loaded / data.total) * 100, progress = Math.ceil(fact);
msg = msgProgress.replace('{index}', i + 1).replace('{files}', numFiles)
.replace('{percent}', progress).replace('{name}', caption);
setTimeout(function () {
$status.html(msg);
}, 100);
}
};
isText = settings.text;
isImage = settings.image;
if (isText(file.type, caption)) {
reader.readAsText(file, self.textEncoding);
} else {
if (isImage(file.type, caption)) {
reader.readAsDataURL(file);
} else {
reader.readAsArrayBuffer(file);
}
}
} else {
self._previewDefault(file, previewId);
setTimeout(function () {
readFile(i + 1);
self._updateFileDetails(numFiles);
}, 100);
self._raise('fileloaded', [file, previewId, i, reader]);
}
self.addToStack(file);
};
readFile(0);
self._updateFileDetails(numFiles, false);
},
_updateFileDetails: function (numFiles) {
var self = this, $el = self.$element, fileStack = self.getFileStack(),
name = ($h.isIE(9) && $h.findFileName($el.val())) ||
($el[0].files[0] && $el[0].files[0].name) || (fileStack.length && fileStack[0].name) || '',
label = self.slug(name), n = self.isUploadable ? fileStack.length : numFiles,
nFiles = self.previewCache.count() + n, log = n > 1 ? self._getMsgSelected(nFiles) : label;
if (self.isError) {
self.$previewContainer.removeClass('file-thumb-loading');
self.$previewStatus.html('');
self.$captionContainer.find('.kv-caption-icon').hide();
} else {
self._showFileIcon();
}
self._setCaption(log, self.isError);
self.$container.removeClass('file-input-new file-input-ajax-new');
if (arguments.length === 1) {
self._raise('fileselect', [numFiles, label]);
}
if (self.previewCache.count()) {
self._initPreviewActions();
}
},
_setThumbStatus: function ($thumb, status) {
var self = this;
if (!self.showPreview) {
return;
}
var icon = 'indicator' + status, msg = icon + 'Title',
css = 'file-preview-' + status.toLowerCase(),
$indicator = $thumb.find('.file-upload-indicator'),
config = self.fileActionSettings;
$thumb.removeClass('file-preview-success file-preview-error file-preview-loading');
if (status === 'Error') {
$thumb.find('.kv-file-upload').attr('disabled', true);
}
if (status === 'Success') {
$thumb.find('.file-drag-handle').remove();
$indicator.css('margin-left', 0);
}
$indicator.html(config[icon]);
$indicator.attr('title', config[msg]);
$thumb.addClass(css);
},
_setProgressCancelled: function () {
var self = this;
self._setProgress(101, self.$progress, self.msgCancelled);
},
_setProgress: function (p, $el, error) {
var self = this, pct = Math.min(p, 100), out, status, pctLimit = self.progressUploadThreshold,
t = p <= 100 ? self.progressTemplate : self.progressCompleteTemplate,
template = pct < 100 ? self.progressTemplate : (error ? self.progressErrorTemplate : t);
$el = $el || self.$progress;
if (!$h.isEmpty(template)) {
if (pctLimit && pct > pctLimit && p <= 100) {
out = template.replace(/\{percent}/g, pctLimit).replace(/\{status}/g, self.msgUploadThreshold);
} else {
status = p > 100 ? self.msgUploadEnd : pct + '%';
out = template.replace(/\{percent}/g, pct).replace(/\{status}/g, status);
}
$el.html(out);
if (error) {
$el.find('[role="progressbar"]').html(error);
}
}
},
_setFileDropZoneTitle: function () {
var self = this, $zone = self.$container.find('.file-drop-zone'), title = self.dropZoneTitle, strFiles;
if (self.isClickable) {
strFiles = $h.isEmpty(self.$element.attr('multiple')) ? self.fileSingle : self.filePlural;
title += self.dropZoneClickTitle.replace('{files}', strFiles);
}
$zone.find('.' + self.dropZoneTitleClass).remove();
if (!self.isUploadable || !self.showPreview || $zone.length === 0 || self.getFileStack().length > 0 || !self.dropZoneEnabled) {
return;
}
if ($zone.find($h.FRAMES).length === 0 && $h.isEmpty(self.defaultPreviewContent)) {
$zone.prepend('<div class="' + self.dropZoneTitleClass + '">' + title + '</div>');
}
self.$container.removeClass('file-input-new');
$h.addCss(self.$container, 'file-input-ajax-new');
},
_setAsyncUploadStatus: function (previewId, pct, total) {
var self = this, sum = 0;
self._setProgress(pct, $('#' + previewId).find('.file-thumb-progress'));
self.uploadStatus[previewId] = pct;
$.each(self.uploadStatus, function (key, value) {
sum += value;
});
self._setProgress(Math.floor(sum / total));
},
_validateMinCount: function () {
var self = this, len = self.isUploadable ? self.getFileStack().length : self.$element.get(0).files.length;
if (self.validateInitialCount && self.minFileCount > 0 && self._getFileCount(len - 1) < self.minFileCount) {
self._noFilesError({});
return false;
}
return true;
},
_getFileCount: function (fileCount) {
var self = this, addCount = 0;
if (self.validateInitialCount && !self.overwriteInitial) {
addCount = self.previewCache.count();
fileCount += addCount;
}
return fileCount;
},
_getFileId: function (file) {
var self = this, custom = self.generateFileId, relativePath;
if (typeof custom === 'function') {
return custom(file, event);
}
if (!file) {
return null;
}
/** @namespace file.webkitRelativePath */
relativePath = file.webkitRelativePath || file.fileName || file.name || null;
if (!relativePath) {
return null;
}
return (file.size + '-' + relativePath.replace(/[^0-9a-zA-Z_-]/img, ''));
},
_getFileName: function (file) {
return file && file.name ? this.slug(file.name) : undefined;
},
_getFileIds: function (skipNull) {
var self = this;
return self.fileids.filter(function (n) {
return (skipNull ? n !== undefined : n !== undefined && n !== null);
});
},
_getFileNames: function (skipNull) {
var self = this;
return self.filenames.filter(function (n) {
return (skipNull ? n !== undefined : n !== undefined && n !== null);
});
},
_setPreviewError: function ($thumb, i, val) {
var self = this;
if (i !== undefined) {
self.updateStack(i, val);
}
if (self.removeFromPreviewOnError) {
$thumb.remove();
} else {
self._setThumbStatus($thumb, 'Error');
}
},
_checkDimensions: function (i, chk, $img, $thumb, fname, type, params) {
var self = this, msg, dim, tag = chk === 'Small' ? 'min' : 'max', limit = self[tag + 'Image' + type],
$imgEl, isValid;
if ($h.isEmpty(limit) || !$img.length) {
return;
}
$imgEl = $img[0];
dim = (type === 'Width') ? $imgEl.naturalWidth || $imgEl.width : $imgEl.naturalHeight || $imgEl.height;
isValid = chk === 'Small' ? dim >= limit : dim <= limit;
if (isValid) {
return;
}
msg = self['msgImage' + type + chk].replace('{name}', fname).replace('{size}', limit);
self._showUploadError(msg, params);
self._setPreviewError($thumb, i, null);
},
_validateImage: function (previewId, fname, ftype, fsize) {
var self = this, $preview = self.$preview, params, w1, w2, $thumb = $preview.find("#" + previewId),
i = $thumb.attr('data-fileindex'), $img = $thumb.find('img');
fname = fname || 'Untitled';
if (!$img.length) {
return;
}
self._handler($img, 'load', function () {
w1 = $thumb.width();
w2 = $preview.width();
if (w1 > w2) {
$img.css('width', '100%');
$thumb.css('width', '97%');
}
params = {ind: i, id: previewId};
self._checkDimensions(i, 'Small', $img, $thumb, fname, 'Width', params);
self._checkDimensions(i, 'Small', $img, $thumb, fname, 'Height', params);
if (!self.resizeImage) {
self._checkDimensions(i, 'Large', $img, $thumb, fname, 'Width', params);
self._checkDimensions(i, 'Large', $img, $thumb, fname, 'Height', params);
}
self._raise('fileimageloaded', [previewId]);
self.loadedImages.push({
ind: i,
img: $img,
thumb: $thumb,
pid: previewId,
typ: ftype,
siz: fsize,
validated: false
});
self._validateAllImages();
});
},
_validateAllImages: function () {
var self = this, i, counter = {val: 0}, numImgs = self.loadedImages.length, config,
fsize, minSize = self.resizeIfSizeMoreThan;
if (numImgs !== self.totalImagesCount) {
return;
}
self._raise('fileimagesloaded');
if (!self.resizeImage) {
return;
}
for (i = 0; i < self.loadedImages.length; i++) {
config = self.loadedImages[i];
if (config.validated) {
continue;
}
fsize = config.siz;
if (fsize && fsize > minSize * 1000) {
self._getResizedImage(config, counter, numImgs);
}
self.loadedImages[i].validated = true;
}
},
_getResizedImage: function (config, counter, numImgs) {
var self = this, img = $(config.img)[0], width = img.naturalWidth, height = img.naturalHeight,
ratio = 1, maxWidth = self.maxImageWidth || width, maxHeight = self.maxImageHeight || height,
isValidImage = !!(width && height), chkWidth, chkHeight, canvas = self.imageCanvas,
context = self.imageCanvasContext, type = config.typ, pid = config.pid, ind = config.ind,
$thumb = config.thumb, throwError, msg;
throwError = function (msg, params, ev) {
if (self.isUploadable) {
self._showUploadError(msg, params, ev);
} else {
self._showError(msg, params, ev);
}
self._setPreviewError($thumb, ind);
};
if (!self.filestack[ind] || !isValidImage || (width <= maxWidth && height <= maxHeight)) {
if (isValidImage && self.filestack[ind]) {
self._raise('fileimageresized', [pid, ind]);
}
counter.val++;
if (counter.val === numImgs) {
self._raise('fileimagesresized');
}
if (!isValidImage) {
throwError(self.msgImageResizeError, {id: pid, 'index': ind}, 'fileimageresizeerror');
return;
}
}
type = type || self.resizeDefaultImageType;
chkWidth = width > maxWidth;
chkHeight = height > maxHeight;
if (self.resizePreference === 'width') {
ratio = chkWidth ? maxWidth / width : (chkHeight ? maxHeight / height : 1);
} else {
ratio = chkHeight ? maxHeight / height : (chkWidth ? maxWidth / width : 1);
}
self._resetCanvas();
width *= ratio;
height *= ratio;
canvas.width = width;
canvas.height = height;
try {
context.drawImage(img, 0, 0, width, height);
canvas.toBlob(function (blob) {
self.filestack[ind] = blob;
self._raise('fileimageresized', [pid, ind]);
counter.val++;
if (counter.val === numImgs) {
self._raise('fileimagesresized', [undefined, undefined]);
}
if (!(blob instanceof Blob)) {
throwError(self.msgImageResizeError, {id: pid, 'index': ind}, 'fileimageresizeerror');
}
}, type, self.resizeQuality);
}
catch (err) {
counter.val++;
if (counter.val === numImgs) {
self._raise('fileimagesresized', [undefined, undefined]);
}
msg = self.msgImageResizeException.replace('{errors}', err.message);
throwError(msg, {id: pid, 'index': ind}, 'fileimageresizeexception');
}
},
_initBrowse: function ($container) {
var self = this;
if (self.showBrowse) {
self.$btnFile = $container.find('.btn-file');
self.$btnFile.append(self.$element);
} else {
self.$element.hide();
}
},
_initCaption: function () {
var self = this, cap = self.initialCaption || '';
if (self.overwriteInitial || $h.isEmpty(cap)) {
self.$caption.html('');
return false;
}
self._setCaption(cap);
return true;
},
_setCaption: function (content, isError) {
var self = this, title, out, n, cap, stack = self.getFileStack();
if (!self.$caption.length) {
return;
}
if (isError) {
title = $('<div>' + self.msgValidationError + '</div>').text();
n = stack.length;
if (n) {
cap = n === 1 && stack[0] ? self._getFileNames()[0] : self._getMsgSelected(n);
} else {
cap = self._getMsgSelected(self.msgNo);
}
out = '<span class="' + self.msgValidationErrorClass + '">' + self.msgValidationErrorIcon +
($h.isEmpty(content) ? cap : content) + '</span>';
} else {
if ($h.isEmpty(content)) {
return;
}
title = $('<div>' + content + '</div>').text();
out = self._getLayoutTemplate('fileIcon') + title;
}
self.$caption.html(out);
self.$caption.attr('title', title);
self.$captionContainer.find('.file-caption-ellipsis').attr('title', title);
},
_createContainer: function () {
var self = this, $container = $(document.createElement("div"))
.attr({"class": 'file-input file-input-new'})
.html(self._renderMain());
self.$element.before($container);
self._initBrowse($container);
if (self.theme) {
$container.addClass('theme-' + self.theme);
}
return $container;
},
_refreshContainer: function () {
var self = this, $container = self.$container;
$container.before(self.$element);
$container.html(self._renderMain());
self._initBrowse($container);
},
_renderMain: function () {
var self = this, dropCss = (self.isUploadable && self.dropZoneEnabled) ? ' file-drop-zone' : 'file-drop-disabled',
close = !self.showClose ? '' : self._getLayoutTemplate('close'),
preview = !self.showPreview ? '' : self._getLayoutTemplate('preview')
.replace(/\{class}/g, self.previewClass)
.replace(/\{dropClass}/g, dropCss),
css = self.isDisabled ? self.captionClass + ' file-caption-disabled' : self.captionClass,
caption = self.captionTemplate.replace(/\{class}/g, css + ' kv-fileinput-caption');
return self.mainTemplate.replace(/\{class}/g, self.mainClass +
(!self.showBrowse && self.showCaption ? ' no-browse' : ''))
.replace(/\{preview}/g, preview)
.replace(/\{close}/g, close)
.replace(/\{caption}/g, caption)
.replace(/\{upload}/g, self._renderButton('upload'))
.replace(/\{remove}/g, self._renderButton('remove'))
.replace(/\{cancel}/g, self._renderButton('cancel'))
.replace(/\{browse}/g, self._renderButton('browse'));
},
_renderButton: function (type) {
var self = this, tmplt = self._getLayoutTemplate('btnDefault'), css = self[type + 'Class'],
title = self[type + 'Title'], icon = self[type + 'Icon'], label = self[type + 'Label'],
status = self.isDisabled ? ' disabled' : '', btnType = 'button';
switch (type) {
case 'remove':
if (!self.showRemove) {
return '';
}
break;
case 'cancel':
if (!self.showCancel) {
return '';
}
css += ' hide';
break;
case 'upload':
if (!self.showUpload) {
return '';
}
if (self.isUploadable && !self.isDisabled) {
tmplt = self._getLayoutTemplate('btnLink').replace('{href}', self.uploadUrl);
} else {
btnType = 'submit';
}
break;
case 'browse':
if (!self.showBrowse) {
return '';
}
tmplt = self._getLayoutTemplate('btnBrowse');
break;
default:
return '';
}
css += type === 'browse' ? ' btn-file' : ' fileinput-' + type + ' fileinput-' + type + '-button';
if (!$h.isEmpty(label)) {
label = ' <span class="' + self.buttonLabelClass + '">' + label + '</span>';
}
return tmplt.replace('{type}', btnType).replace('{css}', css).replace('{title}', title)
.replace('{status}', status).replace('{icon}', icon).replace('{label}', label);
},
_renderThumbProgress: function () {
var self = this;
return '<div class="file-thumb-progress hide">' + self.progressTemplate.replace(/\{percent}/g, '0')
.replace(/\{status}/g, self.msgUploadBegin) + '</div>';
},
_renderFileFooter: function (caption, size, width, isError) {
var self = this, config = self.fileActionSettings, rem = config.showRemove, drg = config.showDrag,
upl = config.showUpload, zoom = config.showZoom, out, template = self._getLayoutTemplate('footer'),
indicator = isError ? config.indicatorError : config.indicatorNew,
title = isError ? config.indicatorErrorTitle : config.indicatorNewTitle;
size = self._getSize(size);
if (self.isUploadable) {
out = template.replace(/\{actions}/g, self._renderFileActions(upl, rem, zoom, drg, false, false, false))
.replace(/\{caption}/g, caption).replace(/\{size}/g, size).replace(/\{width}/g, width)
.replace(/\{progress}/g, self._renderThumbProgress()).replace(/\{indicator}/g, indicator)
.replace(/\{indicatorTitle}/g, title);
} else {
out = template.replace(/\{actions}/g,
self._renderFileActions(false, false, zoom, drg, false, false, false))
.replace(/\{caption}/g, caption).replace(/\{size}/g, size).replace(/\{width}/g, width)
.replace(/\{progress}/g, '').replace(/\{indicator}/g, indicator)
.replace(/\{indicatorTitle}/g, title);
}
out = $h.replaceTags(out, self.previewThumbTags);
return out;
},
_renderFileActions: function (showUpload, showDelete, showZoom, showDrag, disabled, url, key, isInit) {
if (!showUpload && !showDelete && !showZoom && !showDrag) {
return '';
}
var self = this,
vUrl = url === false ? '' : ' data-url="' + url + '"',
vKey = key === false ? '' : ' data-key="' + key + '"',
btnDelete = '', btnUpload = '', btnZoom = '', btnDrag = '', css,
template = self._getLayoutTemplate('actions'), config = self.fileActionSettings,
otherButtons = self.otherActionButtons.replace(/\{dataKey}/g, vKey),
removeClass = disabled ? config.removeClass + ' disabled' : config.removeClass;
if (showDelete) {
btnDelete = self._getLayoutTemplate('actionDelete')
.replace(/\{removeClass}/g, removeClass)
.replace(/\{removeIcon}/g, config.removeIcon)
.replace(/\{removeTitle}/g, config.removeTitle)
.replace(/\{dataUrl}/g, vUrl)
.replace(/\{dataKey}/g, vKey);
}
if (showUpload) {
btnUpload = self._getLayoutTemplate('actionUpload')
.replace(/\{uploadClass}/g, config.uploadClass)
.replace(/\{uploadIcon}/g, config.uploadIcon)
.replace(/\{uploadTitle}/g, config.uploadTitle);
}
if (showZoom) {
btnZoom = self._getLayoutTemplate('actionZoom')
.replace(/\{zoomClass}/g, config.zoomClass)
.replace(/\{zoomIcon}/g, config.zoomIcon)
.replace(/\{zoomTitle}/g, config.zoomTitle);
}
if (showDrag && isInit) {
css = 'drag-handle-init ' + config.dragClass;
btnDrag = self._getLayoutTemplate('actionDrag').replace(/\{dragClass}/g, css)
.replace(/\{dragTitle}/g, config.dragTitle)
.replace(/\{dragIcon}/g, config.dragIcon);
}
return template.replace(/\{delete}/g, btnDelete)
.replace(/\{upload}/g, btnUpload)
.replace(/\{zoom}/g, btnZoom)
.replace(/\{drag}/g, btnDrag)
.replace(/\{other}/g, otherButtons);
},
_browse: function (e) {
var self = this;
self._raise('filebrowse');
if (e && e.isDefaultPrevented()) {
return;
}
if (self.isError && !self.isUploadable) {
self.clear();
}
self.$captionContainer.focus();
},
_filterDuplicate: function (file, files, fileIds) {
var self = this, fileId = self._getFileId(file);
if (fileId && fileIds && fileIds.indexOf(fileId) > -1) {
return;
}
if (!fileIds) {
fileIds = [];
}
files.push(file);
fileIds.push(fileId);
},
_change: function (e) {
var self = this, $el = self.$element;
if (!self.isUploadable && $h.isEmpty($el.val()) && self.fileInputCleared) { // IE 11 fix
self.fileInputCleared = false;
return;
}
self.fileInputCleared = false;
var tfiles = [], msg, total, isDragDrop = arguments.length > 1, isAjaxUpload = self.isUploadable, n, len,
files = isDragDrop ? e.originalEvent.dataTransfer.files : $el.get(0).files, ctr = self.filestack.length,
isSingleUpload = $h.isEmpty($el.attr('multiple')), flagSingle = (isSingleUpload && ctr > 0),
folders = 0, fileIds = self._getFileIds(), throwError = function (mesg, file, previewId, index) {
var p1 = $.extend(true, {}, self._getOutData({}, {}, files), {id: previewId, index: index}),
p2 = {id: previewId, index: index, file: file, files: files};
return self.isUploadable ? self._showUploadError(mesg, p1) : self._showError(mesg, p2);
};
self.reader = null;
self._resetUpload();
self._hideFileIcon();
if (self.isUploadable) {
self.$container.find('.file-drop-zone .' + self.dropZoneTitleClass).remove();
}
if (isDragDrop) {
$.each(files, function (i, f) {
if (f && !f.type && f.size !== undefined && f.size % 4096 === 0) {
folders++;
} else {
self._filterDuplicate(f, tfiles, fileIds);
}
});
} else {
if (e.target && e.target.files === undefined) {
files = e.target.value ? [{name: e.target.value.replace(/^.+\\/, '')}] : [];
} else {
files = e.target.files || {};
}
$.each(files, function (i, f) {
self._filterDuplicate(f, tfiles, fileIds);
});
}
if ($h.isEmpty(tfiles) || tfiles.length === 0) {
if (!isAjaxUpload) {
self.clear();
}
self._showFolderError(folders);
self._raise('fileselectnone');
return;
}
self._resetErrors();
len = tfiles.length;
total = self._getFileCount(self.isUploadable ? (self.getFileStack().length + len) : len);
if (self.maxFileCount > 0 && total > self.maxFileCount) {
if (!self.autoReplace || len > self.maxFileCount) {
n = (self.autoReplace && len > self.maxFileCount) ? len : total;
msg = self.msgFilesTooMany.replace('{m}', self.maxFileCount).replace('{n}', n);
self.isError = throwError(msg, null, null, null);
self.$captionContainer.find('.kv-caption-icon').hide();
self._setCaption('', true);
self.$container.removeClass('file-input-new file-input-ajax-new');
return;
}
if (total > self.maxFileCount) {
self._resetPreviewThumbs(isAjaxUpload);
}
} else {
if (!isAjaxUpload || flagSingle) {
self._resetPreviewThumbs(false);
if (flagSingle) {
self.clearStack();
}
} else {
if (isAjaxUpload && ctr === 0 && (!self.previewCache.count() || self.overwriteInitial)) {
self._resetPreviewThumbs(true);
}
}
}
if (self.isPreviewable) {
self._readFiles(tfiles);
} else {
self._updateFileDetails(1);
}
self._showFolderError(folders);
},
_abort: function (params) {
var self = this, data;
if (self.ajaxAborted && typeof self.ajaxAborted === "object" && self.ajaxAborted.message !== undefined) {
data = $.extend(true, {}, self._getOutData(), params);
data.abortData = self.ajaxAborted.data || {};
data.abortMessage = self.ajaxAborted.message;
self._setProgress(101, self.$progress, self.msgCancelled);
self._showUploadError(self.ajaxAborted.message, data, 'filecustomerror');
self.cancel();
return true;
}
return false;
},
_resetFileStack: function () {
var self = this, i = 0, newstack = [], newnames = [], newids = [];
self._getThumbs().each(function () {
var $thumb = $(this), ind = $thumb.attr('data-fileindex'), file = self.filestack[ind],
pid = $thumb.attr('id'), newId;
if (ind === '-1' || ind === -1) {
return;
}
if (file !== undefined) {
newstack[i] = file;
newnames[i] = self._getFileName(file);
newids[i] = self._getFileId(file);
$thumb.attr({'id': self.previewInitId + '-' + i, 'data-fileindex': i});
i++;
} else {
newId = 'uploaded-' + $h.uniqId();
$thumb.attr({'id': newId, 'data-fileindex': '-1'});
self.$preview.find('#zoom-' + pid).attr('id', 'zoom-' + newId);
}
});
self.filestack = newstack;
self.filenames = newnames;
self.fileids = newids;
},
clearStack: function () {
var self = this;
self.filestack = [];
self.filenames = [];
self.fileids = [];
return self.$element;
},
updateStack: function (i, file) {
var self = this;
self.filestack[i] = file;
self.filenames[i] = self._getFileName(file);
self.fileids[i] = file && self._getFileId(file) || null;
return self.$element;
},
addToStack: function (file) {
var self = this;
self.filestack.push(file);
self.filenames.push(self._getFileName(file));
self.fileids.push(self._getFileId(file));
return self.$element;
},
getFileStack: function (skipNull) {
var self = this;
return self.filestack.filter(function (n) {
return (skipNull ? n !== undefined : n !== undefined && n !== null);
});
},
getFilesCount: function () {
var self = this, len = self.isUploadable ? self.getFileStack().length : self.$element.get(0).files.length;
return self._getFileCount(len);
},
lock: function () {
var self = this;
self._resetErrors();
self.disable();
if (self.showRemove) {
$h.addCss(self.$container.find('.fileinput-remove'), 'hide');
}
if (self.showCancel) {
self.$container.find('.fileinput-cancel').removeClass('hide');
}
self._raise('filelock', [self.filestack, self._getExtraData()]);
return self.$element;
},
unlock: function (reset) {
var self = this;
if (reset === undefined) {
reset = true;
}
self.enable();
if (self.showCancel) {
$h.addCss(self.$container.find('.fileinput-cancel'), 'hide');
}
if (self.showRemove) {
self.$container.find('.fileinput-remove').removeClass('hide');
}
if (reset) {
self._resetFileStack();
}
self._raise('fileunlock', [self.filestack, self._getExtraData()]);
return self.$element;
},
cancel: function () {
var self = this, xhr = self.ajaxRequests, len = xhr.length, i;
if (len > 0) {
for (i = 0; i < len; i += 1) {
self.cancelling = true;
xhr[i].abort();
}
}
self._setProgressCancelled();
self._getThumbs().each(function () {
var $thumb = $(this), ind = $thumb.attr('data-fileindex');
$thumb.removeClass('file-uploading');
if (self.filestack[ind] !== undefined) {
$thumb.find('.kv-file-upload').removeClass('disabled').removeAttr('disabled');
$thumb.find('.kv-file-remove').removeClass('disabled').removeAttr('disabled');
}
self.unlock();
});
return self.$element;
},
clear: function () {
var self = this, cap;
if (!self._raise('fileclear')) {
return;
}
self.$btnUpload.removeAttr('disabled');
self._getThumbs().find('video,audio,img').each(function () {
$h.cleanMemory($(this));
});
self._resetUpload();
self.clearStack();
self._clearFileInput();
self._resetErrors(true);
if (self._hasInitialPreview()) {
self._showFileIcon();
self._resetPreview();
self._initPreviewActions();
self.$container.removeClass('file-input-new');
} else {
self._getThumbs().each(function () {
self._clearObjects($(this));
});
if (self.isUploadable) {
self.previewCache.data = {};
}
self.$preview.html('');
cap = (!self.overwriteInitial && self.initialCaption.length > 0) ? self.initialCaption : '';
self.$caption.html(cap);
self.$caption.attr('title', '');
$h.addCss(self.$container, 'file-input-new');
self._validateDefaultPreview();
}
if (self.$container.find($h.FRAMES).length === 0) {
if (!self._initCaption()) {
self.$captionContainer.find('.kv-caption-icon').hide();
}
}
self._hideFileIcon();
self._raise('filecleared');
self.$captionContainer.focus();
self._setFileDropZoneTitle();
return self.$element;
},
reset: function () {
var self = this;
if (!self._raise('filereset')) {
return;
}
self._resetPreview();
self.$container.find('.fileinput-filename').text('');
$h.addCss(self.$container, 'file-input-new');
if (self.$preview.find($h.FRAMES).length || self.isUploadable && self.dropZoneEnabled) {
self.$container.removeClass('file-input-new');
}
self._setFileDropZoneTitle();
self.clearStack();
self.formdata = {};
return self.$element;
},
disable: function () {
var self = this;
self.isDisabled = true;
self._raise('filedisabled');
self.$element.attr('disabled', 'disabled');
self.$container.find(".kv-fileinput-caption").addClass("file-caption-disabled");
self.$container.find(".btn-file, .fileinput-remove, .fileinput-upload, .file-preview-frame button").attr(
"disabled",
true);
self._initDragDrop();
return self.$element;
},
enable: function () {
var self = this;
self.isDisabled = false;
self._raise('fileenabled');
self.$element.removeAttr('disabled');
self.$container.find(".kv-fileinput-caption").removeClass("file-caption-disabled");
self.$container.find(
".btn-file, .fileinput-remove, .fileinput-upload, .file-preview-frame button").removeAttr("disabled");
self._initDragDrop();
return self.$element;
},
upload: function () {
var self = this, totLen = self.getFileStack().length, params = {}, i, outData, len,
hasExtraData = !$.isEmptyObject(self._getExtraData());
if (!self.isUploadable || self.isDisabled) {
return;
}
if (self.minFileCount > 0 && self._getFileCount(totLen) < self.minFileCount) {
self._noFilesError(params);
return;
}
self._resetUpload();
if (totLen === 0 && !hasExtraData) {
self._showUploadError(self.msgUploadEmpty);
return;
}
self.$progress.removeClass('hide');
self.uploadCount = 0;
self.uploadStatus = {};
self.uploadLog = [];
self.lock();
self._setProgress(2);
if (totLen === 0 && hasExtraData) {
self._uploadExtraOnly();
return;
}
len = self.filestack.length;
self.hasInitData = false;
if (self.uploadAsync) {
outData = self._getOutData();
self._raise('filebatchpreupload', [outData]);
self.fileBatchCompleted = false;
self.uploadCache = {content: [], config: [], tags: [], append: true};
self.uploadAsyncCount = self.getFileStack().length;
for (i = 0; i < len; i++) {
self.uploadCache.content[i] = null;
self.uploadCache.config[i] = null;
self.uploadCache.tags[i] = null;
}
self.$preview.find('.file-preview-initial').removeClass($h.SORT_CSS);
self._initSortable();
self.cacheInitialPreview = self.getPreview();
for (i = 0; i < len; i++) {
if (self.filestack[i] !== undefined) {
self._uploadSingle(i, self.filestack, true);
}
}
return;
}
self._uploadBatch();
return self.$element;
},
destroy: function () {
var self = this, $form = self.$form, $cont = self.$container, $el = self.$element, ns = self.namespace;
$(document).off(ns);
$(window).off(ns);
if ($form && $form.length) {
$form.off(ns);
}
$el.insertBefore($cont).off(ns).removeData();
$cont.off().remove();
return $el;
},
refresh: function (options) {
var self = this, $el = self.$element;
options = options ? $.extend(true, {}, self.options, options) : self.options;
self.destroy();
$el.fileinput(options);
if ($el.val()) {
$el.trigger('change.fileinput');
}
return $el;
},
zoom: function (frameId) {
var self = this, $frame = $('#' + frameId), $modal = self.$modal;
if (!$frame.length) {
self._log('Cannot zoom to detailed preview! Invalid frame with id: "' + frameId + '".');
return;
}
$h.initModal($modal);
$modal.html(self._getModalContent());
self._setZoomContent($frame);
$modal.modal('show');
self._initZoomButtons();
},
getPreview: function () {
var self = this;
return {
content: self.initialPreview,
config: self.initialPreviewConfig,
tags: self.initialPreviewThumbTags
};
}
};
$.fn.fileinput = function (option) {
if (!$h.hasFileAPISupport() && !$h.isIE(9)) {
return;
}
var args = Array.apply(null, arguments), retvals = [];
args.shift();
this.each(function () {
var self = $(this), data = self.data('fileinput'), options = typeof option === 'object' && option,
theme = options.theme || self.data('theme'), l = {}, t = {},
lang = options.language || self.data('language') || $.fn.fileinput.defaults.language || 'en', opt;
if (!data) {
if (theme) {
t = $.fn.fileinputThemes[theme] || {};
}
if (lang !== 'en' && !$h.isEmpty($.fn.fileinputLocales[lang])) {
l = $.fn.fileinputLocales[lang] || {};
}
opt = $.extend(true, {}, $.fn.fileinput.defaults, t, $.fn.fileinputLocales.en, l, options, self.data());
data = new FileInput(this, opt);
self.data('fileinput', data);
}
if (typeof option === 'string') {
retvals.push(data[option].apply(data, args));
}
});
switch (retvals.length) {
case 0:
return this;
case 1:
return retvals[0];
default:
return retvals;
}
};
$.fn.fileinput.defaults = {
language: 'en',
showCaption: true,
showBrowse: true,
showPreview: true,
showRemove: true,
showUpload: true,
showCancel: true,
showClose: true,
showUploadedThumbs: true,
browseOnZoneClick: false,
autoReplace: false,
generateFileId: null,
previewClass: '',
captionClass: '',
frameClass: 'krajee-default',
mainClass: 'file-caption-main',
mainTemplate: null,
purifyHtml: true,
fileSizeGetter: null,
initialCaption: '',
initialPreview: [],
initialPreviewDelimiter: '*$$*',
initialPreviewAsData: false,
initialPreviewFileType: 'image',
initialPreviewConfig: [],
initialPreviewThumbTags: [],
previewThumbTags: {},
initialPreviewShowDelete: true,
removeFromPreviewOnError: false,
deleteUrl: '',
deleteExtraData: {},
overwriteInitial: true,
previewZoomButtonIcons: {
prev: '<i class="fa fa-triangle-left"></i>',
next: '<i class="fa fa-triangle-right"></i>',
toggleheader: '<i class="fa fa-resize-vertical"></i>',
fullscreen: '<i class="fa fa-fullscreen"></i>',
borderless: '<i class="fa fa-resize-full"></i>',
close: '<i class="fa fa-remove"></i>'
},
previewZoomButtonClasses: {
prev: 'btn btn-navigate',
next: 'btn btn-navigate',
toggleheader: 'btn btn-default btn-header-toggle',
fullscreen: 'btn btn-default',
borderless: 'btn btn-default',
close: 'btn btn-default'
},
preferIconicPreview: false,
preferIconicZoomPreview: false,
allowedPreviewTypes: undefined,
allowedPreviewMimeTypes: null,
allowedFileTypes: null,
allowedFileExtensions: null,
defaultPreviewContent: null,
customLayoutTags: {},
customPreviewTags: {},
previewFileIcon: '<i class="fa fa-file"></i>',
previewFileIconClass: 'file-other-icon',
previewFileIconSettings: {},
previewFileExtSettings: {},
buttonLabelClass: 'hidden-xs',
browseIcon: '<i class="fa fa-folder-open"></i> ',
browseClass: 'btn btn-primary',
removeIcon: '<i class="fa fa-trash"></i>',
removeClass: 'btn btn-default',
cancelIcon: '<i class="fa fa-ban-circle"></i>',
cancelClass: 'btn btn-default',
uploadIcon: '<i class="fa fa-upload"></i>',
uploadClass: 'btn btn-default',
uploadUrl: null,
uploadAsync: true,
uploadExtraData: {},
zoomModalHeight: 480,
minImageWidth: null,
minImageHeight: null,
maxImageWidth: null,
maxImageHeight: null,
resizeImage: false,
resizePreference: 'width',
resizeQuality: 0.92,
resizeDefaultImageType: 'image/jpeg',
resizeIfSizeMoreThan: 0, // in KB
minFileSize: 0,
maxFileSize: 0,
maxFilePreviewSize: 25600, // 25 MB
minFileCount: 0,
maxFileCount: 0,
validateInitialCount: false,
msgValidationErrorClass: 'text-danger',
msgValidationErrorIcon: '<i class="fa fa-exclamation-sign"></i> ',
msgErrorClass: 'file-error-message',
progressThumbClass: "progress-bar progress-bar-success progress-bar-striped active",
progressClass: "progress-bar progress-bar-success progress-bar-striped active",
progressCompleteClass: "progress-bar progress-bar-success",
progressErrorClass: "progress-bar progress-bar-danger",
progressUploadThreshold: 99,
previewFileType: 'image',
elCaptionContainer: null,
elCaptionText: null,
elPreviewContainer: null,
elPreviewImage: null,
elPreviewStatus: null,
elErrorContainer: null,
errorCloseButton: '<span class="close kv-error-close">×</span>',
slugCallback: null,
dropZoneEnabled: true,
dropZoneTitleClass: 'file-drop-zone-title',
fileActionSettings: {},
otherActionButtons: '',
textEncoding: 'UTF-8',
ajaxSettings: {},
ajaxDeleteSettings: {},
showAjaxErrorDetails: true
};
$.fn.fileinputLocales.en = {
fileSingle: 'file',
filePlural: 'files',
browseLabel: 'Browse …',
removeLabel: 'Remove',
removeTitle: 'Clear selected files',
cancelLabel: 'Cancel',
cancelTitle: 'Abort ongoing upload',
uploadLabel: 'Upload',
uploadTitle: 'Upload selected files',
msgNo: 'No',
msgNoFilesSelected: 'No files selected',
msgCancelled: 'Cancelled',
msgZoomModalHeading: 'Detailed Preview',
msgSizeTooSmall: 'File "{name}" (<b>{size} KB</b>) is too small and must be larger than <b>{minSize} KB</b>.',
msgSizeTooLarge: 'File "{name}" (<b>{size} KB</b>) exceeds maximum allowed upload size of <b>{maxSize} KB</b>.',
msgFilesTooLess: 'You must select at least <b>{n}</b> {files} to upload.',
msgFilesTooMany: 'Number of files selected for upload <b>({n})</b> exceeds maximum allowed limit of <b>{m}</b>.',
msgFileNotFound: 'File "{name}" not found!',
msgFileSecured: 'Security restrictions prevent reading the file "{name}".',
msgFileNotReadable: 'File "{name}" is not readable.',
msgFilePreviewAborted: 'File preview aborted for "{name}".',
msgFilePreviewError: 'An error occurred while reading the file "{name}".',
msgInvalidFileName: 'Invalid or unsupported characters in file name "{name}".',
msgInvalidFileType: 'Invalid type for file "{name}". Only "{types}" files are supported.',
msgInvalidFileExtension: 'Invalid extension for file "{name}". Only "{extensions}" files are supported.',
msgFileTypes: {
'image': 'image',
'html': 'HTML',
'text': 'text',
'video': 'video',
'audio': 'audio',
'flash': 'flash',
'pdf': 'PDF',
'object': 'object'
},
msgUploadAborted: 'The file upload was aborted',
msgUploadThreshold: 'Processing...',
msgUploadBegin: 'Initializing...',
msgUploadEnd: 'Done',
msgUploadEmpty: 'No valid data available for upload.',
msgValidationError: 'Validation Error',
msgLoading: 'Loading file {index} of {files} …',
msgProgress: 'Loading file {index} of {files} - {name} - {percent}% completed.',
msgSelected: '{n} {files} selected',
msgFoldersNotAllowed: 'Drag & drop files only! {n} folder(s) dropped were skipped.',
msgImageWidthSmall: 'Width of image file "{name}" must be at least {size} px.',
msgImageHeightSmall: 'Height of image file "{name}" must be at least {size} px.',
msgImageWidthLarge: 'Width of image file "{name}" cannot exceed {size} px.',
msgImageHeightLarge: 'Height of image file "{name}" cannot exceed {size} px.',
msgImageResizeError: 'Could not get the image dimensions to resize.',
msgImageResizeException: 'Error while resizing the image.<pre>{errors}</pre>',
msgAjaxError: 'Something went wrong with the {operation} operation. Please try again later!',
msgAjaxProgressError: '{operation} failed',
ajaxOperations: {
deleteThumb: 'file delete',
uploadThumb: 'file upload',
uploadBatch: 'batch file upload',
uploadExtra: 'form data upload'
},
dropZoneTitle: 'Drag & drop files here …',
dropZoneClickTitle: '<br>(or click to select {files})',
previewZoomButtonTitles: {
prev: 'View previous file',
next: 'View next file',
toggleheader: 'Toggle header',
fullscreen: 'Toggle full screen',
borderless: 'Toggle borderless mode',
close: 'Close detailed preview'
}
};
$.fn.fileinput.Constructor = FileInput;
/**
* Convert automatically file inputs with class 'file' into a bootstrap fileinput control.
*/
$(document).ready(function () {
var $input = $('input.file[type=file]');
if ($input.length) {
$input.fileinput();
}
});
}));
|
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[157],{
/***/ "./frontend/node_modules/animate.css/animate.css":
/*!*******************************************************!*\
!*** ./frontend/node_modules/animate.css/animate.css ***!
\*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(/*! !../../../node_modules/css-loader??ref--6-1!../../../node_modules/postcss-loader/src??ref--6-2!./animate.css */ "./node_modules/css-loader/index.js?!./node_modules/postcss-loader/src/index.js?!./frontend/node_modules/animate.css/animate.css");
if(typeof content === 'string') content = [[module.i, content, '']];
var transform;
var insertInto;
var options = {"hmr":true}
options.transform = transform
options.insertInto = undefined;
var update = __webpack_require__(/*! ../../../node_modules/style-loader/lib/addStyles.js */ "./node_modules/style-loader/lib/addStyles.js")(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }),
/***/ "./node_modules/css-loader/index.js!./frontend/node_modules/sweetalert2/dist/sweetalert2.min.css":
/*!**********************************************************************************************!*\
!*** ./node_modules/css-loader!./frontend/node_modules/sweetalert2/dist/sweetalert2.min.css ***!
\**********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(/*! ../../../../node_modules/css-loader/lib/css-base.js */ "./node_modules/css-loader/lib/css-base.js")(false);
// imports
// module
exports.push([module.i, ".swal2-popup.swal2-toast{flex-direction:row;align-items:center;width:auto;padding:.625em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9}.swal2-popup.swal2-toast .swal2-header{flex-direction:row;padding:0}.swal2-popup.swal2-toast .swal2-title{flex-grow:1;justify-content:flex-start;margin:0 .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{position:static;width:.8em;height:.8em;line-height:.8}.swal2-popup.swal2-toast .swal2-content{justify-content:flex-start;padding:0;font-size:1em}.swal2-popup.swal2-toast .swal2-icon{width:2em;min-width:2em;height:2em;margin:0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{font-size:.25em}}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{flex-basis:auto!important;width:auto;height:auto;margin:0 .3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:.125em .3125em;padding:.3125em .625em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(100,150,200,.5)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:flex;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;flex-direction:row;align-items:center;justify-content:center;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-top{align-items:flex-start}.swal2-container.swal2-top-left,.swal2-container.swal2-top-start{align-items:flex-start;justify-content:flex-start}.swal2-container.swal2-top-end,.swal2-container.swal2-top-right{align-items:flex-start;justify-content:flex-end}.swal2-container.swal2-center{align-items:center}.swal2-container.swal2-center-left,.swal2-container.swal2-center-start{align-items:center;justify-content:flex-start}.swal2-container.swal2-center-end,.swal2-container.swal2-center-right{align-items:center;justify-content:flex-end}.swal2-container.swal2-bottom{align-items:flex-end}.swal2-container.swal2-bottom-left,.swal2-container.swal2-bottom-start{align-items:flex-end;justify-content:flex-start}.swal2-container.swal2-bottom-end,.swal2-container.swal2-bottom-right{align-items:flex-end;justify-content:flex-end}.swal2-container.swal2-bottom-end>:first-child,.swal2-container.swal2-bottom-left>:first-child,.swal2-container.swal2-bottom-right>:first-child,.swal2-container.swal2-bottom-start>:first-child,.swal2-container.swal2-bottom>:first-child{margin-top:auto}.swal2-container.swal2-grow-fullscreen>.swal2-modal{display:flex!important;flex:1;align-self:stretch;justify-content:center}.swal2-container.swal2-grow-row>.swal2-modal{display:flex!important;flex:1;align-content:center;justify-content:center}.swal2-container.swal2-grow-column{flex:1;flex-direction:column}.swal2-container.swal2-grow-column.swal2-bottom,.swal2-container.swal2-grow-column.swal2-center,.swal2-container.swal2-grow-column.swal2-top{align-items:center}.swal2-container.swal2-grow-column.swal2-bottom-left,.swal2-container.swal2-grow-column.swal2-bottom-start,.swal2-container.swal2-grow-column.swal2-center-left,.swal2-container.swal2-grow-column.swal2-center-start,.swal2-container.swal2-grow-column.swal2-top-left,.swal2-container.swal2-grow-column.swal2-top-start{align-items:flex-start}.swal2-container.swal2-grow-column.swal2-bottom-end,.swal2-container.swal2-grow-column.swal2-bottom-right,.swal2-container.swal2-grow-column.swal2-center-end,.swal2-container.swal2-grow-column.swal2-center-right,.swal2-container.swal2-grow-column.swal2-top-end,.swal2-container.swal2-grow-column.swal2-top-right{align-items:flex-end}.swal2-container.swal2-grow-column>.swal2-modal{display:flex!important;flex:1;align-content:center;justify-content:center}.swal2-container.swal2-no-transition{transition:none!important}.swal2-container:not(.swal2-top):not(.swal2-top-start):not(.swal2-top-end):not(.swal2-top-left):not(.swal2-top-right):not(.swal2-center-start):not(.swal2-center-end):not(.swal2-center-left):not(.swal2-center-right):not(.swal2-bottom):not(.swal2-bottom-start):not(.swal2-bottom-end):not(.swal2-bottom-left):not(.swal2-bottom-right):not(.swal2-grow-fullscreen)>.swal2-modal{margin:auto}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-container .swal2-modal{margin:0!important}}.swal2-popup{display:none;position:relative;box-sizing:border-box;flex-direction:column;justify-content:center;width:32em;max-width:100%;padding:1.25em;border:none;border-radius:5px;background:#fff;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-header{display:flex;flex-direction:column;align-items:center;padding:0 1.8em}.swal2-title{position:relative;max-width:100%;margin:0 0 .4em;padding:0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:100%;margin:1.25em auto 0;padding:0 1.6em}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;box-shadow:none;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#2778c4;color:#fff;font-size:1.0625em}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#d14529;color:#fff;font-size:1.0625em}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#757575;color:#fff;font-size:1.0625em}.swal2-styled:focus{outline:0;box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1.25em 0 0;padding:1em 0 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:1.25em auto}.swal2-close{position:absolute;z-index:2;top:0;right:0;align-items:center;justify-content:center;width:1.2em;height:1.2em;padding:0;overflow:hidden;transition:color .1s ease-out;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-size:2.5em;line-height:1.2;cursor:pointer}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-content{z-index:1;justify-content:center;margin:0;padding:0 1.6em;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em auto}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:100%;transition:border-color .3s,box-shadow .3s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06);color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em auto;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-input[type=number]{max-width:10em}.swal2-file{background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto}.swal2-validation-message{align-items:center;justify-content:center;margin:0 -2.7em;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:1.25em auto 1.875em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:0 0 1.25em;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{right:auto;left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@supports (-ms-accelerator:true){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{top:auto;right:auto;bottom:auto;left:auto;max-width:calc(100% - .625em * 2);background-color:transparent!important}body.swal2-no-backdrop .swal2-container>.swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}body.swal2-no-backdrop .swal2-container.swal2-top{top:0;left:50%;transform:translateX(-50%)}body.swal2-no-backdrop .swal2-container.swal2-top-left,body.swal2-no-backdrop .swal2-container.swal2-top-start{top:0;left:0}body.swal2-no-backdrop .swal2-container.swal2-top-end,body.swal2-no-backdrop .swal2-container.swal2-top-right{top:0;right:0}body.swal2-no-backdrop .swal2-container.swal2-center{top:50%;left:50%;transform:translate(-50%,-50%)}body.swal2-no-backdrop .swal2-container.swal2-center-left,body.swal2-no-backdrop .swal2-container.swal2-center-start{top:50%;left:0;transform:translateY(-50%)}body.swal2-no-backdrop .swal2-container.swal2-center-end,body.swal2-no-backdrop .swal2-container.swal2-center-right{top:50%;right:0;transform:translateY(-50%)}body.swal2-no-backdrop .swal2-container.swal2-bottom{bottom:0;left:50%;transform:translateX(-50%)}body.swal2-no-backdrop .swal2-container.swal2-bottom-left,body.swal2-no-backdrop .swal2-container.swal2-bottom-start{bottom:0;left:0}body.swal2-no-backdrop .swal2-container.swal2-bottom-end,body.swal2-no-backdrop .swal2-container.swal2-bottom-right{right:0;bottom:0}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{background-color:transparent}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}body.swal2-toast-column .swal2-toast{flex-direction:column;align-items:stretch}body.swal2-toast-column .swal2-toast .swal2-actions{flex:1;align-self:stretch;height:2.2em;margin-top:.3125em}body.swal2-toast-column .swal2-toast .swal2-loading{justify-content:center}body.swal2-toast-column .swal2-toast .swal2-input{height:2em;margin:.3125em auto;font-size:1em}body.swal2-toast-column .swal2-toast .swal2-validation-message{font-size:1em}", ""]);
// exports
/***/ }),
/***/ "./node_modules/css-loader/index.js?!./node_modules/postcss-loader/src/index.js?!./frontend/node_modules/animate.css/animate.css":
/*!***************************************************************************************************************************************!*\
!*** ./node_modules/css-loader??ref--6-1!./node_modules/postcss-loader/src??ref--6-2!./frontend/node_modules/animate.css/animate.css ***!
\***************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loader/lib/css-base.js */ "./node_modules/css-loader/lib/css-base.js")(false);
// imports
// module
exports.push([module.i, "@charset \"UTF-8\";/*!\n * animate.css - https://animate.style/\n * Version - 4.1.1\n * Licensed under the MIT license - http://opensource.org/licenses/MIT\n *\n * Copyright (c) 2020 Animate.css\n */\n:root {\n --animate-duration: 1s;\n --animate-delay: 1s;\n --animate-repeat: 1;\n}\n[dir=ltr] .animate__animated {\n -webkit-animation-duration: 1s;\n animation-duration: 1s;\n -webkit-animation-duration: var(--animate-duration);\n animation-duration: var(--animate-duration);\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both;\n}\n[dir=rtl] .animate__animated {\n -webkit-animation-duration: 1s;\n animation-duration: 1s;\n -webkit-animation-duration: var(--animate-duration);\n animation-duration: var(--animate-duration);\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both;\n}\n[dir=ltr] .animate__animated.animate__infinite {\n -webkit-animation-iteration-count: infinite;\n animation-iteration-count: infinite;\n}\n[dir=rtl] .animate__animated.animate__infinite {\n -webkit-animation-iteration-count: infinite;\n animation-iteration-count: infinite;\n}\n[dir=ltr] .animate__animated.animate__repeat-1 {\n -webkit-animation-iteration-count: 1;\n animation-iteration-count: 1;\n -webkit-animation-iteration-count: var(--animate-repeat);\n animation-iteration-count: var(--animate-repeat);\n}\n[dir=rtl] .animate__animated.animate__repeat-1 {\n -webkit-animation-iteration-count: 1;\n animation-iteration-count: 1;\n -webkit-animation-iteration-count: var(--animate-repeat);\n animation-iteration-count: var(--animate-repeat);\n}\n[dir=ltr] .animate__animated.animate__repeat-2 {\n -webkit-animation-iteration-count: calc(1 * 2);\n animation-iteration-count: calc(1 * 2);\n -webkit-animation-iteration-count: calc(var(--animate-repeat) * 2);\n animation-iteration-count: calc(var(--animate-repeat) * 2);\n}\n[dir=rtl] .animate__animated.animate__repeat-2 {\n -webkit-animation-iteration-count: calc(1 * 2);\n animation-iteration-count: calc(1 * 2);\n -webkit-animation-iteration-count: calc(var(--animate-repeat) * 2);\n animation-iteration-count: calc(var(--animate-repeat) * 2);\n}\n[dir=ltr] .animate__animated.animate__repeat-3 {\n -webkit-animation-iteration-count: calc(1 * 3);\n animation-iteration-count: calc(1 * 3);\n -webkit-animation-iteration-count: calc(var(--animate-repeat) * 3);\n animation-iteration-count: calc(var(--animate-repeat) * 3);\n}\n[dir=rtl] .animate__animated.animate__repeat-3 {\n -webkit-animation-iteration-count: calc(1 * 3);\n animation-iteration-count: calc(1 * 3);\n -webkit-animation-iteration-count: calc(var(--animate-repeat) * 3);\n animation-iteration-count: calc(var(--animate-repeat) * 3);\n}\n[dir=ltr] .animate__animated.animate__delay-1s {\n -webkit-animation-delay: 1s;\n animation-delay: 1s;\n -webkit-animation-delay: var(--animate-delay);\n animation-delay: var(--animate-delay);\n}\n[dir=rtl] .animate__animated.animate__delay-1s {\n -webkit-animation-delay: 1s;\n animation-delay: 1s;\n -webkit-animation-delay: var(--animate-delay);\n animation-delay: var(--animate-delay);\n}\n[dir=ltr] .animate__animated.animate__delay-2s {\n -webkit-animation-delay: calc(1s * 2);\n animation-delay: calc(1s * 2);\n -webkit-animation-delay: calc(var(--animate-delay) * 2);\n animation-delay: calc(var(--animate-delay) * 2);\n}\n[dir=rtl] .animate__animated.animate__delay-2s {\n -webkit-animation-delay: calc(1s * 2);\n animation-delay: calc(1s * 2);\n -webkit-animation-delay: calc(var(--animate-delay) * 2);\n animation-delay: calc(var(--animate-delay) * 2);\n}\n[dir=ltr] .animate__animated.animate__delay-3s {\n -webkit-animation-delay: calc(1s * 3);\n animation-delay: calc(1s * 3);\n -webkit-animation-delay: calc(var(--animate-delay) * 3);\n animation-delay: calc(var(--animate-delay) * 3);\n}\n[dir=rtl] .animate__animated.animate__delay-3s {\n -webkit-animation-delay: calc(1s * 3);\n animation-delay: calc(1s * 3);\n -webkit-animation-delay: calc(var(--animate-delay) * 3);\n animation-delay: calc(var(--animate-delay) * 3);\n}\n[dir=ltr] .animate__animated.animate__delay-4s {\n -webkit-animation-delay: calc(1s * 4);\n animation-delay: calc(1s * 4);\n -webkit-animation-delay: calc(var(--animate-delay) * 4);\n animation-delay: calc(var(--animate-delay) * 4);\n}\n[dir=rtl] .animate__animated.animate__delay-4s {\n -webkit-animation-delay: calc(1s * 4);\n animation-delay: calc(1s * 4);\n -webkit-animation-delay: calc(var(--animate-delay) * 4);\n animation-delay: calc(var(--animate-delay) * 4);\n}\n[dir=ltr] .animate__animated.animate__delay-5s {\n -webkit-animation-delay: calc(1s * 5);\n animation-delay: calc(1s * 5);\n -webkit-animation-delay: calc(var(--animate-delay) * 5);\n animation-delay: calc(var(--animate-delay) * 5);\n}\n[dir=rtl] .animate__animated.animate__delay-5s {\n -webkit-animation-delay: calc(1s * 5);\n animation-delay: calc(1s * 5);\n -webkit-animation-delay: calc(var(--animate-delay) * 5);\n animation-delay: calc(var(--animate-delay) * 5);\n}\n[dir=ltr] .animate__animated.animate__faster {\n -webkit-animation-duration: calc(1s / 2);\n animation-duration: calc(1s / 2);\n -webkit-animation-duration: calc(var(--animate-duration) / 2);\n animation-duration: calc(var(--animate-duration) / 2);\n}\n[dir=rtl] .animate__animated.animate__faster {\n -webkit-animation-duration: calc(1s / 2);\n animation-duration: calc(1s / 2);\n -webkit-animation-duration: calc(var(--animate-duration) / 2);\n animation-duration: calc(var(--animate-duration) / 2);\n}\n[dir=ltr] .animate__animated.animate__fast {\n -webkit-animation-duration: calc(1s * 0.8);\n animation-duration: calc(1s * 0.8);\n -webkit-animation-duration: calc(var(--animate-duration) * 0.8);\n animation-duration: calc(var(--animate-duration) * 0.8);\n}\n[dir=rtl] .animate__animated.animate__fast {\n -webkit-animation-duration: calc(1s * 0.8);\n animation-duration: calc(1s * 0.8);\n -webkit-animation-duration: calc(var(--animate-duration) * 0.8);\n animation-duration: calc(var(--animate-duration) * 0.8);\n}\n[dir=ltr] .animate__animated.animate__slow {\n -webkit-animation-duration: calc(1s * 2);\n animation-duration: calc(1s * 2);\n -webkit-animation-duration: calc(var(--animate-duration) * 2);\n animation-duration: calc(var(--animate-duration) * 2);\n}\n[dir=rtl] .animate__animated.animate__slow {\n -webkit-animation-duration: calc(1s * 2);\n animation-duration: calc(1s * 2);\n -webkit-animation-duration: calc(var(--animate-duration) * 2);\n animation-duration: calc(var(--animate-duration) * 2);\n}\n[dir=ltr] .animate__animated.animate__slower {\n -webkit-animation-duration: calc(1s * 3);\n animation-duration: calc(1s * 3);\n -webkit-animation-duration: calc(var(--animate-duration) * 3);\n animation-duration: calc(var(--animate-duration) * 3);\n}\n[dir=rtl] .animate__animated.animate__slower {\n -webkit-animation-duration: calc(1s * 3);\n animation-duration: calc(1s * 3);\n -webkit-animation-duration: calc(var(--animate-duration) * 3);\n animation-duration: calc(var(--animate-duration) * 3);\n}\n@media print, (prefers-reduced-motion: reduce) {\n .animate__animated {\n -webkit-transition-duration: 1ms !important;\n }\n [dir] .animate__animated {\n -webkit-transition-duration: 1ms !important;\n transition-duration: 1ms !important;\n }\n [dir=ltr] .animate__animated {\n -webkit-animation-duration: 1ms !important;\n animation-duration: 1ms !important;\n -webkit-animation-iteration-count: 1 !important;\n animation-iteration-count: 1 !important;\n }\n [dir=rtl] .animate__animated {\n -webkit-animation-duration: 1ms !important;\n animation-duration: 1ms !important;\n -webkit-animation-iteration-count: 1 !important;\n animation-iteration-count: 1 !important;\n }\n\n .animate__animated[class*='Out'] {\n opacity: 0;\n }\n}\n/* Attention seekers */\n@-webkit-keyframes bounce {\n from,\n 20%,\n 53%,\n to {\n -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n 40%,\n 43% {\n -webkit-animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);\n animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);\n -webkit-transform: translate3d(0, -30px, 0) scaleY(1.1);\n transform: translate3d(0, -30px, 0) scaleY(1.1);\n }\n\n 70% {\n -webkit-animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);\n animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);\n -webkit-transform: translate3d(0, -15px, 0) scaleY(1.05);\n transform: translate3d(0, -15px, 0) scaleY(1.05);\n }\n\n 80% {\n -webkit-transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n -webkit-transform: translate3d(0, 0, 0) scaleY(0.95);\n transform: translate3d(0, 0, 0) scaleY(0.95);\n }\n\n 90% {\n -webkit-transform: translate3d(0, -4px, 0) scaleY(1.02);\n transform: translate3d(0, -4px, 0) scaleY(1.02);\n }\n}\n@keyframes bounce {\n from,\n 20%,\n 53%,\n to {\n -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n 40%,\n 43% {\n -webkit-animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);\n animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);\n -webkit-transform: translate3d(0, -30px, 0) scaleY(1.1);\n transform: translate3d(0, -30px, 0) scaleY(1.1);\n }\n\n 70% {\n -webkit-animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);\n animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);\n -webkit-transform: translate3d(0, -15px, 0) scaleY(1.05);\n transform: translate3d(0, -15px, 0) scaleY(1.05);\n }\n\n 80% {\n -webkit-transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n -webkit-transform: translate3d(0, 0, 0) scaleY(0.95);\n transform: translate3d(0, 0, 0) scaleY(0.95);\n }\n\n 90% {\n -webkit-transform: translate3d(0, -4px, 0) scaleY(1.02);\n transform: translate3d(0, -4px, 0) scaleY(1.02);\n }\n}\n.animate__bounce {\n -webkit-transform-origin: center bottom;\n}\n[dir] .animate__bounce {\n -webkit-transform-origin: center bottom;\n transform-origin: center bottom;\n}\n[dir=ltr] .animate__bounce {\n -webkit-animation-name: bounce;\n animation-name: bounce;\n}\n[dir=rtl] .animate__bounce {\n -webkit-animation-name: bounce;\n animation-name: bounce;\n}\n@-webkit-keyframes flash {\n from,\n 50%,\n to {\n opacity: 1;\n }\n\n 25%,\n 75% {\n opacity: 0;\n }\n}\n@keyframes flash {\n from,\n 50%,\n to {\n opacity: 1;\n }\n\n 25%,\n 75% {\n opacity: 0;\n }\n}\n[dir=ltr] .animate__flash {\n -webkit-animation-name: flash;\n animation-name: flash;\n}\n[dir=rtl] .animate__flash {\n -webkit-animation-name: flash;\n animation-name: flash;\n}\n/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */\n@-webkit-keyframes pulse {\n from {\n -webkit-transform: scale3d(1, 1, 1);\n transform: scale3d(1, 1, 1);\n }\n\n 50% {\n -webkit-transform: scale3d(1.05, 1.05, 1.05);\n transform: scale3d(1.05, 1.05, 1.05);\n }\n\n to {\n -webkit-transform: scale3d(1, 1, 1);\n transform: scale3d(1, 1, 1);\n }\n}\n@keyframes pulse {\n from {\n -webkit-transform: scale3d(1, 1, 1);\n transform: scale3d(1, 1, 1);\n }\n\n 50% {\n -webkit-transform: scale3d(1.05, 1.05, 1.05);\n transform: scale3d(1.05, 1.05, 1.05);\n }\n\n to {\n -webkit-transform: scale3d(1, 1, 1);\n transform: scale3d(1, 1, 1);\n }\n}\n[dir=ltr] .animate__pulse {\n -webkit-animation-name: pulse;\n animation-name: pulse;\n -webkit-animation-timing-function: ease-in-out;\n animation-timing-function: ease-in-out;\n}\n[dir=rtl] .animate__pulse {\n -webkit-animation-name: pulse;\n animation-name: pulse;\n -webkit-animation-timing-function: ease-in-out;\n animation-timing-function: ease-in-out;\n}\n@-webkit-keyframes rubberBand {\n from {\n -webkit-transform: scale3d(1, 1, 1);\n transform: scale3d(1, 1, 1);\n }\n\n 30% {\n -webkit-transform: scale3d(1.25, 0.75, 1);\n transform: scale3d(1.25, 0.75, 1);\n }\n\n 40% {\n -webkit-transform: scale3d(0.75, 1.25, 1);\n transform: scale3d(0.75, 1.25, 1);\n }\n\n 50% {\n -webkit-transform: scale3d(1.15, 0.85, 1);\n transform: scale3d(1.15, 0.85, 1);\n }\n\n 65% {\n -webkit-transform: scale3d(0.95, 1.05, 1);\n transform: scale3d(0.95, 1.05, 1);\n }\n\n 75% {\n -webkit-transform: scale3d(1.05, 0.95, 1);\n transform: scale3d(1.05, 0.95, 1);\n }\n\n to {\n -webkit-transform: scale3d(1, 1, 1);\n transform: scale3d(1, 1, 1);\n }\n}\n@keyframes rubberBand {\n from {\n -webkit-transform: scale3d(1, 1, 1);\n transform: scale3d(1, 1, 1);\n }\n\n 30% {\n -webkit-transform: scale3d(1.25, 0.75, 1);\n transform: scale3d(1.25, 0.75, 1);\n }\n\n 40% {\n -webkit-transform: scale3d(0.75, 1.25, 1);\n transform: scale3d(0.75, 1.25, 1);\n }\n\n 50% {\n -webkit-transform: scale3d(1.15, 0.85, 1);\n transform: scale3d(1.15, 0.85, 1);\n }\n\n 65% {\n -webkit-transform: scale3d(0.95, 1.05, 1);\n transform: scale3d(0.95, 1.05, 1);\n }\n\n 75% {\n -webkit-transform: scale3d(1.05, 0.95, 1);\n transform: scale3d(1.05, 0.95, 1);\n }\n\n to {\n -webkit-transform: scale3d(1, 1, 1);\n transform: scale3d(1, 1, 1);\n }\n}\n[dir=ltr] .animate__rubberBand {\n -webkit-animation-name: rubberBand;\n animation-name: rubberBand;\n}\n[dir=rtl] .animate__rubberBand {\n -webkit-animation-name: rubberBand;\n animation-name: rubberBand;\n}\n@-webkit-keyframes shakeX-ltr {\n from,\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n 10%,\n 30%,\n 50%,\n 70%,\n 90% {\n -webkit-transform: translate3d(-10px, 0, 0);\n transform: translate3d(-10px, 0, 0);\n }\n\n 20%,\n 40%,\n 60%,\n 80% {\n -webkit-transform: translate3d(10px, 0, 0);\n transform: translate3d(10px, 0, 0);\n }\n}\n@-webkit-keyframes shakeX-rtl {\n from,\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n 10%,\n 30%,\n 50%,\n 70%,\n 90% {\n -webkit-transform: translate3d(10px, 0, 0);\n transform: translate3d(10px, 0, 0);\n }\n\n 20%,\n 40%,\n 60%,\n 80% {\n -webkit-transform: translate3d(-10px, 0, 0);\n transform: translate3d(-10px, 0, 0);\n }\n}\n@keyframes shakeX-ltr {\n from,\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n 10%,\n 30%,\n 50%,\n 70%,\n 90% {\n -webkit-transform: translate3d(-10px, 0, 0);\n transform: translate3d(-10px, 0, 0);\n }\n\n 20%,\n 40%,\n 60%,\n 80% {\n -webkit-transform: translate3d(10px, 0, 0);\n transform: translate3d(10px, 0, 0);\n }\n}\n@keyframes shakeX-rtl {\n from,\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n 10%,\n 30%,\n 50%,\n 70%,\n 90% {\n -webkit-transform: translate3d(10px, 0, 0);\n transform: translate3d(10px, 0, 0);\n }\n\n 20%,\n 40%,\n 60%,\n 80% {\n -webkit-transform: translate3d(-10px, 0, 0);\n transform: translate3d(-10px, 0, 0);\n }\n}\n[dir=ltr] .animate__shakeX {\n -webkit-animation-name: shakeX-ltr ;\n animation-name: shakeX-ltr ;\n}\n[dir=rtl] .animate__shakeX {\n -webkit-animation-name: shakeX-rtl ;\n animation-name: shakeX-rtl ;\n}\n@-webkit-keyframes shakeY {\n from,\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n 10%,\n 30%,\n 50%,\n 70%,\n 90% {\n -webkit-transform: translate3d(0, -10px, 0);\n transform: translate3d(0, -10px, 0);\n }\n\n 20%,\n 40%,\n 60%,\n 80% {\n -webkit-transform: translate3d(0, 10px, 0);\n transform: translate3d(0, 10px, 0);\n }\n}\n@keyframes shakeY {\n from,\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n 10%,\n 30%,\n 50%,\n 70%,\n 90% {\n -webkit-transform: translate3d(0, -10px, 0);\n transform: translate3d(0, -10px, 0);\n }\n\n 20%,\n 40%,\n 60%,\n 80% {\n -webkit-transform: translate3d(0, 10px, 0);\n transform: translate3d(0, 10px, 0);\n }\n}\n[dir=ltr] .animate__shakeY {\n -webkit-animation-name: shakeY;\n animation-name: shakeY;\n}\n[dir=rtl] .animate__shakeY {\n -webkit-animation-name: shakeY;\n animation-name: shakeY;\n}\n@-webkit-keyframes headShake-ltr {\n 0% {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n\n 6.5% {\n -webkit-transform: translateX(-6px) rotateY(-9deg);\n transform: translateX(-6px) rotateY(-9deg);\n }\n\n 18.5% {\n -webkit-transform: translateX(5px) rotateY(7deg);\n transform: translateX(5px) rotateY(7deg);\n }\n\n 31.5% {\n -webkit-transform: translateX(-3px) rotateY(-5deg);\n transform: translateX(-3px) rotateY(-5deg);\n }\n\n 43.5% {\n -webkit-transform: translateX(2px) rotateY(3deg);\n transform: translateX(2px) rotateY(3deg);\n }\n\n 50% {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n}\n@-webkit-keyframes headShake-rtl {\n 0% {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n\n 6.5% {\n -webkit-transform: translateX(6px) rotateY(-9deg);\n transform: translateX(6px) rotateY(-9deg);\n }\n\n 18.5% {\n -webkit-transform: translateX(-5px) rotateY(7deg);\n transform: translateX(-5px) rotateY(7deg);\n }\n\n 31.5% {\n -webkit-transform: translateX(3px) rotateY(-5deg);\n transform: translateX(3px) rotateY(-5deg);\n }\n\n 43.5% {\n -webkit-transform: translateX(-2px) rotateY(3deg);\n transform: translateX(-2px) rotateY(3deg);\n }\n\n 50% {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n}\n@keyframes headShake-ltr {\n 0% {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n\n 6.5% {\n -webkit-transform: translateX(-6px) rotateY(-9deg);\n transform: translateX(-6px) rotateY(-9deg);\n }\n\n 18.5% {\n -webkit-transform: translateX(5px) rotateY(7deg);\n transform: translateX(5px) rotateY(7deg);\n }\n\n 31.5% {\n -webkit-transform: translateX(-3px) rotateY(-5deg);\n transform: translateX(-3px) rotateY(-5deg);\n }\n\n 43.5% {\n -webkit-transform: translateX(2px) rotateY(3deg);\n transform: translateX(2px) rotateY(3deg);\n }\n\n 50% {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n}\n@keyframes headShake-rtl {\n 0% {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n\n 6.5% {\n -webkit-transform: translateX(6px) rotateY(-9deg);\n transform: translateX(6px) rotateY(-9deg);\n }\n\n 18.5% {\n -webkit-transform: translateX(-5px) rotateY(7deg);\n transform: translateX(-5px) rotateY(7deg);\n }\n\n 31.5% {\n -webkit-transform: translateX(3px) rotateY(-5deg);\n transform: translateX(3px) rotateY(-5deg);\n }\n\n 43.5% {\n -webkit-transform: translateX(-2px) rotateY(3deg);\n transform: translateX(-2px) rotateY(3deg);\n }\n\n 50% {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n}\n[dir=ltr] .animate__headShake {\n -webkit-animation-timing-function: ease-in-out;\n animation-timing-function: ease-in-out;\n -webkit-animation-name: headShake-ltr ;\n animation-name: headShake-ltr ;\n}\n[dir=rtl] .animate__headShake {\n -webkit-animation-timing-function: ease-in-out;\n animation-timing-function: ease-in-out;\n -webkit-animation-name: headShake-rtl ;\n animation-name: headShake-rtl ;\n}\n@-webkit-keyframes swing-ltr {\n 20% {\n -webkit-transform: rotate3d(0, 0, 1, 15deg);\n transform: rotate3d(0, 0, 1, 15deg);\n }\n\n 40% {\n -webkit-transform: rotate3d(0, 0, 1, -10deg);\n transform: rotate3d(0, 0, 1, -10deg);\n }\n\n 60% {\n -webkit-transform: rotate3d(0, 0, 1, 5deg);\n transform: rotate3d(0, 0, 1, 5deg);\n }\n\n 80% {\n -webkit-transform: rotate3d(0, 0, 1, -5deg);\n transform: rotate3d(0, 0, 1, -5deg);\n }\n\n to {\n -webkit-transform: rotate3d(0, 0, 1, 0deg);\n transform: rotate3d(0, 0, 1, 0deg);\n }\n}\n@-webkit-keyframes swing-rtl {\n 20% {\n -webkit-transform: rotate3d(0, 0, 1, -15deg);\n transform: rotate3d(0, 0, 1, -15deg);\n }\n\n 40% {\n -webkit-transform: rotate3d(0, 0, 1, 10deg);\n transform: rotate3d(0, 0, 1, 10deg);\n }\n\n 60% {\n -webkit-transform: rotate3d(0, 0, 1, -5deg);\n transform: rotate3d(0, 0, 1, -5deg);\n }\n\n 80% {\n -webkit-transform: rotate3d(0, 0, 1, 5deg);\n transform: rotate3d(0, 0, 1, 5deg);\n }\n\n to {\n -webkit-transform: rotate3d(0, 0, 1, 0deg);\n transform: rotate3d(0, 0, 1, 0deg);\n }\n}\n@keyframes swing-ltr {\n 20% {\n -webkit-transform: rotate3d(0, 0, 1, 15deg);\n transform: rotate3d(0, 0, 1, 15deg);\n }\n\n 40% {\n -webkit-transform: rotate3d(0, 0, 1, -10deg);\n transform: rotate3d(0, 0, 1, -10deg);\n }\n\n 60% {\n -webkit-transform: rotate3d(0, 0, 1, 5deg);\n transform: rotate3d(0, 0, 1, 5deg);\n }\n\n 80% {\n -webkit-transform: rotate3d(0, 0, 1, -5deg);\n transform: rotate3d(0, 0, 1, -5deg);\n }\n\n to {\n -webkit-transform: rotate3d(0, 0, 1, 0deg);\n transform: rotate3d(0, 0, 1, 0deg);\n }\n}\n@keyframes swing-rtl {\n 20% {\n -webkit-transform: rotate3d(0, 0, 1, -15deg);\n transform: rotate3d(0, 0, 1, -15deg);\n }\n\n 40% {\n -webkit-transform: rotate3d(0, 0, 1, 10deg);\n transform: rotate3d(0, 0, 1, 10deg);\n }\n\n 60% {\n -webkit-transform: rotate3d(0, 0, 1, -5deg);\n transform: rotate3d(0, 0, 1, -5deg);\n }\n\n 80% {\n -webkit-transform: rotate3d(0, 0, 1, 5deg);\n transform: rotate3d(0, 0, 1, 5deg);\n }\n\n to {\n -webkit-transform: rotate3d(0, 0, 1, 0deg);\n transform: rotate3d(0, 0, 1, 0deg);\n }\n}\n.animate__swing {\n -webkit-transform-origin: top center;\n}\n[dir] .animate__swing {\n -webkit-transform-origin: top center;\n transform-origin: top center;\n}\n[dir=ltr] .animate__swing {\n -webkit-animation-name: swing-ltr ;\n animation-name: swing-ltr ;\n}\n[dir=rtl] .animate__swing {\n -webkit-animation-name: swing-rtl ;\n animation-name: swing-rtl ;\n}\n@-webkit-keyframes tada-ltr {\n from {\n -webkit-transform: scale3d(1, 1, 1);\n transform: scale3d(1, 1, 1);\n }\n\n 10%,\n 20% {\n -webkit-transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);\n transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);\n }\n\n 30%,\n 50%,\n 70%,\n 90% {\n -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);\n transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);\n }\n\n 40%,\n 60%,\n 80% {\n -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);\n transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);\n }\n\n to {\n -webkit-transform: scale3d(1, 1, 1);\n transform: scale3d(1, 1, 1);\n }\n}\n@-webkit-keyframes tada-rtl {\n from {\n -webkit-transform: scale3d(1, 1, 1);\n transform: scale3d(1, 1, 1);\n }\n\n 10%,\n 20% {\n -webkit-transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, 3deg);\n transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, 3deg);\n }\n\n 30%,\n 50%,\n 70%,\n 90% {\n -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);\n transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);\n }\n\n 40%,\n 60%,\n 80% {\n -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);\n transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);\n }\n\n to {\n -webkit-transform: scale3d(1, 1, 1);\n transform: scale3d(1, 1, 1);\n }\n}\n@keyframes tada-ltr {\n from {\n -webkit-transform: scale3d(1, 1, 1);\n transform: scale3d(1, 1, 1);\n }\n\n 10%,\n 20% {\n -webkit-transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);\n transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);\n }\n\n 30%,\n 50%,\n 70%,\n 90% {\n -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);\n transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);\n }\n\n 40%,\n 60%,\n 80% {\n -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);\n transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);\n }\n\n to {\n -webkit-transform: scale3d(1, 1, 1);\n transform: scale3d(1, 1, 1);\n }\n}\n@keyframes tada-rtl {\n from {\n -webkit-transform: scale3d(1, 1, 1);\n transform: scale3d(1, 1, 1);\n }\n\n 10%,\n 20% {\n -webkit-transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, 3deg);\n transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, 3deg);\n }\n\n 30%,\n 50%,\n 70%,\n 90% {\n -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);\n transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);\n }\n\n 40%,\n 60%,\n 80% {\n -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);\n transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);\n }\n\n to {\n -webkit-transform: scale3d(1, 1, 1);\n transform: scale3d(1, 1, 1);\n }\n}\n[dir=ltr] .animate__tada {\n -webkit-animation-name: tada-ltr ;\n animation-name: tada-ltr ;\n}\n[dir=rtl] .animate__tada {\n -webkit-animation-name: tada-rtl ;\n animation-name: tada-rtl ;\n}\n/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */\n@-webkit-keyframes wobble-ltr {\n from {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n 15% {\n -webkit-transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);\n transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);\n }\n\n 30% {\n -webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);\n transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);\n }\n\n 45% {\n -webkit-transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);\n transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);\n }\n\n 60% {\n -webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);\n transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);\n }\n\n 75% {\n -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);\n transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@-webkit-keyframes wobble-rtl {\n from {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n 15% {\n -webkit-transform: translate3d(25%, 0, 0) rotate3d(0, 0, 1, 5deg);\n transform: translate3d(25%, 0, 0) rotate3d(0, 0, 1, 5deg);\n }\n\n 30% {\n -webkit-transform: translate3d(-20%, 0, 0) rotate3d(0, 0, 1, -3deg);\n transform: translate3d(-20%, 0, 0) rotate3d(0, 0, 1, -3deg);\n }\n\n 45% {\n -webkit-transform: translate3d(15%, 0, 0) rotate3d(0, 0, 1, 3deg);\n transform: translate3d(15%, 0, 0) rotate3d(0, 0, 1, 3deg);\n }\n\n 60% {\n -webkit-transform: translate3d(-10%, 0, 0) rotate3d(0, 0, 1, -2deg);\n transform: translate3d(-10%, 0, 0) rotate3d(0, 0, 1, -2deg);\n }\n\n 75% {\n -webkit-transform: translate3d(5%, 0, 0) rotate3d(0, 0, 1, 1deg);\n transform: translate3d(5%, 0, 0) rotate3d(0, 0, 1, 1deg);\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes wobble-ltr {\n from {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n 15% {\n -webkit-transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);\n transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);\n }\n\n 30% {\n -webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);\n transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);\n }\n\n 45% {\n -webkit-transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);\n transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);\n }\n\n 60% {\n -webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);\n transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);\n }\n\n 75% {\n -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);\n transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes wobble-rtl {\n from {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n 15% {\n -webkit-transform: translate3d(25%, 0, 0) rotate3d(0, 0, 1, 5deg);\n transform: translate3d(25%, 0, 0) rotate3d(0, 0, 1, 5deg);\n }\n\n 30% {\n -webkit-transform: translate3d(-20%, 0, 0) rotate3d(0, 0, 1, -3deg);\n transform: translate3d(-20%, 0, 0) rotate3d(0, 0, 1, -3deg);\n }\n\n 45% {\n -webkit-transform: translate3d(15%, 0, 0) rotate3d(0, 0, 1, 3deg);\n transform: translate3d(15%, 0, 0) rotate3d(0, 0, 1, 3deg);\n }\n\n 60% {\n -webkit-transform: translate3d(-10%, 0, 0) rotate3d(0, 0, 1, -2deg);\n transform: translate3d(-10%, 0, 0) rotate3d(0, 0, 1, -2deg);\n }\n\n 75% {\n -webkit-transform: translate3d(5%, 0, 0) rotate3d(0, 0, 1, 1deg);\n transform: translate3d(5%, 0, 0) rotate3d(0, 0, 1, 1deg);\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n[dir=ltr] .animate__wobble {\n -webkit-animation-name: wobble-ltr ;\n animation-name: wobble-ltr ;\n}\n[dir=rtl] .animate__wobble {\n -webkit-animation-name: wobble-rtl ;\n animation-name: wobble-rtl ;\n}\n@-webkit-keyframes jello-ltr {\n from,\n 11.1%,\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n 22.2% {\n -webkit-transform: skewX(-12.5deg) skewY(-12.5deg);\n transform: skewX(-12.5deg) skewY(-12.5deg);\n }\n\n 33.3% {\n -webkit-transform: skewX(6.25deg) skewY(6.25deg);\n transform: skewX(6.25deg) skewY(6.25deg);\n }\n\n 44.4% {\n -webkit-transform: skewX(-3.125deg) skewY(-3.125deg);\n transform: skewX(-3.125deg) skewY(-3.125deg);\n }\n\n 55.5% {\n -webkit-transform: skewX(1.5625deg) skewY(1.5625deg);\n transform: skewX(1.5625deg) skewY(1.5625deg);\n }\n\n 66.6% {\n -webkit-transform: skewX(-0.78125deg) skewY(-0.78125deg);\n transform: skewX(-0.78125deg) skewY(-0.78125deg);\n }\n\n 77.7% {\n -webkit-transform: skewX(0.390625deg) skewY(0.390625deg);\n transform: skewX(0.390625deg) skewY(0.390625deg);\n }\n\n 88.8% {\n -webkit-transform: skewX(-0.1953125deg) skewY(-0.1953125deg);\n transform: skewX(-0.1953125deg) skewY(-0.1953125deg);\n }\n}\n@-webkit-keyframes jello-rtl {\n from,\n 11.1%,\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n 22.2% {\n -webkit-transform: skewX(12.5deg) skewY(12.5deg);\n transform: skewX(12.5deg) skewY(12.5deg);\n }\n\n 33.3% {\n -webkit-transform: skewX(-6.25deg) skewY(-6.25deg);\n transform: skewX(-6.25deg) skewY(-6.25deg);\n }\n\n 44.4% {\n -webkit-transform: skewX(3.125deg) skewY(3.125deg);\n transform: skewX(3.125deg) skewY(3.125deg);\n }\n\n 55.5% {\n -webkit-transform: skewX(-1.5625deg) skewY(-1.5625deg);\n transform: skewX(-1.5625deg) skewY(-1.5625deg);\n }\n\n 66.6% {\n -webkit-transform: skewX(0.78125deg) skewY(0.78125deg);\n transform: skewX(0.78125deg) skewY(0.78125deg);\n }\n\n 77.7% {\n -webkit-transform: skewX(-0.390625deg) skewY(-0.390625deg);\n transform: skewX(-0.390625deg) skewY(-0.390625deg);\n }\n\n 88.8% {\n -webkit-transform: skewX(0.1953125deg) skewY(0.1953125deg);\n transform: skewX(0.1953125deg) skewY(0.1953125deg);\n }\n}\n@keyframes jello-ltr {\n from,\n 11.1%,\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n 22.2% {\n -webkit-transform: skewX(-12.5deg) skewY(-12.5deg);\n transform: skewX(-12.5deg) skewY(-12.5deg);\n }\n\n 33.3% {\n -webkit-transform: skewX(6.25deg) skewY(6.25deg);\n transform: skewX(6.25deg) skewY(6.25deg);\n }\n\n 44.4% {\n -webkit-transform: skewX(-3.125deg) skewY(-3.125deg);\n transform: skewX(-3.125deg) skewY(-3.125deg);\n }\n\n 55.5% {\n -webkit-transform: skewX(1.5625deg) skewY(1.5625deg);\n transform: skewX(1.5625deg) skewY(1.5625deg);\n }\n\n 66.6% {\n -webkit-transform: skewX(-0.78125deg) skewY(-0.78125deg);\n transform: skewX(-0.78125deg) skewY(-0.78125deg);\n }\n\n 77.7% {\n -webkit-transform: skewX(0.390625deg) skewY(0.390625deg);\n transform: skewX(0.390625deg) skewY(0.390625deg);\n }\n\n 88.8% {\n -webkit-transform: skewX(-0.1953125deg) skewY(-0.1953125deg);\n transform: skewX(-0.1953125deg) skewY(-0.1953125deg);\n }\n}\n@keyframes jello-rtl {\n from,\n 11.1%,\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n 22.2% {\n -webkit-transform: skewX(12.5deg) skewY(12.5deg);\n transform: skewX(12.5deg) skewY(12.5deg);\n }\n\n 33.3% {\n -webkit-transform: skewX(-6.25deg) skewY(-6.25deg);\n transform: skewX(-6.25deg) skewY(-6.25deg);\n }\n\n 44.4% {\n -webkit-transform: skewX(3.125deg) skewY(3.125deg);\n transform: skewX(3.125deg) skewY(3.125deg);\n }\n\n 55.5% {\n -webkit-transform: skewX(-1.5625deg) skewY(-1.5625deg);\n transform: skewX(-1.5625deg) skewY(-1.5625deg);\n }\n\n 66.6% {\n -webkit-transform: skewX(0.78125deg) skewY(0.78125deg);\n transform: skewX(0.78125deg) skewY(0.78125deg);\n }\n\n 77.7% {\n -webkit-transform: skewX(-0.390625deg) skewY(-0.390625deg);\n transform: skewX(-0.390625deg) skewY(-0.390625deg);\n }\n\n 88.8% {\n -webkit-transform: skewX(0.1953125deg) skewY(0.1953125deg);\n transform: skewX(0.1953125deg) skewY(0.1953125deg);\n }\n}\n.animate__jello {\n -webkit-transform-origin: center;\n}\n[dir] .animate__jello {\n -webkit-transform-origin: center;\n transform-origin: center;\n}\n[dir=ltr] .animate__jello {\n -webkit-animation-name: jello-ltr ;\n animation-name: jello-ltr ;\n}\n[dir=rtl] .animate__jello {\n -webkit-animation-name: jello-rtl ;\n animation-name: jello-rtl ;\n}\n@-webkit-keyframes heartBeat {\n 0% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n\n 14% {\n -webkit-transform: scale(1.3);\n transform: scale(1.3);\n }\n\n 28% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n\n 42% {\n -webkit-transform: scale(1.3);\n transform: scale(1.3);\n }\n\n 70% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n}\n@keyframes heartBeat {\n 0% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n\n 14% {\n -webkit-transform: scale(1.3);\n transform: scale(1.3);\n }\n\n 28% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n\n 42% {\n -webkit-transform: scale(1.3);\n transform: scale(1.3);\n }\n\n 70% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n}\n[dir=ltr] .animate__heartBeat {\n -webkit-animation-name: heartBeat;\n animation-name: heartBeat;\n -webkit-animation-duration: calc(1s * 1.3);\n animation-duration: calc(1s * 1.3);\n -webkit-animation-duration: calc(var(--animate-duration) * 1.3);\n animation-duration: calc(var(--animate-duration) * 1.3);\n -webkit-animation-timing-function: ease-in-out;\n animation-timing-function: ease-in-out;\n}\n[dir=rtl] .animate__heartBeat {\n -webkit-animation-name: heartBeat;\n animation-name: heartBeat;\n -webkit-animation-duration: calc(1s * 1.3);\n animation-duration: calc(1s * 1.3);\n -webkit-animation-duration: calc(var(--animate-duration) * 1.3);\n animation-duration: calc(var(--animate-duration) * 1.3);\n -webkit-animation-timing-function: ease-in-out;\n animation-timing-function: ease-in-out;\n}\n/* Back entrances */\n@-webkit-keyframes backInDown {\n 0% {\n -webkit-transform: translateY(-1200px) scale(0.7);\n transform: translateY(-1200px) scale(0.7);\n opacity: 0.7;\n }\n\n 80% {\n -webkit-transform: translateY(0px) scale(0.7);\n transform: translateY(0px) scale(0.7);\n opacity: 0.7;\n }\n\n 100% {\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1;\n }\n}\n@keyframes backInDown {\n 0% {\n -webkit-transform: translateY(-1200px) scale(0.7);\n transform: translateY(-1200px) scale(0.7);\n opacity: 0.7;\n }\n\n 80% {\n -webkit-transform: translateY(0px) scale(0.7);\n transform: translateY(0px) scale(0.7);\n opacity: 0.7;\n }\n\n 100% {\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1;\n }\n}\n[dir=ltr] .animate__backInDown {\n -webkit-animation-name: backInDown;\n animation-name: backInDown;\n}\n[dir=rtl] .animate__backInDown {\n -webkit-animation-name: backInDown;\n animation-name: backInDown;\n}\n@-webkit-keyframes backInLeft-ltr {\n 0% {\n -webkit-transform: translateX(-2000px) scale(0.7);\n transform: translateX(-2000px) scale(0.7);\n opacity: 0.7;\n }\n\n 80% {\n -webkit-transform: translateX(0px) scale(0.7);\n transform: translateX(0px) scale(0.7);\n opacity: 0.7;\n }\n\n 100% {\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1;\n }\n}\n@-webkit-keyframes backInLeft-rtl {\n 0% {\n -webkit-transform: translateX(2000px) scale(0.7);\n transform: translateX(2000px) scale(0.7);\n opacity: 0.7;\n }\n\n 80% {\n -webkit-transform: translateX(0px) scale(0.7);\n transform: translateX(0px) scale(0.7);\n opacity: 0.7;\n }\n\n 100% {\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1;\n }\n}\n@keyframes backInLeft-ltr {\n 0% {\n -webkit-transform: translateX(-2000px) scale(0.7);\n transform: translateX(-2000px) scale(0.7);\n opacity: 0.7;\n }\n\n 80% {\n -webkit-transform: translateX(0px) scale(0.7);\n transform: translateX(0px) scale(0.7);\n opacity: 0.7;\n }\n\n 100% {\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1;\n }\n}\n@keyframes backInLeft-rtl {\n 0% {\n -webkit-transform: translateX(2000px) scale(0.7);\n transform: translateX(2000px) scale(0.7);\n opacity: 0.7;\n }\n\n 80% {\n -webkit-transform: translateX(0px) scale(0.7);\n transform: translateX(0px) scale(0.7);\n opacity: 0.7;\n }\n\n 100% {\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1;\n }\n}\n[dir=ltr] .animate__backInLeft {\n -webkit-animation-name: backInLeft-ltr ;\n animation-name: backInLeft-ltr ;\n}\n[dir=rtl] .animate__backInLeft {\n -webkit-animation-name: backInLeft-rtl ;\n animation-name: backInLeft-rtl ;\n}\n@-webkit-keyframes backInRight-ltr {\n 0% {\n -webkit-transform: translateX(2000px) scale(0.7);\n transform: translateX(2000px) scale(0.7);\n opacity: 0.7;\n }\n\n 80% {\n -webkit-transform: translateX(0px) scale(0.7);\n transform: translateX(0px) scale(0.7);\n opacity: 0.7;\n }\n\n 100% {\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1;\n }\n}\n@-webkit-keyframes backInRight-rtl {\n 0% {\n -webkit-transform: translateX(-2000px) scale(0.7);\n transform: translateX(-2000px) scale(0.7);\n opacity: 0.7;\n }\n\n 80% {\n -webkit-transform: translateX(0px) scale(0.7);\n transform: translateX(0px) scale(0.7);\n opacity: 0.7;\n }\n\n 100% {\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1;\n }\n}\n@keyframes backInRight-ltr {\n 0% {\n -webkit-transform: translateX(2000px) scale(0.7);\n transform: translateX(2000px) scale(0.7);\n opacity: 0.7;\n }\n\n 80% {\n -webkit-transform: translateX(0px) scale(0.7);\n transform: translateX(0px) scale(0.7);\n opacity: 0.7;\n }\n\n 100% {\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1;\n }\n}\n@keyframes backInRight-rtl {\n 0% {\n -webkit-transform: translateX(-2000px) scale(0.7);\n transform: translateX(-2000px) scale(0.7);\n opacity: 0.7;\n }\n\n 80% {\n -webkit-transform: translateX(0px) scale(0.7);\n transform: translateX(0px) scale(0.7);\n opacity: 0.7;\n }\n\n 100% {\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1;\n }\n}\n[dir=ltr] .animate__backInRight {\n -webkit-animation-name: backInRight-ltr ;\n animation-name: backInRight-ltr ;\n}\n[dir=rtl] .animate__backInRight {\n -webkit-animation-name: backInRight-rtl ;\n animation-name: backInRight-rtl ;\n}\n@-webkit-keyframes backInUp {\n 0% {\n -webkit-transform: translateY(1200px) scale(0.7);\n transform: translateY(1200px) scale(0.7);\n opacity: 0.7;\n }\n\n 80% {\n -webkit-transform: translateY(0px) scale(0.7);\n transform: translateY(0px) scale(0.7);\n opacity: 0.7;\n }\n\n 100% {\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1;\n }\n}\n@keyframes backInUp {\n 0% {\n -webkit-transform: translateY(1200px) scale(0.7);\n transform: translateY(1200px) scale(0.7);\n opacity: 0.7;\n }\n\n 80% {\n -webkit-transform: translateY(0px) scale(0.7);\n transform: translateY(0px) scale(0.7);\n opacity: 0.7;\n }\n\n 100% {\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1;\n }\n}\n[dir=ltr] .animate__backInUp {\n -webkit-animation-name: backInUp;\n animation-name: backInUp;\n}\n[dir=rtl] .animate__backInUp {\n -webkit-animation-name: backInUp;\n animation-name: backInUp;\n}\n/* Back exits */\n@-webkit-keyframes backOutDown {\n 0% {\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1;\n }\n\n 20% {\n -webkit-transform: translateY(0px) scale(0.7);\n transform: translateY(0px) scale(0.7);\n opacity: 0.7;\n }\n\n 100% {\n -webkit-transform: translateY(700px) scale(0.7);\n transform: translateY(700px) scale(0.7);\n opacity: 0.7;\n }\n}\n@keyframes backOutDown {\n 0% {\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1;\n }\n\n 20% {\n -webkit-transform: translateY(0px) scale(0.7);\n transform: translateY(0px) scale(0.7);\n opacity: 0.7;\n }\n\n 100% {\n -webkit-transform: translateY(700px) scale(0.7);\n transform: translateY(700px) scale(0.7);\n opacity: 0.7;\n }\n}\n[dir=ltr] .animate__backOutDown {\n -webkit-animation-name: backOutDown;\n animation-name: backOutDown;\n}\n[dir=rtl] .animate__backOutDown {\n -webkit-animation-name: backOutDown;\n animation-name: backOutDown;\n}\n@-webkit-keyframes backOutLeft-ltr {\n 0% {\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1;\n }\n\n 20% {\n -webkit-transform: translateX(0px) scale(0.7);\n transform: translateX(0px) scale(0.7);\n opacity: 0.7;\n }\n\n 100% {\n -webkit-transform: translateX(-2000px) scale(0.7);\n transform: translateX(-2000px) scale(0.7);\n opacity: 0.7;\n }\n}\n@-webkit-keyframes backOutLeft-rtl {\n 0% {\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1;\n }\n\n 20% {\n -webkit-transform: translateX(0px) scale(0.7);\n transform: translateX(0px) scale(0.7);\n opacity: 0.7;\n }\n\n 100% {\n -webkit-transform: translateX(2000px) scale(0.7);\n transform: translateX(2000px) scale(0.7);\n opacity: 0.7;\n }\n}\n@keyframes backOutLeft-ltr {\n 0% {\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1;\n }\n\n 20% {\n -webkit-transform: translateX(0px) scale(0.7);\n transform: translateX(0px) scale(0.7);\n opacity: 0.7;\n }\n\n 100% {\n -webkit-transform: translateX(-2000px) scale(0.7);\n transform: translateX(-2000px) scale(0.7);\n opacity: 0.7;\n }\n}\n@keyframes backOutLeft-rtl {\n 0% {\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1;\n }\n\n 20% {\n -webkit-transform: translateX(0px) scale(0.7);\n transform: translateX(0px) scale(0.7);\n opacity: 0.7;\n }\n\n 100% {\n -webkit-transform: translateX(2000px) scale(0.7);\n transform: translateX(2000px) scale(0.7);\n opacity: 0.7;\n }\n}\n[dir=ltr] .animate__backOutLeft {\n -webkit-animation-name: backOutLeft-ltr ;\n animation-name: backOutLeft-ltr ;\n}\n[dir=rtl] .animate__backOutLeft {\n -webkit-animation-name: backOutLeft-rtl ;\n animation-name: backOutLeft-rtl ;\n}\n@-webkit-keyframes backOutRight-ltr {\n 0% {\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1;\n }\n\n 20% {\n -webkit-transform: translateX(0px) scale(0.7);\n transform: translateX(0px) scale(0.7);\n opacity: 0.7;\n }\n\n 100% {\n -webkit-transform: translateX(2000px) scale(0.7);\n transform: translateX(2000px) scale(0.7);\n opacity: 0.7;\n }\n}\n@-webkit-keyframes backOutRight-rtl {\n 0% {\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1;\n }\n\n 20% {\n -webkit-transform: translateX(0px) scale(0.7);\n transform: translateX(0px) scale(0.7);\n opacity: 0.7;\n }\n\n 100% {\n -webkit-transform: translateX(-2000px) scale(0.7);\n transform: translateX(-2000px) scale(0.7);\n opacity: 0.7;\n }\n}\n@keyframes backOutRight-ltr {\n 0% {\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1;\n }\n\n 20% {\n -webkit-transform: translateX(0px) scale(0.7);\n transform: translateX(0px) scale(0.7);\n opacity: 0.7;\n }\n\n 100% {\n -webkit-transform: translateX(2000px) scale(0.7);\n transform: translateX(2000px) scale(0.7);\n opacity: 0.7;\n }\n}\n@keyframes backOutRight-rtl {\n 0% {\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1;\n }\n\n 20% {\n -webkit-transform: translateX(0px) scale(0.7);\n transform: translateX(0px) scale(0.7);\n opacity: 0.7;\n }\n\n 100% {\n -webkit-transform: translateX(-2000px) scale(0.7);\n transform: translateX(-2000px) scale(0.7);\n opacity: 0.7;\n }\n}\n[dir=ltr] .animate__backOutRight {\n -webkit-animation-name: backOutRight-ltr ;\n animation-name: backOutRight-ltr ;\n}\n[dir=rtl] .animate__backOutRight {\n -webkit-animation-name: backOutRight-rtl ;\n animation-name: backOutRight-rtl ;\n}\n@-webkit-keyframes backOutUp {\n 0% {\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1;\n }\n\n 20% {\n -webkit-transform: translateY(0px) scale(0.7);\n transform: translateY(0px) scale(0.7);\n opacity: 0.7;\n }\n\n 100% {\n -webkit-transform: translateY(-700px) scale(0.7);\n transform: translateY(-700px) scale(0.7);\n opacity: 0.7;\n }\n}\n@keyframes backOutUp {\n 0% {\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1;\n }\n\n 20% {\n -webkit-transform: translateY(0px) scale(0.7);\n transform: translateY(0px) scale(0.7);\n opacity: 0.7;\n }\n\n 100% {\n -webkit-transform: translateY(-700px) scale(0.7);\n transform: translateY(-700px) scale(0.7);\n opacity: 0.7;\n }\n}\n[dir=ltr] .animate__backOutUp {\n -webkit-animation-name: backOutUp;\n animation-name: backOutUp;\n}\n[dir=rtl] .animate__backOutUp {\n -webkit-animation-name: backOutUp;\n animation-name: backOutUp;\n}\n/* Bouncing entrances */\n@-webkit-keyframes bounceIn {\n from,\n 20%,\n 40%,\n 60%,\n 80%,\n to {\n -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n\n 0% {\n opacity: 0;\n -webkit-transform: scale3d(0.3, 0.3, 0.3);\n transform: scale3d(0.3, 0.3, 0.3);\n }\n\n 20% {\n -webkit-transform: scale3d(1.1, 1.1, 1.1);\n transform: scale3d(1.1, 1.1, 1.1);\n }\n\n 40% {\n -webkit-transform: scale3d(0.9, 0.9, 0.9);\n transform: scale3d(0.9, 0.9, 0.9);\n }\n\n 60% {\n opacity: 1;\n -webkit-transform: scale3d(1.03, 1.03, 1.03);\n transform: scale3d(1.03, 1.03, 1.03);\n }\n\n 80% {\n -webkit-transform: scale3d(0.97, 0.97, 0.97);\n transform: scale3d(0.97, 0.97, 0.97);\n }\n\n to {\n opacity: 1;\n -webkit-transform: scale3d(1, 1, 1);\n transform: scale3d(1, 1, 1);\n }\n}\n@keyframes bounceIn {\n from,\n 20%,\n 40%,\n 60%,\n 80%,\n to {\n -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n\n 0% {\n opacity: 0;\n -webkit-transform: scale3d(0.3, 0.3, 0.3);\n transform: scale3d(0.3, 0.3, 0.3);\n }\n\n 20% {\n -webkit-transform: scale3d(1.1, 1.1, 1.1);\n transform: scale3d(1.1, 1.1, 1.1);\n }\n\n 40% {\n -webkit-transform: scale3d(0.9, 0.9, 0.9);\n transform: scale3d(0.9, 0.9, 0.9);\n }\n\n 60% {\n opacity: 1;\n -webkit-transform: scale3d(1.03, 1.03, 1.03);\n transform: scale3d(1.03, 1.03, 1.03);\n }\n\n 80% {\n -webkit-transform: scale3d(0.97, 0.97, 0.97);\n transform: scale3d(0.97, 0.97, 0.97);\n }\n\n to {\n opacity: 1;\n -webkit-transform: scale3d(1, 1, 1);\n transform: scale3d(1, 1, 1);\n }\n}\n[dir=ltr] .animate__bounceIn {\n -webkit-animation-duration: calc(1s * 0.75);\n animation-duration: calc(1s * 0.75);\n -webkit-animation-duration: calc(var(--animate-duration) * 0.75);\n animation-duration: calc(var(--animate-duration) * 0.75);\n -webkit-animation-name: bounceIn;\n animation-name: bounceIn;\n}\n[dir=rtl] .animate__bounceIn {\n -webkit-animation-duration: calc(1s * 0.75);\n animation-duration: calc(1s * 0.75);\n -webkit-animation-duration: calc(var(--animate-duration) * 0.75);\n animation-duration: calc(var(--animate-duration) * 0.75);\n -webkit-animation-name: bounceIn;\n animation-name: bounceIn;\n}\n@-webkit-keyframes bounceInDown {\n from,\n 60%,\n 75%,\n 90%,\n to {\n -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n\n 0% {\n opacity: 0;\n -webkit-transform: translate3d(0, -3000px, 0) scaleY(3);\n transform: translate3d(0, -3000px, 0) scaleY(3);\n }\n\n 60% {\n opacity: 1;\n -webkit-transform: translate3d(0, 25px, 0) scaleY(0.9);\n transform: translate3d(0, 25px, 0) scaleY(0.9);\n }\n\n 75% {\n -webkit-transform: translate3d(0, -10px, 0) scaleY(0.95);\n transform: translate3d(0, -10px, 0) scaleY(0.95);\n }\n\n 90% {\n -webkit-transform: translate3d(0, 5px, 0) scaleY(0.985);\n transform: translate3d(0, 5px, 0) scaleY(0.985);\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes bounceInDown {\n from,\n 60%,\n 75%,\n 90%,\n to {\n -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n\n 0% {\n opacity: 0;\n -webkit-transform: translate3d(0, -3000px, 0) scaleY(3);\n transform: translate3d(0, -3000px, 0) scaleY(3);\n }\n\n 60% {\n opacity: 1;\n -webkit-transform: translate3d(0, 25px, 0) scaleY(0.9);\n transform: translate3d(0, 25px, 0) scaleY(0.9);\n }\n\n 75% {\n -webkit-transform: translate3d(0, -10px, 0) scaleY(0.95);\n transform: translate3d(0, -10px, 0) scaleY(0.95);\n }\n\n 90% {\n -webkit-transform: translate3d(0, 5px, 0) scaleY(0.985);\n transform: translate3d(0, 5px, 0) scaleY(0.985);\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n[dir=ltr] .animate__bounceInDown {\n -webkit-animation-name: bounceInDown;\n animation-name: bounceInDown;\n}\n[dir=rtl] .animate__bounceInDown {\n -webkit-animation-name: bounceInDown;\n animation-name: bounceInDown;\n}\n@-webkit-keyframes bounceInLeft-ltr {\n from,\n 60%,\n 75%,\n 90%,\n to {\n -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n\n 0% {\n opacity: 0;\n -webkit-transform: translate3d(-3000px, 0, 0) scaleX(3);\n transform: translate3d(-3000px, 0, 0) scaleX(3);\n }\n\n 60% {\n opacity: 1;\n -webkit-transform: translate3d(25px, 0, 0) scaleX(1);\n transform: translate3d(25px, 0, 0) scaleX(1);\n }\n\n 75% {\n -webkit-transform: translate3d(-10px, 0, 0) scaleX(0.98);\n transform: translate3d(-10px, 0, 0) scaleX(0.98);\n }\n\n 90% {\n -webkit-transform: translate3d(5px, 0, 0) scaleX(0.995);\n transform: translate3d(5px, 0, 0) scaleX(0.995);\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@-webkit-keyframes bounceInLeft-rtl {\n from,\n 60%,\n 75%,\n 90%,\n to {\n -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n\n 0% {\n opacity: 0;\n -webkit-transform: translate3d(3000px, 0, 0) scaleX(3);\n transform: translate3d(3000px, 0, 0) scaleX(3);\n }\n\n 60% {\n opacity: 1;\n -webkit-transform: translate3d(-25px, 0, 0) scaleX(1);\n transform: translate3d(-25px, 0, 0) scaleX(1);\n }\n\n 75% {\n -webkit-transform: translate3d(10px, 0, 0) scaleX(0.98);\n transform: translate3d(10px, 0, 0) scaleX(0.98);\n }\n\n 90% {\n -webkit-transform: translate3d(-5px, 0, 0) scaleX(0.995);\n transform: translate3d(-5px, 0, 0) scaleX(0.995);\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes bounceInLeft-ltr {\n from,\n 60%,\n 75%,\n 90%,\n to {\n -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n\n 0% {\n opacity: 0;\n -webkit-transform: translate3d(-3000px, 0, 0) scaleX(3);\n transform: translate3d(-3000px, 0, 0) scaleX(3);\n }\n\n 60% {\n opacity: 1;\n -webkit-transform: translate3d(25px, 0, 0) scaleX(1);\n transform: translate3d(25px, 0, 0) scaleX(1);\n }\n\n 75% {\n -webkit-transform: translate3d(-10px, 0, 0) scaleX(0.98);\n transform: translate3d(-10px, 0, 0) scaleX(0.98);\n }\n\n 90% {\n -webkit-transform: translate3d(5px, 0, 0) scaleX(0.995);\n transform: translate3d(5px, 0, 0) scaleX(0.995);\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes bounceInLeft-rtl {\n from,\n 60%,\n 75%,\n 90%,\n to {\n -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n\n 0% {\n opacity: 0;\n -webkit-transform: translate3d(3000px, 0, 0) scaleX(3);\n transform: translate3d(3000px, 0, 0) scaleX(3);\n }\n\n 60% {\n opacity: 1;\n -webkit-transform: translate3d(-25px, 0, 0) scaleX(1);\n transform: translate3d(-25px, 0, 0) scaleX(1);\n }\n\n 75% {\n -webkit-transform: translate3d(10px, 0, 0) scaleX(0.98);\n transform: translate3d(10px, 0, 0) scaleX(0.98);\n }\n\n 90% {\n -webkit-transform: translate3d(-5px, 0, 0) scaleX(0.995);\n transform: translate3d(-5px, 0, 0) scaleX(0.995);\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n[dir=ltr] .animate__bounceInLeft {\n -webkit-animation-name: bounceInLeft-ltr ;\n animation-name: bounceInLeft-ltr ;\n}\n[dir=rtl] .animate__bounceInLeft {\n -webkit-animation-name: bounceInLeft-rtl ;\n animation-name: bounceInLeft-rtl ;\n}\n@-webkit-keyframes bounceInRight-ltr {\n from,\n 60%,\n 75%,\n 90%,\n to {\n -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n\n from {\n opacity: 0;\n -webkit-transform: translate3d(3000px, 0, 0) scaleX(3);\n transform: translate3d(3000px, 0, 0) scaleX(3);\n }\n\n 60% {\n opacity: 1;\n -webkit-transform: translate3d(-25px, 0, 0) scaleX(1);\n transform: translate3d(-25px, 0, 0) scaleX(1);\n }\n\n 75% {\n -webkit-transform: translate3d(10px, 0, 0) scaleX(0.98);\n transform: translate3d(10px, 0, 0) scaleX(0.98);\n }\n\n 90% {\n -webkit-transform: translate3d(-5px, 0, 0) scaleX(0.995);\n transform: translate3d(-5px, 0, 0) scaleX(0.995);\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@-webkit-keyframes bounceInRight-rtl {\n from,\n 60%,\n 75%,\n 90%,\n to {\n -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n\n from {\n opacity: 0;\n -webkit-transform: translate3d(-3000px, 0, 0) scaleX(3);\n transform: translate3d(-3000px, 0, 0) scaleX(3);\n }\n\n 60% {\n opacity: 1;\n -webkit-transform: translate3d(25px, 0, 0) scaleX(1);\n transform: translate3d(25px, 0, 0) scaleX(1);\n }\n\n 75% {\n -webkit-transform: translate3d(-10px, 0, 0) scaleX(0.98);\n transform: translate3d(-10px, 0, 0) scaleX(0.98);\n }\n\n 90% {\n -webkit-transform: translate3d(5px, 0, 0) scaleX(0.995);\n transform: translate3d(5px, 0, 0) scaleX(0.995);\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes bounceInRight-ltr {\n from,\n 60%,\n 75%,\n 90%,\n to {\n -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n\n from {\n opacity: 0;\n -webkit-transform: translate3d(3000px, 0, 0) scaleX(3);\n transform: translate3d(3000px, 0, 0) scaleX(3);\n }\n\n 60% {\n opacity: 1;\n -webkit-transform: translate3d(-25px, 0, 0) scaleX(1);\n transform: translate3d(-25px, 0, 0) scaleX(1);\n }\n\n 75% {\n -webkit-transform: translate3d(10px, 0, 0) scaleX(0.98);\n transform: translate3d(10px, 0, 0) scaleX(0.98);\n }\n\n 90% {\n -webkit-transform: translate3d(-5px, 0, 0) scaleX(0.995);\n transform: translate3d(-5px, 0, 0) scaleX(0.995);\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes bounceInRight-rtl {\n from,\n 60%,\n 75%,\n 90%,\n to {\n -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n\n from {\n opacity: 0;\n -webkit-transform: translate3d(-3000px, 0, 0) scaleX(3);\n transform: translate3d(-3000px, 0, 0) scaleX(3);\n }\n\n 60% {\n opacity: 1;\n -webkit-transform: translate3d(25px, 0, 0) scaleX(1);\n transform: translate3d(25px, 0, 0) scaleX(1);\n }\n\n 75% {\n -webkit-transform: translate3d(-10px, 0, 0) scaleX(0.98);\n transform: translate3d(-10px, 0, 0) scaleX(0.98);\n }\n\n 90% {\n -webkit-transform: translate3d(5px, 0, 0) scaleX(0.995);\n transform: translate3d(5px, 0, 0) scaleX(0.995);\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n[dir=ltr] .animate__bounceInRight {\n -webkit-animation-name: bounceInRight-ltr ;\n animation-name: bounceInRight-ltr ;\n}\n[dir=rtl] .animate__bounceInRight {\n -webkit-animation-name: bounceInRight-rtl ;\n animation-name: bounceInRight-rtl ;\n}\n@-webkit-keyframes bounceInUp {\n from,\n 60%,\n 75%,\n 90%,\n to {\n -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n\n from {\n opacity: 0;\n -webkit-transform: translate3d(0, 3000px, 0) scaleY(5);\n transform: translate3d(0, 3000px, 0) scaleY(5);\n }\n\n 60% {\n opacity: 1;\n -webkit-transform: translate3d(0, -20px, 0) scaleY(0.9);\n transform: translate3d(0, -20px, 0) scaleY(0.9);\n }\n\n 75% {\n -webkit-transform: translate3d(0, 10px, 0) scaleY(0.95);\n transform: translate3d(0, 10px, 0) scaleY(0.95);\n }\n\n 90% {\n -webkit-transform: translate3d(0, -5px, 0) scaleY(0.985);\n transform: translate3d(0, -5px, 0) scaleY(0.985);\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes bounceInUp {\n from,\n 60%,\n 75%,\n 90%,\n to {\n -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n\n from {\n opacity: 0;\n -webkit-transform: translate3d(0, 3000px, 0) scaleY(5);\n transform: translate3d(0, 3000px, 0) scaleY(5);\n }\n\n 60% {\n opacity: 1;\n -webkit-transform: translate3d(0, -20px, 0) scaleY(0.9);\n transform: translate3d(0, -20px, 0) scaleY(0.9);\n }\n\n 75% {\n -webkit-transform: translate3d(0, 10px, 0) scaleY(0.95);\n transform: translate3d(0, 10px, 0) scaleY(0.95);\n }\n\n 90% {\n -webkit-transform: translate3d(0, -5px, 0) scaleY(0.985);\n transform: translate3d(0, -5px, 0) scaleY(0.985);\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n[dir=ltr] .animate__bounceInUp {\n -webkit-animation-name: bounceInUp;\n animation-name: bounceInUp;\n}\n[dir=rtl] .animate__bounceInUp {\n -webkit-animation-name: bounceInUp;\n animation-name: bounceInUp;\n}\n/* Bouncing exits */\n@-webkit-keyframes bounceOut {\n 20% {\n -webkit-transform: scale3d(0.9, 0.9, 0.9);\n transform: scale3d(0.9, 0.9, 0.9);\n }\n\n 50%,\n 55% {\n opacity: 1;\n -webkit-transform: scale3d(1.1, 1.1, 1.1);\n transform: scale3d(1.1, 1.1, 1.1);\n }\n\n to {\n opacity: 0;\n -webkit-transform: scale3d(0.3, 0.3, 0.3);\n transform: scale3d(0.3, 0.3, 0.3);\n }\n}\n@keyframes bounceOut {\n 20% {\n -webkit-transform: scale3d(0.9, 0.9, 0.9);\n transform: scale3d(0.9, 0.9, 0.9);\n }\n\n 50%,\n 55% {\n opacity: 1;\n -webkit-transform: scale3d(1.1, 1.1, 1.1);\n transform: scale3d(1.1, 1.1, 1.1);\n }\n\n to {\n opacity: 0;\n -webkit-transform: scale3d(0.3, 0.3, 0.3);\n transform: scale3d(0.3, 0.3, 0.3);\n }\n}\n[dir=ltr] .animate__bounceOut {\n -webkit-animation-duration: calc(1s * 0.75);\n animation-duration: calc(1s * 0.75);\n -webkit-animation-duration: calc(var(--animate-duration) * 0.75);\n animation-duration: calc(var(--animate-duration) * 0.75);\n -webkit-animation-name: bounceOut;\n animation-name: bounceOut;\n}\n[dir=rtl] .animate__bounceOut {\n -webkit-animation-duration: calc(1s * 0.75);\n animation-duration: calc(1s * 0.75);\n -webkit-animation-duration: calc(var(--animate-duration) * 0.75);\n animation-duration: calc(var(--animate-duration) * 0.75);\n -webkit-animation-name: bounceOut;\n animation-name: bounceOut;\n}\n@-webkit-keyframes bounceOutDown {\n 20% {\n -webkit-transform: translate3d(0, 10px, 0) scaleY(0.985);\n transform: translate3d(0, 10px, 0) scaleY(0.985);\n }\n\n 40%,\n 45% {\n opacity: 1;\n -webkit-transform: translate3d(0, -20px, 0) scaleY(0.9);\n transform: translate3d(0, -20px, 0) scaleY(0.9);\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(0, 2000px, 0) scaleY(3);\n transform: translate3d(0, 2000px, 0) scaleY(3);\n }\n}\n@keyframes bounceOutDown {\n 20% {\n -webkit-transform: translate3d(0, 10px, 0) scaleY(0.985);\n transform: translate3d(0, 10px, 0) scaleY(0.985);\n }\n\n 40%,\n 45% {\n opacity: 1;\n -webkit-transform: translate3d(0, -20px, 0) scaleY(0.9);\n transform: translate3d(0, -20px, 0) scaleY(0.9);\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(0, 2000px, 0) scaleY(3);\n transform: translate3d(0, 2000px, 0) scaleY(3);\n }\n}\n[dir=ltr] .animate__bounceOutDown {\n -webkit-animation-name: bounceOutDown;\n animation-name: bounceOutDown;\n}\n[dir=rtl] .animate__bounceOutDown {\n -webkit-animation-name: bounceOutDown;\n animation-name: bounceOutDown;\n}\n@-webkit-keyframes bounceOutLeft-ltr {\n 20% {\n opacity: 1;\n -webkit-transform: translate3d(20px, 0, 0) scaleX(0.9);\n transform: translate3d(20px, 0, 0) scaleX(0.9);\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(-2000px, 0, 0) scaleX(2);\n transform: translate3d(-2000px, 0, 0) scaleX(2);\n }\n}\n@-webkit-keyframes bounceOutLeft-rtl {\n 20% {\n opacity: 1;\n -webkit-transform: translate3d(-20px, 0, 0) scaleX(0.9);\n transform: translate3d(-20px, 0, 0) scaleX(0.9);\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(2000px, 0, 0) scaleX(2);\n transform: translate3d(2000px, 0, 0) scaleX(2);\n }\n}\n@keyframes bounceOutLeft-ltr {\n 20% {\n opacity: 1;\n -webkit-transform: translate3d(20px, 0, 0) scaleX(0.9);\n transform: translate3d(20px, 0, 0) scaleX(0.9);\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(-2000px, 0, 0) scaleX(2);\n transform: translate3d(-2000px, 0, 0) scaleX(2);\n }\n}\n@keyframes bounceOutLeft-rtl {\n 20% {\n opacity: 1;\n -webkit-transform: translate3d(-20px, 0, 0) scaleX(0.9);\n transform: translate3d(-20px, 0, 0) scaleX(0.9);\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(2000px, 0, 0) scaleX(2);\n transform: translate3d(2000px, 0, 0) scaleX(2);\n }\n}\n[dir=ltr] .animate__bounceOutLeft {\n -webkit-animation-name: bounceOutLeft-ltr ;\n animation-name: bounceOutLeft-ltr ;\n}\n[dir=rtl] .animate__bounceOutLeft {\n -webkit-animation-name: bounceOutLeft-rtl ;\n animation-name: bounceOutLeft-rtl ;\n}\n@-webkit-keyframes bounceOutRight-ltr {\n 20% {\n opacity: 1;\n -webkit-transform: translate3d(-20px, 0, 0) scaleX(0.9);\n transform: translate3d(-20px, 0, 0) scaleX(0.9);\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(2000px, 0, 0) scaleX(2);\n transform: translate3d(2000px, 0, 0) scaleX(2);\n }\n}\n@-webkit-keyframes bounceOutRight-rtl {\n 20% {\n opacity: 1;\n -webkit-transform: translate3d(20px, 0, 0) scaleX(0.9);\n transform: translate3d(20px, 0, 0) scaleX(0.9);\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(-2000px, 0, 0) scaleX(2);\n transform: translate3d(-2000px, 0, 0) scaleX(2);\n }\n}\n@keyframes bounceOutRight-ltr {\n 20% {\n opacity: 1;\n -webkit-transform: translate3d(-20px, 0, 0) scaleX(0.9);\n transform: translate3d(-20px, 0, 0) scaleX(0.9);\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(2000px, 0, 0) scaleX(2);\n transform: translate3d(2000px, 0, 0) scaleX(2);\n }\n}\n@keyframes bounceOutRight-rtl {\n 20% {\n opacity: 1;\n -webkit-transform: translate3d(20px, 0, 0) scaleX(0.9);\n transform: translate3d(20px, 0, 0) scaleX(0.9);\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(-2000px, 0, 0) scaleX(2);\n transform: translate3d(-2000px, 0, 0) scaleX(2);\n }\n}\n[dir=ltr] .animate__bounceOutRight {\n -webkit-animation-name: bounceOutRight-ltr ;\n animation-name: bounceOutRight-ltr ;\n}\n[dir=rtl] .animate__bounceOutRight {\n -webkit-animation-name: bounceOutRight-rtl ;\n animation-name: bounceOutRight-rtl ;\n}\n@-webkit-keyframes bounceOutUp {\n 20% {\n -webkit-transform: translate3d(0, -10px, 0) scaleY(0.985);\n transform: translate3d(0, -10px, 0) scaleY(0.985);\n }\n\n 40%,\n 45% {\n opacity: 1;\n -webkit-transform: translate3d(0, 20px, 0) scaleY(0.9);\n transform: translate3d(0, 20px, 0) scaleY(0.9);\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(0, -2000px, 0) scaleY(3);\n transform: translate3d(0, -2000px, 0) scaleY(3);\n }\n}\n@keyframes bounceOutUp {\n 20% {\n -webkit-transform: translate3d(0, -10px, 0) scaleY(0.985);\n transform: translate3d(0, -10px, 0) scaleY(0.985);\n }\n\n 40%,\n 45% {\n opacity: 1;\n -webkit-transform: translate3d(0, 20px, 0) scaleY(0.9);\n transform: translate3d(0, 20px, 0) scaleY(0.9);\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(0, -2000px, 0) scaleY(3);\n transform: translate3d(0, -2000px, 0) scaleY(3);\n }\n}\n[dir=ltr] .animate__bounceOutUp {\n -webkit-animation-name: bounceOutUp;\n animation-name: bounceOutUp;\n}\n[dir=rtl] .animate__bounceOutUp {\n -webkit-animation-name: bounceOutUp;\n animation-name: bounceOutUp;\n}\n/* Fading entrances */\n@-webkit-keyframes fadeIn {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n}\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n}\n[dir=ltr] .animate__fadeIn {\n -webkit-animation-name: fadeIn;\n animation-name: fadeIn;\n}\n[dir=rtl] .animate__fadeIn {\n -webkit-animation-name: fadeIn;\n animation-name: fadeIn;\n}\n@-webkit-keyframes fadeInDown {\n from {\n opacity: 0;\n -webkit-transform: translate3d(0, -100%, 0);\n transform: translate3d(0, -100%, 0);\n }\n\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes fadeInDown {\n from {\n opacity: 0;\n -webkit-transform: translate3d(0, -100%, 0);\n transform: translate3d(0, -100%, 0);\n }\n\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n[dir=ltr] .animate__fadeInDown {\n -webkit-animation-name: fadeInDown;\n animation-name: fadeInDown;\n}\n[dir=rtl] .animate__fadeInDown {\n -webkit-animation-name: fadeInDown;\n animation-name: fadeInDown;\n}\n@-webkit-keyframes fadeInDownBig {\n from {\n opacity: 0;\n -webkit-transform: translate3d(0, -2000px, 0);\n transform: translate3d(0, -2000px, 0);\n }\n\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes fadeInDownBig {\n from {\n opacity: 0;\n -webkit-transform: translate3d(0, -2000px, 0);\n transform: translate3d(0, -2000px, 0);\n }\n\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n[dir=ltr] .animate__fadeInDownBig {\n -webkit-animation-name: fadeInDownBig;\n animation-name: fadeInDownBig;\n}\n[dir=rtl] .animate__fadeInDownBig {\n -webkit-animation-name: fadeInDownBig;\n animation-name: fadeInDownBig;\n}\n@-webkit-keyframes fadeInLeft-ltr {\n from {\n opacity: 0;\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n }\n\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@-webkit-keyframes fadeInLeft-rtl {\n from {\n opacity: 0;\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n }\n\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes fadeInLeft-ltr {\n from {\n opacity: 0;\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n }\n\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes fadeInLeft-rtl {\n from {\n opacity: 0;\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n }\n\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n[dir=ltr] .animate__fadeInLeft {\n -webkit-animation-name: fadeInLeft-ltr ;\n animation-name: fadeInLeft-ltr ;\n}\n[dir=rtl] .animate__fadeInLeft {\n -webkit-animation-name: fadeInLeft-rtl ;\n animation-name: fadeInLeft-rtl ;\n}\n@-webkit-keyframes fadeInLeftBig-ltr {\n from {\n opacity: 0;\n -webkit-transform: translate3d(-2000px, 0, 0);\n transform: translate3d(-2000px, 0, 0);\n }\n\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@-webkit-keyframes fadeInLeftBig-rtl {\n from {\n opacity: 0;\n -webkit-transform: translate3d(2000px, 0, 0);\n transform: translate3d(2000px, 0, 0);\n }\n\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes fadeInLeftBig-ltr {\n from {\n opacity: 0;\n -webkit-transform: translate3d(-2000px, 0, 0);\n transform: translate3d(-2000px, 0, 0);\n }\n\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes fadeInLeftBig-rtl {\n from {\n opacity: 0;\n -webkit-transform: translate3d(2000px, 0, 0);\n transform: translate3d(2000px, 0, 0);\n }\n\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n[dir=ltr] .animate__fadeInLeftBig {\n -webkit-animation-name: fadeInLeftBig-ltr ;\n animation-name: fadeInLeftBig-ltr ;\n}\n[dir=rtl] .animate__fadeInLeftBig {\n -webkit-animation-name: fadeInLeftBig-rtl ;\n animation-name: fadeInLeftBig-rtl ;\n}\n@-webkit-keyframes fadeInRight-ltr {\n from {\n opacity: 0;\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n }\n\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@-webkit-keyframes fadeInRight-rtl {\n from {\n opacity: 0;\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n }\n\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes fadeInRight-ltr {\n from {\n opacity: 0;\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n }\n\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes fadeInRight-rtl {\n from {\n opacity: 0;\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n }\n\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n[dir=ltr] .animate__fadeInRight {\n -webkit-animation-name: fadeInRight-ltr ;\n animation-name: fadeInRight-ltr ;\n}\n[dir=rtl] .animate__fadeInRight {\n -webkit-animation-name: fadeInRight-rtl ;\n animation-name: fadeInRight-rtl ;\n}\n@-webkit-keyframes fadeInRightBig-ltr {\n from {\n opacity: 0;\n -webkit-transform: translate3d(2000px, 0, 0);\n transform: translate3d(2000px, 0, 0);\n }\n\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@-webkit-keyframes fadeInRightBig-rtl {\n from {\n opacity: 0;\n -webkit-transform: translate3d(-2000px, 0, 0);\n transform: translate3d(-2000px, 0, 0);\n }\n\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes fadeInRightBig-ltr {\n from {\n opacity: 0;\n -webkit-transform: translate3d(2000px, 0, 0);\n transform: translate3d(2000px, 0, 0);\n }\n\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes fadeInRightBig-rtl {\n from {\n opacity: 0;\n -webkit-transform: translate3d(-2000px, 0, 0);\n transform: translate3d(-2000px, 0, 0);\n }\n\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n[dir=ltr] .animate__fadeInRightBig {\n -webkit-animation-name: fadeInRightBig-ltr ;\n animation-name: fadeInRightBig-ltr ;\n}\n[dir=rtl] .animate__fadeInRightBig {\n -webkit-animation-name: fadeInRightBig-rtl ;\n animation-name: fadeInRightBig-rtl ;\n}\n@-webkit-keyframes fadeInUp {\n from {\n opacity: 0;\n -webkit-transform: translate3d(0, 100%, 0);\n transform: translate3d(0, 100%, 0);\n }\n\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes fadeInUp {\n from {\n opacity: 0;\n -webkit-transform: translate3d(0, 100%, 0);\n transform: translate3d(0, 100%, 0);\n }\n\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n[dir=ltr] .animate__fadeInUp {\n -webkit-animation-name: fadeInUp;\n animation-name: fadeInUp;\n}\n[dir=rtl] .animate__fadeInUp {\n -webkit-animation-name: fadeInUp;\n animation-name: fadeInUp;\n}\n@-webkit-keyframes fadeInUpBig {\n from {\n opacity: 0;\n -webkit-transform: translate3d(0, 2000px, 0);\n transform: translate3d(0, 2000px, 0);\n }\n\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes fadeInUpBig {\n from {\n opacity: 0;\n -webkit-transform: translate3d(0, 2000px, 0);\n transform: translate3d(0, 2000px, 0);\n }\n\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n[dir=ltr] .animate__fadeInUpBig {\n -webkit-animation-name: fadeInUpBig;\n animation-name: fadeInUpBig;\n}\n[dir=rtl] .animate__fadeInUpBig {\n -webkit-animation-name: fadeInUpBig;\n animation-name: fadeInUpBig;\n}\n@-webkit-keyframes fadeInTopLeft-ltr {\n from {\n opacity: 0;\n -webkit-transform: translate3d(-100%, -100%, 0);\n transform: translate3d(-100%, -100%, 0);\n }\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@-webkit-keyframes fadeInTopLeft-rtl {\n from {\n opacity: 0;\n -webkit-transform: translate3d(100%, -100%, 0);\n transform: translate3d(100%, -100%, 0);\n }\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes fadeInTopLeft-ltr {\n from {\n opacity: 0;\n -webkit-transform: translate3d(-100%, -100%, 0);\n transform: translate3d(-100%, -100%, 0);\n }\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes fadeInTopLeft-rtl {\n from {\n opacity: 0;\n -webkit-transform: translate3d(100%, -100%, 0);\n transform: translate3d(100%, -100%, 0);\n }\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n[dir=ltr] .animate__fadeInTopLeft {\n -webkit-animation-name: fadeInTopLeft-ltr ;\n animation-name: fadeInTopLeft-ltr ;\n}\n[dir=rtl] .animate__fadeInTopLeft {\n -webkit-animation-name: fadeInTopLeft-rtl ;\n animation-name: fadeInTopLeft-rtl ;\n}\n@-webkit-keyframes fadeInTopRight-ltr {\n from {\n opacity: 0;\n -webkit-transform: translate3d(100%, -100%, 0);\n transform: translate3d(100%, -100%, 0);\n }\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@-webkit-keyframes fadeInTopRight-rtl {\n from {\n opacity: 0;\n -webkit-transform: translate3d(-100%, -100%, 0);\n transform: translate3d(-100%, -100%, 0);\n }\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes fadeInTopRight-ltr {\n from {\n opacity: 0;\n -webkit-transform: translate3d(100%, -100%, 0);\n transform: translate3d(100%, -100%, 0);\n }\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes fadeInTopRight-rtl {\n from {\n opacity: 0;\n -webkit-transform: translate3d(-100%, -100%, 0);\n transform: translate3d(-100%, -100%, 0);\n }\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n[dir=ltr] .animate__fadeInTopRight {\n -webkit-animation-name: fadeInTopRight-ltr ;\n animation-name: fadeInTopRight-ltr ;\n}\n[dir=rtl] .animate__fadeInTopRight {\n -webkit-animation-name: fadeInTopRight-rtl ;\n animation-name: fadeInTopRight-rtl ;\n}\n@-webkit-keyframes fadeInBottomLeft-ltr {\n from {\n opacity: 0;\n -webkit-transform: translate3d(-100%, 100%, 0);\n transform: translate3d(-100%, 100%, 0);\n }\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@-webkit-keyframes fadeInBottomLeft-rtl {\n from {\n opacity: 0;\n -webkit-transform: translate3d(100%, 100%, 0);\n transform: translate3d(100%, 100%, 0);\n }\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes fadeInBottomLeft-ltr {\n from {\n opacity: 0;\n -webkit-transform: translate3d(-100%, 100%, 0);\n transform: translate3d(-100%, 100%, 0);\n }\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes fadeInBottomLeft-rtl {\n from {\n opacity: 0;\n -webkit-transform: translate3d(100%, 100%, 0);\n transform: translate3d(100%, 100%, 0);\n }\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n[dir=ltr] .animate__fadeInBottomLeft {\n -webkit-animation-name: fadeInBottomLeft-ltr ;\n animation-name: fadeInBottomLeft-ltr ;\n}\n[dir=rtl] .animate__fadeInBottomLeft {\n -webkit-animation-name: fadeInBottomLeft-rtl ;\n animation-name: fadeInBottomLeft-rtl ;\n}\n@-webkit-keyframes fadeInBottomRight-ltr {\n from {\n opacity: 0;\n -webkit-transform: translate3d(100%, 100%, 0);\n transform: translate3d(100%, 100%, 0);\n }\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@-webkit-keyframes fadeInBottomRight-rtl {\n from {\n opacity: 0;\n -webkit-transform: translate3d(-100%, 100%, 0);\n transform: translate3d(-100%, 100%, 0);\n }\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes fadeInBottomRight-ltr {\n from {\n opacity: 0;\n -webkit-transform: translate3d(100%, 100%, 0);\n transform: translate3d(100%, 100%, 0);\n }\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes fadeInBottomRight-rtl {\n from {\n opacity: 0;\n -webkit-transform: translate3d(-100%, 100%, 0);\n transform: translate3d(-100%, 100%, 0);\n }\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n[dir=ltr] .animate__fadeInBottomRight {\n -webkit-animation-name: fadeInBottomRight-ltr ;\n animation-name: fadeInBottomRight-ltr ;\n}\n[dir=rtl] .animate__fadeInBottomRight {\n -webkit-animation-name: fadeInBottomRight-rtl ;\n animation-name: fadeInBottomRight-rtl ;\n}\n/* Fading exits */\n@-webkit-keyframes fadeOut {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n }\n}\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n }\n}\n[dir=ltr] .animate__fadeOut {\n -webkit-animation-name: fadeOut;\n animation-name: fadeOut;\n}\n[dir=rtl] .animate__fadeOut {\n -webkit-animation-name: fadeOut;\n animation-name: fadeOut;\n}\n@-webkit-keyframes fadeOutDown {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(0, 100%, 0);\n transform: translate3d(0, 100%, 0);\n }\n}\n@keyframes fadeOutDown {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(0, 100%, 0);\n transform: translate3d(0, 100%, 0);\n }\n}\n[dir=ltr] .animate__fadeOutDown {\n -webkit-animation-name: fadeOutDown;\n animation-name: fadeOutDown;\n}\n[dir=rtl] .animate__fadeOutDown {\n -webkit-animation-name: fadeOutDown;\n animation-name: fadeOutDown;\n}\n@-webkit-keyframes fadeOutDownBig {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(0, 2000px, 0);\n transform: translate3d(0, 2000px, 0);\n }\n}\n@keyframes fadeOutDownBig {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(0, 2000px, 0);\n transform: translate3d(0, 2000px, 0);\n }\n}\n[dir=ltr] .animate__fadeOutDownBig {\n -webkit-animation-name: fadeOutDownBig;\n animation-name: fadeOutDownBig;\n}\n[dir=rtl] .animate__fadeOutDownBig {\n -webkit-animation-name: fadeOutDownBig;\n animation-name: fadeOutDownBig;\n}\n@-webkit-keyframes fadeOutLeft-ltr {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n }\n}\n@-webkit-keyframes fadeOutLeft-rtl {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n }\n}\n@keyframes fadeOutLeft-ltr {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n }\n}\n@keyframes fadeOutLeft-rtl {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n }\n}\n[dir=ltr] .animate__fadeOutLeft {\n -webkit-animation-name: fadeOutLeft-ltr ;\n animation-name: fadeOutLeft-ltr ;\n}\n[dir=rtl] .animate__fadeOutLeft {\n -webkit-animation-name: fadeOutLeft-rtl ;\n animation-name: fadeOutLeft-rtl ;\n}\n@-webkit-keyframes fadeOutLeftBig-ltr {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(-2000px, 0, 0);\n transform: translate3d(-2000px, 0, 0);\n }\n}\n@-webkit-keyframes fadeOutLeftBig-rtl {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(2000px, 0, 0);\n transform: translate3d(2000px, 0, 0);\n }\n}\n@keyframes fadeOutLeftBig-ltr {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(-2000px, 0, 0);\n transform: translate3d(-2000px, 0, 0);\n }\n}\n@keyframes fadeOutLeftBig-rtl {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(2000px, 0, 0);\n transform: translate3d(2000px, 0, 0);\n }\n}\n[dir=ltr] .animate__fadeOutLeftBig {\n -webkit-animation-name: fadeOutLeftBig-ltr ;\n animation-name: fadeOutLeftBig-ltr ;\n}\n[dir=rtl] .animate__fadeOutLeftBig {\n -webkit-animation-name: fadeOutLeftBig-rtl ;\n animation-name: fadeOutLeftBig-rtl ;\n}\n@-webkit-keyframes fadeOutRight-ltr {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n }\n}\n@-webkit-keyframes fadeOutRight-rtl {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n }\n}\n@keyframes fadeOutRight-ltr {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n }\n}\n@keyframes fadeOutRight-rtl {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n }\n}\n[dir=ltr] .animate__fadeOutRight {\n -webkit-animation-name: fadeOutRight-ltr ;\n animation-name: fadeOutRight-ltr ;\n}\n[dir=rtl] .animate__fadeOutRight {\n -webkit-animation-name: fadeOutRight-rtl ;\n animation-name: fadeOutRight-rtl ;\n}\n@-webkit-keyframes fadeOutRightBig-ltr {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(2000px, 0, 0);\n transform: translate3d(2000px, 0, 0);\n }\n}\n@-webkit-keyframes fadeOutRightBig-rtl {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(-2000px, 0, 0);\n transform: translate3d(-2000px, 0, 0);\n }\n}\n@keyframes fadeOutRightBig-ltr {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(2000px, 0, 0);\n transform: translate3d(2000px, 0, 0);\n }\n}\n@keyframes fadeOutRightBig-rtl {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(-2000px, 0, 0);\n transform: translate3d(-2000px, 0, 0);\n }\n}\n[dir=ltr] .animate__fadeOutRightBig {\n -webkit-animation-name: fadeOutRightBig-ltr ;\n animation-name: fadeOutRightBig-ltr ;\n}\n[dir=rtl] .animate__fadeOutRightBig {\n -webkit-animation-name: fadeOutRightBig-rtl ;\n animation-name: fadeOutRightBig-rtl ;\n}\n@-webkit-keyframes fadeOutUp {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(0, -100%, 0);\n transform: translate3d(0, -100%, 0);\n }\n}\n@keyframes fadeOutUp {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(0, -100%, 0);\n transform: translate3d(0, -100%, 0);\n }\n}\n[dir=ltr] .animate__fadeOutUp {\n -webkit-animation-name: fadeOutUp;\n animation-name: fadeOutUp;\n}\n[dir=rtl] .animate__fadeOutUp {\n -webkit-animation-name: fadeOutUp;\n animation-name: fadeOutUp;\n}\n@-webkit-keyframes fadeOutUpBig {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(0, -2000px, 0);\n transform: translate3d(0, -2000px, 0);\n }\n}\n@keyframes fadeOutUpBig {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(0, -2000px, 0);\n transform: translate3d(0, -2000px, 0);\n }\n}\n[dir=ltr] .animate__fadeOutUpBig {\n -webkit-animation-name: fadeOutUpBig;\n animation-name: fadeOutUpBig;\n}\n[dir=rtl] .animate__fadeOutUpBig {\n -webkit-animation-name: fadeOutUpBig;\n animation-name: fadeOutUpBig;\n}\n@-webkit-keyframes fadeOutTopLeft-ltr {\n from {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n to {\n opacity: 0;\n -webkit-transform: translate3d(-100%, -100%, 0);\n transform: translate3d(-100%, -100%, 0);\n }\n}\n@-webkit-keyframes fadeOutTopLeft-rtl {\n from {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n to {\n opacity: 0;\n -webkit-transform: translate3d(100%, -100%, 0);\n transform: translate3d(100%, -100%, 0);\n }\n}\n@keyframes fadeOutTopLeft-ltr {\n from {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n to {\n opacity: 0;\n -webkit-transform: translate3d(-100%, -100%, 0);\n transform: translate3d(-100%, -100%, 0);\n }\n}\n@keyframes fadeOutTopLeft-rtl {\n from {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n to {\n opacity: 0;\n -webkit-transform: translate3d(100%, -100%, 0);\n transform: translate3d(100%, -100%, 0);\n }\n}\n[dir=ltr] .animate__fadeOutTopLeft {\n -webkit-animation-name: fadeOutTopLeft-ltr ;\n animation-name: fadeOutTopLeft-ltr ;\n}\n[dir=rtl] .animate__fadeOutTopLeft {\n -webkit-animation-name: fadeOutTopLeft-rtl ;\n animation-name: fadeOutTopLeft-rtl ;\n}\n@-webkit-keyframes fadeOutTopRight-ltr {\n from {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n to {\n opacity: 0;\n -webkit-transform: translate3d(100%, -100%, 0);\n transform: translate3d(100%, -100%, 0);\n }\n}\n@-webkit-keyframes fadeOutTopRight-rtl {\n from {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n to {\n opacity: 0;\n -webkit-transform: translate3d(-100%, -100%, 0);\n transform: translate3d(-100%, -100%, 0);\n }\n}\n@keyframes fadeOutTopRight-ltr {\n from {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n to {\n opacity: 0;\n -webkit-transform: translate3d(100%, -100%, 0);\n transform: translate3d(100%, -100%, 0);\n }\n}\n@keyframes fadeOutTopRight-rtl {\n from {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n to {\n opacity: 0;\n -webkit-transform: translate3d(-100%, -100%, 0);\n transform: translate3d(-100%, -100%, 0);\n }\n}\n[dir=ltr] .animate__fadeOutTopRight {\n -webkit-animation-name: fadeOutTopRight-ltr ;\n animation-name: fadeOutTopRight-ltr ;\n}\n[dir=rtl] .animate__fadeOutTopRight {\n -webkit-animation-name: fadeOutTopRight-rtl ;\n animation-name: fadeOutTopRight-rtl ;\n}\n@-webkit-keyframes fadeOutBottomRight-ltr {\n from {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n to {\n opacity: 0;\n -webkit-transform: translate3d(100%, 100%, 0);\n transform: translate3d(100%, 100%, 0);\n }\n}\n@-webkit-keyframes fadeOutBottomRight-rtl {\n from {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n to {\n opacity: 0;\n -webkit-transform: translate3d(-100%, 100%, 0);\n transform: translate3d(-100%, 100%, 0);\n }\n}\n@keyframes fadeOutBottomRight-ltr {\n from {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n to {\n opacity: 0;\n -webkit-transform: translate3d(100%, 100%, 0);\n transform: translate3d(100%, 100%, 0);\n }\n}\n@keyframes fadeOutBottomRight-rtl {\n from {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n to {\n opacity: 0;\n -webkit-transform: translate3d(-100%, 100%, 0);\n transform: translate3d(-100%, 100%, 0);\n }\n}\n[dir=ltr] .animate__fadeOutBottomRight {\n -webkit-animation-name: fadeOutBottomRight-ltr ;\n animation-name: fadeOutBottomRight-ltr ;\n}\n[dir=rtl] .animate__fadeOutBottomRight {\n -webkit-animation-name: fadeOutBottomRight-rtl ;\n animation-name: fadeOutBottomRight-rtl ;\n}\n@-webkit-keyframes fadeOutBottomLeft-ltr {\n from {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n to {\n opacity: 0;\n -webkit-transform: translate3d(-100%, 100%, 0);\n transform: translate3d(-100%, 100%, 0);\n }\n}\n@-webkit-keyframes fadeOutBottomLeft-rtl {\n from {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n to {\n opacity: 0;\n -webkit-transform: translate3d(100%, 100%, 0);\n transform: translate3d(100%, 100%, 0);\n }\n}\n@keyframes fadeOutBottomLeft-ltr {\n from {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n to {\n opacity: 0;\n -webkit-transform: translate3d(-100%, 100%, 0);\n transform: translate3d(-100%, 100%, 0);\n }\n}\n@keyframes fadeOutBottomLeft-rtl {\n from {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n to {\n opacity: 0;\n -webkit-transform: translate3d(100%, 100%, 0);\n transform: translate3d(100%, 100%, 0);\n }\n}\n[dir=ltr] .animate__fadeOutBottomLeft {\n -webkit-animation-name: fadeOutBottomLeft-ltr ;\n animation-name: fadeOutBottomLeft-ltr ;\n}\n[dir=rtl] .animate__fadeOutBottomLeft {\n -webkit-animation-name: fadeOutBottomLeft-rtl ;\n animation-name: fadeOutBottomLeft-rtl ;\n}\n/* Flippers */\n@-webkit-keyframes flip-ltr {\n from {\n -webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, -360deg);\n transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, -360deg);\n -webkit-animation-timing-function: ease-out;\n animation-timing-function: ease-out;\n }\n\n 40% {\n -webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)\n rotate3d(0, 1, 0, -190deg);\n transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)\n rotate3d(0, 1, 0, -190deg);\n -webkit-animation-timing-function: ease-out;\n animation-timing-function: ease-out;\n }\n\n 50% {\n -webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)\n rotate3d(0, 1, 0, -170deg);\n transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)\n rotate3d(0, 1, 0, -170deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n }\n\n 80% {\n -webkit-transform: perspective(400px) scale3d(0.95, 0.95, 0.95) translate3d(0, 0, 0)\n rotate3d(0, 1, 0, 0deg);\n transform: perspective(400px) scale3d(0.95, 0.95, 0.95) translate3d(0, 0, 0)\n rotate3d(0, 1, 0, 0deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n }\n\n to {\n -webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, 0deg);\n transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, 0deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n }\n}\n@-webkit-keyframes flip-rtl {\n from {\n -webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, -1, 0, 360deg);\n transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, -1, 0, 360deg);\n -webkit-animation-timing-function: ease-out;\n animation-timing-function: ease-out;\n }\n\n 40% {\n -webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)\n rotate3d(0, -1, 0, 190deg);\n transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)\n rotate3d(0, -1, 0, 190deg);\n -webkit-animation-timing-function: ease-out;\n animation-timing-function: ease-out;\n }\n\n 50% {\n -webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)\n rotate3d(0, -1, 0, 170deg);\n transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)\n rotate3d(0, -1, 0, 170deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n }\n\n 80% {\n -webkit-transform: perspective(400px) scale3d(0.95, 0.95, 0.95) translate3d(0, 0, 0)\n rotate3d(0, -1, 0, 0deg);\n transform: perspective(400px) scale3d(0.95, 0.95, 0.95) translate3d(0, 0, 0)\n rotate3d(0, -1, 0, 0deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n }\n\n to {\n -webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, -1, 0, 0deg);\n transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, -1, 0, 0deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n }\n}\n@keyframes flip-ltr {\n from {\n -webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, -360deg);\n transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, -360deg);\n -webkit-animation-timing-function: ease-out;\n animation-timing-function: ease-out;\n }\n\n 40% {\n -webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)\n rotate3d(0, 1, 0, -190deg);\n transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)\n rotate3d(0, 1, 0, -190deg);\n -webkit-animation-timing-function: ease-out;\n animation-timing-function: ease-out;\n }\n\n 50% {\n -webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)\n rotate3d(0, 1, 0, -170deg);\n transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)\n rotate3d(0, 1, 0, -170deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n }\n\n 80% {\n -webkit-transform: perspective(400px) scale3d(0.95, 0.95, 0.95) translate3d(0, 0, 0)\n rotate3d(0, 1, 0, 0deg);\n transform: perspective(400px) scale3d(0.95, 0.95, 0.95) translate3d(0, 0, 0)\n rotate3d(0, 1, 0, 0deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n }\n\n to {\n -webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, 0deg);\n transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, 0deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n }\n}\n@keyframes flip-rtl {\n from {\n -webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, -1, 0, 360deg);\n transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, -1, 0, 360deg);\n -webkit-animation-timing-function: ease-out;\n animation-timing-function: ease-out;\n }\n\n 40% {\n -webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)\n rotate3d(0, -1, 0, 190deg);\n transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)\n rotate3d(0, -1, 0, 190deg);\n -webkit-animation-timing-function: ease-out;\n animation-timing-function: ease-out;\n }\n\n 50% {\n -webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)\n rotate3d(0, -1, 0, 170deg);\n transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)\n rotate3d(0, -1, 0, 170deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n }\n\n 80% {\n -webkit-transform: perspective(400px) scale3d(0.95, 0.95, 0.95) translate3d(0, 0, 0)\n rotate3d(0, -1, 0, 0deg);\n transform: perspective(400px) scale3d(0.95, 0.95, 0.95) translate3d(0, 0, 0)\n rotate3d(0, -1, 0, 0deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n }\n\n to {\n -webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, -1, 0, 0deg);\n transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, -1, 0, 0deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n }\n}\n.animate__animated.animate__flip {\n -webkit-backface-visibility: visible;\n backface-visibility: visible;\n}\n[dir=ltr] .animate__animated.animate__flip {\n -webkit-animation-name: flip-ltr ;\n animation-name: flip-ltr ;\n}\n[dir=rtl] .animate__animated.animate__flip {\n -webkit-animation-name: flip-rtl ;\n animation-name: flip-rtl ;\n}\n@-webkit-keyframes flipInX-ltr {\n from {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);\n transform: perspective(400px) rotate3d(1, 0, 0, 90deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n opacity: 0;\n }\n\n 40% {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);\n transform: perspective(400px) rotate3d(1, 0, 0, -20deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n }\n\n 60% {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg);\n transform: perspective(400px) rotate3d(1, 0, 0, 10deg);\n opacity: 1;\n }\n\n 80% {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg);\n transform: perspective(400px) rotate3d(1, 0, 0, -5deg);\n }\n\n to {\n -webkit-transform: perspective(400px);\n transform: perspective(400px);\n }\n}\n@-webkit-keyframes flipInX-rtl {\n from {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -90deg);\n transform: perspective(400px) rotate3d(1, 0, 0, -90deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n opacity: 0;\n }\n\n 40% {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 20deg);\n transform: perspective(400px) rotate3d(1, 0, 0, 20deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n }\n\n 60% {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -10deg);\n transform: perspective(400px) rotate3d(1, 0, 0, -10deg);\n opacity: 1;\n }\n\n 80% {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 5deg);\n transform: perspective(400px) rotate3d(1, 0, 0, 5deg);\n }\n\n to {\n -webkit-transform: perspective(400px);\n transform: perspective(400px);\n }\n}\n@keyframes flipInX-ltr {\n from {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);\n transform: perspective(400px) rotate3d(1, 0, 0, 90deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n opacity: 0;\n }\n\n 40% {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);\n transform: perspective(400px) rotate3d(1, 0, 0, -20deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n }\n\n 60% {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg);\n transform: perspective(400px) rotate3d(1, 0, 0, 10deg);\n opacity: 1;\n }\n\n 80% {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg);\n transform: perspective(400px) rotate3d(1, 0, 0, -5deg);\n }\n\n to {\n -webkit-transform: perspective(400px);\n transform: perspective(400px);\n }\n}\n@keyframes flipInX-rtl {\n from {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -90deg);\n transform: perspective(400px) rotate3d(1, 0, 0, -90deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n opacity: 0;\n }\n\n 40% {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 20deg);\n transform: perspective(400px) rotate3d(1, 0, 0, 20deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n }\n\n 60% {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -10deg);\n transform: perspective(400px) rotate3d(1, 0, 0, -10deg);\n opacity: 1;\n }\n\n 80% {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 5deg);\n transform: perspective(400px) rotate3d(1, 0, 0, 5deg);\n }\n\n to {\n -webkit-transform: perspective(400px);\n transform: perspective(400px);\n }\n}\n.animate__flipInX {\n -webkit-backface-visibility: visible !important;\n backface-visibility: visible !important;\n}\n[dir=ltr] .animate__flipInX {\n -webkit-animation-name: flipInX-ltr ;\n animation-name: flipInX-ltr ;\n}\n[dir=rtl] .animate__flipInX {\n -webkit-animation-name: flipInX-rtl ;\n animation-name: flipInX-rtl ;\n}\n@-webkit-keyframes flipInY-ltr {\n from {\n -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);\n transform: perspective(400px) rotate3d(0, 1, 0, 90deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n opacity: 0;\n }\n\n 40% {\n -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -20deg);\n transform: perspective(400px) rotate3d(0, 1, 0, -20deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n }\n\n 60% {\n -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 10deg);\n transform: perspective(400px) rotate3d(0, 1, 0, 10deg);\n opacity: 1;\n }\n\n 80% {\n -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -5deg);\n transform: perspective(400px) rotate3d(0, 1, 0, -5deg);\n }\n\n to {\n -webkit-transform: perspective(400px);\n transform: perspective(400px);\n }\n}\n@-webkit-keyframes flipInY-rtl {\n from {\n -webkit-transform: perspective(400px) rotate3d(0, -1, 0, -90deg);\n transform: perspective(400px) rotate3d(0, -1, 0, -90deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n opacity: 0;\n }\n\n 40% {\n -webkit-transform: perspective(400px) rotate3d(0, -1, 0, 20deg);\n transform: perspective(400px) rotate3d(0, -1, 0, 20deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n }\n\n 60% {\n -webkit-transform: perspective(400px) rotate3d(0, -1, 0, -10deg);\n transform: perspective(400px) rotate3d(0, -1, 0, -10deg);\n opacity: 1;\n }\n\n 80% {\n -webkit-transform: perspective(400px) rotate3d(0, -1, 0, 5deg);\n transform: perspective(400px) rotate3d(0, -1, 0, 5deg);\n }\n\n to {\n -webkit-transform: perspective(400px);\n transform: perspective(400px);\n }\n}\n@keyframes flipInY-ltr {\n from {\n -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);\n transform: perspective(400px) rotate3d(0, 1, 0, 90deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n opacity: 0;\n }\n\n 40% {\n -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -20deg);\n transform: perspective(400px) rotate3d(0, 1, 0, -20deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n }\n\n 60% {\n -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 10deg);\n transform: perspective(400px) rotate3d(0, 1, 0, 10deg);\n opacity: 1;\n }\n\n 80% {\n -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -5deg);\n transform: perspective(400px) rotate3d(0, 1, 0, -5deg);\n }\n\n to {\n -webkit-transform: perspective(400px);\n transform: perspective(400px);\n }\n}\n@keyframes flipInY-rtl {\n from {\n -webkit-transform: perspective(400px) rotate3d(0, -1, 0, -90deg);\n transform: perspective(400px) rotate3d(0, -1, 0, -90deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n opacity: 0;\n }\n\n 40% {\n -webkit-transform: perspective(400px) rotate3d(0, -1, 0, 20deg);\n transform: perspective(400px) rotate3d(0, -1, 0, 20deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n }\n\n 60% {\n -webkit-transform: perspective(400px) rotate3d(0, -1, 0, -10deg);\n transform: perspective(400px) rotate3d(0, -1, 0, -10deg);\n opacity: 1;\n }\n\n 80% {\n -webkit-transform: perspective(400px) rotate3d(0, -1, 0, 5deg);\n transform: perspective(400px) rotate3d(0, -1, 0, 5deg);\n }\n\n to {\n -webkit-transform: perspective(400px);\n transform: perspective(400px);\n }\n}\n.animate__flipInY {\n -webkit-backface-visibility: visible !important;\n backface-visibility: visible !important;\n}\n[dir=ltr] .animate__flipInY {\n -webkit-animation-name: flipInY-ltr ;\n animation-name: flipInY-ltr ;\n}\n[dir=rtl] .animate__flipInY {\n -webkit-animation-name: flipInY-rtl ;\n animation-name: flipInY-rtl ;\n}\n@-webkit-keyframes flipOutX-ltr {\n from {\n -webkit-transform: perspective(400px);\n transform: perspective(400px);\n }\n\n 30% {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);\n transform: perspective(400px) rotate3d(1, 0, 0, -20deg);\n opacity: 1;\n }\n\n to {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);\n transform: perspective(400px) rotate3d(1, 0, 0, 90deg);\n opacity: 0;\n }\n}\n@-webkit-keyframes flipOutX-rtl {\n from {\n -webkit-transform: perspective(400px);\n transform: perspective(400px);\n }\n\n 30% {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 20deg);\n transform: perspective(400px) rotate3d(1, 0, 0, 20deg);\n opacity: 1;\n }\n\n to {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -90deg);\n transform: perspective(400px) rotate3d(1, 0, 0, -90deg);\n opacity: 0;\n }\n}\n@keyframes flipOutX-ltr {\n from {\n -webkit-transform: perspective(400px);\n transform: perspective(400px);\n }\n\n 30% {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);\n transform: perspective(400px) rotate3d(1, 0, 0, -20deg);\n opacity: 1;\n }\n\n to {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);\n transform: perspective(400px) rotate3d(1, 0, 0, 90deg);\n opacity: 0;\n }\n}\n@keyframes flipOutX-rtl {\n from {\n -webkit-transform: perspective(400px);\n transform: perspective(400px);\n }\n\n 30% {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 20deg);\n transform: perspective(400px) rotate3d(1, 0, 0, 20deg);\n opacity: 1;\n }\n\n to {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -90deg);\n transform: perspective(400px) rotate3d(1, 0, 0, -90deg);\n opacity: 0;\n }\n}\n.animate__flipOutX {\n -webkit-backface-visibility: visible !important;\n backface-visibility: visible !important;\n}\n[dir=ltr] .animate__flipOutX {\n -webkit-animation-duration: calc(1s * 0.75);\n animation-duration: calc(1s * 0.75);\n -webkit-animation-duration: calc(var(--animate-duration) * 0.75);\n animation-duration: calc(var(--animate-duration) * 0.75);\n -webkit-animation-name: flipOutX-ltr ;\n animation-name: flipOutX-ltr ;\n}\n[dir=rtl] .animate__flipOutX {\n -webkit-animation-duration: calc(1s * 0.75);\n animation-duration: calc(1s * 0.75);\n -webkit-animation-duration: calc(var(--animate-duration) * 0.75);\n animation-duration: calc(var(--animate-duration) * 0.75);\n -webkit-animation-name: flipOutX-rtl ;\n animation-name: flipOutX-rtl ;\n}\n@-webkit-keyframes flipOutY-ltr {\n from {\n -webkit-transform: perspective(400px);\n transform: perspective(400px);\n }\n\n 30% {\n -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -15deg);\n transform: perspective(400px) rotate3d(0, 1, 0, -15deg);\n opacity: 1;\n }\n\n to {\n -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);\n transform: perspective(400px) rotate3d(0, 1, 0, 90deg);\n opacity: 0;\n }\n}\n@-webkit-keyframes flipOutY-rtl {\n from {\n -webkit-transform: perspective(400px);\n transform: perspective(400px);\n }\n\n 30% {\n -webkit-transform: perspective(400px) rotate3d(0, -1, 0, 15deg);\n transform: perspective(400px) rotate3d(0, -1, 0, 15deg);\n opacity: 1;\n }\n\n to {\n -webkit-transform: perspective(400px) rotate3d(0, -1, 0, -90deg);\n transform: perspective(400px) rotate3d(0, -1, 0, -90deg);\n opacity: 0;\n }\n}\n@keyframes flipOutY-ltr {\n from {\n -webkit-transform: perspective(400px);\n transform: perspective(400px);\n }\n\n 30% {\n -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -15deg);\n transform: perspective(400px) rotate3d(0, 1, 0, -15deg);\n opacity: 1;\n }\n\n to {\n -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);\n transform: perspective(400px) rotate3d(0, 1, 0, 90deg);\n opacity: 0;\n }\n}\n@keyframes flipOutY-rtl {\n from {\n -webkit-transform: perspective(400px);\n transform: perspective(400px);\n }\n\n 30% {\n -webkit-transform: perspective(400px) rotate3d(0, -1, 0, 15deg);\n transform: perspective(400px) rotate3d(0, -1, 0, 15deg);\n opacity: 1;\n }\n\n to {\n -webkit-transform: perspective(400px) rotate3d(0, -1, 0, -90deg);\n transform: perspective(400px) rotate3d(0, -1, 0, -90deg);\n opacity: 0;\n }\n}\n.animate__flipOutY {\n -webkit-backface-visibility: visible !important;\n backface-visibility: visible !important;\n}\n[dir=ltr] .animate__flipOutY {\n -webkit-animation-duration: calc(1s * 0.75);\n animation-duration: calc(1s * 0.75);\n -webkit-animation-duration: calc(var(--animate-duration) * 0.75);\n animation-duration: calc(var(--animate-duration) * 0.75);\n -webkit-animation-name: flipOutY-ltr ;\n animation-name: flipOutY-ltr ;\n}\n[dir=rtl] .animate__flipOutY {\n -webkit-animation-duration: calc(1s * 0.75);\n animation-duration: calc(1s * 0.75);\n -webkit-animation-duration: calc(var(--animate-duration) * 0.75);\n animation-duration: calc(var(--animate-duration) * 0.75);\n -webkit-animation-name: flipOutY-rtl ;\n animation-name: flipOutY-rtl ;\n}\n/* Lightspeed */\n@-webkit-keyframes lightSpeedInRight-ltr {\n from {\n -webkit-transform: translate3d(100%, 0, 0) skewX(-30deg);\n transform: translate3d(100%, 0, 0) skewX(-30deg);\n opacity: 0;\n }\n\n 60% {\n -webkit-transform: skewX(20deg);\n transform: skewX(20deg);\n opacity: 1;\n }\n\n 80% {\n -webkit-transform: skewX(-5deg);\n transform: skewX(-5deg);\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@-webkit-keyframes lightSpeedInRight-rtl {\n from {\n -webkit-transform: translate3d(-100%, 0, 0) skewX(30deg);\n transform: translate3d(-100%, 0, 0) skewX(30deg);\n opacity: 0;\n }\n\n 60% {\n -webkit-transform: skewX(-20deg);\n transform: skewX(-20deg);\n opacity: 1;\n }\n\n 80% {\n -webkit-transform: skewX(5deg);\n transform: skewX(5deg);\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes lightSpeedInRight-ltr {\n from {\n -webkit-transform: translate3d(100%, 0, 0) skewX(-30deg);\n transform: translate3d(100%, 0, 0) skewX(-30deg);\n opacity: 0;\n }\n\n 60% {\n -webkit-transform: skewX(20deg);\n transform: skewX(20deg);\n opacity: 1;\n }\n\n 80% {\n -webkit-transform: skewX(-5deg);\n transform: skewX(-5deg);\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes lightSpeedInRight-rtl {\n from {\n -webkit-transform: translate3d(-100%, 0, 0) skewX(30deg);\n transform: translate3d(-100%, 0, 0) skewX(30deg);\n opacity: 0;\n }\n\n 60% {\n -webkit-transform: skewX(-20deg);\n transform: skewX(-20deg);\n opacity: 1;\n }\n\n 80% {\n -webkit-transform: skewX(5deg);\n transform: skewX(5deg);\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n[dir=ltr] .animate__lightSpeedInRight {\n -webkit-animation-name: lightSpeedInRight-ltr ;\n animation-name: lightSpeedInRight-ltr ;\n -webkit-animation-timing-function: ease-out;\n animation-timing-function: ease-out;\n}\n[dir=rtl] .animate__lightSpeedInRight {\n -webkit-animation-name: lightSpeedInRight-rtl ;\n animation-name: lightSpeedInRight-rtl ;\n -webkit-animation-timing-function: ease-out;\n animation-timing-function: ease-out;\n}\n@-webkit-keyframes lightSpeedInLeft-ltr {\n from {\n -webkit-transform: translate3d(-100%, 0, 0) skewX(30deg);\n transform: translate3d(-100%, 0, 0) skewX(30deg);\n opacity: 0;\n }\n\n 60% {\n -webkit-transform: skewX(-20deg);\n transform: skewX(-20deg);\n opacity: 1;\n }\n\n 80% {\n -webkit-transform: skewX(5deg);\n transform: skewX(5deg);\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@-webkit-keyframes lightSpeedInLeft-rtl {\n from {\n -webkit-transform: translate3d(100%, 0, 0) skewX(-30deg);\n transform: translate3d(100%, 0, 0) skewX(-30deg);\n opacity: 0;\n }\n\n 60% {\n -webkit-transform: skewX(20deg);\n transform: skewX(20deg);\n opacity: 1;\n }\n\n 80% {\n -webkit-transform: skewX(-5deg);\n transform: skewX(-5deg);\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes lightSpeedInLeft-ltr {\n from {\n -webkit-transform: translate3d(-100%, 0, 0) skewX(30deg);\n transform: translate3d(-100%, 0, 0) skewX(30deg);\n opacity: 0;\n }\n\n 60% {\n -webkit-transform: skewX(-20deg);\n transform: skewX(-20deg);\n opacity: 1;\n }\n\n 80% {\n -webkit-transform: skewX(5deg);\n transform: skewX(5deg);\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes lightSpeedInLeft-rtl {\n from {\n -webkit-transform: translate3d(100%, 0, 0) skewX(-30deg);\n transform: translate3d(100%, 0, 0) skewX(-30deg);\n opacity: 0;\n }\n\n 60% {\n -webkit-transform: skewX(20deg);\n transform: skewX(20deg);\n opacity: 1;\n }\n\n 80% {\n -webkit-transform: skewX(-5deg);\n transform: skewX(-5deg);\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n[dir=ltr] .animate__lightSpeedInLeft {\n -webkit-animation-name: lightSpeedInLeft-ltr ;\n animation-name: lightSpeedInLeft-ltr ;\n -webkit-animation-timing-function: ease-out;\n animation-timing-function: ease-out;\n}\n[dir=rtl] .animate__lightSpeedInLeft {\n -webkit-animation-name: lightSpeedInLeft-rtl ;\n animation-name: lightSpeedInLeft-rtl ;\n -webkit-animation-timing-function: ease-out;\n animation-timing-function: ease-out;\n}\n@-webkit-keyframes lightSpeedOutRight-ltr {\n from {\n opacity: 1;\n }\n\n to {\n -webkit-transform: translate3d(100%, 0, 0) skewX(30deg);\n transform: translate3d(100%, 0, 0) skewX(30deg);\n opacity: 0;\n }\n}\n@-webkit-keyframes lightSpeedOutRight-rtl {\n from {\n opacity: 1;\n }\n\n to {\n -webkit-transform: translate3d(-100%, 0, 0) skewX(-30deg);\n transform: translate3d(-100%, 0, 0) skewX(-30deg);\n opacity: 0;\n }\n}\n@keyframes lightSpeedOutRight-ltr {\n from {\n opacity: 1;\n }\n\n to {\n -webkit-transform: translate3d(100%, 0, 0) skewX(30deg);\n transform: translate3d(100%, 0, 0) skewX(30deg);\n opacity: 0;\n }\n}\n@keyframes lightSpeedOutRight-rtl {\n from {\n opacity: 1;\n }\n\n to {\n -webkit-transform: translate3d(-100%, 0, 0) skewX(-30deg);\n transform: translate3d(-100%, 0, 0) skewX(-30deg);\n opacity: 0;\n }\n}\n[dir=ltr] .animate__lightSpeedOutRight {\n -webkit-animation-name: lightSpeedOutRight-ltr ;\n animation-name: lightSpeedOutRight-ltr ;\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n}\n[dir=rtl] .animate__lightSpeedOutRight {\n -webkit-animation-name: lightSpeedOutRight-rtl ;\n animation-name: lightSpeedOutRight-rtl ;\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n}\n@-webkit-keyframes lightSpeedOutLeft-ltr {\n from {\n opacity: 1;\n }\n\n to {\n -webkit-transform: translate3d(-100%, 0, 0) skewX(-30deg);\n transform: translate3d(-100%, 0, 0) skewX(-30deg);\n opacity: 0;\n }\n}\n@-webkit-keyframes lightSpeedOutLeft-rtl {\n from {\n opacity: 1;\n }\n\n to {\n -webkit-transform: translate3d(100%, 0, 0) skewX(30deg);\n transform: translate3d(100%, 0, 0) skewX(30deg);\n opacity: 0;\n }\n}\n@keyframes lightSpeedOutLeft-ltr {\n from {\n opacity: 1;\n }\n\n to {\n -webkit-transform: translate3d(-100%, 0, 0) skewX(-30deg);\n transform: translate3d(-100%, 0, 0) skewX(-30deg);\n opacity: 0;\n }\n}\n@keyframes lightSpeedOutLeft-rtl {\n from {\n opacity: 1;\n }\n\n to {\n -webkit-transform: translate3d(100%, 0, 0) skewX(30deg);\n transform: translate3d(100%, 0, 0) skewX(30deg);\n opacity: 0;\n }\n}\n[dir=ltr] .animate__lightSpeedOutLeft {\n -webkit-animation-name: lightSpeedOutLeft-ltr ;\n animation-name: lightSpeedOutLeft-ltr ;\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n}\n[dir=rtl] .animate__lightSpeedOutLeft {\n -webkit-animation-name: lightSpeedOutLeft-rtl ;\n animation-name: lightSpeedOutLeft-rtl ;\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n}\n/* Rotating entrances */\n@-webkit-keyframes rotateIn-ltr {\n from {\n -webkit-transform: rotate3d(0, 0, 1, -200deg);\n transform: rotate3d(0, 0, 1, -200deg);\n opacity: 0;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n opacity: 1;\n }\n}\n@-webkit-keyframes rotateIn-rtl {\n from {\n -webkit-transform: rotate3d(0, 0, 1, 200deg);\n transform: rotate3d(0, 0, 1, 200deg);\n opacity: 0;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n opacity: 1;\n }\n}\n@keyframes rotateIn-ltr {\n from {\n -webkit-transform: rotate3d(0, 0, 1, -200deg);\n transform: rotate3d(0, 0, 1, -200deg);\n opacity: 0;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n opacity: 1;\n }\n}\n@keyframes rotateIn-rtl {\n from {\n -webkit-transform: rotate3d(0, 0, 1, 200deg);\n transform: rotate3d(0, 0, 1, 200deg);\n opacity: 0;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n opacity: 1;\n }\n}\n.animate__rotateIn {\n -webkit-transform-origin: center;\n}\n[dir] .animate__rotateIn {\n -webkit-transform-origin: center;\n transform-origin: center;\n}\n[dir=ltr] .animate__rotateIn {\n -webkit-animation-name: rotateIn-ltr ;\n animation-name: rotateIn-ltr ;\n}\n[dir=rtl] .animate__rotateIn {\n -webkit-animation-name: rotateIn-rtl ;\n animation-name: rotateIn-rtl ;\n}\n@-webkit-keyframes rotateInDownLeft-ltr {\n from {\n -webkit-transform: rotate3d(0, 0, 1, -45deg);\n transform: rotate3d(0, 0, 1, -45deg);\n opacity: 0;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n opacity: 1;\n }\n}\n@-webkit-keyframes rotateInDownLeft-rtl {\n from {\n -webkit-transform: rotate3d(0, 0, 1, 45deg);\n transform: rotate3d(0, 0, 1, 45deg);\n opacity: 0;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n opacity: 1;\n }\n}\n@keyframes rotateInDownLeft-ltr {\n from {\n -webkit-transform: rotate3d(0, 0, 1, -45deg);\n transform: rotate3d(0, 0, 1, -45deg);\n opacity: 0;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n opacity: 1;\n }\n}\n@keyframes rotateInDownLeft-rtl {\n from {\n -webkit-transform: rotate3d(0, 0, 1, 45deg);\n transform: rotate3d(0, 0, 1, 45deg);\n opacity: 0;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n opacity: 1;\n }\n}\n[dir=ltr] .animate__rotateInDownLeft {\n -webkit-animation-name: rotateInDownLeft-ltr ;\n animation-name: rotateInDownLeft-ltr ;\n -webkit-transform-origin: left bottom;\n transform-origin: left bottom;\n}\n[dir=rtl] .animate__rotateInDownLeft {\n -webkit-animation-name: rotateInDownLeft-rtl ;\n animation-name: rotateInDownLeft-rtl ;\n -webkit-transform-origin: right bottom;\n transform-origin: right bottom;\n}\n@-webkit-keyframes rotateInDownRight-ltr {\n from {\n -webkit-transform: rotate3d(0, 0, 1, 45deg);\n transform: rotate3d(0, 0, 1, 45deg);\n opacity: 0;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n opacity: 1;\n }\n}\n@-webkit-keyframes rotateInDownRight-rtl {\n from {\n -webkit-transform: rotate3d(0, 0, 1, -45deg);\n transform: rotate3d(0, 0, 1, -45deg);\n opacity: 0;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n opacity: 1;\n }\n}\n@keyframes rotateInDownRight-ltr {\n from {\n -webkit-transform: rotate3d(0, 0, 1, 45deg);\n transform: rotate3d(0, 0, 1, 45deg);\n opacity: 0;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n opacity: 1;\n }\n}\n@keyframes rotateInDownRight-rtl {\n from {\n -webkit-transform: rotate3d(0, 0, 1, -45deg);\n transform: rotate3d(0, 0, 1, -45deg);\n opacity: 0;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n opacity: 1;\n }\n}\n[dir=ltr] .animate__rotateInDownRight {\n -webkit-animation-name: rotateInDownRight-ltr ;\n animation-name: rotateInDownRight-ltr ;\n -webkit-transform-origin: right bottom;\n transform-origin: right bottom;\n}\n[dir=rtl] .animate__rotateInDownRight {\n -webkit-animation-name: rotateInDownRight-rtl ;\n animation-name: rotateInDownRight-rtl ;\n -webkit-transform-origin: left bottom;\n transform-origin: left bottom;\n}\n@-webkit-keyframes rotateInUpLeft-ltr {\n from {\n -webkit-transform: rotate3d(0, 0, 1, 45deg);\n transform: rotate3d(0, 0, 1, 45deg);\n opacity: 0;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n opacity: 1;\n }\n}\n@-webkit-keyframes rotateInUpLeft-rtl {\n from {\n -webkit-transform: rotate3d(0, 0, 1, -45deg);\n transform: rotate3d(0, 0, 1, -45deg);\n opacity: 0;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n opacity: 1;\n }\n}\n@keyframes rotateInUpLeft-ltr {\n from {\n -webkit-transform: rotate3d(0, 0, 1, 45deg);\n transform: rotate3d(0, 0, 1, 45deg);\n opacity: 0;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n opacity: 1;\n }\n}\n@keyframes rotateInUpLeft-rtl {\n from {\n -webkit-transform: rotate3d(0, 0, 1, -45deg);\n transform: rotate3d(0, 0, 1, -45deg);\n opacity: 0;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n opacity: 1;\n }\n}\n[dir=ltr] .animate__rotateInUpLeft {\n -webkit-animation-name: rotateInUpLeft-ltr ;\n animation-name: rotateInUpLeft-ltr ;\n -webkit-transform-origin: left bottom;\n transform-origin: left bottom;\n}\n[dir=rtl] .animate__rotateInUpLeft {\n -webkit-animation-name: rotateInUpLeft-rtl ;\n animation-name: rotateInUpLeft-rtl ;\n -webkit-transform-origin: right bottom;\n transform-origin: right bottom;\n}\n@-webkit-keyframes rotateInUpRight-ltr {\n from {\n -webkit-transform: rotate3d(0, 0, 1, -90deg);\n transform: rotate3d(0, 0, 1, -90deg);\n opacity: 0;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n opacity: 1;\n }\n}\n@-webkit-keyframes rotateInUpRight-rtl {\n from {\n -webkit-transform: rotate3d(0, 0, 1, 90deg);\n transform: rotate3d(0, 0, 1, 90deg);\n opacity: 0;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n opacity: 1;\n }\n}\n@keyframes rotateInUpRight-ltr {\n from {\n -webkit-transform: rotate3d(0, 0, 1, -90deg);\n transform: rotate3d(0, 0, 1, -90deg);\n opacity: 0;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n opacity: 1;\n }\n}\n@keyframes rotateInUpRight-rtl {\n from {\n -webkit-transform: rotate3d(0, 0, 1, 90deg);\n transform: rotate3d(0, 0, 1, 90deg);\n opacity: 0;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n opacity: 1;\n }\n}\n[dir=ltr] .animate__rotateInUpRight {\n -webkit-animation-name: rotateInUpRight-ltr ;\n animation-name: rotateInUpRight-ltr ;\n -webkit-transform-origin: right bottom;\n transform-origin: right bottom;\n}\n[dir=rtl] .animate__rotateInUpRight {\n -webkit-animation-name: rotateInUpRight-rtl ;\n animation-name: rotateInUpRight-rtl ;\n -webkit-transform-origin: left bottom;\n transform-origin: left bottom;\n}\n/* Rotating exits */\n@-webkit-keyframes rotateOut-ltr {\n from {\n opacity: 1;\n }\n\n to {\n -webkit-transform: rotate3d(0, 0, 1, 200deg);\n transform: rotate3d(0, 0, 1, 200deg);\n opacity: 0;\n }\n}\n@-webkit-keyframes rotateOut-rtl {\n from {\n opacity: 1;\n }\n\n to {\n -webkit-transform: rotate3d(0, 0, 1, -200deg);\n transform: rotate3d(0, 0, 1, -200deg);\n opacity: 0;\n }\n}\n@keyframes rotateOut-ltr {\n from {\n opacity: 1;\n }\n\n to {\n -webkit-transform: rotate3d(0, 0, 1, 200deg);\n transform: rotate3d(0, 0, 1, 200deg);\n opacity: 0;\n }\n}\n@keyframes rotateOut-rtl {\n from {\n opacity: 1;\n }\n\n to {\n -webkit-transform: rotate3d(0, 0, 1, -200deg);\n transform: rotate3d(0, 0, 1, -200deg);\n opacity: 0;\n }\n}\n.animate__rotateOut {\n -webkit-transform-origin: center;\n}\n[dir] .animate__rotateOut {\n -webkit-transform-origin: center;\n transform-origin: center;\n}\n[dir=ltr] .animate__rotateOut {\n -webkit-animation-name: rotateOut-ltr ;\n animation-name: rotateOut-ltr ;\n}\n[dir=rtl] .animate__rotateOut {\n -webkit-animation-name: rotateOut-rtl ;\n animation-name: rotateOut-rtl ;\n}\n@-webkit-keyframes rotateOutDownLeft-ltr {\n from {\n opacity: 1;\n }\n\n to {\n -webkit-transform: rotate3d(0, 0, 1, 45deg);\n transform: rotate3d(0, 0, 1, 45deg);\n opacity: 0;\n }\n}\n@-webkit-keyframes rotateOutDownLeft-rtl {\n from {\n opacity: 1;\n }\n\n to {\n -webkit-transform: rotate3d(0, 0, 1, -45deg);\n transform: rotate3d(0, 0, 1, -45deg);\n opacity: 0;\n }\n}\n@keyframes rotateOutDownLeft-ltr {\n from {\n opacity: 1;\n }\n\n to {\n -webkit-transform: rotate3d(0, 0, 1, 45deg);\n transform: rotate3d(0, 0, 1, 45deg);\n opacity: 0;\n }\n}\n@keyframes rotateOutDownLeft-rtl {\n from {\n opacity: 1;\n }\n\n to {\n -webkit-transform: rotate3d(0, 0, 1, -45deg);\n transform: rotate3d(0, 0, 1, -45deg);\n opacity: 0;\n }\n}\n[dir=ltr] .animate__rotateOutDownLeft {\n -webkit-animation-name: rotateOutDownLeft-ltr ;\n animation-name: rotateOutDownLeft-ltr ;\n -webkit-transform-origin: left bottom;\n transform-origin: left bottom;\n}\n[dir=rtl] .animate__rotateOutDownLeft {\n -webkit-animation-name: rotateOutDownLeft-rtl ;\n animation-name: rotateOutDownLeft-rtl ;\n -webkit-transform-origin: right bottom;\n transform-origin: right bottom;\n}\n@-webkit-keyframes rotateOutDownRight-ltr {\n from {\n opacity: 1;\n }\n\n to {\n -webkit-transform: rotate3d(0, 0, 1, -45deg);\n transform: rotate3d(0, 0, 1, -45deg);\n opacity: 0;\n }\n}\n@-webkit-keyframes rotateOutDownRight-rtl {\n from {\n opacity: 1;\n }\n\n to {\n -webkit-transform: rotate3d(0, 0, 1, 45deg);\n transform: rotate3d(0, 0, 1, 45deg);\n opacity: 0;\n }\n}\n@keyframes rotateOutDownRight-ltr {\n from {\n opacity: 1;\n }\n\n to {\n -webkit-transform: rotate3d(0, 0, 1, -45deg);\n transform: rotate3d(0, 0, 1, -45deg);\n opacity: 0;\n }\n}\n@keyframes rotateOutDownRight-rtl {\n from {\n opacity: 1;\n }\n\n to {\n -webkit-transform: rotate3d(0, 0, 1, 45deg);\n transform: rotate3d(0, 0, 1, 45deg);\n opacity: 0;\n }\n}\n[dir=ltr] .animate__rotateOutDownRight {\n -webkit-animation-name: rotateOutDownRight-ltr ;\n animation-name: rotateOutDownRight-ltr ;\n -webkit-transform-origin: right bottom;\n transform-origin: right bottom;\n}\n[dir=rtl] .animate__rotateOutDownRight {\n -webkit-animation-name: rotateOutDownRight-rtl ;\n animation-name: rotateOutDownRight-rtl ;\n -webkit-transform-origin: left bottom;\n transform-origin: left bottom;\n}\n@-webkit-keyframes rotateOutUpLeft-ltr {\n from {\n opacity: 1;\n }\n\n to {\n -webkit-transform: rotate3d(0, 0, 1, -45deg);\n transform: rotate3d(0, 0, 1, -45deg);\n opacity: 0;\n }\n}\n@-webkit-keyframes rotateOutUpLeft-rtl {\n from {\n opacity: 1;\n }\n\n to {\n -webkit-transform: rotate3d(0, 0, 1, 45deg);\n transform: rotate3d(0, 0, 1, 45deg);\n opacity: 0;\n }\n}\n@keyframes rotateOutUpLeft-ltr {\n from {\n opacity: 1;\n }\n\n to {\n -webkit-transform: rotate3d(0, 0, 1, -45deg);\n transform: rotate3d(0, 0, 1, -45deg);\n opacity: 0;\n }\n}\n@keyframes rotateOutUpLeft-rtl {\n from {\n opacity: 1;\n }\n\n to {\n -webkit-transform: rotate3d(0, 0, 1, 45deg);\n transform: rotate3d(0, 0, 1, 45deg);\n opacity: 0;\n }\n}\n[dir=ltr] .animate__rotateOutUpLeft {\n -webkit-animation-name: rotateOutUpLeft-ltr ;\n animation-name: rotateOutUpLeft-ltr ;\n -webkit-transform-origin: left bottom;\n transform-origin: left bottom;\n}\n[dir=rtl] .animate__rotateOutUpLeft {\n -webkit-animation-name: rotateOutUpLeft-rtl ;\n animation-name: rotateOutUpLeft-rtl ;\n -webkit-transform-origin: right bottom;\n transform-origin: right bottom;\n}\n@-webkit-keyframes rotateOutUpRight-ltr {\n from {\n opacity: 1;\n }\n\n to {\n -webkit-transform: rotate3d(0, 0, 1, 90deg);\n transform: rotate3d(0, 0, 1, 90deg);\n opacity: 0;\n }\n}\n@-webkit-keyframes rotateOutUpRight-rtl {\n from {\n opacity: 1;\n }\n\n to {\n -webkit-transform: rotate3d(0, 0, 1, -90deg);\n transform: rotate3d(0, 0, 1, -90deg);\n opacity: 0;\n }\n}\n@keyframes rotateOutUpRight-ltr {\n from {\n opacity: 1;\n }\n\n to {\n -webkit-transform: rotate3d(0, 0, 1, 90deg);\n transform: rotate3d(0, 0, 1, 90deg);\n opacity: 0;\n }\n}\n@keyframes rotateOutUpRight-rtl {\n from {\n opacity: 1;\n }\n\n to {\n -webkit-transform: rotate3d(0, 0, 1, -90deg);\n transform: rotate3d(0, 0, 1, -90deg);\n opacity: 0;\n }\n}\n[dir=ltr] .animate__rotateOutUpRight {\n -webkit-animation-name: rotateOutUpRight-ltr ;\n animation-name: rotateOutUpRight-ltr ;\n -webkit-transform-origin: right bottom;\n transform-origin: right bottom;\n}\n[dir=rtl] .animate__rotateOutUpRight {\n -webkit-animation-name: rotateOutUpRight-rtl ;\n animation-name: rotateOutUpRight-rtl ;\n -webkit-transform-origin: left bottom;\n transform-origin: left bottom;\n}\n/* Specials */\n@-webkit-keyframes hinge-ltr {\n 0% {\n -webkit-animation-timing-function: ease-in-out;\n animation-timing-function: ease-in-out;\n }\n\n 20%,\n 60% {\n -webkit-transform: rotate3d(0, 0, 1, 80deg);\n transform: rotate3d(0, 0, 1, 80deg);\n -webkit-animation-timing-function: ease-in-out;\n animation-timing-function: ease-in-out;\n }\n\n 40%,\n 80% {\n -webkit-transform: rotate3d(0, 0, 1, 60deg);\n transform: rotate3d(0, 0, 1, 60deg);\n -webkit-animation-timing-function: ease-in-out;\n animation-timing-function: ease-in-out;\n opacity: 1;\n }\n\n to {\n -webkit-transform: translate3d(0, 700px, 0);\n transform: translate3d(0, 700px, 0);\n opacity: 0;\n }\n}\n@-webkit-keyframes hinge-rtl {\n 0% {\n -webkit-animation-timing-function: ease-in-out;\n animation-timing-function: ease-in-out;\n }\n\n 20%,\n 60% {\n -webkit-transform: rotate3d(0, 0, 1, -80deg);\n transform: rotate3d(0, 0, 1, -80deg);\n -webkit-animation-timing-function: ease-in-out;\n animation-timing-function: ease-in-out;\n }\n\n 40%,\n 80% {\n -webkit-transform: rotate3d(0, 0, 1, -60deg);\n transform: rotate3d(0, 0, 1, -60deg);\n -webkit-animation-timing-function: ease-in-out;\n animation-timing-function: ease-in-out;\n opacity: 1;\n }\n\n to {\n -webkit-transform: translate3d(0, 700px, 0);\n transform: translate3d(0, 700px, 0);\n opacity: 0;\n }\n}\n@keyframes hinge-ltr {\n 0% {\n -webkit-animation-timing-function: ease-in-out;\n animation-timing-function: ease-in-out;\n }\n\n 20%,\n 60% {\n -webkit-transform: rotate3d(0, 0, 1, 80deg);\n transform: rotate3d(0, 0, 1, 80deg);\n -webkit-animation-timing-function: ease-in-out;\n animation-timing-function: ease-in-out;\n }\n\n 40%,\n 80% {\n -webkit-transform: rotate3d(0, 0, 1, 60deg);\n transform: rotate3d(0, 0, 1, 60deg);\n -webkit-animation-timing-function: ease-in-out;\n animation-timing-function: ease-in-out;\n opacity: 1;\n }\n\n to {\n -webkit-transform: translate3d(0, 700px, 0);\n transform: translate3d(0, 700px, 0);\n opacity: 0;\n }\n}\n@keyframes hinge-rtl {\n 0% {\n -webkit-animation-timing-function: ease-in-out;\n animation-timing-function: ease-in-out;\n }\n\n 20%,\n 60% {\n -webkit-transform: rotate3d(0, 0, 1, -80deg);\n transform: rotate3d(0, 0, 1, -80deg);\n -webkit-animation-timing-function: ease-in-out;\n animation-timing-function: ease-in-out;\n }\n\n 40%,\n 80% {\n -webkit-transform: rotate3d(0, 0, 1, -60deg);\n transform: rotate3d(0, 0, 1, -60deg);\n -webkit-animation-timing-function: ease-in-out;\n animation-timing-function: ease-in-out;\n opacity: 1;\n }\n\n to {\n -webkit-transform: translate3d(0, 700px, 0);\n transform: translate3d(0, 700px, 0);\n opacity: 0;\n }\n}\n[dir=ltr] .animate__hinge {\n -webkit-animation-duration: calc(1s * 2);\n animation-duration: calc(1s * 2);\n -webkit-animation-duration: calc(var(--animate-duration) * 2);\n animation-duration: calc(var(--animate-duration) * 2);\n -webkit-animation-name: hinge-ltr ;\n animation-name: hinge-ltr ;\n -webkit-transform-origin: top left;\n transform-origin: top left;\n}\n[dir=rtl] .animate__hinge {\n -webkit-animation-duration: calc(1s * 2);\n animation-duration: calc(1s * 2);\n -webkit-animation-duration: calc(var(--animate-duration) * 2);\n animation-duration: calc(var(--animate-duration) * 2);\n -webkit-animation-name: hinge-rtl ;\n animation-name: hinge-rtl ;\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n@-webkit-keyframes jackInTheBox-ltr {\n from {\n opacity: 0;\n -webkit-transform: scale(0.1) rotate(30deg);\n transform: scale(0.1) rotate(30deg);\n -webkit-transform-origin: center bottom;\n transform-origin: center bottom;\n }\n\n 50% {\n -webkit-transform: rotate(-10deg);\n transform: rotate(-10deg);\n }\n\n 70% {\n -webkit-transform: rotate(3deg);\n transform: rotate(3deg);\n }\n\n to {\n opacity: 1;\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n}\n@-webkit-keyframes jackInTheBox-rtl {\n from {\n opacity: 0;\n -webkit-transform: scale(0.1) rotate(-30deg);\n transform: scale(0.1) rotate(-30deg);\n -webkit-transform-origin: center bottom;\n transform-origin: center bottom;\n }\n\n 50% {\n -webkit-transform: rotate(10deg);\n transform: rotate(10deg);\n }\n\n 70% {\n -webkit-transform: rotate(-3deg);\n transform: rotate(-3deg);\n }\n\n to {\n opacity: 1;\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n}\n@keyframes jackInTheBox-ltr {\n from {\n opacity: 0;\n -webkit-transform: scale(0.1) rotate(30deg);\n transform: scale(0.1) rotate(30deg);\n -webkit-transform-origin: center bottom;\n transform-origin: center bottom;\n }\n\n 50% {\n -webkit-transform: rotate(-10deg);\n transform: rotate(-10deg);\n }\n\n 70% {\n -webkit-transform: rotate(3deg);\n transform: rotate(3deg);\n }\n\n to {\n opacity: 1;\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n}\n@keyframes jackInTheBox-rtl {\n from {\n opacity: 0;\n -webkit-transform: scale(0.1) rotate(-30deg);\n transform: scale(0.1) rotate(-30deg);\n -webkit-transform-origin: center bottom;\n transform-origin: center bottom;\n }\n\n 50% {\n -webkit-transform: rotate(10deg);\n transform: rotate(10deg);\n }\n\n 70% {\n -webkit-transform: rotate(-3deg);\n transform: rotate(-3deg);\n }\n\n to {\n opacity: 1;\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n}\n[dir=ltr] .animate__jackInTheBox {\n -webkit-animation-name: jackInTheBox-ltr ;\n animation-name: jackInTheBox-ltr ;\n}\n[dir=rtl] .animate__jackInTheBox {\n -webkit-animation-name: jackInTheBox-rtl ;\n animation-name: jackInTheBox-rtl ;\n}\n/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */\n@-webkit-keyframes rollIn-ltr {\n from {\n opacity: 0;\n -webkit-transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);\n transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);\n }\n\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@-webkit-keyframes rollIn-rtl {\n from {\n opacity: 0;\n -webkit-transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);\n transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);\n }\n\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes rollIn-ltr {\n from {\n opacity: 0;\n -webkit-transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);\n transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);\n }\n\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes rollIn-rtl {\n from {\n opacity: 0;\n -webkit-transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);\n transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);\n }\n\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n[dir=ltr] .animate__rollIn {\n -webkit-animation-name: rollIn-ltr ;\n animation-name: rollIn-ltr ;\n}\n[dir=rtl] .animate__rollIn {\n -webkit-animation-name: rollIn-rtl ;\n animation-name: rollIn-rtl ;\n}\n/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */\n@-webkit-keyframes rollOut-ltr {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);\n transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);\n }\n}\n@-webkit-keyframes rollOut-rtl {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);\n transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);\n }\n}\n@keyframes rollOut-ltr {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);\n transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);\n }\n}\n@keyframes rollOut-rtl {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);\n transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);\n }\n}\n[dir=ltr] .animate__rollOut {\n -webkit-animation-name: rollOut-ltr ;\n animation-name: rollOut-ltr ;\n}\n[dir=rtl] .animate__rollOut {\n -webkit-animation-name: rollOut-rtl ;\n animation-name: rollOut-rtl ;\n}\n/* Zooming entrances */\n@-webkit-keyframes zoomIn {\n from {\n opacity: 0;\n -webkit-transform: scale3d(0.3, 0.3, 0.3);\n transform: scale3d(0.3, 0.3, 0.3);\n }\n\n 50% {\n opacity: 1;\n }\n}\n@keyframes zoomIn {\n from {\n opacity: 0;\n -webkit-transform: scale3d(0.3, 0.3, 0.3);\n transform: scale3d(0.3, 0.3, 0.3);\n }\n\n 50% {\n opacity: 1;\n }\n}\n[dir=ltr] .animate__zoomIn {\n -webkit-animation-name: zoomIn;\n animation-name: zoomIn;\n}\n[dir=rtl] .animate__zoomIn {\n -webkit-animation-name: zoomIn;\n animation-name: zoomIn;\n}\n@-webkit-keyframes zoomInDown {\n from {\n opacity: 0;\n -webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -1000px, 0);\n transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -1000px, 0);\n -webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n }\n\n 60% {\n opacity: 1;\n -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0);\n transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0);\n -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n }\n}\n@keyframes zoomInDown {\n from {\n opacity: 0;\n -webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -1000px, 0);\n transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -1000px, 0);\n -webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n }\n\n 60% {\n opacity: 1;\n -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0);\n transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0);\n -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n }\n}\n[dir=ltr] .animate__zoomInDown {\n -webkit-animation-name: zoomInDown;\n animation-name: zoomInDown;\n}\n[dir=rtl] .animate__zoomInDown {\n -webkit-animation-name: zoomInDown;\n animation-name: zoomInDown;\n}\n@-webkit-keyframes zoomInLeft-ltr {\n from {\n opacity: 0;\n -webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(-1000px, 0, 0);\n transform: scale3d(0.1, 0.1, 0.1) translate3d(-1000px, 0, 0);\n -webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n }\n\n 60% {\n opacity: 1;\n -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(10px, 0, 0);\n transform: scale3d(0.475, 0.475, 0.475) translate3d(10px, 0, 0);\n -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n }\n}\n@-webkit-keyframes zoomInLeft-rtl {\n from {\n opacity: 0;\n -webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(1000px, 0, 0);\n transform: scale3d(0.1, 0.1, 0.1) translate3d(1000px, 0, 0);\n -webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n }\n\n 60% {\n opacity: 1;\n -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(-10px, 0, 0);\n transform: scale3d(0.475, 0.475, 0.475) translate3d(-10px, 0, 0);\n -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n }\n}\n@keyframes zoomInLeft-ltr {\n from {\n opacity: 0;\n -webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(-1000px, 0, 0);\n transform: scale3d(0.1, 0.1, 0.1) translate3d(-1000px, 0, 0);\n -webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n }\n\n 60% {\n opacity: 1;\n -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(10px, 0, 0);\n transform: scale3d(0.475, 0.475, 0.475) translate3d(10px, 0, 0);\n -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n }\n}\n@keyframes zoomInLeft-rtl {\n from {\n opacity: 0;\n -webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(1000px, 0, 0);\n transform: scale3d(0.1, 0.1, 0.1) translate3d(1000px, 0, 0);\n -webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n }\n\n 60% {\n opacity: 1;\n -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(-10px, 0, 0);\n transform: scale3d(0.475, 0.475, 0.475) translate3d(-10px, 0, 0);\n -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n }\n}\n[dir=ltr] .animate__zoomInLeft {\n -webkit-animation-name: zoomInLeft-ltr ;\n animation-name: zoomInLeft-ltr ;\n}\n[dir=rtl] .animate__zoomInLeft {\n -webkit-animation-name: zoomInLeft-rtl ;\n animation-name: zoomInLeft-rtl ;\n}\n@-webkit-keyframes zoomInRight-ltr {\n from {\n opacity: 0;\n -webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(1000px, 0, 0);\n transform: scale3d(0.1, 0.1, 0.1) translate3d(1000px, 0, 0);\n -webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n }\n\n 60% {\n opacity: 1;\n -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(-10px, 0, 0);\n transform: scale3d(0.475, 0.475, 0.475) translate3d(-10px, 0, 0);\n -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n }\n}\n@-webkit-keyframes zoomInRight-rtl {\n from {\n opacity: 0;\n -webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(-1000px, 0, 0);\n transform: scale3d(0.1, 0.1, 0.1) translate3d(-1000px, 0, 0);\n -webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n }\n\n 60% {\n opacity: 1;\n -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(10px, 0, 0);\n transform: scale3d(0.475, 0.475, 0.475) translate3d(10px, 0, 0);\n -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n }\n}\n@keyframes zoomInRight-ltr {\n from {\n opacity: 0;\n -webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(1000px, 0, 0);\n transform: scale3d(0.1, 0.1, 0.1) translate3d(1000px, 0, 0);\n -webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n }\n\n 60% {\n opacity: 1;\n -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(-10px, 0, 0);\n transform: scale3d(0.475, 0.475, 0.475) translate3d(-10px, 0, 0);\n -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n }\n}\n@keyframes zoomInRight-rtl {\n from {\n opacity: 0;\n -webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(-1000px, 0, 0);\n transform: scale3d(0.1, 0.1, 0.1) translate3d(-1000px, 0, 0);\n -webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n }\n\n 60% {\n opacity: 1;\n -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(10px, 0, 0);\n transform: scale3d(0.475, 0.475, 0.475) translate3d(10px, 0, 0);\n -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n }\n}\n[dir=ltr] .animate__zoomInRight {\n -webkit-animation-name: zoomInRight-ltr ;\n animation-name: zoomInRight-ltr ;\n}\n[dir=rtl] .animate__zoomInRight {\n -webkit-animation-name: zoomInRight-rtl ;\n animation-name: zoomInRight-rtl ;\n}\n@-webkit-keyframes zoomInUp {\n from {\n opacity: 0;\n -webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 1000px, 0);\n transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 1000px, 0);\n -webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n }\n\n 60% {\n opacity: 1;\n -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0);\n transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0);\n -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n }\n}\n@keyframes zoomInUp {\n from {\n opacity: 0;\n -webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 1000px, 0);\n transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 1000px, 0);\n -webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n }\n\n 60% {\n opacity: 1;\n -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0);\n transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0);\n -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n }\n}\n[dir=ltr] .animate__zoomInUp {\n -webkit-animation-name: zoomInUp;\n animation-name: zoomInUp;\n}\n[dir=rtl] .animate__zoomInUp {\n -webkit-animation-name: zoomInUp;\n animation-name: zoomInUp;\n}\n/* Zooming exits */\n@-webkit-keyframes zoomOut {\n from {\n opacity: 1;\n }\n\n 50% {\n opacity: 0;\n -webkit-transform: scale3d(0.3, 0.3, 0.3);\n transform: scale3d(0.3, 0.3, 0.3);\n }\n\n to {\n opacity: 0;\n }\n}\n@keyframes zoomOut {\n from {\n opacity: 1;\n }\n\n 50% {\n opacity: 0;\n -webkit-transform: scale3d(0.3, 0.3, 0.3);\n transform: scale3d(0.3, 0.3, 0.3);\n }\n\n to {\n opacity: 0;\n }\n}\n[dir=ltr] .animate__zoomOut {\n -webkit-animation-name: zoomOut;\n animation-name: zoomOut;\n}\n[dir=rtl] .animate__zoomOut {\n -webkit-animation-name: zoomOut;\n animation-name: zoomOut;\n}\n@-webkit-keyframes zoomOutDown {\n 40% {\n opacity: 1;\n -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0);\n transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0);\n -webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n }\n\n to {\n opacity: 0;\n -webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 2000px, 0);\n transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 2000px, 0);\n -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n }\n}\n@keyframes zoomOutDown {\n 40% {\n opacity: 1;\n -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0);\n transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0);\n -webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n }\n\n to {\n opacity: 0;\n -webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 2000px, 0);\n transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 2000px, 0);\n -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n }\n}\n.animate__zoomOutDown {\n -webkit-transform-origin: center bottom;\n}\n[dir] .animate__zoomOutDown {\n -webkit-transform-origin: center bottom;\n transform-origin: center bottom;\n}\n[dir=ltr] .animate__zoomOutDown {\n -webkit-animation-name: zoomOutDown;\n animation-name: zoomOutDown;\n}\n[dir=rtl] .animate__zoomOutDown {\n -webkit-animation-name: zoomOutDown;\n animation-name: zoomOutDown;\n}\n@-webkit-keyframes zoomOutLeft-ltr {\n 40% {\n opacity: 1;\n -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(42px, 0, 0);\n transform: scale3d(0.475, 0.475, 0.475) translate3d(42px, 0, 0);\n }\n\n to {\n opacity: 0;\n -webkit-transform: scale(0.1) translate3d(-2000px, 0, 0);\n transform: scale(0.1) translate3d(-2000px, 0, 0);\n }\n}\n@-webkit-keyframes zoomOutLeft-rtl {\n 40% {\n opacity: 1;\n -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(-42px, 0, 0);\n transform: scale3d(0.475, 0.475, 0.475) translate3d(-42px, 0, 0);\n }\n\n to {\n opacity: 0;\n -webkit-transform: scale(0.1) translate3d(2000px, 0, 0);\n transform: scale(0.1) translate3d(2000px, 0, 0);\n }\n}\n@keyframes zoomOutLeft-ltr {\n 40% {\n opacity: 1;\n -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(42px, 0, 0);\n transform: scale3d(0.475, 0.475, 0.475) translate3d(42px, 0, 0);\n }\n\n to {\n opacity: 0;\n -webkit-transform: scale(0.1) translate3d(-2000px, 0, 0);\n transform: scale(0.1) translate3d(-2000px, 0, 0);\n }\n}\n@keyframes zoomOutLeft-rtl {\n 40% {\n opacity: 1;\n -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(-42px, 0, 0);\n transform: scale3d(0.475, 0.475, 0.475) translate3d(-42px, 0, 0);\n }\n\n to {\n opacity: 0;\n -webkit-transform: scale(0.1) translate3d(2000px, 0, 0);\n transform: scale(0.1) translate3d(2000px, 0, 0);\n }\n}\n[dir=ltr] .animate__zoomOutLeft {\n -webkit-animation-name: zoomOutLeft-ltr ;\n animation-name: zoomOutLeft-ltr ;\n -webkit-transform-origin: left center;\n transform-origin: left center;\n}\n[dir=rtl] .animate__zoomOutLeft {\n -webkit-animation-name: zoomOutLeft-rtl ;\n animation-name: zoomOutLeft-rtl ;\n -webkit-transform-origin: right center;\n transform-origin: right center;\n}\n@-webkit-keyframes zoomOutRight-ltr {\n 40% {\n opacity: 1;\n -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(-42px, 0, 0);\n transform: scale3d(0.475, 0.475, 0.475) translate3d(-42px, 0, 0);\n }\n\n to {\n opacity: 0;\n -webkit-transform: scale(0.1) translate3d(2000px, 0, 0);\n transform: scale(0.1) translate3d(2000px, 0, 0);\n }\n}\n@-webkit-keyframes zoomOutRight-rtl {\n 40% {\n opacity: 1;\n -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(42px, 0, 0);\n transform: scale3d(0.475, 0.475, 0.475) translate3d(42px, 0, 0);\n }\n\n to {\n opacity: 0;\n -webkit-transform: scale(0.1) translate3d(-2000px, 0, 0);\n transform: scale(0.1) translate3d(-2000px, 0, 0);\n }\n}\n@keyframes zoomOutRight-ltr {\n 40% {\n opacity: 1;\n -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(-42px, 0, 0);\n transform: scale3d(0.475, 0.475, 0.475) translate3d(-42px, 0, 0);\n }\n\n to {\n opacity: 0;\n -webkit-transform: scale(0.1) translate3d(2000px, 0, 0);\n transform: scale(0.1) translate3d(2000px, 0, 0);\n }\n}\n@keyframes zoomOutRight-rtl {\n 40% {\n opacity: 1;\n -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(42px, 0, 0);\n transform: scale3d(0.475, 0.475, 0.475) translate3d(42px, 0, 0);\n }\n\n to {\n opacity: 0;\n -webkit-transform: scale(0.1) translate3d(-2000px, 0, 0);\n transform: scale(0.1) translate3d(-2000px, 0, 0);\n }\n}\n[dir=ltr] .animate__zoomOutRight {\n -webkit-animation-name: zoomOutRight-ltr ;\n animation-name: zoomOutRight-ltr ;\n -webkit-transform-origin: right center;\n transform-origin: right center;\n}\n[dir=rtl] .animate__zoomOutRight {\n -webkit-animation-name: zoomOutRight-rtl ;\n animation-name: zoomOutRight-rtl ;\n -webkit-transform-origin: left center;\n transform-origin: left center;\n}\n@-webkit-keyframes zoomOutUp {\n 40% {\n opacity: 1;\n -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0);\n transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0);\n -webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n }\n\n to {\n opacity: 0;\n -webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -2000px, 0);\n transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -2000px, 0);\n -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n }\n}\n@keyframes zoomOutUp {\n 40% {\n opacity: 1;\n -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0);\n transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0);\n -webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n }\n\n to {\n opacity: 0;\n -webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -2000px, 0);\n transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -2000px, 0);\n -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);\n }\n}\n.animate__zoomOutUp {\n -webkit-transform-origin: center bottom;\n}\n[dir] .animate__zoomOutUp {\n -webkit-transform-origin: center bottom;\n transform-origin: center bottom;\n}\n[dir=ltr] .animate__zoomOutUp {\n -webkit-animation-name: zoomOutUp;\n animation-name: zoomOutUp;\n}\n[dir=rtl] .animate__zoomOutUp {\n -webkit-animation-name: zoomOutUp;\n animation-name: zoomOutUp;\n}\n/* Sliding entrances */\n@-webkit-keyframes slideInDown {\n from {\n -webkit-transform: translate3d(0, -100%, 0);\n transform: translate3d(0, -100%, 0);\n visibility: visible;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes slideInDown {\n from {\n -webkit-transform: translate3d(0, -100%, 0);\n transform: translate3d(0, -100%, 0);\n visibility: visible;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n[dir=ltr] .animate__slideInDown {\n -webkit-animation-name: slideInDown;\n animation-name: slideInDown;\n}\n[dir=rtl] .animate__slideInDown {\n -webkit-animation-name: slideInDown;\n animation-name: slideInDown;\n}\n@-webkit-keyframes slideInLeft-ltr {\n from {\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n visibility: visible;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@-webkit-keyframes slideInLeft-rtl {\n from {\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n visibility: visible;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes slideInLeft-ltr {\n from {\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n visibility: visible;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes slideInLeft-rtl {\n from {\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n visibility: visible;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n[dir=ltr] .animate__slideInLeft {\n -webkit-animation-name: slideInLeft-ltr ;\n animation-name: slideInLeft-ltr ;\n}\n[dir=rtl] .animate__slideInLeft {\n -webkit-animation-name: slideInLeft-rtl ;\n animation-name: slideInLeft-rtl ;\n}\n@-webkit-keyframes slideInRight-ltr {\n from {\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n visibility: visible;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@-webkit-keyframes slideInRight-rtl {\n from {\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n visibility: visible;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes slideInRight-ltr {\n from {\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n visibility: visible;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes slideInRight-rtl {\n from {\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n visibility: visible;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n[dir=ltr] .animate__slideInRight {\n -webkit-animation-name: slideInRight-ltr ;\n animation-name: slideInRight-ltr ;\n}\n[dir=rtl] .animate__slideInRight {\n -webkit-animation-name: slideInRight-rtl ;\n animation-name: slideInRight-rtl ;\n}\n@-webkit-keyframes slideInUp {\n from {\n -webkit-transform: translate3d(0, 100%, 0);\n transform: translate3d(0, 100%, 0);\n visibility: visible;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes slideInUp {\n from {\n -webkit-transform: translate3d(0, 100%, 0);\n transform: translate3d(0, 100%, 0);\n visibility: visible;\n }\n\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n[dir=ltr] .animate__slideInUp {\n -webkit-animation-name: slideInUp;\n animation-name: slideInUp;\n}\n[dir=rtl] .animate__slideInUp {\n -webkit-animation-name: slideInUp;\n animation-name: slideInUp;\n}\n/* Sliding exits */\n@-webkit-keyframes slideOutDown {\n from {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n to {\n visibility: hidden;\n -webkit-transform: translate3d(0, 100%, 0);\n transform: translate3d(0, 100%, 0);\n }\n}\n@keyframes slideOutDown {\n from {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n to {\n visibility: hidden;\n -webkit-transform: translate3d(0, 100%, 0);\n transform: translate3d(0, 100%, 0);\n }\n}\n[dir=ltr] .animate__slideOutDown {\n -webkit-animation-name: slideOutDown;\n animation-name: slideOutDown;\n}\n[dir=rtl] .animate__slideOutDown {\n -webkit-animation-name: slideOutDown;\n animation-name: slideOutDown;\n}\n@-webkit-keyframes slideOutLeft-ltr {\n from {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n to {\n visibility: hidden;\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n }\n}\n@-webkit-keyframes slideOutLeft-rtl {\n from {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n to {\n visibility: hidden;\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n }\n}\n@keyframes slideOutLeft-ltr {\n from {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n to {\n visibility: hidden;\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n }\n}\n@keyframes slideOutLeft-rtl {\n from {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n to {\n visibility: hidden;\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n }\n}\n[dir=ltr] .animate__slideOutLeft {\n -webkit-animation-name: slideOutLeft-ltr ;\n animation-name: slideOutLeft-ltr ;\n}\n[dir=rtl] .animate__slideOutLeft {\n -webkit-animation-name: slideOutLeft-rtl ;\n animation-name: slideOutLeft-rtl ;\n}\n@-webkit-keyframes slideOutRight-ltr {\n from {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n to {\n visibility: hidden;\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n }\n}\n@-webkit-keyframes slideOutRight-rtl {\n from {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n to {\n visibility: hidden;\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n }\n}\n@keyframes slideOutRight-ltr {\n from {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n to {\n visibility: hidden;\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n }\n}\n@keyframes slideOutRight-rtl {\n from {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n to {\n visibility: hidden;\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n }\n}\n[dir=ltr] .animate__slideOutRight {\n -webkit-animation-name: slideOutRight-ltr ;\n animation-name: slideOutRight-ltr ;\n}\n[dir=rtl] .animate__slideOutRight {\n -webkit-animation-name: slideOutRight-rtl ;\n animation-name: slideOutRight-rtl ;\n}\n@-webkit-keyframes slideOutUp {\n from {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n to {\n visibility: hidden;\n -webkit-transform: translate3d(0, -100%, 0);\n transform: translate3d(0, -100%, 0);\n }\n}\n@keyframes slideOutUp {\n from {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n to {\n visibility: hidden;\n -webkit-transform: translate3d(0, -100%, 0);\n transform: translate3d(0, -100%, 0);\n }\n}\n[dir=ltr] .animate__slideOutUp {\n -webkit-animation-name: slideOutUp;\n animation-name: slideOutUp;\n}\n[dir=rtl] .animate__slideOutUp {\n -webkit-animation-name: slideOutUp;\n animation-name: slideOutUp;\n}\n", ""]);
// exports
/***/ })
}]);
|
import collections
import itertools
import os
import typing
from qtpy import QtCore as QC
from qtpy import QtWidgets as QW
from hydrus.core import HydrusConstants as HC
from hydrus.core import HydrusData
from hydrus.core import HydrusExceptions
from hydrus.core import HydrusGlobals as HG
from hydrus.core import HydrusTags
from hydrus.core import HydrusText
from hydrus.client import ClientApplicationCommand as CAC
from hydrus.client import ClientConstants as CC
from hydrus.client import ClientLocation
from hydrus.client import ClientSearch
from hydrus.client import ClientThreading
from hydrus.client.gui import ClientGUICore as CGC
from hydrus.client.gui import ClientGUIFunctions
from hydrus.client.gui import ClientGUIMenus
from hydrus.client.gui import ClientGUIScrolledPanels
from hydrus.client.gui import ClientGUIShortcuts
from hydrus.client.gui import ClientGUITopLevelWindowsPanels
from hydrus.client.gui import QtPorting as QP
from hydrus.client.gui.lists import ClientGUIListBoxes
from hydrus.client.gui.pages import ClientGUIResultsSortCollect
from hydrus.client.gui.search import ClientGUILocation
from hydrus.client.gui.search import ClientGUISearch
from hydrus.client.gui.widgets import ClientGUICommon
from hydrus.client.metadata import ClientTags
from hydrus.external import LogicExpressionQueryParser
def AppendLoadingPredicate( predicates ):
predicates.append( ClientSearch.Predicate( predicate_type = ClientSearch.PREDICATE_TYPE_LABEL, value = 'loading results\u2026' ) )
def InsertOtherPredicatesForRead( predicates: list, parsed_autocomplete_text: ClientSearch.ParsedAutocompleteText, include_unusual_predicate_types: bool, under_construction_or_predicate: typing.Optional[ ClientSearch.Predicate ] ):
if include_unusual_predicate_types:
non_tag_predicates = list( parsed_autocomplete_text.GetNonTagFileSearchPredicates() )
non_tag_predicates.reverse()
for predicate in non_tag_predicates:
PutAtTopOfMatches( predicates, predicate )
if under_construction_or_predicate is not None:
PutAtTopOfMatches( predicates, under_construction_or_predicate )
def InsertTagPredicates( predicates: list, tag_service_key: bytes, parsed_autocomplete_text: ClientSearch.ParsedAutocompleteText, insert_if_does_not_exist: bool = True ):
if parsed_autocomplete_text.IsTagSearch():
tag_predicate = parsed_autocomplete_text.GetImmediateFileSearchPredicate()
actual_tag = tag_predicate.GetValue()
ideal_predicate = None
other_matching_predicates = []
for predicate in predicates:
# this works due to __hash__
if predicate == tag_predicate:
ideal_predicate = predicate.GetIdealPredicate()
continue
matchable_search_texts = predicate.GetMatchableSearchTexts()
if len( matchable_search_texts ) <= 1:
continue
if actual_tag in matchable_search_texts:
other_matching_predicates.append( predicate )
for predicate in other_matching_predicates:
PutAtTopOfMatches( predicates, predicate, insert_if_does_not_exist = insert_if_does_not_exist )
PutAtTopOfMatches( predicates, tag_predicate, insert_if_does_not_exist = insert_if_does_not_exist )
if ideal_predicate is not None:
PutAtTopOfMatches( predicates, ideal_predicate, insert_if_does_not_exist = insert_if_does_not_exist )
def ReadFetch(
win: QW.QWidget,
job_key: ClientThreading.JobKey,
results_callable,
parsed_autocomplete_text: ClientSearch.ParsedAutocompleteText,
qt_media_callable,
file_search_context: ClientSearch.FileSearchContext,
synchronised,
include_unusual_predicate_types,
results_cache: ClientSearch.PredicateResultsCache,
under_construction_or_predicate,
force_system_everything
):
tag_search_context = file_search_context.GetTagSearchContext()
tag_service_key = tag_search_context.service_key
if not parsed_autocomplete_text.IsAcceptableForTagSearches():
if parsed_autocomplete_text.IsEmpty():
cache_valid = isinstance( results_cache, ClientSearch.PredicateResultsCacheSystem )
we_need_results = not cache_valid
db_not_going_to_hang_if_we_hit_it = not HG.client_controller.DBCurrentlyDoingJob()
if we_need_results or db_not_going_to_hang_if_we_hit_it:
predicates = HG.client_controller.Read( 'file_system_predicates', file_search_context, force_system_everything = force_system_everything )
results_cache = ClientSearch.PredicateResultsCacheSystem( predicates )
matches = predicates
else:
matches = results_cache.GetPredicates()
else:
# if the user inputs '-' or 'creator:' or similar, let's go to an empty list
matches = []
else:
fetch_from_db = True
if synchronised and qt_media_callable is not None and not file_search_context.GetSystemPredicates().HasSystemLimit():
try:
media = HG.client_controller.CallBlockingToQt( win, qt_media_callable )
except HydrusExceptions.QtDeadWindowException:
return
if job_key.IsCancelled():
return
media_available_and_good = media is not None and len( media ) > 0
if media_available_and_good:
fetch_from_db = False
strict_search_text = parsed_autocomplete_text.GetSearchText( False )
autocomplete_search_text = parsed_autocomplete_text.GetSearchText( True )
# if user searches 'blah', then we include 'blah (23)' for 'series:blah (10)', 'blah (13)'
# if they search for 'series:blah', then we don't!
add_namespaceless = ':' not in strict_search_text
if fetch_from_db:
is_explicit_wildcard = parsed_autocomplete_text.IsExplicitWildcard()
small_exact_match_search = ShouldDoExactSearch( parsed_autocomplete_text )
matches = []
if small_exact_match_search:
if not results_cache.CanServeTagResults( parsed_autocomplete_text, True ):
predicates = HG.client_controller.Read( 'autocomplete_predicates', ClientTags.TAG_DISPLAY_ACTUAL, file_search_context, search_text = strict_search_text, exact_match = True, inclusive = parsed_autocomplete_text.inclusive, add_namespaceless = add_namespaceless, job_key = job_key )
results_cache = ClientSearch.PredicateResultsCacheTag( predicates, strict_search_text, True )
matches = results_cache.FilterPredicates( tag_service_key, strict_search_text )
else:
if is_explicit_wildcard:
cache_valid = False
else:
cache_valid = results_cache.CanServeTagResults( parsed_autocomplete_text, False )
if cache_valid:
matches = results_cache.FilterPredicates( tag_service_key, autocomplete_search_text )
else:
search_namespaces_into_full_tags = parsed_autocomplete_text.GetTagAutocompleteOptions().SearchNamespacesIntoFullTags()
predicates = HG.client_controller.Read( 'autocomplete_predicates', ClientTags.TAG_DISPLAY_ACTUAL, file_search_context, search_text = autocomplete_search_text, inclusive = parsed_autocomplete_text.inclusive, add_namespaceless = add_namespaceless, job_key = job_key, search_namespaces_into_full_tags = search_namespaces_into_full_tags )
if job_key.IsCancelled():
return
if is_explicit_wildcard:
matches = ClientSearch.FilterPredicatesBySearchText( tag_service_key, autocomplete_search_text, predicates )
else:
results_cache = ClientSearch.PredicateResultsCacheTag( predicates, strict_search_text, False )
matches = results_cache.FilterPredicates( tag_service_key, autocomplete_search_text )
if job_key.IsCancelled():
return
else:
if not isinstance( results_cache, ClientSearch.PredicateResultsCacheMedia ):
# it is possible that media will change between calls to this, so don't cache it
tags_managers = []
for m in media:
if m.IsCollection():
tags_managers.extend( m.GetSingletonsTagsManagers() )
else:
tags_managers.append( m.GetTagsManager() )
if job_key.IsCancelled():
return
current_tags_to_count = collections.Counter()
pending_tags_to_count = collections.Counter()
include_current_tags = tag_search_context.include_current_tags
include_pending_tags = tag_search_context.include_pending_tags
for group_of_tags_managers in HydrusData.SplitListIntoChunks( tags_managers, 1000 ):
if include_current_tags:
current_tags_to_count.update( itertools.chain.from_iterable( tags_manager.GetCurrent( tag_service_key, ClientTags.TAG_DISPLAY_ACTUAL ) for tags_manager in group_of_tags_managers ) )
if include_pending_tags:
pending_tags_to_count.update( itertools.chain.from_iterable( [ tags_manager.GetPending( tag_service_key, ClientTags.TAG_DISPLAY_ACTUAL ) for tags_manager in group_of_tags_managers ] ) )
if job_key.IsCancelled():
return
tags_to_do = set()
tags_to_do.update( current_tags_to_count.keys() )
tags_to_do.update( pending_tags_to_count.keys() )
tags_to_count = { tag : ( current_tags_to_count[ tag ], pending_tags_to_count[ tag ] ) for tag in tags_to_do }
if job_key.IsCancelled():
return
predicates = HG.client_controller.Read( 'media_predicates', tag_search_context, tags_to_count, parsed_autocomplete_text.inclusive, job_key = job_key )
results_cache = ClientSearch.PredicateResultsCacheMedia( predicates )
if job_key.IsCancelled():
return
predicates = results_cache.FilterPredicates( tag_service_key, autocomplete_search_text )
if job_key.IsCancelled():
return
predicates = ClientSearch.MergePredicates( predicates, add_namespaceless = add_namespaceless )
matches = predicates
matches = ClientSearch.SortPredicates( matches )
if not parsed_autocomplete_text.inclusive:
for match in matches:
match.SetInclusive( False )
InsertTagPredicates( matches, tag_service_key, parsed_autocomplete_text, insert_if_does_not_exist = False )
InsertOtherPredicatesForRead( matches, parsed_autocomplete_text, include_unusual_predicate_types, under_construction_or_predicate )
if job_key.IsCancelled():
return
HG.client_controller.CallAfterQtSafe( win, 'read a/c fetch', results_callable, job_key, parsed_autocomplete_text, results_cache, matches )
def PutAtTopOfMatches( matches: list, predicate: ClientSearch.Predicate, insert_if_does_not_exist: bool = True ):
# we have to be careful here to preserve autocomplete counts!
# if it already exists, we move it up, do not replace with the test pred param
if predicate in matches:
index = matches.index( predicate )
predicate_to_insert = matches[ index ]
del matches[ index ]
matches.insert( 0, predicate_to_insert )
else:
if insert_if_does_not_exist:
matches.insert( 0, predicate )
def ShouldDoExactSearch( parsed_autocomplete_text: ClientSearch.ParsedAutocompleteText ):
if parsed_autocomplete_text.IsExplicitWildcard():
return False
strict_search_text = parsed_autocomplete_text.GetSearchText( False )
exact_match_character_threshold = parsed_autocomplete_text.GetTagAutocompleteOptions().GetExactMatchCharacterThreshold()
if exact_match_character_threshold is None:
return False
if ':' in strict_search_text:
( namespace, test_text ) = HydrusTags.SplitTag( strict_search_text )
else:
test_text = strict_search_text
if len( test_text ) == 0:
return False
return len( test_text ) <= exact_match_character_threshold
def WriteFetch( win, job_key, results_callable, parsed_autocomplete_text: ClientSearch.ParsedAutocompleteText, file_search_context: ClientSearch.FileSearchContext, results_cache: ClientSearch.PredicateResultsCache ):
tag_search_context = file_search_context.GetTagSearchContext()
display_tag_service_key = tag_search_context.display_service_key
if not parsed_autocomplete_text.IsAcceptableForTagSearches():
matches = []
else:
is_explicit_wildcard = parsed_autocomplete_text.IsExplicitWildcard()
strict_search_text = parsed_autocomplete_text.GetSearchText( False )
autocomplete_search_text = parsed_autocomplete_text.GetSearchText( True )
small_exact_match_search = ShouldDoExactSearch( parsed_autocomplete_text )
if small_exact_match_search:
if not results_cache.CanServeTagResults( parsed_autocomplete_text, True ):
predicates = HG.client_controller.Read( 'autocomplete_predicates', ClientTags.TAG_DISPLAY_STORAGE, file_search_context, search_text = strict_search_text, exact_match = True, add_namespaceless = False, job_key = job_key )
results_cache = ClientSearch.PredicateResultsCacheTag( predicates, strict_search_text, True )
matches = results_cache.FilterPredicates( display_tag_service_key, strict_search_text )
else:
if is_explicit_wildcard:
cache_valid = False
else:
cache_valid = results_cache.CanServeTagResults( parsed_autocomplete_text, False )
if cache_valid:
matches = results_cache.FilterPredicates( display_tag_service_key, autocomplete_search_text )
else:
search_namespaces_into_full_tags = parsed_autocomplete_text.GetTagAutocompleteOptions().SearchNamespacesIntoFullTags()
predicates = HG.client_controller.Read( 'autocomplete_predicates', ClientTags.TAG_DISPLAY_STORAGE, file_search_context, search_text = autocomplete_search_text, add_namespaceless = False, job_key = job_key, search_namespaces_into_full_tags = search_namespaces_into_full_tags )
if is_explicit_wildcard:
matches = ClientSearch.FilterPredicatesBySearchText( display_tag_service_key, autocomplete_search_text, predicates )
else:
results_cache = ClientSearch.PredicateResultsCacheTag( predicates, strict_search_text, False )
matches = results_cache.FilterPredicates( display_tag_service_key, autocomplete_search_text )
if not is_explicit_wildcard:
# this lets us get sibling data for tags that do not exist with count in the domain
# we always do this, because results cache will not have current text input data
input_text_predicates = HG.client_controller.Read( 'autocomplete_predicates', ClientTags.TAG_DISPLAY_STORAGE, file_search_context, search_text = strict_search_text, exact_match = True, add_namespaceless = False, zero_count_ok = True, job_key = job_key )
for input_text_predicate in input_text_predicates:
if ( input_text_predicate.HasIdealSibling() or input_text_predicate.HasParentPredicates() ) and input_text_predicate not in matches:
matches.append( input_text_predicate )
matches = ClientSearch.SortPredicates( matches )
InsertTagPredicates( matches, display_tag_service_key, parsed_autocomplete_text )
HG.client_controller.CallAfterQtSafe( win, 'write a/c fetch', results_callable, job_key, parsed_autocomplete_text, results_cache, matches )
class ListBoxTagsPredicatesAC( ClientGUIListBoxes.ListBoxTagsPredicates ):
def __init__( self, parent, callable, service_key, float_mode, **kwargs ):
ClientGUIListBoxes.ListBoxTagsPredicates.__init__( self, parent, **kwargs )
self._callable = callable
self._service_key = service_key
self._float_mode = float_mode
self._predicates = {}
def _Activate( self, ctrl_down, shift_down ) -> bool:
predicates = self._GetPredicatesFromTerms( self._selected_terms )
if self._float_mode:
widget = self.window().parentWidget()
if not QP.isValid( widget ):
# seems to be a dialog posting late or similar
return False
else:
widget = self
predicates = ClientGUISearch.FleshOutPredicates( widget, predicates )
if len( predicates ) > 0:
self._callable( predicates, shift_down )
return True
return False
def _GenerateTermFromPredicate( self, predicate: ClientSearch.Predicate ):
term = ClientGUIListBoxes.ListBoxTagsPredicates._GenerateTermFromPredicate( self, predicate )
if predicate.GetType() == ClientSearch.PREDICATE_TYPE_OR_CONTAINER:
term.SetORUnderConstruction( True )
return term
def SetPredicates( self, predicates ):
# need to do a clever compare, since normal predicate compare doesn't take count into account
they_are_the_same = True
if len( predicates ) == len( self._predicates ):
for index in range( len( predicates ) ):
p_1 = predicates[ index ]
p_2 = self._predicates[ index ]
if p_1 != p_2 or p_1.GetCount() != p_2.GetCount():
they_are_the_same = False
break
else:
they_are_the_same = False
if not they_are_the_same:
# important to make own copy, as same object originals can be altered (e.g. set non-inclusive) in cache, and we need to notice that change just above
self._predicates = [ predicate.GetCopy() for predicate in predicates ]
self._Clear()
terms = [ self._GenerateTermFromPredicate( predicate ) for predicate in predicates ]
self._AppendTerms( terms )
self._DataHasChanged()
if len( predicates ) > 0:
logical_index = 0
if len( predicates ) > 1:
skip_ors = True
some_preds_have_count = True in ( predicate.GetCount().HasNonZeroCount() for predicate in predicates )
skip_countless = HG.client_controller.new_options.GetBoolean( 'ac_select_first_with_count' ) and some_preds_have_count
for ( index, predicate ) in enumerate( predicates ):
# now only apply this to simple tags, not wildcards and system tags
if skip_ors and predicate.GetType() == ClientSearch.PREDICATE_TYPE_OR_CONTAINER:
continue
if skip_countless and predicate.GetType() in ( ClientSearch.PREDICATE_TYPE_PARENT, ClientSearch.PREDICATE_TYPE_TAG ) and predicate.GetCount().HasZeroCount():
continue
logical_index = index
break
self._Hit( False, False, logical_index )
def SetTagServiceKey( self, service_key: bytes ):
self._service_key = service_key
class ListBoxTagsStringsAC( ClientGUIListBoxes.ListBoxTagsStrings ):
def __init__( self, parent, callable, service_key, float_mode, **kwargs ):
ClientGUIListBoxes.ListBoxTagsStrings.__init__( self, parent, service_key = service_key, sort_tags = False, **kwargs )
self._callable = callable
self._float_mode = float_mode
def _Activate( self, ctrl_down, shift_down ) -> bool:
predicates = self._GetPredicatesFromTerms( self._selected_terms )
if self._float_mode:
widget = self.window().parentWidget()
else:
widget = self
predicates = ClientGUISearch.FleshOutPredicates( widget, predicates )
if len( predicates ) > 0:
self._callable( predicates, shift_down )
return True
return False
class CloseACDropdownCatcher( QC.QObject ):
def eventFilter( self, watched, event ):
if event.type() == QC.QEvent.Close:
HG.client_controller.gui.close()
event.accept()
return True
return False
# much of this is based on the excellent TexCtrlAutoComplete class by Edward Flick, Michele Petrazzo and Will Sadkin, just with plenty of simplification and integration into hydrus
class AutoCompleteDropdown( QW.QWidget ):
selectUp = QC.Signal()
selectDown = QC.Signal()
showNext = QC.Signal()
showPrevious = QC.Signal()
def __init__( self, parent ):
QW.QWidget.__init__( self, parent )
self._can_intercept_unusual_key_events = True
if self.window() == HG.client_controller.gui:
use_float_mode = HG.client_controller.new_options.GetBoolean( 'autocomplete_float_main_gui' )
else:
use_float_mode = HG.client_controller.new_options.GetBoolean( 'autocomplete_float_frames' )
self._float_mode = use_float_mode
self._text_input_panel = QW.QWidget( self )
self._text_ctrl = QW.QLineEdit( self._text_input_panel )
self.setFocusProxy( self._text_ctrl )
self._UpdateBackgroundColour()
self._last_attempted_dropdown_width = 0
self._text_ctrl_widget_event_filter = QP.WidgetEventFilter( self._text_ctrl )
self._text_ctrl.textChanged.connect( self.EventText )
self._text_ctrl_widget_event_filter.EVT_KEY_DOWN( self.keyPressFilter )
self._text_ctrl.installEventFilter( self )
self._main_vbox = QP.VBoxLayout( margin = 0 )
self._SetupTopListBox()
self._text_input_hbox = QP.HBoxLayout()
QP.AddToLayout( self._text_input_hbox, self._text_ctrl, CC.FLAGS_CENTER_PERPENDICULAR_EXPAND_DEPTH )
self._text_input_panel.setLayout( self._text_input_hbox )
QP.AddToLayout( self._main_vbox, self._text_input_panel, CC.FLAGS_EXPAND_SIZER_PERPENDICULAR )
if self._float_mode:
self._dropdown_window = QW.QFrame( self )
self._dropdown_window.setWindowFlags( QC.Qt.Tool | QC.Qt.FramelessWindowHint )
self._dropdown_window.setAttribute( QC.Qt.WA_ShowWithoutActivating )
self._dropdown_window.setFrameStyle( QW.QFrame.Panel | QW.QFrame.Raised )
self._dropdown_window.setLineWidth( 2 )
self._dropdown_window.move( ClientGUIFunctions.ClientToScreen( self._text_ctrl, QC.QPoint( 0, 0 ) ) )
self._dropdown_window.installEventFilter( CloseACDropdownCatcher( self._dropdown_window ) )
self._dropdown_hidden = True
self._force_dropdown_hide = False
else:
self._dropdown_window = QW.QWidget( self )
self._dropdown_window.installEventFilter( self )
self._dropdown_notebook = QW.QTabWidget( self._dropdown_window )
#
self._search_results_list = self._InitSearchResultsList()
self._dropdown_notebook.setCurrentIndex( self._dropdown_notebook.addTab( self._search_results_list, 'results' ) )
#
if not self._float_mode:
QP.AddToLayout( self._main_vbox, self._dropdown_window, CC.FLAGS_EXPAND_BOTH_WAYS )
self.setLayout( self._main_vbox )
self._current_list_parsed_autocomplete_text = self._GetParsedAutocompleteText()
self._results_cache: ClientSearch.PredicateResultsCache = ClientSearch.PredicateResultsCacheInit()
self._current_fetch_job_key = None
self._schedule_results_refresh_job = None
self._my_shortcut_handler = ClientGUIShortcuts.ShortcutsHandler( self, [ 'tags_autocomplete' ], alternate_filter_target = self._text_ctrl )
if self._float_mode:
self._widget_event_filter = QP.WidgetEventFilter( self )
self._widget_event_filter.EVT_MOVE( self.EventMove )
self._widget_event_filter.EVT_SIZE( self.EventMove )
HG.client_controller.sub( self, '_DropdownHideShow', 'top_level_window_move_event' )
parent = self
self._scroll_event_filters = []
while True:
try:
parent = parent.parentWidget()
if isinstance( parent, QW.QScrollArea ):
scroll_event_filter = QP.WidgetEventFilter( parent )
self._scroll_event_filters.append( scroll_event_filter )
scroll_event_filter.EVT_SCROLLWIN( self.EventMove )
except:
break
HG.client_controller.sub( self, '_UpdateBackgroundColour', 'notify_new_colourset' )
HG.client_controller.sub( self, 'DoDropdownHideShow', 'notify_page_change' )
self._ScheduleResultsRefresh( 0.0 )
HG.client_controller.CallLaterQtSafe( self, 0.05, 'hide/show dropdown', self._DropdownHideShow )
# trying a second go to see if that improves some positioning
HG.client_controller.CallLaterQtSafe( self, 0.25, 'hide/show dropdown', self._DropdownHideShow )
def _BroadcastChoices( self, predicates, shift_down ):
raise NotImplementedError()
def _CancelSearchResultsFetchJob( self ):
if self._current_fetch_job_key is not None:
self._current_fetch_job_key.Cancel()
self._current_fetch_job_key = None
def _ClearInput( self ):
self._CancelSearchResultsFetchJob()
self._text_ctrl.blockSignals( True )
self._text_ctrl.clear()
self._SetResultsToList( [], self._GetParsedAutocompleteText() )
self._text_ctrl.blockSignals( False )
self._ScheduleResultsRefresh( 0.0 )
def _GetParsedAutocompleteText( self ) -> ClientSearch.ParsedAutocompleteText:
raise NotImplementedError()
def _DropdownHideShow( self ):
if not self._float_mode:
return
try:
if self._ShouldShow():
self._ShowDropdown()
else:
self._HideDropdown()
except:
raise
def _HandleEscape( self ):
if self._text_ctrl.text() != '':
self._ClearInput()
return True
elif self._float_mode:
self.parentWidget().setFocus( QC.Qt.OtherFocusReason )
return True
else:
return False
def _HideDropdown( self ):
if not self._dropdown_hidden:
self._dropdown_window.hide()
self._dropdown_hidden = True
def _InitSearchResultsList( self ):
raise NotImplementedError()
def _RestoreTextCtrlFocus( self ):
# if an event came from clicking the dropdown, we want to put focus back on textctrl
if self._float_mode:
self.window().activateWindow()
else:
ClientGUIFunctions.SetFocusLater( self._text_ctrl )
def _ScheduleResultsRefresh( self, delay ):
if self._schedule_results_refresh_job is not None:
self._schedule_results_refresh_job.Cancel()
self._schedule_results_refresh_job = HG.client_controller.CallLaterQtSafe( self, delay, 'a/c results refresh', self._UpdateSearchResults )
def _SetupTopListBox( self ):
pass
def _SetListDirty( self ):
self._results_cache = ClientSearch.PredicateResultsCacheInit()
self._ScheduleResultsRefresh( 0.0 )
def _SetResultsToList( self, results, parsed_autocomplete_text ):
raise NotImplementedError()
def _ShouldShow( self ):
if self._force_dropdown_hide:
return False
current_active_window = QW.QApplication.activeWindow()
i_am_active_and_focused = self.window() == current_active_window and self._text_ctrl.hasFocus() and not self.visibleRegion().isEmpty()
dropdown_is_active = self._dropdown_window == current_active_window
focus_or_active_good = i_am_active_and_focused or dropdown_is_active
visible = self.isVisible()
return focus_or_active_good and visible
def _ShouldTakeResponsibilityForEnter( self ):
raise NotImplementedError()
def _ShowDropdown( self ):
text_panel_size = self._text_input_panel.size()
text_input_width = text_panel_size.width()
text_input_height = text_panel_size.height()
if self._text_input_panel.isVisible():
desired_dropdown_position = ClientGUIFunctions.ClientToScreen( self._text_input_panel, QC.QPoint( 0, text_input_height ) )
if self.pos() != desired_dropdown_position:
self._dropdown_window.move( desired_dropdown_position )
#
if self._dropdown_hidden:
self._dropdown_window.show()
self._dropdown_hidden = False
if text_input_width != self._last_attempted_dropdown_width:
self._dropdown_window.setFixedWidth( text_input_width )
self._last_attempted_dropdown_width = text_input_width
def _StartSearchResultsFetchJob( self, job_key ):
raise NotImplementedError()
def _TakeResponsibilityForEnter( self, shift_down ):
raise NotImplementedError()
def _UpdateBackgroundColour( self ):
colour = HG.client_controller.new_options.GetColour( CC.COLOUR_AUTOCOMPLETE_BACKGROUND )
if not self._can_intercept_unusual_key_events:
colour = ClientGUIFunctions.GetLighterDarkerColour( colour )
QP.SetBackgroundColour( self._text_ctrl, colour )
self._text_ctrl.update()
def _UpdateSearchResults( self ):
self._schedule_results_refresh_job = None
self._CancelSearchResultsFetchJob()
self._current_fetch_job_key = ClientThreading.JobKey( cancellable = True )
self._StartSearchResultsFetchJob( self._current_fetch_job_key )
def BroadcastChoices( self, predicates, shift_down = False ):
self._BroadcastChoices( predicates, shift_down )
self._RestoreTextCtrlFocus()
def CancelCurrentResultsFetchJob( self ):
self._CancelSearchResultsFetchJob()
def DoDropdownHideShow( self ):
self._DropdownHideShow()
def keyPressFilter( self, event ):
HG.client_controller.ResetIdleTimer()
( modifier, key ) = ClientGUIShortcuts.ConvertKeyEventToSimpleTuple( event )
if self._can_intercept_unusual_key_events:
send_input_to_current_list = False
current_results_list = self._dropdown_notebook.currentWidget()
if key in ( ord( 'A' ), ord( 'a' ) ) and modifier == QC.Qt.ControlModifier:
return True # was: event.ignore()
elif key in ( QC.Qt.Key_Return, QC.Qt.Key_Enter ) and self._ShouldTakeResponsibilityForEnter():
shift_down = modifier == QC.Qt.ShiftModifier
self._TakeResponsibilityForEnter( shift_down )
elif key == QC.Qt.Key_Escape:
escape_caught = self._HandleEscape()
if not escape_caught:
send_input_to_current_list = True
else:
send_input_to_current_list = True
if send_input_to_current_list:
current_results_list.keyPressEvent( event ) # ultimately, this typically ignores the event, letting the text ctrl take it
return not event.isAccepted()
else:
return True # was: event.ignore()
def EventCloseDropdown( self, event ):
HG.client_controller.gui.close()
return True
def eventFilter( self, watched, event ):
if watched == self._text_ctrl:
if event.type() == QC.QEvent.Wheel:
current_results_list = self._dropdown_notebook.currentWidget()
if self._text_ctrl.text() == '' and len( current_results_list ) == 0:
if event.angleDelta().y() > 0:
self.selectUp.emit()
else:
self.selectDown.emit()
event.accept()
return True
else:
if event.modifiers() & QC.Qt.ControlModifier:
if event.angleDelta().y() > 0:
current_results_list.MoveSelectionUp()
else:
current_results_list.MoveSelectionDown()
event.accept()
return True
elif self._float_mode:
if event.type() in ( QC.QEvent.FocusOut, QC.QEvent.FocusIn ):
self._DropdownHideShow()
return False
elif watched == self._dropdown_window:
if self._float_mode and event.type() in ( QC.QEvent.WindowActivate, QC.QEvent.WindowDeactivate ):
# we delay this slightly because when you click from dropdown to text, the deactivate event fires before the focusin, leading to a frame of hide
HG.client_controller.CallLaterQtSafe( self, 0.05, 'hide/show dropdown', self._DropdownHideShow )
return False
return False
def EventMove( self, event ):
self._DropdownHideShow()
return True # was: event.ignore()
def EventText( self, new_text ):
num_chars = len( self._text_ctrl.text() )
if num_chars == 0:
self._ScheduleResultsRefresh( 0.0 )
else:
parsed_autocomplete_text = self._GetParsedAutocompleteText()
if parsed_autocomplete_text.GetTagAutocompleteOptions().FetchResultsAutomatically():
self._ScheduleResultsRefresh( 0.0 )
if self._dropdown_notebook.currentWidget() != self._search_results_list:
self.MoveNotebookPageFocus( index = 0 )
def ForceSizeCalcNow( self ):
if self._float_mode:
self._DropdownHideShow()
def MoveNotebookPageFocus( self, index = None, direction = None ):
new_index = None
if index is not None:
new_index = index
elif direction is not None:
current_index = self._dropdown_notebook.currentIndex()
if current_index is not None and current_index != -1:
number_of_pages = self._dropdown_notebook.count()
new_index = ( current_index + direction ) % number_of_pages # does wraparound
if new_index is not None:
self._dropdown_notebook.setCurrentIndex( new_index )
self.setFocus( QC.Qt.OtherFocusReason )
def ProcessApplicationCommand( self, command: CAC.ApplicationCommand ):
command_processed = True
if command.IsSimpleCommand():
action = command.GetSimpleAction()
if action == CAC.SIMPLE_AUTOCOMPLETE_IME_MODE:
self._can_intercept_unusual_key_events = not self._can_intercept_unusual_key_events
self._UpdateBackgroundColour()
elif self._can_intercept_unusual_key_events:
current_results_list = self._dropdown_notebook.currentWidget()
current_list_is_empty = len( current_results_list ) == 0
input_is_empty = self._text_ctrl.text() == ''
everything_is_empty = input_is_empty and current_list_is_empty
if action == CAC.SIMPLE_AUTOCOMPLETE_FORCE_FETCH:
self._ScheduleResultsRefresh( 0.0 )
elif input_is_empty and action in ( CAC.SIMPLE_AUTOCOMPLETE_IF_EMPTY_TAB_LEFT, CAC.SIMPLE_AUTOCOMPLETE_IF_EMPTY_TAB_RIGHT ):
if action == CAC.SIMPLE_AUTOCOMPLETE_IF_EMPTY_TAB_LEFT:
direction = -1
else:
direction = 1
self.MoveNotebookPageFocus( direction = direction )
elif everything_is_empty and action == CAC.SIMPLE_AUTOCOMPLETE_IF_EMPTY_PAGE_LEFT:
self.selectUp.emit()
elif everything_is_empty and action == CAC.SIMPLE_AUTOCOMPLETE_IF_EMPTY_PAGE_RIGHT:
self.selectDown.emit()
elif everything_is_empty and action == CAC.SIMPLE_AUTOCOMPLETE_IF_EMPTY_MEDIA_PREVIOUS:
self.showPrevious.emit()
elif everything_is_empty and action == CAC.SIMPLE_AUTOCOMPLETE_IF_EMPTY_MEDIA_NEXT:
self.showNext.emit()
else:
command_processed = False
else:
command_processed = False
else:
command_processed = False
return command_processed
def SetFetchedResults( self, job_key: ClientThreading.JobKey, parsed_autocomplete_text: ClientSearch.ParsedAutocompleteText, results_cache: ClientSearch.PredicateResultsCache, results: list ):
if self._current_fetch_job_key is not None and self._current_fetch_job_key.GetKey() == job_key.GetKey():
self._CancelSearchResultsFetchJob()
self._results_cache = results_cache
self._SetResultsToList( results, parsed_autocomplete_text )
def SetForceDropdownHide( self, value ):
self._force_dropdown_hide = value
self._DropdownHideShow()
class AutoCompleteDropdownTags( AutoCompleteDropdown ):
locationChanged = QC.Signal( ClientLocation.LocationContext )
tagServiceChanged = QC.Signal( bytes )
def __init__( self, parent, location_context: ClientLocation.LocationContext, tag_service_key ):
location_context.FixMissingServices( HG.client_controller.services_manager.FilterValidServiceKeys )
if not HG.client_controller.services_manager.ServiceExists( tag_service_key ):
tag_service_key = CC.COMBINED_TAG_SERVICE_KEY
self._tag_service_key = tag_service_key
AutoCompleteDropdown.__init__( self, parent )
tag_service = HG.client_controller.services_manager.GetService( self._tag_service_key )
self._location_context_button = ClientGUILocation.LocationSearchContextButton( self._dropdown_window, location_context )
self._location_context_button.setMinimumWidth( 20 )
self._tag_repo_button = ClientGUICommon.BetterButton( self._dropdown_window, tag_service.GetName(), self.TagButtonHit )
self._tag_repo_button.setMinimumWidth( 20 )
self._favourites_list = self._InitFavouritesList()
self.RefreshFavouriteTags()
self._dropdown_notebook.addTab( self._favourites_list, 'favourites' )
#
self._location_context_button.locationChanged.connect( self._LocationContextJustChanged )
HG.client_controller.sub( self, 'RefreshFavouriteTags', 'notify_new_favourite_tags' )
HG.client_controller.sub( self, 'NotifyNewServices', 'notify_new_services' )
def _SetTagService( self, tag_service_key ):
if not HG.client_controller.services_manager.ServiceExists( tag_service_key ):
tag_service_key = CC.COMBINED_TAG_SERVICE_KEY
if tag_service_key == CC.COMBINED_TAG_SERVICE_KEY and self._location_context_button.GetValue().IsAllKnownFiles():
default_location_context = HG.client_controller.new_options.GetDefaultLocalLocationContext()
self._SetLocationContext( default_location_context )
self._tag_service_key = tag_service_key
self._search_results_list.SetTagServiceKey( self._tag_service_key )
self._favourites_list.SetTagServiceKey( self._tag_service_key )
self._UpdateTagServiceLabel()
self.tagServiceChanged.emit( self._tag_service_key )
self._SetListDirty()
def _GetCurrentBroadcastTextPredicate( self ) -> typing.Optional[ ClientSearch.Predicate ]:
raise NotImplementedError()
def _GetParsedAutocompleteText( self ) -> ClientSearch.ParsedAutocompleteText:
collapse_search_characters = True
tag_autocomplete_options = HG.client_controller.tag_display_manager.GetTagAutocompleteOptions( self._tag_service_key )
parsed_autocomplete_text = ClientSearch.ParsedAutocompleteText( self._text_ctrl.text(), tag_autocomplete_options, collapse_search_characters )
return parsed_autocomplete_text
def _InitFavouritesList( self ):
raise NotImplementedError()
def _LocationContextJustChanged( self, location_context: ClientLocation.LocationContext ):
self._RestoreTextCtrlFocus()
self.locationChanged.emit( location_context )
self._SetListDirty()
def _SetLocationContext( self, location_context: ClientLocation.LocationContext ):
location_context.FixMissingServices( HG.client_controller.services_manager.FilterValidServiceKeys )
if location_context.IsAllKnownFiles() and self._tag_service_key == CC.COMBINED_TAG_SERVICE_KEY:
local_tag_services = HG.client_controller.services_manager.GetServices( ( HC.LOCAL_TAG, ) )
self._SetTagService( local_tag_services[0].GetServiceKey() )
self._location_context_button.SetValue( location_context )
self._SetListDirty()
def _SetResultsToList( self, results, parsed_autocomplete_text: ClientSearch.ParsedAutocompleteText ):
self._search_results_list.SetPredicates( results )
self._current_list_parsed_autocomplete_text = parsed_autocomplete_text
def _UpdateTagServiceLabel( self ):
tag_service = HG.client_controller.services_manager.GetService( self._tag_service_key )
name = tag_service.GetName()
self._tag_repo_button.setText( name )
def NotifyNewServices( self ):
self._SetLocationContext( self._location_context_button.GetValue() )
self._SetTagService( self._tag_service_key )
def RefreshFavouriteTags( self ):
favourite_tags = sorted( HG.client_controller.new_options.GetStringList( 'favourite_tags' ) )
predicates = [ ClientSearch.Predicate( ClientSearch.PREDICATE_TYPE_TAG, value = tag ) for tag in favourite_tags ]
self._favourites_list.SetPredicates( predicates )
def SetLocationContext( self, location_context: ClientLocation.LocationContext ):
self._SetLocationContext( location_context )
def SetStubPredicates( self, job_key, stub_predicates, parsed_autocomplete_text ):
if self._current_fetch_job_key is not None and self._current_fetch_job_key.GetKey() == job_key.GetKey():
self._SetResultsToList( stub_predicates, parsed_autocomplete_text )
def SetTagServiceKey( self, tag_service_key ):
self._SetTagService( tag_service_key )
def TagButtonHit( self ):
services_manager = HG.client_controller.services_manager
service_types_in_order = [ HC.LOCAL_TAG, HC.TAG_REPOSITORY, HC.COMBINED_TAG ]
services = services_manager.GetServices( service_types_in_order )
menu = QW.QMenu()
for service in services:
ClientGUIMenus.AppendMenuItem( menu, service.GetName(), 'Change the current tag domain to ' + service.GetName() + '.', self._SetTagService, service.GetServiceKey() )
CGC.core().PopupMenu( self._tag_repo_button, menu )
self._RestoreTextCtrlFocus()
class AutoCompleteDropdownTagsRead( AutoCompleteDropdownTags ):
searchChanged = QC.Signal( ClientSearch.FileSearchContext )
searchCancelled = QC.Signal()
def __init__( self, parent: QW.QWidget, page_key, file_search_context: ClientSearch.FileSearchContext, media_sort_widget: typing.Optional[ ClientGUIResultsSortCollect.MediaSortControl ] = None, media_collect_widget: typing.Optional[ ClientGUIResultsSortCollect.MediaCollectControl ] = None, media_callable = None, synchronised = True, include_unusual_predicate_types = True, allow_all_known_files = True, force_system_everything = False, hide_favourites_edit_actions = False ):
self._page_key = page_key
# make a dupe here so we know that any direct changes we make to this guy will not affect other copies around
file_search_context = file_search_context.Duplicate()
self._under_construction_or_predicate = None
location_context = file_search_context.GetLocationContext()
tag_search_context = file_search_context.GetTagSearchContext()
self._include_unusual_predicate_types = include_unusual_predicate_types
self._force_system_everything = force_system_everything
self._hide_favourites_edit_actions = hide_favourites_edit_actions
self._media_sort_widget = media_sort_widget
self._media_collect_widget = media_collect_widget
self._media_callable = media_callable
self._file_search_context = file_search_context
AutoCompleteDropdownTags.__init__( self, parent, location_context, tag_search_context.service_key )
self._predicates_listbox.SetPredicates( self._file_search_context.GetPredicates() )
self._location_context_button.SetAllKnownFilesAllowed( allow_all_known_files, True )
#
self._favourite_searches_button = ClientGUICommon.BetterBitmapButton( self._text_input_panel, CC.global_pixmaps().star, self._FavouriteSearchesMenu )
self._favourite_searches_button.setToolTip( 'Load or save a favourite search.' )
self._cancel_search_button = ClientGUICommon.BetterBitmapButton( self._text_input_panel, CC.global_pixmaps().stop, self.searchCancelled.emit )
self._cancel_search_button.hide()
QP.AddToLayout( self._text_input_hbox, self._favourite_searches_button, CC.FLAGS_CENTER_PERPENDICULAR )
QP.AddToLayout( self._text_input_hbox, self._cancel_search_button, CC.FLAGS_CENTER_PERPENDICULAR )
#
self._include_current_tags = ClientGUICommon.OnOffButton( self._dropdown_window, on_label = 'include current tags', off_label = 'exclude current tags', start_on = tag_search_context.include_current_tags )
self._include_current_tags.setToolTip( 'select whether to include current tags in the search' )
self._include_pending_tags = ClientGUICommon.OnOffButton( self._dropdown_window, on_label = 'include pending tags', off_label = 'exclude pending tags', start_on = tag_search_context.include_pending_tags )
self._include_pending_tags.setToolTip( 'select whether to include pending tags in the search' )
self._search_pause_play = ClientGUICommon.OnOffButton( self._dropdown_window, on_label = 'searching immediately', off_label = 'search paused', start_on = synchronised )
self._search_pause_play.setToolTip( 'select whether to renew the search as soon as a new predicate is entered' )
self._or_basic = ClientGUICommon.BetterButton( self._dropdown_window, 'OR', self._CreateNewOR )
self._or_basic.setToolTip( 'Create a new empty OR predicate in the dialog.' )
if not HG.client_controller.new_options.GetBoolean( 'advanced_mode' ):
self._or_basic.hide()
self._or_advanced = ClientGUICommon.BetterButton( self._dropdown_window, 'OR*', self._AdvancedORInput )
self._or_advanced.setToolTip( 'Advanced OR input.' )
if not HG.client_controller.new_options.GetBoolean( 'advanced_mode' ):
self._or_advanced.hide()
self._or_cancel = ClientGUICommon.BetterBitmapButton( self._dropdown_window, CC.global_pixmaps().delete, self._CancelORConstruction )
self._or_cancel.setToolTip( 'Cancel OR Predicate construction.' )
self._or_cancel.hide()
self._or_rewind = ClientGUICommon.BetterBitmapButton( self._dropdown_window, CC.global_pixmaps().previous, self._RewindORConstruction )
self._or_rewind.setToolTip( 'Rewind OR Predicate construction.' )
self._or_rewind.hide()
button_hbox_1 = QP.HBoxLayout()
QP.AddToLayout( button_hbox_1, self._include_current_tags, CC.FLAGS_EXPAND_BOTH_WAYS )
QP.AddToLayout( button_hbox_1, self._include_pending_tags, CC.FLAGS_EXPAND_BOTH_WAYS )
sync_button_hbox = QP.HBoxLayout()
QP.AddToLayout( sync_button_hbox, self._search_pause_play, CC.FLAGS_EXPAND_BOTH_WAYS )
QP.AddToLayout( sync_button_hbox, self._or_basic, CC.FLAGS_CENTER_PERPENDICULAR )
QP.AddToLayout( sync_button_hbox, self._or_advanced, CC.FLAGS_CENTER_PERPENDICULAR )
QP.AddToLayout( sync_button_hbox, self._or_cancel, CC.FLAGS_CENTER_PERPENDICULAR )
QP.AddToLayout( sync_button_hbox, self._or_rewind, CC.FLAGS_CENTER_PERPENDICULAR )
button_hbox_2 = QP.HBoxLayout()
QP.AddToLayout( button_hbox_2, self._location_context_button, CC.FLAGS_EXPAND_BOTH_WAYS )
QP.AddToLayout( button_hbox_2, self._tag_repo_button, CC.FLAGS_EXPAND_BOTH_WAYS )
vbox = QP.VBoxLayout()
QP.AddToLayout( vbox, button_hbox_1, CC.FLAGS_EXPAND_SIZER_PERPENDICULAR )
QP.AddToLayout( vbox, sync_button_hbox, CC.FLAGS_EXPAND_SIZER_PERPENDICULAR )
QP.AddToLayout( vbox, button_hbox_2, CC.FLAGS_EXPAND_SIZER_PERPENDICULAR )
QP.AddToLayout( vbox, self._dropdown_notebook, CC.FLAGS_EXPAND_BOTH_WAYS )
self._dropdown_window.setLayout( vbox )
self._predicates_listbox.listBoxChanged.connect( self._SignalNewSearchState )
self._include_current_tags.valueChanged.connect( self.SetIncludeCurrent )
self._include_pending_tags.valueChanged.connect( self.SetIncludePending )
self._search_pause_play.valueChanged.connect( self.SetSynchronised )
def _AdvancedORInput( self ):
title = 'enter advanced OR predicates'
with ClientGUITopLevelWindowsPanels.DialogEdit( self, title ) as dlg:
panel = EditAdvancedORPredicates( dlg )
dlg.SetPanel( panel )
if dlg.exec() == QW.QDialog.Accepted:
predicates = panel.GetValue()
shift_down = False
if len( predicates ) > 0:
self._BroadcastChoices( predicates, shift_down )
def _BroadcastChoices( self, predicates, shift_down ):
or_pred_in_broadcast = self._under_construction_or_predicate is not None and self._under_construction_or_predicate in predicates
if shift_down:
if self._under_construction_or_predicate is None:
self._under_construction_or_predicate = ClientSearch.Predicate( ClientSearch.PREDICATE_TYPE_OR_CONTAINER, value = predicates )
else:
if or_pred_in_broadcast:
predicates.remove( self._under_construction_or_predicate )
or_preds = list( self._under_construction_or_predicate.GetValue() )
or_preds.extend( [ predicate for predicate in predicates if predicate not in or_preds ] )
self._under_construction_or_predicate = ClientSearch.Predicate( ClientSearch.PREDICATE_TYPE_OR_CONTAINER, value = or_preds )
else:
if or_pred_in_broadcast:
or_preds = list( self._under_construction_or_predicate.GetValue() )
if len( or_preds ) == 1:
predicates.remove( self._under_construction_or_predicate )
predicates.extend( or_preds )
elif self._under_construction_or_predicate is not None:
or_preds = list( self._under_construction_or_predicate.GetValue() )
or_preds.extend( [ predicate for predicate in predicates if predicate not in or_preds ] )
predicates = { ClientSearch.Predicate( ClientSearch.PREDICATE_TYPE_OR_CONTAINER, value = or_preds ) }
self._under_construction_or_predicate = None
self._predicates_listbox.EnterPredicates( self._page_key, predicates )
self._UpdateORButtons()
self._ClearInput()
def _CancelORConstruction( self ):
self._under_construction_or_predicate = None
self._UpdateORButtons()
self._ClearInput()
def _CreateNewOR( self ):
predicates = { ClientSearch.Predicate( ClientSearch.PREDICATE_TYPE_OR_CONTAINER, value = [ ] ) }
try:
predicates = ClientGUISearch.EditPredicates( self, predicates )
except HydrusExceptions.CancelledException:
return
shift_down = False
self._BroadcastChoices( predicates, shift_down )
def _FavouriteSearchesMenu( self ):
menu = QW.QMenu()
if not self._hide_favourites_edit_actions:
ClientGUIMenus.AppendMenuItem( menu, 'manage favourite searches', 'Open a dialog to edit your favourite searches.', self._ManageFavouriteSearches )
ClientGUIMenus.AppendSeparator( menu )
ClientGUIMenus.AppendMenuItem( menu, 'save this search', 'Save this search for later.', self._SaveFavouriteSearch )
folders_to_names = HG.client_controller.favourite_search_manager.GetFoldersToNames()
if len( folders_to_names ) > 0:
ClientGUIMenus.AppendSeparator( menu )
folder_names = list( folders_to_names.keys() )
if None in folder_names:
folder_names.remove( None )
folder_names.sort()
folder_names.insert( 0, None )
else:
folder_names.sort()
for folder_name in folder_names:
if folder_name is None:
menu_to_use = menu
else:
menu_to_use = QW.QMenu( menu )
ClientGUIMenus.AppendMenu( menu, menu_to_use, folder_name )
names = sorted( folders_to_names[ folder_name ] )
for name in names:
ClientGUIMenus.AppendMenuItem( menu_to_use, name, 'Load the {} search.'.format( name ), self._LoadFavouriteSearch, folder_name, name )
CGC.core().PopupMenu( self, menu )
def _GetCurrentBroadcastTextPredicate( self ) -> typing.Optional[ ClientSearch.Predicate ]:
parsed_autocomplete_text = self._GetParsedAutocompleteText()
if parsed_autocomplete_text.IsAcceptableForFileSearches():
return parsed_autocomplete_text.GetImmediateFileSearchPredicate()
else:
return None
def _HandleEscape( self ):
if self._under_construction_or_predicate is not None and self._text_ctrl.text() == '':
self._CancelORConstruction()
return True
else:
return AutoCompleteDropdown._HandleEscape( self )
def _InitFavouritesList( self ):
height_num_chars = HG.client_controller.new_options.GetInteger( 'ac_read_list_height_num_chars' )
favs_list = ListBoxTagsPredicatesAC( self._dropdown_notebook, self.BroadcastChoices, self._float_mode, self._tag_service_key, tag_display_type = ClientTags.TAG_DISPLAY_ACTUAL, height_num_chars = height_num_chars )
return favs_list
def _InitSearchResultsList( self ):
height_num_chars = HG.client_controller.new_options.GetInteger( 'ac_read_list_height_num_chars' )
return ListBoxTagsPredicatesAC( self._dropdown_notebook, self.BroadcastChoices, self._tag_service_key, self._float_mode, tag_display_type = ClientTags.TAG_DISPLAY_ACTUAL, height_num_chars = height_num_chars )
def _LocationContextJustChanged( self, location_context: ClientLocation.LocationContext ):
AutoCompleteDropdownTags._LocationContextJustChanged( self, location_context )
self._file_search_context.SetLocationContext( location_context )
self._SignalNewSearchState()
def _LoadFavouriteSearch( self, folder_name, name ):
( file_search_context, synchronised, media_sort, media_collect ) = HG.client_controller.favourite_search_manager.GetFavouriteSearch( folder_name, name )
self.blockSignals( True )
self.SetFileSearchContext( file_search_context )
if media_sort is not None and self._media_sort_widget is not None:
self._media_sort_widget.SetSort( media_sort )
if media_collect is not None and self._media_collect_widget is not None:
self._media_collect_widget.SetCollect( media_collect )
self._search_pause_play.SetOnOff( synchronised )
self.blockSignals( False )
self.locationChanged.emit( self._location_context_button.GetValue() )
self.tagServiceChanged.emit( self._tag_service_key )
self._SignalNewSearchState()
def _ManageFavouriteSearches( self, favourite_search_row_to_save = None ):
from hydrus.client.gui.search import ClientGUISearchPanels
favourite_searches_rows = HG.client_controller.favourite_search_manager.GetFavouriteSearchRows()
title = 'edit favourite searches'
with ClientGUITopLevelWindowsPanels.DialogEdit( self, title ) as dlg:
panel = ClientGUISearchPanels.EditFavouriteSearchesPanel( dlg, favourite_searches_rows, initial_search_row_to_edit = favourite_search_row_to_save )
dlg.SetPanel( panel )
if dlg.exec() == QW.QDialog.Accepted:
edited_favourite_searches_rows = panel.GetValue()
HG.client_controller.favourite_search_manager.SetFavouriteSearchRows( edited_favourite_searches_rows )
def _RewindORConstruction( self ):
if self._under_construction_or_predicate is not None:
or_preds = self._under_construction_or_predicate.GetValue()
if len( or_preds ) <= 1:
self._CancelORConstruction()
return
or_preds = or_preds[:-1]
self._under_construction_or_predicate = ClientSearch.Predicate( ClientSearch.PREDICATE_TYPE_OR_CONTAINER, value = or_preds )
self._UpdateORButtons()
self._ClearInput()
def _SaveFavouriteSearch( self ):
foldername = None
name = 'new favourite search'
file_search_context = self.GetFileSearchContext()
synchronised = self.IsSynchronised()
if self._media_sort_widget is None:
media_sort = None
else:
media_sort = self._media_sort_widget.GetSort()
if self._media_collect_widget is None:
media_collect = None
else:
media_collect = self._media_collect_widget.GetValue()
search_row = ( foldername, name, file_search_context, synchronised, media_sort, media_collect )
self._ManageFavouriteSearches( favourite_search_row_to_save = search_row )
def _SetTagService( self, tag_service_key ):
AutoCompleteDropdownTags._SetTagService( self, tag_service_key )
self._file_search_context.SetTagServiceKey( tag_service_key )
self._SignalNewSearchState()
def _SetupTopListBox( self ):
self._predicates_listbox = ListBoxTagsActiveSearchPredicates( self, self._page_key )
QP.AddToLayout( self._main_vbox, self._predicates_listbox, CC.FLAGS_EXPAND_BOTH_WAYS )
def _SignalNewSearchState( self ):
self._file_search_context.SetPredicates( self._predicates_listbox.GetPredicates() )
file_search_context = self._file_search_context.Duplicate()
self.searchChanged.emit( file_search_context )
def _StartSearchResultsFetchJob( self, job_key ):
parsed_autocomplete_text = self._GetParsedAutocompleteText()
stub_predicates = []
InsertOtherPredicatesForRead( stub_predicates, parsed_autocomplete_text, self._include_unusual_predicate_types, self._under_construction_or_predicate )
AppendLoadingPredicate( stub_predicates )
HG.client_controller.CallLaterQtSafe( self, 0.2, 'set stub predicates', self.SetStubPredicates, job_key, stub_predicates, parsed_autocomplete_text )
fsc = self.GetFileSearchContext()
if self._under_construction_or_predicate is None:
under_construction_or_predicate = None
else:
under_construction_or_predicate = self._under_construction_or_predicate.Duplicate()
HG.client_controller.CallToThread( ReadFetch, self, job_key, self.SetFetchedResults, parsed_autocomplete_text, self._media_callable, fsc, self._search_pause_play.IsOn(), self._include_unusual_predicate_types, self._results_cache, under_construction_or_predicate, self._force_system_everything )
def _ShouldTakeResponsibilityForEnter( self ):
looking_at_search_results = self._dropdown_notebook.currentWidget() == self._search_results_list
something_to_broadcast = self._GetCurrentBroadcastTextPredicate() is not None
parsed_autocomplete_text = self._GetParsedAutocompleteText()
# the list has results, but they are out of sync with what we have currently entered
# when the user has quickly typed something in and the results are not yet in
results_desynced_with_text = parsed_autocomplete_text != self._current_list_parsed_autocomplete_text
p1 = looking_at_search_results and something_to_broadcast and results_desynced_with_text
return p1
def _TakeResponsibilityForEnter( self, shift_down ):
current_broadcast_predicate = self._GetCurrentBroadcastTextPredicate()
if current_broadcast_predicate is not None:
self._BroadcastChoices( { current_broadcast_predicate }, shift_down )
def _UpdateORButtons( self ):
if self._under_construction_or_predicate is None:
if self._or_cancel.isVisible():
self._or_cancel.hide()
if self._or_rewind.isVisible():
self._or_rewind.hide()
else:
or_preds = self._under_construction_or_predicate.GetValue()
if len( or_preds ) > 1:
if not self._or_rewind.isVisible():
self._or_rewind.show()
else:
if self._or_rewind.isVisible():
self._or_rewind.hide()
if not self._or_cancel.isVisible():
self._or_cancel.show()
def GetFileSearchContext( self ) -> ClientSearch.FileSearchContext:
fsc = self._file_search_context.Duplicate()
fsc.SetPredicates( self._predicates_listbox.GetPredicates() )
return fsc
def GetPredicates( self ) -> typing.Set[ ClientSearch.Predicate ]:
return self._predicates_listbox.GetPredicates()
def IsSynchronised( self ):
return self._search_pause_play.IsOn()
def PauseSearching( self ):
self._search_pause_play.SetOnOff( False )
def ProcessApplicationCommand( self, command: CAC.ApplicationCommand ):
command_processed = True
if self._can_intercept_unusual_key_events and command.IsSimpleCommand():
action = command.GetSimpleAction()
if action == CAC.SIMPLE_SYNCHRONISED_WAIT_SWITCH:
self.PausePlaySearch()
else:
command_processed = False
else:
command_processed = False
if not command_processed:
command_processed = AutoCompleteDropdownTags.ProcessApplicationCommand( self, command )
return command_processed
def SetFetchedResults( self, job_key: ClientThreading.JobKey, parsed_autocomplete_text: ClientSearch.ParsedAutocompleteText, results_cache: ClientSearch.PredicateResultsCache, results: list ):
if self._current_fetch_job_key is not None and self._current_fetch_job_key.GetKey() == job_key.GetKey():
AutoCompleteDropdownTags.SetFetchedResults( self, job_key, parsed_autocomplete_text, results_cache, results )
if parsed_autocomplete_text.IsEmpty():
# refresh system preds after five mins
self._ScheduleResultsRefresh( 300 )
def SetFileSearchContext( self, file_search_context: ClientSearch.FileSearchContext ):
self._ClearInput()
self._CancelORConstruction()
self._file_search_context = file_search_context.Duplicate()
self._predicates_listbox.SetPredicates( self._file_search_context.GetPredicates() )
self._SetLocationContext( self._file_search_context.GetLocationContext() )
self._SetTagService( self._file_search_context.GetTagSearchContext().service_key )
self._SignalNewSearchState()
def SetIncludeCurrent( self, value ):
self._file_search_context.SetIncludeCurrentTags( value )
self._SetListDirty()
self._SignalNewSearchState()
self._RestoreTextCtrlFocus()
def SetIncludePending( self, value ):
self._file_search_context.SetIncludePendingTags( value )
self._SetListDirty()
self._SignalNewSearchState()
self._RestoreTextCtrlFocus()
def SetSynchronised( self, value ):
self._SignalNewSearchState()
self._RestoreTextCtrlFocus()
if not self._search_pause_play.IsOn() and not self._file_search_context.GetSystemPredicates().HasSystemLimit():
# update if user goes from sync to non-sync
self._SetListDirty()
def PausePlaySearch( self ):
self._search_pause_play.Flip()
self._RestoreTextCtrlFocus()
def ShowCancelSearchButton( self, show ):
if self._cancel_search_button.isVisible() != show:
self._cancel_search_button.setVisible( show )
class ListBoxTagsActiveSearchPredicates( ClientGUIListBoxes.ListBoxTagsPredicates ):
def __init__( self, parent: AutoCompleteDropdownTagsRead, page_key, initial_predicates = None ):
if initial_predicates is None:
initial_predicates = []
ClientGUIListBoxes.ListBoxTagsPredicates.__init__( self, parent, height_num_chars = 6 )
self._my_ac_parent = parent
self._page_key = page_key
if len( initial_predicates ) > 0:
terms = [ self._GenerateTermFromPredicate( predicate ) for predicate in initial_predicates ]
self._AppendTerms( terms )
self._Sort()
self._DataHasChanged()
HG.client_controller.sub( self, 'EnterPredicates', 'enter_predicates' )
def _Activate( self, ctrl_down, shift_down ) -> bool:
predicates = self._GetPredicatesFromTerms( self._selected_terms )
if len( predicates ) > 0:
if shift_down:
self._EditPredicates( set( predicates ) )
elif ctrl_down:
( predicates, or_predicate, inverse_predicates, namespace_predicate, inverse_namespace_predicate ) = self._GetSelectedPredicatesAndInverseCopies()
self._EnterPredicates( inverse_predicates )
else:
self._EnterPredicates( set( predicates ) )
return True
return False
def _AddEditMenu( self, menu: QW.QMenu ):
( editable_predicates, non_editable_predicates ) = ClientGUISearch.GetEditablePredicates( self._GetPredicatesFromTerms( self._selected_terms ) )
if len( editable_predicates ) > 0:
ClientGUIMenus.AppendSeparator( menu )
if len( editable_predicates ) == 1:
desc = list( editable_predicates )[0].ToString()
else:
desc = '{} search terms'.format( HydrusData.ToHumanInt( len( editable_predicates ) ) )
label = 'edit {}'.format( desc )
ClientGUIMenus.AppendMenuItem( menu, label, 'Edit these predicates and refresh the search. Not all predicates are editable.', self._EditPredicates, editable_predicates )
def _CanProvideCurrentPagePredicates( self ):
return True
def _DeleteActivate( self ):
ctrl_down = False
shift_down = False
self._Activate( ctrl_down, shift_down )
def _EditPredicates( self, predicates ):
original_predicates = set( predicates )
try:
edited_predicates = set( ClientGUISearch.EditPredicates( self, predicates ) )
except HydrusExceptions.CancelledException:
return
non_edited_predicates = original_predicates.intersection( edited_predicates )
predicates_to_add = edited_predicates.difference( non_edited_predicates )
predicates_to_remove = original_predicates.difference( non_edited_predicates )
if len( predicates_to_add ) + len( predicates_to_remove ) == 0:
return
terms_to_remove = [ self._GenerateTermFromPredicate( predicate ) for predicate in predicates_to_remove ]
self._RemoveTerms( terms_to_remove )
terms_to_add = [ self._GenerateTermFromPredicate( predicate ) for predicate in predicates_to_add ]
self._AppendTerms( terms_to_add )
self._selected_terms.update( terms_to_add )
self._Sort()
self._DataHasChanged()
def _EnterPredicates( self, predicates, permit_add = True, permit_remove = True ):
if len( predicates ) == 0:
return
terms_to_be_added = set()
terms_to_be_removed = set()
for predicate in predicates:
predicate = predicate.GetCountlessCopy()
term = self._GenerateTermFromPredicate( predicate )
if term in self._terms_to_logical_indices:
if permit_remove:
terms_to_be_removed.add( term )
else:
if permit_add:
terms_to_be_added.add( term )
m_e_preds = self._GetMutuallyExclusivePredicates( predicate )
terms_to_be_removed.update( ( self._GenerateTermFromPredicate( pred ) for pred in m_e_preds ) )
self._AppendTerms( terms_to_be_added )
self._RemoveTerms( terms_to_be_removed )
self._Sort()
self._DataHasChanged()
def _GetCurrentLocationContext( self ):
return self._my_ac_parent.GetFileSearchContext().GetLocationContext()
def _GetCurrentPagePredicates( self ) -> typing.Set[ ClientSearch.Predicate ]:
return self.GetPredicates()
def _HasCounts( self ):
return False
def _ProcessMenuPredicateEvent( self, command ):
( predicates, or_predicate, inverse_predicates, namespace_predicate, inverse_namespace_predicate ) = self._GetSelectedPredicatesAndInverseCopies()
if command == 'add_predicates':
self._EnterPredicates( predicates, permit_remove = False )
elif command == 'add_or_predicate':
if or_predicate is not None:
self._EnterPredicates( ( or_predicate, ), permit_remove = False )
elif command == 'remove_predicates':
self._EnterPredicates( predicates, permit_add = False )
elif command == 'add_inverse_predicates':
self._EnterPredicates( inverse_predicates, permit_remove = False )
elif command == 'remove_inverse_predicates':
self._EnterPredicates( inverse_predicates, permit_add = False )
elif command == 'add_namespace_predicate':
self._EnterPredicates( ( namespace_predicate, ), permit_remove = False )
elif command == 'add_inverse_namespace_predicate':
self._EnterPredicates( ( inverse_namespace_predicate, ), permit_remove = False )
def EnterPredicates( self, page_key, predicates, permit_add = True, permit_remove = True ):
if page_key == self._page_key:
self._EnterPredicates( predicates, permit_add = permit_add, permit_remove = permit_remove )
def SetPredicates( self, predicates ):
self._Clear()
terms = [ self._GenerateTermFromPredicate( predicate ) for predicate in predicates ]
self._AppendTerms( terms )
self._Sort()
self._DataHasChanged()
class AutoCompleteDropdownTagsWrite( AutoCompleteDropdownTags ):
def __init__( self, parent, chosen_tag_callable, location_context, tag_service_key, null_entry_callable = None, tag_service_key_changed_callable = None, show_paste_button = False ):
self._display_tag_service_key = tag_service_key
self._chosen_tag_callable = chosen_tag_callable
self._null_entry_callable = null_entry_callable
self._tag_service_key_changed_callable = tag_service_key_changed_callable
service = HG.client_controller.services_manager.GetService( tag_service_key )
tag_autocomplete_options = HG.client_controller.tag_display_manager.GetTagAutocompleteOptions( tag_service_key )
( location_context, tag_service_key ) = tag_autocomplete_options.GetWriteAutocompleteSearchDomain( location_context )
AutoCompleteDropdownTags.__init__( self, parent, location_context, tag_service_key )
self._location_context_button.SetAllKnownFilesAllowed( True, False )
self._paste_button = ClientGUICommon.BetterBitmapButton( self._text_input_panel, CC.global_pixmaps().paste, self._Paste )
self._paste_button.setToolTip( 'Paste from the clipboard and quick-enter as if you had typed. This can take multiple newline-separated tags.' )
if not show_paste_button:
self._paste_button.hide()
QP.AddToLayout( self._text_input_hbox, self._paste_button, CC.FLAGS_CENTER_PERPENDICULAR )
vbox = QP.VBoxLayout()
hbox = QP.HBoxLayout()
QP.AddToLayout( hbox, self._location_context_button, CC.FLAGS_EXPAND_BOTH_WAYS )
QP.AddToLayout( hbox, self._tag_repo_button, CC.FLAGS_EXPAND_BOTH_WAYS )
QP.AddToLayout( vbox, hbox, CC.FLAGS_EXPAND_SIZER_PERPENDICULAR )
QP.AddToLayout( vbox, self._dropdown_notebook, CC.FLAGS_EXPAND_BOTH_WAYS )
self._dropdown_window.setLayout( vbox )
def _BroadcastChoices( self, predicates, shift_down ):
tags = { predicate.GetValue() for predicate in predicates }
if len( tags ) > 0:
self._chosen_tag_callable( tags )
self._ClearInput()
def _SetTagService( self, tag_service_key ):
AutoCompleteDropdownTags._SetTagService( self, tag_service_key )
if self._tag_service_key_changed_callable is not None:
self._tag_service_key_changed_callable( tag_service_key )
def _GetCurrentBroadcastTextPredicate( self ) -> typing.Optional[ ClientSearch.Predicate ]:
parsed_autocomplete_text = self._GetParsedAutocompleteText()
if parsed_autocomplete_text.IsTagSearch():
return parsed_autocomplete_text.GetImmediateFileSearchPredicate()
else:
return None
def _GetParsedAutocompleteText( self ) -> ClientSearch.ParsedAutocompleteText:
parsed_autocomplete_text = AutoCompleteDropdownTags._GetParsedAutocompleteText( self )
parsed_autocomplete_text.SetInclusive( True )
return parsed_autocomplete_text
def _InitFavouritesList( self ):
height_num_chars = HG.client_controller.new_options.GetInteger( 'ac_write_list_height_num_chars' )
favs_list = ListBoxTagsStringsAC( self._dropdown_notebook, self.BroadcastChoices, self._display_tag_service_key, self._float_mode, tag_display_type = ClientTags.TAG_DISPLAY_STORAGE, height_num_chars = height_num_chars )
favs_list.SetChildRowsAllowed( HG.client_controller.new_options.GetBoolean( 'expand_parents_on_storage_autocomplete_taglists' ) )
return favs_list
def _InitSearchResultsList( self ):
height_num_chars = HG.client_controller.new_options.GetInteger( 'ac_write_list_height_num_chars' )
preds_list = ListBoxTagsPredicatesAC( self._dropdown_notebook, self.BroadcastChoices, self._display_tag_service_key, self._float_mode, tag_display_type = ClientTags.TAG_DISPLAY_STORAGE, height_num_chars = height_num_chars )
preds_list.SetChildRowsAllowed( HG.client_controller.new_options.GetBoolean( 'expand_parents_on_storage_autocomplete_taglists' ) )
return preds_list
def _Paste( self ):
try:
raw_text = HG.client_controller.GetClipboardText()
except HydrusExceptions.DataMissing as e:
QW.QMessageBox.critical( self, 'Error', str(e) )
return
try:
tags = [ text for text in HydrusText.DeserialiseNewlinedTexts( raw_text ) ]
tags = HydrusTags.CleanTags( tags )
entry_predicates = [ ClientSearch.Predicate( ClientSearch.PREDICATE_TYPE_TAG, value = tag ) for tag in tags ]
if len( entry_predicates ) > 0:
shift_down = False
self._BroadcastChoices( entry_predicates, shift_down )
except:
QW.QMessageBox.critical( self, 'Error', 'I could not understand what was in the clipboard' )
raise
def _ShouldTakeResponsibilityForEnter( self ):
parsed_autocomplete_text = self._GetParsedAutocompleteText()
looking_at_search_results = self._dropdown_notebook.currentWidget() == self._search_results_list
sitting_on_empty = parsed_autocomplete_text.IsEmpty()
something_to_broadcast = self._GetCurrentBroadcastTextPredicate() is not None
# the list has results, but they are out of sync with what we have currently entered
# when the user has quickly typed something in and the results are not yet in
results_desynced_with_text = parsed_autocomplete_text != self._current_list_parsed_autocomplete_text
p1 = something_to_broadcast and results_desynced_with_text
# when the text ctrl is empty and we want to push a None to the parent dialog
p2 = sitting_on_empty
return looking_at_search_results and ( p1 or p2 )
def _StartSearchResultsFetchJob( self, job_key ):
parsed_autocomplete_text = self._GetParsedAutocompleteText()
stub_predicates = []
InsertTagPredicates( stub_predicates, self._display_tag_service_key, parsed_autocomplete_text )
AppendLoadingPredicate( stub_predicates )
HG.client_controller.CallLaterQtSafe( self, 0.2, 'set stub predicates', self.SetStubPredicates, job_key, stub_predicates, parsed_autocomplete_text )
tag_search_context = ClientSearch.TagSearchContext( service_key = self._tag_service_key, display_service_key = self._display_tag_service_key )
file_search_context = ClientSearch.FileSearchContext( location_context = self._location_context_button.GetValue(), tag_search_context = tag_search_context )
HG.client_controller.CallToThread( WriteFetch, self, job_key, self.SetFetchedResults, parsed_autocomplete_text, file_search_context, self._results_cache )
def _TakeResponsibilityForEnter( self, shift_down ):
parsed_autocomplete_text = self._GetParsedAutocompleteText()
if parsed_autocomplete_text.IsEmpty() and self._dropdown_notebook.currentWidget() == self._search_results_list:
if self._null_entry_callable is not None:
self._null_entry_callable()
else:
current_broadcast_predicate = self._GetCurrentBroadcastTextPredicate()
if current_broadcast_predicate is not None:
self._BroadcastChoices( { current_broadcast_predicate }, shift_down )
def RefreshFavouriteTags( self ):
favourite_tags = sorted( HG.client_controller.new_options.GetStringList( 'favourite_tags' ) )
self._favourites_list.SetTags( favourite_tags )
def SetDisplayTagServiceKey( self, service_key ):
self._display_tag_service_key = service_key
class EditAdvancedORPredicates( ClientGUIScrolledPanels.EditPanel ):
def __init__( self, parent, initial_string = None ):
ClientGUIScrolledPanels.EditPanel.__init__( self, parent )
self._input_text = QW.QLineEdit( self )
self._result_preview = QW.QPlainTextEdit()
self._result_preview.setReadOnly( True )
( width, height ) = ClientGUIFunctions.ConvertTextToPixels( self._result_preview, ( 64, 6 ) )
self._result_preview.setMinimumWidth( width )
self._result_preview.setMinimumHeight( height )
self._current_predicates = []
#
if initial_string is not None:
self._input_text.setText( initial_string )
#
rows = []
rows.append( ( 'Input: ', self._input_text ) )
rows.append( ( 'Result preview: ', self._result_preview ) )
gridbox = ClientGUICommon.WrapInGrid( self, rows )
vbox = QP.VBoxLayout()
summary = 'Enter a complicated tag search here as text, such as \'( blue eyes and blonde hair ) or ( green eyes and red hair )\', and this should turn it into hydrus-compatible search predicates.'
summary += os.linesep * 2
summary += 'Accepted operators: not (!, -), and (&&), or (||), implies (=>), xor, xnor (iff, <=>), nand, nor.'
summary += os.linesep * 2
summary += 'Parentheses work the usual way. \\ can be used to escape characters (e.g. to search for tags including parentheses)'
st = ClientGUICommon.BetterStaticText( self, summary )
st.setWordWrap( True )
QP.AddToLayout( vbox, st, CC.FLAGS_EXPAND_PERPENDICULAR )
QP.AddToLayout( vbox, gridbox, CC.FLAGS_EXPAND_SIZER_BOTH_WAYS )
self.widget().setLayout( vbox )
self._UpdateText()
self._input_text.textChanged.connect( self.EventUpdateText )
def _UpdateText( self ):
text = self._input_text.text()
self._current_predicates = []
object_name = ''
output = ''
if len( text ) > 0:
try:
# this makes a list of sets, each set representing a list of AND preds
result = LogicExpressionQueryParser.parse_logic_expression_query( text )
for s in result:
row_preds = []
for tag_string in s:
if tag_string.startswith( '-' ):
inclusive = False
tag_string = tag_string[1:]
else:
inclusive = True
if '*' in tag_string:
( namespace, subtag ) = HydrusTags.SplitTag( tag_string )
if len( namespace ) > 0 and subtag == '*':
row_pred = ClientSearch.Predicate( ClientSearch.PREDICATE_TYPE_NAMESPACE, value = namespace, inclusive = inclusive )
else:
row_pred = ClientSearch.Predicate( ClientSearch.PREDICATE_TYPE_WILDCARD, value = tag_string, inclusive = inclusive )
else:
row_pred = ClientSearch.Predicate( ClientSearch.PREDICATE_TYPE_TAG, value = tag_string, inclusive = inclusive )
row_preds.append( row_pred )
if len( row_preds ) == 1:
self._current_predicates.append( row_preds[0] )
else:
self._current_predicates.append( ClientSearch.Predicate( ClientSearch.PREDICATE_TYPE_OR_CONTAINER, value = row_preds ) )
output = os.linesep.join( ( pred.ToString() for pred in self._current_predicates ) )
object_name = 'HydrusValid'
except ValueError:
output = 'Could not parse!'
object_name = 'HydrusInvalid'
self._result_preview.setPlainText( output )
self._result_preview.setObjectName( object_name )
self._result_preview.style().polish( self._result_preview )
def EventUpdateText( self, text ):
self._UpdateText()
def GetValue( self ):
self._UpdateText()
if len( self._current_predicates ) == 0:
raise HydrusExceptions.VetoException( 'Please enter a string that parses into a set of search rules.' )
return self._current_predicates
|
#!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#--------------------------------------------------------------------------
import re
import os.path
from io import open
from setuptools import find_packages, setup
# Change the PACKAGE_NAME only to change folder and different name
PACKAGE_NAME = "azure-mgmt-azurestack"
PACKAGE_PPRINT_NAME = "Azure Stack Management"
# a-b-c => a/b/c
package_folder_path = PACKAGE_NAME.replace('-', '/')
# a-b-c => a.b.c
namespace_name = PACKAGE_NAME.replace('-', '.')
# azure v0.x is not compatible with this package
# azure v0.x used to have a __version__ attribute (newer versions don't)
try:
import azure
try:
ver = azure.__version__
raise Exception(
'This package is incompatible with azure=={}. '.format(ver) +
'Uninstall it with "pip uninstall azure".'
)
except AttributeError:
pass
except ImportError:
pass
# Version extraction inspired from 'requests'
with open(os.path.join(package_folder_path, 'version.py')
if os.path.exists(os.path.join(package_folder_path, 'version.py'))
else os.path.join(package_folder_path, '_version.py'), 'r') as fd:
version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]',
fd.read(), re.MULTILINE).group(1)
if not version:
raise RuntimeError('Cannot find version information')
with open('README.md', encoding='utf-8') as f:
readme = f.read()
with open('CHANGELOG.md', encoding='utf-8') as f:
changelog = f.read()
setup(
name=PACKAGE_NAME,
version=version,
description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME),
long_description=readme + '\n\n' + changelog,
long_description_content_type='text/markdown',
license='MIT License',
author='Microsoft Corporation',
author_email='azpysdkhelp@microsoft.com',
url='https://github.com/Azure/azure-sdk-for-python',
classifiers=[
'Development Status :: 4 - Beta',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'License :: OSI Approved :: MIT License',
],
zip_safe=False,
packages=find_packages(exclude=[
'tests',
# Exclude packages that will be covered by PEP420 or nspkg
'azure',
'azure.mgmt',
]),
install_requires=[
'msrest>=0.6.21',
'azure-common~=1.1',
'azure-mgmt-core>=1.2.0,<2.0.0',
],
extras_require={
":python_version<'3.0'": ['azure-mgmt-nspkg'],
}
)
|
import { graphql, useStaticQuery } from 'gatsby'
export const useSiteMetadata = () => {
const { site } = useStaticQuery(
graphql`
query SITE_METADATA_QUERY {
site {
siteMetadata {
title
description
url
}
}
}
`
)
return site.siteMetadata
}
|
###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2020, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparison_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""
Test file created by XlsxWriter against a file created by Excel.
"""
def setUp(self):
self.set_filename('set_start_page02.xlsx')
self.ignore_elements = {'xl/worksheets/sheet1.xml': ['<pageMargins']}
def test_create_file(self):
"""Test the creation of a simple XlsxWriter file with printer settings."""
workbook = Workbook(self.got_filename)
worksheet = workbook.add_worksheet()
worksheet.set_start_page(2)
worksheet.set_paper(9)
worksheet.vertical_dpi = 200
worksheet.write('A1', 'Foo')
workbook.close()
self.assertExcelEqual()
|
# -*- coding: utf-8 -*-
#
# The MIT License (MIT)
#
# Copyright (c) 2018-2021 Dmitriy Yefremov
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
# Author: Dmitriy Yefremov
#
""" Module for working with Enigma2 bouquets. """
import re
from collections import Counter
from enum import Enum
from pathlib import Path
from app.commons import log
from app.eparser.ecommons import BqServiceType, BouquetService, Bouquets, Bouquet, BqType
_TV_FILE = "bouquets.tv"
_RADIO_FILE = "bouquets.radio"
_DEFAULT_BOUQUET_NAME = "favourites"
_MARKER_PREFIX = "[MARKER!] "
class BouquetsWriter:
""" Class for creating and writing bouquet files.
If "force_bq_names" then naming the files using the name of the bouquet.
Some images may have problems displaying the favorites list!
"""
_SERVICE = '#SERVICE 1:7:{}:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.{}.{}" ORDER BY bouquet\n'
_MARKER = "#SERVICE 1:64:{:X}:0:0:0:0:0:0:0::{}\n"
_SPACE = "#SERVICE 1:832:D:{}:0:0:0:0:0:0:\n"
_ALT = '#SERVICE 1:134:1:0:0:0:0:0:0:0:FROM BOUQUET "{}" ORDER BY bouquet\n'
_ALT_PAT = r"[<>:\"/\\|?*\-\s]"
def __init__(self, path, bouquets, force_bq_names=False):
self._path = path
self._bouquets = bouquets
self._force_bq_names = force_bq_names
self._marker_index = 1
self._space_index = 0
self._alt_names = set()
def write(self):
line = []
pattern = re.compile("[^\\w_()]+")
for bqs in self._bouquets:
line.clear()
line.append("#NAME {}\n".format(bqs.name))
bq_file_names = {b.file for b in bqs.bouquets}
count = 1
m_count = 0
for bq in bqs.bouquets:
bq_name = bq.file
if not bq_name:
if self._force_bq_names:
bq_name = re.sub(pattern, "_", bq.name)
else:
bq_name = "de{0:02d}".format(count)
while bq_name in bq_file_names:
count += 1
bq_name = "de{0:02d}".format(count)
bq_file_names.add(bq_name)
if BqType(bq.type) is BqType.MARKER:
m_data = bq.file.split(":") if bq.file else None
b_name = m_data[-1].strip() if m_data else bq.name.lstrip(_MARKER_PREFIX)
line.append(self._MARKER.format(m_count, b_name))
m_count += 1
else:
line.append(self._SERVICE.format(2 if bq.type == BqType.RADIO.value else 1, bq_name, bq.type))
self.write_bouquet(f"{self._path}userbouquet.{bq_name}.{bq.type}", bq.name, bq.services)
with open(self._path + "bouquets.{}".format(bqs.type), "w", encoding="utf-8") as file:
file.writelines(line)
def write_bouquet(self, path, name, services):
""" Writes single bouquet file. """
bouquet = [f"#NAME {name}\n"]
for srv in services:
s_type = srv.service_type
if s_type == BqServiceType.IPTV.name:
bouquet.append(f"#SERVICE {srv.fav_id.strip()}\n")
elif s_type == BqServiceType.MARKER.name:
m_data = srv.fav_id.strip().split(":")
m_data[2] = self._marker_index
self._marker_index += 1
bouquet.append(self._MARKER.format(m_data[2], m_data[-1]))
elif s_type == BqServiceType.SPACE.name:
bouquet.append(self._SPACE.format(self._space_index))
self._space_index += 1
elif s_type == BqServiceType.ALT.name:
services = srv.transponder
if services:
p = Path(path)
alt_name = srv.data_id
f_name = f"alternatives.{alt_name}{p.suffix}"
if self._force_bq_names:
alt_name = re.sub(self._ALT_PAT, "_", srv.service).lower()
f_name = f"alternatives.{alt_name}{p.suffix}"
bouquet.append(self._ALT.format(f_name))
self.write_bouquet(f"{p.parent}/{f_name}", srv.service, services)
else:
data = to_bouquet_id(srv)
if srv.service:
bouquet.append(f"#SERVICE {data}:{srv.service}\n#DESCRIPTION {srv.service}\n")
else:
bouquet.append(f"#SERVICE {data}\n")
with open(path, "w", encoding="utf-8") as file:
file.writelines(bouquet)
class ServiceType(Enum):
SERVICE = "0"
BOUQUET = "7" # Sub bouquet.
MARKER = "64"
SPACE = "832" # Hidden marker.
ALT = "134" # Alternatives.
UDP = "256"
@classmethod
def _missing_(cls, value):
log("Error. No matching service type [{} {}] was found.".format(cls.__name__, value))
return cls.SERVICE
class BouquetsReader:
""" Class for reading and parsing bouquets. """
_ALT_PAT = re.compile(".*alternatives\\.+(.*)\\.([tv|radio]+).*")
_BQ_PAT = re.compile(".*userbouquet\\.+(.*)\\.+[tv|radio].*")
_SUB_BQ_PAT = re.compile(".*subbouquet\\.+(.*)\\.([tv|radio]+).*")
_STREAM_TYPES = {"4097", "5001", "5002", "8193", "8739"}
__slots__ = ["_path"]
def __init__(self, path):
self._path = path
def get(self):
""" Returns a tuple of TV and Radio bouquets. """
return self.parse_bouquets(_TV_FILE, BqType.TV.value), self.parse_bouquets(_RADIO_FILE, BqType.RADIO.value)
def parse_bouquets(self, bq_name, bq_type):
with open(self._path + bq_name, encoding="utf-8", errors="replace") as file:
line = file.readline()
_, _, bqs_name = line.partition("#NAME")
if not bqs_name:
log(f"No bouquets name found in '{bq_name}'")
bqs_name = "Bouquets (TV)" if bq_type == BqType.TV.value else "Bouquets (Radio)"
bouquets = Bouquets(bqs_name.strip(), bq_type, [])
b_names = set()
real_b_names = Counter()
for line in file.readlines():
if "#SERVICE" in line:
name = re.match(self._BQ_PAT, line)
if name:
b_name = name.group(1)
if b_name in b_names:
log(f"The list of bouquets contains duplicate [{b_name}] names!")
else:
b_names.add(b_name)
rb_name, services = self.get_bouquet(self._path, b_name, bq_type)
if rb_name in real_b_names:
log(f"Bouquet file 'userbouquet.{b_name}.{bq_type}' has duplicate name: {rb_name}")
real_b_names[rb_name] += 1
rb_name = f"{rb_name} {real_b_names[rb_name]}"
else:
real_b_names[rb_name] = 0
bouquets[2].append(Bouquet(rb_name, bq_type, services, None, None, b_name))
else:
s_data = line.split(":")
if len(s_data) == 12 and s_data[1] == ServiceType.MARKER.value:
b_name = "{}{}".format(_MARKER_PREFIX, s_data[-1].strip())
bouquets[2].append(Bouquet(b_name, BqType.MARKER.value, [], None, None, line.strip()))
else:
log(f"Unsupported or invalid data format: [{line}].")
else:
log(f"Unsupported or invalid line format: [{line}].")
return bouquets
@staticmethod
def get_bouquet(path, bq_name, bq_type, prefix="userbouquet"):
""" Parsing services ids from bouquet file. """
with open(path + "{}.{}.{}".format(prefix, bq_name, bq_type), encoding="utf-8", errors="replace") as file:
chs_list = file.read()
services = []
srvs = list(filter(None, chs_list.split("\n#SERVICE"))) # filtering ['']
# May come across empty[wrong] files!
if not srvs:
log("Bouquet file 'userbouquet.{}.{}' is empty or wrong!".format(bq_name, bq_type))
return "{} [empty]".format(bq_name), services
bq_name = srvs.pop(0)
for num, srv in enumerate(srvs, start=1):
srv_data = srv.strip().split(":")
data_len = len(srv_data)
if data_len < 10:
log("The bouquet [{}] service [{}] has the wrong data format: [{}]".format(bq_name, num, srv))
continue
s_type = ServiceType(srv_data[1])
if s_type is ServiceType.MARKER:
m_data, sep, desc = srv.partition("#DESCRIPTION")
services.append(BouquetService(desc.strip() if desc else "", BqServiceType.MARKER, srv, num))
elif s_type is ServiceType.SPACE:
m_data, sep, desc = srv.partition("#DESCRIPTION")
services.append(BouquetService(desc.strip() if desc else "", BqServiceType.SPACE, srv, num))
elif s_type is ServiceType.ALT:
alt = re.match(BouquetsReader._ALT_PAT, srv)
if alt:
alt_name, alt_type = alt.group(1), alt.group(2)
alt_bq_name, alt_srvs = BouquetsReader.get_bouquet(path, alt_name, alt_type, "alternatives")
services.append(BouquetService(alt_bq_name, BqServiceType.ALT, alt_name, tuple(alt_srvs)))
elif s_type is ServiceType.BOUQUET:
sub = re.match(BouquetsReader._SUB_BQ_PAT, srv)
if sub:
sub_name, sub_type = sub.group(1), sub.group(2)
sub_bq_name, sub_srvs = BouquetsReader.get_bouquet(path, sub_name, sub_type, "subbouquet")
bq = Bouquet(sub_bq_name, sub_type, tuple(sub_srvs), None, None, sub_name)
services.append(BouquetService(sub_bq_name, BqServiceType.BOUQUET, bq, num))
elif srv_data[0].strip() in BouquetsReader._STREAM_TYPES or srv_data[10].startswith(("http", "rtsp")):
stream_data, sep, desc = srv.partition("#DESCRIPTION")
desc = desc.lstrip(":").strip() if desc else srv_data[-1].strip()
services.append(BouquetService(desc, BqServiceType.IPTV, srv, num))
else:
fav_id = "{}:{}:{}:{}".format(srv_data[3], srv_data[4], srv_data[5], srv_data[6])
name = None
if data_len == 12:
name, sep, desc = str(srv_data[-1]).partition("\n#DESCRIPTION")
services.append(BouquetService(name, BqServiceType.DEFAULT, fav_id.upper(), num))
return bq_name.lstrip("#NAME").strip(), services
def to_bouquet_id(srv):
""" Creates bouquet channel id. """
data_type = srv.data_id
if data_type and len(data_type) > 4:
data_type = int(srv.data_id.split(":")[4])
return "{}:0:{:X}:{}:0:0:0:".format(1, data_type, srv.fav_id)
if __name__ == "__main__":
pass
|
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from functools import partial
import numpy as onp
import warnings
import textwrap
import operator
from typing import Tuple, Union, cast
from jax import jit, ops
from .. import lax
from .. import lax_linalg
from .. import dtypes
from .lax_numpy import _not_implemented
from .lax_numpy import _wraps
from . import lax_numpy as np
from ..api import custom_transforms, defjvp
from ..util import get_module_functions
from ..third_party.numpy.linalg import cond, tensorinv
_T = lambda x: np.swapaxes(x, -1, -2)
def _promote_arg_dtypes(*args):
"""Promotes `args` to a common inexact type."""
def _to_inexact_type(type):
return type if np.issubdtype(type, np.inexact) else np.float_
inexact_types = [_to_inexact_type(np._dtype(arg)) for arg in args]
dtype = dtypes.canonicalize_dtype(np.result_type(*inexact_types))
args = [lax.convert_element_type(arg, dtype) for arg in args]
if len(args) == 1:
return args[0]
else:
return args
@_wraps(onp.linalg.cholesky)
def cholesky(a):
a = _promote_arg_dtypes(np.asarray(a))
return lax_linalg.cholesky(a)
@_wraps(onp.linalg.svd)
def svd(a, full_matrices=True, compute_uv=True):
a = _promote_arg_dtypes(np.asarray(a))
return lax_linalg.svd(a, full_matrices, compute_uv)
@_wraps(onp.linalg.matrix_power)
def matrix_power(a, n):
a = _promote_arg_dtypes(np.asarray(a))
if a.ndim < 2:
raise TypeError("{}-dimensional array given. Array must be at least "
"two-dimensional".format(a.ndim))
if a.shape[-2] != a.shape[-1]:
raise TypeError("Last 2 dimensions of the array must be square")
try:
n = operator.index(n)
except TypeError:
raise TypeError("exponent must be an integer, got {}".format(n))
if n == 0:
return np.broadcast_to(np.eye(a.shape[-2], dtype=a.dtype), a.shape)
elif n < 0:
a = inv(a)
n = np.abs(n)
if n == 1:
return a
elif n == 2:
return a @ a
elif n == 3:
return (a @ a) @ a
z = result = None
while n > 0:
z = a if z is None else (z @ z)
n, bit = divmod(n, 2)
if bit:
result = z if result is None else (result @ z)
return result
@_wraps(onp.linalg.matrix_rank)
def matrix_rank(M, tol=None):
M = _promote_arg_dtypes(np.asarray(M))
if M.ndim > 2:
raise TypeError("array should have 2 or fewer dimensions")
if M.ndim < 2:
return np.any(M != 0).astype(np.int32)
S = svd(M, full_matrices=False, compute_uv=False)
if tol is None:
tol = S.max() * np.max(M.shape) * np.finfo(S.dtype).eps
return np.sum(S > tol)
# TODO(pfau): make this work for complex types
def _jvp_slogdet(g, ans, x):
jvp_sign = np.zeros(x.shape[:-2])
jvp_logdet = np.trace(solve(x, g), axis1=-1, axis2=-2)
return jvp_sign, jvp_logdet
@_wraps(onp.linalg.slogdet)
@custom_transforms
@jit
def slogdet(a):
a = _promote_arg_dtypes(np.asarray(a))
dtype = lax.dtype(a)
a_shape = np.shape(a)
if len(a_shape) < 2 or a_shape[-1] != a_shape[-2]:
msg = "Argument to slogdet() must have shape [..., n, n], got {}"
raise ValueError(msg.format(a_shape))
lu, pivot = lax_linalg.lu(a)
diag = np.diagonal(lu, axis1=-2, axis2=-1)
is_zero = np.any(diag == np.array(0, dtype=dtype), axis=-1)
parity = np.count_nonzero(pivot != np.arange(a_shape[-1]), axis=-1)
if np.iscomplexobj(a):
sign = np.prod(diag / np.abs(diag), axis=-1)
else:
sign = np.array(1, dtype=dtype)
parity = parity + np.count_nonzero(diag < 0, axis=-1)
sign = np.where(is_zero,
np.array(0, dtype=dtype),
sign * np.array(-2 * (parity % 2) + 1, dtype=dtype))
logdet = np.where(
is_zero, np.array(-np.inf, dtype=dtype),
np.sum(np.log(np.abs(diag)), axis=-1))
return sign, np.real(logdet)
defjvp(slogdet, _jvp_slogdet)
@_wraps(onp.linalg.det)
def det(a):
sign, logdet = slogdet(a)
return sign * np.exp(logdet)
@_wraps(onp.linalg.eig)
def eig(a):
a = _promote_arg_dtypes(np.asarray(a))
w, vl, vr = lax_linalg.eig(a)
return w, vr
@_wraps(onp.linalg.eigvals)
def eigvals(a):
w, _ = eig(a)
return w
@_wraps(onp.linalg.eigh)
def eigh(a, UPLO=None, symmetrize_input=True):
if UPLO is None or UPLO == "L":
lower = True
elif UPLO == "U":
lower = False
else:
msg = "UPLO must be one of None, 'L', or 'U', got {}".format(UPLO)
raise ValueError(msg)
a = _promote_arg_dtypes(np.asarray(a))
v, w = lax_linalg.eigh(a, lower=lower, symmetrize_input=symmetrize_input)
return w, v
@_wraps(onp.linalg.eigvalsh)
def eigvalsh(a, UPLO='L'):
w, _ = eigh(a, UPLO)
return w
@_wraps(onp.linalg.pinv, lax_description=textwrap.dedent("""\
It differs only in default value of `rcond`. In `numpy.linalg.pinv`, the
default `rcond` is `1e-15`. Here the default is
`10. * max(num_rows, num_cols) * np.finfo(dtype).eps`.
"""))
def pinv(a, rcond=None):
# ported from https://github.com/numpy/numpy/blob/v1.17.0/numpy/linalg/linalg.py#L1890-L1979
a = np.conj(a)
# copied from https://github.com/tensorflow/probability/blob/master/tensorflow_probability/python/math/linalg.py#L442
if rcond is None:
max_rows_cols = max(a.shape[-2:])
rcond = 10. * max_rows_cols * np.finfo(a.dtype).eps
rcond = np.asarray(rcond)
u, s, v = svd(a, full_matrices=False)
# Singular values less than or equal to ``rcond * largest_singular_value``
# are set to zero.
cutoff = rcond[..., np.newaxis] * np.amax(s, axis=-1, keepdims=True)
large = s > cutoff
s = np.divide(1, s)
s = np.where(large, s, 0)
vT = np.swapaxes(v, -1, -2)
uT = np.swapaxes(u, -1, -2)
res = np.matmul(vT, np.multiply(s[..., np.newaxis], uT))
return lax.convert_element_type(res, a.dtype)
@_wraps(onp.linalg.inv)
def inv(a):
if np.ndim(a) < 2 or a.shape[-1] != a.shape[-2]:
raise ValueError("Argument to inv must have shape [..., n, n], got {}."
.format(np.shape(a)))
return solve(
a, lax.broadcast(np.eye(a.shape[-1], dtype=lax.dtype(a)), a.shape[:-2]))
@partial(jit, static_argnums=(1, 2, 3))
def _norm(x, ord, axis: Union[None, Tuple[int, ...], int], keepdims):
x = _promote_arg_dtypes(np.asarray(x))
x_shape = np.shape(x)
ndim = len(x_shape)
if axis is None:
# NumPy has an undocumented behavior that admits arbitrary rank inputs if
# `ord` is None: https://github.com/numpy/numpy/issues/14215
if ord is None:
return np.sqrt(np.sum(np.real(x * np.conj(x)), keepdims=keepdims))
axis = tuple(range(ndim))
elif isinstance(axis, tuple):
axis = tuple(np._canonicalize_axis(x, ndim) for x in axis)
else:
axis = (np._canonicalize_axis(axis, ndim),)
num_axes = len(axis)
if num_axes == 1:
if ord is None or ord == 2:
return np.sqrt(np.sum(np.real(x * np.conj(x)), axis=axis,
keepdims=keepdims))
elif ord == np.inf:
return np.amax(np.abs(x), axis=axis, keepdims=keepdims)
elif ord == -np.inf:
return np.amin(np.abs(x), axis=axis, keepdims=keepdims)
elif ord == 0:
return np.sum(x != 0, dtype=np.finfo(lax.dtype(x)).dtype,
axis=axis, keepdims=keepdims)
elif ord == 1:
# Numpy has a special case for ord == 1 as an optimization. We don't
# really need the optimization (XLA could do it for us), but the Numpy
# code has slightly different type promotion semantics, so we need a
# special case too.
return np.sum(np.abs(x), axis=axis, keepdims=keepdims)
else:
abs_x = np.abs(x)
ord = lax._const(abs_x, ord)
out = np.sum(abs_x ** ord, axis=axis, keepdims=keepdims)
return np.power(out, 1. / ord)
elif num_axes == 2:
row_axis, col_axis = cast(Tuple[int, ...], axis)
if ord is None or ord in ('f', 'fro'):
return np.sqrt(np.sum(np.real(x * np.conj(x)), axis=axis,
keepdims=keepdims))
elif ord == 1:
if not keepdims and col_axis > row_axis:
col_axis -= 1
return np.amax(np.sum(np.abs(x), axis=row_axis, keepdims=keepdims),
axis=col_axis, keepdims=keepdims)
elif ord == -1:
if not keepdims and col_axis > row_axis:
col_axis -= 1
return np.amin(np.sum(np.abs(x), axis=row_axis, keepdims=keepdims),
axis=col_axis, keepdims=keepdims)
elif ord == np.inf:
if not keepdims and row_axis > col_axis:
row_axis -= 1
return np.amax(np.sum(np.abs(x), axis=col_axis, keepdims=keepdims),
axis=row_axis, keepdims=keepdims)
elif ord == -np.inf:
if not keepdims and row_axis > col_axis:
row_axis -= 1
return np.amin(np.sum(np.abs(x), axis=col_axis, keepdims=keepdims),
axis=row_axis, keepdims=keepdims)
elif ord in ('nuc', 2, -2):
x = np.moveaxis(x, axis, (-2, -1))
if ord == 2:
reducer = np.amax
elif ord == -2:
reducer = np.amin
else:
reducer = np.sum
y = reducer(svd(x, compute_uv=False), axis=-1)
if keepdims:
result_shape = list(x_shape)
result_shape[axis[0]] = 1
result_shape[axis[1]] = 1
y = np.reshape(y, result_shape)
return y
else:
raise ValueError("Invalid order '{}' for matrix norm.".format(ord))
else:
raise ValueError(
"Invalid axis values ({}) for np.linalg.norm.".format(axis))
@_wraps(onp.linalg.norm)
def norm(x, ord=None, axis=None, keepdims=False):
return _norm(x, ord, axis, keepdims)
@_wraps(onp.linalg.qr)
def qr(a, mode="reduced"):
if mode in ("reduced", "r", "full"):
full_matrices = False
elif mode == "complete":
full_matrices = True
else:
raise ValueError("Unsupported QR decomposition mode '{}'".format(mode))
a = _promote_arg_dtypes(np.asarray(a))
q, r = lax_linalg.qr(a, full_matrices)
if mode == "r":
return r
return q, r
@_wraps(onp.linalg.solve)
@jit
def solve(a, b):
a, b = _promote_arg_dtypes(np.asarray(a), np.asarray(b))
a_shape = np.shape(a)
b_shape = np.shape(b)
a_ndims = len(a_shape)
b_ndims = len(b_shape)
if not (a_ndims >= 2 and a_shape[-1] == a_shape[-2] and b_ndims >= 1):
msg = ("The arguments to solve must have shapes a=[..., m, m] and "
"b=[..., m, k] or b=[..., m]; got a={} and b={}")
raise ValueError(msg.format(a_shape, b_shape))
lu, pivots = lax_linalg.lu(a)
dtype = lax.dtype(a)
m = a_shape[-1]
# Numpy treats the RHS as a (batched) vector if the number of dimensions
# differ by 1. Otherwise, broadcasting rules apply.
x = b[..., None] if a_ndims == b_ndims + 1 else b
batch_dims = lax.broadcast_shapes(lu.shape[:-2], x.shape[:-2])
x = np.broadcast_to(x, batch_dims + x.shape[-2:])
lu = np.broadcast_to(lu, batch_dims + lu.shape[-2:])
permutation = lax_linalg.lu_pivots_to_permutation(pivots, m)
permutation = np.broadcast_to(permutation, batch_dims + (m,))
iotas = np.ix_(*(lax.iota(np.int32, b) for b in batch_dims + (1,)))
x = x[iotas[:-1] + (permutation, slice(None))]
x = lax_linalg.triangular_solve(lu, x, left_side=True, lower=True,
unit_diagonal=True)
x = lax_linalg.triangular_solve(lu, x, left_side=True, lower=False)
return x[..., 0] if a_ndims == b_ndims + 1 else x
for func in get_module_functions(onp.linalg):
if func.__name__ not in globals():
globals()[func.__name__] = _not_implemented(func)
|
/**
* Shell type.
* @typedef {'bash'|'powershell'|'cmd'} ShellType
*/
/**
* Shell options.
*
* The `program` refers to the script or executable
* being run.
*
* ### Expansion
*
* When `expansion` is `true`, uses double
* quote to allow expansion of special characters.
* Be careful to escape all special characters which
* you do not want to expand.
*
* When `expansion` is `false`, uses single quotes
* to preserve literal meaning. If an invalid literal
* character is present, double quotes are used with
* special characters escaped.
*
* @typedef {{
* shell: ShellType,
* program: string,
* expansion?: boolean,
* }} IShellOptions
*/
/** @type ShellType[] */
const kSupportedShells = ["bash", "powershell", "cmd"];
const kInvalidBashSingleQuoteStrings = ["'"];
/**
* Default options;
* @type IShellOptions
**/
var _defaults = {
shell: "bash",
};
/**
* Return the current default shell options.
* @returns {IShellOptions}
*/
function getDefaults() {
return _defaults;
}
/**
* Sets the default shell options.
* @param {IShellOptions} options
*/
function setDefaults(options) {
options = options || {};
if (!options.shell || typeof options.shell !== "string") {
throw new Error("Invalid shell");
}
options.shell = options.shell.toLowerCase();
if (kSupportedShells.indexOf(options.shell) < 0) {
throw new Error("Invalid shell");
}
_defaults = { ...options };
if (options.posix) {
_defaults.posix = true;
}
}
/**
* Encodes a CLI command specified as arguments.
* The result is ready to use as a CLI command for the
* specified shell.
*
* Specifiying an array instead of a string combines the
* contents of the array into a single string argument.
* This is usefull to form a single string argument or
* to pass nested arguments. Cross-shell encoding is supported.
*
* The following examples assume that bash is the default shell:
* 1. `shellEncode('echo', ['Hello', 'World!'])` gives:
* - `'echo "Hello World!"'`
*
* Add an option object as the last argument or item of array
* to set shell options (see {@link IShellOptions}).
* Note that different options can be nested.
*
* For example:
* 1. `shellEncode('ps', ['Write-Output', ['Hello', 'World!'], { shell: 'powershell' }], { shell: 'cmd' })` gives:
* - `'ps "Write-Output ""Hello World!"""'`
*
* @param {string|string[]|IShellOptions} cmds
* @return {string} Encoded CLI command
*/
function shellEncode(...cmds) {
return _encode(cmds, {}, true);
}
function _encode(cmds, outerOptions, skipOneLevel) {
var maybeOptions = cmds[cmds.length - 1];
var inlineOptions = null;
if (
!(
typeof maybeOptions === "string" ||
(typeof maybeOptions === "object" && maybeOptions instanceof Array)
)
) {
inlineOptions = cmds.pop();
}
var options = {
..._defaults,
...outerOptions,
};
if (skipOneLevel) {
options = {
...options,
...inlineOptions,
};
}
inlineOptions = inlineOptions || {};
var newCmds = cmds;
var enclose = false;
var program = options.program || '';
if (newCmds && newCmds instanceof Array) {
var innerShell = options.shell;
if (inlineOptions && inlineOptions.shell) {
innerShell = inlineOptions.shell;
}
if (innerShell === options.shell) {
inlineOptions = {
...options,
...inlineOptions,
shell: innerShell,
};
if (program) {
inlineOptions.program = program;
}
}
newCmds = newCmds
.map((cmd, i) => {
if (typeof cmd === "object" && cmd instanceof Array) {
cmd = _encode(cmd, inlineOptions);
}
if (i === 0 && !program) {
program = cmd;
inlineOptions.program = program;
}
return cmd;
});
if (options.shell === 'cmd') {
// echo in CMD needs special treatment
if (newCmds.length === 2 && !newCmds[1]) {
// Special case: echo empty line.
// Reference: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/echo
newCmds = 'echo.';
} else {
let joinedCmds = newCmds.slice(0, 2).join(' ');
let cmd = '';
for (let i = 2; i < newCmds.length; i++) {
cmd = newCmds[i];
if (newCmds[i - 2] !== 'echo') {
joinedCmds += ' ';
} // Else: avoid trailing space in output
joinedCmds += cmd;
}
newCmds = joinedCmds;
}
} else {
newCmds = newCmds.join(" ");
}
if (skipOneLevel) {
return newCmds;
}
enclose = true;
}
if (typeof newCmds !== "string") {
throw new Error(`Bad commands`);
}
var encloseString = "";
var encloseStartString = "";
var encloseEndString = "";
var escapeString = "";
var stringsToEscape = [];
var invalidStrings = [];
var replacements = {};
var expansion = options.expansion;
switch (options.shell) {
case "bash":
// Reference: http://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Quoting
var literal = !expansion;
if (!expansion) {
// Check if invalid strings are present.
for (let invalidString of kInvalidBashSingleQuoteStrings) {
if (newCmds.indexOf(invalidString) >= 0) {
// Invalid string found, use double quotes
expansion = true;
break;
}
}
}
if (expansion) {
encloseString = '"';
escapeString = "\\";
stringsToEscape = ["\\", '"'];
if (literal) {
// Escape special characters
stringsToEscape = stringsToEscape.concat([
'$', '`', '!', '\n'
]);
}
} else {
encloseString = "'";
escapeString = "\\";
invalidStrings = kInvalidBashSingleQuoteStrings;
}
break;
case "cmd":
// Reference: https://ss64.com/nt/syntax-esc.html
// if (program === 'echo') {
// // echo prints double quotes,
// // escape delimiters instead of wrapping.
// escapeString = '^';
// stringsToEscape = [
// ' ', ',', ';', '=', '\t', '\r', '\n'
// ];
// if (program !== 'echo') {
// replacements['\\^"'] = '\\^"\\^"\\^"';
// replacements['"'] = '\\^"';
// }
// if (!expansion) {
// stringsToEscape = stringsToEscape.concat([
// '\\', '&', '<', '>', '^', '|', '%', '!'
// ,'(', ')'
// ]);
// replacements['!'] = '^^!'; // Escape delayed expansion
// }
// } else {
// encloseString = '"';
// escapeString = '^';
// stringsToEscape = ['\r\n', '\n'];
// replacements = {
// '"': '"""', // Double up quotes to escape inside quotes
// };
// if (!expansion) {
// Object.assign(replacements, {
// '%': '%%', // Double percent to escape inside quotes
// });
// }
// }
// No double quotes present.
// Avoid enclosing in quotes as this potentially
// adds quotes to the passed argument, which then
// need to be dequoted.
escapeString = '^';
stringsToEscape = [
' ', ',', ';', '=', '\t', '\r', '\n'
];
if (program !== 'echo') {
// echo prints double quotes,
// otherwise, quotes need to be escaped.
replacements['\\^"'] = '\\^"\\^"\\^"';
replacements['"'] = '\\^"';
}
if (!expansion) {
stringsToEscape = stringsToEscape.concat([
'\\', '&', '<', '>', '^', '|', '%', '!'
,'(', ')'
]);
replacements['!'] = '^^!'; // Escape delayed expansion
}
break;
case "powershell":
// References:
// https://adamtheautomator.com/powershell-escape-double-quotes/
// https://www.red-gate.com/simple-talk/sysadmin/powershell/when-to-quote-in-powershell/
if (expansion) {
encloseString = '"';
escapeString = "`";
// TODO: When a region delimited by single quotes
// is found, only escape double quotes
// (and make no replacements?)
stringsToEscape = ["`", '"'];
replacements = {
'\\`"': '\\`"\\`"\\`"',
'`"': '\\`"',
};
} else {
encloseString = "'";
escapeString = "'";
stringsToEscape = ["'"];
}
break;
default:
throw new Error("Unsupported shell: " + options.shell);
}
if (encloseString) {
if (!encloseStartString) {
encloseStartString = encloseString;
}
if (!encloseEndString) {
encloseEndString = encloseString;
}
}
var allReplacements = {};
invalidStrings.forEach((invalidString) => {
if (newCmds.indexOf(invalidString) >= 0) {
throw new Error(
`Invalid shell command: "${newCmds}". Given the options ${JSON.stringify(
options
)}, the following are invalid: ${JSON.stringify(
invalidStrings
)}`
);
}
});
Object.keys(replacements).forEach((stringToReplace) => {
allReplacements[stringToReplace] = replacements[stringToReplace];
});
stringsToEscape.forEach((stringToEscape) => {
allReplacements[stringToEscape] = escapeString + stringToEscape;
});
let allStringsToReplace = Object.keys(allReplacements);
let len = newCmds.length;
var stringToReplaceNow = "";
var escapedCmds = "";
// Note: We avoid global replace because some of
// the replacements overlap
for (var i = 0; i < len; i += 1) {
stringToReplaceNow = allStringsToReplace.find((stringToReplace) => {
return (
stringToReplace === newCmds.slice(i, i + stringToReplace.length)
);
});
if (stringToReplaceNow) {
escapedCmds += allReplacements[stringToReplaceNow];
i += stringToReplaceNow.length - 1;
continue;
}
escapedCmds += newCmds[i];
}
if (enclose) {
escapedCmds = encloseStartString + escapedCmds + encloseEndString;
}
return escapedCmds;
}
shellEncode.getDefaults = getDefaults;
shellEncode.setDefaults = setDefaults;
module.exports = shellEncode;
|
"use strict";
(function(window) {
var photo = window.photo;
// var table = $('#datatable-fixed-header').DataTable({
// fixedHeader: true
// });
var dom = {
form_user : $(".form_user"),
user_del : $(".form_user_delete"),
apply_pass : $(".agent_apply_pass"),
apply_refuse : $(".agent_apply_refuse"),
refuse_modal : $(".apply_refuse_modal"),
refuse_save : $(".refuse_save"),
reason : $(".reason"),
time_field : $(".time_field"),
start_time : $(".start_time"),
end_time : $(".end_time"),
reset_btn : $(".reset_btn"),
search_btn : $(".search_btn"),
nickname : $(".nickname"),
agent_user : $(".agent_user"),
edit_reason : $(".edit_refuse_reason")
}
photo._form_user = function(){
var uid = $(this).attr('data_id');
photo.error_modal({
onok : function(){ photo._exec_delete('/admin/users/form_user',{ id : uid });},
uid : uid,
msg : "您确定要赠送会员吗?"
});
};
photo._user_del = function(){
var uid = $(this).attr('data_id');
photo.error_modal({
onok : function(){ photo._exec_delete('/admin/users/form_user_delete',{ id : uid });},
uid : uid,
msg : "您确定要取消赠送会员吗?"
});
};
photo._apply_pass = function(){
var uid = $(this).attr('data_id');
photo.error_modal({
onok : function(){ photo._exec_delete('/admin/users/apply_formated',{ uid : uid , type : 'pass'});},
uid : uid,
msg : "您确定审核通过吗?"
});
};
photo._refuse_save = function(){
var uid = $(this).attr('data_id');
var reason = dom.reason.val();
dom.refuse_modal.modal('hide');
photo.RequestDataPost({
request_url : '/admin/users/apply_formated',
data : {
type : 'refused',
uid : uid,
reason : reason
},
callback_data : function(data){
photo.error_modal({
msg : data.msg
});
}
});
};
photo._apply_refuse = function(){
var uid = $(this).attr('data_id');
dom.refuse_save.attr('data_id', uid);
dom.refuse_modal.modal('show');
}
photo._edit_refuse_btn_click = function(){
var uid = $(this).attr('data_id');
dom.reason.val($(this).prev('span').html());
dom.refuse_save.attr('data_id', uid);
dom.refuse_modal.modal('show');
};
photo._url_exec = function(url){
window.location.href = url;
}
photo._search_btn_click = function(){
var start_time = dom.start_time.val();
var end_time = dom.end_time.val();
var nickname = $.trim(dom.nickname.val());
var agent_user = dom.agent_user.val();
var where="?1=1";
if ( start_time ) {
where += "&start_time="+start_time;
}
if ( end_time ) {
where += "&end_time="+end_time;
}
if ( nickname ) {
where += "&nickname="+nickname;
}
if ( agent_user ){
where += "&agent_user=" + agent_user;
}
photo._url_exec('/admin/users/index'+where);
}
photo._reset_btn_click = function(){
photo._url_exec('/admin/users/index?start_time=&end_time=&agent_user=-1');
}
dom.time_field.datetimepicker({
weekStart: 1,
todayBtn: 1,
autoclose: 1,
todayHighlight: 1,
startView: 2,
minView: 4,
forceParse: 0,
format: 'yyyy-mm-dd'
});
dom.edit_reason.on('click', photo._edit_refuse_btn_click);
dom.search_btn.on('click', photo._search_btn_click);
dom.reset_btn.on('click', photo._reset_btn_click);
dom.user_del.on('click', photo._user_del);
dom.form_user.on('click', photo._form_user);
dom.apply_pass.on('click', photo._apply_pass);
dom.apply_refuse.on('click', photo._apply_refuse);
dom.refuse_save.on('click', photo._refuse_save);
})(window)
|
#!/usr/bin/python
from fence_testing import test_action
def main():
DEVICE = "devices.d/apc-v2.cfg"
ACT_STATUS = "actions.d/status.cfg"
ACT_ONOFF = "actions.d/power-on-off.cfg"
ACT_LIST = "actions.d/list.cfg"
test_action(DEVICE, ACT_STATUS, "getopt")
test_action(DEVICE, ACT_ONOFF, "stdin")
test_action(DEVICE, ACT_LIST, "getopt")
if __name__ == "__main__":
main()
|
# pylint: disable=C0103,C0111,W0614
from __future__ import print_function
import ida_idaapi
from ida_hexrays import *
class CXorOptimizer(optinsn_t):
def __init__(self):
optinsn_t.__init__(self)
def func(self, blk, ins, _optflags):
if blk.mba.maturity != MMAT_GLBOPT1:
return 0
changed = 0
#We do optimize instruction at level MMAT_GLBOPT1 only
if ins.opcode == m_and and \
ins.l.is_insn(m_bnot) and \
ins.r.is_insn(m_or) and \
ins.l.d.l.is_insn(m_and):
subIns = ins.l.d.l.d
if subIns.l == ins.r.d.l and subIns.r == ins.r.d.r:
#Found match ~(a2 & a1) & (a2 | a1). Fix to xor
l = mop_t(subIns.l)
r = mop_t(subIns.r)
ins.l = l
ins.r = r
ins.opcode = m_xor
blk.mark_lists_dirty()
changed += 1
return changed
class xor_optimizer_plugin_t(ida_idaapi.plugin_t):
flags = ida_idaapi.PLUGIN_HIDE
wanted_name = "xor optimizer"
wanted_hotkey = ""
comment = ""
help = ""
def __init__(self):
self.optimizer = None
def init(self):
if init_hexrays_plugin():
self.optimizer = CXorOptimizer()
self.optimizer.install()
print("Xor optimizer installed")
return ida_idaapi.PLUGIN_KEEP
return ida_idaapi.PLUGIN_SKIP
def term(self):
if self.optimizer:
self.optimizer.remove()
def run(self):
pass
def PLUGIN_ENTRY():
return xor_optimizer_plugin_t()
|
import ctypes
import pytest
c_lib = ctypes.CDLL('../solutions/0852-peak-index/peak-index.so')
@pytest.mark.parametrize('array, ans',
[([0,1,0], 1),
([0,2,1,0], 1),
([0,10,5,2], 1),
([3,4,5,1], 2),
([24,69,100,99,79,78,67,36,26,19], 2)])
def test_peak_index(array, ans):
arr = (ctypes.c_int * len(array))(*array)
out = c_lib.peakIndexInMountainArray(arr, len(arr))
assert out == ans
|
//
// NSObject+CheckIsLegal.h
// XiuXiuTuanGou
//
// Created by 张敬 on 2018/10/4.
// Copyright © 2018年 XiuXiuTuanGou. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface NSObject (CheckIsLegal)
//剔除卡号里的非法字符
-(NSString *)getDigitsOnly:(NSString*)s;
//检查银行卡是否合法
-(BOOL)isValidCardNumber:(NSString *)cardNumber;
//验证手机号码
-(NSString *)numberSuitScanf:(NSString*)number;
/**
验证是否是手机号
@param number 手机号
@return 回参
*/
- (BOOL) IsPhoneNumber:(NSString *)number;
/**
验证是否是邮箱
@param Email 邮箱号
@return 回参
*/
- (BOOL) IsEmailAdress:(NSString *)Email;
/**
验证是否是身份证号
@param IDCardNumber 身份证号
@return 回参
*/
- (BOOL) IsIdentityCard:(NSString *)IDCardNumber;
/**
中文姓名校验
@param name 姓名
@return 回参
*/
- (BOOL) isChineseName:(NSString *)name;
/**
英文姓名校验
@param name 姓名
@return 回参
*/
- (BOOL) isEnglishName:(NSString *)name;
/**
校验是否是数字
@param aims 数字
@return 回参
*/
- (BOOL)isNumber:(NSString *)aims;
@end
NS_ASSUME_NONNULL_END
|
var _nameless_core_8hpp =
[
[ "GLSL_AU", "struct___n_l_1_1_core_1_1_g_l_s_l___a_u.html", "struct___n_l_1_1_core_1_1_g_l_s_l___a_u" ],
[ "Component", "class___n_l_1_1_core_1_1_component.html", "class___n_l_1_1_core_1_1_component" ],
[ "Element", "class___n_l_1_1_core_1_1_element.html", "class___n_l_1_1_core_1_1_element" ],
[ "UI", "class___n_l_1_1_core_1_1_u_i.html", "class___n_l_1_1_core_1_1_u_i" ],
[ "Object", "class___n_l_1_1_core_1_1_object.html", "class___n_l_1_1_core_1_1_object" ],
[ "Script", "class___n_l_1_1_core_1_1_script.html", "class___n_l_1_1_core_1_1_script" ],
[ "PostProcessingScript", "class___n_l_1_1_core_1_1_post_processing_script.html", "class___n_l_1_1_core_1_1_post_processing_script" ],
[ "MaterialInstanceData", "struct___n_l_1_1_core_1_1_material_instance_data.html", "struct___n_l_1_1_core_1_1_material_instance_data" ],
[ "MeshInstanceData", "struct___n_l_1_1_core_1_1_mesh_instance_data.html", "struct___n_l_1_1_core_1_1_mesh_instance_data" ],
[ "transform", "struct___n_l_1_1_core_1_1transform.html", "struct___n_l_1_1_core_1_1transform" ],
[ "ScreenQuad", "struct___n_l_1_1_core_1_1_screen_quad.html", "struct___n_l_1_1_core_1_1_screen_quad" ],
[ "LightProperties", "struct___n_l_1_1_core_1_1_light_properties.html", "struct___n_l_1_1_core_1_1_light_properties" ],
[ "AnimationBone", "struct___n_l_1_1_core_1_1_animation_bone.html", "struct___n_l_1_1_core_1_1_animation_bone" ],
[ "NL_PI", "_nameless_core_8hpp.html#a9b05b924187f242034854e825833bf8c", null ],
[ "ObjInstanceList", "_nameless_core_8hpp.html#a3b79ec3b81411d0c54b3c99c2f71c7fb", null ],
[ "ObjList", "_nameless_core_8hpp.html#a7f292491dc27036b02dc960a6b018502", null ],
[ "ObjTypeList", "_nameless_core_8hpp.html#a78c17239b3bc28550a46b9f6af559d1e", null ],
[ "RenderQuad", "_nameless_core_8hpp.html#a2bbf3c41df9a9e3e362dbd28c78eda5d", null ]
];
|
/*
+------------------------------------------------------------------------+
| Phalcon Framework |
+------------------------------------------------------------------------+
| Copyright (c) 2011-2013 Phalcon Team (http://www.phalconphp.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
| |
| If you did not receive a copy of the license and are unable to |
| obtain it through the world-wide-web, please send an email |
| to license@phalconphp.com so we can send you a copy immediately. |
+------------------------------------------------------------------------+
| Authors: Andres Gutierrez <andres@phalconphp.com> |
| Eduar Carvajal <eduar@phalconphp.com> |
+------------------------------------------------------------------------+
*/
extern zend_class_entry *phalcon_http_response_cookies_ce;
PHALCON_INIT_CLASS(Phalcon_Http_Response_Cookies);
PHP_METHOD(Phalcon_Http_Response_Cookies, __construct);
PHP_METHOD(Phalcon_Http_Response_Cookies, setDI);
PHP_METHOD(Phalcon_Http_Response_Cookies, getDI);
PHP_METHOD(Phalcon_Http_Response_Cookies, set);
PHP_METHOD(Phalcon_Http_Response_Cookies, get);
PHP_METHOD(Phalcon_Http_Response_Cookies, reset);
ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_http_response_cookies_setdi, 0, 0, 1)
ZEND_ARG_INFO(0, dependencyInjector)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_http_response_cookies_set, 0, 0, 1)
ZEND_ARG_INFO(0, name)
ZEND_ARG_INFO(0, value)
ZEND_ARG_INFO(0, expire)
ZEND_ARG_INFO(0, path)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_http_response_cookies_get, 0, 0, 1)
ZEND_ARG_INFO(0, name)
ZEND_END_ARG_INFO()
PHALCON_INIT_FUNCS(phalcon_http_response_cookies_method_entry){
PHP_ME(Phalcon_Http_Response_Cookies, __construct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR)
PHP_ME(Phalcon_Http_Response_Cookies, setDI, arginfo_phalcon_http_response_cookies_setdi, ZEND_ACC_PUBLIC)
PHP_ME(Phalcon_Http_Response_Cookies, getDI, NULL, ZEND_ACC_PUBLIC)
PHP_ME(Phalcon_Http_Response_Cookies, set, arginfo_phalcon_http_response_cookies_set, ZEND_ACC_PUBLIC)
PHP_ME(Phalcon_Http_Response_Cookies, get, arginfo_phalcon_http_response_cookies_get, ZEND_ACC_PUBLIC)
PHP_ME(Phalcon_Http_Response_Cookies, reset, NULL, ZEND_ACC_PUBLIC)
PHP_FE_END
};
|
from wagtail.core.blocks import CharBlock, ListBlock, StructBlock, TextBlock, URLBlock
from wagtail.images.blocks import ImageChooserBlock
from .base import SectionBlock
from .material_icons import IconChoiceBlock
class FeatureBlock(StructBlock):
feature_name = CharBlock(
required=True,
max_length=80,
label="Feature Name",
help_text="Feature name. Keep it short, like 'Free Chat' or 'Secure'",
)
feature_description = TextBlock(
required=True, max_length=400, label="Feature Description", help_text="Write a few lines about this feature"
)
# TODO turn this icon into a bullet image
icon = IconChoiceBlock(
required=True, label="Icon", help_text="Pick an icon (see https://material.io/tools/icons/) for a bullet point"
)
more_info_url = URLBlock(required=False, label="URL", help_text="A link to be followed for more information")
class Meta:
icon = "tick-inverse"
label = "Feature Description"
class FeatureSectionBlock(SectionBlock):
heading = CharBlock(
required=False,
max_length=100,
label="Section Heading",
help_text="Add a heading at the beginning of this page section",
)
description = TextBlock(
required=False,
max_length=400,
label="Section Description",
help_text="Provide a slightly more detailed description of what this section is for",
)
image = ImageChooserBlock(
required=False,
label="Image",
help_text="Pick an image (e.g. of the product) for the side panel of a feature list",
)
features = ListBlock(FeatureBlock(), label="Features")
class Meta:
icon = "list-ul"
label = "Features Section"
|
# Copyright (c) 2012-2013 Mitch Garnaat http://garnaat.org/
# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
"""
This module contains the main interface to the botocore package, the
Session object.
"""
import copy
import logging
import os
import platform
import re
import socket
import warnings
from botocore import __version__
from botocore import UNSIGNED
import botocore.configloader
import botocore.credentials
import botocore.client
from botocore.configprovider import ConfigValueStore
from botocore.configprovider import ConfigChainFactory
from botocore.configprovider import create_botocore_default_config_mapping
from botocore.configprovider import BOTOCORE_DEFAUT_SESSION_VARIABLES
from botocore.exceptions import (
ConfigNotFound, ProfileNotFound, UnknownServiceError,
PartialCredentialsError,
)
from botocore.errorfactory import ClientExceptionsFactory
from botocore import handlers
from botocore.hooks import HierarchicalEmitter, first_non_none_response
from botocore.hooks import EventAliaser
from botocore.loaders import create_loader
from botocore.parsers import ResponseParserFactory
from botocore.regions import EndpointResolver
from botocore.model import ServiceModel
from botocore import monitoring
from botocore import paginate
from botocore import waiter
from botocore import retryhandler, translate
from botocore import utils
from botocore.utils import EVENT_ALIASES, validate_region_name
from botocore.compat import MutableMapping, HAS_CRT
logger = logging.getLogger(__name__)
class Session(object):
"""
The Session object collects together useful functionality
from `botocore` as well as important data such as configuration
information and credentials into a single, easy-to-use object.
:ivar available_profiles: A list of profiles defined in the config
file associated with this session.
:ivar profile: The current profile.
"""
SESSION_VARIABLES = copy.copy(BOTOCORE_DEFAUT_SESSION_VARIABLES)
#: The default format string to use when configuring the botocore logger.
LOG_FORMAT = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
def __init__(self, session_vars=None, event_hooks=None,
include_builtin_handlers=True, profile=None):
"""
Create a new Session object.
:type session_vars: dict
:param session_vars: A dictionary that is used to override some or all
of the environment variables associated with this session. The
key/value pairs defined in this dictionary will override the
corresponding variables defined in ``SESSION_VARIABLES``.
:type event_hooks: BaseEventHooks
:param event_hooks: The event hooks object to use. If one is not
provided, an event hooks object will be automatically created
for you.
:type include_builtin_handlers: bool
:param include_builtin_handlers: Indicates whether or not to
automatically register builtin handlers.
:type profile: str
:param profile: The name of the profile to use for this
session. Note that the profile can only be set when
the session is created.
"""
if event_hooks is None:
self._original_handler = HierarchicalEmitter()
else:
self._original_handler = event_hooks
self._events = EventAliaser(self._original_handler)
if include_builtin_handlers:
self._register_builtin_handlers(self._events)
self.user_agent_name = 'Botocore'
self.user_agent_version = __version__
self.user_agent_extra = ''
# The _profile attribute is just used to cache the value
# of the current profile to avoid going through the normal
# config lookup process each access time.
self._profile = None
self._config = None
self._credentials = None
self._profile_map = None
# This is a dict that stores per session specific config variable
# overrides via set_config_variable().
self._session_instance_vars = {}
if profile is not None:
self._session_instance_vars['profile'] = profile
self._client_config = None
self._last_client_region_used = None
self._components = ComponentLocator()
self._internal_components = ComponentLocator()
self._register_components()
self.session_var_map = SessionVarDict(self, self.SESSION_VARIABLES)
if session_vars is not None:
self.session_var_map.update(session_vars)
def _register_components(self):
self._register_credential_provider()
self._register_data_loader()
self._register_endpoint_resolver()
self._register_event_emitter()
self._register_response_parser_factory()
self._register_exceptions_factory()
self._register_config_store()
self._register_monitor()
def _register_event_emitter(self):
self._components.register_component('event_emitter', self._events)
def _register_credential_provider(self):
self._components.lazy_register_component(
'credential_provider', self._create_credential_resolver)
def _create_credential_resolver(self):
return botocore.credentials.create_credential_resolver(
self, region_name=self._last_client_region_used
)
def _register_data_loader(self):
self._components.lazy_register_component(
'data_loader',
lambda: create_loader(self.get_config_variable('data_path')))
def _register_endpoint_resolver(self):
def create_default_resolver():
loader = self.get_component('data_loader')
endpoints = loader.load_data('endpoints')
return EndpointResolver(endpoints)
self._internal_components.lazy_register_component(
'endpoint_resolver', create_default_resolver)
def _register_response_parser_factory(self):
self._components.register_component('response_parser_factory',
ResponseParserFactory())
def _register_exceptions_factory(self):
self._internal_components.register_component(
'exceptions_factory', ClientExceptionsFactory())
def _register_builtin_handlers(self, events):
for spec in handlers.BUILTIN_HANDLERS:
if len(spec) == 2:
event_name, handler = spec
self.register(event_name, handler)
else:
event_name, handler, register_type = spec
if register_type is handlers.REGISTER_FIRST:
self._events.register_first(event_name, handler)
elif register_type is handlers.REGISTER_LAST:
self._events.register_last(event_name, handler)
def _register_config_store(self):
config_store_component = ConfigValueStore(
mapping=create_botocore_default_config_mapping(self)
)
self._components.register_component('config_store',
config_store_component)
def _register_monitor(self):
self._internal_components.lazy_register_component(
'monitor', self._create_csm_monitor)
def _create_csm_monitor(self):
if self.get_config_variable('csm_enabled'):
client_id = self.get_config_variable('csm_client_id')
host = self.get_config_variable('csm_host')
port = self.get_config_variable('csm_port')
handler = monitoring.Monitor(
adapter=monitoring.MonitorEventAdapter(),
publisher=monitoring.SocketPublisher(
socket=socket.socket(socket.AF_INET, socket.SOCK_DGRAM),
host=host,
port=port,
serializer=monitoring.CSMSerializer(
csm_client_id=client_id)
)
)
return handler
return None
def _get_crt_version(self):
try:
import pkg_resources
return pkg_resources.get_distribution("awscrt").version
except Exception:
# We're catching *everything* here to avoid failing
# on pkg_resources issues. This is unlikely in our
# supported versions but it avoids making a hard
# dependency on the package being present.
return "Unknown"
@property
def available_profiles(self):
return list(self._build_profile_map().keys())
def _build_profile_map(self):
# This will build the profile map if it has not been created,
# otherwise it will return the cached value. The profile map
# is a list of profile names, to the config values for the profile.
if self._profile_map is None:
self._profile_map = self.full_config['profiles']
return self._profile_map
@property
def profile(self):
if self._profile is None:
profile = self.get_config_variable('profile')
self._profile = profile
return self._profile
def get_config_variable(self, logical_name, methods=None):
if methods is not None:
return self._get_config_variable_with_custom_methods(
logical_name, methods)
return self.get_component('config_store').get_config_variable(
logical_name)
def _get_config_variable_with_custom_methods(self, logical_name, methods):
# If a custom list of methods was supplied we need to perserve the
# behavior with the new system. To do so a new chain that is a copy of
# the old one will be constructed, but only with the supplied methods
# being added to the chain. This chain will be consulted for a value
# and then thrown out. This is not efficient, nor is the methods arg
# used in botocore, this is just for backwards compatibility.
chain_builder = SubsetChainConfigFactory(session=self, methods=methods)
mapping = create_botocore_default_config_mapping(self)
for name, config_options in self.session_var_map.items():
config_name, env_vars, default, typecast = config_options
build_chain_config_args = {
'conversion_func': typecast,
'default': default,
}
if 'instance' in methods:
build_chain_config_args['instance_name'] = name
if 'env' in methods:
build_chain_config_args['env_var_names'] = env_vars
if 'config' in methods:
build_chain_config_args['config_property_name'] = config_name
mapping[name] = chain_builder.create_config_chain(
**build_chain_config_args
)
config_store_component = ConfigValueStore(
mapping=mapping
)
value = config_store_component.get_config_variable(logical_name)
return value
def set_config_variable(self, logical_name, value):
"""Set a configuration variable to a specific value.
By using this method, you can override the normal lookup
process used in ``get_config_variable`` by explicitly setting
a value. Subsequent calls to ``get_config_variable`` will
use the ``value``. This gives you per-session specific
configuration values.
::
>>> # Assume logical name 'foo' maps to env var 'FOO'
>>> os.environ['FOO'] = 'myvalue'
>>> s.get_config_variable('foo')
'myvalue'
>>> s.set_config_variable('foo', 'othervalue')
>>> s.get_config_variable('foo')
'othervalue'
:type logical_name: str
:param logical_name: The logical name of the session variable
you want to set. These are the keys in ``SESSION_VARIABLES``.
:param value: The value to associate with the config variable.
"""
logger.debug(
"Setting config variable for %s to %r",
logical_name,
value,
)
self._session_instance_vars[logical_name] = value
def instance_variables(self):
return copy.copy(self._session_instance_vars)
def get_scoped_config(self):
"""
Returns the config values from the config file scoped to the current
profile.
The configuration data is loaded **only** from the config file.
It does not resolve variables based on different locations
(e.g. first from the session instance, then from environment
variables, then from the config file). If you want this lookup
behavior, use the ``get_config_variable`` method instead.
Note that this configuration is specific to a single profile (the
``profile`` session variable).
If the ``profile`` session variable is set and the profile does
not exist in the config file, a ``ProfileNotFound`` exception
will be raised.
:raises: ConfigNotFound, ConfigParseError, ProfileNotFound
:rtype: dict
"""
profile_name = self.get_config_variable('profile')
profile_map = self._build_profile_map()
# If a profile is not explicitly set return the default
# profile config or an empty config dict if we don't have
# a default profile.
if profile_name is None:
return profile_map.get('default', {})
elif profile_name not in profile_map:
# Otherwise if they specified a profile, it has to
# exist (even if it's the default profile) otherwise
# we complain.
raise ProfileNotFound(profile=profile_name)
else:
return profile_map[profile_name]
@property
def full_config(self):
"""Return the parsed config file.
The ``get_config`` method returns the config associated with the
specified profile. This property returns the contents of the
**entire** config file.
:rtype: dict
"""
if self._config is None:
try:
config_file = self.get_config_variable('config_file')
self._config = botocore.configloader.load_config(config_file)
except ConfigNotFound:
self._config = {'profiles': {}}
try:
# Now we need to inject the profiles from the
# credentials file. We don't actually need the values
# in the creds file, only the profile names so that we
# can validate the user is not referring to a nonexistent
# profile.
cred_file = self.get_config_variable('credentials_file')
cred_profiles = botocore.configloader.raw_config_parse(
cred_file)
for profile in cred_profiles:
cred_vars = cred_profiles[profile]
if profile not in self._config['profiles']:
self._config['profiles'][profile] = cred_vars
else:
self._config['profiles'][profile].update(cred_vars)
except ConfigNotFound:
pass
return self._config
def get_default_client_config(self):
"""Retrieves the default config for creating clients
:rtype: botocore.client.Config
:returns: The default client config object when creating clients. If
the value is ``None`` then there is no default config object
attached to the session.
"""
return self._client_config
def set_default_client_config(self, client_config):
"""Sets the default config for creating clients
:type client_config: botocore.client.Config
:param client_config: The default client config object when creating
clients. If the value is ``None`` then there is no default config
object attached to the session.
"""
self._client_config = client_config
def set_credentials(self, access_key, secret_key, token=None):
"""
Manually create credentials for this session. If you would
prefer to use botocore without a config file, environment variables,
or IAM roles, you can pass explicit credentials into this
method to establish credentials for this session.
:type access_key: str
:param access_key: The access key part of the credentials.
:type secret_key: str
:param secret_key: The secret key part of the credentials.
:type token: str
:param token: An option session token used by STS session
credentials.
"""
self._credentials = botocore.credentials.Credentials(access_key,
secret_key,
token)
def get_credentials(self):
"""
Return the :class:`botocore.credential.Credential` object
associated with this session. If the credentials have not
yet been loaded, this will attempt to load them. If they
have already been loaded, this will return the cached
credentials.
"""
if self._credentials is None:
self._credentials = self._components.get_component(
'credential_provider').load_credentials()
return self._credentials
def user_agent(self):
"""
Return a string suitable for use as a User-Agent header.
The string will be of the form:
<agent_name>/<agent_version> Python/<py_ver> <plat_name>/<plat_ver> <exec_env>
Where:
- agent_name is the value of the `user_agent_name` attribute
of the session object (`Botocore` by default).
- agent_version is the value of the `user_agent_version`
attribute of the session object (the botocore version by default).
by default.
- py_ver is the version of the Python interpreter beng used.
- plat_name is the name of the platform (e.g. Darwin)
- plat_ver is the version of the platform
- exec_env is exec-env/$AWS_EXECUTION_ENV
If ``user_agent_extra`` is not empty, then this value will be
appended to the end of the user agent string.
"""
base = '%s/%s Python/%s %s/%s' % (self.user_agent_name,
self.user_agent_version,
platform.python_version(),
platform.system(),
platform.release())
if HAS_CRT:
base += ' awscrt/%s' % self._get_crt_version()
if os.environ.get('AWS_EXECUTION_ENV') is not None:
base += ' exec-env/%s' % os.environ.get('AWS_EXECUTION_ENV')
if self.user_agent_extra:
base += ' %s' % self.user_agent_extra
return base
def get_data(self, data_path):
"""
Retrieve the data associated with `data_path`.
:type data_path: str
:param data_path: The path to the data you wish to retrieve.
"""
return self.get_component('data_loader').load_data(data_path)
def get_service_model(self, service_name, api_version=None):
"""Get the service model object.
:type service_name: string
:param service_name: The service name
:type api_version: string
:param api_version: The API version of the service. If none is
provided, then the latest API version will be used.
:rtype: L{botocore.model.ServiceModel}
:return: The botocore service model for the service.
"""
service_description = self.get_service_data(service_name, api_version)
return ServiceModel(service_description, service_name=service_name)
def get_waiter_model(self, service_name, api_version=None):
loader = self.get_component('data_loader')
waiter_config = loader.load_service_model(
service_name, 'waiters-2', api_version)
return waiter.WaiterModel(waiter_config)
def get_paginator_model(self, service_name, api_version=None):
loader = self.get_component('data_loader')
paginator_config = loader.load_service_model(
service_name, 'paginators-1', api_version)
return paginate.PaginatorModel(paginator_config)
def get_service_data(self, service_name, api_version=None):
"""
Retrieve the fully merged data associated with a service.
"""
data_path = service_name
service_data = self.get_component('data_loader').load_service_model(
data_path,
type_name='service-2',
api_version=api_version
)
service_id = EVENT_ALIASES.get(service_name, service_name)
self._events.emit('service-data-loaded.%s' % service_id,
service_data=service_data,
service_name=service_name, session=self)
return service_data
def get_available_services(self):
"""
Return a list of names of available services.
"""
return self.get_component('data_loader')\
.list_available_services(type_name='service-2')
def set_debug_logger(self, logger_name='botocore'):
"""
Convenience function to quickly configure full debug output
to go to the console.
"""
self.set_stream_logger(logger_name, logging.DEBUG)
def set_stream_logger(self, logger_name, log_level, stream=None,
format_string=None):
"""
Convenience method to configure a stream logger.
:type logger_name: str
:param logger_name: The name of the logger to configure
:type log_level: str
:param log_level: The log level to set for the logger. This
is any param supported by the ``.setLevel()`` method of
a ``Log`` object.
:type stream: file
:param stream: A file like object to log to. If none is provided
then sys.stderr will be used.
:type format_string: str
:param format_string: The format string to use for the log
formatter. If none is provided this will default to
``self.LOG_FORMAT``.
"""
log = logging.getLogger(logger_name)
log.setLevel(logging.DEBUG)
ch = logging.StreamHandler(stream)
ch.setLevel(log_level)
# create formatter
if format_string is None:
format_string = self.LOG_FORMAT
formatter = logging.Formatter(format_string)
# add formatter to ch
ch.setFormatter(formatter)
# add ch to logger
log.addHandler(ch)
def set_file_logger(self, log_level, path, logger_name='botocore'):
"""
Convenience function to quickly configure any level of logging
to a file.
:type log_level: int
:param log_level: A log level as specified in the `logging` module
:type path: string
:param path: Path to the log file. The file will be created
if it doesn't already exist.
"""
log = logging.getLogger(logger_name)
log.setLevel(logging.DEBUG)
# create console handler and set level to debug
ch = logging.FileHandler(path)
ch.setLevel(log_level)
# create formatter
formatter = logging.Formatter(self.LOG_FORMAT)
# add formatter to ch
ch.setFormatter(formatter)
# add ch to logger
log.addHandler(ch)
def register(self, event_name, handler, unique_id=None,
unique_id_uses_count=False):
"""Register a handler with an event.
:type event_name: str
:param event_name: The name of the event.
:type handler: callable
:param handler: The callback to invoke when the event
is emitted. This object must be callable, and must
accept ``**kwargs``. If either of these preconditions are
not met, a ``ValueError`` will be raised.
:type unique_id: str
:param unique_id: An optional identifier to associate with the
registration. A unique_id can only be used once for
the entire session registration (unless it is unregistered).
This can be used to prevent an event handler from being
registered twice.
:param unique_id_uses_count: boolean
:param unique_id_uses_count: Specifies if the event should maintain
a count when a ``unique_id`` is registered and unregisted. The
event can only be completely unregistered once every register call
using the unique id has been matched by an ``unregister`` call.
If ``unique_id`` is specified, subsequent ``register``
calls must use the same value for ``unique_id_uses_count``
as the ``register`` call that first registered the event.
:raises ValueError: If the call to ``register`` uses ``unique_id``
but the value for ``unique_id_uses_count`` differs from the
``unique_id_uses_count`` value declared by the very first
``register`` call for that ``unique_id``.
"""
self._events.register(event_name, handler, unique_id,
unique_id_uses_count=unique_id_uses_count)
def unregister(self, event_name, handler=None, unique_id=None,
unique_id_uses_count=False):
"""Unregister a handler with an event.
:type event_name: str
:param event_name: The name of the event.
:type handler: callable
:param handler: The callback to unregister.
:type unique_id: str
:param unique_id: A unique identifier identifying the callback
to unregister. You can provide either the handler or the
unique_id, you do not have to provide both.
:param unique_id_uses_count: boolean
:param unique_id_uses_count: Specifies if the event should maintain
a count when a ``unique_id`` is registered and unregisted. The
event can only be completely unregistered once every ``register``
call using the ``unique_id`` has been matched by an ``unregister``
call. If the ``unique_id`` is specified, subsequent
``unregister`` calls must use the same value for
``unique_id_uses_count`` as the ``register`` call that first
registered the event.
:raises ValueError: If the call to ``unregister`` uses ``unique_id``
but the value for ``unique_id_uses_count`` differs from the
``unique_id_uses_count`` value declared by the very first
``register`` call for that ``unique_id``.
"""
self._events.unregister(event_name, handler=handler,
unique_id=unique_id,
unique_id_uses_count=unique_id_uses_count)
def emit(self, event_name, **kwargs):
return self._events.emit(event_name, **kwargs)
def emit_first_non_none_response(self, event_name, **kwargs):
responses = self._events.emit(event_name, **kwargs)
return first_non_none_response(responses)
def get_component(self, name):
try:
return self._components.get_component(name)
except ValueError:
if name in ['endpoint_resolver', 'exceptions_factory']:
warnings.warn(
'Fetching the %s component with the get_component() '
'method is deprecated as the component has always been '
'considered an internal interface of botocore' % name,
DeprecationWarning)
return self._internal_components.get_component(name)
raise
def _get_internal_component(self, name):
# While this method may be called by botocore classes outside of the
# Session, this method should **never** be used by a class that lives
# outside of botocore.
return self._internal_components.get_component(name)
def _register_internal_component(self, name, component):
# While this method may be called by botocore classes outside of the
# Session, this method should **never** be used by a class that lives
# outside of botocore.
return self._internal_components.register_component(name, component)
def register_component(self, name, component):
self._components.register_component(name, component)
def lazy_register_component(self, name, component):
self._components.lazy_register_component(name, component)
def create_client(self, service_name, region_name=None, api_version=None,
use_ssl=True, verify=None, endpoint_url=None,
aws_access_key_id=None, aws_secret_access_key=None,
aws_session_token=None, config=None):
"""Create a botocore client.
:type service_name: string
:param service_name: The name of the service for which a client will
be created. You can use the ``Sesssion.get_available_services()``
method to get a list of all available service names.
:type region_name: string
:param region_name: The name of the region associated with the client.
A client is associated with a single region.
:type api_version: string
:param api_version: The API version to use. By default, botocore will
use the latest API version when creating a client. You only need
to specify this parameter if you want to use a previous API version
of the client.
:type use_ssl: boolean
:param use_ssl: Whether or not to use SSL. By default, SSL is used.
Note that not all services support non-ssl connections.
:type verify: boolean/string
:param verify: Whether or not to verify SSL certificates.
By default SSL certificates are verified. You can provide the
following values:
* False - do not validate SSL certificates. SSL will still be
used (unless use_ssl is False), but SSL certificates
will not be verified.
* path/to/cert/bundle.pem - A filename of the CA cert bundle to
uses. You can specify this argument if you want to use a
different CA cert bundle than the one used by botocore.
:type endpoint_url: string
:param endpoint_url: The complete URL to use for the constructed
client. Normally, botocore will automatically construct the
appropriate URL to use when communicating with a service. You can
specify a complete URL (including the "http/https" scheme) to
override this behavior. If this value is provided, then
``use_ssl`` is ignored.
:type aws_access_key_id: string
:param aws_access_key_id: The access key to use when creating
the client. This is entirely optional, and if not provided,
the credentials configured for the session will automatically
be used. You only need to provide this argument if you want
to override the credentials used for this specific client.
:type aws_secret_access_key: string
:param aws_secret_access_key: The secret key to use when creating
the client. Same semantics as aws_access_key_id above.
:type aws_session_token: string
:param aws_session_token: The session token to use when creating
the client. Same semantics as aws_access_key_id above.
:type config: botocore.client.Config
:param config: Advanced client configuration options. If a value
is specified in the client config, its value will take precedence
over environment variables and configuration values, but not over
a value passed explicitly to the method. If a default config
object is set on the session, the config object used when creating
the client will be the result of calling ``merge()`` on the
default config with the config provided to this call.
:rtype: botocore.client.BaseClient
:return: A botocore client instance
"""
default_client_config = self.get_default_client_config()
# If a config is provided and a default config is set, then
# use the config resulting from merging the two.
if config is not None and default_client_config is not None:
config = default_client_config.merge(config)
# If a config was not provided then use the default
# client config from the session
elif default_client_config is not None:
config = default_client_config
region_name = self._resolve_region_name(region_name, config)
# Figure out the verify value base on the various
# configuration options.
if verify is None:
verify = self.get_config_variable('ca_bundle')
if api_version is None:
api_version = self.get_config_variable('api_versions').get(
service_name, None)
loader = self.get_component('data_loader')
event_emitter = self.get_component('event_emitter')
response_parser_factory = self.get_component(
'response_parser_factory')
if config is not None and config.signature_version is UNSIGNED:
credentials = None
elif aws_access_key_id is not None and aws_secret_access_key is not None:
credentials = botocore.credentials.Credentials(
access_key=aws_access_key_id,
secret_key=aws_secret_access_key,
token=aws_session_token)
elif self._missing_cred_vars(aws_access_key_id,
aws_secret_access_key):
raise PartialCredentialsError(
provider='explicit',
cred_var=self._missing_cred_vars(aws_access_key_id,
aws_secret_access_key))
else:
credentials = self.get_credentials()
endpoint_resolver = self._get_internal_component('endpoint_resolver')
exceptions_factory = self._get_internal_component('exceptions_factory')
config_store = self.get_component('config_store')
client_creator = botocore.client.ClientCreator(
loader, endpoint_resolver, self.user_agent(), event_emitter,
retryhandler, translate, response_parser_factory,
exceptions_factory, config_store)
client = client_creator.create_client(
service_name=service_name, region_name=region_name,
is_secure=use_ssl, endpoint_url=endpoint_url, verify=verify,
credentials=credentials, scoped_config=self.get_scoped_config(),
client_config=config, api_version=api_version)
monitor = self._get_internal_component('monitor')
if monitor is not None:
monitor.register(client.meta.events)
return client
def _resolve_region_name(self, region_name, config):
# Figure out the user-provided region based on the various
# configuration options.
if region_name is None:
if config and config.region_name is not None:
region_name = config.region_name
else:
region_name = self.get_config_variable('region')
validate_region_name(region_name)
# For any client that we create in retrieving credentials
# we want to create it using the same region as specified in
# creating this client. It is important to note though that the
# credentials client is only created once per session. So if a new
# client is created with a different region, its credential resolver
# will use the region of the first client. However, that is not an
# issue as of now because the credential resolver uses only STS and
# the credentials returned at regional endpoints are valid across
# all regions in the partition.
self._last_client_region_used = region_name
return region_name
def _missing_cred_vars(self, access_key, secret_key):
if access_key is not None and secret_key is None:
return 'aws_secret_access_key'
if secret_key is not None and access_key is None:
return 'aws_access_key_id'
return None
def get_available_partitions(self):
"""Lists the available partitions found on disk
:rtype: list
:return: Returns a list of partition names (e.g., ["aws", "aws-cn"])
"""
resolver = self._get_internal_component('endpoint_resolver')
return resolver.get_available_partitions()
def get_available_regions(self, service_name, partition_name='aws',
allow_non_regional=False):
"""Lists the region and endpoint names of a particular partition.
:type service_name: string
:param service_name: Name of a service to list endpoint for (e.g., s3).
This parameter accepts a service name (e.g., "elb") or endpoint
prefix (e.g., "elasticloadbalancing").
:type partition_name: string
:param partition_name: Name of the partition to limit endpoints to.
(e.g., aws for the public AWS endpoints, aws-cn for AWS China
endpoints, aws-us-gov for AWS GovCloud (US) Endpoints, etc.
:type allow_non_regional: bool
:param allow_non_regional: Set to True to include endpoints that are
not regional endpoints (e.g., s3-external-1,
fips-us-gov-west-1, etc).
:return: Returns a list of endpoint names (e.g., ["us-east-1"]).
"""
resolver = self._get_internal_component('endpoint_resolver')
results = []
try:
service_data = self.get_service_data(service_name)
endpoint_prefix = service_data['metadata'].get(
'endpointPrefix', service_name)
results = resolver.get_available_endpoints(
endpoint_prefix, partition_name, allow_non_regional)
except UnknownServiceError:
pass
return results
class ComponentLocator(object):
"""Service locator for session components."""
def __init__(self):
self._components = {}
self._deferred = {}
def get_component(self, name):
if name in self._deferred:
factory = self._deferred[name]
self._components[name] = factory()
# Only delete the component from the deferred dict after
# successfully creating the object from the factory as well as
# injecting the instantiated value into the _components dict.
del self._deferred[name]
try:
return self._components[name]
except KeyError:
raise ValueError("Unknown component: %s" % name)
def register_component(self, name, component):
self._components[name] = component
try:
del self._deferred[name]
except KeyError:
pass
def lazy_register_component(self, name, no_arg_factory):
self._deferred[name] = no_arg_factory
try:
del self._components[name]
except KeyError:
pass
class SessionVarDict(MutableMapping):
def __init__(self, session, session_vars):
self._session = session
self._store = copy.copy(session_vars)
def __getitem__(self, key):
return self._store[key]
def __setitem__(self, key, value):
self._store[key] = value
self._update_config_store_from_session_vars(key, value)
def __delitem__(self, key):
del self._store[key]
def __iter__(self):
return iter(self._store)
def __len__(self):
return len(self._store)
def _update_config_store_from_session_vars(self, logical_name,
config_options):
# This is for backwards compatibility. The new preferred way to
# modify configuration logic is to use the component system to get
# the config_store component from the session, and then update
# a key with a custom config provider(s).
# This backwards compatibility method takes the old session_vars
# list of tuples and and transforms that into a set of updates to
# the config_store component.
config_chain_builder = ConfigChainFactory(session=self._session)
config_name, env_vars, default, typecast = config_options
config_store = self._session.get_component('config_store')
config_store.set_config_provider(
logical_name,
config_chain_builder.create_config_chain(
instance_name=logical_name,
env_var_names=env_vars,
config_property_names=config_name,
default=default,
conversion_func=typecast,
)
)
class SubsetChainConfigFactory(object):
"""A class for creating backwards compatible configuration chains.
This class can be used instead of
:class:`botocore.configprovider.ConfigChainFactory` to make it honor the
methods argument to get_config_variable. This class can be used to filter
out providers that are not in the methods tuple when creating a new config
chain.
"""
def __init__(self, session, methods, environ=None):
self._factory = ConfigChainFactory(session, environ)
self._supported_methods = methods
def create_config_chain(self, instance_name=None, env_var_names=None,
config_property_name=None, default=None,
conversion_func=None):
"""Build a config chain following the standard botocore pattern.
This config chain factory will omit any providers not in the methods
tuple provided at initialization. For example if given the tuple
('instance', 'config',) it will not inject the environment provider
into the standard config chain. This lets the botocore session support
the custom ``methods`` argument for all the default botocore config
variables when calling ``get_config_variable``.
"""
if 'instance' not in self._supported_methods:
instance_name = None
if 'env' not in self._supported_methods:
env_var_names = None
if 'config' not in self._supported_methods:
config_property_name = None
return self._factory.create_config_chain(
instance_name=instance_name,
env_var_names=env_var_names,
config_property_names=config_property_name,
default=default,
conversion_func=conversion_func,
)
def get_session(env_vars=None):
"""
Return a new session object.
"""
return Session(env_vars)
|
#!/usr/bin/python3
from pwn import *
from pwnlib.gdb import binary
from six import int2byte
import codecs
#yeah our dev env adds imports automatically for us. Increased attack vector intended. Thank you
io = remote('pwn-2021.duc.tf', 31905)
#io.sendline("\n")
test = io.recvuntil("...")
print(test)
io.sendline(" ")
test = io.recvuntil("1+1=?")
print(test)
io.sendline("2")
test = io.recvline()
print(test)
test = io.recvline()
print(test)
test = io.recvuntil(": ")
print(test)
test = io.recvline()
print(test[:-1])
hexvar = int(test[:-1],0)
print(hexvar)
hexvar2 = str(hexvar)
print(hexvar2)
io.sendline(hexvar2)
test = io.recvuntil(": ")
print(test)
test = io.recvline()
print(test[:-1])
hexascii = (test[:-1]).decode("ascii")
print(hexascii)
hexasciibyte = bytes.fromhex(hexascii)
print(hexasciibyte)
hexascii_string = hexasciibyte.decode("ASCII")
print(hexascii_string)
io.sendline(hexascii_string)
test = io.recvuntil(": ")
print(test)
test = io.recvline()
print(test[:-1])
url = urldecode(test[:-1].decode("utf-8"))
print(url)
io.sendline(url)
test = io.recvuntil(": ")
print(test)
test = io.recvline()
print(test[:-1])
varbase64 = b64d(test[:-1].decode("utf-8"))
print (varbase64)
io.sendline(varbase64)
test = io.recvuntil(": ")
print(test)
test = io.recvline()
print(test[:-1])
varbase64encode = b64e(test[:-1])
print(varbase64encode)
io.sendline(varbase64encode)
test = io.recvuntil(": ")
print(test)
test = io.recvline()
print(test[:-1])
rot13var = codecs.encode(test[:-1].decode("utf-8"), 'rot_13')
print(rot13var)
io.sendline(rot13var)
test = io.recvuntil(": ")
print(test)
test = io.recvline()
print(test[:-1])
rot13var2 = codecs.encode(test[:-1].decode("utf-8"), 'rot_13')
print(rot13var2)
io.sendline(rot13var2)
test = io.recvuntil(": ")
print(test)
test = io.recvline()
print(test[:-1])
bitvar = int(test[:-1],2)
print(bitvar)
io.sendline(str(bitvar))
test = io.recvuntil(": ")
print(test)
test = io.recvline()
print(test[:-1])
binvar = bin(int(test[:-1],0))
print(binvar)
io.sendline(binvar)
test = io.recvline()
print(test[:-1])
test = io.recvline()
print(test[:-1])
test = io.recvline()
print(test[:-1])
io.sendline("DUCTF")
test = io.recvuntil("}")
print(test)
test = io.recvline()
print(test[:-1])
|
from re import split
def camelize(string):
s = ''.join([a.capitalize() for a in split('([^a-zA-Z0-9])', string) if a.isalnum()])
return s[0].lower() + s[1:]
cols = ['Team Name', 'Hero', 'All Damage Done', "Enemies EMP'd"]
res = [camelize(c) for c in cols]
print(res)
|
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule AppRegistry
* @flow
*/
'use strict';
const BatchedBridge = require('BatchedBridge');
const BugReporting = require('BugReporting');
const NativeModules = require('NativeModules');
const ReactNative = require('ReactNative');
const SceneTracker = require('SceneTracker');
const infoLog = require('infoLog');
const invariant = require('fbjs/lib/invariant');
const renderApplication = require('renderApplication');
type Task = (taskData: any) => Promise<void>;
type TaskProvider = () => Task;
export type ComponentProvider = () => React$ComponentType<any>;
export type ComponentProviderInstrumentationHook =
(component: ComponentProvider) => React$ComponentType<any>;
export type AppConfig = {
appKey: string,
component?: ComponentProvider,
run?: Function,
section?: boolean,
};
export type Runnable = {
component?: ComponentProvider,
run: Function,
};
export type Runnables = {
[appKey: string]: Runnable,
};
export type Registry = {
sections: Array<string>,
runnables: Runnables,
};
export type WrapperComponentProvider = any => React$ComponentType<*>;
const runnables: Runnables = {};
let runCount = 1;
const sections: Runnables = {};
const tasks: Map<string, TaskProvider> = new Map();
let componentProviderInstrumentationHook: ComponentProviderInstrumentationHook =
(component: ComponentProvider) => component();
let wrapperComponentProvider: ?WrapperComponentProvider;
/**
* <div class="banner-crna-ejected">
* <h3>Project with Native Code Required</h3>
* <p>
* This API only works in projects made with <code>react-native init</code>
* or in those made with Create React Native App which have since ejected. For
* more information about ejecting, please see
* the <a href="https://github.com/react-community/create-react-native-app/blob/master/EJECTING.md" target="_blank">guide</a> on
* the Create React Native App repository.
* </p>
* </div>
*
* `AppRegistry` is the JS entry point to running all React Native apps. App
* root components should register themselves with
* `AppRegistry.registerComponent`, then the native system can load the bundle
* for the app and then actually run the app when it's ready by invoking
* `AppRegistry.runApplication`.
*
* To "stop" an application when a view should be destroyed, call
* `AppRegistry.unmountApplicationComponentAtRootTag` with the tag that was
* passed into `runApplication`. These should always be used as a pair.
*
* `AppRegistry` should be `require`d early in the `require` sequence to make
* sure the JS execution environment is setup before other modules are
* `require`d.
*/
const AppRegistry = {
setWrapperComponentProvider(provider: WrapperComponentProvider) {
wrapperComponentProvider = provider;
},
registerConfig(config: Array<AppConfig>): void {
config.forEach((appConfig) => {
if (appConfig.run) {
AppRegistry.registerRunnable(appConfig.appKey, appConfig.run);
} else {
invariant(
appConfig.component != null,
'AppRegistry.registerConfig(...): Every config is expected to set ' +
'either `run` or `component`, but `%s` has neither.',
appConfig.appKey
);
AppRegistry.registerComponent(
appConfig.appKey,
appConfig.component,
appConfig.section,
);
}
});
},
registerComponent(
appKey: string,
componentProvider: ComponentProvider,
section?: boolean,
): string {
runnables[appKey] = {
componentProvider,
run: (appParameters) =>
renderApplication(
componentProviderInstrumentationHook(componentProvider),
appParameters.initialProps,
appParameters.rootTag,
wrapperComponentProvider && wrapperComponentProvider(appParameters),
)
};
if (section) {
sections[appKey] = runnables[appKey];
}
return appKey;
},
registerRunnable(appKey: string, run: Function): string {
runnables[appKey] = {run};
return appKey;
},
registerSection(appKey: string, component: ComponentProvider): void {
AppRegistry.registerComponent(appKey, component, true);
},
getAppKeys(): Array<string> {
return Object.keys(runnables);
},
getSectionKeys(): Array<string> {
return Object.keys(sections);
},
getSections(): Runnables {
return {
...sections
};
},
getRunnable(appKey: string): ?Runnable {
return runnables[appKey];
},
getRegistry(): Registry {
return {
sections: AppRegistry.getSectionKeys(),
runnables: {...runnables},
};
},
setComponentProviderInstrumentationHook(hook: ComponentProviderInstrumentationHook) {
componentProviderInstrumentationHook = hook;
},
async runApplication(appKey: string, appParameters: any): void {
const msg =
'Running application "' + appKey + '" with appParams: ' +
JSON.stringify(appParameters) + '. ' +
'__DEV__ === ' + String(__DEV__) +
', development-level warning are ' + (__DEV__ ? 'ON' : 'OFF') +
', performance optimizations are ' + (__DEV__ ? 'OFF' : 'ON');
infoLog(msg);
BugReporting.addSource('AppRegistry.runApplication' + runCount++, () => msg);
if(!runnables[appKey]){
await NativeModules.LCBRNModuleManager.loadModule(appKey)
}
invariant(
runnables[appKey] && runnables[appKey].run,
'Application ' + appKey + ' has not been registered.\n\n' +
'Hint: This error often happens when you\'re running the packager ' +
'(local dev server) from a wrong folder. For example you have ' +
'multiple apps and the packager is still running for the app you ' +
'were working on before.\nIf this is the case, simply kill the old ' +
'packager instance (e.g. close the packager terminal window) ' +
'and start the packager in the correct app folder (e.g. cd into app ' +
'folder and run \'npm start\').\n\n' +
'This error can also happen due to a require() error during ' +
'initialization or failure to call AppRegistry.registerComponent.\n\n'
);
SceneTracker.setActiveScene({name: appKey});
runnables[appKey].run(appParameters);
},
unmountApplicationComponentAtRootTag(rootTag: number): void {
ReactNative.unmountComponentAtNodeAndRemoveContainer(rootTag);
},
/**
* Register a headless task. A headless task is a bit of code that runs without a UI.
* @param taskKey the key associated with this task
* @param task a promise returning function that takes some data passed from the native side as
* the only argument; when the promise is resolved or rejected the native side is
* notified of this event and it may decide to destroy the JS context.
*/
registerHeadlessTask(taskKey: string, task: TaskProvider): void {
if (tasks.has(taskKey)) {
console.warn(`registerHeadlessTask called multiple times for same key '${taskKey}'`);
}
tasks.set(taskKey, task);
},
/**
* Only called from native code. Starts a headless task.
*
* @param taskId the native id for this task instance to keep track of its execution
* @param taskKey the key for the task to start
* @param data the data to pass to the task
*/
startHeadlessTask(taskId: number, taskKey: string, data: any): void {
const taskProvider = tasks.get(taskKey);
if (!taskProvider) {
throw new Error(`No task registered for key ${taskKey}`);
}
taskProvider()(data)
.then(() => NativeModules.HeadlessJsTaskSupport.notifyTaskFinished(taskId))
.catch(reason => {
console.error(reason);
NativeModules.HeadlessJsTaskSupport.notifyTaskFinished(taskId);
});
}
};
BatchedBridge.registerCallableModule(
'AppRegistry',
AppRegistry
);
module.exports = AppRegistry;
|
/*
* resource/file
*/
"use strict";
const fs = require('fs').promises;
const { basename } = require('path');
const mime = require('mime');
const HTML = require('../html/file');
module.exports = class File {
constructor(req, path, stat, location, openFile) {
this._req = req;
this._path = path;
this._stat = stat;
this._location = location;
this.openFile = openFile;
this._backup = req.config.backup;
}
get path() { return this._path }
get name() {
if (! this._name) this._name = basename(this._path);
return this._name;
}
get size() { return this._stat.size }
get time() { return this._stat.mtimeMs }
get type() {
if (! this._type) this._type = (! this.name.match(/\./)
? 'text/x-liulian'
: mime.getType(this.name)
|| 'application/octet-stream');
return this._type;
}
get location() { return this._location }
get redirect() { return this._redirect }
get log() { return this._log }
async open() {
if (! this._req.user && (this._req.cmd == 'edit' ||
this._req.cmd == 'log' ||
this._req.cmd == 'diff' )) throw 403;
try {
const fh = await fs.open(this._path);
fh.close();
}
catch(err) {
throw 403;
}
if (this._backup && (this._req.cmd == 'edit' ||
this._req.cmd == 'log'))
{
if (Date.now() - this.time > 1000*60*60*24) {
await this._backup.checkIn(this.location,
this.time, this._req.user);
}
}
if (this._backup && this._req.cmd == 'log') {
this._log = await this._backup.log(this.location);
}
return this;
}
async update() {
if (! this._req.user) throw 403;
this._redirect = [303, './?cmd=edit'];
try {
if (this._req.files('file').length)
await fs.rename(this._req.files('file')[0].path, this.path);
else
await fs.unlink(this.path);
}
catch(err) {
throw 403;
}
}
send(res) {
if (this._req.cmd == 'edit') res.sendText(new HTML(this).edit());
else if (this._req.cmd == 'log') res.sendText(new HTML(this).log());
else {
try {
let rev = this._req.param('rev');
if (rev) {
res.sendStream(
this._backup.checkOutStream(this.location, rev),
this.type);
return;
}
}
catch (err) {}
res.sendFile(this._path, this.type);
}
}
}
|
(function(e,t){function n(e){var t=dt[e]={};return Y.each(e.split(tt),function(e,n){t[n]=!0}),t}function r(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(mt,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:vt.test(r)?Y.parseJSON(r):r}catch(s){}Y.data(e,n,r)}else r=t}return r}function i(e){var t;for(t in e){if(t==="data"&&Y.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function s(){return!1}function o(){return!0}function u(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function a(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function f(e,t,n){t=t||0;if(Y.isFunction(t))return Y.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return Y.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=Y.grep(e,function(e){return e.nodeType===1});if(Bt.test(t))return Y.filter(t,r,!n);t=Y.filter(t,r)}return Y.grep(e,function(e,r){return Y.inArray(e,t)>=0===n})}function l(e){var t=It.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function c(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function h(e,t){if(t.nodeType!==1||!Y.hasData(e))return;var n,r,i,s=Y._data(e),o=Y._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r<i;r++)Y.event.add(t,n,u[n][r])}o.data&&(o.data=Y.extend({},o.data))}function p(e,t){var n;if(t.nodeType!==1)return;t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),n==="object"?(t.parentNode&&(t.outerHTML=e.outerHTML),Y.support.html5Clone&&e.innerHTML&&!Y.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):n==="input"&&Kt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):n==="option"?t.selected=e.defaultSelected:n==="input"||n==="textarea"?t.defaultValue=e.defaultValue:n==="script"&&t.text!==e.text&&(t.text=e.text),t.removeAttribute(Y.expando)}function d(e){return typeof e.getElementsByTagName!="undefined"?e.getElementsByTagName("*"):typeof e.querySelectorAll!="undefined"?e.querySelectorAll("*"):[]}function v(e){Kt.test(e.type)&&(e.defaultChecked=e.checked)}function m(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=yn.length;while(i--){t=yn[i]+n;if(t in e)return t}return r}function g(e,t){return e=t||e,Y.css(e,"display")==="none"||!Y.contains(e.ownerDocument,e)}function y(e,t){var n,r,i=[],s=0,o=e.length;for(;s<o;s++){n=e[s];if(!n.style)continue;i[s]=Y._data(n,"olddisplay"),t?(!i[s]&&n.style.display==="none"&&(n.style.display=""),n.style.display===""&&g(n)&&(i[s]=Y._data(n,"olddisplay",S(n.nodeName)))):(r=nn(n,"display"),!i[s]&&r!=="none"&&Y._data(n,"olddisplay",r))}for(s=0;s<o;s++){n=e[s];if(!n.style)continue;if(!t||n.style.display==="none"||n.style.display==="")n.style.display=t?i[s]||"":"none"}return e}function b(e,t,n){var r=cn.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function w(e,t,n,r){var i=n===(r?"border":"content")?4:t==="width"?1:0,s=0;for(;i<4;i+=2)n==="margin"&&(s+=Y.css(e,n+gn[i],!0)),r?(n==="content"&&(s-=parseFloat(nn(e,"padding"+gn[i]))||0),n!=="margin"&&(s-=parseFloat(nn(e,"border"+gn[i]+"Width"))||0)):(s+=parseFloat(nn(e,"padding"+gn[i]))||0,n!=="padding"&&(s+=parseFloat(nn(e,"border"+gn[i]+"Width"))||0));return s}function E(e,t,n){var r=t==="width"?e.offsetWidth:e.offsetHeight,i=!0,s=Y.support.boxSizing&&Y.css(e,"boxSizing")==="border-box";if(r<=0||r==null){r=nn(e,t);if(r<0||r==null)r=e.style[t];if(hn.test(r))return r;i=s&&(Y.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+w(e,t,n||(s?"border":"content"),i)+"px"}function S(e){if(dn[e])return dn[e];var t=Y("<"+e+">").appendTo(R.body),n=t.css("display");t.remove();if(n==="none"||n===""){rn=R.body.appendChild(rn||Y.extend(R.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!sn||!rn.createElement)sn=(rn.contentWindow||rn.contentDocument).document,sn.write("<!doctype html><html><body>"),sn.close();t=sn.body.appendChild(sn.createElement(e)),n=nn(t,"display"),R.body.removeChild(rn)}return dn[e]=n,n}function x(e,t,n,r){var i;if(Y.isArray(t))Y.each(t,function(t,i){n||En.test(e)?r(e,i):x(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&Y.type(t)==="object")for(i in t)x(e+"["+i+"]",t[i],n,r);else r(e,t)}function T(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(tt),u=0,a=o.length;if(Y.isFunction(n))for(;u<a;u++)r=o[u],s=/^\+/.test(r),s&&(r=r.substr(1)||"*"),i=e[r]=e[r]||[],i[s?"unshift":"push"](n)}}function N(e,n,r,i,s,o){s=s||n.dataTypes[0],o=o||{},o[s]=!0;var u,a=e[s],f=0,l=a?a.length:0,c=e===jn;for(;f<l&&(c||!u);f++)u=a[f](n,r,i),typeof u=="string"&&(!c||o[u]?u=t:(n.dataTypes.unshift(u),u=N(e,n,r,i,u,o)));return(c||!u)&&!o["*"]&&(u=N(e,n,r,i,"*",o)),u}function C(e,n){var r,i,s=Y.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((s[r]?e:i||(i={}))[r]=n[r]);i&&Y.extend(!0,e,i)}function k(e,n,r){var i,s,o,u,a=e.contents,f=e.dataTypes,l=e.responseFields;for(s in l)s in r&&(n[l[s]]=r[s]);while(f[0]==="*")f.shift(),i===t&&(i=e.mimeType||n.getResponseHeader("content-type"));if(i)for(s in a)if(a[s]&&a[s].test(i)){f.unshift(s);break}if(f[0]in r)o=f[0];else{for(s in r){if(!f[0]||e.converters[s+" "+f[0]]){o=s;break}u||(u=s)}o=o||u}if(o)return o!==f[0]&&f.unshift(o),r[o]}function L(e,t){var n,r,i,s,o=e.dataTypes.slice(),u=o[0],a={},f=0;e.dataFilter&&(t=e.dataFilter(t,e.dataType));if(o[1])for(n in e.converters)a[n.toLowerCase()]=e.converters[n];for(;i=o[++f];)if(i!=="*"){if(u!=="*"&&u!==i){n=a[u+" "+i]||a["* "+i];if(!n)for(r in a){s=r.split(" ");if(s[1]===i){n=a[u+" "+s[0]]||a["* "+s[0]];if(n){n===!0?n=a[r]:a[r]!==!0&&(i=s[0],o.splice(f--,0,i));break}}}if(n!==!0)if(n&&e["throws"])t=n(t);else try{t=n(t)}catch(l){return{state:"parsererror",error:n?l:"No conversion from "+u+" to "+i}}}u=i}return{state:"success",data:t}}function A(){try{return new e.XMLHttpRequest}catch(t){}}function O(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function M(){return setTimeout(function(){Jn=t},0),Jn=Y.now()}function _(e,t){Y.each(t,function(t,n){var r=(er[t]||[]).concat(er["*"]),i=0,s=r.length;for(;i<s;i++)if(r[i].call(e,t,n))return})}function D(e,t,n){var r,i=0,s=0,o=Zn.length,u=Y.Deferred().always(function(){delete a.elem}),a=function(){var t=Jn||M(),n=Math.max(0,f.startTime+f.duration-t),r=n/f.duration||0,i=1-r,s=0,o=f.tweens.length;for(;s<o;s++)f.tweens[s].run(i);return u.notifyWith(e,[f,i,n]),i<1&&o?n:(u.resolveWith(e,[f]),!1)},f=u.promise({elem:e,props:Y.extend({},t),opts:Y.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Jn||M(),duration:n.duration,tweens:[],createTween:function(t,n,r){var i=Y.Tween(e,f.opts,t,n,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(i),i},stop:function(t){var n=0,r=t?f.tweens.length:0;for(;n<r;n++)f.tweens[n].run(1);return t?u.resolveWith(e,[f,t]):u.rejectWith(e,[f,t]),this}}),l=f.props;P(l,f.opts.specialEasing);for(;i<o;i++){r=Zn[i].call(f,e,l,f.opts);if(r)return r}return _(f,l),Y.isFunction(f.opts.start)&&f.opts.start.call(e,f),Y.fx.timer(Y.extend(a,{anim:f,queue:f.opts.queue,elem:e})),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always)}function P(e,t){var n,r,i,s,o;for(n in e){r=Y.camelCase(n),i=t[r],s=e[n],Y.isArray(s)&&(i=s[1],s=e[n]=s[0]),n!==r&&(e[r]=s,delete e[n]),o=Y.cssHooks[r];if(o&&"expand"in o){s=o.expand(s),delete e[r];for(n in s)n in e||(e[n]=s[n],t[n]=i)}else t[r]=i}}function H(e,t,n){var r,i,s,o,u,a,f,l,c,h=this,p=e.style,d={},v=[],m=e.nodeType&&g(e);n.queue||(l=Y._queueHooks(e,"fx"),l.unqueued==null&&(l.unqueued=0,c=l.empty.fire,l.empty.fire=function(){l.unqueued||c()}),l.unqueued++,h.always(function(){h.always(function(){l.unqueued--,Y.queue(e,"fx").length||l.empty.fire()})})),e.nodeType===1&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],Y.css(e,"display")==="inline"&&Y.css(e,"float")==="none"&&(!Y.support.inlineBlockNeedsLayout||S(e.nodeName)==="inline"?p.display="inline-block":p.zoom=1)),n.overflow&&(p.overflow="hidden",Y.support.shrinkWrapBlocks||h.done(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t){s=t[r];if(Qn.exec(s)){delete t[r],a=a||s==="toggle";if(s===(m?"hide":"show"))continue;v.push(r)}}o=v.length;if(o){u=Y._data(e,"fxshow")||Y._data(e,"fxshow",{}),"hidden"in u&&(m=u.hidden),a&&(u.hidden=!m),m?Y(e).show():h.done(function(){Y(e).hide()}),h.done(function(){var t;Y.removeData(e,"fxshow",!0);for(t in d)Y.style(e,t,d[t])});for(r=0;r<o;r++)i=v[r],f=h.createTween(i,m?u[i]:0),d[i]=u[i]||Y.style(e,i),i in u||(u[i]=f.start,m&&(f.end=f.start,f.start=i==="width"||i==="height"?1:0))}}function B(e,t,n,r,i){return new B.prototype.init(e,t,n,r,i)}function j(e,t){var n,r={height:e},i=0;t=t?1:0;for(;i<4;i+=2-t)n=gn[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function F(e){return Y.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}var I,q,R=e.document,U=e.location,z=e.navigator,W=e.jQuery,X=e.$,V=Array.prototype.push,$=Array.prototype.slice,J=Array.prototype.indexOf,K=Object.prototype.toString,Q=Object.prototype.hasOwnProperty,G=String.prototype.trim,Y=function(e,t){return new Y.fn.init(e,t,I)},Z=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,et=/\S/,tt=/\s+/,nt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,rt=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,it=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,st=/^[\],:{}\s]*$/,ot=/(?:^|:|,)(?:\s*\[)+/g,ut=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,at=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,ft=/^-ms-/,lt=/-([\da-z])/gi,ct=function(e,t){return(t+"").toUpperCase()},ht=function(){R.addEventListener?(R.removeEventListener("DOMContentLoaded",ht,!1),Y.ready()):R.readyState==="complete"&&(R.detachEvent("onreadystatechange",ht),Y.ready())},pt={};Y.fn=Y.prototype={constructor:Y,init:function(e,n,r){var i,s,o,u;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?i=[null,e,null]:i=rt.exec(e);if(i&&(i[1]||!n)){if(i[1])return n=n instanceof Y?n[0]:n,u=n&&n.nodeType?n.ownerDocument||n:R,e=Y.parseHTML(i[1],u,!0),it.test(i[1])&&Y.isPlainObject(n)&&this.attr.call(e,n,!0),Y.merge(this,e);s=R.getElementById(i[2]);if(s&&s.parentNode){if(s.id!==i[2])return r.find(e);this.length=1,this[0]=s}return this.context=R,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return Y.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),Y.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return $.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=Y.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return Y.each(this,e,t)},ready:function(e){return Y.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack($.apply(this,arguments),"slice",$.call(arguments).join(","))},map:function(e){return this.pushStack(Y.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:V,sort:[].sort,splice:[].splice},Y.fn.init.prototype=Y.fn,Y.extend=Y.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!Y.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a<f;a++)if((e=arguments[a])!=null)for(n in e){r=u[n],i=e[n];if(u===i)continue;l&&i&&(Y.isPlainObject(i)||(s=Y.isArray(i)))?(s?(s=!1,o=r&&Y.isArray(r)?r:[]):o=r&&Y.isPlainObject(r)?r:{},u[n]=Y.extend(l,o,i)):i!==t&&(u[n]=i)}return u},Y.extend({noConflict:function(t){return e.$===Y&&(e.$=X),t&&e.jQuery===Y&&(e.jQuery=W),Y},isReady:!1,readyWait:1,holdReady:function(e){e?Y.readyWait++:Y.ready(!0)},ready:function(e){if(e===!0?--Y.readyWait:Y.isReady)return;if(!R.body)return setTimeout(Y.ready,1);Y.isReady=!0;if(e!==!0&&--Y.readyWait>0)return;q.resolveWith(R,[Y]),Y.fn.trigger&&Y(R).trigger("ready").off("ready")},isFunction:function(e){return Y.type(e)==="function"},isArray:Array.isArray||function(e){return Y.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):pt[K.call(e)]||"object"},isPlainObject:function(e){if(!e||Y.type(e)!=="object"||e.nodeType||Y.isWindow(e))return!1;try{if(e.constructor&&!Q.call(e,"constructor")&&!Q.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||Q.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||R,(r=it.exec(e))?[t.createElement(r[1])]:(r=Y.buildFragment([e],t,n?null:[]),Y.merge([],(r.cacheable?Y.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=Y.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(st.test(t.replace(ut,"@").replace(at,"]").replace(ot,"")))return(new Function("return "+t))();Y.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&Y.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&et.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(ft,"ms-").replace(lt,ct)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||Y.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s<o;)if(n.apply(e[s++],r)===!1)break}else if(u){for(i in e)if(n.call(e[i],i,e[i])===!1)break}else for(;s<o;)if(n.call(e[s],s,e[s++])===!1)break;return e},trim:G&&!G.call(" ")?function(e){return e==null?"":G.call(e)}:function(e){return e==null?"":(e+"").replace(nt,"")},makeArray:function(e,t){var n,r=t||[];return e!=null&&(n=Y.type(e),e.length==null||n==="string"||n==="function"||n==="regexp"||Y.isWindow(e)?V.call(r,e):Y.merge(r,e)),r},inArray:function(e,t,n){var r;if(t){if(J)return J.call(t,e,n);r=t.length,n=n?n<0?Math.max(0,r+n):n:0;for(;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,s=0;if(typeof r=="number")for(;s<r;s++)e[i++]=n[s];else while(n[s]!==t)e[i++]=n[s++];return e.length=i,e},grep:function(e,t,n){var r,i=[],s=0,o=e.length;n=!!n;for(;s<o;s++)r=!!t(e[s],s),n!==r&&i.push(e[s]);return i},map:function(e,n,r){var i,s,o=[],u=0,a=e.length,f=e instanceof Y||a!==t&&typeof a=="number"&&(a>0&&e[0]&&e[a-1]||a===0||Y.isArray(e));if(f)for(;u<a;u++)i=n(e[u],u,r),i!=null&&(o[o.length]=i);else for(s in e)i=n(e[s],s,r),i!=null&&(o[o.length]=i);return o.concat.apply([],o)},guid:1,proxy:function(e,n){var r,i,s;return typeof n=="string"&&(r=e[n],n=e,e=r),Y.isFunction(e)?(i=$.call(arguments,2),s=function(){return e.apply(n,i.concat($.call(arguments)))},s.guid=e.guid=e.guid||Y.guid++,s):t},access:function(e,n,r,i,s,o,u){var a,f=r==null,l=0,c=e.length;if(r&&typeof r=="object"){for(l in r)Y.access(e,n,l,r[l],1,o,i);s=1}else if(i!==t){a=u===t&&Y.isFunction(i),f&&(a?(a=n,n=function(e,t,n){return a.call(Y(e),n)}):(n.call(e,i),n=null));if(n)for(;l<c;l++)n(e[l],r,a?i.call(e[l],l,n(e[l],r)):i,u);s=1}return s?e:f?n.call(e):c?n(e[0],r):o},now:function(){return(new Date).getTime()}}),Y.ready.promise=function(t){if(!q){q=Y.Deferred();if(R.readyState==="complete")setTimeout(Y.ready,1);else if(R.addEventListener)R.addEventListener("DOMContentLoaded",ht,!1),e.addEventListener("load",Y.ready,!1);else{R.attachEvent("onreadystatechange",ht),e.attachEvent("onload",Y.ready);var n=!1;try{n=e.frameElement==null&&R.documentElement}catch(r){}n&&n.doScroll&&function i(){if(!Y.isReady){try{n.doScroll("left")}catch(e){return setTimeout(i,50)}Y.ready()}}()}}return q.promise(t)},Y.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,t){pt["[object "+t+"]"]=t.toLowerCase()}),I=Y(R);var dt={};Y.Callbacks=function(e){e=typeof e=="string"?dt[e]||n(e):Y.extend({},e);var r,i,s,o,u,a,f=[],l=!e.once&&[],c=function(t){r=e.memory&&t,i=!0,a=o||0,o=0,u=f.length,s=!0;for(;f&&a<u;a++)if(f[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}s=!1,f&&(l?l.length&&c(l.shift()):r?f=[]:h.disable())},h={add:function(){if(f){var t=f.length;(function n(t){Y.each(t,function(t,r){var i=Y.type(r);i==="function"?(!e.unique||!h.has(r))&&f.push(r):r&&r.length&&i!=="string"&&n(r)})})(arguments),s?u=f.length:r&&(o=t,c(r))}return this},remove:function(){return f&&Y.each(arguments,function(e,t){var n;while((n=Y.inArray(t,f,n))>-1)f.splice(n,1),s&&(n<=u&&u--,n<=a&&a--)}),this},has:function(e){return Y.inArray(e,f)>-1},empty:function(){return f=[],this},disable:function(){return f=l=r=t,this},disabled:function(){return!f},lock:function(){return l=t,r||h.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],f&&(!i||l)&&(s?l.push(t):c(t)),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!i}};return h},Y.extend({Deferred:function(e){var t=[["resolve","done",Y.Callbacks("once memory"),"resolved"],["reject","fail",Y.Callbacks("once memory"),"rejected"],["notify","progress",Y.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return Y.Deferred(function(n){Y.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](Y.isFunction(o)?function(){var e=o.apply(this,arguments);e&&Y.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?Y.extend(e,r):r}},i={};return r.pipe=r.then,Y.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=$.call(arguments),r=n.length,i=r!==1||e&&Y.isFunction(e.promise)?r:0,s=i===1?e:Y.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?$.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t<r;t++)n[t]&&Y.isFunction(n[t].promise)?n[t].promise().done(o(t,f,n)).fail(s.reject).progress(o(t,a,u)):--i}return i||s.resolveWith(f,n),s.promise()}}),Y.support=function(){var t,n,r,i,s,o,u,a,f,l,c,h=R.createElement("div");h.setAttribute("className","t"),h.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=h.getElementsByTagName("*"),r=h.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};i=R.createElement("select"),s=i.appendChild(R.createElement("option")),o=h.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:h.firstChild.nodeType===3,tbody:!h.getElementsByTagName("tbody").length,htmlSerialize:!!h.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:o.value==="on",optSelected:s.selected,getSetAttribute:h.className!=="t",enctype:!!R.createElement("form").enctype,html5Clone:R.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:R.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,i.disabled=!0,t.optDisabled=!s.disabled;try{delete h.test}catch(p){t.deleteExpando=!1}!h.addEventListener&&h.attachEvent&&h.fireEvent&&(h.attachEvent("onclick",c=function(){t.noCloneEvent=!1}),h.cloneNode(!0).fireEvent("onclick"),h.detachEvent("onclick",c)),o=R.createElement("input"),o.value="t",o.setAttribute("type","radio"),t.radioValue=o.value==="t",o.setAttribute("checked","checked"),o.setAttribute("name","t"),h.appendChild(o),u=R.createDocumentFragment(),u.appendChild(h.lastChild),t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=o.checked,u.removeChild(o),u.appendChild(h);if(h.attachEvent)for(f in{submit:!0,change:!0,focusin:!0})a="on"+f,l=a in h,l||(h.setAttribute(a,"return;"),l=typeof h[a]=="function"),t[f+"Bubbles"]=l;return Y(function(){var n,r,i,s,o="padding:0;margin:0;border:0;display:block;overflow:hidden;",u=R.getElementsByTagName("body")[0];if(!u)return;n=R.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",u.insertBefore(n,u.firstChild),r=R.createElement("div"),n.appendChild(r),r.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=r.getElementsByTagName("td"),i[0].style.cssText="padding:0;margin:0;border:0;display:none",l=i[0].offsetHeight===0,i[0].style.display="",i[1].style.display="none",t.reliableHiddenOffsets=l&&i[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=u.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",s=R.createElement("div"),s.style.cssText=r.style.cssText=o,s.style.marginRight=s.style.width="0",r.style.width="1px",r.appendChild(s),t.reliableMarginRight=!parseFloat((e.getComputedStyle(s,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=o+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="<div></div>",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),u.removeChild(n),n=r=i=s=null}),u.removeChild(h),n=r=i=s=o=u=h=null,t}();var vt=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,mt=/([A-Z])/g;Y.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(Y.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?Y.cache[e[Y.expando]]:e[Y.expando],!!e&&!i(e)},data:function(e,n,r,i){if(!Y.acceptData(e))return;var s,o,u=Y.expando,a=typeof n=="string",f=e.nodeType,l=f?Y.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=Y.deletedIds.pop()||Y.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=Y.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=Y.extend(l[c],n):l[c].data=Y.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[Y.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[Y.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!Y.acceptData(e))return;var r,s,o,u=e.nodeType,a=u?Y.cache:e,f=u?e[Y.expando]:Y.expando;if(!a[f])return;if(t){r=n?a[f]:a[f].data;if(r){Y.isArray(t)||(t in r?t=[t]:(t=Y.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(s=0,o=t.length;s<o;s++)delete r[t[s]];if(!(n?i:Y.isEmptyObject)(r))return}}if(!n){delete a[f].data;if(!i(a[f]))return}u?Y.cleanData([e],!0):Y.support.deleteExpando||a!=a.window?delete a[f]:a[f]=null},_data:function(e,t,n){return Y.data(e,t,n,!0)},acceptData:function(e){var t=e.nodeName&&Y.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),Y.fn.extend({data:function(e,n){var i,s,o,u,a,f=this[0],l=0,c=null;if(e===t){if(this.length){c=Y.data(f);if(f.nodeType===1&&!Y._data(f,"parsedAttrs")){o=f.attributes;for(a=o.length;l<a;l++)u=o[l].name,u.indexOf("data-")||(u=Y.camelCase(u.substring(5)),r(f,u,c[u]));Y._data(f,"parsedAttrs",!0)}}return c}return typeof e=="object"?this.each(function(){Y.data(this,e)}):(i=e.split(".",2),i[1]=i[1]?"."+i[1]:"",s=i[1]+"!",Y.access(this,function(n){if(n===t)return c=this.triggerHandler("getData"+s,[i[0]]),c===t&&f&&(c=Y.data(f,e),c=r(f,e,c)),c===t&&i[1]?this.data(i[0]):c;i[1]=n,this.each(function(){var t=Y(this);t.triggerHandler("setData"+s,i),Y.data(this,e,n),t.triggerHandler("changeData"+s,i)})},null,n,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){Y.removeData(this,e)})}}),Y.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y._data(e,t),n&&(!r||Y.isArray(n)?r=Y._data(e,t,Y.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=Y.queue(e,t),r=n.length,i=n.shift(),s=Y._queueHooks(e,t),o=function(){Y.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y._data(e,n)||Y._data(e,n,{empty:Y.Callbacks("once memory").add(function(){Y.removeData(e,t+"queue",!0),Y.removeData(e,n,!0)})})}}),Y.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length<r?Y.queue(this[0],e):n===t?this:this.each(function(){var t=Y.queue(this,e,n);Y._queueHooks(this,e),e==="fx"&&t[0]!=="inprogress"&&Y.dequeue(this,e)})},dequeue:function(e){return this.each(function(){Y.dequeue(this,e)})},delay:function(e,t){return e=Y.fx?Y.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,s=Y.Deferred(),o=this,u=this.length,a=function(){--i||s.resolveWith(o,[o])};typeof e!="string"&&(n=e,e=t),e=e||"fx";while(u--)r=Y._data(o[u],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(a));return a(),s.promise(n)}});var gt,yt,bt,wt=/[\t\r\n]/g,Et=/\r/g,St=/^(?:button|input)$/i,xt=/^(?:button|input|object|select|textarea)$/i,Tt=/^a(?:rea|)$/i,Nt=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,Ct=Y.support.getSetAttribute;Y.fn.extend({attr:function(e,t){return Y.access(this,Y.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){Y.removeAttr(this,e)})},prop:function(e,t){return Y.access(this,Y.prop,e,t,arguments.length>1)},removeProp:function(e){return e=Y.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(Y.isFunction(e))return this.each(function(t){Y(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(tt);for(n=0,r=this.length;n<r;n++){i=this[n];if(i.nodeType===1)if(!i.className&&t.length===1)i.className=e;else{s=" "+i.className+" ";for(o=0,u=t.length;o<u;o++)s.indexOf(" "+t[o]+" ")<0&&(s+=t[o]+" ");i.className=Y.trim(s)}}}return this},removeClass:function(e){var n,r,i,s,o,u,a;if(Y.isFunction(e))return this.each(function(t){Y(this).removeClass(e.call(this,t,this.className))});if(e&&typeof e=="string"||e===t){n=(e||"").split(tt);for(u=0,a=this.length;u<a;u++){i=this[u];if(i.nodeType===1&&i.className){r=(" "+i.className+" ").replace(wt," ");for(s=0,o=n.length;s<o;s++)while(r.indexOf(" "+n[s]+" ")>=0)r=r.replace(" "+n[s]+" "," ");i.className=e?Y.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return Y.isFunction(e)?this.each(function(n){Y(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=Y(this),u=t,a=e.split(tt);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&Y._data(this,"__className__",this.className),this.className=this.className||e===!1?"":Y._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n<r;n++)if(this[n].nodeType===1&&(" "+this[n].className+" ").replace(wt," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=Y.valHooks[s.type]||Y.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(Et,""):r==null?"":r);return}return i=Y.isFunction(e),this.each(function(r){var s,o=Y(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":Y.isArray(s)&&(s=Y.map(s,function(e){return e==null?"":e+""})),n=Y.valHooks[this.type]||Y.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),Y.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a<u;a++){n=r[a];if((n.selected||a===i)&&(Y.support.optDisabled?!n.disabled:n.getAttribute("disabled")===null)&&(!n.parentNode.disabled||!Y.nodeName(n.parentNode,"optgroup"))){t=Y(n).val();if(s)return t;o.push(t)}}return o},set:function(e,t){var n=Y.makeArray(t);return Y(e).find("option").each(function(){this.selected=Y.inArray(Y(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&Y.isFunction(Y.fn[n]))return Y(e)[n](r);if(typeof e.getAttribute=="undefined")return Y.prop(e,n,r);u=a!==1||!Y.isXMLDoc(e),u&&(n=n.toLowerCase(),o=Y.attrHooks[n]||(Nt.test(n)?yt:gt));if(r!==t){if(r===null){Y.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(tt);for(;o<r.length;o++)i=r[o],i&&(n=Y.propFix[i]||i,s=Nt.test(i),s||Y.attr(e,i,""),e.removeAttribute(Ct?i:n),s&&n in e&&(e[n]=!1))}},attrHooks:{type:{set:function(e,t){if(St.test(e.nodeName)&&e.parentNode)Y.error("type property can't be changed");else if(!Y.support.radioValue&&t==="radio"&&Y.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},value:{get:function(e,t){return gt&&Y.nodeName(e,"button")?gt.get(e,t):t in e?e.value:null},set:function(e,t,n){if(gt&&Y.nodeName(e,"button"))return gt.set(e,t,n);e.value=t}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,s,o,u=e.nodeType;if(!e||u===3||u===8||u===2)return;return o=u!==1||!Y.isXMLDoc(e),o&&(n=Y.propFix[n]||n,s=Y.propHooks[n]),r!==t?s&&"set"in s&&(i=s.set(e,r,n))!==t?i:e[n]=r:s&&"get"in s&&(i=s.get(e,n))!==null?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):xt.test(e.nodeName)||Tt.test(e.nodeName)&&e.href?0:t}}}}),yt={get:function(e,n){var r,i=Y.prop(e,n);return i===!0||typeof i!="boolean"&&(r=e.getAttributeNode(n))&&r.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var r;return t===!1?Y.removeAttr(e,n):(r=Y.propFix[n]||n,r in e&&(e[r]=!0),e.setAttribute(n,n.toLowerCase())),n}},Ct||(bt={name:!0,id:!0,coords:!0},gt=Y.valHooks.button={get:function(e,n){var r;return r=e.getAttributeNode(n),r&&(bt[n]?r.value!=="":r.specified)?r.value:t},set:function(e,t,n){var r=e.getAttributeNode(n);return r||(r=R.createAttribute(n),e.setAttributeNode(r)),r.value=t+""}},Y.each(["width","height"],function(e,t){Y.attrHooks[t]=Y.extend(Y.attrHooks[t],{set:function(e,n){if(n==="")return e.setAttribute(t,"auto"),n}})}),Y.attrHooks.contenteditable={get:gt.get,set:function(e,t,n){t===""&&(t="false"),gt.set(e,t,n)}}),Y.support.hrefNormalized||Y.each(["href","src","width","height"],function(e,n){Y.attrHooks[n]=Y.extend(Y.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return r===null?t:r}})}),Y.support.style||(Y.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=t+""}}),Y.support.optSelected||(Y.propHooks.selected=Y.extend(Y.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),Y.support.enctype||(Y.propFix.enctype="encoding"),Y.support.checkOn||Y.each(["radio","checkbox"],function(){Y.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}}),Y.each(["radio","checkbox"],function(){Y.valHooks[this]=Y.extend(Y.valHooks[this],{set:function(e,t){if(Y.isArray(t))return e.checked=Y.inArray(Y(e).val(),t)>=0}})});var kt=/^(?:textarea|input|select)$/i,Lt=/^([^\.]*|)(?:\.(.+)|)$/,At=/(?:^|\s)hover(\.\S+|)\b/,Ot=/^key/,Mt=/^(?:mouse|contextmenu)|click/,_t=/^(?:focusinfocus|focusoutblur)$/,Dt=function(e){return Y.event.special.hover?e:e.replace(At,"mouseenter$1 mouseleave$1")};Y.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,v,m;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=Y._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=Y.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof Y=="undefined"||!!e&&Y.event.triggered===e.type?t:Y.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=Y.trim(Dt(n)).split(" ");for(f=0;f<n.length;f++){l=Lt.exec(n[f])||[],c=l[1],h=(l[2]||"").split(".").sort(),m=Y.event.special[c]||{},c=(s?m.delegateType:m.bindType)||c,m=Y.event.special[c]||{},p=Y.extend({type:c,origType:l[1],data:i,handler:r,guid:r.guid,selector:s,needsContext:s&&Y.expr.match.needsContext.test(s),namespace:h.join(".")},d),v=a[c];if(!v){v=a[c]=[],v.delegateCount=0;if(!m.setup||m.setup.call(e,i,h,u)===!1)e.addEventListener?e.addEventListener(c,u,!1):e.attachEvent&&e.attachEvent("on"+c,u)}m.add&&(m.add.call(e,p),p.handler.guid||(p.handler.guid=r.guid)),s?v.splice(v.delegateCount++,0,p):v.push(p),Y.event.global[c]=!0}e=null},global:{},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,v,m=Y.hasData(e)&&Y._data(e);if(!m||!(h=m.events))return;t=Y.trim(Dt(t||"")).split(" ");for(s=0;s<t.length;s++){o=Lt.exec(t[s])||[],u=a=o[1],f=o[2];if(!u){for(u in h)Y.event.remove(e,u+t[s],n,r,!0);continue}p=Y.event.special[u]||{},u=(r?p.delegateType:p.bindType)||u,d=h[u]||[],l=d.length,f=f?new RegExp("(^|\\.)"+f.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(c=0;c<d.length;c++)v=d[c],(i||a===v.origType)&&(!n||n.guid===v.guid)&&(!f||f.test(v.namespace))&&(!r||r===v.selector||r==="**"&&v.selector)&&(d.splice(c--,1),v.selector&&d.delegateCount--,p.remove&&p.remove.call(e,v));d.length===0&&l!==d.length&&((!p.teardown||p.teardown.call(e,f,m.handle)===!1)&&Y.removeEvent(e,u,m.handle),delete h[u])}Y.isEmptyObject(h)&&(delete m.handle,Y.removeData(e,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,r,i,s){if(!i||i.nodeType!==3&&i.nodeType!==8){var o,u,a,f,l,c,h,p,d,v,m=n.type||n,g=[];if(_t.test(m+Y.event.triggered))return;m.indexOf("!")>=0&&(m=m.slice(0,-1),u=!0),m.indexOf(".")>=0&&(g=m.split("."),m=g.shift(),g.sort());if((!i||Y.event.customEvent[m])&&!Y.event.global[m])return;n=typeof n=="object"?n[Y.expando]?n:new Y.Event(m,n):new Y.Event(m),n.type=m,n.isTrigger=!0,n.exclusive=u,n.namespace=g.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,c=m.indexOf(":")<0?"on"+m:"";if(!i){o=Y.cache;for(a in o)o[a].events&&o[a].events[m]&&Y.event.trigger(n,r,o[a].handle.elem,!0);return}n.result=t,n.target||(n.target=i),r=r!=null?Y.makeArray(r):[],r.unshift(n),h=Y.event.special[m]||{};if(h.trigger&&h.trigger.apply(i,r)===!1)return;d=[[i,h.bindType||m]];if(!s&&!h.noBubble&&!Y.isWindow(i)){v=h.delegateType||m,f=_t.test(v+m)?i:i.parentNode;for(l=i;f;f=f.parentNode)d.push([f,v]),l=f;l===(i.ownerDocument||R)&&d.push([l.defaultView||l.parentWindow||e,v])}for(a=0;a<d.length&&!n.isPropagationStopped();a++)f=d[a][0],n.type=d[a][1],p=(Y._data(f,"events")||{})[n.type]&&Y._data(f,"handle"),p&&p.apply(f,r),p=c&&f[c],p&&Y.acceptData(f)&&p.apply&&p.apply(f,r)===!1&&n.preventDefault();return n.type=m,!s&&!n.isDefaultPrevented()&&(!h._default||h._default.apply(i.ownerDocument,r)===!1)&&(m!=="click"||!Y.nodeName(i,"a"))&&Y.acceptData(i)&&c&&i[m]&&(m!=="focus"&&m!=="blur"||n.target.offsetWidth!==0)&&!Y.isWindow(i)&&(l=i[c],l&&(i[c]=null),Y.event.triggered=m,i[m](),Y.event.triggered=t,l&&(i[c]=l)),n.result}return},dispatch:function(n){n=Y.event.fix(n||e.event);var r,i,s,o,u,a,f,l,c,h,p=(Y._data(this,"events")||{})[n.type]||[],d=p.delegateCount,v=$.call(arguments),m=!n.exclusive&&!n.namespace,g=Y.event.special[n.type]||{},y=[];v[0]=n,n.delegateTarget=this;if(g.preDispatch&&g.preDispatch.call(this,n)===!1)return;if(d&&(!n.button||n.type!=="click"))for(s=n.target;s!=this;s=s.parentNode||this)if(s.disabled!==!0||n.type!=="click"){u={},f=[];for(r=0;r<d;r++)l=p[r],c=l.selector,u[c]===t&&(u[c]=l.needsContext?Y(c,this).index(s)>=0:Y.find(c,this,null,[s]).length),u[c]&&f.push(l);f.length&&y.push({elem:s,matches:f})}p.length>d&&y.push({elem:this,matches:p.slice(d)});for(r=0;r<y.length&&!n.isPropagationStopped();r++){a=y[r],n.currentTarget=a.elem;for(i=0;i<a.matches.length&&!n.isImmediatePropagationStopped();i++){l=a.matches[i];if(m||!n.namespace&&!l.namespace||n.namespace_re&&n.namespace_re.test(l.namespace))n.data=l.data,n.handleObj=l,o=((Y.event.special[l.origType]||{}).handle||l.handler).apply(a.elem,v),o!==t&&(n.result=o,o===!1&&(n.preventDefault(),n.stopPropagation()))}}return g.postDispatch&&g.postDispatch.call(this,n),n.result},props:"attrChange attrName relatedNode srcElement 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 e.which==null&&(e.which=t.charCode!=null?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,s,o=n.button,u=n.fromElement;return e.pageX==null&&n.clientX!=null&&(r=e.target.ownerDocument||R,i=r.documentElement,s=r.body,e.pageX=n.clientX+(i&&i.scrollLeft||s&&s.scrollLeft||0)-(i&&i.clientLeft||s&&s.clientLeft||0),e.pageY=n.clientY+(i&&i.scrollTop||s&&s.scrollTop||0)-(i&&i.clientTop||s&&s.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),!e.which&&o!==t&&(e.which=o&1?1:o&2?3:o&4?2:0),e}},fix:function(e){if(e[Y.expando])return e;var t,n,r=e,i=Y.event.fixHooks[e.type]||{},s=i.props?this.props.concat(i.props):this.props;e=Y.Event(r);for(t=s.length;t;)n=s[--t],e[n]=r[n];return e.target||(e.target=r.srcElement||R),e.target.nodeType===3&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,i.filter?i.filter(e,r):e},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(e,t,n){Y.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,r){var i=Y.extend(new Y.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?Y.event.trigger(i,null,t):Y.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},Y.event.handle=Y.event.dispatch,Y.removeEvent=R.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]=="undefined"&&(e[r]=null),e.detachEvent(r,n))},Y.Event=function(e,t){if(!(this instanceof Y.Event))return new Y.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?o:s):this.type=e,t&&Y.extend(this,t),this.timeStamp=e&&e.timeStamp||Y.now(),this[Y.expando]=!0},Y.Event.prototype={preventDefault:function(){this.isDefaultPrevented=o;var e=this.originalEvent;if(!e)return;e.preventDefault?e.preventDefault():e.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=o;var e=this.originalEvent;if(!e)return;e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=o,this.stopPropagation()},isDefaultPrevented:s,isPropagationStopped:s,isImmediatePropagationStopped:s},Y.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){Y.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj,o=s.selector;if(!i||i!==r&&!Y.contains(r,i))e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t;return n}}}),Y.support.submitBubbles||(Y.event.special.submit={setup:function(){if(Y.nodeName(this,"form"))return!1;Y.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=Y.nodeName(n,"input")||Y.nodeName(n,"button")?n.form:t;r&&!Y._data(r,"_submit_attached")&&(Y.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),Y._data(r,"_submit_attached",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&Y.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(Y.nodeName(this,"form"))return!1;Y.event.remove(this,"._submit")}}),Y.support.changeBubbles||(Y.event.special.change={setup:function(){if(kt.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")Y.event.add(this,"propertychange._change",function(e){e.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),Y.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),Y.event.simulate("change",this,e,!0)});return!1}Y.event.add(this,"beforeactivate._change",function(e){var t=e.target;kt.test(t.nodeName)&&!Y._data(t,"_change_attached")&&(Y.event.add(t,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&Y.event.simulate("change",this.parentNode,e,!0)}),Y._data(t,"_change_attached",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||t.type!=="radio"&&t.type!=="checkbox")return e.handleObj.handler.apply(this,arguments)},teardown:function(){return Y.event.remove(this,"._change"),!kt.test(this.nodeName)}}),Y.support.focusinBubbles||Y.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){Y.event.simulate(t,e.target,Y.event.fix(e),!0)};Y.event.special[t]={setup:function(){n++===0&&R.addEventListener(e,r,!0)},teardown:function(){--n===0&&R.removeEventListener(e,r,!0)}}}),Y.fn.extend({on:function(e,n,r,i,o){var u,a;if(typeof e=="object"){typeof n!="string"&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}r==null&&i==null?(i=n,r=n=t):i==null&&(typeof n=="string"?(i=r,r=t):(i=r,r=n,n=t));if(i===!1)i=s;else if(!i)return this;return o===1&&(u=i,i=function(e){return Y().off(e),u.apply(this,arguments)},i.guid=u.guid||(u.guid=Y.guid++)),this.each(function(){Y.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,Y(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if(typeof e=="object"){for(o in e)this.off(o,n,e[o]);return this}if(n===!1||typeof n=="function")r=n,n=t;return r===!1&&(r=s),this.each(function(){Y.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return Y(this.context).on(e,this.selector,t,n),this},die:function(e,t){return Y(this.context).off(e,this.selector||"**",t),this},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length===1?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){Y.event.trigger(e,t,this)})},triggerHandler:function(e,t){if(this[0])return Y.event.trigger(e,t,this[0],!0)},toggle:function(e){var t=arguments,n=e.guid||Y.guid++,r=0,i=function(n){var i=(Y._data(this,"lastToggle"+e.guid)||0)%r;return Y._data(this,"lastToggle"+e.guid,i+1),n.preventDefault(),t[i].apply(this,arguments)||!1};i.guid=n;while(r<t.length)t[r++].guid=n;return this.click(i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),Y.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){Y.fn[t]=function(e,n){return n==null&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},Ot.test(t)&&(Y.event.fixHooks[t]=Y.event.keyHooks),Mt.test(t)&&(Y.event.fixHooks[t]=Y.event.mouseHooks)}),function(e,t){function n(e,t,n,r){n=n||[],t=t||M;var i,s,o,u,a=t.nodeType;if(!e||typeof e!="string")return n;if(a!==1&&a!==9)return[];o=E(t);if(!o&&!r)if(i=nt.exec(e))if(u=i[1]){if(a===9){s=t.getElementById(u);if(!s||!s.parentNode)return n;if(s.id===u)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(u))&&S(t,s)&&s.id===u)return n.push(s),n}else{if(i[2])return B.apply(n,j.call(t.getElementsByTagName(e),0)),n;if((u=i[3])&&dt&&t.getElementsByClassName)return B.apply(n,j.call(t.getElementsByClassName(u),0)),n}return v(e.replace(G,"$1"),t,n,r,o)}function r(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function i(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function s(e){return I(function(t){return t=+t,I(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function o(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function u(e,t){var r,i,s,o,u,a,f,l=U[A][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=b.preFilter;while(u){if(!r||(i=Z.exec(u)))i&&(u=u.slice(i[0].length)||u),a.push(s=[]);r=!1;if(i=et.exec(u))s.push(r=new O(i.shift())),u=u.slice(r.length),r.type=i[0].replace(G," ");for(o in b.filter)(i=ft[o].exec(u))&&(!f[o]||(i=f[o](i)))&&(s.push(r=new O(i.shift())),u=u.slice(r.length),r.type=o,r.matches=i);if(!r)break}return t?u.length:u?n.error(e):U(e,a).slice(0)}function a(e,t,n){var r=t.dir,i=n&&t.dir==="parentNode",s=P++;return t.first?function(t,n,s){while(t=t[r])if(i||t.nodeType===1)return e(t,n,s)}:function(t,n,o){if(!o){var u,a=D+" "+s+" ",f=a+g;while(t=t[r])if(i||t.nodeType===1){if((u=t[A])===f)return t.sizset;if(typeof u=="string"&&u.indexOf(a)===0){if(t.sizset)return t}else{t[A]=f;if(e(t,n,o))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[r])if(i||t.nodeType===1)if(e(t,n,o))return t}}function f(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function l(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u<a;u++)if(s=e[u])if(!n||n(s,r,i))o.push(s),f&&t.push(u);return o}function c(e,t,n,r,i,s){return r&&!r[A]&&(r=c(r)),i&&!i[A]&&(i=c(i,s)),I(function(s,o,u,a){var f,c,h,p=[],v=[],m=o.length,g=s||d(t||"*",u.nodeType?[u]:u,[]),y=e&&(s||!t)?l(g,p,e,u,a):g,b=n?i||(s?e:m||r)?[]:o:y;n&&n(y,b,u,a);if(r){f=l(b,v),r(f,[],u,a),c=f.length;while(c--)if(h=f[c])b[v[c]]=!(y[v[c]]=h)}if(s){if(i||e){if(i){f=[],c=b.length;while(c--)(h=b[c])&&f.push(y[c]=h);i(null,b=[],f,a)}c=b.length;while(c--)(h=b[c])&&(f=i?F.call(s,h):p[c])>-1&&(s[f]=!(o[f]=h))}}else b=l(b===o?b.splice(m,b.length):b),i?i(null,o,b,a):B.apply(o,b)})}function h(e){var t,n,r,i=e.length,s=b.relative[e[0].type],o=s||b.relative[" "],u=s?1:0,l=a(function(e){return e===t},o,!0),p=a(function(e){return F.call(t,e)>-1},o,!0),d=[function(e,n,r){return!s&&(r||n!==C)||((t=n).nodeType?l(e,n,r):p(e,n,r))}];for(;u<i;u++)if(n=b.relative[e[u].type])d=[a(f(d),n)];else{n=b.filter[e[u].type].apply(null,e[u].matches);if(n[A]){r=++u;for(;r<i;r++)if(b.relative[e[r].type])break;return c(u>1&&f(d),u>1&&e.slice(0,u-1).join("").replace(G,"$1"),n,u<r&&h(e.slice(u,r)),r<i&&h(e=e.slice(r)),r<i&&e.join(""))}d.push(n)}return f(d)}function p(e,t){var r=t.length>0,i=e.length>0,s=function(o,u,a,f,c){var h,p,d,v=[],m=0,y="0",w=o&&[],E=c!=null,S=C,x=o||i&&b.find.TAG("*",c&&u.parentNode||u),T=D+=S==null?1:Math.E;E&&(C=u!==M&&u,g=s.el);for(;(h=x[y])!=null;y++){if(i&&h){for(p=0;d=e[p];p++)if(d(h,u,a)){f.push(h);break}E&&(D=T,g=++s.el)}r&&((h=!d&&h)&&m--,o&&w.push(h))}m+=y;if(r&&y!==m){for(p=0;d=t[p];p++)d(w,v,u,a);if(o){if(m>0)while(y--)!w[y]&&!v[y]&&(v[y]=H.call(f));v=l(v)}B.apply(f,v),E&&!o&&v.length>0&&m+t.length>1&&n.uniqueSort(f)}return E&&(D=T,C=S),w};return s.el=0,r?I(s):s}function d(e,t,r){var i=0,s=t.length;for(;i<s;i++)n(e,t[i],r);return r}function v(e,t,n,r,i){var s,o,a,f,l,c=u(e),h=c.length;if(!r&&c.length===1){o=c[0]=c[0].slice(0);if(o.length>2&&(a=o[0]).type==="ID"&&t.nodeType===9&&!i&&b.relative[o[1].type]){t=b.find.ID(a.matches[0].replace(at,""),t,i)[0];if(!t)return n;e=e.slice(o.shift().length)}for(s=ft.POS.test(e)?-1:o.length-1;s>=0;s--){a=o[s];if(b.relative[f=a.type])break;if(l=b.find[f])if(r=l(a.matches[0].replace(at,""),it.test(o[0].type)&&t.parentNode||t,i)){o.splice(s,1),e=r.length&&o.join("");if(!e)return B.apply(n,j.call(r,0)),n;break}}}return x(e,c)(r,t,i,n,it.test(e)),n}function m(){}var g,y,b,w,E,S,x,T,N,C,k=!0,L="undefined",A=("sizcache"+Math.random()).replace(".",""),O=String,M=e.document,_=M.documentElement,D=0,P=0,H=[].pop,B=[].push,j=[].slice,F=[].indexOf||function(e){var t=0,n=this.length;for(;t<n;t++)if(this[t]===e)return t;return-1},I=function(e,t){return e[A]=t==null||t,e},q=function(){var e={},t=[];return I(function(n,r){return t.push(n)>b.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},R=q(),U=q(),z=q(),W="[\\x20\\t\\r\\n\\f]",X="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",V=X.replace("w","w#"),$="([*^$|!~]?=)",J="\\["+W+"*("+X+")"+W+"*(?:"+$+W+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+V+")|)|)"+W+"*\\]",K=":("+X+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+J+")|[^:]|\\\\.)*|.*))\\)|)",Q=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+W+"*((?:-\\d)?\\d*)"+W+"*\\)|)(?=[^-]|$)",G=new RegExp("^"+W+"+|((?:^|[^\\\\])(?:\\\\.)*)"+W+"+$","g"),Z=new RegExp("^"+W+"*,"+W+"*"),et=new RegExp("^"+W+"*([\\x20\\t\\r\\n\\f>+~])"+W+"*"),tt=new RegExp(K),nt=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,rt=/^:not/,it=/[\x20\t\r\n\f]*[+~]/,st=/:not\($/,ot=/h\d/i,ut=/input|select|textarea|button/i,at=/\\(?!\\)/g,ft={ID:new RegExp("^#("+X+")"),CLASS:new RegExp("^\\.("+X+")"),NAME:new RegExp("^\\[name=['\"]?("+X+")['\"]?\\]"),TAG:new RegExp("^("+X.replace("w","w*")+")"),ATTR:new RegExp("^"+J),PSEUDO:new RegExp("^"+K),POS:new RegExp(Q,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+W+"*(even|odd|(([+-]|)(\\d*)n|)"+W+"*(?:([+-]|)"+W+"*(\\d+)|))"+W+"*\\)|)","i"),needsContext:new RegExp("^"+W+"*[>+~]|"+Q,"i")},lt=function(e){var t=M.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},ct=lt(function(e){return e.appendChild(M.createComment("")),!e.getElementsByTagName("*").length}),ht=lt(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==L&&e.firstChild.getAttribute("href")==="#"}),pt=lt(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),dt=lt(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),vt=lt(function(e){e.id=A+0,e.innerHTML="<a name='"+A+"'></a><div name='"+A+"'></div>",_.insertBefore(e,_.firstChild);var t=M.getElementsByName&&M.getElementsByName(A).length===2+M.getElementsByName(A+0).length;return y=!M.getElementById(A),_.removeChild(e),t});try{j.call(_.childNodes,0)[0].nodeType}catch(mt){j=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}n.matches=function(e,t){return n(e,null,null,t)},n.matchesSelector=function(e,t){return n(t,null,null,[e]).length>0},w=n.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=w(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=w(t);return n},E=n.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},S=n.contains=_.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:_.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},n.attr=function(e,t){var n,r=E(e);return r||(t=t.toLowerCase()),(n=b.attrHandle[t])?n(e):r||pt?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},b=n.selectors={cacheLength:50,createPseudo:I,match:ft,attrHandle:ht?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:y?function(e,t,n){if(typeof t.getElementById!==L&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==L&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==L&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:ct?function(e,t){if(typeof t.getElementsByTagName!==L)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:vt&&function(e,t){if(typeof t.getElementsByName!==L)return t.getElementsByName(name)},CLASS:dt&&function(e,t,n){if(typeof t.getElementsByClassName!==L&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(at,""),e[3]=(e[4]||e[5]||"").replace(at,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||n.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&n.error(e[0]),e},PSEUDO:function(e){var t,n;if(ft.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])tt.test(t)&&(n=u(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:y?function(e){return e=e.replace(at,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace(at,""),function(t){var n=typeof t.getAttributeNode!==L&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace(at,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=R[A][e+" "];return t||(t=new RegExp("(^|"+W+")"+e+"("+W+"|$)"))&&R(e,function(e){return t.test(e.className||typeof e.getAttribute!==L&&e.getAttribute("class")||"")})},ATTR:function(e,t,r){return function(i,s){var o=n.attr(i,e);return o==null?t==="!=":t?(o+="",t==="="?o===r:t==="!="?o!==r:t==="^="?r&&o.indexOf(r)===0:t==="*="?r&&o.indexOf(r)>-1:t==="$="?r&&o.substr(o.length-r.length)===r:t==="~="?(" "+o+" ").indexOf(r)>-1:t==="|="?o===r||o.substr(0,r.length+1)===r+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var r,i=b.pseudos[e]||b.setFilters[e.toLowerCase()]||n.error("unsupported pseudo: "+e);return i[A]?i(t):i.length>1?(r=[e,e,"",t],b.setFilters.hasOwnProperty(e.toLowerCase())?I(function(e,n){var r,s=i(e,t),o=s.length;while(o--)r=F.call(e,s[o]),e[r]=!(n[r]=s[o])}):function(e){return i(e,0,r)}):i}},pseudos:{not:I(function(e){var t=[],n=[],r=x(e.replace(G,"$1"));return r[A]?I(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:I(function(e){return function(t){return n(e,t).length>0}}),contains:I(function(e){return function(t){return(t.textContent||t.innerText||w(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!b.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return ot.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:r("radio"),checkbox:r("checkbox"),file:r("file"),password:r("password"),image:r("image"),submit:i("submit"),reset:i("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return ut.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first: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 r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:s(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},T=_.compareDocumentPosition?function(e,t){return e===t?(N=!0,0):(!e.compareDocumentPosition||!t.compareDocumentPosition?e.compareDocumentPosition:e.compareDocumentPosition(t)&4)?-1:1}:function(e,t){if(e===t)return N=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,r,i=[],s=[],u=e.parentNode,a=t.parentNode,f=u;if(u===a)return o(e,t);if(!u)return-1;if(!a)return 1;while(f)i.unshift(f),f=f.parentNode;f=a;while(f)s.unshift(f),f=f.parentNode;n=i.length,r=s.length;for(var l=0;l<n&&l<r;l++)if(i[l]!==s[l])return o(i[l],s[l]);return l===n?o(e,s[l],-1):o(i[l],t,1)},[0,0].sort(T),k=!N,n.uniqueSort=function(e){var t,n=[],r=1,i=0;N=k,e.sort(T);if(N){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e},n.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},x=n.compile=function(e,t){var n,r=[],i=[],s=z[A][e+" "];if(!s){t||(t=u(e)),n=t.length;while(n--)s=h(t[n]),s[A]?r.push(s):i.push(s);s=z(e,p(i,r))}return s},M.querySelectorAll&&function(){var e,t=v,r=/'|\\/g,i=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,s=[":focus"],o=[":active"],a=_.matchesSelector||_.mozMatchesSelector||_.webkitMatchesSelector||_.oMatchesSelector||_.msMatchesSelector;lt(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||s.push("\\["+W+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||s.push(":checked")}),lt(function(e){e.innerHTML="<p test=''></p>",e.querySelectorAll("[test^='']").length&&s.push("[*^$]="+W+"*(?:\"\"|'')"),e.innerHTML="<input type='hidden'/>",e.querySelectorAll(":enabled").length||s.push(":enabled",":disabled")}),s=new RegExp(s.join("|")),v=function(e,n,i,o,a){if(!o&&!a&&!s.test(e)){var f,l,c=!0,h=A,p=n,d=n.nodeType===9&&e;if(n.nodeType===1&&n.nodeName.toLowerCase()!=="object"){f=u(e),(c=n.getAttribute("id"))?h=c.replace(r,"\\$&"):n.setAttribute("id",h),h="[id='"+h+"'] ",l=f.length;while(l--)f[l]=h+f[l].join("");p=it.test(e)&&n.parentNode||n,d=f.join(",")}if(d)try{return B.apply(i,j.call(p.querySelectorAll(d),0)),i}catch(v){}finally{c||n.removeAttribute("id")}}return t(e,n,i,o,a)},a&&(lt(function(t){e=a.call(t,"div");try{a.call(t,"[test!='']:sizzle"),o.push("!=",K)}catch(n){}}),o=new RegExp(o.join("|")),n.matchesSelector=function(t,r){r=r.replace(i,"='$1']");if(!E(t)&&!o.test(r)&&!s.test(r))try{var u=a.call(t,r);if(u||e||t.document&&t.document.nodeType!==11)return u}catch(f){}return n(r,null,null,[t]).length>0})}(),b.pseudos.nth=b.pseudos.eq,b.filters=m.prototype=b.pseudos,b.setFilters=new m,n.attr=Y.attr,Y.find=n,Y.expr=n.selectors,Y.expr[":"]=Y.expr.pseudos,Y.unique=n.uniqueSort,Y.text=n.getText,Y.isXMLDoc=n.isXML,Y.contains=n.contains}(e);var Pt=/Until$/,Ht=/^(?:parents|prev(?:Until|All))/,Bt=/^.[^:#\[\.,]*$/,jt=Y.expr.match.needsContext,Ft={children:!0,contents:!0,next:!0,prev:!0};Y.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return Y(e).filter(function(){for(t=0,n=u.length;t<n;t++)if(Y.contains(u[t],this))return!0});o=this.pushStack("","find",e);for(t=0,n=this.length;t<n;t++){r=o.length,Y.find(e,this[t],o);if(t>0)for(i=r;i<o.length;i++)for(s=0;s<r;s++)if(o[s]===o[i]){o.splice(i--,1);break}}return o},has:function(e){var t,n=Y(e,this),r=n.length;return this.filter(function(){for(t=0;t<r;t++)if(Y.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(f(this,e,!1),"not",e)},filter:function(e){return this.pushStack(f(this,e,!0),"filter",e)},is:function(e){return!!e&&(typeof e=="string"?jt.test(e)?Y(e,this.context).index(this[0])>=0:Y.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=jt.test(e)||typeof e!="string"?Y(e,t||this.context):0;for(;r<i;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&n.nodeType!==11){if(o?o.index(n)>-1:Y.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?Y.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?Y.inArray(this[0],Y(e)):Y.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?Y(e,t):Y.makeArray(e&&e.nodeType?[e]:e),r=Y.merge(this.get(),n);return this.pushStack(u(n[0])||u(r[0])?r:Y.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),Y.fn.andSelf=Y.fn.addBack,Y.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return Y.dir(e,"parentNode")},parentsUntil:function(e,t,n){return Y.dir(e,"parentNode",n)},next:function(e){return a(e,"nextSibling")},prev:function(e){return a(e,"previousSibling")},nextAll:function(e){return Y.dir(e,"nextSibling")},prevAll:function(e){return Y.dir(e,"previousSibling")},nextUntil:function(e,t,n){return Y.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return Y.dir(e,"previousSibling",n)},siblings:function(e){return Y.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return Y.sibling(e.firstChild)},contents:function(e){return Y.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:Y.merge([],e.childNodes)}},function(e,t){Y.fn[e]=function(n,r){var i=Y.map(this,t,n);return Pt.test(e)||(r=n),r&&typeof r=="string"&&(i=Y.filter(r,i)),i=this.length>1&&!Ft[e]?Y.unique(i):i,this.length>1&&Ht.test(e)&&(i=i.reverse()),this.pushStack(i,e,$.call(arguments).join(","))}}),Y.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?Y.find.matchesSelector(t[0],e)?[t[0]]:[]:Y.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!Y(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var It="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",qt=/ jQuery\d+="(?:null|\d+)"/g,Rt=/^\s+/,Ut=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,zt=/<([\w:]+)/,Wt=/<tbody/i,Xt=/<|&#?\w+;/,Vt=/<(?:script|style|link)/i,$t=/<(?:script|object|embed|option|style)/i,Jt=new RegExp("<(?:"+It+")[\\s/>]","i"),Kt=/^(?:checkbox|radio)$/,Qt=/checked\s*(?:[^=]|=\s*.checked.)/i,Gt=/\/(java|ecma)script/i,Yt=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,Zt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},en=l(R),tn=en.appendChild(R.createElement("div"));Zt.optgroup=Zt.option,Zt.tbody=Zt.tfoot=Zt.colgroup=Zt.caption=Zt.thead,Zt.th=Zt.td,Y.support.htmlSerialize||(Zt._default=[1,"X<div>","</div>"]),Y.fn.extend({text:function(e){return Y.access(this,function(e){return e===t?Y.text(this):this.empty().append((this[0]&&this[0].ownerDocument||R).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(Y.isFunction(e))return this.each(function(t){Y(this).wrapAll(e.call(this,t))});if(this[0]){var t=Y(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return Y.isFunction(e)?this.each(function(t){Y(this).wrapInner(e.call(this,t))}):this.each(function(){var t=Y(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=Y.isFunction(e);return this.each(function(n){Y(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){Y.nodeName(this,"body")||Y(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!u(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=Y.clean(arguments);return this.pushStack(Y.merge(e,this),"before",this.selector)}},after:function(){if(!u(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=Y.clean(arguments);return this.pushStack(Y.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||Y.filter(e,[n]).length)!t&&n.nodeType===1&&(Y.cleanData(n.getElementsByTagName("*")),Y.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&Y.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return Y.clone(this,e,t)})},html:function(e){return Y.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(qt,""):t;if(typeof e=="string"&&!Vt.test(e)&&(Y.support.htmlSerialize||!Jt.test(e))&&(Y.support.leadingWhitespace||!Rt.test(e))&&!Zt[(zt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(Ut,"<$1></$2>");try{for(;r<i;r++)n=this[r]||{},n.nodeType===1&&(Y.cleanData(n.getElementsByTagName("*")),n.innerHTML=e);n=0}catch(s){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return u(this[0])?this.length?this.pushStack(Y(Y.isFunction(e)?e():e),"replaceWith",e):this:Y.isFunction(e)?this.each(function(t){var n=Y(this),r=n.html();n.replaceWith(e.call(this,t,r))}):(typeof e!="string"&&(e=Y(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;Y(this).remove(),t?Y(t).before(e):Y(n).append(e)}))},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=[].concat.apply([],e);var i,s,o,u,a=0,f=e[0],l=[],h=this.length;if(!Y.support.checkClone&&h>1&&typeof f=="string"&&Qt.test(f))return this.each(function(){Y(this).domManip(e,n,r)});if(Y.isFunction(f))return this.each(function(i){var s=Y(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=Y.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&Y.nodeName(s,"tr");for(u=i.cacheable||h-1;a<h;a++)r.call(n&&Y.nodeName(this[a],"table")?c(this[a],"tbody"):this[a],a===u?o:Y.clone(o,!0,!0))}o=s=null,l.length&&Y.each(l,function(e,t){t.src?Y.ajax?Y.ajax({url:t.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):Y.error("no ajax"):Y.globalEval((t.text||t.textContent||t.innerHTML||"").replace(Yt,"")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),Y.buildFragment=function(e,n,r){var i,s,o,u=e[0];return n=n||R,n=!n.nodeType&&n[0]||n,n=n.ownerDocument||n,e.length===1&&typeof u=="string"&&u.length<512&&n===R&&u.charAt(0)==="<"&&!$t.test(u)&&(Y.support.checkClone||!Qt.test(u))&&(Y.support.html5Clone||!Jt.test(u))&&(s=!0,i=Y.fragments[u],o=i!==t),i||(i=n.createDocumentFragment(),Y.clean(e,n,i,r),s&&(Y.fragments[u]=o&&i)),{fragment:i,cacheable:s}},Y.fragments={},Y.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){Y.fn[e]=function(n){var r,i=0,s=[],o=Y(n),u=o.length,a=this.length===1&&this[0].parentNode;if((a==null||a&&a.nodeType===11&&a.childNodes.length===1)&&u===1)return o[t](this[0]),this;for(;i<u;i++)r=(i>0?this.clone(!0):this).get(),Y(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),Y.extend({clone:function(e,t,n){var r,i,s,o;Y.support.html5Clone||Y.isXMLDoc(e)||!Jt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(tn.innerHTML=e.outerHTML,tn.removeChild(o=tn.firstChild));if((!Y.support.noCloneEvent||!Y.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!Y.isXMLDoc(e)){p(e,o),r=d(e),i=d(o);for(s=0;r[s];++s)i[s]&&p(r[s],i[s])}if(t){h(e,o);if(n){r=d(e),i=d(o);for(s=0;r[s];++s)h(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var i,s,o,u,a,f,c,h,p,d,m,g,y=t===R&&en,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=R;for(i=0;(o=e[i])!=null;i++){typeof o=="number"&&(o+="");if(!o)continue;if(typeof o=="string")if(!Xt.test(o))o=t.createTextNode(o);else{y=y||l(t),c=t.createElement("div"),y.appendChild(c),o=o.replace(Ut,"<$1></$2>"),u=(zt.exec(o)||["",""])[1].toLowerCase(),a=Zt[u]||Zt._default,f=a[0],c.innerHTML=a[1]+o+a[2];while(f--)c=c.lastChild;if(!Y.support.tbody){h=Wt.test(o),p=u==="table"&&!h?c.firstChild&&c.firstChild.childNodes:a[1]==="<table>"&&!h?c.childNodes:[];for(s=p.length-1;s>=0;--s)Y.nodeName(p[s],"tbody")&&!p[s].childNodes.length&&p[s].parentNode.removeChild(p[s])}!Y.support.leadingWhitespace&&Rt.test(o)&&c.insertBefore(t.createTextNode(Rt.exec(o)[0]),c.firstChild),o=c.childNodes,c.parentNode.removeChild(c)}o.nodeType?b.push(o):Y.merge(b,o)}c&&(o=c=y=null);if(!Y.support.appendChecked)for(i=0;(o=b[i])!=null;i++)Y.nodeName(o,"input")?v(o):typeof o.getElementsByTagName!="undefined"&&Y.grep(o.getElementsByTagName("input"),v);if(n){m=function(e){if(!e.type||Gt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(i=0;(o=b[i])!=null;i++)if(!Y.nodeName(o,"script")||!m(o))n.appendChild(o),typeof o.getElementsByTagName!="undefined"&&(g=Y.grep(Y.merge([],o.getElementsByTagName("script")),m),b.splice.apply(b,[i+1,0].concat(g)),i+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=Y.expando,a=Y.cache,f=Y.support.deleteExpando,l=Y.event.special;for(;(i=e[o])!=null;o++)if(t||Y.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?Y.event.remove(i,s):Y.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,Y.deletedIds.push(r))}}}}),function(){var e,t;Y.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=Y.uaMatch(z.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),Y.browser=t,Y.sub=function(){function e(t,n){return new e.fn.init(t,n)}Y.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(n,r){return r&&r instanceof Y&&!(r instanceof e)&&(r=e(r)),Y.fn.init.call(this,n,r,t)},e.fn.init.prototype=e.fn;var t=e(R);return e}}();var nn,rn,sn,on=/alpha\([^)]*\)/i,un=/opacity=([^)]*)/,an=/^(top|right|bottom|left)$/,fn=/^(none|table(?!-c[ea]).+)/,ln=/^margin/,cn=new RegExp("^("+Z+")(.*)$","i"),hn=new RegExp("^("+Z+")(?!px)[a-z%]+$","i"),pn=new RegExp("^([-+])=("+Z+")","i"),dn={BODY:"block"},vn={position:"absolute",visibility:"hidden",display:"block"},mn={letterSpacing:0,fontWeight:400},gn=["Top","Right","Bottom","Left"],yn=["Webkit","O","Moz","ms"],bn=Y.fn.toggle;Y.fn.extend({css:function(e,n){return Y.access(this,function(e,n,r){return r!==t?Y.style(e,n,r):Y.css(e,n)},e,n,arguments.length>1)},show:function(){return y(this,!0)},hide:function(){return y(this)},toggle:function(e,t){var n=typeof e=="boolean";return Y.isFunction(e)&&Y.isFunction(t)?bn.apply(this,arguments):this.each(function(){(n?e:g(this))?Y(this).show():Y(this).hide()})}}),Y.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=nn(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":Y.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=Y.camelCase(n),f=e.style;n=Y.cssProps[a]||(Y.cssProps[a]=m(f,a)),u=Y.cssHooks[n]||Y.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=pn.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(Y.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!Y.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=Y.camelCase(n);return n=Y.cssProps[a]||(Y.cssProps[a]=m(e.style,a)),u=Y.cssHooks[n]||Y.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=nn(e,n)),s==="normal"&&n in mn&&(s=mn[n]),r||i!==t?(o=parseFloat(s),r||Y.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?nn=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!Y.contains(t.ownerDocument,t)&&(r=Y.style(t,n)),hn.test(r)&&ln.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:R.documentElement.currentStyle&&(nn=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),hn.test(i)&&!an.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),Y.each(["height","width"],function(e,t){Y.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&fn.test(nn(e,"display"))?Y.swap(e,vn,function(){return E(e,t,r)}):E(e,t,r)},set:function(e,n,r){return b(e,n,r?w(e,t,r,Y.support.boxSizing&&Y.css(e,"boxSizing")==="border-box"):0)}}}),Y.support.opacity||(Y.cssHooks.opacity={get:function(e,t){return un.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=Y.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&Y.trim(s.replace(on,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=on.test(s)?s.replace(on,i):s+" "+i}}),Y(function(){Y.support.reliableMarginRight||(Y.cssHooks.marginRight={get:function(e,t){return Y.swap(e,{display:"inline-block"},function(){if(t)return nn(e,"marginRight")})}}),!Y.support.pixelPosition&&Y.fn.position&&Y.each(["top","left"],function(e,t){Y.cssHooks[t]={get:function(e,n){if(n){var r=nn(e,t);return hn.test(r)?Y(e).position()[t]+"px":r}}}})}),Y.expr&&Y.expr.filters&&(Y.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!Y.support.reliableHiddenOffsets&&(e.style&&e.style.display||nn(e,"display"))==="none"},Y.expr.filters.visible=function(e){return!Y.expr.filters.hidden(e)}),Y.each({margin:"",padding:"",border:"Width"},function(e,t){Y.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+gn[r]+t]=i[r]||i[r-2]||i[0];return s}},ln.test(e)||(Y.cssHooks[e+t].set=b)});var wn=/%20/g,En=/\[\]$/,Sn=/\r?\n/g,xn=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Tn=/^(?:select|textarea)/i;Y.fn.extend({serialize:function(){return Y.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?Y.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||Tn.test(this.nodeName)||xn.test(this.type))}).map(function(e,t){var n=Y(this).val();return n==null?null:Y.isArray(n)?Y.map(n,function(e,n){return{name:t.name,value:e.replace(Sn,"\r\n")}}):{name:t.name,value:n.replace(Sn,"\r\n")}}).get()}}),Y.param=function(e,n){var r,i=[],s=function(e,t){t=Y.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=Y.ajaxSettings&&Y.ajaxSettings.traditional);if(Y.isArray(e)||e.jquery&&!Y.isPlainObject(e))Y.each(e,function(){s(this.name,this.value)});else for(r in e)x(r,e[r],n,s);return i.join("&").replace(wn,"+")};var Nn,Cn,kn=/#.*$/,Ln=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,An=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,On=/^(?:GET|HEAD)$/,Mn=/^\/\//,_n=/\?/,Dn=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,Pn=/([?&])_=[^&]*/,Hn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Bn=Y.fn.load,jn={},Fn={},In=["*/"]+["*"];try{Cn=U.href}catch(qn){Cn=R.createElement("a"),Cn.href="",Cn=Cn.href}Nn=Hn.exec(Cn.toLowerCase())||[],Y.fn.load=function(e,n,r){if(typeof e!="string"&&Bn)return Bn.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),Y.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),Y.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?Y("<div>").append(e.replace(Dn,"")).find(i):e)}),this},Y.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){Y.fn[t]=function(e){return this.on(t,e)}}),Y.each(["get","post"],function(e,n){Y[n]=function(e,r,i,s){return Y.isFunction(r)&&(s=s||i,i=r,r=t),Y.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),Y.extend({getScript:function(e,n){return Y.get(e,t,n,"script")},getJSON:function(e,t,n){return Y.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?C(e,Y.ajaxSettings):(t=e,e=Y.ajaxSettings),C(e,t),e},ajaxSettings:{url:Cn,isLocal:An.test(Nn[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":In},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":Y.parseJSON,"text xml":Y.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:T(jn),ajaxTransport:T(Fn),ajax:function(e,n){function r(e,n,r,o){var f,c,y,b,E,x=n;if(w===2)return;w=2,a&&clearTimeout(a),u=t,s=o||"",S.readyState=e>0?4:0,r&&(b=k(h,S,r));if(e>=200&&e<300||e===304)h.ifModified&&(E=S.getResponseHeader("Last-Modified"),E&&(Y.lastModified[i]=E),E=S.getResponseHeader("Etag"),E&&(Y.etag[i]=E)),e===304?(x="notmodified",f=!0):(f=L(h,b),x=f.state,c=f.data,y=f.error,f=!y);else{y=x;if(!x||e)x="error",e<0&&(e=0)}S.status=e,S.statusText=(n||x)+"",f?v.resolveWith(p,[c,x,S]):v.rejectWith(p,[S,x,y]),S.statusCode(g),g=t,l&&d.trigger("ajax"+(f?"Success":"Error"),[S,h,f?c:y]),m.fireWith(p,[S,x]),l&&(d.trigger("ajaxComplete",[S,h]),--Y.active||Y.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var i,s,o,u,a,f,l,c,h=Y.ajaxSetup({},n),p=h.context||h,d=p!==h&&(p.nodeType||p instanceof Y)?Y(p):Y.event,v=Y.Deferred(),m=Y.Callbacks("once memory"),g=h.statusCode||{},y={},b={},w=0,E="canceled",S={readyState:0,setRequestHeader:function(e,t){if(!w){var n=e.toLowerCase();e=b[n]=b[n]||e,y[e]=t}return this},getAllResponseHeaders:function(){return w===2?s:null},getResponseHeader:function(e){var n;if(w===2){if(!o){o={};while(n=Ln.exec(s))o[n[1].toLowerCase()]=n[2]}n=o[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return w||(h.mimeType=e),this},abort:function(e){return e=e||E,u&&u.abort(e),r(0,e),this}};v.promise(S),S.success=S.done,S.error=S.fail,S.complete=m.add,S.statusCode=function(e){if(e){var t;if(w<2)for(t in e)g[t]=[g[t],e[t]];else t=e[S.status],S.always(t)}return this},h.url=((e||h.url)+"").replace(kn,"").replace(Mn,Nn[1]+"//"),h.dataTypes=Y.trim(h.dataType||"*").toLowerCase().split(tt),h.crossDomain==null&&(f=Hn.exec(h.url.toLowerCase()),h.crossDomain=!(!f||f[1]===Nn[1]&&f[2]===Nn[2]&&(f[3]||(f[1]==="http:"?80:443))==(Nn[3]||(Nn[1]==="http:"?80:443)))),h.data&&h.processData&&typeof h.data!="string"&&(h.data=Y.param(h.data,h.traditional)),N(jn,h,n,S);if(w===2)return S;l=h.global,h.type=h.type.toUpperCase(),h.hasContent=!On.test(h.type),l&&Y.active++===0&&Y.event.trigger("ajaxStart");if(!h.hasContent){h.data&&(h.url+=(_n.test(h.url)?"&":"?")+h.data,delete h.data),i=h.url;if(h.cache===!1){var x=Y.now(),T=h.url.replace(Pn,"$1_="+x);h.url=T+(T===h.url?(_n.test(h.url)?"&":"?")+"_="+x:"")}}(h.data&&h.hasContent&&h.contentType!==!1||n.contentType)&&S.setRequestHeader("Content-Type",h.contentType),h.ifModified&&(i=i||h.url,Y.lastModified[i]&&S.setRequestHeader("If-Modified-Since",Y.lastModified[i]),Y.etag[i]&&S.setRequestHeader("If-None-Match",Y.etag[i])),S.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+(h.dataTypes[0]!=="*"?", "+In+"; q=0.01":""):h.accepts["*"]);for(c in h.headers)S.setRequestHeader(c,h.headers[c]);if(!h.beforeSend||h.beforeSend.call(p,S,h)!==!1&&w!==2){E="abort";for(c in{success:1,error:1,complete:1})S[c](h[c]);u=N(Fn,h,n,S);if(!u)r(-1,"No Transport");else{S.readyState=1,l&&d.trigger("ajaxSend",[S,h]),h.async&&h.timeout>0&&(a=setTimeout(function(){S.abort("timeout")},h.timeout));try{w=1,u.send(y,r)}catch(C){if(!(w<2))throw C;r(-1,C)}}return S}return S.abort()},active:0,lastModified:{},etag:{}});var Rn=[],Un=/\?/,zn=/(=)\?(?=&|$)|\?\?/,Wn=Y.now();Y.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Rn.pop()||Y.expando+"_"+Wn++;return this[e]=!0,e}}),Y.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&zn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&zn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=Y.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(zn,"$1"+s):h?n.data=a.replace(zn,"$1"+s):l&&(n.url+=(Un.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||Y.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Rn.push(s)),u&&Y.isFunction(o)&&o(u[0]),u=o=t}),"script"}),Y.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return Y.globalEval(e),e}}}),Y.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),Y.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=R.head||R.getElementsByTagName("head")[0]||R.documentElement;return{send:function(i,s){n=R.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||s(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Xn,Vn=e.ActiveXObject?function(){for(var e in Xn)Xn[e](0,1)}:!1,$n=0;Y.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&A()||O()}:A,function(e){Y.extend(Y.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(Y.ajaxSettings.xhr()),Y.support.ajax&&Y.ajaxTransport(function(n){if(!n.crossDomain||Y.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=Y.noop,Vn&&delete Xn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++$n,Vn&&(Xn||(Xn={},Y(e).unload(Vn)),Xn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var Jn,Kn,Qn=/^(?:toggle|show|hide)$/,Gn=new RegExp("^(?:([-+])=|)("+Z+")([a-z%]*)$","i"),Yn=/queueHooks$/,Zn=[H],er={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=Gn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(Y.cssNumber[e]?"":"px");if(r!=="px"&&u){u=Y.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,Y.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};Y.Animation=Y.extend(D,{tweener:function(e,t){Y.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r<i;r++)n=e[r],er[n]=er[n]||[],er[n].unshift(t)},prefilter:function(e,t){t?Zn.unshift(e):Zn.push(e)}}),Y.Tween=B,B.prototype={constructor:B,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(Y.cssNumber[n]?"":"px")},cur:function(){var e=B.propHooks[this.prop];return e&&e.get?e.get(this):B.propHooks._default.get(this)},run:function(e){var t,n=B.propHooks[this.prop];return this.options.duration?this.pos=t=Y.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):B.propHooks._default.set(this),this}},B.prototype.init.prototype=B.prototype,B.propHooks={_default:{get:function(e){var t;return e.elem[e.prop]==null||!!e.elem.style&&e.elem.style[e.prop]!=null?(t=Y.css(e.elem,e.prop,!1,""),!t||t==="auto"?0:t):e.elem[e.prop]},set:function(e){Y.fx.step[e.prop]?Y.fx.step[e.prop](e):e.elem.style&&(e.elem.style[Y.cssProps[e.prop]]!=null||Y.cssHooks[e.prop])?Y.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},B.propHooks.scrollTop=B.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},Y.each(["toggle","show","hide"],function(e,t){var n=Y.fn[t];Y.fn[t]=function(r,i,s){return r==null||typeof r=="boolean"||!e&&Y.isFunction(r)&&Y.isFunction(i)?n.apply(this,arguments):this.animate(j(t,!0),r,i,s)}}),Y.fn.extend({fadeTo:function(e,t,n,r){return this.filter(g).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=Y.isEmptyObject(e),s=Y.speed(t,n,r),o=function(){var t=D(this,Y.extend({},e),s);i&&t.stop(!0)};return i||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return typeof e!="string"&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=e!=null&&e+"queueHooks",s=Y.timers,o=Y._data(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(n in o)o[n]&&o[n].stop&&Yn.test(n)&&i(o[n]);for(n=s.length;n--;)s[n].elem===this&&(e==null||s[n].queue===e)&&(s[n].anim.stop(r),t=!1,s.splice(n,1));(t||!r)&&Y.dequeue(this,e)})}}),Y.each({slideDown:j("show"),slideUp:j("hide"),slideToggle:j("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){Y.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),Y.speed=function(e,t,n){var r=e&&typeof e=="object"?Y.extend({},e):{complete:n||!n&&t||Y.isFunction(e)&&e,duration:e,easing:n&&t||t&&!Y.isFunction(t)&&t};r.duration=Y.fx.off?0:typeof r.duration=="number"?r.duration:r.duration in Y.fx.speeds?Y.fx.speeds[r.duration]:Y.fx.speeds._default;if(r.queue==null||r.queue===!0)r.queue="fx";return r.old=r.complete,r.complete=function(){Y.isFunction(r.old)&&r.old.call(this),r.queue&&Y.dequeue(this,r.queue)},r},Y.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},Y.timers=[],Y.fx=B.prototype.init,Y.fx.tick=function(){var e,n=Y.timers,r=0;Jn=Y.now();for(;r<n.length;r++)e=n[r],!e()&&n[r]===e&&n.splice(r--,1);n.length||Y.fx.stop(),Jn=t},Y.fx.timer=function(e){e()&&Y.timers.push(e)&&!Kn&&(Kn=setInterval(Y.fx.tick,Y.fx.interval))},Y.fx.interval=13,Y.fx.stop=function(){clearInterval(Kn),Kn=null},Y.fx.speeds={slow:600,fast:200,_default:400},Y.fx.step={},Y.expr&&Y.expr.filters&&(Y.expr.filters.animated=function(e){return Y.grep(Y.timers,function(t){return e===t.elem}).length});var tr=/^(?:body|html)$/i;Y.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){Y.offset.setOffset(this,e,t)});var n,r,i,s,o,u,a,f={top:0,left:0},l=this[0],c=l&&l.ownerDocument;if(!c)return;return(r=c.body)===l?Y.offset.bodyOffset(l):(n=c.documentElement,Y.contains(n,l)?(typeof l.getBoundingClientRect!="undefined"&&(f=l.getBoundingClientRect()),i=F(c),s=n.clientTop||r.clientTop||0,o=n.clientLeft||r.clientLeft||0,u=i.pageYOffset||n.scrollTop,a=i.pageXOffset||n.scrollLeft,{top:f.top+u-s,left:f.left+a-o}):f)},Y.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft;return Y.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(Y.css(e,"marginTop"))||0,n+=parseFloat(Y.css(e,"marginLeft"))||0),{top:t,left:n}},setOffset:function(e,t,n){var r=Y.css(e,"position");r==="static"&&(e.style.position="relative");var i=Y(e),s=i.offset(),o=Y.css(e,"top"),u=Y.css(e,"left"),a=(r==="absolute"||r==="fixed")&&Y.inArray("auto",[o,u])>-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),Y.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},Y.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=tr.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(Y.css(e,"marginTop"))||0,n.left-=parseFloat(Y.css(e,"marginLeft"))||0,r.top+=parseFloat(Y.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(Y.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||R.body;while(e&&!tr.test(e.nodeName)&&Y.css(e,"position")==="static")e=e.offsetParent;return e||R.body})}}),Y.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);Y.fn[e]=function(i){return Y.access(this,function(e,i,s){var o=F(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?Y(o).scrollLeft():s,r?s:Y(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),Y.each({Height:"height",Width:"width"},function(e,n){Y.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){Y.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return Y.access(this,function(n,r,i){var s;return Y.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?Y.css(n,r,i,u):Y.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=Y,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return Y})})(window);(function(e,t){function n(t,n){var i,s,o,u=t.nodeName.toLowerCase();return"area"===u?(i=t.parentNode,s=i.name,t.href&&s&&"map"===i.nodeName.toLowerCase()?(o=e("img[usemap=#"+s+"]")[0],!!o&&r(o)):!1):(/input|select|textarea|button|object/.test(u)?!t.disabled:"a"===u?t.href||n:n)&&r(t)}function r(t){return e.expr.filters.visible(t)&&!e(t).parents().andSelf().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var i=0,s=/^ui-id-\d+$/;e.ui=e.ui||{},e.ui.version||(e.extend(e.ui,{version:"1.9.2",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({_focus:e.fn.focus,focus:function(t,n){return"number"==typeof t?this.each(function(){var r=this;setTimeout(function(){e(r).focus(),n&&n.call(r)},t)}):this._focus.apply(this,arguments)},scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(n){if(n!==t)return this.css("zIndex",n);if(this.length)for(var r,i,s=e(this[0]);s.length&&s[0]!==document;){if(r=s.css("position"),("absolute"===r||"relative"===r||"fixed"===r)&&(i=parseInt(s.css("zIndex"),10),!isNaN(i)&&0!==i))return i;s=s.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++i)})},removeUniqueId:function(){return this.each(function(){s.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,r){return!!e.data(t,r[3])},focusable:function(t){return n(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var r=e.attr(t,"tabindex"),i=isNaN(r);return(i||r>=0)&&n(t,!i)}}),e(function(){var t=document.body,n=t.appendChild(n=document.createElement("div"));n.offsetHeight,e.extend(n.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),e.support.minHeight=100===n.offsetHeight,e.support.selectstart="onselectstart"in n,t.removeChild(n).style.display="none"}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(n,r){function i(t,n,r,i){return e.each(s,function(){n-=parseFloat(e.css(t,"padding"+this))||0,r&&(n-=parseFloat(e.css(t,"border"+this+"Width"))||0),i&&(n-=parseFloat(e.css(t,"margin"+this))||0)}),n}var s="Width"===r?["Left","Right"]:["Top","Bottom"],o=r.toLowerCase(),u={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+r]=function(n){return n===t?u["inner"+r].call(this):this.each(function(){e(this).css(o,i(this,n)+"px")})},e.fn["outer"+r]=function(t,n){return"number"!=typeof t?u["outer"+r].call(this,t):this.each(function(){e(this).css(o,i(this,t,!0,n)+"px")})}}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(n){return arguments.length?t.call(this,e.camelCase(n)):t.call(this)}}(e.fn.removeData)),function(){var t=/msie ([\w.]+)/.exec(navigator.userAgent.toLowerCase())||[];e.ui.ie=t.length?!0:!1,e.ui.ie6=6===parseFloat(t[1],10)}(),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,n,r){var i,s=e.ui[t].prototype;for(i in r)s.plugins[i]=s.plugins[i]||[],s.plugins[i].push([n,r[i]])},call:function(e,t,n){var r,i=e.plugins[t];if(i&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(r=0;i.length>r;r++)e.options[i[r][0]]&&i[r][1].apply(e.element,n)}},contains:e.contains,hasScroll:function(t,n){if("hidden"===e(t).css("overflow"))return!1;var r=n&&"left"===n?"scrollLeft":"scrollTop",i=!1;return t[r]>0?!0:(t[r]=1,i=t[r]>0,t[r]=0,i)},isOverAxis:function(e,t,n){return e>t&&t+n>e},isOver:function(t,n,r,i,s,o){return e.ui.isOverAxis(t,r,s)&&e.ui.isOverAxis(n,i,o)}}))})(jQuery);(function(e,t){var n=0,r=Array.prototype.slice,i=e.cleanData;e.cleanData=function(t){for(var n,r=0;null!=(n=t[r]);r++)try{e(n).triggerHandler("remove")}catch(o){}i(t)},e.widget=function(n,r,i){var s,o,u,a,f=n.split(".")[0];n=n.split(".")[1],s=f+"-"+n,i||(i=r,r=e.Widget),e.expr[":"][s.toLowerCase()]=function(t){return!!e.data(t,s)},e[f]=e[f]||{},o=e[f][n],u=e[f][n]=function(e,n){return this._createWidget?(arguments.length&&this._createWidget(e,n),t):new u(e,n)},e.extend(u,o,{version:i.version,_proto:e.extend({},i),_childConstructors:[]}),a=new r,a.options=e.widget.extend({},a.options),e.each(i,function(t,n){e.isFunction(n)&&(i[t]=function(){var e=function(){return r.prototype[t].apply(this,arguments)},i=function(e){return r.prototype[t].apply(this,e)};return function(){var t,r=this._super,s=this._superApply;return this._super=e,this._superApply=i,t=n.apply(this,arguments),this._super=r,this._superApply=s,t}}())}),u.prototype=e.widget.extend(a,{widgetEventPrefix:o?a.widgetEventPrefix:n},i,{constructor:u,namespace:f,widgetName:n,widgetBaseClass:s,widgetFullName:s}),o?(e.each(o._childConstructors,function(t,n){var r=n.prototype;e.widget(r.namespace+"."+r.widgetName,u,n._proto)}),delete o._childConstructors):r._childConstructors.push(u),e.widget.bridge(n,u)},e.widget.extend=function(n){for(var i,s,o=r.call(arguments,1),u=0,f=o.length;f>u;u++)for(i in o[u])s=o[u][i],o[u].hasOwnProperty(i)&&s!==t&&(n[i]=e.isPlainObject(s)?e.isPlainObject(n[i])?e.widget.extend({},n[i],s):e.widget.extend({},s):s);return n},e.widget.bridge=function(n,i){var s=i.prototype.widgetFullName||n;e.fn[n]=function(o){var u="string"==typeof o,f=r.call(arguments,1),l=this;return o=!u&&f.length?e.widget.extend.apply(null,[o].concat(f)):o,u?this.each(function(){var r,i=e.data(this,s);return i?e.isFunction(i[o])&&"_"!==o.charAt(0)?(r=i[o].apply(i,f),r!==i&&r!==t?(l=r&&r.jquery?l.pushStack(r.get()):r,!1):t):e.error("no such method '"+o+"' for "+n+" widget instance"):e.error("cannot call methods on "+n+" prior to initialization; "+"attempted to call method '"+o+"'")}):this.each(function(){var t=e.data(this,s);t?t.option(o||{})._init():e.data(this,s,new i(o,this))}),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,r){r=e(r||this.defaultElement||this)[0],this.element=e(r),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),r!==this&&(e.data(r,this.widgetName,this),e.data(r,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===r&&this.destroy()}}),this.document=e(r.style?r.ownerDocument:r.document||r),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(n,r){var i,s,o,u=n;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof n)if(u={},i=n.split("."),n=i.shift(),i.length){for(s=u[n]=e.widget.extend({},this.options[n]),o=0;i.length-1>o;o++)s[i[o]]=s[i[o]]||{},s=s[i[o]];if(n=i.pop(),r===t)return s[n]===t?null:s[n];s[n]=r}else{if(r===t)return this.options[n]===t?null:this.options[n];u[n]=r}return this._setOptions(u),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(n,r,i){var s,o=this;"boolean"!=typeof n&&(i=r,r=n,n=!1),i?(r=s=e(r),this.bindings=this.bindings.add(r)):(i=r,r=this.element,s=this.widget()),e.each(i,function(i,u){function f(){return n||o.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof u?o[u]:u).apply(o,arguments):t}"string"!=typeof u&&(f.guid=u.guid=u.guid||f.guid||e.guid++);var l=i.match(/^(\w+)\s*(.*)$/),c=l[1]+o.eventNamespace,h=l[2];h?s.delegate(h,c,f):r.bind(c,f)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function n(){return("string"==typeof e?r[e]:e).apply(r,arguments)}var r=this;return setTimeout(n,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,n,r){var i,s,o=this.options[t];if(r=r||{},n=e.Event(n),n.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),n.target=this.element[0],s=n.originalEvent)for(i in s)i in n||(n[i]=s[i]);return this.element.trigger(n,r),!(e.isFunction(o)&&o.apply(this.element[0],[n].concat(r))===!1||n.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,n){e.Widget.prototype["_"+t]=function(r,i,s){"string"==typeof i&&(i={effect:i});var o,u=i?i===!0||"number"==typeof i?n:i.effect||n:t;i=i||{},"number"==typeof i&&(i={duration:i}),o=!e.isEmptyObject(i),i.complete=s,i.delay&&r.delay(i.delay),o&&e.effects&&(e.effects.effect[u]||e.uiBackCompat!==!1&&e.effects[u])?r[t](i):u!==t&&r[u]?r[u](i.duration,i.easing,s):r.queue(function(n){e(this)[t](),s&&s.call(r[0]),n()})}}),e.uiBackCompat!==!1&&(e.Widget.prototype._getCreateOptions=function(){return e.metadata&&e.metadata.get(this.element[0])[this.widgetName]})})(jQuery);(function(e){var t=!1;e(document).mouseup(function(){t=!1}),e.widget("ui.mouse",{version:"1.9.2",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(n){return!0===e.data(n.target,t.widgetName+".preventClickEvent")?(e.removeData(n.target,t.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(n){if(!t){this._mouseStarted&&this._mouseUp(n),this._mouseDownEvent=n;var r=this,i=1===n.which,s="string"==typeof this.options.cancel&&n.target.nodeName?e(n.target).closest(this.options.cancel).length:!1;return i&&!s&&this._mouseCapture(n)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){r.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(n)&&this._mouseDelayMet(n)&&(this._mouseStarted=this._mouseStart(n)!==!1,!this._mouseStarted)?(n.preventDefault(),!0):(!0===e.data(n.target,this.widgetName+".preventClickEvent")&&e.removeData(n.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return r._mouseMove(e)},this._mouseUpDelegate=function(e){return r._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),n.preventDefault(),t=!0,!0)):!0}},_mouseMove:function(t){return!e.ui.ie||document.documentMode>=9||t.button?this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted):this._mouseUp(t)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);(function(e,t){function n(e,t,n){return[parseInt(e[0],10)*(h.test(e[0])?t/100:1),parseInt(e[1],10)*(h.test(e[1])?n/100:1)]}function r(t,n){return parseInt(e.css(t,n),10)||0}e.ui=e.ui||{};var i,s=Math.max,o=Math.abs,u=Math.round,a=/left|center|right/,f=/top|center|bottom/,l=/[\+\-]\d+%?/,c=/^\w+/,h=/%$/,p=e.fn.position;e.position={scrollbarWidth:function(){if(i!==t)return i;var n,r,s=e("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=s.children()[0];return e("body").append(s),n=o.offsetWidth,s.css("overflow","scroll"),r=o.offsetWidth,n===r&&(r=s[0].clientWidth),s.remove(),i=n-r},getScrollInfo:function(t){var n=t.isWindow?"":t.element.css("overflow-x"),r=t.isWindow?"":t.element.css("overflow-y"),i="scroll"===n||"auto"===n&&t.width<t.element[0].scrollWidth,s="scroll"===r||"auto"===r&&t.height<t.element[0].scrollHeight;return{width:i?e.position.scrollbarWidth():0,height:s?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var n=e(t||window),r=e.isWindow(n[0]);return{element:n,isWindow:r,offset:n.offset()||{left:0,top:0},scrollLeft:n.scrollLeft(),scrollTop:n.scrollTop(),width:r?n.width():n.outerWidth(),height:r?n.height():n.outerHeight()}}},e.fn.position=function(t){if(!t||!t.of)return p.apply(this,arguments);t=e.extend({},t);var i,h,v,m,g,y=e(t.of),b=e.position.getWithinInfo(t.within),w=e.position.getScrollInfo(b),E=y[0],S=(t.collision||"flip").split(" "),x={};return 9===E.nodeType?(h=y.width(),v=y.height(),m={top:0,left:0}):e.isWindow(E)?(h=y.width(),v=y.height(),m={top:y.scrollTop(),left:y.scrollLeft()}):E.preventDefault?(t.at="left top",h=v=0,m={top:E.pageY,left:E.pageX}):(h=y.outerWidth(),v=y.outerHeight(),m=y.offset()),g=e.extend({},m),e.each(["my","at"],function(){var e,n,r=(t[this]||"").split(" ");1===r.length&&(r=a.test(r[0])?r.concat(["center"]):f.test(r[0])?["center"].concat(r):["center","center"]),r[0]=a.test(r[0])?r[0]:"center",r[1]=f.test(r[1])?r[1]:"center",e=l.exec(r[0]),n=l.exec(r[1]),x[this]=[e?e[0]:0,n?n[0]:0],t[this]=[c.exec(r[0])[0],c.exec(r[1])[0]]}),1===S.length&&(S[1]=S[0]),"right"===t.at[0]?g.left+=h:"center"===t.at[0]&&(g.left+=h/2),"bottom"===t.at[1]?g.top+=v:"center"===t.at[1]&&(g.top+=v/2),i=n(x.at,h,v),g.left+=i[0],g.top+=i[1],this.each(function(){var a,f,l=e(this),c=l.outerWidth(),p=l.outerHeight(),d=r(this,"marginLeft"),E=r(this,"marginTop"),T=c+d+r(this,"marginRight")+w.width,N=p+E+r(this,"marginBottom")+w.height,C=e.extend({},g),L=n(x.my,l.outerWidth(),l.outerHeight());"right"===t.my[0]?C.left-=c:"center"===t.my[0]&&(C.left-=c/2),"bottom"===t.my[1]?C.top-=p:"center"===t.my[1]&&(C.top-=p/2),C.left+=L[0],C.top+=L[1],e.support.offsetFractions||(C.left=u(C.left),C.top=u(C.top)),a={marginLeft:d,marginTop:E},e.each(["left","top"],function(n,r){e.ui.position[S[n]]&&e.ui.position[S[n]][r](C,{targetWidth:h,targetHeight:v,elemWidth:c,elemHeight:p,collisionPosition:a,collisionWidth:T,collisionHeight:N,offset:[i[0]+L[0],i[1]+L[1]],my:t.my,at:t.at,within:b,elem:l})}),e.fn.bgiframe&&l.bgiframe(),t.using&&(f=function(e){var n=m.left-C.left,r=n+h-c,i=m.top-C.top,u=i+v-p,a={target:{element:y,left:m.left,top:m.top,width:h,height:v},element:{element:l,left:C.left,top:C.top,width:c,height:p},horizontal:0>r?"left":n>0?"right":"center",vertical:0>u?"top":i>0?"bottom":"middle"};c>h&&h>o(n+r)&&(a.horizontal="center"),p>v&&v>o(i+u)&&(a.vertical="middle"),a.important=s(o(n),o(r))>s(o(i),o(u))?"horizontal":"vertical",t.using.call(this,e,a)}),l.offset(e.extend(C,{using:f}))})},e.ui.position={fit:{left:function(e,t){var n,r=t.within,i=r.isWindow?r.scrollLeft:r.offset.left,o=r.width,u=e.left-t.collisionPosition.marginLeft,a=i-u,f=u+t.collisionWidth-o-i;t.collisionWidth>o?a>0&&0>=f?(n=e.left+a+t.collisionWidth-o-i,e.left+=a-n):e.left=f>0&&0>=a?i:a>f?i+o-t.collisionWidth:i:a>0?e.left+=a:f>0?e.left-=f:e.left=s(e.left-u,e.left)},top:function(e,t){var n,r=t.within,i=r.isWindow?r.scrollTop:r.offset.top,o=t.within.height,u=e.top-t.collisionPosition.marginTop,a=i-u,f=u+t.collisionHeight-o-i;t.collisionHeight>o?a>0&&0>=f?(n=e.top+a+t.collisionHeight-o-i,e.top+=a-n):e.top=f>0&&0>=a?i:a>f?i+o-t.collisionHeight:i:a>0?e.top+=a:f>0?e.top-=f:e.top=s(e.top-u,e.top)}},flip:{left:function(e,t){var n,r,i=t.within,s=i.offset.left+i.scrollLeft,u=i.width,a=i.isWindow?i.scrollLeft:i.offset.left,f=e.left-t.collisionPosition.marginLeft,l=f-a,c=f+t.collisionWidth-u-a,h="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,d=-2*t.offset[0];0>l?(n=e.left+h+p+d+t.collisionWidth-u-s,(0>n||o(l)>n)&&(e.left+=h+p+d)):c>0&&(r=e.left-t.collisionPosition.marginLeft+h+p+d-a,(r>0||c>o(r))&&(e.left+=h+p+d))},top:function(e,t){var n,r,i=t.within,s=i.offset.top+i.scrollTop,u=i.height,a=i.isWindow?i.scrollTop:i.offset.top,f=e.top-t.collisionPosition.marginTop,l=f-a,c=f+t.collisionHeight-u-a,h="top"===t.my[1],p=h?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,d="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,v=-2*t.offset[1];0>l?(r=e.top+p+d+v+t.collisionHeight-u-s,e.top+p+d+v>l&&(0>r||o(l)>r)&&(e.top+=p+d+v)):c>0&&(n=e.top-t.collisionPosition.marginTop+p+d+v-a,e.top+p+d+v>c&&(n>0||c>o(n))&&(e.top+=p+d+v))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,n,r,i,s,o=document.getElementsByTagName("body")[0],u=document.createElement("div");t=document.createElement(o?"div":"body"),r={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&e.extend(r,{position:"absolute",left:"-1000px",top:"-1000px"});for(s in r)t.style[s]=r[s];t.appendChild(u),n=o||document.documentElement,n.insertBefore(t,n.firstChild),u.style.cssText="position: absolute; left: 10.7432222px;",i=e(u).offset().left,e.support.offsetFractions=i>10&&11>i,t.innerHTML="",n.removeChild(t)}(),e.uiBackCompat!==!1&&function(e){var n=e.fn.position;e.fn.position=function(r){if(!r||!r.offset)return n.call(this,r);var i=r.offset.split(" "),s=r.at.split(" ");return 1===i.length&&(i[1]=i[0]),/^\d/.test(i[0])&&(i[0]="+"+i[0]),/^\d/.test(i[1])&&(i[1]="+"+i[1]),1===s.length&&(/left|center|right/.test(s[0])?s[1]="center":(s[1]=s[0],s[0]="center")),n.call(this,e.extend(r,{at:s[0]+i[0]+" "+s[1]+i[1],offset:t}))}}(jQuery)})(jQuery);(function(e){e.widget("ui.draggable",e.ui.mouse,{version:"1.9.2",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function(){"original"!=this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(t){var n=this.options;return this.helper||n.disabled||e(t.target).is(".ui-resizable-handle")?!1:(this.handle=this._getHandle(t),this.handle?(e(n.iframeFix===!0?"iframe":n.iframeFix).each(function(){e('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(e(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(t){var n=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),n.containment&&this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,n){if(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),!n){var r=this._uiHash();if(this._trigger("drag",t,r)===!1)return this._mouseUp({}),!1;this.position=r.position}return this.options.axis&&"y"==this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"==this.options.axis||(this.helper[0].style.top=this.position.top+"px"),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var n=!1;e.ui.ddmanager&&!this.options.dropBehaviour&&(n=e.ui.ddmanager.drop(this,t)),this.dropped&&(n=this.dropped,this.dropped=!1);for(var r=this.element[0],i=!1;r&&(r=r.parentNode);)r==document&&(i=!0);if(!i&&"original"===this.options.helper)return!1;if("invalid"==this.options.revert&&!n||"valid"==this.options.revert&&n||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)){var s=this;e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){s._trigger("stop",t)!==!1&&s._clear()})}else this._trigger("stop",t)!==!1&&this._clear();return!1},_mouseUp:function(t){return e("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){var n=this.options.handle&&e(this.options.handle,this.element).length?!1:!0;return e(this.options.handle,this.element).find("*").andSelf().each(function(){this==t.target&&(n=!0)}),n},_createHelper:function(t){var n=this.options,r=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t])):"clone"==n.helper?this.element.clone().removeAttr("id"):this.element;return r.parents("body").length||r.appendTo("parent"==n.appendTo?this.element[0].parentNode:n.appendTo),r[0]==this.element[0]||/(fixed|absolute)/.test(r.css("position"))||r.css("position","absolute"),r},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"==this.cssPosition&&this.scrollParent[0]!=document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&"html"==this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"==this.cssPosition){var e=this.element.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t=this.options;if("parent"==t.containment&&(t.containment=this.helper[0].parentNode),("document"==t.containment||"window"==t.containment)&&(this.containment=["document"==t.containment?0:e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,"document"==t.containment?0:e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,("document"==t.containment?0:e(window).scrollLeft())+e("document"==t.containment?document:window).width()-this.helperProportions.width-this.margins.left,("document"==t.containment?0:e(window).scrollTop())+(e("document"==t.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(t.containment)||t.containment.constructor==Array)t.containment.constructor==Array&&(this.containment=t.containment);else{var n=e(t.containment),r=n[0];if(!r)return;n.offset();var i="hidden"!=e(r).css("overflow");this.containment=[(parseInt(e(r).css("borderLeftWidth"),10)||0)+(parseInt(e(r).css("paddingLeft"),10)||0),(parseInt(e(r).css("borderTopWidth"),10)||0)+(parseInt(e(r).css("paddingTop"),10)||0),(i?Math.max(r.scrollWidth,r.offsetWidth):r.offsetWidth)-(parseInt(e(r).css("borderLeftWidth"),10)||0)-(parseInt(e(r).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(i?Math.max(r.scrollHeight,r.offsetHeight):r.offsetHeight)-(parseInt(e(r).css("borderTopWidth"),10)||0)-(parseInt(e(r).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=n}},_convertPositionTo:function(t,n){n||(n=this.position);var r="absolute"==t?1:-1,i=(this.options,"absolute"!=this.cssPosition||this.scrollParent[0]!=document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent),s=/(html|body)/i.test(i[0].tagName);return{top:n.top+this.offset.relative.top*r+this.offset.parent.top*r-("fixed"==this.cssPosition?-this.scrollParent.scrollTop():s?0:i.scrollTop())*r,left:n.left+this.offset.relative.left*r+this.offset.parent.left*r-("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():s?0:i.scrollLeft())*r}},_generatePosition:function(t){var n=this.options,r="absolute"!=this.cssPosition||this.scrollParent[0]!=document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,i=/(html|body)/i.test(r[0].tagName),s=t.pageX,o=t.pageY;if(this.originalPosition){var u;if(this.containment){if(this.relative_container){var a=this.relative_container.offset();u=[this.containment[0]+a.left,this.containment[1]+a.top,this.containment[2]+a.left,this.containment[3]+a.top]}else u=this.containment;t.pageX-this.offset.click.left<u[0]&&(s=u[0]+this.offset.click.left),t.pageY-this.offset.click.top<u[1]&&(o=u[1]+this.offset.click.top),t.pageX-this.offset.click.left>u[2]&&(s=u[2]+this.offset.click.left),t.pageY-this.offset.click.top>u[3]&&(o=u[3]+this.offset.click.top)}if(n.grid){var f=n.grid[1]?this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1]:this.originalPageY;o=u?f-this.offset.click.top<u[1]||f-this.offset.click.top>u[3]?f-this.offset.click.top<u[1]?f+n.grid[1]:f-n.grid[1]:f:f;var l=n.grid[0]?this.originalPageX+Math.round((s-this.originalPageX)/n.grid[0])*n.grid[0]:this.originalPageX;s=u?l-this.offset.click.left<u[0]||l-this.offset.click.left>u[2]?l-this.offset.click.left<u[0]?l+n.grid[0]:l-n.grid[0]:l:l}}return{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"==this.cssPosition?-this.scrollParent.scrollTop():i?0:r.scrollTop()),left:s-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():i?0:r.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]==this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(t,n,r){return r=r||this._uiHash(),e.ui.plugin.call(this,t,[n,r]),"drag"==t&&(this.positionAbs=this._convertPositionTo("absolute")),e.Widget.prototype._trigger.call(this,t,n,r)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,n){var r=e(this).data("draggable"),i=r.options,s=e.extend({},n,{item:r.element});r.sortables=[],e(i.connectToSortable).each(function(){var n=e.data(this,"sortable");n&&!n.options.disabled&&(r.sortables.push({instance:n,shouldRevert:n.options.revert}),n.refreshPositions(),n._trigger("activate",t,s))})},stop:function(t,n){var r=e(this).data("draggable"),i=e.extend({},n,{item:r.element});e.each(r.sortables,function(){this.instance.isOver?(this.instance.isOver=0,r.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=!0),this.instance._mouseStop(t),this.instance.options.helper=this.instance.options._helper,"original"==r.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",t,i))})},drag:function(t,n){var r=e(this).data("draggable"),i=this;e.each(r.sortables,function(){var o=!1,u=this;this.instance.positionAbs=r.positionAbs,this.instance.helperProportions=r.helperProportions,this.instance.offset.click=r.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(o=!0,e.each(r.sortables,function(){return this.instance.positionAbs=r.positionAbs,this.instance.helperProportions=r.helperProportions,this.instance.offset.click=r.offset.click,this!=u&&this.instance._intersectsWith(this.instance.containerCache)&&e.ui.contains(u.instance.element[0],this.instance.element[0])&&(o=!1),o})),o?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=e(i).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return n.helper[0]},t.target=this.instance.currentItem[0],this.instance._mouseCapture(t,!0),this.instance._mouseStart(t,!0,!0),this.instance.offset.click.top=r.offset.click.top,this.instance.offset.click.left=r.offset.click.left,this.instance.offset.parent.left-=r.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=r.offset.parent.top-this.instance.offset.parent.top,r._trigger("toSortable",t),r.dropped=this.instance.element,r.currentItem=r.element,this.instance.fromOutside=r),this.instance.currentItem&&this.instance._mouseDrag(t)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",t,this.instance._uiHash(this.instance)),this.instance._mouseStop(t,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),r._trigger("fromSortable",t),r.dropped=!1)})}}),e.ui.plugin.add("draggable","cursor",{start:function(){var t=e("body"),n=e(this).data("draggable").options;t.css("cursor")&&(n._cursor=t.css("cursor")),t.css("cursor",n.cursor)},stop:function(){var t=e(this).data("draggable").options;t._cursor&&e("body").css("cursor",t._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,n){var r=e(n.helper),i=e(this).data("draggable").options;r.css("opacity")&&(i._opacity=r.css("opacity")),r.css("opacity",i.opacity)},stop:function(t,n){var r=e(this).data("draggable").options;r._opacity&&e(n.helper).css("opacity",r._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(){var t=e(this).data("draggable");t.scrollParent[0]!=document&&"HTML"!=t.scrollParent[0].tagName&&(t.overflowOffset=t.scrollParent.offset())},drag:function(t){var n=e(this).data("draggable"),r=n.options,i=!1;n.scrollParent[0]!=document&&"HTML"!=n.scrollParent[0].tagName?(r.axis&&"x"==r.axis||(n.overflowOffset.top+n.scrollParent[0].offsetHeight-t.pageY<r.scrollSensitivity?n.scrollParent[0].scrollTop=i=n.scrollParent[0].scrollTop+r.scrollSpeed:t.pageY-n.overflowOffset.top<r.scrollSensitivity&&(n.scrollParent[0].scrollTop=i=n.scrollParent[0].scrollTop-r.scrollSpeed)),r.axis&&"y"==r.axis||(n.overflowOffset.left+n.scrollParent[0].offsetWidth-t.pageX<r.scrollSensitivity?n.scrollParent[0].scrollLeft=i=n.scrollParent[0].scrollLeft+r.scrollSpeed:t.pageX-n.overflowOffset.left<r.scrollSensitivity&&(n.scrollParent[0].scrollLeft=i=n.scrollParent[0].scrollLeft-r.scrollSpeed))):(r.axis&&"x"==r.axis||(t.pageY-e(document).scrollTop()<r.scrollSensitivity?i=e(document).scrollTop(e(document).scrollTop()-r.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<r.scrollSensitivity&&(i=e(document).scrollTop(e(document).scrollTop()+r.scrollSpeed))),r.axis&&"y"==r.axis||(t.pageX-e(document).scrollLeft()<r.scrollSensitivity?i=e(document).scrollLeft(e(document).scrollLeft()-r.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<r.scrollSensitivity&&(i=e(document).scrollLeft(e(document).scrollLeft()+r.scrollSpeed)))),i!==!1&&e.ui.ddmanager&&!r.dropBehaviour&&e.ui.ddmanager.prepareOffsets(n,t)}}),e.ui.plugin.add("draggable","snap",{start:function(){var t=e(this).data("draggable"),n=t.options;t.snapElements=[],e(n.snap.constructor!=String?n.snap.items||":data(draggable)":n.snap).each(function(){var n=e(this),r=n.offset();this!=t.element[0]&&t.snapElements.push({item:this,width:n.outerWidth(),height:n.outerHeight(),top:r.top,left:r.left})})},drag:function(t,n){for(var r=e(this).data("draggable"),i=r.options,s=i.snapTolerance,o=n.offset.left,u=o+r.helperProportions.width,a=n.offset.top,f=a+r.helperProportions.height,l=r.snapElements.length-1;l>=0;l--){var c=r.snapElements[l].left,h=c+r.snapElements[l].width,p=r.snapElements[l].top,d=p+r.snapElements[l].height;if(o>c-s&&h+s>o&&a>p-s&&d+s>a||o>c-s&&h+s>o&&f>p-s&&d+s>f||u>c-s&&h+s>u&&a>p-s&&d+s>a||u>c-s&&h+s>u&&f>p-s&&d+s>f){if("inner"!=i.snapMode){var v=s>=Math.abs(p-f),m=s>=Math.abs(d-a),g=s>=Math.abs(c-u),y=s>=Math.abs(h-o);v&&(n.position.top=r._convertPositionTo("relative",{top:p-r.helperProportions.height,left:0}).top-r.margins.top),m&&(n.position.top=r._convertPositionTo("relative",{top:d,left:0}).top-r.margins.top),g&&(n.position.left=r._convertPositionTo("relative",{top:0,left:c-r.helperProportions.width}).left-r.margins.left),y&&(n.position.left=r._convertPositionTo("relative",{top:0,left:h}).left-r.margins.left)}var b=v||m||g||y;if("outer"!=i.snapMode){var v=s>=Math.abs(p-a),m=s>=Math.abs(d-f),g=s>=Math.abs(c-o),y=s>=Math.abs(h-u);v&&(n.position.top=r._convertPositionTo("relative",{top:p,left:0}).top-r.margins.top),m&&(n.position.top=r._convertPositionTo("relative",{top:d-r.helperProportions.height,left:0}).top-r.margins.top),g&&(n.position.left=r._convertPositionTo("relative",{top:0,left:c}).left-r.margins.left),y&&(n.position.left=r._convertPositionTo("relative",{top:0,left:h-r.helperProportions.width}).left-r.margins.left)}!r.snapElements[l].snapping&&(v||m||g||y||b)&&r.options.snap.snap&&r.options.snap.snap.call(r.element,t,e.extend(r._uiHash(),{snapItem:r.snapElements[l].item})),r.snapElements[l].snapping=v||m||g||y||b}else r.snapElements[l].snapping&&r.options.snap.release&&r.options.snap.release.call(r.element,t,e.extend(r._uiHash(),{snapItem:r.snapElements[l].item})),r.snapElements[l].snapping=!1}}}),e.ui.plugin.add("draggable","stack",{start:function(){var t=e(this).data("draggable").options,n=e.makeArray(e(t.stack)).sort(function(t,n){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(n).css("zIndex"),10)||0)});if(n.length){var r=parseInt(n[0].style.zIndex)||0;e(n).each(function(e){this.style.zIndex=r+e}),this[0].style.zIndex=r+n.length}}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,n){var r=e(n.helper),i=e(this).data("draggable").options;r.css("zIndex")&&(i._zIndex=r.css("zIndex")),r.css("zIndex",i.zIndex)},stop:function(t,n){var r=e(this).data("draggable").options;r._zIndex&&e(n.helper).css("zIndex",r._zIndex)}})})(jQuery);(function(e){e.widget("ui.droppable",{version:"1.9.2",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect"},_create:function(){var t=this.options,n=t.accept;this.isover=0,this.isout=1,this.accept=e.isFunction(n)?n:function(e){return e.is(n)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},e.ui.ddmanager.droppables[t.scope]=e.ui.ddmanager.droppables[t.scope]||[],e.ui.ddmanager.droppables[t.scope].push(this),t.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var t=e.ui.ddmanager.droppables[this.options.scope],n=0;t.length>n;n++)t[n]==this&&t.splice(n,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,n){"accept"==t&&(this.accept=e.isFunction(n)?n:function(e){return e.is(n)}),e.Widget.prototype._setOption.apply(this,arguments)},_activate:function(t){var n=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),n&&this._trigger("activate",t,this.ui(n))},_deactivate:function(t){var n=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),n&&this._trigger("deactivate",t,this.ui(n))},_over:function(t){var n=e.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!=this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(n)))},_out:function(t){var n=e.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!=this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(n)))},_drop:function(t,n){var r=n||e.ui.ddmanager.current;if(!r||(r.currentItem||r.element)[0]==this.element[0])return!1;var i=!1;return this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var t=e.data(this,"droppable");return t.options.greedy&&!t.options.disabled&&t.options.scope==r.options.scope&&t.accept.call(t.element[0],r.currentItem||r.element)&&e.ui.intersect(r,e.extend(t,{offset:t.element.offset()}),t.options.tolerance)?(i=!0,!1):undefined}),i?!1:this.accept.call(this.element[0],r.currentItem||r.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(r)),this.element):!1},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(t,n,r){if(!n.offset)return!1;var i=(t.positionAbs||t.position.absolute).left,s=i+t.helperProportions.width,o=(t.positionAbs||t.position.absolute).top,u=o+t.helperProportions.height,a=n.offset.left,f=a+n.proportions.width,l=n.offset.top,c=l+n.proportions.height;switch(r){case"fit":return i>=a&&f>=s&&o>=l&&c>=u;case"intersect":return i+t.helperProportions.width/2>a&&f>s-t.helperProportions.width/2&&o+t.helperProportions.height/2>l&&c>u-t.helperProportions.height/2;case"pointer":var h=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,p=(t.positionAbs||t.position.absolute).top+(t.clickOffset||t.offset.click).top,d=e.ui.isOver(p,h,l,a,n.proportions.height,n.proportions.width);return d;case"touch":return(o>=l&&c>=o||u>=l&&c>=u||l>o&&u>c)&&(i>=a&&f>=i||s>=a&&f>=s||a>i&&s>f);default:return!1}},e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,n){var r=e.ui.ddmanager.droppables[t.options.scope]||[],i=n?n.type:null,s=(t.currentItem||t.element).find(":data(droppable)").andSelf();e:for(var o=0;r.length>o;o++)if(!(r[o].options.disabled||t&&!r[o].accept.call(r[o].element[0],t.currentItem||t.element))){for(var u=0;s.length>u;u++)if(s[u]==r[o].element[0]){r[o].proportions.height=0;continue e}r[o].visible="none"!=r[o].element.css("display"),r[o].visible&&("mousedown"==i&&r[o]._activate.call(r[o],n),r[o].offset=r[o].element.offset(),r[o].proportions={width:r[o].element[0].offsetWidth,height:r[o].element[0].offsetHeight})}},drop:function(t,n){var r=!1;return e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance)&&(r=this._drop.call(this,n)||r),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=1,this.isover=0,this._deactivate.call(this,n)))}),r},dragStart:function(t,n){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,n)})},drag:function(t,n){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,n),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var r=e.ui.intersect(t,this,this.options.tolerance),s=r||1!=this.isover?r&&0==this.isover?"isover":null:"isout";if(s){var o;if(this.options.greedy){var u=this.options.scope,a=this.element.parents(":data(droppable)").filter(function(){return e.data(this,"droppable").options.scope===u});a.length&&(o=e.data(a[0],"droppable"),o.greedyChild="isover"==s?1:0)}o&&"isover"==s&&(o.isover=0,o.isout=1,o._out.call(o,n)),this[s]=1,this["isout"==s?"isover":"isout"]=0,this["isover"==s?"_over":"_out"].call(this,n),o&&"isout"==s&&(o.isout=0,o.isover=1,o._over.call(o,n))}}})},dragStop:function(t,n){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,n)}}})(jQuery);(function(e){e.widget("ui.resizable",e.ui.mouse,{version:"1.9.2",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1e3},_create:function(){var t=this,n=this.options;if(this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!n.aspectRatio,aspectRatio:n.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:n.helper||n.ghost||n.animate?n.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(e('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("resizable",this.element.data("resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=n.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor==String){"all"==this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw");var r=this.handles.split(",");this.handles={};for(var i=0;r.length>i;i++){var s=e.trim(r[i]),o="ui-resizable-"+s,u=e('<div class="ui-resizable-handle '+o+'"></div>');u.css({zIndex:n.zIndex}),"se"==s&&u.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(u)}}this._renderAxis=function(t){t=t||this.element;for(var n in this.handles){if(this.handles[n].constructor==String&&(this.handles[n]=e(this.handles[n],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var r=e(this.handles[n],this.element),i=0;i=/sw|ne|nw|se|n|s/.test(n)?r.outerHeight():r.outerWidth();var s=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");t.css(s,i),this._proportionallyResize()}e(this.handles[n]).length}},this._renderAxis(this.element),this._handles=e(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){if(!t.resizing){if(this.className)var e=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);t.axis=e&&e[1]?e[1]:"se"}}),n.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){n.disabled||(e(this).removeClass("ui-resizable-autohide"),t._handles.show())}).mouseleave(function(){n.disabled||t.resizing||(e(this).addClass("ui-resizable-autohide"),t._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){t(this.element);var n=this.element;this.originalElement.css({position:n.css("position"),width:n.outerWidth(),height:n.outerHeight(),top:n.css("top"),left:n.css("left")}).insertAfter(n),n.remove()}return this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_mouseCapture:function(t){var n=!1;for(var r in this.handles)e(this.handles[r])[0]==t.target&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(n){var r=this.options,i=this.element.position(),s=this.element;this.resizing=!0,this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()},(s.is(".ui-draggable")||/absolute/.test(s.css("position")))&&s.css({position:"absolute",top:i.top,left:i.left}),this._renderProxy();var o=t(this.helper.css("left")),u=t(this.helper.css("top"));r.containment&&(o+=e(r.containment).scrollLeft()||0,u+=e(r.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:o,top:u},this.size=this._helper?{width:s.outerWidth(),height:s.outerHeight()}:{width:s.width(),height:s.height()},this.originalSize=this._helper?{width:s.outerWidth(),height:s.outerHeight()}:{width:s.width(),height:s.height()},this.originalPosition={left:o,top:u},this.sizeDiff={width:s.outerWidth()-s.width(),height:s.outerHeight()-s.height()},this.originalMousePosition={left:n.pageX,top:n.pageY},this.aspectRatio="number"==typeof r.aspectRatio?r.aspectRatio:this.originalSize.width/this.originalSize.height||1;var a=e(".ui-resizable-"+this.axis).css("cursor");return e("body").css("cursor","auto"==a?this.axis+"-resize":a),s.addClass("ui-resizable-resizing"),this._propagate("start",n),!0},_mouseDrag:function(e){var t=this.helper,n=(this.options,this.originalMousePosition),r=this.axis,i=e.pageX-n.left||0,s=e.pageY-n.top||0,o=this._change[r];if(!o)return!1;var u=o.apply(this,[e,i,s]);return this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(u=this._updateRatio(u,e)),u=this._respectSize(u,e),this._propagate("resize",e),t.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"}),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),this._updateCache(u),this._trigger("resize",e,this.ui()),!1},_mouseStop:function(t){this.resizing=!1;var n=this.options,r=this;if(this._helper){var i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),o=s&&e.ui.hasScroll(i[0],"left")?0:r.sizeDiff.height,u=s?0:r.sizeDiff.width,a={width:r.helper.width()-u,height:r.helper.height()-o},f=parseInt(r.element.css("left"),10)+(r.position.left-r.originalPosition.left)||null,l=parseInt(r.element.css("top"),10)+(r.position.top-r.originalPosition.top)||null;n.animate||this.element.css(e.extend(a,{top:l,left:f})),r.helper.height(r.size.height),r.helper.width(r.size.width),this._helper&&!n.animate&&this._proportionallyResize()}return e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(e){var t,r,s,o,u,a=this.options;u={minWidth:n(a.minWidth)?a.minWidth:0,maxWidth:n(a.maxWidth)?a.maxWidth:1/0,minHeight:n(a.minHeight)?a.minHeight:0,maxHeight:n(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||e)&&(t=u.minHeight*this.aspectRatio,s=u.minWidth/this.aspectRatio,r=u.maxHeight*this.aspectRatio,o=u.maxWidth/this.aspectRatio,t>u.minWidth&&(u.minWidth=t),s>u.minHeight&&(u.minHeight=s),u.maxWidth>r&&(u.maxWidth=r),u.maxHeight>o&&(u.maxHeight=o)),this._vBoundaries=u},_updateCache:function(e){this.options,this.offset=this.helper.offset(),n(e.left)&&(this.position.left=e.left),n(e.top)&&(this.position.top=e.top),n(e.height)&&(this.size.height=e.height),n(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=(this.options,this.position),r=this.size,s=this.axis;return n(e.height)?e.width=e.height*this.aspectRatio:n(e.width)&&(e.height=e.width/this.aspectRatio),"sw"==s&&(e.left=t.left+(r.width-e.width),e.top=null),"nw"==s&&(e.top=t.top+(r.height-e.height),e.left=t.left+(r.width-e.width)),e},_respectSize:function(e,t){var r=(this.helper,this._vBoundaries),s=(this._aspectRatio||t.shiftKey,this.axis),o=n(e.width)&&r.maxWidth&&r.maxWidth<e.width,u=n(e.height)&&r.maxHeight&&r.maxHeight<e.height,a=n(e.width)&&r.minWidth&&r.minWidth>e.width,f=n(e.height)&&r.minHeight&&r.minHeight>e.height;a&&(e.width=r.minWidth),f&&(e.height=r.minHeight),o&&(e.width=r.maxWidth),u&&(e.height=r.maxHeight);var l=this.originalPosition.left+this.originalSize.width,c=this.position.top+this.size.height,h=/sw|nw|w/.test(s),p=/nw|ne|n/.test(s);a&&h&&(e.left=l-r.minWidth),o&&h&&(e.left=l-r.maxWidth),f&&p&&(e.top=c-r.minHeight),u&&p&&(e.top=c-r.maxHeight);var d=!e.width&&!e.height;return d&&!e.left&&e.top?e.top=null:d&&!e.top&&e.left&&(e.left=null),e},_proportionallyResize:function(){if(this.options,this._proportionallyResizeElements.length)for(var t=this.helper||this.element,n=0;this._proportionallyResizeElements.length>n;n++){var r=this._proportionallyResizeElements[n];if(!this.borderDif){var i=[r.css("borderTopWidth"),r.css("borderRightWidth"),r.css("borderBottomWidth"),r.css("borderLeftWidth")],s=[r.css("paddingTop"),r.css("paddingRight"),r.css("paddingBottom"),r.css("paddingLeft")];this.borderDif=e.map(i,function(e,t){var n=parseInt(e,10)||0,r=parseInt(s[t],10)||0;return n+r})}r.css({height:t.height()-this.borderDif[0]-this.borderDif[2]||0,width:t.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var t=this.element,n=this.options;if(this.elementOffset=t.offset(),this._helper){this.helper=this.helper||e('<div style="overflow:hidden;"></div>');var r=e.ui.ie6?1:0,i=e.ui.ie6?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+i,height:this.element.outerHeight()+i,position:"absolute",left:this.elementOffset.left-r+"px",top:this.elementOffset.top-r+"px",zIndex:++n.zIndex}),this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var n=(this.options,this.originalSize),r=this.originalPosition;return{left:r.left+t,width:n.width-t}},n:function(e,t,n){var r=(this.options,this.originalSize),i=this.originalPosition;return{top:i.top+n,height:r.height-n}},s:function(e,t,n){return{height:this.originalSize.height+n}},se:function(t,n,r){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,n,r]))},sw:function(t,n,r){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,n,r]))},ne:function(t,n,r){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,n,r]))},nw:function(t,n,r){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,n,r]))}},_propagate:function(t,n){e.ui.plugin.call(this,t,[n,this.ui()]),"resize"!=t&&this._trigger(t,n,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).data("resizable"),n=t.options,r=function(t){e(t).each(function(){var t=e(this);t.data("resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};"object"!=typeof n.alsoResize||n.alsoResize.parentNode?r(n.alsoResize):n.alsoResize.length?(n.alsoResize=n.alsoResize[0],r(n.alsoResize)):e.each(n.alsoResize,function(e){r(e)})},resize:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.originalSize,o=r.originalPosition,u={height:r.size.height-s.height||0,width:r.size.width-s.width||0,top:r.position.top-o.top||0,left:r.position.left-o.left||0},a=function(t,r){e(t).each(function(){var t=e(this),i=e(this).data("resizable-alsoresize"),s={},o=r&&r.length?r:t.parents(n.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(o,function(e,t){var n=(i[t]||0)+(u[t]||0);n&&n>=0&&(s[t]=n||null)}),t.css(s)})};"object"!=typeof i.alsoResize||i.alsoResize.nodeType?a(i.alsoResize):e.each(i.alsoResize,function(e,t){a(e,t)})},stop:function(){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var n=e(this).data("resizable"),r=n.options,i=n._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),o=s&&e.ui.hasScroll(i[0],"left")?0:n.sizeDiff.height,u=s?0:n.sizeDiff.width,a={width:n.size.width-u,height:n.size.height-o},f=parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left)||null,l=parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top)||null;n.element.animate(e.extend(a,l&&f?{top:l,left:f}:{}),{duration:r.animateDuration,easing:r.animateEasing,step:function(){var r={width:parseInt(n.element.css("width"),10),height:parseInt(n.element.css("height"),10),top:parseInt(n.element.css("top"),10),left:parseInt(n.element.css("left"),10)};i&&i.length&&e(i[0]).css({width:r.width,height:r.height}),n._updateCache(r),n._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var n=e(this).data("resizable"),r=n.options,i=n.element,s=r.containment,o=s instanceof e?s.get(0):/parent/.test(s)?i.parent().get(0):s;if(o)if(n.containerElement=e(o),/document/.test(s)||s==document)n.containerOffset={left:0,top:0},n.containerPosition={left:0,top:0},n.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight};else{var u=e(o),a=[];e(["Top","Right","Left","Bottom"]).each(function(e,n){a[e]=t(u.css("padding"+n))}),n.containerOffset=u.offset(),n.containerPosition=u.position(),n.containerSize={height:u.innerHeight()-a[3],width:u.innerWidth()-a[1]};var f=n.containerOffset,l=n.containerSize.height,c=n.containerSize.width,h=e.ui.hasScroll(o,"left")?o.scrollWidth:c,p=e.ui.hasScroll(o)?o.scrollHeight:l;n.parentData={element:o,left:f.left,top:f.top,width:h,height:p}}},resize:function(t){var n=e(this).data("resizable"),r=n.options,i=(n.containerSize,n.containerOffset),s=(n.size,n.position),o=n._aspectRatio||t.shiftKey,u={top:0,left:0},a=n.containerElement;a[0]!=document&&/static/.test(a.css("position"))&&(u=i),s.left<(n._helper?i.left:0)&&(n.size.width=n.size.width+(n._helper?n.position.left-i.left:n.position.left-u.left),o&&(n.size.height=n.size.width/n.aspectRatio),n.position.left=r.helper?i.left:0),s.top<(n._helper?i.top:0)&&(n.size.height=n.size.height+(n._helper?n.position.top-i.top:n.position.top),o&&(n.size.width=n.size.height*n.aspectRatio),n.position.top=n._helper?i.top:0),n.offset.left=n.parentData.left+n.position.left,n.offset.top=n.parentData.top+n.position.top;var f=Math.abs((n._helper?n.offset.left-u.left:n.offset.left-u.left)+n.sizeDiff.width),l=Math.abs((n._helper?n.offset.top-u.top:n.offset.top-i.top)+n.sizeDiff.height),c=n.containerElement.get(0)==n.element.parent().get(0),h=/relative|absolute/.test(n.containerElement.css("position"));c&&h&&(f-=n.parentData.left),f+n.size.width>=n.parentData.width&&(n.size.width=n.parentData.width-f,o&&(n.size.height=n.size.width/n.aspectRatio)),l+n.size.height>=n.parentData.height&&(n.size.height=n.parentData.height-l,o&&(n.size.width=n.size.height*n.aspectRatio))},stop:function(){var t=e(this).data("resizable"),n=t.options,r=(t.position,t.containerOffset),i=t.containerPosition,s=t.containerElement,o=e(t.helper),u=o.offset(),a=o.outerWidth()-t.sizeDiff.width,f=o.outerHeight()-t.sizeDiff.height;t._helper&&!n.animate&&/relative/.test(s.css("position"))&&e(this).css({left:u.left-i.left-r.left,width:a,height:f}),t._helper&&!n.animate&&/static/.test(s.css("position"))&&e(this).css({left:u.left-i.left-r.left,width:a,height:f})}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).data("resizable"),n=t.options,r=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:r.height,width:r.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof n.ghost?n.ghost:""),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).data("resizable");t.options,t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).data("resizable");t.options,t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(t){var n=e(this).data("resizable"),r=n.options,i=n.size,s=n.originalSize,o=n.originalPosition,u=n.axis;r._aspectRatio||t.shiftKey,r.grid="number"==typeof r.grid?[r.grid,r.grid]:r.grid;var a=Math.round((i.width-s.width)/(r.grid[0]||1))*(r.grid[0]||1),f=Math.round((i.height-s.height)/(r.grid[1]||1))*(r.grid[1]||1);/^(se|s|e)$/.test(u)?(n.size.width=s.width+a,n.size.height=s.height+f):/^(ne)$/.test(u)?(n.size.width=s.width+a,n.size.height=s.height+f,n.position.top=o.top-f):/^(sw)$/.test(u)?(n.size.width=s.width+a,n.size.height=s.height+f,n.position.left=o.left-a):(n.size.width=s.width+a,n.size.height=s.height+f,n.position.top=o.top-f,n.position.left=o.left-a)}});var t=function(e){return parseInt(e,10)||0},n=function(e){return!isNaN(parseInt(e,10))}})(jQuery);(function(e){e.widget("ui.selectable",e.ui.mouse,{version:"1.9.2",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch"},_create:function(){var t=this;this.element.addClass("ui-selectable"),this.dragged=!1;var n;this.refresh=function(){n=e(t.options.filter,t.element[0]),n.addClass("ui-selectee"),n.each(function(){var t=e(this),n=t.offset();e.data(this,"selectable-item",{element:this,$element:t,left:n.left,top:n.top,right:n.left+t.outerWidth(),bottom:n.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=n.addClass("ui-selectee"),this._mouseInit(),this.helper=e("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(t){var n=this;if(this.opos=[t.pageX,t.pageY],!this.options.disabled){var r=this.options;this.selectees=e(r.filter,this.element[0]),this._trigger("start",t),e(r.appendTo).append(this.helper),this.helper.css({left:t.clientX,top:t.clientY,width:0,height:0}),r.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var r=e.data(this,"selectable-item");r.startselected=!0,t.metaKey||t.ctrlKey||(r.$element.removeClass("ui-selected"),r.selected=!1,r.$element.addClass("ui-unselecting"),r.unselecting=!0,n._trigger("unselecting",t,{unselecting:r.element}))}),e(t.target).parents().andSelf().each(function(){var r=e.data(this,"selectable-item");if(r){var s=!t.metaKey&&!t.ctrlKey||!r.$element.hasClass("ui-selected");return r.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),r.unselecting=!s,r.selecting=s,r.selected=s,s?n._trigger("selecting",t,{selecting:r.element}):n._trigger("unselecting",t,{unselecting:r.element}),!1}})}},_mouseDrag:function(t){var n=this;if(this.dragged=!0,!this.options.disabled){var r=this.options,i=this.opos[0],s=this.opos[1],o=t.pageX,u=t.pageY;if(i>o){var a=o;o=i,i=a}if(s>u){var a=u;u=s,s=a}return this.helper.css({left:i,top:s,width:o-i,height:u-s}),this.selectees.each(function(){var a=e.data(this,"selectable-item");if(a&&a.element!=n.element[0]){var f=!1;"touch"==r.tolerance?f=!(a.left>o||i>a.right||a.top>u||s>a.bottom):"fit"==r.tolerance&&(f=a.left>i&&o>a.right&&a.top>s&&u>a.bottom),f?(a.selected&&(a.$element.removeClass("ui-selected"),a.selected=!1),a.unselecting&&(a.$element.removeClass("ui-unselecting"),a.unselecting=!1),a.selecting||(a.$element.addClass("ui-selecting"),a.selecting=!0,n._trigger("selecting",t,{selecting:a.element}))):(a.selecting&&((t.metaKey||t.ctrlKey)&&a.startselected?(a.$element.removeClass("ui-selecting"),a.selecting=!1,a.$element.addClass("ui-selected"),a.selected=!0):(a.$element.removeClass("ui-selecting"),a.selecting=!1,a.startselected&&(a.$element.addClass("ui-unselecting"),a.unselecting=!0),n._trigger("unselecting",t,{unselecting:a.element}))),a.selected&&(t.metaKey||t.ctrlKey||a.startselected||(a.$element.removeClass("ui-selected"),a.selected=!1,a.$element.addClass("ui-unselecting"),a.unselecting=!0,n._trigger("unselecting",t,{unselecting:a.element}))))}}),!1}},_mouseStop:function(t){var n=this;return this.dragged=!1,this.options,e(".ui-unselecting",this.element[0]).each(function(){var r=e.data(this,"selectable-item");r.$element.removeClass("ui-unselecting"),r.unselecting=!1,r.startselected=!1,n._trigger("unselected",t,{unselected:r.element})}),e(".ui-selecting",this.element[0]).each(function(){var r=e.data(this,"selectable-item");r.$element.removeClass("ui-selecting").addClass("ui-selected"),r.selecting=!1,r.selected=!0,r.startselected=!0,n._trigger("selected",t,{selected:r.element})}),this._trigger("stop",t),this.helper.remove(),!1}})})(jQuery);(function(e){e.widget("ui.sortable",e.ui.mouse,{version:"1.9.2",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3},_create:function(){var e=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===e.axis||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_setOption:function(t,n){"disabled"===t?(this.options[t]=n,this.widget().toggleClass("ui-sortable-disabled",!!n)):e.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(t,n){var r=this;if(this.reverting)return!1;if(this.options.disabled||"static"==this.options.type)return!1;this._refreshItems(t);var i=null;if(e(t.target).parents().each(function(){return e.data(this,r.widgetName+"-item")==r?(i=e(this),!1):undefined}),e.data(t.target,r.widgetName+"-item")==r&&(i=e(t.target)),!i)return!1;if(this.options.handle&&!n){var s=!1;if(e(this.options.handle,i).find("*").andSelf().each(function(){this==t.target&&(s=!0)}),!s)return!1}return this.currentItem=i,this._removeCurrentsFromItems(),!0},_mouseStart:function(t,n,r){var i=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),i.containment&&this._setContainment(),i.cursor&&(e("body").css("cursor")&&(this._storedCursor=e("body").css("cursor")),e("body").css("cursor",i.cursor)),i.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",i.opacity)),i.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",i.zIndex)),this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!r)for(var s=this.containers.length-1;s>=0;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){if(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll){var n=this.options,r=!1;this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<n.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+n.scrollSpeed:t.pageY-this.overflowOffset.top<n.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-n.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<n.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+n.scrollSpeed:t.pageX-this.overflowOffset.left<n.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-n.scrollSpeed)):(t.pageY-e(document).scrollTop()<n.scrollSensitivity?r=e(document).scrollTop(e(document).scrollTop()-n.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<n.scrollSensitivity&&(r=e(document).scrollTop(e(document).scrollTop()+n.scrollSpeed)),t.pageX-e(document).scrollLeft()<n.scrollSensitivity?r=e(document).scrollLeft(e(document).scrollLeft()-n.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<n.scrollSensitivity&&(r=e(document).scrollLeft(e(document).scrollLeft()+n.scrollSpeed))),r!==!1&&e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)}this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"==this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"==this.options.axis||(this.helper[0].style.top=this.position.top+"px");for(var i=this.items.length-1;i>=0;i--){var s=this.items[i],o=s.item[0],u=this._intersectsWithPointer(s);if(u&&s.instance===this.currentContainer&&o!=this.currentItem[0]&&this.placeholder[1==u?"next":"prev"]()[0]!=o&&!e.contains(this.placeholder[0],o)&&("semi-dynamic"==this.options.type?!e.contains(this.element[0],o):!0)){if(this.direction=1==u?"down":"up","pointer"!=this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(t,s),this._trigger("change",t,this._uiHash());break}}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,n){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var r=this,i=this.placeholder.offset();this.reverting=!0,e(this.helper).animate({left:i.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:i.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){r._clear(t)})}else this._clear(t,n);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"==this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!=this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];return t=t||{},e(n).each(function(){var n=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[-=_](.+)/);n&&r.push((t.key||n[1]+"[]")+"="+(t.key&&t.expression?n[1]:n[2]))}),!r.length&&t.key&&r.push(t.key+"="),r.join("&")},toArray:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];return t=t||{},n.each(function(){r.push(e(t.item||this).attr(t.attribute||"id")||"")}),r},_intersectsWith:function(e){var t=this.positionAbs.left,n=t+this.helperProportions.width,r=this.positionAbs.top,i=r+this.helperProportions.height,s=e.left,o=s+e.width,u=e.top,a=u+e.height,f=this.offset.click.top,l=this.offset.click.left,c=r+f>u&&a>r+f&&t+l>s&&o>t+l;return"pointer"==this.options.tolerance||this.options.forcePointerForContainers||"pointer"!=this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?c:t+this.helperProportions.width/2>s&&o>n-this.helperProportions.width/2&&r+this.helperProportions.height/2>u&&a>i-this.helperProportions.height/2},_intersectsWithPointer:function(t){var n="x"===this.options.axis||e.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),r="y"===this.options.axis||e.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),i=n&&r,s=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return i?this.floating?o&&"right"==o||"down"==s?2:1:s&&("down"==s?2:1):!1},_intersectsWithSides:function(t){var n=e.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),r=e.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),i=this._getDragVerticalDirection(),s=this._getDragHorizontalDirection();return this.floating&&s?"right"==s&&r||"left"==s&&!r:i&&("down"==i&&n||"up"==i&&!n)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!=e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!=e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor==String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){var n=[],r=[],i=this._connectWith();if(i&&t)for(var s=i.length-1;s>=0;s--)for(var o=e(i[s]),u=o.length-1;u>=0;u--){var a=e.data(o[u],this.widgetName);a&&a!=this&&!a.options.disabled&&r.push([e.isFunction(a.options.items)?a.options.items.call(a.element):e(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a])}r.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var s=r.length-1;s>=0;s--)r[s][0].each(function(){n.push(this)});return e(n)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var n=0;t.length>n;n++)if(t[n]==e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var n=this.items,r=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],i=this._connectWith();if(i&&this.ready)for(var s=i.length-1;s>=0;s--)for(var o=e(i[s]),u=o.length-1;u>=0;u--){var a=e.data(o[u],this.widgetName);a&&a!=this&&!a.options.disabled&&(r.push([e.isFunction(a.options.items)?a.options.items.call(a.element[0],t,{item:this.currentItem}):e(a.options.items,a.element),a]),this.containers.push(a))}for(var s=r.length-1;s>=0;s--)for(var f=r[s][1],l=r[s][0],u=0,c=l.length;c>u;u++){var h=e(l[u]);h.data(this.widgetName+"-item",f),n.push({item:h,instance:f,width:0,height:0,left:0,top:0})}},refreshPositions:function(t){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());for(var n=this.items.length-1;n>=0;n--){var r=this.items[n];if(r.instance==this.currentContainer||!this.currentContainer||r.item[0]==this.currentItem[0]){var i=this.options.toleranceElement?e(this.options.toleranceElement,r.item):r.item;t||(r.width=i.outerWidth(),r.height=i.outerHeight());var s=i.offset();r.left=s.left,r.top=s.top}}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(var n=this.containers.length-1;n>=0;n--){var s=this.containers[n].element.offset();this.containers[n].containerCache.left=s.left,this.containers[n].containerCache.top=s.top,this.containers[n].containerCache.width=this.containers[n].element.outerWidth(),this.containers[n].containerCache.height=this.containers[n].element.outerHeight()}return this},_createPlaceholder:function(t){t=t||this;var n=t.options;if(!n.placeholder||n.placeholder.constructor==String){var r=n.placeholder;n.placeholder={element:function(){var n=e(document.createElement(t.currentItem[0].nodeName)).addClass(r||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];return r||(n.style.visibility="hidden"),n},update:function(e,o){(!r||n.forcePlaceholderSize)&&(o.height()||o.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),o.width()||o.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}}t.placeholder=e(n.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),n.placeholder.update(t,t.placeholder)},_contactContainers:function(t){for(var n=null,r=null,i=this.containers.length-1;i>=0;i--)if(!e.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(n&&e.contains(this.containers[i].element[0],n.element[0]))continue;n=this.containers[i],r=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",t,this._uiHash(this)),this.containers[i].containerCache.over=0);if(n)if(1===this.containers.length)this.containers[r]._trigger("over",t,this._uiHash(this)),this.containers[r].containerCache.over=1;else{for(var s=1e4,o=null,u=this.containers[r].floating?"left":"top",a=this.containers[r].floating?"width":"height",f=this.positionAbs[u]+this.offset.click[u],l=this.items.length-1;l>=0;l--)if(e.contains(this.containers[r].element[0],this.items[l].item[0])&&this.items[l].item[0]!=this.currentItem[0]){var c=this.items[l].item.offset()[u],h=!1;Math.abs(c-f)>Math.abs(c+this.items[l][a]-f)&&(h=!0,c+=this.items[l][a]),s>Math.abs(c-f)&&(s=Math.abs(c-f),o=this.items[l],this.direction=h?"up":"down")}if(!o&&!this.options.dropOnEmpty)return;this.currentContainer=this.containers[r],o?this._rearrange(t,o,null,!0):this._rearrange(t,null,this.containers[r].element,!0),this._trigger("change",t,this._uiHash()),this.containers[r]._trigger("change",t,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[r]._trigger("over",t,this._uiHash(this)),this.containers[r].containerCache.over=1}},_createHelper:function(t){var n=this.options,r=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t,this.currentItem])):"clone"==n.helper?this.currentItem.clone():this.currentItem;return r.parents("body").length||e("parent"!=n.appendTo?n.appendTo:this.currentItem[0].parentNode)[0].appendChild(r[0]),r[0]==this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(""==r[0].style.width||n.forceHelperSize)&&r.width(this.currentItem.width()),(""==r[0].style.height||n.forceHelperSize)&&r.height(this.currentItem.height()),r},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"==this.cssPosition&&this.scrollParent[0]!=document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&"html"==this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"==this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t=this.options;if("parent"==t.containment&&(t.containment=this.helper[0].parentNode),("document"==t.containment||"window"==t.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,e("document"==t.containment?document:window).width()-this.helperProportions.width-this.margins.left,(e("document"==t.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),!/^(document|window|parent)$/.test(t.containment)){var n=e(t.containment)[0],r=e(t.containment).offset(),i="hidden"!=e(n).css("overflow");this.containment=[r.left+(parseInt(e(n).css("borderLeftWidth"),10)||0)+(parseInt(e(n).css("paddingLeft"),10)||0)-this.margins.left,r.top+(parseInt(e(n).css("borderTopWidth"),10)||0)+(parseInt(e(n).css("paddingTop"),10)||0)-this.margins.top,r.left+(i?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(e(n).css("borderLeftWidth"),10)||0)-(parseInt(e(n).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,r.top+(i?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(e(n).css("borderTopWidth"),10)||0)-(parseInt(e(n).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(t,n){n||(n=this.position);var r="absolute"==t?1:-1,i=(this.options,"absolute"!=this.cssPosition||this.scrollParent[0]!=document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent),s=/(html|body)/i.test(i[0].tagName);return{top:n.top+this.offset.relative.top*r+this.offset.parent.top*r-("fixed"==this.cssPosition?-this.scrollParent.scrollTop():s?0:i.scrollTop())*r,left:n.left+this.offset.relative.left*r+this.offset.parent.left*r-("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():s?0:i.scrollLeft())*r}},_generatePosition:function(t){var n=this.options,r="absolute"!=this.cssPosition||this.scrollParent[0]!=document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,i=/(html|body)/i.test(r[0].tagName);"relative"!=this.cssPosition||this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset());var s=t.pageX,o=t.pageY;if(this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(s=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(o=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(s=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),n.grid)){var u=this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1];o=this.containment?u-this.offset.click.top<this.containment[1]||u-this.offset.click.top>this.containment[3]?u-this.offset.click.top<this.containment[1]?u+n.grid[1]:u-n.grid[1]:u:u;var a=this.originalPageX+Math.round((s-this.originalPageX)/n.grid[0])*n.grid[0];s=this.containment?a-this.offset.click.left<this.containment[0]||a-this.offset.click.left>this.containment[2]?a-this.offset.click.left<this.containment[0]?a+n.grid[0]:a-n.grid[0]:a:a}return{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"==this.cssPosition?-this.scrollParent.scrollTop():i?0:r.scrollTop()),left:s-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():i?0:r.scrollLeft())}},_rearrange:function(e,t,n,r){n?n[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"==this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var i=this.counter;this._delay(function(){i==this.counter&&this.refreshPositions(!r)})},_clear:function(t,n){this.reverting=!1;var r=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]==this.currentItem[0]){for(var i in this._storedCSS)("auto"==this._storedCSS[i]||"static"==this._storedCSS[i])&&(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!n&&r.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev==this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent==this.currentItem.parent()[0]||n||r.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(n||(r.push(function(e){this._trigger("remove",e,this._uiHash())}),r.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),r.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer))));for(var i=this.containers.length-1;i>=0;i--)n||r.push(function(e){return function(t){e._trigger("deactivate",t,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(r.push(function(e){return function(t){e._trigger("out",t,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over=0);if(this._storedCursor&&e("body").css("cursor",this._storedCursor),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"==this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!n){this._trigger("beforeStop",t,this._uiHash());for(var i=0;r.length>i;i++)r[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(n||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!=this.currentItem[0]&&this.helper.remove(),this.helper=null,!n){for(var i=0;r.length>i;i++)r[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var n=t||this;return{helper:n.helper,placeholder:n.placeholder||e([]),position:n.position,originalPosition:n.originalPosition,offset:n.positionAbs,item:n.currentItem,sender:t?t.element:null}}})})(jQuery);(function(e){var t=0,n={},r={};n.height=n.paddingTop=n.paddingBottom=n.borderTopWidth=n.borderBottomWidth="hide",r.height=r.paddingTop=r.paddingBottom=r.borderTopWidth=r.borderBottomWidth="show",e.widget("ui.accordion",{version:"1.9.2",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var n=this.accordionId="ui-accordion-"+(this.element.attr("id")||++t),r=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset"),this.headers=this.element.find(r.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this._hoverable(this.headers),this._focusable(this.headers),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").hide(),r.collapsible||r.active!==!1&&null!=r.active||(r.active=0),0>r.active&&(r.active+=this.headers.length),this.active=this._findActive(r.active).addClass("ui-accordion-header-active ui-state-active").toggleClass("ui-corner-all ui-corner-top"),this.active.next().addClass("ui-accordion-content-active").show(),this._createIcons(),this.refresh(),this.element.attr("role","tablist"),this.headers.attr("role","tab").each(function(t){var r=e(this),s=r.attr("id"),o=r.next(),u=o.attr("id");s||(s=n+"-header-"+t,r.attr("id",s)),u||(u=n+"-panel-"+t,o.attr("id",u)),r.attr("aria-controls",u),o.attr("aria-labelledby",s)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._on(this.headers,{keydown:"_keydown"}),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._setupEvents(r.event)},_getCreateEventData:function(){return{header:this.active,content:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("<span>").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){return"active"===e?(this._activate(t),undefined):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||this.options.active!==!1||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),"disabled"===e&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t),undefined)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var n=e.ui.keyCode,r=this.headers.length,i=this.headers.index(t.target),s=!1;switch(t.keyCode){case n.RIGHT:case n.DOWN:s=this.headers[(i+1)%r];break;case n.LEFT:case n.UP:s=this.headers[(i-1+r)%r];break;case n.SPACE:case n.ENTER:this._eventHandler(t);break;case n.HOME:s=this.headers[0];break;case n.END:s=this.headers[r-1]}s&&(e(t.target).attr("tabIndex",-1),e(s).attr("tabIndex",0),s.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t,n,r=this.options.heightStyle,i=this.element.parent();"fill"===r?(e.support.minHeight||(n=i.css("overflow"),i.css("overflow","hidden")),t=i.height(),this.element.siblings(":visible").each(function(){var n=e(this),r=n.css("position");"absolute"!==r&&"fixed"!==r&&(t-=n.outerHeight(!0))}),n&&i.css("overflow",n),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===r&&(t=0,this.headers.next().each(function(){t=Math.max(t,e(this).css("height","").height())}).height(t))},_activate:function(t){var n=this._findActive(t)[0];n!==this.active[0]&&(n=n||this.active[0],this._eventHandler({target:n,currentTarget:n,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var n={};t&&(e.each(t.split(" "),function(e,t){n[t]="_eventHandler"}),this._on(this.headers,n))},_eventHandler:function(t){var n=this.options,r=this.active,i=e(t.currentTarget),s=i[0]===r[0],o=s&&n.collapsible,u=o?e():i.next(),a=r.next(),f={oldHeader:r,oldPanel:a,newHeader:o?e():i,newPanel:u};t.preventDefault(),s&&!n.collapsible||this._trigger("beforeActivate",t,f)===!1||(n.active=o?!1:this.headers.index(i),this.active=s?e():i,this._toggle(f),r.removeClass("ui-accordion-header-active ui-state-active"),n.icons&&r.children(".ui-accordion-header-icon").removeClass(n.icons.activeHeader).addClass(n.icons.header),s||(i.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),n.icons&&i.children(".ui-accordion-header-icon").removeClass(n.icons.header).addClass(n.icons.activeHeader),i.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var n=t.newPanel,r=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=n,this.prevHide=r,this.options.animate?this._animate(n,r,t):(r.hide(),n.show(),this._toggleComplete(t)),r.attr({"aria-expanded":"false","aria-hidden":"true"}),r.prev().attr("aria-selected","false"),n.length&&r.length?r.prev().attr("tabIndex",-1):n.length&&this.headers.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),n.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(e,t,s){var o,u,f,l=this,c=0,h=e.length&&(!t.length||e.index()<t.index()),p=this.options.animate||{},d=h&&p.down||p,v=function(){l._toggleComplete(s)};return"number"==typeof d&&(f=d),"string"==typeof d&&(u=d),u=u||d.easing||p.easing,f=f||d.duration||p.duration,t.length?e.length?(o=e.show().outerHeight(),t.animate(n,{duration:f,easing:u,step:function(e,t){t.now=Math.round(e)}}),e.hide().animate(r,{duration:f,easing:u,complete:v,step:function(e,n){n.now=Math.round(e),"height"!==n.prop?c+=n.now:"content"!==l.options.heightStyle&&(n.now=Math.round(o-t.outerHeight()-c),c=0)}}),undefined):t.animate(n,f,u,v):e.animate(r,f,u,v)},_toggleComplete:function(e){var t=e.oldPanel;t.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}}),e.uiBackCompat!==!1&&(function(e,t){e.extend(t.options,{navigation:!1,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}});var n=t._create;t._create=function(){if(this.options.navigation){var t=this,r=this.element.find(this.options.header),s=r.next(),o=r.add(s).find("a").filter(this.options.navigationFilter)[0];o&&r.add(s).each(function(n){return e.contains(this,o)?(t.options.active=Math.floor(n/2),!1):undefined})}n.call(this)}}(jQuery,jQuery.ui.accordion.prototype),function(e,t){e.extend(t.options,{heightStyle:null,autoHeight:!0,clearStyle:!1,fillSpace:!1});var n=t._create,r=t._setOption;e.extend(t,{_create:function(){this.options.heightStyle=this.options.heightStyle||this._mergeHeightStyle(),n.call(this)},_setOption:function(e){("autoHeight"===e||"clearStyle"===e||"fillSpace"===e)&&(this.options.heightStyle=this._mergeHeightStyle()),r.apply(this,arguments)},_mergeHeightStyle:function(){var e=this.options;return e.fillSpace?"fill":e.clearStyle?"content":e.autoHeight?"auto":undefined}})}(jQuery,jQuery.ui.accordion.prototype),function(e,t){e.extend(t.options.icons,{activeHeader:null,headerSelected:"ui-icon-triangle-1-s"});var n=t._createIcons;t._createIcons=function(){this.options.icons&&(this.options.icons.activeHeader=this.options.icons.activeHeader||this.options.icons.headerSelected),n.call(this)}}(jQuery,jQuery.ui.accordion.prototype),function(e,t){t.activate=t._activate;var n=t._findActive;t._findActive=function(e){return-1===e&&(e=!1),e&&"number"!=typeof e&&(e=this.headers.index(this.headers.filter(e)),-1===e&&(e=!1)),n.call(this,e)}}(jQuery,jQuery.ui.accordion.prototype),jQuery.ui.accordion.prototype.resize=jQuery.ui.accordion.prototype.refresh,function(e,t){e.extend(t.options,{change:null,changestart:null});var n=t._trigger;t._trigger=function(e,t,r){var s=n.apply(this,arguments);return s?("beforeActivate"===e?s=n.call(this,"changestart",t,{oldHeader:r.oldHeader,oldContent:r.oldPanel,newHeader:r.newHeader,newContent:r.newPanel}):"activate"===e&&(s=n.call(this,"change",t,{oldHeader:r.oldHeader,oldContent:r.oldPanel,newHeader:r.newHeader,newContent:r.newPanel})),s):!1}}(jQuery,jQuery.ui.accordion.prototype),function(e,t){e.extend(t.options,{animate:null,animated:"slide"});var n=t._create;t._create=function(){var e=this.options;null===e.animate&&(e.animate=e.animated?"slide"===e.animated?300:"bounceslide"===e.animated?{duration:200,down:{easing:"easeOutBounce",duration:1e3}}:e.animated:!1),n.call(this)}}(jQuery,jQuery.ui.accordion.prototype))})(jQuery);(function(e){var t=0;e.widget("ui.autocomplete",{version:"1.9.2",defaultElement:"<input>",options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var t,n,r;this.isMultiLine=this._isMultiLine(),this.valueMethod=this.element[this.element.is("input,textarea")?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(s){if(this.element.prop("readOnly"))return t=!0,r=!0,n=!0,undefined;t=!1,r=!1,n=!1;var o=e.ui.keyCode;switch(s.keyCode){case o.PAGE_UP:t=!0,this._move("previousPage",s);break;case o.PAGE_DOWN:t=!0,this._move("nextPage",s);break;case o.UP:t=!0,this._keyEvent("previous",s);break;case o.DOWN:t=!0,this._keyEvent("next",s);break;case o.ENTER:case o.NUMPAD_ENTER:this.menu.active&&(t=!0,s.preventDefault(),this.menu.select(s));break;case o.TAB:this.menu.active&&this.menu.select(s);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(s),s.preventDefault());break;default:n=!0,this._searchTimeout(s)}},keypress:function(r){if(t)return t=!1,r.preventDefault(),undefined;if(!n){var s=e.ui.keyCode;switch(r.keyCode){case s.PAGE_UP:this._move("previousPage",r);break;case s.PAGE_DOWN:this._move("nextPage",r);break;case s.UP:this._keyEvent("previous",r);break;case s.DOWN:this._keyEvent("next",r)}}},input:function(e){return r?(r=!1,e.preventDefault(),undefined):(this._searchTimeout(e),undefined)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,undefined):(clearTimeout(this.searching),this.close(e),this._change(e),undefined)}}),this._initSource(),this.menu=e("<ul>").addClass("ui-autocomplete").appendTo(this.document.find(this.options.appendTo||"body")[0]).menu({input:e(),role:null}).zIndex(this.element.zIndex()+1).hide().data("menu"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var n=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(r){r.target===t.element[0]||r.target===n||e.contains(n,r.target)||t.close()})})},menufocus:function(t,n){if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)}),undefined;var r=n.item.data("ui-autocomplete-item")||n.item.data("item.autocomplete");!1!==this._trigger("focus",t,{item:r})?t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(r.value):this.liveRegion.text(r.value)},menuselect:function(e,t){var n=t.item.data("ui-autocomplete-item")||t.item.data("item.autocomplete"),r=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=r,this._delay(function(){this.previous=r,this.selectedItem=n})),!1!==this._trigger("select",e,{item:n})&&this._value(n.value),this.term=this._value(),this.close(e),this.selectedItem=n}}),this.liveRegion=e("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertAfter(this.element),e.fn.bgiframe&&this.menu.element.bgiframe(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this.document.find(t||"body")[0]),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_isMultiLine:function(){return this.element.is("textarea")?!0:this.element.is("input")?!1:this.element.prop("isContentEditable")},_initSource:function(){var t,n,r=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(n,r){r(e.ui.autocomplete.filter(t,n.term))}):"string"==typeof this.options.source?(n=this.options.source,this.source=function(t,s){r.xhr&&r.xhr.abort(),r.xhr=e.ajax({url:n,data:t,dataType:"json",success:function(e){s(e)},error:function(){s([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):this._trigger("search",t)!==!1?this._search(e):undefined},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var e=this,n=++t;return function(r){n===t&&e.__response(r),e.pending--,e.pending||e.element.removeClass("ui-autocomplete-loading")}},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({label:t.label||t.value,value:t.value||t.label},t)})},_suggest:function(t){var n=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(n,t),this.menu.refresh(),n.show(),this._resizeMenu(),n.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,n){var r=this;e.each(n,function(e,n){r._renderItemData(t,n)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,n){return e("<li>").append(e("<a>").text(n.label)).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this._value(this.term),this.menu.blur(),undefined):(this.menu[e](t),undefined):(this.search(null,t),undefined)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,n){var r=RegExp(e.ui.autocomplete.escapeRegex(n),"i");return e.grep(t,function(e){return r.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var t;this._superApply(arguments),this.options.disabled||this.cancelSearch||(t=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.text(t))}})})(jQuery);(function(e){var t,n,r,i,s="ui-button ui-widget ui-state-default ui-corner-all",o="ui-state-hover ui-state-active ",u="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",a=function(){var t=e(this).find(":ui-button");setTimeout(function(){t.button("refresh")},1)},f=function(t){var n=t.name,r=t.form,i=e([]);return n&&(i=r?e(r).find("[name='"+n+"']"):e("[name='"+n+"']",t.ownerDocument).filter(function(){return!this.form})),i};e.widget("ui.button",{version:"1.9.2",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,a),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var o=this,u=this.options,c="checkbox"===this.type||"radio"===this.type,p=c?"":"ui-state-active",d="ui-state-focus";null===u.label&&(u.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(s).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){u.disabled||this===t&&e(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){u.disabled||e(this).removeClass(p)}).bind("click"+this.eventNamespace,function(e){u.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){o.buttonElement.addClass(d)}).bind("blur"+this.eventNamespace,function(){o.buttonElement.removeClass(d)}),c&&(this.element.bind("change"+this.eventNamespace,function(){i||o.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(e){u.disabled||(i=!1,n=e.pageX,r=e.pageY)}).bind("mouseup"+this.eventNamespace,function(e){u.disabled||(n!==e.pageX||r!==e.pageY)&&(i=!0)})),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return u.disabled||i?!1:(e(this).toggleClass("ui-state-active"),o.buttonElement.attr("aria-pressed",o.element[0].checked),undefined)}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(u.disabled||i)return!1;e(this).addClass("ui-state-active"),o.buttonElement.attr("aria-pressed","true");var t=o.element[0];f(t).not(t).map(function(){return e(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return u.disabled?!1:(e(this).addClass("ui-state-active"),t=this,o.document.one("mouseup",function(){t=null}),undefined)}).bind("mouseup"+this.eventNamespace,function(){return u.disabled?!1:(e(this).removeClass("ui-state-active"),undefined)}).bind("keydown"+this.eventNamespace,function(t){return u.disabled?!1:((t.keyCode===e.ui.keyCode.SPACE||t.keyCode===e.ui.keyCode.ENTER)&&e(this).addClass("ui-state-active"),undefined)}).bind("keyup"+this.eventNamespace,function(){e(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===e.ui.keyCode.SPACE&&e(this).click()})),this._setOption("disabled",u.disabled),this._resetButton()},_determineButtonType:function(){var e,t,n;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(e=this.element.parents().last(),t="label[for='"+this.element.attr("id")+"']",this.buttonElement=e.find(t),this.buttonElement.length||(e=e.length?e.siblings():this.element.siblings(),this.buttonElement=e.filter(t),this.buttonElement.length||(this.buttonElement=e.find(t))),this.element.addClass("ui-helper-hidden-accessible"),n=this.element.is(":checked"),n&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",n)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(s+" "+o+" "+u).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(e,t){return this._super(e,t),"disabled"===e?(t?this.element.prop("disabled",!0):this.element.prop("disabled",!1),undefined):(this._resetButton(),undefined)},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t),"radio"===this.type?f(this.element[0]).each(function(){e(this).is(":checked")?e(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),undefined;var t=this.buttonElement.removeClass(u),n=e("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),r=this.options.icons,i=r.primary&&r.secondary,s=[];r.primary||r.secondary?(this.options.text&&s.push("ui-button-text-icon"+(i?"s":r.primary?"-primary":"-secondary")),r.primary&&t.prepend("<span class='ui-button-icon-primary ui-icon "+r.primary+"'></span>"),r.secondary&&t.append("<span class='ui-button-icon-secondary ui-icon "+r.secondary+"'></span>"),this.options.text||(s.push(i?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||t.attr("title",e.trim(n)))):s.push("ui-button-text-only"),t.addClass(s.join(" "))}}),e.widget("ui.buttonset",{version:"1.9.2",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,t){"disabled"===e&&this.buttons.button("option",e,t),this._super(e,t)},refresh:function(){var t="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})})(jQuery);(function($,undefined){function Datepicker(){this.debug=!1,this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},$.extend(this._defaults,this.regional[""]),this.dpDiv=bindHover($('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function bindHover(e){var t="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(t,"mouseout",function(){$(this).removeClass("ui-state-hover"),-1!=this.className.indexOf("ui-datepicker-prev")&&$(this).removeClass("ui-datepicker-prev-hover"),-1!=this.className.indexOf("ui-datepicker-next")&&$(this).removeClass("ui-datepicker-next-hover")}).delegate(t,"mouseover",function(){$.datepicker._isDisabledDatepicker(instActive.inline?e.parent()[0]:instActive.input[0])||($(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),$(this).addClass("ui-state-hover"),-1!=this.className.indexOf("ui-datepicker-prev")&&$(this).addClass("ui-datepicker-prev-hover"),-1!=this.className.indexOf("ui-datepicker-next")&&$(this).addClass("ui-datepicker-next-hover"))})}function extendRemove(e,t){$.extend(e,t);for(var n in t)(null==t[n]||t[n]==undefined)&&(e[n]=t[n]);return e}$.extend($.ui,{datepicker:{version:"1.9.2"}});var PROP_NAME="datepicker",dpuuid=(new Date).getTime(),instActive;$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return extendRemove(this._defaults,e||{}),this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase(),inline="div"==nodeName||"span"==nodeName;target.id||(this.uuid+=1,target.id="dp"+this.uuid);var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{}),"input"==nodeName?this._connectDatepicker(target,inst):inline&&this._inlineDatepicker(target,inst)},_newInst:function(e,t){var n=e[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:n,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:t,dpDiv:t?bindHover($('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')):this.dpDiv}},_connectDatepicker:function(e,t){var n=$(e);t.append=$([]),t.trigger=$([]),n.hasClass(this.markerClassName)||(this._attachments(n,t),n.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(e,n,r){t.settings[n]=r}).bind("getData.datepicker",function(e,n){return this._get(t,n)}),this._autoSize(t),$.data(e,PROP_NAME,t),t.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,t){var n=this._get(t,"appendText"),r=this._get(t,"isRTL");t.append&&t.append.remove(),n&&(t.append=$('<span class="'+this._appendClass+'">'+n+"</span>"),e[r?"before":"after"](t.append)),e.unbind("focus",this._showDatepicker),t.trigger&&t.trigger.remove();var i=this._get(t,"showOn");if(("focus"==i||"both"==i)&&e.focus(this._showDatepicker),"button"==i||"both"==i){var s=this._get(t,"buttonText"),o=this._get(t,"buttonImage");t.trigger=$(this._get(t,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:o,alt:s,title:s}):$('<button type="button"></button>').addClass(this._triggerClass).html(""==o?s:$("<img/>").attr({src:o,alt:s,title:s}))),e[r?"before":"after"](t.trigger),t.trigger.click(function(){return $.datepicker._datepickerShowing&&$.datepicker._lastInput==e[0]?$.datepicker._hideDatepicker():$.datepicker._datepickerShowing&&$.datepicker._lastInput!=e[0]?($.datepicker._hideDatepicker(),$.datepicker._showDatepicker(e[0])):$.datepicker._showDatepicker(e[0]),!1})}},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t=new Date(2009,11,20),n=this._get(e,"dateFormat");if(n.match(/[DM]/)){var r=function(e){for(var t=0,n=0,r=0;e.length>r;r++)e[r].length>t&&(t=e[r].length,n=r);return n};t.setMonth(r(this._get(e,n.match(/MM/)?"monthNames":"monthNamesShort"))),t.setDate(r(this._get(e,n.match(/DD/)?"dayNames":"dayNamesShort"))+20-t.getDay())}e.input.attr("size",this._formatDate(e,t).length)}},_inlineDatepicker:function(e,t){var n=$(e);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(t.dpDiv).bind("setData.datepicker",function(e,n,r){t.settings[n]=r}).bind("getData.datepicker",function(e,n){return this._get(t,n)}),$.data(e,PROP_NAME,t),this._setDate(t,this._getDefaultDate(t),!0),this._updateDatepicker(t),this._updateAlternate(t),t.settings.disabled&&this._disableDatepicker(e),t.dpDiv.css("display","block"))},_dialogDatepicker:function(e,t,n,r,i){var s=this._dialogInst;if(!s){this.uuid+=1;var o="dp"+this.uuid;this._dialogInput=$('<input type="text" id="'+o+'" style="position: absolute; top: -100px; width: 0px;"/>'),this._dialogInput.keydown(this._doKeyDown),$("body").append(this._dialogInput),s=this._dialogInst=this._newInst(this._dialogInput,!1),s.settings={},$.data(this._dialogInput[0],PROP_NAME,s)}if(extendRemove(s.settings,r||{}),t=t&&t.constructor==Date?this._formatDate(s,t):t,this._dialogInput.val(t),this._pos=i?i.length?i:[i.pageX,i.pageY]:null,!this._pos){var u=document.documentElement.clientWidth,a=document.documentElement.clientHeight,f=document.documentElement.scrollLeft||document.body.scrollLeft,l=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[u/2-100+f,a/2-150+l]}return this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),s.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),$.blockUI&&$.blockUI(this.dpDiv),$.data(this._dialogInput[0],PROP_NAME,s),this},_destroyDatepicker:function(e){var t=$(e),n=$.data(e,PROP_NAME);if(t.hasClass(this.markerClassName)){var r=e.nodeName.toLowerCase();$.removeData(e,PROP_NAME),"input"==r?(n.append.remove(),n.trigger.remove(),t.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"==r||"span"==r)&&t.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(e){var t=$(e),n=$.data(e,PROP_NAME);if(t.hasClass(this.markerClassName)){var r=e.nodeName.toLowerCase();if("input"==r)e.disabled=!1,n.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if("div"==r||"span"==r){var i=t.children("."+this._inlineClass);i.children().removeClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)}this._disabledInputs=$.map(this._disabledInputs,function(t){return t==e?null:t})}},_disableDatepicker:function(e){var t=$(e),n=$.data(e,PROP_NAME);if(t.hasClass(this.markerClassName)){var r=e.nodeName.toLowerCase();if("input"==r)e.disabled=!0,n.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"});else if("div"==r||"span"==r){var i=t.children("."+this._inlineClass);i.children().addClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)}this._disabledInputs=$.map(this._disabledInputs,function(t){return t==e?null:t}),this._disabledInputs[this._disabledInputs.length]=e}},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;this._disabledInputs.length>t;t++)if(this._disabledInputs[t]==e)return!0;return!1},_getInst:function(e){try{return $.data(e,PROP_NAME)}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,t,n){var r=this._getInst(e);if(2==arguments.length&&"string"==typeof t)return"defaults"==t?$.extend({},$.datepicker._defaults):r?"all"==t?$.extend({},r.settings):this._get(r,t):null;var i=t||{};if("string"==typeof t&&(i={},i[t]=n),r){this._curInst==r&&this._hideDatepicker();var s=this._getDateDatepicker(e,!0),o=this._getMinMaxDate(r,"min"),u=this._getMinMaxDate(r,"max");extendRemove(r.settings,i),null!==o&&i.dateFormat!==undefined&&i.minDate===undefined&&(r.settings.minDate=this._formatDate(r,o)),null!==u&&i.dateFormat!==undefined&&i.maxDate===undefined&&(r.settings.maxDate=this._formatDate(r,u)),this._attachments($(e),r),this._autoSize(r),this._setDate(r,s),this._updateAlternate(r),this._updateDatepicker(r)}},_changeDatepicker:function(e,t,n){this._optionDatepicker(e,t,n)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var n=this._getInst(e);n&&(this._setDate(n,t),this._updateDatepicker(n),this._updateAlternate(n))},_getDateDatepicker:function(e,t){var n=this._getInst(e);return n&&!n.inline&&this._setDateFromField(n,t),n?this._getDate(n):null},_doKeyDown:function(e){var t=$.datepicker._getInst(e.target),n=!0,r=t.dpDiv.is(".ui-datepicker-rtl");if(t._keyEvent=!0,$.datepicker._datepickerShowing)switch(e.keyCode){case 9:$.datepicker._hideDatepicker(),n=!1;break;case 13:var i=$("td."+$.datepicker._dayOverClass+":not(."+$.datepicker._currentClass+")",t.dpDiv);i[0]&&$.datepicker._selectDay(e.target,t.selectedMonth,t.selectedYear,i[0]);var s=$.datepicker._get(t,"onSelect");if(s){var o=$.datepicker._formatDate(t);s.apply(t.input?t.input[0]:null,[o,t])}else $.datepicker._hideDatepicker();return!1;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(e.target,e.ctrlKey?-$.datepicker._get(t,"stepBigMonths"):-$.datepicker._get(t,"stepMonths"),"M");break;case 34:$.datepicker._adjustDate(e.target,e.ctrlKey?+$.datepicker._get(t,"stepBigMonths"):+$.datepicker._get(t,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&$.datepicker._clearDate(e.target),n=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&$.datepicker._gotoToday(e.target),n=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,r?1:-1,"D"),n=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&$.datepicker._adjustDate(e.target,e.ctrlKey?-$.datepicker._get(t,"stepBigMonths"):-$.datepicker._get(t,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,-7,"D"),n=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,r?-1:1,"D"),n=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&$.datepicker._adjustDate(e.target,e.ctrlKey?+$.datepicker._get(t,"stepBigMonths"):+$.datepicker._get(t,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,7,"D"),n=e.ctrlKey||e.metaKey;break;default:n=!1}else 36==e.keyCode&&e.ctrlKey?$.datepicker._showDatepicker(this):n=!1;n&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var t=$.datepicker._getInst(e.target);if($.datepicker._get(t,"constrainInput")){var n=$.datepicker._possibleChars($.datepicker._get(t,"dateFormat")),r=String.fromCharCode(e.charCode==undefined?e.keyCode:e.charCode);return e.ctrlKey||e.metaKey||" ">r||!n||n.indexOf(r)>-1}},_doKeyUp:function(e){var t=$.datepicker._getInst(e.target);if(t.input.val()!=t.lastVal)try{var n=$.datepicker.parseDate($.datepicker._get(t,"dateFormat"),t.input?t.input.val():null,$.datepicker._getFormatConfig(t));n&&($.datepicker._setDateFromField(t),$.datepicker._updateAlternate(t),$.datepicker._updateDatepicker(t))}catch(r){$.datepicker.log(r)}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!=e.nodeName.toLowerCase()&&(e=$("input",e.parentNode)[0]),!$.datepicker._isDisabledDatepicker(e)&&$.datepicker._lastInput!=e){var t=$.datepicker._getInst(e);$.datepicker._curInst&&$.datepicker._curInst!=t&&($.datepicker._curInst.dpDiv.stop(!0,!0),t&&$.datepicker._datepickerShowing&&$.datepicker._hideDatepicker($.datepicker._curInst.input[0]));var n=$.datepicker._get(t,"beforeShow"),r=n?n.apply(e,[e,t]):{};if(r!==!1){extendRemove(t.settings,r),t.lastVal=null,$.datepicker._lastInput=e,$.datepicker._setDateFromField(t),$.datepicker._inDialog&&(e.value=""),$.datepicker._pos||($.datepicker._pos=$.datepicker._findPos(e),$.datepicker._pos[1]+=e.offsetHeight);var i=!1;$(e).parents().each(function(){return i|="fixed"==$(this).css("position"),!i});var s={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};if($.datepicker._pos=null,t.dpDiv.empty(),t.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),$.datepicker._updateDatepicker(t),s=$.datepicker._checkOffset(t,s,i),t.dpDiv.css({position:$.datepicker._inDialog&&$.blockUI?"static":i?"fixed":"absolute",display:"none",left:s.left+"px",top:s.top+"px"}),!t.inline){var o=$.datepicker._get(t,"showAnim"),u=$.datepicker._get(t,"duration"),a=function(){var e=t.dpDiv.find("iframe.ui-datepicker-cover");if(e.length){var n=$.datepicker._getBorders(t.dpDiv);e.css({left:-n[0],top:-n[1],width:t.dpDiv.outerWidth(),height:t.dpDiv.outerHeight()})}};t.dpDiv.zIndex($(e).zIndex()+1),$.datepicker._datepickerShowing=!0,$.effects&&($.effects.effect[o]||$.effects[o])?t.dpDiv.show(o,$.datepicker._get(t,"showOptions"),u,a):t.dpDiv[o||"show"](o?u:null,a),o&&u||a(),t.input.is(":visible")&&!t.input.is(":disabled")&&t.input.focus(),$.datepicker._curInst=t}}}},_updateDatepicker:function(e){this.maxRows=4;var t=$.datepicker._getBorders(e.dpDiv);instActive=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var n=e.dpDiv.find("iframe.ui-datepicker-cover");n.length&&n.css({left:-t[0],top:-t[1],width:e.dpDiv.outerWidth(),height:e.dpDiv.outerHeight()}),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var r=this._getNumberOfMonths(e),i=r[1],s=17;if(e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),i>1&&e.dpDiv.addClass("ui-datepicker-multi-"+i).css("width",s*i+"em"),e.dpDiv[(1!=r[0]||1!=r[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e==$.datepicker._curInst&&$.datepicker._datepickerShowing&&e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&e.input[0]!=document.activeElement&&e.input.focus(),e.yearshtml){var o=e.yearshtml;setTimeout(function(){o===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),o=e.yearshtml=null},0)}},_getBorders:function(e){var t=function(e){return{thin:1,medium:2,thick:3}[e]||e};return[parseFloat(t(e.css("border-left-width"))),parseFloat(t(e.css("border-top-width")))]},_checkOffset:function(e,t,n){var r=e.dpDiv.outerWidth(),i=e.dpDiv.outerHeight(),s=e.input?e.input.outerWidth():0,o=e.input?e.input.outerHeight():0,u=document.documentElement.clientWidth+(n?0:$(document).scrollLeft()),a=document.documentElement.clientHeight+(n?0:$(document).scrollTop());return t.left-=this._get(e,"isRTL")?r-s:0,t.left-=n&&t.left==e.input.offset().left?$(document).scrollLeft():0,t.top-=n&&t.top==e.input.offset().top+o?$(document).scrollTop():0,t.left-=Math.min(t.left,t.left+r>u&&u>r?Math.abs(t.left+r-u):0),t.top-=Math.min(t.top,t.top+i>a&&a>i?Math.abs(i+o):0),t},_findPos:function(e){for(var t=this._getInst(e),n=this._get(t,"isRTL");e&&("hidden"==e.type||1!=e.nodeType||$.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];var r=$(e).offset();return[r.left,r.top]},_hideDatepicker:function(e){var t=this._curInst;if(t&&(!e||t==$.data(e,PROP_NAME))&&this._datepickerShowing){var n=this._get(t,"showAnim"),r=this._get(t,"duration"),i=function(){$.datepicker._tidyDialog(t)};$.effects&&($.effects.effect[n]||$.effects[n])?t.dpDiv.hide(n,$.datepicker._get(t,"showOptions"),r,i):t.dpDiv["slideDown"==n?"slideUp":"fadeIn"==n?"fadeOut":"hide"](n?r:null,i),n||i(),this._datepickerShowing=!1;var s=this._get(t,"onClose");s&&s.apply(t.input?t.input[0]:null,[t.input?t.input.val():"",t]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),$.blockUI&&($.unblockUI(),$("body").append(this.dpDiv))),this._inDialog=!1}},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if($.datepicker._curInst){var t=$(e.target),n=$.datepicker._getInst(t[0]);(t[0].id!=$.datepicker._mainDivId&&0==t.parents("#"+$.datepicker._mainDivId).length&&!t.hasClass($.datepicker.markerClassName)&&!t.closest("."+$.datepicker._triggerClass).length&&$.datepicker._datepickerShowing&&(!$.datepicker._inDialog||!$.blockUI)||t.hasClass($.datepicker.markerClassName)&&$.datepicker._curInst!=n)&&$.datepicker._hideDatepicker()}},_adjustDate:function(e,t,n){var r=$(e),i=this._getInst(r[0]);this._isDisabledDatepicker(r[0])||(this._adjustInstDate(i,t+("M"==n?this._get(i,"showCurrentAtPos"):0),n),this._updateDatepicker(i))},_gotoToday:function(e){var t=$(e),n=this._getInst(t[0]);if(this._get(n,"gotoCurrent")&&n.currentDay)n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear;else{var r=new Date;n.selectedDay=r.getDate(),n.drawMonth=n.selectedMonth=r.getMonth(),n.drawYear=n.selectedYear=r.getFullYear()}this._notifyChange(n),this._adjustDate(t)},_selectMonthYear:function(e,t,n){var r=$(e),i=this._getInst(r[0]);i["selected"+("M"==n?"Month":"Year")]=i["draw"+("M"==n?"Month":"Year")]=parseInt(t.options[t.selectedIndex].value,10),this._notifyChange(i),this._adjustDate(r)},_selectDay:function(e,t,n,r){var i=$(e);if(!$(r).hasClass(this._unselectableClass)&&!this._isDisabledDatepicker(i[0])){var s=this._getInst(i[0]);s.selectedDay=s.currentDay=$("a",r).html(),s.selectedMonth=s.currentMonth=t,s.selectedYear=s.currentYear=n,this._selectDate(e,this._formatDate(s,s.currentDay,s.currentMonth,s.currentYear))}},_clearDate:function(e){var t=$(e);this._getInst(t[0]),this._selectDate(t,"")},_selectDate:function(e,t){var n=$(e),r=this._getInst(n[0]);t=null!=t?t:this._formatDate(r),r.input&&r.input.val(t),this._updateAlternate(r);var i=this._get(r,"onSelect");i?i.apply(r.input?r.input[0]:null,[t,r]):r.input&&r.input.trigger("change"),r.inline?this._updateDatepicker(r):(this._hideDatepicker(),this._lastInput=r.input[0],"object"!=typeof r.input[0]&&r.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var t=this._get(e,"altField");if(t){var n=this._get(e,"altFormat")||this._get(e,"dateFormat"),r=this._getDate(e),i=this.formatDate(n,r,this._getFormatConfig(e));$(t).each(function(){$(this).val(i)})}},noWeekends:function(e){var t=e.getDay();return[t>0&&6>t,""]},iso8601Week:function(e){var t=new Date(e.getTime());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},parseDate:function(e,t,n){if(null==e||null==t)throw"Invalid arguments";if(t="object"==typeof t?""+t:t+"",""==t)return null;var r=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff;r="string"!=typeof r?r:(new Date).getFullYear()%100+parseInt(r,10);for(var i=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,s=(n?n.dayNames:null)||this._defaults.dayNames,o=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,u=(n?n.monthNames:null)||this._defaults.monthNames,a=-1,f=-1,l=-1,c=-1,h=!1,p=function(t){var n=e.length>y+1&&e.charAt(y+1)==t;return n&&y++,n},d=function(e){var n=p(e),r="@"==e?14:"!"==e?20:"y"==e&&n?4:"o"==e?3:2,i=RegExp("^\\d{1,"+r+"}"),s=t.substring(g).match(i);if(!s)throw"Missing number at position "+g;return g+=s[0].length,parseInt(s[0],10)},v=function(e,n,r){var i=$.map(p(e)?r:n,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)}),s=-1;if($.each(i,function(e,n){var r=n[1];return t.substr(g,r.length).toLowerCase()==r.toLowerCase()?(s=n[0],g+=r.length,!1):undefined}),-1!=s)return s+1;throw"Unknown name at position "+g},m=function(){if(t.charAt(g)!=e.charAt(y))throw"Unexpected literal at position "+g;g++},g=0,y=0;e.length>y;y++)if(h)"'"!=e.charAt(y)||p("'")?m():h=!1;else switch(e.charAt(y)){case"d":l=d("d");break;case"D":v("D",i,s);break;case"o":c=d("o");break;case"m":f=d("m");break;case"M":f=v("M",o,u);break;case"y":a=d("y");break;case"@":var b=new Date(d("@"));a=b.getFullYear(),f=b.getMonth()+1,l=b.getDate();break;case"!":var b=new Date((d("!")-this._ticksTo1970)/1e4);a=b.getFullYear(),f=b.getMonth()+1,l=b.getDate();break;case"'":p("'")?m():h=!0;break;default:m()}if(t.length>g){var w=t.substr(g);if(!/^\s+/.test(w))throw"Extra/unparsed characters found in date: "+w}if(-1==a?a=(new Date).getFullYear():100>a&&(a+=(new Date).getFullYear()-(new Date).getFullYear()%100+(r>=a?0:-100)),c>-1)for(f=1,l=c;;){var E=this._getDaysInMonth(a,f-1);if(E>=l)break;f++,l-=E}var b=this._daylightSavingAdjust(new Date(a,f-1,l));if(b.getFullYear()!=a||b.getMonth()+1!=f||b.getDate()!=l)throw"Invalid date";return b},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(e,t,n){if(!t)return"";var r=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,i=(n?n.dayNames:null)||this._defaults.dayNames,s=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,o=(n?n.monthNames:null)||this._defaults.monthNames,u=function(t){var n=e.length>h+1&&e.charAt(h+1)==t;return n&&h++,n},a=function(e,t,n){var r=""+t;if(u(e))for(;n>r.length;)r="0"+r;return r},f=function(e,t,n,r){return u(e)?r[t]:n[t]},l="",c=!1;if(t)for(var h=0;e.length>h;h++)if(c)"'"!=e.charAt(h)||u("'")?l+=e.charAt(h):c=!1;else switch(e.charAt(h)){case"d":l+=a("d",t.getDate(),2);break;case"D":l+=f("D",t.getDay(),r,i);break;case"o":l+=a("o",Math.round(((new Date(t.getFullYear(),t.getMonth(),t.getDate())).getTime()-(new Date(t.getFullYear(),0,0)).getTime())/864e5),3);break;case"m":l+=a("m",t.getMonth()+1,2);break;case"M":l+=f("M",t.getMonth(),s,o);break;case"y":l+=u("y")?t.getFullYear():(10>t.getYear()%100?"0":"")+t.getYear()%100;break;case"@":l+=t.getTime();break;case"!":l+=1e4*t.getTime()+this._ticksTo1970;break;case"'":u("'")?l+="'":c=!0;break;default:l+=e.charAt(h)}return l},_possibleChars:function(e){for(var t="",n=!1,r=function(t){var n=e.length>i+1&&e.charAt(i+1)==t;return n&&i++,n},i=0;e.length>i;i++)if(n)"'"!=e.charAt(i)||r("'")?t+=e.charAt(i):n=!1;else switch(e.charAt(i)){case"d":case"m":case"y":case"@":t+="0123456789";break;case"D":case"M":return null;case"'":r("'")?t+="'":n=!0;break;default:t+=e.charAt(i)}return t},_get:function(e,t){return e.settings[t]!==undefined?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()!=e.lastVal){var n,r,i=this._get(e,"dateFormat"),s=e.lastVal=e.input?e.input.val():null;n=r=this._getDefaultDate(e);var o=this._getFormatConfig(e);try{n=this.parseDate(i,s,o)||r}catch(u){this.log(u),s=t?"":s}e.selectedDay=n.getDate(),e.drawMonth=e.selectedMonth=n.getMonth(),e.drawYear=e.selectedYear=n.getFullYear(),e.currentDay=s?n.getDate():0,e.currentMonth=s?n.getMonth():0,e.currentYear=s?n.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(e,t,n){var r=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},i=function(t){try{return $.datepicker.parseDate($.datepicker._get(e,"dateFormat"),t,$.datepicker._getFormatConfig(e))}catch(n){}for(var r=(t.toLowerCase().match(/^c/)?$.datepicker._getDate(e):null)||new Date,i=r.getFullYear(),s=r.getMonth(),o=r.getDate(),u=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,a=u.exec(t);a;){switch(a[2]||"d"){case"d":case"D":o+=parseInt(a[1],10);break;case"w":case"W":o+=7*parseInt(a[1],10);break;case"m":case"M":s+=parseInt(a[1],10),o=Math.min(o,$.datepicker._getDaysInMonth(i,s));break;case"y":case"Y":i+=parseInt(a[1],10),o=Math.min(o,$.datepicker._getDaysInMonth(i,s))}a=u.exec(t)}return new Date(i,s,o)},s=null==t||""===t?n:"string"==typeof t?i(t):"number"==typeof t?isNaN(t)?n:r(t):new Date(t.getTime());return s=s&&"Invalid Date"==""+s?n:s,s&&(s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0)),this._daylightSavingAdjust(s)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,n){var r=!t,i=e.selectedMonth,s=e.selectedYear,o=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=o.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=o.getMonth(),e.drawYear=e.selectedYear=e.currentYear=o.getFullYear(),i==e.selectedMonth&&s==e.selectedYear||n||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(r?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&""==e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(e){var t=this._get(e,"stepMonths"),n="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(n,-t,"M")},next:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(n,+t,"M")},hide:function(){window["DP_jQuery_"+dpuuid].datepicker._hideDatepicker()},today:function(){window["DP_jQuery_"+dpuuid].datepicker._gotoToday(n)},selectDay:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(n,this,"Y"),!1}};$(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t=new Date;t=this._daylightSavingAdjust(new Date(t.getFullYear(),t.getMonth(),t.getDate()));var n=this._get(e,"isRTL"),r=this._get(e,"showButtonPanel"),i=this._get(e,"hideIfNoPrevNext"),s=this._get(e,"navigationAsDateFormat"),o=this._getNumberOfMonths(e),u=this._get(e,"showCurrentAtPos"),a=this._get(e,"stepMonths"),f=1!=o[0]||1!=o[1],l=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),c=this._getMinMaxDate(e,"min"),h=this._getMinMaxDate(e,"max"),p=e.drawMonth-u,d=e.drawYear;if(0>p&&(p+=12,d--),h){var v=this._daylightSavingAdjust(new Date(h.getFullYear(),h.getMonth()-o[0]*o[1]+1,h.getDate()));for(v=c&&c>v?c:v;this._daylightSavingAdjust(new Date(d,p,1))>v;)p--,0>p&&(p=11,d--)}e.drawMonth=p,e.drawYear=d;var m=this._get(e,"prevText");m=s?this.formatDate(m,this._daylightSavingAdjust(new Date(d,p-a,1)),this._getFormatConfig(e)):m;var g=this._canAdjustMonth(e,-1,d,p)?'<a class="ui-datepicker-prev ui-corner-all" data-handler="prev" data-event="click" title="'+m+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"e":"w")+'">'+m+"</span></a>":i?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+m+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"e":"w")+'">'+m+"</span></a>",y=this._get(e,"nextText");y=s?this.formatDate(y,this._daylightSavingAdjust(new Date(d,p+a,1)),this._getFormatConfig(e)):y;var b=this._canAdjustMonth(e,1,d,p)?'<a class="ui-datepicker-next ui-corner-all" data-handler="next" data-event="click" title="'+y+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"w":"e")+'">'+y+"</span></a>":i?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+y+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"w":"e")+'">'+y+"</span></a>",w=this._get(e,"currentText"),E=this._get(e,"gotoCurrent")&&e.currentDay?l:t;w=s?this.formatDate(w,E,this._getFormatConfig(e)):w;var S=e.inline?"":'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" data-handler="hide" data-event="click">'+this._get(e,"closeText")+"</button>",x=r?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(n?S:"")+(this._isInRange(e,E)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" data-handler="today" data-event="click">'+w+"</button>":"")+(n?"":S)+"</div>":"",T=parseInt(this._get(e,"firstDay"),10);T=isNaN(T)?0:T;var N=this._get(e,"showWeek"),C=this._get(e,"dayNames");this._get(e,"dayNamesShort");var k=this._get(e,"dayNamesMin"),L=this._get(e,"monthNames"),A=this._get(e,"monthNamesShort"),O=this._get(e,"beforeShowDay"),M=this._get(e,"showOtherMonths"),_=this._get(e,"selectOtherMonths");this._get(e,"calculateWeek")||this.iso8601Week;for(var D=this._getDefaultDate(e),P="",H=0;o[0]>H;H++){var B="";this.maxRows=4;for(var j=0;o[1]>j;j++){var F=this._daylightSavingAdjust(new Date(d,p,e.selectedDay)),I=" ui-corner-all",q="";if(f){if(q+='<div class="ui-datepicker-group',o[1]>1)switch(j){case 0:q+=" ui-datepicker-group-first",I=" ui-corner-"+(n?"right":"left");break;case o[1]-1:q+=" ui-datepicker-group-last",I=" ui-corner-"+(n?"left":"right");break;default:q+=" ui-datepicker-group-middle",I=""}q+='">'}q+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+I+'">'+(/all|left/.test(I)&&0==H?n?b:g:"")+(/all|right/.test(I)&&0==H?n?g:b:"")+this._generateMonthYearHeader(e,p,d,c,h,H>0||j>0,L,A)+'</div><table class="ui-datepicker-calendar"><thead>'+"<tr>";for(var R=N?'<th class="ui-datepicker-week-col">'+this._get(e,"weekHeader")+"</th>":"",U=0;7>U;U++){var z=(U+T)%7;R+="<th"+((U+T+6)%7>=5?' class="ui-datepicker-week-end"':"")+">"+'<span title="'+C[z]+'">'+k[z]+"</span></th>"}q+=R+"</tr></thead><tbody>";var W=this._getDaysInMonth(d,p);d==e.selectedYear&&p==e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,W));var X=(this._getFirstDayOfMonth(d,p)-T+7)%7,V=Math.ceil((X+W)/7),J=f?this.maxRows>V?this.maxRows:V:V;this.maxRows=J;for(var K=this._daylightSavingAdjust(new Date(d,p,1-X)),Q=0;J>Q;Q++){q+="<tr>";for(var G=N?'<td class="ui-datepicker-week-col">'+this._get(e,"calculateWeek")(K)+"</td>":"",U=0;7>U;U++){var Y=O?O.apply(e.input?e.input[0]:null,[K]):[!0,""],Z=K.getMonth()!=p,et=Z&&!_||!Y[0]||c&&c>K||h&&K>h;G+='<td class="'+((U+T+6)%7>=5?" ui-datepicker-week-end":"")+(Z?" ui-datepicker-other-month":"")+(K.getTime()==F.getTime()&&p==e.selectedMonth&&e._keyEvent||D.getTime()==K.getTime()&&D.getTime()==F.getTime()?" "+this._dayOverClass:"")+(et?" "+this._unselectableClass+" ui-state-disabled":"")+(Z&&!M?"":" "+Y[1]+(K.getTime()==l.getTime()?" "+this._currentClass:"")+(K.getTime()==t.getTime()?" ui-datepicker-today":""))+'"'+(Z&&!M||!Y[2]?"":' title="'+Y[2]+'"')+(et?"":' data-handler="selectDay" data-event="click" data-month="'+K.getMonth()+'" data-year="'+K.getFullYear()+'"')+">"+(Z&&!M?" ":et?'<span class="ui-state-default">'+K.getDate()+"</span>":'<a class="ui-state-default'+(K.getTime()==t.getTime()?" ui-state-highlight":"")+(K.getTime()==l.getTime()?" ui-state-active":"")+(Z?" ui-priority-secondary":"")+'" href="#">'+K.getDate()+"</a>")+"</td>",K.setDate(K.getDate()+1),K=this._daylightSavingAdjust(K)}q+=G+"</tr>"}p++,p>11&&(p=0,d++),q+="</tbody></table>"+(f?"</div>"+(o[0]>0&&j==o[1]-1?'<div class="ui-datepicker-row-break"></div>':""):""),B+=q}P+=B}return P+=x+($.ui.ie6&&!e.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':""),e._keyEvent=!1,P},_generateMonthYearHeader:function(e,t,n,r,i,s,o,u){var a=this._get(e,"changeMonth"),f=this._get(e,"changeYear"),l=this._get(e,"showMonthAfterYear"),c='<div class="ui-datepicker-title">',h="";if(s||!a)h+='<span class="ui-datepicker-month">'+o[t]+"</span>";else{var p=r&&r.getFullYear()==n,d=i&&i.getFullYear()==n;h+='<select class="ui-datepicker-month" data-handler="selectMonth" data-event="change">';for(var v=0;12>v;v++)(!p||v>=r.getMonth())&&(!d||i.getMonth()>=v)&&(h+='<option value="'+v+'"'+(v==t?' selected="selected"':"")+">"+u[v]+"</option>");h+="</select>"}if(l||(c+=h+(!s&&a&&f?"":" ")),!e.yearshtml)if(e.yearshtml="",s||!f)c+='<span class="ui-datepicker-year">'+n+"</span>";else{var m=this._get(e,"yearRange").split(":"),g=(new Date).getFullYear(),y=function(e){var t=e.match(/c[+-].*/)?n+parseInt(e.substring(1),10):e.match(/[+-].*/)?g+parseInt(e,10):parseInt(e,10);return isNaN(t)?g:t},b=y(m[0]),w=Math.max(b,y(m[1]||""));for(b=r?Math.max(b,r.getFullYear()):b,w=i?Math.min(w,i.getFullYear()):w,e.yearshtml+='<select class="ui-datepicker-year" data-handler="selectYear" data-event="change">';w>=b;b++)e.yearshtml+='<option value="'+b+'"'+(b==n?' selected="selected"':"")+">"+b+"</option>";e.yearshtml+="</select>",c+=e.yearshtml,e.yearshtml=null}return c+=this._get(e,"yearSuffix"),l&&(c+=(!s&&a&&f?"":" ")+h),c+="</div>"},_adjustInstDate:function(e,t,n){var r=e.drawYear+("Y"==n?t:0),i=e.drawMonth+("M"==n?t:0),s=Math.min(e.selectedDay,this._getDaysInMonth(r,i))+("D"==n?t:0),o=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(r,i,s)));e.selectedDay=o.getDate(),e.drawMonth=e.selectedMonth=o.getMonth(),e.drawYear=e.selectedYear=o.getFullYear(),("M"==n||"Y"==n)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var n=this._getMinMaxDate(e,"min"),r=this._getMinMaxDate(e,"max"),i=n&&n>t?n:t;return i=r&&i>r?r:i},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return(new Date(e,t,1)).getDay()},_canAdjustMonth:function(e,t,n,r){var i=this._getNumberOfMonths(e),s=this._daylightSavingAdjust(new Date(n,r+(0>t?t:i[0]*i[1]),1));return 0>t&&s.setDate(this._getDaysInMonth(s.getFullYear(),s.getMonth())),this._isInRange(e,s)},_isInRange:function(e,t){var n=this._getMinMaxDate(e,"min"),r=this._getMinMaxDate(e,"max");return(!n||t.getTime()>=n.getTime())&&(!r||t.getTime()<=r.getTime())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,n,r){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var i=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(r,n,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),i,this._getFormatConfig(e))}}),$.fn.datepicker=function(e){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find(document.body).append($.datepicker.dpDiv),$.datepicker.initialized=!0);var t=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!=e&&"getDate"!=e&&"widget"!=e?"option"==e&&2==arguments.length&&"string"==typeof arguments[1]?$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this[0]].concat(t)):this.each(function(){"string"==typeof e?$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this].concat(t)):$.datepicker._attachDatepicker(this,e)}):$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this[0]].concat(t))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.9.2",window["DP_jQuery_"+dpuuid]=$})(jQuery);(function(e,t){var n="ui-dialog ui-widget ui-widget-content ui-corner-all ",r={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};e.widget("ui.dialog",{version:"1.9.2",options:{autoOpen:!0,buttons:{},closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:!1,maxWidth:!1,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var n=e(this).css(t).offset().top;0>n&&e(this).css("top",t.top-n)}},resizable:!0,show:null,stack:!0,title:"",width:300,zIndex:1e3},_create:function(){this.originalTitle=this.element.attr("title"),"string"!=typeof this.originalTitle&&(this.originalTitle=""),this.oldPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.options.title=this.options.title||this.originalTitle;var r,i,s,o,u,a=this,f=this.options,l=f.title||" ";r=(this.uiDialog=e("<div>")).addClass(n+f.dialogClass).css({display:"none",outline:0,zIndex:f.zIndex}).attr("tabIndex",-1).keydown(function(t){f.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE&&(a.close(t),t.preventDefault())}).mousedown(function(e){a.moveToTop(!1,e)}).appendTo("body"),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(r),i=(this.uiDialogTitlebar=e("<div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").bind("mousedown",function(){r.focus()}).prependTo(r),s=e("<a href='#'></a>").addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").click(function(e){e.preventDefault(),a.close(e)}).appendTo(i),(this.uiDialogTitlebarCloseText=e("<span>")).addClass("ui-icon ui-icon-closethick").text(f.closeText).appendTo(s),o=e("<span>").uniqueId().addClass("ui-dialog-title").html(l).prependTo(i),u=(this.uiDialogButtonPane=e("<div>")).addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),(this.uiButtonSet=e("<div>")).addClass("ui-dialog-buttonset").appendTo(u),r.attr({role:"dialog","aria-labelledby":o.attr("id")}),i.find("*").add(i).disableSelection(),this._hoverable(s),this._focusable(s),f.draggable&&e.fn.draggable&&this._makeDraggable(),f.resizable&&e.fn.resizable&&this._makeResizable(),this._createButtons(f.buttons),this._isOpen=!1,e.fn.bgiframe&&r.bgiframe(),this._on(r,{keydown:function(n){if(f.modal&&n.keyCode===e.ui.keyCode.TAB){var i=e(":tabbable",r),s=i.filter(":first"),o=i.filter(":last");return n.target!==o[0]||n.shiftKey?n.target===s[0]&&n.shiftKey?(o.focus(1),!1):t:(s.focus(1),!1)}}})},_init:function(){this.options.autoOpen&&this.open()},_destroy:function(){var e,t=this.oldPosition;this.overlay&&this.overlay.destroy(),this.uiDialog.hide(),this.element.removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},close:function(t){var n,r,i=this;if(this._isOpen&&!1!==this._trigger("beforeClose",t))return this._isOpen=!1,this.overlay&&this.overlay.destroy(),this.options.hide?this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",t)}):(this.uiDialog.hide(),this._trigger("close",t)),e.ui.dialog.overlay.resize(),this.options.modal&&(n=0,e(".ui-dialog").each(function(){this!==i.uiDialog[0]&&(r=e(this).css("z-index"),isNaN(r)||(n=Math.max(n,r)))}),e.ui.dialog.maxZ=n),this},isOpen:function(){return this._isOpen},moveToTop:function(t,n){var r,i=this.options;return i.modal&&!t||!i.stack&&!i.modal?this._trigger("focus",n):(i.zIndex>e.ui.dialog.maxZ&&(e.ui.dialog.maxZ=i.zIndex),this.overlay&&(e.ui.dialog.maxZ+=1,e.ui.dialog.overlay.maxZ=e.ui.dialog.maxZ,this.overlay.$el.css("z-index",e.ui.dialog.overlay.maxZ)),r={scrollTop:this.element.scrollTop(),scrollLeft:this.element.scrollLeft()},e.ui.dialog.maxZ+=1,this.uiDialog.css("z-index",e.ui.dialog.maxZ),this.element.attr(r),this._trigger("focus",n),this)},open:function(){if(!this._isOpen){var t,n=this.options,r=this.uiDialog;return this._size(),this._position(n.position),r.show(n.show),this.overlay=n.modal?new e.ui.dialog.overlay(this):null,this.moveToTop(!0),t=this.element.find(":tabbable"),t.length||(t=this.uiDialogButtonPane.find(":tabbable"),t.length||(t=r)),t.eq(0).focus(),this._isOpen=!0,this._trigger("open"),this}},_createButtons:function(t){var n=this,r=!1;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),"object"==typeof t&&null!==t&&e.each(t,function(){return!(r=!0)}),r?(e.each(t,function(t,r){var i,s;r=e.isFunction(r)?{click:r,text:t}:r,r=e.extend({type:"button"},r),s=r.click,r.click=function(){s.apply(n.element[0],arguments)},i=e("<button></button>",r).appendTo(n.uiButtonSet),e.fn.button&&i.button()}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog)):this.uiDialog.removeClass("ui-dialog-buttons")},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var n=this,r=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(r,i){e(this).addClass("ui-dialog-dragging"),n._trigger("dragStart",r,t(i))},drag:function(e,r){n._trigger("drag",e,t(r))},stop:function(i,s){r.position=[s.position.left-n.document.scrollLeft(),s.position.top-n.document.scrollTop()],e(this).removeClass("ui-dialog-dragging"),n._trigger("dragStop",i,t(s)),e.ui.dialog.overlay.resize()}})},_makeResizable:function(n){function r(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}n=n===t?this.options.resizable:n;var i=this,s=this.options,o=this.uiDialog.css("position"),u="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:u,start:function(t,n){e(this).addClass("ui-dialog-resizing"),i._trigger("resizeStart",t,r(n))},resize:function(e,t){i._trigger("resize",e,r(t))},stop:function(t,n){e(this).removeClass("ui-dialog-resizing"),s.height=e(this).height(),s.width=e(this).width(),i._trigger("resizeStop",t,r(n)),e.ui.dialog.overlay.resize()}}).css("position",o).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(t){var n,r=[],i=[0,0];t?(("string"==typeof t||"object"==typeof t&&"0"in t)&&(r=t.split?t.split(" "):[t[0],t[1]],1===r.length&&(r[1]=r[0]),e.each(["left","top"],function(e,t){+r[e]===r[e]&&(i[e]=r[e],r[e]=t)}),t={my:r[0]+(0>i[0]?i[0]:"+"+i[0])+" "+r[1]+(0>i[1]?i[1]:"+"+i[1]),at:r.join(" ")}),t=e.extend({},e.ui.dialog.prototype.options.position,t)):t=e.ui.dialog.prototype.options.position,n=this.uiDialog.is(":visible"),n||this.uiDialog.show(),this.uiDialog.position(t),n||this.uiDialog.hide()},_setOptions:function(t){var n=this,o={},u=!1;e.each(t,function(e,t){n._setOption(e,t),e in r&&(u=!0),e in i&&(o[e]=t)}),u&&this._size(),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",o)},_setOption:function(t,r){var i,s,o=this.uiDialog;switch(t){case"buttons":this._createButtons(r);break;case"closeText":this.uiDialogTitlebarCloseText.text(""+r);break;case"dialogClass":o.removeClass(this.options.dialogClass).addClass(n+r);break;case"disabled":r?o.addClass("ui-dialog-disabled"):o.removeClass("ui-dialog-disabled");break;case"draggable":i=o.is(":data(draggable)"),i&&!r&&o.draggable("destroy"),!i&&r&&this._makeDraggable();break;case"position":this._position(r);break;case"resizable":s=o.is(":data(resizable)"),s&&!r&&o.resizable("destroy"),s&&"string"==typeof r&&o.resizable("option","handles",r),s||r===!1||this._makeResizable(r);break;case"title":e(".ui-dialog-title",this.uiDialogTitlebar).html(""+(r||" "))}this._super(t,r)},_size:function(){var t,n,r,i=this.options,s=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0}),i.minWidth>i.width&&(i.width=i.minWidth),t=this.uiDialog.css({height:"auto",width:i.width}).outerHeight(),n=Math.max(0,i.minHeight-t),"auto"===i.height?e.support.minHeight?this.element.css({minHeight:n,height:"auto"}):(this.uiDialog.show(),r=this.element.css("height","auto").height(),s||this.uiDialog.hide(),this.element.height(Math.max(r,n))):this.element.height(Math.max(i.height-t,0)),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}}),e.extend(e.ui.dialog,{uuid:0,maxZ:0,getTitleId:function(e){var t=e.attr("id");return t||(this.uuid+=1,t=this.uuid),"ui-dialog-title-"+t},overlay:function(t){this.$el=e.ui.dialog.overlay.create(t)}}),e.extend(e.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:e.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(e){return e+".dialog-overlay"}).join(" "),create:function(n){0===this.instances.length&&(setTimeout(function(){e.ui.dialog.overlay.instances.length&&e(document).bind(e.ui.dialog.overlay.events,function(n){return e(n.target).zIndex()<e.ui.dialog.overlay.maxZ?!1:t})},1),e(window).bind("resize.dialog-overlay",e.ui.dialog.overlay.resize));var r=this.oldInstances.pop()||e("<div>").addClass("ui-widget-overlay");return e(document).bind("keydown.dialog-overlay",function(t){var i=e.ui.dialog.overlay.instances;0!==i.length&&i[i.length-1]===r&&n.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE&&(n.close(t),t.preventDefault())}),r.appendTo(document.body).css({width:this.width(),height:this.height()}),e.fn.bgiframe&&r.bgiframe(),this.instances.push(r),r},destroy:function(t){var n=e.inArray(t,this.instances),r=0;-1!==n&&this.oldInstances.push(this.instances.splice(n,1)[0]),0===this.instances.length&&e([document,window]).unbind(".dialog-overlay"),t.height(0).width(0).remove(),e.each(this.instances,function(){r=Math.max(r,this.css("z-index"))}),this.maxZ=r},height:function(){var t,n;return e.ui.ie?(t=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),n=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),n>t?e(window).height()+"px":t+"px"):e(document).height()+"px"},width:function(){var t,n;return e.ui.ie?(t=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),n=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth),n>t?e(window).width()+"px":t+"px"):e(document).width()+"px"},resize:function(){var t=e([]);e.each(e.ui.dialog.overlay.instances,function(){t=t.add(this)}),t.css({width:0,height:0}).css({width:e.ui.dialog.overlay.width(),height:e.ui.dialog.overlay.height()})}}),e.extend(e.ui.dialog.overlay.prototype,{destroy:function(){e.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);(function(e){var t=!1;e.widget("ui.menu",{version:"1.9.2",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,e.proxy(function(e){this.options.disabled&&e.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(e){e.preventDefault()},"click .ui-state-disabled > a":function(e){e.preventDefault()},"click .ui-menu-item:has(a)":function(n){var r=e(n.target).closest(".ui-menu-item");!t&&r.not(".ui-state-disabled").length&&(t=!0,this.select(n),r.has(".ui-menu").length?this.expand(n):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){var n=e(t.currentTarget);n.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(t,n)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var n=this.active||this.element.children(".ui-menu-item").eq(0);t||this.focus(e,n)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(n){e(n.target).closest(".ui-menu").length||this.collapseAll(n),t=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").andSelf().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){function n(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var r,i,s,o,u,a=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:a=!1,i=this.previousFilter||"",s=String.fromCharCode(t.keyCode),o=!1,clearTimeout(this.filterTimer),s===i?o=!0:s=i+s,u=RegExp("^"+n(s),"i"),r=this.activeMenu.children(".ui-menu-item").filter(function(){return u.test(e(this).children("a").text())}),r=o&&-1!==r.index(this.active.next())?this.active.nextAll(".ui-menu-item"):r,r.length||(s=String.fromCharCode(t.keyCode),u=RegExp("^"+n(s),"i"),r=this.activeMenu.children(".ui-menu-item").filter(function(){return u.test(e(this).children("a").text())})),r.length?(this.focus(t,r),r.length>1?(this.previousFilter=s,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}a&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var t,n=this.options.icons.submenu,r=this.element.find(this.options.menus);r.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),r=t.prev("a"),s=e("<span>").addClass("ui-menu-icon ui-icon "+n).data("ui-menu-submenu-carat",!0);r.attr("aria-haspopup","true").prepend(s),t.attr("aria-labelledby",r.attr("id"))}),t=r.add(this.element),t.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),t.children(":not(.ui-menu-item)").each(function(){var t=e(this);/[^\-—–\s]/.test(t.text())||t.addClass("ui-widget-content ui-menu-divider")}),t.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},focus:function(e,t){var n,r;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),r=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",r.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),n=t.children(".ui-menu"),n.length&&/^mouse/.test(e.type)&&this._startOpening(n),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var n,r,i,s,o,u;this._hasScroll()&&(n=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,r=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,i=t.offset().top-this.activeMenu.offset().top-n-r,s=this.activeMenu.scrollTop(),o=this.activeMenu.height(),u=t.height(),0>i?this.activeMenu.scrollTop(s+i):i+u>o&&this.activeMenu.scrollTop(s+i-o+u))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var n=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(n)},collapseAll:function(t,n){clearTimeout(this.timer),this.timer=this._delay(function(){var r=n?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));r.length||(r=this.element),this._close(r),this.blur(t),this.activeMenu=r},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,n){var r;this.active&&(r="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),r&&r.length&&this.active||(r=this.activeMenu.children(".ui-menu-item")[t]()),this.focus(n,r)},nextPage:function(t){var n,r,i;return this.active?(this.isLastItem()||(this._hasScroll()?(r=this.active.offset().top,i=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return n=e(this),0>n.offset().top-r-i}),this.focus(t,n)):this.focus(t,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),undefined):(this.next(t),undefined)},previousPage:function(t){var n,r,i;return this.active?(this.isFirstItem()||(this._hasScroll()?(r=this.active.offset().top,i=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return n=e(this),n.offset().top-r+i>0}),this.focus(t,n)):this.focus(t,this.activeMenu.children(".ui-menu-item").first())),undefined):(this.next(t),undefined)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||e(t.target).closest(".ui-menu-item");var n={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,n)}})})(jQuery);(function(e,t){e.widget("ui.progressbar",{version:"1.9.2",options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()}),this.valueDiv=e("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this.oldValue=this._value(),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(e){return e===t?this._value():(this._setOption("value",e),this)},_setOption:function(e,t){"value"===e&&(this.options.value=t,this._refreshValue(),this._value()===this.options.max&&this._trigger("complete")),this._super(e,t)},_value:function(){var e=this.options.value;return"number"!=typeof e&&(e=0),Math.min(this.options.max,Math.max(this.min,e))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var e=this.value(),t=this._percentage();this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),this.valueDiv.toggle(e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(t.toFixed(0)+"%"),this.element.attr("aria-valuenow",e)}})})(jQuery);(function(e){var t=5;e.widget("ui.slider",e.ui.mouse,{version:"1.9.2",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var n,r,i=this.options,s=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",u=[];for(this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"+(i.disabled?" ui-slider-disabled ui-disabled":"")),this.range=e([]),i.range&&(i.range===!0&&(i.values||(i.values=[this._valueMin(),this._valueMin()]),i.values.length&&2!==i.values.length&&(i.values=[i.values[0],i.values[0]])),this.range=e("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+("min"===i.range||"max"===i.range?" ui-slider-range-"+i.range:""))),r=i.values&&i.values.length||1,n=s.length;r>n;n++)u.push(o);this.handles=s.add(e(u.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.add(this.range).filter("a").click(function(e){e.preventDefault()}).mouseenter(function(){i.disabled||e(this).addClass("ui-state-hover")}).mouseleave(function(){e(this).removeClass("ui-state-hover")}).focus(function(){i.disabled?e(this).blur():(e(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),e(this).addClass("ui-state-focus"))}).blur(function(){e(this).removeClass("ui-state-focus")}),this.handles.each(function(t){e(this).data("ui-slider-handle-index",t)}),this._on(this.handles,{keydown:function(n){var r,i,s,o,u=e(n.target).data("ui-slider-handle-index");switch(n.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(n.preventDefault(),!this._keySliding&&(this._keySliding=!0,e(n.target).addClass("ui-state-active"),r=this._start(n,u),r===!1))return}switch(o=this.options.step,i=s=this.options.values&&this.options.values.length?this.values(u):this.value(),n.keyCode){case e.ui.keyCode.HOME:s=this._valueMin();break;case e.ui.keyCode.END:s=this._valueMax();break;case e.ui.keyCode.PAGE_UP:s=this._trimAlignValue(i+(this._valueMax()-this._valueMin())/t);break;case e.ui.keyCode.PAGE_DOWN:s=this._trimAlignValue(i-(this._valueMax()-this._valueMin())/t);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(i===this._valueMax())return;s=this._trimAlignValue(i+o);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(i===this._valueMin())return;s=this._trimAlignValue(i-o)}this._slide(n,u,s)},keyup:function(t){var n=e(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,n),this._change(t,n),e(t.target).removeClass("ui-state-active"))}}),this._refreshValue(),this._animateOff=!1},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(t){var n,r,i,s,o,u,a,f,l=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),n={x:t.pageX,y:t.pageY},r=this._normValueFromMouse(n),i=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var n=Math.abs(r-l.values(t));i>n&&(i=n,s=e(this),o=t)}),c.range===!0&&this.values(1)===c.min&&(o+=1,s=e(this.handles[o])),u=this._start(t,o),u===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,s.addClass("ui-state-active").focus(),a=s.offset(),f=!e(t.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=f?{left:0,top:0}:{left:t.pageX-a.left-s.width()/2,top:t.pageY-a.top-s.height()/2-(parseInt(s.css("borderTopWidth"),10)||0)-(parseInt(s.css("borderBottomWidth"),10)||0)+(parseInt(s.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,o,r),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,n),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,n,r,i,s;return"horizontal"===this.orientation?(t=this.elementSize.width,n=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,n=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),r=n/t,r>1&&(r=1),0>r&&(r=0),"vertical"===this.orientation&&(r=1-r),i=this._valueMax()-this._valueMin(),s=this._valueMin()+r*i,this._trimAlignValue(s)},_start:function(e,t){var n={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._trigger("start",e,n)},_slide:function(e,t,n){var r,i,s;this.options.values&&this.options.values.length?(r=this.values(t?0:1),2===this.options.values.length&&this.options.range===!0&&(0===t&&n>r||1===t&&r>n)&&(n=r),n!==this.values(t)&&(i=this.values(),i[t]=n,s=this._trigger("slide",e,{handle:this.handles[t],value:n,values:i}),r=this.values(t?0:1),s!==!1&&this.values(t,n,!0))):n!==this.value()&&(s=this._trigger("slide",e,{handle:this.handles[t],value:n}),s!==!1&&this.value(n))},_stop:function(e,t){var n={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._trigger("stop",e,n)},_change:function(e,t){if(!this._keySliding&&!this._mouseSliding){var n={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._trigger("change",e,n)}},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(t,n){var r,i,s;if(arguments.length>1)return this.options.values[t]=this._trimAlignValue(n),this._refreshValue(),this._change(null,t),undefined;if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();for(r=this.options.values,i=arguments[0],s=0;r.length>s;s+=1)r[s]=this._trimAlignValue(i[s]),this._change(null,s);this._refreshValue()},_setOption:function(t,n){var r,i=0;switch(e.isArray(this.options.values)&&(i=this.options.values.length),e.Widget.prototype._setOption.apply(this,arguments),t){case"disabled":n?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.prop("disabled",!0),this.element.addClass("ui-disabled")):(this.handles.prop("disabled",!1),this.element.removeClass("ui-disabled"));break;case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),r=0;i>r;r+=1)this._change(null,r);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1}},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,n,r;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);for(n=this.options.values.slice(),r=0;n.length>r;r+=1)n[r]=this._trimAlignValue(n[r]);return n},_trimAlignValue:function(e){if(this._valueMin()>=e)return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,n=(e-this._valueMin())%t,r=e-n;return 2*Math.abs(n)>=t&&(r+=n>0?t:-t),parseFloat(r.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var t,n,r,i,s,o=this.options.range,u=this.options,a=this,f=this._animateOff?!1:u.animate,l={};this.options.values&&this.options.values.length?this.handles.each(function(r){n=100*((a.values(r)-a._valueMin())/(a._valueMax()-a._valueMin())),l["horizontal"===a.orientation?"left":"bottom"]=n+"%",e(this).stop(1,1)[f?"animate":"css"](l,u.animate),a.options.range===!0&&("horizontal"===a.orientation?(0===r&&a.range.stop(1,1)[f?"animate":"css"]({left:n+"%"},u.animate),1===r&&a.range[f?"animate":"css"]({width:n-t+"%"},{queue:!1,duration:u.animate})):(0===r&&a.range.stop(1,1)[f?"animate":"css"]({bottom:n+"%"},u.animate),1===r&&a.range[f?"animate":"css"]({height:n-t+"%"},{queue:!1,duration:u.animate}))),t=n}):(r=this.value(),i=this._valueMin(),s=this._valueMax(),n=s!==i?100*((r-i)/(s-i)):0,l["horizontal"===this.orientation?"left":"bottom"]=n+"%",this.handle.stop(1,1)[f?"animate":"css"](l,u.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[f?"animate":"css"]({width:n+"%"},u.animate),"max"===o&&"horizontal"===this.orientation&&this.range[f?"animate":"css"]({width:100-n+"%"},{queue:!1,duration:u.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[f?"animate":"css"]({height:n+"%"},u.animate),"max"===o&&"vertical"===this.orientation&&this.range[f?"animate":"css"]({height:100-n+"%"},{queue:!1,duration:u.animate}))}})})(jQuery);(function(e){function t(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}e.widget("ui.spinner",{version:"1.9.2",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var t={},n=this.element;return e.each(["min","max","step"],function(e,r){var s=n.attr(r);void 0!==s&&s.length&&(t[r]=s)}),t},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._refresh(),this.previous!==this.element.val()&&this._trigger("change",e),void 0)},mousewheel:function(e,t){if(t){if(!this.spinning&&!this._start(e))return!1;this._spin((t>0?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()}},"mousedown .ui-spinner-button":function(t){function n(){var e=this.element[0]===this.document[0].activeElement;e||(this.element.focus(),this.previous=r,this._delay(function(){this.previous=r}))}var r;r=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),t.preventDefault(),n.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,n.call(this)}),this._start(t)!==!1&&this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){return e(t.currentTarget).hasClass("ui-state-active")?this._start(t)===!1?!1:(this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var e=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=e.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*e.height())&&e.height()>0&&e.height(e.height()),this.options.disabled&&this.disable()},_keydown:function(t){var n=this.options,r=e.ui.keyCode;switch(t.keyCode){case r.UP:return this._repeat(null,1,t),!0;case r.DOWN:return this._repeat(null,-1,t),!0;case r.PAGE_UP:return this._repeat(null,n.page,t),!0;case r.PAGE_DOWN:return this._repeat(null,-n.page,t),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>▲</span>"+"</a>"+"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>"+"<span class='ui-icon "+this.options.icons.down+"'>▼</span>"+"</a>"},_start:function(e){return this.spinning||this._trigger("start",e)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(e,t,n){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,n)},e),this._spin(t*this.options.step,n)},_spin:function(e,t){var n=this.value()||0;this.counter||(this.counter=1),n=this._adjustValue(n+e*this._increment(this.counter)),this.spinning&&this._trigger("spin",t,{value:n})===!1||(this._value(n),this.counter++)},_increment:function(t){var n=this.options.incremental;return n?e.isFunction(n)?n(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=""+e,n=t.indexOf(".");return-1===n?0:t.length-n-1},_adjustValue:function(e){var t,n,r=this.options;return t=null!==r.min?r.min:0,n=e-t,n=Math.round(n/r.step)*r.step,e=t+n,e=parseFloat(e.toFixed(this._precision())),null!==r.max&&e>r.max?r.max:null!==r.min&&r.min>e?r.min:e},_stop:function(e){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",e))},_setOption:function(e,t){if("culture"===e||"numberFormat"===e){var n=this._parse(this.element.val());return this.options[e]=t,this.element.val(this._format(n)),void 0}("max"===e||"min"===e||"step"===e)&&"string"==typeof t&&(t=this._parse(t)),this._super(e,t),"disabled"===e&&(t?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:t(function(e){this._super(e),this._value(this.element.val())}),_parse:function(e){return"string"==typeof e&&""!==e&&(e=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(e,10,this.options.culture):+e),""===e||isNaN(e)?null:e},_format:function(e){return""===e?"":window.Globalize&&this.options.numberFormat?Globalize.format(e,this.options.numberFormat,this.options.culture):e},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(e,t){var n;""!==e&&(n=this._parse(e),null!==n&&(t||(n=this._adjustValue(n)),e=this._format(n))),this.element.val(e),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:t(function(e){this._stepUp(e)}),_stepUp:function(e){this._spin((e||1)*this.options.step)},stepDown:t(function(e){this._stepDown(e)}),_stepDown:function(e){this._spin((e||1)*-this.options.step)},pageUp:t(function(e){this._stepUp((e||1)*this.options.page)}),pageDown:t(function(e){this._stepDown((e||1)*this.options.page)}),value:function(e){return arguments.length?(t(this._value).call(this,e),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})})(jQuery);(function(e,t){function n(){return++i}function r(e){return e.hash.length>1&&e.href.replace(s,"")===location.href.replace(s,"").replace(/\s/g,"%20")}var i=0,s=/#.*$/;e.widget("ui.tabs",{version:"1.9.2",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var n=this,r=this.options,i=r.active,s=location.hash.substring(1);this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",r.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(t){e(this).is(".ui-state-disabled")&&t.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){e(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),null===i&&(s&&this.tabs.each(function(n,r){return e(r).attr("aria-controls")===s?(i=n,!1):t}),null===i&&(i=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===i||-1===i)&&(i=this.tabs.length?0:!1)),i!==!1&&(i=this.tabs.index(this.tabs.eq(i)),-1===i&&(i=r.collapsible?!1:0)),r.active=i,!r.collapsible&&r.active===!1&&this.anchors.length&&(r.active=0),e.isArray(r.disabled)&&(r.disabled=e.unique(r.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"),function(e){return n.tabs.index(e)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(this.options.active):e(),this._refresh(),this.active.length&&this.load(r.active)},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(n){var r=e(this.document[0].activeElement).closest("li"),i=this.tabs.index(r),s=!0;if(!this._handlePageNav(n)){switch(n.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:i++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:s=!1,i--;break;case e.ui.keyCode.END:i=this.anchors.length-1;break;case e.ui.keyCode.HOME:i=0;break;case e.ui.keyCode.SPACE:return n.preventDefault(),clearTimeout(this.activating),this._activate(i),t;case e.ui.keyCode.ENTER:return n.preventDefault(),clearTimeout(this.activating),this._activate(i===this.options.active?!1:i),t;default:return}n.preventDefault(),clearTimeout(this.activating),i=this._focusNextTab(i,s),n.ctrlKey||(r.attr("aria-selected","false"),this.tabs.eq(i).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",i)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===e.ui.keyCode.UP&&(t.preventDefault(),this.active.focus())},_handlePageNav:function(n){return n.altKey&&n.keyCode===e.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):n.altKey&&n.keyCode===e.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):t},_findNextTab:function(t,n){function r(){return t>i&&(t=0),0>t&&(t=i),t}for(var i=this.tabs.length-1;-1!==e.inArray(r(),this.options.disabled);)t=n?t+1:t-1;return t},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).focus(),e},_setOption:function(e,n){return"active"===e?(this._activate(n),t):"disabled"===e?(this._setupDisabled(n),t):(this._super(e,n),"collapsible"===e&&(this.element.toggleClass("ui-tabs-collapsible",n),n||this.options.active!==!1||this._activate(0)),"event"===e&&this._setupEvents(n),"heightStyle"===e&&this._setupHeightStyle(n),t)},_tabId:function(e){return e.attr("aria-controls")||"ui-tabs-"+n()},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,n=this.tablist.children(":has(a[href])");t.disabled=e.map(n.filter(".ui-state-disabled"),function(e){return n.index(e)}),this._processTabs(),t.active!==!1&&this.anchors.length?this.active.length&&!e.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=e()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=e()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return e("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=e(),this.anchors.each(function(n,i){var s,o,u,a=e(i).uniqueId().attr("id"),f=e(i).closest("li"),l=f.attr("aria-controls");r(i)?(s=i.hash,o=t.element.find(t._sanitizeSelector(s))):(u=t._tabId(f),s="#"+u,o=t.element.find(s),o.length||(o=t._createPanel(u),o.insertAfter(t.panels[n-1]||t.tablist)),o.attr("aria-live","polite")),o.length&&(t.panels=t.panels.add(o)),l&&f.data("ui-tabs-aria-controls",l),f.attr({"aria-controls":s.substring(1),"aria-labelledby":a}),o.attr("aria-labelledby",a)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(t){return e("<div>").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){e.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var n,r=0;n=this.tabs[r];r++)t===!0||-1!==e.inArray(r,t)?e(n).addClass("ui-state-disabled").attr("aria-disabled","true"):e(n).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var n={click:function(e){e.preventDefault()}};t&&e.each(t.split(" "),function(e,t){n[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,n),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var n,r,i=this.element.parent();"fill"===t?(e.support.minHeight||(r=i.css("overflow"),i.css("overflow","hidden")),n=i.height(),this.element.siblings(":visible").each(function(){var t=e(this),r=t.css("position");"absolute"!==r&&"fixed"!==r&&(n-=t.outerHeight(!0))}),r&&i.css("overflow",r),this.element.children().not(this.panels).each(function(){n-=e(this).outerHeight(!0)}),this.panels.each(function(){e(this).height(Math.max(0,n-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===t&&(n=0,this.panels.each(function(){n=Math.max(n,e(this).height("").height())}).height(n))},_eventHandler:function(t){var n=this.options,r=this.active,i=e(t.currentTarget),s=i.closest("li"),o=s[0]===r[0],u=o&&n.collapsible,a=u?e():this._getPanelForTab(s),f=r.length?this._getPanelForTab(r):e(),l={oldTab:r,oldPanel:f,newTab:u?e():s,newPanel:a};t.preventDefault(),s.hasClass("ui-state-disabled")||s.hasClass("ui-tabs-loading")||this.running||o&&!n.collapsible||this._trigger("beforeActivate",t,l)===!1||(n.active=u?!1:this.tabs.index(s),this.active=o?e():s,this.xhr&&this.xhr.abort(),f.length||a.length||e.error("jQuery UI Tabs: Mismatching fragment identifier."),a.length&&this.load(this.tabs.index(s),t),this._toggle(t,l))},_toggle:function(t,n){function r(){s.running=!1,s._trigger("activate",t,n)}function i(){n.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),o.length&&s.options.show?s._show(o,s.options.show,r):(o.show(),r())}var s=this,o=n.newPanel,u=n.oldPanel;this.running=!0,u.length&&this.options.hide?this._hide(u,this.options.hide,function(){n.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),i()}):(n.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),u.hide(),i()),u.attr({"aria-expanded":"false","aria-hidden":"true"}),n.oldTab.attr("aria-selected","false"),o.length&&u.length?n.oldTab.attr("tabIndex",-1):o.length&&this.tabs.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),o.attr({"aria-expanded":"true","aria-hidden":"false"}),n.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(t){var n,r=this._findActive(t);r[0]!==this.active[0]&&(r.length||(r=this.active),n=r.find(".ui-tabs-anchor")[0],this._eventHandler({target:n,currentTarget:n,preventDefault:e.noop}))},_findActive:function(t){return t===!1?e():this.tabs.eq(t)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+e+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeData("href.tabs").removeData("load.tabs").removeUniqueId(),this.tabs.add(this.panels).each(function(){e.data(this,"ui-tabs-destroy")?e(this).remove():e(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var t=e(this),n=t.data("ui-tabs-aria-controls");n?t.attr("aria-controls",n):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(n){var r=this.options.disabled;r!==!1&&(n===t?r=!1:(n=this._getIndex(n),r=e.isArray(r)?e.map(r,function(e){return e!==n?e:null}):e.map(this.tabs,function(e,t){return t!==n?t:null})),this._setupDisabled(r))},disable:function(n){var r=this.options.disabled;if(r!==!0){if(n===t)r=!0;else{if(n=this._getIndex(n),-1!==e.inArray(n,r))return;r=e.isArray(r)?e.merge([n],r).sort():[n]}this._setupDisabled(r)}},load:function(t,n){t=this._getIndex(t);var i=this,s=this.tabs.eq(t),o=s.find(".ui-tabs-anchor"),u=this._getPanelForTab(s),a={tab:s,panel:u};r(o[0])||(this.xhr=e.ajax(this._ajaxSettings(o,n,a)),this.xhr&&"canceled"!==this.xhr.statusText&&(s.addClass("ui-tabs-loading"),u.attr("aria-busy","true"),this.xhr.success(function(e){setTimeout(function(){u.html(e),i._trigger("load",n,a)},1)}).complete(function(e,t){setTimeout(function(){"abort"===t&&i.panels.stop(!1,!0),s.removeClass("ui-tabs-loading"),u.removeAttr("aria-busy"),e===i.xhr&&delete i.xhr},1)})))},_ajaxSettings:function(t,n,r){var i=this;return{url:t.attr("href"),beforeSend:function(t,s){return i._trigger("beforeLoad",n,e.extend({jqXHR:t,ajaxSettings:s},r))}}},_getPanelForTab:function(t){var n=e(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+n))}}),e.uiBackCompat!==!1&&(e.ui.tabs.prototype._ui=function(e,t){return{tab:e,panel:t,index:this.anchors.index(e)}},e.widget("ui.tabs",e.ui.tabs,{url:function(e,t){this.anchors.eq(e).attr("href",t)}}),e.widget("ui.tabs",e.ui.tabs,{options:{ajaxOptions:null,cache:!1},_create:function(){this._super();var n=this;this._on({tabsbeforeload:function(r,i){return e.data(i.tab[0],"cache.tabs")?(r.preventDefault(),t):(i.jqXHR.success(function(){n.options.cache&&e.data(i.tab[0],"cache.tabs",!0)}),t)}})},_ajaxSettings:function(t,n,r){var i=this.options.ajaxOptions;return e.extend({},i,{error:function(e,t){try{i.error(e,t,r.tab.closest("li").index(),r.tab[0])}catch(n){}}},this._superApply(arguments))},_setOption:function(e,t){"cache"===e&&t===!1&&this.anchors.removeData("cache.tabs"),this._super(e,t)},_destroy:function(){this.anchors.removeData("cache.tabs"),this._super()},url:function(e){this.anchors.eq(e).removeData("cache.tabs"),this._superApply(arguments)}}),e.widget("ui.tabs",e.ui.tabs,{abort:function(){this.xhr&&this.xhr.abort()}}),e.widget("ui.tabs",e.ui.tabs,{options:{spinner:"<em>Loading…</em>"},_create:function(){this._super(),this._on({tabsbeforeload:function(e,t){if(e.target===this.element[0]&&this.options.spinner){var n=t.tab.find("span"),r=n.html();n.html(this.options.spinner),t.jqXHR.complete(function(){n.html(r)})}}})}}),e.widget("ui.tabs",e.ui.tabs,{options:{enable:null,disable:null},enable:function(t){var n,r=this.options;(t&&r.disabled===!0||e.isArray(r.disabled)&&-1!==e.inArray(t,r.disabled))&&(n=!0),this._superApply(arguments),n&&this._trigger("enable",null,this._ui(this.anchors[t],this.panels[t]))},disable:function(t){var n,r=this.options;(t&&r.disabled===!1||e.isArray(r.disabled)&&-1===e.inArray(t,r.disabled))&&(n=!0),this._superApply(arguments),n&&this._trigger("disable",null,this._ui(this.anchors[t],this.panels[t]))}}),e.widget("ui.tabs",e.ui.tabs,{options:{add:null,remove:null,tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},add:function(n,r,i){i===t&&(i=this.anchors.length);var s,o,u=this.options,a=e(u.tabTemplate.replace(/#\{href\}/g,n).replace(/#\{label\}/g,r)),f=n.indexOf("#")?this._tabId(a):n.replace("#","");return a.addClass("ui-state-default ui-corner-top").data("ui-tabs-destroy",!0),a.attr("aria-controls",f),s=i>=this.tabs.length,o=this.element.find("#"+f),o.length||(o=this._createPanel(f),s?i>0?o.insertAfter(this.panels.eq(-1)):o.appendTo(this.element):o.insertBefore(this.panels[i])),o.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").hide(),s?a.appendTo(this.tablist):a.insertBefore(this.tabs[i]),u.disabled=e.map(u.disabled,function(e){return e>=i?++e:e}),this.refresh(),1===this.tabs.length&&u.active===!1&&this.option("active",0),this._trigger("add",null,this._ui(this.anchors[i],this.panels[i])),this},remove:function(t){t=this._getIndex(t);var n=this.options,r=this.tabs.eq(t).remove(),i=this._getPanelForTab(r).remove();return r.hasClass("ui-tabs-active")&&this.anchors.length>2&&this._activate(t+(this.anchors.length>t+1?1:-1)),n.disabled=e.map(e.grep(n.disabled,function(e){return e!==t}),function(e){return e>=t?--e:e}),this.refresh(),this._trigger("remove",null,this._ui(r.find("a")[0],i[0])),this}}),e.widget("ui.tabs",e.ui.tabs,{length:function(){return this.anchors.length}}),e.widget("ui.tabs",e.ui.tabs,{options:{idPrefix:"ui-tabs-"},_tabId:function(t){var r=t.is("li")?t.find("a[href]"):t;return r=r[0],e(r).closest("li").attr("aria-controls")||r.title&&r.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF\-]/g,"")||this.options.idPrefix+n()}}),e.widget("ui.tabs",e.ui.tabs,{options:{panelTemplate:"<div></div>"},_createPanel:function(t){return e(this.options.panelTemplate).attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)}}),e.widget("ui.tabs",e.ui.tabs,{_create:function(){var e=this.options;null===e.active&&e.selected!==t&&(e.active=-1===e.selected?!1:e.selected),this._super(),e.selected=e.active,e.selected===!1&&(e.selected=-1)},_setOption:function(e,t){if("selected"!==e)return this._super(e,t);var n=this.options;this._super("active",-1===t?!1:t),n.selected=n.active,n.selected===!1&&(n.selected=-1)},_eventHandler:function(){this._superApply(arguments),this.options.selected=this.options.active,this.options.selected===!1&&(this.options.selected=-1)}}),e.widget("ui.tabs",e.ui.tabs,{options:{show:null,select:null},_create:function(){this._super(),this.options.active!==!1&&this._trigger("show",null,this._ui(this.active.find(".ui-tabs-anchor")[0],this._getPanelForTab(this.active)[0]))},_trigger:function(e,t,n){var r,i,s=this._superApply(arguments);return s?("beforeActivate"===e?(r=n.newTab.length?n.newTab:n.oldTab,i=n.newPanel.length?n.newPanel:n.oldPanel,s=this._super("select",t,{tab:r.find(".ui-tabs-anchor")[0],panel:i[0],index:r.closest("li").index()})):"activate"===e&&n.newTab.length&&(s=this._super("show",t,{tab:n.newTab.find(".ui-tabs-anchor")[0],panel:n.newPanel[0],index:n.newTab.closest("li").index()})),s):!1}}),e.widget("ui.tabs",e.ui.tabs,{select:function(e){if(e=this._getIndex(e),-1===e){if(!this.options.collapsible||-1===this.options.selected)return;e=this.options.selected}this.anchors.eq(e).trigger(this.options.event+this.eventNamespace)}}),function(){var t=0;e.widget("ui.tabs",e.ui.tabs,{options:{cookie:null},_create:function(){var e,t=this.options;null==t.active&&t.cookie&&(e=parseInt(this._cookie(),10),-1===e&&(e=!1),t.active=e),this._super()},_cookie:function(n){var r=[this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+ ++t)];return arguments.length&&(r.push(n===!1?-1:n),r.push(this.options.cookie)),e.cookie.apply(null,r)},_refresh:function(){this._super(),this.options.cookie&&this._cookie(this.options.active,this.options.cookie)},_eventHandler:function(){this._superApply(arguments),this.options.cookie&&this._cookie(this.options.active,this.options.cookie)},_destroy:function(){this._super(),this.options.cookie&&this._cookie(null,this.options.cookie)}})}(),e.widget("ui.tabs",e.ui.tabs,{_trigger:function(t,n,r){var i=e.extend({},r);return"load"===t&&(i.panel=i.panel[0],i.tab=i.tab.find(".ui-tabs-anchor")[0]),this._super(t,n,i)}}),e.widget("ui.tabs",e.ui.tabs,{options:{fx:null},_getFx:function(){var t,n,r=this.options.fx;return r&&(e.isArray(r)?(t=r[0],n=r[1]):t=n=r),r?{show:n,hide:t}:null},_toggle:function(e,n){function r(){s.running=!1,s._trigger("activate",e,n)}function i(){n.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),o.length&&a.show?o.animate(a.show,a.show.duration,function(){r()}):(o.show(),r())}var s=this,o=n.newPanel,u=n.oldPanel,a=this._getFx();return a?(s.running=!0,u.length&&a.hide?u.animate(a.hide,a.hide.duration,function(){n.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),i()}):(n.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),u.hide(),i()),t):this._super(e,n)}}))})(jQuery);(function(e){function t(t,n){var r=(t.attr("aria-describedby")||"").split(/\s+/);r.push(n),t.data("ui-tooltip-id",n).attr("aria-describedby",e.trim(r.join(" ")))}function n(t){var n=t.data("ui-tooltip-id"),r=(t.attr("aria-describedby")||"").split(/\s+/),i=e.inArray(n,r);-1!==i&&r.splice(i,1),t.removeData("ui-tooltip-id"),r=e.trim(r.join(" ")),r?t.attr("aria-describedby",r):t.removeAttr("aria-describedby")}var r=0;e.widget("ui.tooltip",{version:"1.9.2",options:{content:function(){return e(this).attr("title")},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(t,n){var r=this;return"disabled"===t?(this[n?"_disable":"_enable"](),this.options[t]=n,void 0):(this._super(t,n),"content"===t&&e.each(this.tooltips,function(e,t){r._updateContent(t)}),void 0)},_disable:function(){var t=this;e.each(this.tooltips,function(n,r){var i=e.Event("blur");i.target=i.currentTarget=r[0],t.close(i,!0)}),this.element.find(this.options.items).andSelf().each(function(){var t=e(this);t.is("[title]")&&t.data("ui-tooltip-title",t.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).andSelf().each(function(){var t=e(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})},open:function(t){var n=this,r=e(t?t.target:this.element).closest(this.options.items);r.length&&!r.data("ui-tooltip-id")&&(r.attr("title")&&r.data("ui-tooltip-title",r.attr("title")),r.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&r.parents().each(function(){var t,r=e(this);r.data("ui-tooltip-open")&&(t=e.Event("blur"),t.target=t.currentTarget=this,n.close(t,!0)),r.attr("title")&&(r.uniqueId(),n.parents[this.id]={element:this,title:r.attr("title")},r.attr("title",""))}),this._updateContent(r,t))},_updateContent:function(e,t){var n,r=this.options.content,i=this,s=t?t.type:null;return"string"==typeof r?this._open(t,e,r):(n=r.call(e[0],function(n){e.data("ui-tooltip-open")&&i._delay(function(){t&&(t.type=s),this._open(t,e,n)})}),n&&this._open(t,e,n),void 0)},_open:function(n,r,i){function s(e){f.of=e,o.is(":hidden")||o.position(f)}var o,u,a,f=e.extend({},this.options.position);if(i){if(o=this._find(r),o.length)return o.find(".ui-tooltip-content").html(i),void 0;r.is("[title]")&&(n&&"mouseover"===n.type?r.attr("title",""):r.removeAttr("title")),o=this._tooltip(r),t(r,o.attr("id")),o.find(".ui-tooltip-content").html(i),this.options.track&&n&&/^mouse/.test(n.type)?(this._on(this.document,{mousemove:s}),s(n)):o.position(e.extend({of:r},this.options.position)),o.hide(),this._show(o,this.options.show),this.options.show&&this.options.show.delay&&(a=setInterval(function(){o.is(":visible")&&(s(f.of),clearInterval(a))},e.fx.interval)),this._trigger("open",n,{tooltip:o}),u={keyup:function(t){if(t.keyCode===e.ui.keyCode.ESCAPE){var n=e.Event(t);n.currentTarget=r[0],this.close(n,!0)}},remove:function(){this._removeTooltip(o)}},n&&"mouseover"!==n.type||(u.mouseleave="close"),n&&"focusin"!==n.type||(u.focusout="close"),this._on(!0,r,u)}},close:function(t){var r=this,s=e(t?t.currentTarget:this.element),o=this._find(s);this.closing||(s.data("ui-tooltip-title")&&s.attr("title",s.data("ui-tooltip-title")),n(s),o.stop(!0),this._hide(o,this.options.hide,function(){r._removeTooltip(e(this))}),s.removeData("ui-tooltip-open"),this._off(s,"mouseleave focusout keyup"),s[0]!==this.element[0]&&this._off(s,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&e.each(this.parents,function(t,n){e(n.element).attr("title",n.title),delete r.parents[t]}),this.closing=!0,this._trigger("close",t,{tooltip:o}),this.closing=!1)},_tooltip:function(t){var n="ui-tooltip-"+r++,i=e("<div>").attr({id:n,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return e("<div>").addClass("ui-tooltip-content").appendTo(i),i.appendTo(this.document[0].body),e.fn.bgiframe&&i.bgiframe(),this.tooltips[n]=t,i},_find:function(t){var n=t.data("ui-tooltip-id");return n?e("#"+n):e()},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr("id")]},_destroy:function(){var t=this;e.each(this.tooltips,function(n,r){var i=e.Event("blur");i.target=i.currentTarget=r[0],t.close(i,!0),e("#"+n).remove(),r.data("ui-tooltip-title")&&(r.attr("title",r.data("ui-tooltip-title")),r.removeData("ui-tooltip-title"))})}})})(jQuery);jQuery.effects||function(e,t){var n=e.uiBackCompat!==!1,r="ui-effects-";e.effects={effect:{}},function(t,n){function r(e,t,n){var r=h[t.type]||{};return null==e?n||!t.def?null:t.def:(e=r.floor?~~e:parseFloat(e),isNaN(e)?t.def:r.mod?(e+r.mod)%r.mod:0>e?0:e>r.max?r.max:e)}function i(e){var r=l(),i=r._rgba=[];return e=e.toLowerCase(),v(f,function(t,s){var o,u=s.re.exec(e),a=u&&s.parse(u),f=s.space||"rgba";return a?(o=r[f](a),r[c[f].cache]=o[c[f].cache],i=r._rgba=o._rgba,!1):n}),i.length?("0,0,0,0"===i.join()&&t.extend(i,o.transparent),r):o[e]}function s(e,t,n){return n=(n+1)%1,1>6*n?e+6*(t-e)*n:1>2*n?t:2>3*n?e+6*(t-e)*(2/3-n):e}var o,u="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor".split(" "),a=/^([\-+])=\s*(\d+\.?\d*)/,f=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],l=t.Color=function(e,n,r,i){return new t.Color.fn.parse(e,n,r,i)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},h={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},p=l.support={},d=t("<p>")[0],v=t.each;d.style.cssText="background-color:rgba(1,1,1,.5)",p.rgba=d.style.backgroundColor.indexOf("rgba")>-1,v(c,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(s,u,a,f){if(s===n)return this._rgba=[null,null,null,null],this;(s.jquery||s.nodeType)&&(s=t(s).css(u),u=n);var h=this,p=t.type(s),d=this._rgba=[];return u!==n&&(s=[s,u,a,f],p="array"),"string"===p?this.parse(i(s)||o._default):"array"===p?(v(c.rgba.props,function(e,t){d[t.idx]=r(s[t.idx],t)}),this):"object"===p?(s instanceof l?v(c,function(e,t){s[t.cache]&&(h[t.cache]=s[t.cache].slice())}):v(c,function(t,n){var i=n.cache;v(n.props,function(e,t){if(!h[i]&&n.to){if("alpha"===e||null==s[e])return;h[i]=n.to(h._rgba)}h[i][t.idx]=r(s[e],t,!0)}),h[i]&&0>e.inArray(null,h[i].slice(0,3))&&(h[i][3]=1,n.from&&(h._rgba=n.from(h[i])))}),this):n},is:function(e){var t=l(e),r=!0,i=this;return v(c,function(e,s){var o,u=t[s.cache];return u&&(o=i[s.cache]||s.to&&s.to(i._rgba)||[],v(s.props,function(e,t){return null!=u[t.idx]?r=u[t.idx]===o[t.idx]:n})),r}),r},_space:function(){var e=[],t=this;return v(c,function(n,r){t[r.cache]&&e.push(n)}),e.pop()},transition:function(e,t){var n=l(e),i=n._space(),s=c[i],o=0===this.alpha()?l("transparent"):this,u=o[s.cache]||s.to(o._rgba),a=u.slice();return n=n[s.cache],v(s.props,function(e,i){var s=i.idx,o=u[s],f=n[s],l=h[i.type]||{};null!==f&&(null===o?a[s]=f:(l.mod&&(f-o>l.mod/2?o+=l.mod:o-f>l.mod/2&&(o-=l.mod)),a[s]=r((f-o)*t+o,i)))}),this[i](a)},blend:function(e){if(1===this._rgba[3])return this;var n=this._rgba.slice(),r=n.pop(),i=l(e)._rgba;return l(t.map(n,function(e,t){return(1-r)*i[t]+r*e}))},toRgbaString:function(){var e="rgba(",n=t.map(this._rgba,function(e,t){return null==e?t>2?1:0:e});return 1===n[3]&&(n.pop(),e="rgb("),e+n.join()+")"},toHslaString:function(){var e="hsla(",n=t.map(this.hsla(),function(e,t){return null==e&&(e=t>2?1:0),t&&3>t&&(e=Math.round(100*e)+"%"),e});return 1===n[3]&&(n.pop(),e="hsl("),e+n.join()+")"},toHexString:function(e){var n=this._rgba.slice(),r=n.pop();return e&&n.push(~~(255*r)),"#"+t.map(n,function(e){return e=(e||0).toString(16),1===e.length?"0"+e:e}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t,n,r=e[0]/255,i=e[1]/255,s=e[2]/255,o=e[3],u=Math.max(r,i,s),a=Math.min(r,i,s),f=u-a,l=u+a,c=.5*l;return t=a===u?0:r===u?60*(i-s)/f+360:i===u?60*(s-r)/f+120:60*(r-i)/f+240,n=0===c||1===c?c:.5>=c?f/l:f/(2-l),[Math.round(t)%360,n,c,null==o?1:o]},c.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,n=e[1],r=e[2],i=e[3],o=.5>=r?r*(1+n):r+n-r*n,u=2*r-o;return[Math.round(255*s(u,o,t+1/3)),Math.round(255*s(u,o,t)),Math.round(255*s(u,o,t-1/3)),i]},v(c,function(e,i){var s=i.props,o=i.cache,u=i.to,f=i.from;l.fn[e]=function(e){if(u&&!this[o]&&(this[o]=u(this._rgba)),e===n)return this[o].slice();var i,a=t.type(e),c="array"===a||"object"===a?e:arguments,h=this[o].slice();return v(s,function(e,t){var n=c["object"===a?e:t.idx];null==n&&(n=h[t.idx]),h[t.idx]=r(n,t)}),f?(i=l(f(h)),i[o]=h,i):l(h)},v(s,function(n,r){l.fn[n]||(l.fn[n]=function(i){var s,o=t.type(i),u="alpha"===n?this._hsla?"hsla":"rgba":e,f=this[u](),l=f[r.idx];return"undefined"===o?l:("function"===o&&(i=i.call(this,l),o=t.type(i)),null==i&&r.empty?this:("string"===o&&(s=a.exec(i),s&&(i=l+parseFloat(s[2])*("+"===s[1]?1:-1))),f[r.idx]=i,this[u](f)))})})}),v(u,function(e,n){t.cssHooks[n]={set:function(e,r){var s,o,u="";if("string"!==t.type(r)||(s=i(r))){if(r=l(s||r),!p.rgba&&1!==r._rgba[3]){for(o="backgroundColor"===n?e.parentNode:e;(""===u||"transparent"===u)&&o&&o.style;)try{u=t.css(o,"backgroundColor"),o=o.parentNode}catch(a){}r=r.blend(u&&"transparent"!==u?u:"_default")}r=r.toRgbaString()}try{e.style[n]=r}catch(f){}}},t.fx.step[n]=function(e){e.colorInit||(e.start=l(e.elem,n),e.end=l(e.end),e.colorInit=!0),t.cssHooks[n].set(e.elem,e.start.transition(e.end,e.pos))}}),t.cssHooks.borderColor={expand:function(e){var t={};return v(["Top","Right","Bottom","Left"],function(n,r){t["border"+r+"Color"]=e}),t}},o=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function n(){var t,n,r=this.ownerDocument.defaultView?this.ownerDocument.defaultView.getComputedStyle(this,null):this.currentStyle,i={};if(r&&r.length&&r[0]&&r[r[0]])for(n=r.length;n--;)t=r[n],"string"==typeof r[t]&&(i[e.camelCase(t)]=r[t]);else for(t in r)"string"==typeof r[t]&&(i[t]=r[t]);return i}function r(t,n){var r,i,o={};for(r in n)i=n[r],t[r]!==i&&(s[r]||(e.fx.step[r]||!isNaN(parseFloat(i)))&&(o[r]=i));return o}var i=["add","remove","toggle"],s={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,n){e.fx.step[n]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(jQuery.style(e.elem,n,e.end),e.setAttr=!0)}}),e.effects.animateClass=function(t,s,o,u){var f=e.speed(s,o,u);return this.queue(function(){var s,o=e(this),u=o.attr("class")||"",l=f.children?o.find("*").andSelf():o;l=l.map(function(){var t=e(this);return{el:t,start:n.call(this)}}),s=function(){e.each(i,function(e,n){t[n]&&o[n+"Class"](t[n])})},s(),l=l.map(function(){return this.end=n.call(this.el[0]),this.diff=r(this.start,this.end),this}),o.attr("class",u),l=l.map(function(){var t=this,n=e.Deferred(),r=jQuery.extend({},f,{queue:!1,complete:function(){n.resolve(t)}});return this.el.animate(this.diff,r),n.promise()}),e.when.apply(e,l.get()).done(function(){s(),e.each(arguments,function(){var t=this.el;e.each(this.diff,function(e){t.css(e,"")})}),f.complete.call(o[0])})})},e.fn.extend({_addClass:e.fn.addClass,addClass:function(t,n,r,i){return n?e.effects.animateClass.call(this,{add:t},n,r,i):this._addClass(t)},_removeClass:e.fn.removeClass,removeClass:function(t,n,r,i){return n?e.effects.animateClass.call(this,{remove:t},n,r,i):this._removeClass(t)},_toggleClass:e.fn.toggleClass,toggleClass:function(n,r,i,s,o){return"boolean"==typeof r||r===t?i?e.effects.animateClass.call(this,r?{add:n}:{remove:n},i,s,o):this._toggleClass(n,r):e.effects.animateClass.call(this,{toggle:n},r,i,s)},switchClass:function(t,n,r,i,s){return e.effects.animateClass.call(this,{add:n,remove:t},r,i,s)}})}(),function(){function o(t,n,r,i){return e.isPlainObject(t)&&(n=t,t=t.effect),t={effect:t},null==n&&(n={}),e.isFunction(n)&&(i=n,r=null,n={}),("number"==typeof n||e.fx.speeds[n])&&(i=r,r=n,n={}),e.isFunction(r)&&(i=r,r=null),n&&e.extend(t,n),r=r||n.duration,t.duration=e.fx.off?0:"number"==typeof r?r:r in e.fx.speeds?e.fx.speeds[r]:e.fx.speeds._default,t.complete=i||n.complete,t}function u(t){return!t||"number"==typeof t||e.fx.speeds[t]?!0:"string"!=typeof t||e.effects.effect[t]?!1:n&&e.effects[t]?!1:!0}e.extend(e.effects,{version:"1.9.2",save:function(e,t){for(var n=0;t.length>n;n++)null!==t[n]&&e.data(r+t[n],e[0].style[t[n]])},restore:function(e,n){var i,o;for(o=0;n.length>o;o++)null!==n[o]&&(i=e.data(r+n[o]),i===t&&(i=""),e.css(n[o],i))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},getBaseline:function(e,t){var n,r;switch(e[0]){case"top":n=0;break;case"middle":n=.5;break;case"bottom":n=1;break;default:n=e[0]/t.height}switch(e[1]){case"left":r=0;break;case"center":r=.5;break;case"right":r=1;break;default:r=e[1]/t.width}return{x:r,y:n}},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var n={width:t.outerWidth(!0),height:t.outerHeight(!0),"float":t.css("float")},r=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),i={width:t.width(),height:t.height()},s=document.activeElement;try{s.id}catch(o){s=document.body}return t.wrap(r),(t[0]===s||e.contains(t[0],s))&&e(s).focus(),r=t.parent(),"static"===t.css("position")?(r.css({position:"relative"}),t.css({position:"relative"})):(e.extend(n,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,r){n[r]=t.css(r),isNaN(parseInt(n[r],10))&&(n[r]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(i),r.css(n).show()},removeWrapper:function(t){var n=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===n||e.contains(t[0],n))&&e(n).focus()),t},setTransition:function(t,n,r,i){return i=i||{},e.each(n,function(e,n){var o=t.cssUnit(n);o[0]>0&&(i[n]=o[0]*r+o[1])}),i}}),e.fn.extend({effect:function(){function t(t){function n(){e.isFunction(s)&&s.call(i[0]),e.isFunction(t)&&t()}var i=e(this),s=r.complete,o=r.mode;(i.is(":hidden")?"hide"===o:"show"===o)?n():f.call(i[0],r,n)}var r=o.apply(this,arguments),s=r.mode,u=r.queue,f=e.effects.effect[r.effect],l=!f&&n&&e.effects[r.effect];return e.fx.off||!f&&!l?s?this[s](r.duration,r.complete):this.each(function(){r.complete&&r.complete.call(this)}):f?u===!1?this.each(t):this.queue(u||"fx",t):l.call(this,{options:r,duration:r.duration,callback:r.complete,mode:r.mode})},_show:e.fn.show,show:function(e){if(u(e))return this._show.apply(this,arguments);var t=o.apply(this,arguments);return t.mode="show",this.effect.call(this,t)},_hide:e.fn.hide,hide:function(e){if(u(e))return this._hide.apply(this,arguments);var t=o.apply(this,arguments);return t.mode="hide",this.effect.call(this,t)},__toggle:e.fn.toggle,toggle:function(t){if(u(t)||"boolean"==typeof t||e.isFunction(t))return this.__toggle.apply(this,arguments);var n=o.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)},cssUnit:function(t){var n=this.css(t),r=[];return e.each(["em","px","%","pt"],function(e,t){n.indexOf(t)>0&&(r=[parseFloat(n),t])}),r}})}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,n){t[n]=function(t){return Math.pow(t,e+2)}}),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,n=4;((t=Math.pow(2,--n))-1)/11>e;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(t,function(t,n){e.easing["easeIn"+t]=n,e.easing["easeOut"+t]=function(e){return 1-n(1-e)},e.easing["easeInOut"+t]=function(e){return.5>e?n(2*e)/2:1-n(-2*e+2)/2}})}()}(jQuery);(function(e){var t=/up|down|vertical/,n=/up|left|vertical|horizontal/;e.effects.effect.blind=function(r,s){var o,u,a,f=e(this),l=["position","top","bottom","left","right","height","width"],c=e.effects.setMode(f,r.mode||"hide"),h=r.direction||"up",p=t.test(h),d=p?"height":"width",v=p?"top":"left",m=n.test(h),g={},y="show"===c;f.parent().is(".ui-effects-wrapper")?e.effects.save(f.parent(),l):e.effects.save(f,l),f.show(),o=e.effects.createWrapper(f).css({overflow:"hidden"}),u=o[d](),a=parseFloat(o.css(v))||0,g[d]=y?u:0,m||(f.css(p?"bottom":"right",0).css(p?"top":"left","auto").css({position:"absolute"}),g[v]=y?a:u+a),y&&(o.css(d,0),m||o.css(v,a+u)),o.animate(g,{duration:r.duration,easing:r.easing,queue:!1,complete:function(){"hide"===c&&f.hide(),e.effects.restore(f,l),e.effects.removeWrapper(f),s()}})}})(jQuery);(function(e){e.effects.effect.bounce=function(t,n){var r,i,s,o=e(this),u=["position","top","bottom","left","right","height","width"],a=e.effects.setMode(o,t.mode||"effect"),f="hide"===a,l="show"===a,c=t.direction||"up",h=t.distance,p=t.times||5,d=2*p+(l||f?1:0),v=t.duration/d,m=t.easing,g="up"===c||"down"===c?"top":"left",y="up"===c||"left"===c,b=o.queue(),w=b.length;for((l||f)&&u.push("opacity"),e.effects.save(o,u),o.show(),e.effects.createWrapper(o),h||(h=o["top"===g?"outerHeight":"outerWidth"]()/3),l&&(s={opacity:1},s[g]=0,o.css("opacity",0).css(g,y?2*-h:2*h).animate(s,v,m)),f&&(h/=Math.pow(2,p-1)),s={},s[g]=0,r=0;p>r;r++)i={},i[g]=(y?"-=":"+=")+h,o.animate(i,v,m).animate(s,v,m),h=f?2*h:h/2;f&&(i={opacity:0},i[g]=(y?"-=":"+=")+h,o.animate(i,v,m)),o.queue(function(){f&&o.hide(),e.effects.restore(o,u),e.effects.removeWrapper(o),n()}),w>1&&b.splice.apply(b,[1,0].concat(b.splice(w,d+1))),o.dequeue()}})(jQuery);(function(e){e.effects.effect.clip=function(t,n){var r,i,s,o=e(this),u=["position","top","bottom","left","right","height","width"],a=e.effects.setMode(o,t.mode||"hide"),f="show"===a,l=t.direction||"vertical",c="vertical"===l,h=c?"height":"width",p=c?"top":"left",d={};e.effects.save(o,u),o.show(),r=e.effects.createWrapper(o).css({overflow:"hidden"}),i="IMG"===o[0].tagName?r:o,s=i[h](),f&&(i.css(h,0),i.css(p,s/2)),d[h]=f?s:0,d[p]=f?0:s/2,i.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){f||o.hide(),e.effects.restore(o,u),e.effects.removeWrapper(o),n()}})}})(jQuery);(function(e){e.effects.effect.drop=function(t,n){var r,i=e(this),s=["position","top","bottom","left","right","opacity","height","width"],o=e.effects.setMode(i,t.mode||"hide"),u="show"===o,a=t.direction||"left",f="up"===a||"down"===a?"top":"left",l="up"===a||"left"===a?"pos":"neg",c={opacity:u?1:0};e.effects.save(i,s),i.show(),e.effects.createWrapper(i),r=t.distance||i["top"===f?"outerHeight":"outerWidth"](!0)/2,u&&i.css("opacity",0).css(f,"pos"===l?-r:r),c[f]=(u?"pos"===l?"+=":"-=":"pos"===l?"-=":"+=")+r,i.animate(c,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===o&&i.hide(),e.effects.restore(i,s),e.effects.removeWrapper(i),n()}})}})(jQuery);(function(e){e.effects.effect.explode=function(t,n){function r(){b.push(this),b.length===c*h&&i()}function i(){p.css({visibility:"visible"}),e(b).remove(),v||p.hide(),n()}var s,o,u,a,f,l,c=t.pieces?Math.round(Math.sqrt(t.pieces)):3,h=c,p=e(this),d=e.effects.setMode(p,t.mode||"hide"),v="show"===d,m=p.show().css("visibility","hidden").offset(),g=Math.ceil(p.outerWidth()/h),y=Math.ceil(p.outerHeight()/c),b=[];for(s=0;c>s;s++)for(a=m.top+s*y,l=s-(c-1)/2,o=0;h>o;o++)u=m.left+o*g,f=o-(h-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-o*g,top:-s*y}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g,height:y,left:u+(v?f*g:0),top:a+(v?l*y:0),opacity:v?0:1}).animate({left:u+(v?0:f*g),top:a+(v?0:l*y),opacity:v?1:0},t.duration||500,t.easing,r)}})(jQuery);(function(e){e.effects.effect.fade=function(t,n){var r=e(this),i=e.effects.setMode(r,t.mode||"toggle");r.animate({opacity:i},{queue:!1,duration:t.duration,easing:t.easing,complete:n})}})(jQuery);(function(e){e.effects.effect.fold=function(t,n){var r,i,s=e(this),o=["position","top","bottom","left","right","height","width"],u=e.effects.setMode(s,t.mode||"hide"),a="show"===u,f="hide"===u,l=t.size||15,c=/([0-9]+)%/.exec(l),h=!!t.horizFirst,p=a!==h,d=p?["width","height"]:["height","width"],v=t.duration/2,m={},g={};e.effects.save(s,o),s.show(),r=e.effects.createWrapper(s).css({overflow:"hidden"}),i=p?[r.width(),r.height()]:[r.height(),r.width()],c&&(l=parseInt(c[1],10)/100*i[f?0:1]),a&&r.css(h?{height:0,width:l}:{height:l,width:0}),m[d[0]]=a?i[0]:l,g[d[1]]=a?i[1]:0,r.animate(m,v,t.easing).animate(g,v,t.easing,function(){f&&s.hide(),e.effects.restore(s,o),e.effects.removeWrapper(s),n()})}})(jQuery);(function(e){e.effects.effect.highlight=function(t,n){var r=e(this),i=["backgroundImage","backgroundColor","opacity"],s=e.effects.setMode(r,t.mode||"show"),o={backgroundColor:r.css("backgroundColor")};"hide"===s&&(o.opacity=0),e.effects.save(r,i),r.show().css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(o,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===s&&r.hide(),e.effects.restore(r,i),n()}})}})(jQuery);(function(e){e.effects.effect.pulsate=function(t,n){var r,i=e(this),s=e.effects.setMode(i,t.mode||"show"),o="show"===s,u="hide"===s,a=o||"hide"===s,f=2*(t.times||5)+(a?1:0),l=t.duration/f,c=0,h=i.queue(),p=h.length;for((o||!i.is(":visible"))&&(i.css("opacity",0).show(),c=1),r=1;f>r;r++)i.animate({opacity:c},l,t.easing),c=1-c;i.animate({opacity:c},l,t.easing),i.queue(function(){u&&i.hide(),n()}),p>1&&h.splice.apply(h,[1,0].concat(h.splice(p,f+1))),i.dequeue()}})(jQuery);(function(e){e.effects.effect.puff=function(t,n){var r=e(this),i=e.effects.setMode(r,t.mode||"hide"),s="hide"===i,o=parseInt(t.percent,10)||150,u=o/100,a={height:r.height(),width:r.width(),outerHeight:r.outerHeight(),outerWidth:r.outerWidth()};e.extend(t,{effect:"scale",queue:!1,fade:!0,mode:i,complete:n,percent:s?o:100,from:s?a:{height:a.height*u,width:a.width*u,outerHeight:a.outerHeight*u,outerWidth:a.outerWidth*u}}),r.effect(t)},e.effects.effect.scale=function(t,n){var r=e(this),i=e.extend(!0,{},t),s=e.effects.setMode(r,t.mode||"effect"),o=parseInt(t.percent,10)||(0===parseInt(t.percent,10)?0:"hide"===s?0:100),u=t.direction||"both",a=t.origin,f={height:r.height(),width:r.width(),outerHeight:r.outerHeight(),outerWidth:r.outerWidth()},l={y:"horizontal"!==u?o/100:1,x:"vertical"!==u?o/100:1};i.effect="size",i.queue=!1,i.complete=n,"effect"!==s&&(i.origin=a||["middle","center"],i.restore=!0),i.from=t.from||("show"===s?{height:0,width:0,outerHeight:0,outerWidth:0}:f),i.to={height:f.height*l.y,width:f.width*l.x,outerHeight:f.outerHeight*l.y,outerWidth:f.outerWidth*l.x},i.fade&&("show"===s&&(i.from.opacity=0,i.to.opacity=1),"hide"===s&&(i.from.opacity=1,i.to.opacity=0)),r.effect(i)},e.effects.effect.size=function(t,n){var r,i,s,o=e(this),u=["position","top","bottom","left","right","width","height","overflow","opacity"],a=["position","top","bottom","left","right","overflow","opacity"],f=["width","height","overflow"],l=["fontSize"],c=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],h=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=e.effects.setMode(o,t.mode||"effect"),d=t.restore||"effect"!==p,v=t.scale||"both",m=t.origin||["middle","center"],g=o.css("position"),y=d?u:a,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&o.show(),r={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},"toggle"===t.mode&&"show"===p?(o.from=t.to||b,o.to=t.from||r):(o.from=t.from||("show"===p?b:r),o.to=t.to||("hide"===p?b:r)),s={from:{y:o.from.height/r.height,x:o.from.width/r.width},to:{y:o.to.height/r.height,x:o.to.width/r.width}},("box"===v||"both"===v)&&(s.from.y!==s.to.y&&(y=y.concat(c),o.from=e.effects.setTransition(o,c,s.from.y,o.from),o.to=e.effects.setTransition(o,c,s.to.y,o.to)),s.from.x!==s.to.x&&(y=y.concat(h),o.from=e.effects.setTransition(o,h,s.from.x,o.from),o.to=e.effects.setTransition(o,h,s.to.x,o.to))),("content"===v||"both"===v)&&s.from.y!==s.to.y&&(y=y.concat(l).concat(f),o.from=e.effects.setTransition(o,l,s.from.y,o.from),o.to=e.effects.setTransition(o,l,s.to.y,o.to)),e.effects.save(o,y),o.show(),e.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),m&&(i=e.effects.getBaseline(m,r),o.from.top=(r.outerHeight-o.outerHeight())*i.y,o.from.left=(r.outerWidth-o.outerWidth())*i.x,o.to.top=(r.outerHeight-o.to.outerHeight)*i.y,o.to.left=(r.outerWidth-o.to.outerWidth)*i.x),o.css(o.from),("content"===v||"both"===v)&&(c=c.concat(["marginTop","marginBottom"]).concat(l),h=h.concat(["marginLeft","marginRight"]),f=u.concat(c).concat(h),o.find("*[width]").each(function(){var n=e(this),r={height:n.height(),width:n.width(),outerHeight:n.outerHeight(),outerWidth:n.outerWidth()};d&&e.effects.save(n,f),n.from={height:r.height*s.from.y,width:r.width*s.from.x,outerHeight:r.outerHeight*s.from.y,outerWidth:r.outerWidth*s.from.x},n.to={height:r.height*s.to.y,width:r.width*s.to.x,outerHeight:r.height*s.to.y,outerWidth:r.width*s.to.x},s.from.y!==s.to.y&&(n.from=e.effects.setTransition(n,c,s.from.y,n.from),n.to=e.effects.setTransition(n,c,s.to.y,n.to)),s.from.x!==s.to.x&&(n.from=e.effects.setTransition(n,h,s.from.x,n.from),n.to=e.effects.setTransition(n,h,s.to.x,n.to)),n.css(n.from),n.animate(n.to,t.duration,t.easing,function(){d&&e.effects.restore(n,f)})})),o.animate(o.to,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){0===o.to.opacity&&o.css("opacity",o.from.opacity),"hide"===p&&o.hide(),e.effects.restore(o,y),d||("static"===g?o.css({position:"relative",top:o.to.top,left:o.to.left}):e.each(["top","left"],function(e,t){o.css(t,function(t,n){var r=parseInt(n,10),i=e?o.to.left:o.to.top;return"auto"===n?i+"px":r+i+"px"})})),e.effects.removeWrapper(o),n()}})}})(jQuery);(function(e){e.effects.effect.shake=function(t,n){var r,i=e(this),s=["position","top","bottom","left","right","height","width"],o=e.effects.setMode(i,t.mode||"effect"),u=t.direction||"left",a=t.distance||20,f=t.times||3,l=2*f+1,c=Math.round(t.duration/l),h="up"===u||"down"===u?"top":"left",p="up"===u||"left"===u,d={},v={},m={},g=i.queue(),y=g.length;for(e.effects.save(i,s),i.show(),e.effects.createWrapper(i),d[h]=(p?"-=":"+=")+a,v[h]=(p?"+=":"-=")+2*a,m[h]=(p?"-=":"+=")+2*a,i.animate(d,c,t.easing),r=1;f>r;r++)i.animate(v,c,t.easing).animate(m,c,t.easing);i.animate(v,c,t.easing).animate(d,c/2,t.easing).queue(function(){"hide"===o&&i.hide(),e.effects.restore(i,s),e.effects.removeWrapper(i),n()}),y>1&&g.splice.apply(g,[1,0].concat(g.splice(y,l+1))),i.dequeue()}})(jQuery);(function(e){e.effects.effect.slide=function(t,n){var r,i=e(this),s=["position","top","bottom","left","right","width","height"],o=e.effects.setMode(i,t.mode||"show"),u="show"===o,a=t.direction||"left",f="up"===a||"down"===a?"top":"left",l="up"===a||"left"===a,c={};e.effects.save(i,s),i.show(),r=t.distance||i["top"===f?"outerHeight":"outerWidth"](!0),e.effects.createWrapper(i).css({overflow:"hidden"}),u&&i.css(f,l?isNaN(r)?"-"+r:-r:r),c[f]=(u?l?"+=":"-=":l?"-=":"+=")+r,i.animate(c,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===o&&i.hide(),e.effects.restore(i,s),e.effects.removeWrapper(i),n()}})}})(jQuery);(function(e){e.effects.effect.transfer=function(t,n){var r=e(this),i=e(t.to),s="fixed"===i.css("position"),o=e("body"),u=s?o.scrollTop():0,a=s?o.scrollLeft():0,f=i.offset(),l={top:f.top-u,left:f.left-a,height:i.innerHeight(),width:i.innerWidth()},c=r.offset(),h=e('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(t.className).css({top:c.top-u,left:c.left-a,height:r.innerHeight(),width:r.innerWidth(),position:s?"fixed":"absolute"}).animate(l,t.duration,t.easing,function(){h.remove(),n()})}})(jQuery);(function($){"use strict";var escape=/["\\\x00-\x1f\x7f-\x9f]/g,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},hasOwn=Object.prototype.hasOwnProperty;$.toJSON=typeof JSON==="object"&&JSON.stringify?JSON.stringify:function(e){if(e===null){return"null"}var t,n,r,i,s=$.type(e);if(s==="undefined"){return undefined}if(s==="number"||s==="boolean"){return String(e)}if(s==="string"){return $.quoteString(e)}if(typeof e.toJSON==="function"){return $.toJSON(e.toJSON())}if(s==="date"){var o=e.getUTCMonth()+1,u=e.getUTCDate(),a=e.getUTCFullYear(),f=e.getUTCHours(),l=e.getUTCMinutes(),c=e.getUTCSeconds(),h=e.getUTCMilliseconds();if(o<10){o="0"+o}if(u<10){u="0"+u}if(f<10){f="0"+f}if(l<10){l="0"+l}if(c<10){c="0"+c}if(h<100){h="0"+h}if(h<10){h="0"+h}return'"'+a+"-"+o+"-"+u+"T"+f+":"+l+":"+c+"."+h+'Z"'}t=[];if($.isArray(e)){for(n=0;n<e.length;n++){t.push($.toJSON(e[n])||"null")}return"["+t.join(",")+"]"}if(typeof e==="object"){for(n in e){if(hasOwn.call(e,n)){s=typeof n;if(s==="number"){r='"'+n+'"'}else if(s==="string"){r=$.quoteString(n)}else{continue}s=typeof e[n];if(s!=="function"&&s!=="undefined"){i=$.toJSON(e[n]);t.push(r+":"+i)}}}return"{"+t.join(",")+"}"}};$.evalJSON=typeof JSON==="object"&&JSON.parse?JSON.parse:function(str){return eval("("+str+")")};$.secureEvalJSON=typeof JSON==="object"&&JSON.parse?JSON.parse:function(str){var filtered=str.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"");if(/^[\],:{}\s]*$/.test(filtered)){return eval("("+str+")")}throw new SyntaxError("Error parsing JSON, source is not valid.")};$.quoteString=function(e){if(e.match(escape)){return'"'+e.replace(escape,function(e){var t=meta[e];if(typeof t==="string"){return t}t=e.charCodeAt();return"\\u00"+Math.floor(t/16).toString(16)+(t%16).toString(16)})+'"'}return'"'+e+'"'}})(jQuery);(function(e){e.extend(e.fn,{validate:function(t){if(!this.length){if(t&&t.debug&&window.console){console.warn("Nothing selected, can't validate, returning nothing.")}return}var n=e.data(this[0],"validator");if(n){return n}this.attr("novalidate","novalidate");n=new e.validator(t,this[0]);e.data(this[0],"validator",n);if(n.settings.onsubmit){this.validateDelegate(":submit","click",function(t){if(n.settings.submitHandler){n.submitButton=t.target}if(e(t.target).hasClass("cancel")){n.cancelSubmit=true}if(e(t.target).attr("formnovalidate")!==undefined){n.cancelSubmit=true}});this.submit(function(t){function r(){var r;if(n.settings.submitHandler){if(n.submitButton){r=e("<input type='hidden'/>").attr("name",n.submitButton.name).val(e(n.submitButton).val()).appendTo(n.currentForm)}n.settings.submitHandler.call(n,n.currentForm,t);if(n.submitButton){r.remove()}return false}return true}if(n.settings.debug){t.preventDefault()}if(n.cancelSubmit){n.cancelSubmit=false;return r()}if(n.form()){if(n.pendingRequest){n.formSubmitted=true;return false}return r()}else{n.focusInvalid();return false}})}return n},valid:function(){if(e(this[0]).is("form")){return this.validate().form()}else{var t=true;var n=e(this[0].form).validate();this.each(function(){t=t&&n.element(this)});return t}},removeAttrs:function(t){var n={},r=this;e.each(t.split(/\s/),function(e,t){n[t]=r.attr(t);r.removeAttr(t)});return n},rules:function(t,n){var r=this[0];if(t){var i=e.data(r.form,"validator").settings;var s=i.rules;var o=e.validator.staticRules(r);switch(t){case"add":e.extend(o,e.validator.normalizeRule(n));delete o.messages;s[r.name]=o;if(n.messages){i.messages[r.name]=e.extend(i.messages[r.name],n.messages)}break;case"remove":if(!n){delete s[r.name];return o}var u={};e.each(n.split(/\s/),function(e,t){u[t]=o[t];delete o[t]});return u}}var a=e.validator.normalizeRules(e.extend({},e.validator.classRules(r),e.validator.attributeRules(r),e.validator.dataRules(r),e.validator.staticRules(r)),r);if(a.required){var f=a.required;delete a.required;a=e.extend({required:f},a)}return a}});e.extend(e.expr[":"],{blank:function(t){return!e.trim(""+e(t).val())},filled:function(t){return!!e.trim(""+e(t).val())},unchecked:function(t){return!e(t).prop("checked")}});e.validator=function(t,n){this.settings=e.extend(true,{},e.validator.defaults,t);this.currentForm=n;this.init()};e.validator.format=function(t,n){if(arguments.length===1){return function(){var n=e.makeArray(arguments);n.unshift(t);return e.validator.format.apply(this,n)}}if(arguments.length>2&&n.constructor!==Array){n=e.makeArray(arguments).slice(1)}if(n.constructor!==Array){n=[n]}e.each(n,function(e,n){t=t.replace(new RegExp("\\{"+e+"\\}","g"),function(){return n})});return t};e.extend(e.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:e([]),errorLabelContainer:e([]),onsubmit:true,ignore:":hidden",ignoreTitle:false,onfocusin:function(e,t){this.lastActive=e;if(this.settings.focusCleanup&&!this.blockFocusCleanup){if(this.settings.unhighlight){this.settings.unhighlight.call(this,e,this.settings.errorClass,this.settings.validClass)}this.addWrapper(this.errorsFor(e)).hide()}},onfocusout:function(e,t){if(!this.checkable(e)&&(e.name in this.submitted||!this.optional(e))){this.element(e)}},onkeyup:function(e,t){if(t.which===9&&this.elementValue(e)===""){return}else if(e.name in this.submitted||e===this.lastElement){this.element(e)}},onclick:function(e,t){if(e.name in this.submitted){this.element(e)}else if(e.parentNode.name in this.submitted){this.element(e.parentNode)}},highlight:function(t,n,r){if(t.type==="radio"){this.findByName(t.name).addClass(n).removeClass(r)}else{e(t).addClass(n).removeClass(r)}},unhighlight:function(t,n,r){if(t.type==="radio"){this.findByName(t.name).removeClass(n).addClass(r)}else{e(t).removeClass(n).addClass(r)}}},setDefaults:function(t){e.extend(e.validator.defaults,t)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:e.validator.format("Please enter no more than {0} characters."),minlength:e.validator.format("Please enter at least {0} characters."),rangelength:e.validator.format("Please enter a value between {0} and {1} characters long."),range:e.validator.format("Please enter a value between {0} and {1}."),max:e.validator.format("Please enter a value less than or equal to {0}."),min:e.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){function r(t){var n=e.data(this[0].form,"validator"),r="on"+t.type.replace(/^validate/,"");if(n.settings[r]){n.settings[r].call(n,this[0],t)}}this.labelContainer=e(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||e(this.currentForm);this.containers=e(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var t=this.groups={};e.each(this.settings.groups,function(n,r){if(typeof r==="string"){r=r.split(/\s/)}e.each(r,function(e,r){t[r]=n})});var n=this.settings.rules;e.each(n,function(t,r){n[t]=e.validator.normalizeRule(r)});e(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, "+"[type='number'], [type='search'] ,[type='tel'], [type='url'], "+"[type='email'], [type='datetime'], [type='date'], [type='month'], "+"[type='week'], [type='time'], [type='datetime-local'], "+"[type='range'], [type='color'] ","focusin focusout keyup",r).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",r);if(this.settings.invalidHandler){e(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)}},form:function(){this.checkForm();e.extend(this.submitted,this.errorMap);this.invalid=e.extend({},this.errorMap);if(!this.valid()){e(this.currentForm).triggerHandler("invalid-form",[this])}this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var e=0,t=this.currentElements=this.elements();t[e];e++){this.check(t[e])}return this.valid()},element:function(t){t=this.validationTargetFor(this.clean(t));this.lastElement=t;this.prepareElement(t);this.currentElements=e(t);var n=this.check(t)!==false;if(n){delete this.invalid[t.name]}else{this.invalid[t.name]=true}if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers)}this.showErrors();return n},showErrors:function(t){if(t){e.extend(this.errorMap,t);this.errorList=[];for(var n in t){this.errorList.push({message:t[n],element:this.findByName(n)[0]})}this.successList=e.grep(this.successList,function(e){return!(e.name in t)})}if(this.settings.showErrors){this.settings.showErrors.call(this,this.errorMap,this.errorList)}else{this.defaultShowErrors()}},resetForm:function(){if(e.fn.resetForm){e(this.currentForm).resetForm()}this.submitted={};this.lastElement=null;this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass).removeData("previousValue")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(e){var t=0;for(var n in e){t++}return t},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()===0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid){try{e(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(t){}}},findLastActive:function(){var t=this.lastActive;return t&&e.grep(this.errorList,function(e){return e.element.name===t.name}).length===1&&t},elements:function(){var t=this,n={};return e(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){if(!this.name&&t.settings.debug&&window.console){console.error("%o has no name assigned",this)}if(this.name in n||!t.objectLength(e(this).rules())){return false}n[this.name]=true;return true})},clean:function(t){return e(t)[0]},errors:function(){var t=this.settings.errorClass.replace(" ",".");return e(this.settings.errorElement+"."+t,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=e([]);this.toHide=e([]);this.currentElements=e([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(e){this.reset();this.toHide=this.errorsFor(e)},elementValue:function(t){var n=e(t).attr("type"),r=e(t).val();if(n==="radio"||n==="checkbox"){return e("input[name='"+e(t).attr("name")+"']:checked").val()}if(typeof r==="string"){return r.replace(/\r/g,"")}return r},check:function(t){t=this.validationTargetFor(this.clean(t));var n=e(t).rules();var r=false;var i=this.elementValue(t);var s;for(var o in n){var u={method:o,parameters:n[o]};try{s=e.validator.methods[o].call(this,i,t,u.parameters);if(s==="dependency-mismatch"){r=true;continue}r=false;if(s==="pending"){this.toHide=this.toHide.not(this.errorsFor(t));return}if(!s){this.formatAndAdd(t,u);return false}}catch(a){if(this.settings.debug&&window.console){console.log("Exception occurred when checking element "+t.id+", check the '"+u.method+"' method.",a)}throw a}}if(r){return}if(this.objectLength(n)){this.successList.push(t)}return true},customDataMessage:function(t,n){return e(t).data("msg-"+n.toLowerCase())||t.attributes&&e(t).attr("data-msg-"+n.toLowerCase())},customMessage:function(e,t){var n=this.settings.messages[e];return n&&(n.constructor===String?n:n[t])},findDefined:function(){for(var e=0;e<arguments.length;e++){if(arguments[e]!==undefined){return arguments[e]}}return undefined},defaultMessage:function(t,n){return this.findDefined(this.customMessage(t.name,n),this.customDataMessage(t,n),!this.settings.ignoreTitle&&t.title||undefined,e.validator.messages[n],"<strong>Warning: No message defined for "+t.name+"</strong>")},formatAndAdd:function(t,n){var r=this.defaultMessage(t,n.method),i=/\$?\{(\d+)\}/g;if(typeof r==="function"){r=r.call(this,n.parameters,t)}else if(i.test(r)){r=e.validator.format(r.replace(i,"{$1}"),n.parameters)}this.errorList.push({message:r,element:t});this.errorMap[t.name]=r;this.submitted[t.name]=r},addWrapper:function(e){if(this.settings.wrapper){e=e.add(e.parent(this.settings.wrapper))}return e},defaultShowErrors:function(){var e,t;for(e=0;this.errorList[e];e++){var n=this.errorList[e];if(this.settings.highlight){this.settings.highlight.call(this,n.element,this.settings.errorClass,this.settings.validClass)}this.showLabel(n.element,n.message)}if(this.errorList.length){this.toShow=this.toShow.add(this.containers)}if(this.settings.success){for(e=0;this.successList[e];e++){this.showLabel(this.successList[e])}}if(this.settings.unhighlight){for(e=0,t=this.validElements();t[e];e++){this.settings.unhighlight.call(this,t[e],this.settings.errorClass,this.settings.validClass)}}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return e(this.errorList).map(function(){return this.element})},showLabel:function(t,n){var r=this.errorsFor(t);if(false){r.removeClass(this.settings.validClass).addClass(this.settings.errorClass);r.html(n)}else{r=e("<"+this.settings.errorElement+">").attr("for",this.idOrName(t)).addClass(this.settings.errorClass).html(n||"");if(this.settings.wrapper){r=r.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()}if(!this.labelContainer.append(r).length){if(this.settings.errorPlacement){this.settings.errorPlacement(r,e(t))}else{r.insertAfter(t)}}}if(!n&&this.settings.success){r.text("");if(typeof this.settings.success==="string"){r.addClass(this.settings.success)}else{this.settings.success(r,t)}}this.toShow=this.toShow.add(r)},errorsFor:function(t){var n=this.idOrName(t);return this.errors().filter(function(){return e(this).attr("for")===n})},idOrName:function(e){return this.groups[e.name]||(this.checkable(e)?e.name:e.id||e.name)},validationTargetFor:function(e){if(this.checkable(e)){e=this.findByName(e.name).not(this.settings.ignore)[0]}return e},checkable:function(e){return/radio|checkbox/i.test(e.type)},findByName:function(t){return e(this.currentForm).find("[name='"+t+"']")},getLength:function(t,n){switch(n.nodeName.toLowerCase()){case"select":return e("option:selected",n).length;case"input":if(this.checkable(n)){return this.findByName(n.name).filter(":checked").length}}return t.length},depend:function(e,t){return this.dependTypes[typeof e]?this.dependTypes[typeof e](e,t):true},dependTypes:{"boolean":function(e,t){return e},string:function(t,n){return!!e(t,n.form).length},"function":function(e,t){return e(t)}},optional:function(t){var n=this.elementValue(t);return!e.validator.methods.required.call(this,n,t)&&"dependency-mismatch"},startRequest:function(e){if(!this.pending[e.name]){this.pendingRequest++;this.pending[e.name]=true}},stopRequest:function(t,n){this.pendingRequest--;if(this.pendingRequest<0){this.pendingRequest=0}delete this.pending[t.name];if(n&&this.pendingRequest===0&&this.formSubmitted&&this.form()){e(this.currentForm).submit();this.formSubmitted=false}else if(!n&&this.pendingRequest===0&&this.formSubmitted){e(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=false}},previousValue:function(t){return e.data(t,"previousValue")||e.data(t,"previousValue",{old:null,valid:true,message:this.defaultMessage(t,"remote")})}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},number:{number:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(t,n){if(t.constructor===String){this.classRuleSettings[t]=n}else{e.extend(this.classRuleSettings,t)}},classRules:function(t){var n={};var r=e(t).attr("class");if(r){e.each(r.split(" "),function(){if(this in e.validator.classRuleSettings){e.extend(n,e.validator.classRuleSettings[this])}})}return n},attributeRules:function(t){var n={};var r=e(t);var i=r[0].getAttribute("type");for(var s in e.validator.methods){var o;if(s==="required"){o=r.get(0).getAttribute(s);if(o===""){o=true}o=!!o}else{o=r.attr(s)}if(/min|max/.test(s)&&(i===null||/number|range|text/.test(i))){o=Number(o)}if(o){n[s]=o}else if(i===s&&i!=="range"){n[s]=true}}if(n.maxlength&&/-1|2147483647|524288/.test(n.maxlength)){delete n.maxlength}return n},dataRules:function(t){var n,r,i={},s=e(t);for(n in e.validator.methods){r=s.data("rule-"+n.toLowerCase());if(r!==undefined){i[n]=r}}return i},staticRules:function(t){var n={};var r=e.data(t.form,"validator");if(r.settings.rules){n=e.validator.normalizeRule(r.settings.rules[t.name])||{}}return n},normalizeRules:function(t,n){e.each(t,function(r,i){if(i===false){delete t[r];return}if(i.param||i.depends){var s=true;switch(typeof i.depends){case"string":s=!!e(i.depends,n.form).length;break;case"function":s=i.depends.call(n,n);break}if(s){t[r]=i.param!==undefined?i.param:true}else{delete t[r]}}});e.each(t,function(r,i){t[r]=e.isFunction(i)?i(n):i});e.each(["minlength","maxlength"],function(){if(t[this]){t[this]=Number(t[this])}});e.each(["rangelength","range"],function(){var n;if(t[this]){if(e.isArray(t[this])){t[this]=[Number(t[this][0]),Number(t[this][1])]}else if(typeof t[this]==="string"){n=t[this].split(/[\s,]+/);t[this]=[Number(n[0]),Number(n[1])]}}});if(e.validator.autoCreateRanges){if(t.min&&t.max){t.range=[t.min,t.max];delete t.min;delete t.max}if(t.minlength&&t.maxlength){t.rangelength=[t.minlength,t.maxlength];delete t.minlength;delete t.maxlength}}return t},normalizeRule:function(t){if(typeof t==="string"){var n={};e.each(t.split(/\s/),function(){n[this]=true});t=n}return t},addMethod:function(t,n,r){e.validator.methods[t]=n;e.validator.messages[t]=r!==undefined?r:e.validator.messages[t];if(n.length<3){e.validator.addClassRules(t,e.validator.normalizeRule(t))}},methods:{required:function(t,n,r){if(!this.depend(r,n)){return"dependency-mismatch"}if(n.nodeName.toLowerCase()==="select"){var i=e(n).val();return i&&i.length>0}if(this.checkable(n)){return this.getLength(t,n)>0}return e.trim(t).length>0},email:function(e,t){return this.optional(t)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(e)},url:function(e,t){return this.optional(t)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(e)},date:function(e,t){return this.optional(t)||!/Invalid|NaN/.test((new Date(e)).toString())},dateISO:function(e,t){return this.optional(t)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(e)},number:function(e,t){return this.optional(t)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(e)},digits:function(e,t){return this.optional(t)||/^\d+$/.test(e)},creditcard:function(e,t){if(this.optional(t)){return"dependency-mismatch"}if(/[^0-9 \-]+/.test(e)){return false}var n=0,r=0,i=false;e=e.replace(/\D/g,"");for(var s=e.length-1;s>=0;s--){var o=e.charAt(s);r=parseInt(o,10);if(i){if((r*=2)>9){r-=9}}n+=r;i=!i}return n%10===0},minlength:function(t,n,r){var i=e.isArray(t)?t.length:this.getLength(e.trim(t),n);return this.optional(n)||i>=r},maxlength:function(t,n,r){var i=e.isArray(t)?t.length:this.getLength(e.trim(t),n);return this.optional(n)||i<=r},rangelength:function(t,n,r){var i=e.isArray(t)?t.length:this.getLength(e.trim(t),n);return this.optional(n)||i>=r[0]&&i<=r[1]},min:function(e,t,n){return this.optional(t)||e>=n},max:function(e,t,n){return this.optional(t)||e<=n},range:function(e,t,n){return this.optional(t)||e>=n[0]&&e<=n[1]},equalTo:function(t,n,r){var i=e(r);if(this.settings.onfocusout){i.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){e(n).valid()})}return t===i.val()},remote:function(t,n,r){if(this.optional(n)){return"dependency-mismatch"}var i=this.previousValue(n);if(!this.settings.messages[n.name]){this.settings.messages[n.name]={}}i.originalMessage=this.settings.messages[n.name].remote;this.settings.messages[n.name].remote=i.message;r=typeof r==="string"&&{url:r}||r;if(i.old===t){return i.valid}i.old=t;var s=this;this.startRequest(n);var o={};o[n.name]=t;if(n.name=="captcha"){o["sessionCode"]=e("img[for='captcha']").attr("data-sessioncode")}e.ajax(e.extend(true,{url:r,mode:"abort",port:"validate"+n.name,dataType:"json",data:e.toJSON(o),success:function(r){r=r.d;s.settings.messages[n.name].remote=i.originalMessage;var o=r===true||r==="true";if(o){var u=s.formSubmitted;s.prepareElement(n);s.formSubmitted=u;s.successList.push(n);delete s.invalid[n.name];s.showErrors()}else{var a={};var f=r||s.defaultMessage(n,"remote");a[n.name]=i.message=e.isFunction(f)?f(t):f;s.invalid[n.name]=true;s.showErrors(a)}i.valid=o;s.stopRequest(n,o)},fail:function(e){}},r));return"pending"}}});e.format=e.validator.format})(jQuery);(function(e){var t={};if(e.ajaxPrefilter){e.ajaxPrefilter(function(e,n,r){var i=e.port;if(e.mode==="abort"){if(t[i]){t[i].abort()}t[i]=r}})}else{var n=e.ajax;e.ajax=function(r){var i=("mode"in r?r:e.ajaxSettings).mode,s=("port"in r?r:e.ajaxSettings).port;if(i==="abort"){if(t[s]){t[s].abort()}t[s]=n.apply(this,arguments);return t[s]}return n.apply(this,arguments)}}})(jQuery);(function(e){e.extend(e.fn,{validateDelegate:function(t,n,r){return this.bind(n,function(n){var i=e(n.target);if(i.is(t)){return r.apply(i,arguments)}})}})})(jQuery);(function(){function e(e){return e.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'"_+=\/\-]*/g,"")}jQuery.validator.addMethod("maxWords",function(t,n,r){return this.optional(n)||e(t).match(/\b\w+\b/g).length<=r},jQuery.validator.format("Please enter {0} words or less."));jQuery.validator.addMethod("minWords",function(t,n,r){return this.optional(n)||e(t).match(/\b\w+\b/g).length>=r},jQuery.validator.format("Please enter at least {0} words."));jQuery.validator.addMethod("rangeWords",function(t,n,r){var i=e(t);var s=/\b\w+\b/g;return this.optional(n)||i.match(s).length>=r[0]&&i.match(s).length<=r[1]},jQuery.validator.format("Please enter between {0} and {1} words."))})();jQuery.validator.addMethod("letterswithbasicpunc",function(e,t){return this.optional(t)||/^[a-z\-.,()'"\s]+$/i.test(e)},"Letters or punctuation only please");jQuery.validator.addMethod("alphanumeric",function(e,t){return this.optional(t)||/^\w+$/i.test(e)},"Letters, numbers, and underscores only please");jQuery.validator.addMethod("lettersonly",function(e,t){return this.optional(t)||/^[a-z]+$/i.test(e)},"Letters only please");jQuery.validator.addMethod("nowhitespace",function(e,t){return this.optional(t)||/^\S+$/i.test(e)},"No white space please");jQuery.validator.addMethod("ziprange",function(e,t){return this.optional(t)||/^90[2-5]\d\{2\}-\d{4}$/.test(e)},"Your ZIP-code must be in the range 902xx-xxxx to 905-xx-xxxx");jQuery.validator.addMethod("zipcodeUS",function(e,t){return this.optional(t)||/\d{5}-\d{4}$|^\d{5}$/.test(e)},"The specified US ZIP Code is invalid");jQuery.validator.addMethod("integer",function(e,t){return this.optional(t)||/^-?\d+$/.test(e)},"A positive or negative non-decimal number please");jQuery.validator.addMethod("vinUS",function(e){if(e.length!==17){return false}var t,n,r,i,s,o;var u=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"];var a=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9];var f=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2];var l=0;for(t=0;t<17;t++){i=f[t];r=e.slice(t,t+1);if(t===8){o=r}if(!isNaN(r)){r*=i}else{for(n=0;n<u.length;n++){if(r.toUpperCase()===u[n]){r=a[n];r*=i;if(isNaN(o)&&n===8){o=u[n]}break}}}l+=r}s=l%11;if(s===10){s="X"}if(s===o){return true}return false},"The specified vehicle identification number (VIN) is invalid.");jQuery.validator.addMethod("dateITA",function(e,t){var n=false;var r=/^\d{1,2}\/\d{1,2}\/\d{4}$/;if(r.test(e)){var i=e.split("/");var s=parseInt(i[0],10);var o=parseInt(i[1],10);var u=parseInt(i[2],10);var a=new Date(u,o-1,s);if(a.getFullYear()===u&&a.getMonth()===o-1&&a.getDate()===s){n=true}else{n=false}}else{n=false}return this.optional(t)||n},"Please enter a correct date");jQuery.validator.addMethod("iban",function(e,t){if(this.optional(t)){return true}if(!/^([a-zA-Z0-9]{4} ){2,8}[a-zA-Z0-9]{1,4}|[a-zA-Z0-9]{12,34}$/.test(e)){return false}var n=e.replace(/ /g,"").toUpperCase();var r=n.substring(0,2);var i={AL:"\\d{8}[\\dA-Z]{16}",AD:"\\d{8}[\\dA-Z]{12}",AT:"\\d{16}",AZ:"[\\dA-Z]{4}\\d{20}",BE:"\\d{12}",BH:"[A-Z]{4}[\\dA-Z]{14}",BA:"\\d{16}",BR:"\\d{23}[A-Z][\\dA-Z]",BG:"[A-Z]{4}\\d{6}[\\dA-Z]{8}",CR:"\\d{17}",HR:"\\d{17}",CY:"\\d{8}[\\dA-Z]{16}",CZ:"\\d{20}",DK:"\\d{14}",DO:"[A-Z]{4}\\d{20}",EE:"\\d{16}",FO:"\\d{14}",FI:"\\d{14}",FR:"\\d{10}[\\dA-Z]{11}\\d{2}",GE:"[\\dA-Z]{2}\\d{16}",DE:"\\d{18}",GI:"[A-Z]{4}[\\dA-Z]{15}",GR:"\\d{7}[\\dA-Z]{16}",GL:"\\d{14}",GT:"[\\dA-Z]{4}[\\dA-Z]{20}",HU:"\\d{24}",IS:"\\d{22}",IE:"[\\dA-Z]{4}\\d{14}",IL:"\\d{19}",IT:"[A-Z]\\d{10}[\\dA-Z]{12}",KZ:"\\d{3}[\\dA-Z]{13}",KW:"[A-Z]{4}[\\dA-Z]{22}",LV:"[A-Z]{4}[\\dA-Z]{13}",LB:"\\d{4}[\\dA-Z]{20}",LI:"\\d{5}[\\dA-Z]{12}",LT:"\\d{16}",LU:"\\d{3}[\\dA-Z]{13}",MK:"\\d{3}[\\dA-Z]{10}\\d{2}",MT:"[A-Z]{4}\\d{5}[\\dA-Z]{18}",MR:"\\d{23}",MU:"[A-Z]{4}\\d{19}[A-Z]{3}",MC:"\\d{10}[\\dA-Z]{11}\\d{2}",MD:"[\\dA-Z]{2}\\d{18}",ME:"\\d{18}",NL:"[A-Z]{4}\\d{10}",NO:"\\d{11}",PK:"[\\dA-Z]{4}\\d{16}",PS:"[\\dA-Z]{4}\\d{21}",PL:"\\d{24}",PT:"\\d{21}",RO:"[A-Z]{4}[\\dA-Z]{16}",SM:"[A-Z]\\d{10}[\\dA-Z]{12}",SA:"\\d{2}[\\dA-Z]{18}",RS:"\\d{18}",SK:"\\d{20}",SI:"\\d{15}",ES:"\\d{20}",SE:"\\d{20}",CH:"\\d{5}[\\dA-Z]{12}",TN:"\\d{20}",TR:"\\d{5}[\\dA-Z]{17}",AE:"\\d{3}\\d{16}",GB:"[A-Z]{4}\\d{14}",VG:"[\\dA-Z]{4}\\d{16}"};var s=i[r];if(typeof s!=="undefined"){var o=new RegExp("^[A-Z]{2}\\d{2}"+s+"$","");if(!o.test(n)){return false}}var u=n.substring(4,n.length)+n.substring(0,4);var a="";var f=true;var l;for(var c=0;c<u.length;c++){l=u.charAt(c);if(l!=="0"){f=false}if(!f){a+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(l)}}var h="";var p="";for(var d=0;d<a.length;d++){var v=a.charAt(d);p=""+h+""+v;h=p%97}return h===1},"Please specify a valid IBAN");jQuery.validator.addMethod("dateNL",function(e,t){return this.optional(t)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(e)},"Please enter a correct date");jQuery.validator.addMethod("phoneNL",function(e,t){return this.optional(t)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(e)},"Please specify a valid phone number.");jQuery.validator.addMethod("mobileNL",function(e,t){return this.optional(t)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(e)},"Please specify a valid mobile number");jQuery.validator.addMethod("postalcodeNL",function(e,t){return this.optional(t)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(e)},"Please specify a valid postal code");jQuery.validator.addMethod("bankaccountNL",function(e,t){if(this.optional(t)){return true}if(!/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(e)){return false}var n=e.replace(/ /g,"");var r=0;var i=n.length;for(var s=0;s<i;s++){var o=i-s;var u=n.substring(s,s+1);r=r+o*u}return r%11===0},"Please specify a valid bank account number");jQuery.validator.addMethod("giroaccountNL",function(e,t){return this.optional(t)||/^[0-9]{1,7}$/.test(e)},"Please specify a valid giro account number");jQuery.validator.addMethod("bankorgiroaccountNL",function(e,t){return this.optional(t)||$.validator.methods["bankaccountNL"].call(this,e,t)||$.validator.methods["giroaccountNL"].call(this,e,t)},"Please specify a valid bank or giro account number");jQuery.validator.addMethod("time",function(e,t){return this.optional(t)||/^([01]\d|2[0-3])(:[0-5]\d){1,2}$/.test(e)},"Please enter a valid time, between 00:00 and 23:59");jQuery.validator.addMethod("time12h",function(e,t){return this.optional(t)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(e)},"Please enter a valid time in 12-hour am/pm format");jQuery.validator.addMethod("phoneUS",function(e,t){e=e.replace(/\s+/g,"");return this.optional(t)||e.length>9&&e.match(/^(\+?1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number");jQuery.validator.addMethod("phoneUK",function(e,t){e=e.replace(/\(|\)|\s+|-/g,"");return this.optional(t)||e.length>9&&e.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number");jQuery.validator.addMethod("mobileUK",function(e,t){e=e.replace(/\(|\)|\s+|-/g,"");return this.optional(t)||e.length>9&&e.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[45789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number");jQuery.validator.addMethod("phonesUK",function(e,t){e=e.replace(/\(|\)|\s+|-/g,"");return this.optional(t)||e.length>9&&e.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[45789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number");jQuery.validator.addMethod("postcodeUK",function(e,t){return this.optional(t)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(e)},"Please specify a valid UK postcode");jQuery.validator.addMethod("strippedminlength",function(e,t,n){return jQuery(e).text().length>=n},jQuery.validator.format("Please enter at least {0} characters"));jQuery.validator.addMethod("email2",function(e,t,n){return this.optional(t)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(e)},jQuery.validator.messages.email);jQuery.validator.addMethod("url2",function(e,t,n){return this.optional(t)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(e)},jQuery.validator.messages.url);jQuery.validator.addMethod("creditcardtypes",function(e,t,n){if(/[^0-9\-]+/.test(e)){return false}e=e.replace(/\D/g,"");var r=0;if(n.mastercard){r|=1}if(n.visa){r|=2}if(n.amex){r|=4}if(n.dinersclub){r|=8}if(n.enroute){r|=16}if(n.discover){r|=32}if(n.jcb){r|=64}if(n.unknown){r|=128}if(n.all){r=1|2|4|8|16|32|64|128}if(r&1&&/^(5[12345])/.test(e)){return e.length===16}if(r&2&&/^(4)/.test(e)){return e.length===16}if(r&4&&/^(3[47])/.test(e)){return e.length===15}if(r&8&&/^(3(0[012345]|[68]))/.test(e)){return e.length===14}if(r&16&&/^(2(014|149))/.test(e)){return e.length===15}if(r&32&&/^(6011)/.test(e)){return e.length===16}if(r&64&&/^(3)/.test(e)){return e.length===16}if(r&64&&/^(2131|1800)/.test(e)){return e.length===15}if(r&128){return true}return false},"Please enter a valid credit card number.");jQuery.validator.addMethod("ipv4",function(e,t,n){return this.optional(t)||/^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(e)},"Please enter a valid IP v4 address.");jQuery.validator.addMethod("ipv6",function(e,t,n){return this.optional(t)||/^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(e)},"Please enter a valid IP v6 address.");jQuery.validator.addMethod("pattern",function(e,t,n){if(this.optional(t)){return true}if(typeof n==="string"){n=new RegExp("^(?:"+n+")$")}return n.test(e)},"Invalid format.");jQuery.validator.addMethod("require_from_group",function(e,t,n){var r=this;var i=n[1];var s=$(i,t.form).filter(function(){return r.elementValue(this)}).length>=n[0];if(!$(t).data("being_validated")){var o=$(i,t.form);o.data("being_validated",true);o.valid();o.data("being_validated",false)}return s},jQuery.format("Please fill at least {0} of these fields."));jQuery.validator.addMethod("skip_or_fill_minimum",function(e,t,n){var r=this,i=n[0],s=n[1];var o=$(s,t.form).filter(function(){return r.elementValue(this)}).length;var u=o>=i||o===0;if(!$(t).data("being_validated")){var a=$(s,t.form);a.data("being_validated",true);a.valid();a.data("being_validated",false)}return u},jQuery.format("Please either skip these fields or fill at least {0} of them."));jQuery.validator.addMethod("accept",function(e,t,n){var r=typeof n==="string"?n.replace(/\s/g,"").replace(/,/g,"|"):"image/*",i=this.optional(t),s,o;if(i){return i}if($(t).attr("type")==="file"){r=r.replace(/\*/g,".*");if(t.files&&t.files.length){for(s=0;s<t.files.length;s++){o=t.files[s];if(!o.type.match(new RegExp(".?("+r+")$","i"))){return false}}}}return true},jQuery.format("Please enter a value with a valid mimetype."));jQuery.validator.addMethod("extension",function(e,t,n){n=typeof n==="string"?n.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(t)||e.match(new RegExp(".("+n+")$","i"))},jQuery.format("Please enter a value with a valid extension."));(function($){"use strict";var escape=/["\\\x00-\x1f\x7f-\x9f]/g,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},hasOwn=Object.prototype.hasOwnProperty;$.toJSON=typeof JSON==="object"&&JSON.stringify?JSON.stringify:function(e){if(e===null){return"null"}var t,n,r,i,s=$.type(e);if(s==="undefined"){return undefined}if(s==="number"||s==="boolean"){return String(e)}if(s==="string"){return $.quoteString(e)}if(typeof e.toJSON==="function"){return $.toJSON(e.toJSON())}if(s==="date"){var o=e.getUTCMonth()+1,u=e.getUTCDate(),a=e.getUTCFullYear(),f=e.getUTCHours(),l=e.getUTCMinutes(),c=e.getUTCSeconds(),h=e.getUTCMilliseconds();if(o<10){o="0"+o}if(u<10){u="0"+u}if(f<10){f="0"+f}if(l<10){l="0"+l}if(c<10){c="0"+c}if(h<100){h="0"+h}if(h<10){h="0"+h}return'"'+a+"-"+o+"-"+u+"T"+f+":"+l+":"+c+"."+h+'Z"'}t=[];if($.isArray(e)){for(n=0;n<e.length;n++){t.push($.toJSON(e[n])||"null")}return"["+t.join(",")+"]"}if(typeof e==="object"){for(n in e){if(hasOwn.call(e,n)){s=typeof n;if(s==="number"){r='"'+n+'"'}else if(s==="string"){r=$.quoteString(n)}else{continue}s=typeof e[n];if(s!=="function"&&s!=="undefined"){i=$.toJSON(e[n]);t.push(r+":"+i)}}}return"{"+t.join(",")+"}"}};$.evalJSON=typeof JSON==="object"&&JSON.parse?JSON.parse:function(str){return eval("("+str+")")};$.secureEvalJSON=typeof JSON==="object"&&JSON.parse?JSON.parse:function(str){var filtered=str.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"");if(/^[\],:{}\s]*$/.test(filtered)){return eval("("+str+")")}throw new SyntaxError("Error parsing JSON, source is not valid.")};$.quoteString=function(e){if(e.match(escape)){return'"'+e.replace(escape,function(e){var t=meta[e];if(typeof t==="string"){return t}t=e.charCodeAt();return"\\u00"+Math.floor(t/16).toString(16)+(t%16).toString(16)})+'"'}return'"'+e+'"'}})(jQuery);(function(e){if(typeof define==="function"&&define.amd){define(["jquery"],e)}else{e(jQuery)}})(function(e){function t(e){if(i.raw){return e}return decodeURIComponent(e.replace(r," "))}function n(e){if(e.indexOf('"')===0){e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\")}e=t(e);try{return i.json?JSON.parse(e):e}catch(n){}}var r=/\+/g;var i=e.cookie=function(r,s,o){if(s!==undefined){o=e.extend({},i.defaults,o);if(typeof o.expires==="number"){var u=o.expires,a=o.expires=new Date;a.setDate(a.getDate()+u)}s=i.json?JSON.stringify(s):String(s);return document.cookie=[i.raw?r:encodeURIComponent(r),"=",i.raw?s:encodeURIComponent(s),o.expires?"; expires="+o.expires.toUTCString():"",o.path?"; path="+o.path:"",o.domain?"; domain="+o.domain:"",o.secure?"; secure":""].join("")}var f=document.cookie.split("; ");var l=r?undefined:{};for(var c=0,h=f.length;c<h;c++){var p=f[c].split("=");var d=t(p.shift());var v=p.join("=");if(r&&r===d){l=n(v);break}if(!r){l[d]=n(v)}}return l};i.defaults={};e.removeCookie=function(t,n){if(e.cookie(t)!==undefined){e.cookie(t,"",e.extend({},n,{expires:-1}));return true}return false}});!function(e){"use strict";e(function(){e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function n(){s.trigger("closed").remove()}var r=e(this),i=r.attr("data-target"),s;i||(i=r.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),s=e(i),t&&t.preventDefault(),s.length||(s=r.hasClass("alert")?r:r.parent()),s.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;s.removeClass("in"),e.support.transition&&s.hasClass("fade")?s.on(e.support.transition.end,n):n()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.alert.data-api",t,n.prototype.close)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.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},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(t){var n=this.getActiveIndex(),r=this;if(t>this.$items.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){r.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",e(this.$items[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f;this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u](),f=e.Event("slide",{relatedTarget:i[0],direction:o});if(i.hasClass("active"))return;this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var t=e(a.$indicators.children()[a.getActiveIndex()]);t&&t.addClass("active")}));if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.pause().cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this},e(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=e.extend({},i.data(),n.data()),o;i.carousel(s),(o=n.attr("data-slide-to"))&&i.data("carousel").pause().to(o).cycle(),t.preventDefault()})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning||this.$element.hasClass("in"))return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning||!this.$element.hasClass("in"))return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=e.extend({},e.fn.collapse.defaults,r.data(),typeof n=="object"&&n);i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})}(window.jQuery),!function(e){"use strict";function t(){e(r).each(function(){n(e(this)).removeClass("open")})}function n(t){var n=t.attr("data-target"),r;n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=n&&e(n);if(!r||!r.length)r=t.parent();return r}var r="[data-toggle=dropdown]",i=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};i.prototype={constructor:i,toggle:function(r){var i=e(this),s,o;if(i.is(".disabled, :disabled"))return;return s=n(i),o=s.hasClass("open"),t(),o||s.toggleClass("open"),i.focus(),!1},keydown:function(t){var i,s,o,u,a,f;if(!/(38|40|27)/.test(t.keyCode))return;i=e(this),t.preventDefault(),t.stopPropagation();if(i.is(".disabled, :disabled"))return;u=n(i),a=u.hasClass("open");if(!a||a&&t.keyCode==27)return t.which==27&&u.find(r).focus(),i.click();s=e("[role=menu] li:not(.divider):visible a",u);if(!s.length)return;f=s.index(s.filter(":focus")),t.keyCode==38&&f>0&&f--,t.keyCode==40&&f<s.length-1&&f++,~f||(f=0),s.eq(f).focus()}};var s=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var n=e(this),r=n.data("dropdown");r||n.data("dropdown",r=new i(this)),typeof t=="string"&&r[t].call(n)})},e.fn.dropdown.Constructor=i,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=s,this},e(document).on("click.dropdown.data-api",t).on("click.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.dropdown-menu",function(e){e.stopPropagation()}).on("click.dropdown.data-api",r,i.prototype.toggle).on("keydown.dropdown.data-api",r+", [role=menu]",i.prototype.keydown)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=n,this.$element=e(t).delegate('[data-dismiss="modal"]',"click.dismiss.modal",e.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};t.prototype={constructor:t,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var t=this,n=e.Event("show");this.$element.trigger(n);if(this.isShown||n.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.backdrop(function(){var n=e.support.transition&&t.$element.hasClass("fade");t.$element.parent().length||t.$element.appendTo(document.body),t.$element.show(),n&&t.$element[0].offsetWidth,t.$element.addClass("in").attr("aria-hidden",!1),t.enforceFocus(),n?t.$element.one(e.support.transition.end,function(){t.$element.focus().trigger("shown")}):t.$element.focus().trigger("shown")})},hide:function(t){t&&t.preventDefault();var n=this;t=e.Event("hide"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,this.escape(),e(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),e.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var t=this;e(document).on("focusin.modal",function(e){t.$element[0]!==e.target&&!t.$element.has(e.target).length&&t.$element.focus()})},escape:function(){var e=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(t){t.which==27&&e.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var t=this,n=setTimeout(function(){t.$element.off(e.support.transition.end),t.hideModal()},500);this.$element.one(e.support.transition.end,function(){clearTimeout(n),t.hideModal()})},hideModal:function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},backdrop:function(t){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="modal-backdrop '+r+'" />').appendTo(document.body),this.$backdrop.click(this.options.backdrop=="static"?e.proxy(this.$element[0].focus,this.$element[0]):e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in");if(!t)return;i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,t):t()):t&&t()}};var n=e.fn.modal;e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s).one("hide",function(){n.focus()})})}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s,o,u,a;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,o=this.options.trigger.split(" ");for(a=o.length;a--;)u=o[a],u=="click"?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):u!="manual"&&(i=u=="hover"?"mouseenter":"focus",s=u=="hover"?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.leave,this)));this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,this.$element.data(),t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e.fn[this.type].defaults,r={},i;this._options&&e.each(this._options,function(e,t){n[e]!=t&&(r[e]=t)},this),i=e(t.currentTarget)[this.type](r).data(this.type);if(!i.options.delay||!i.options.delay.show)return i.show();clearTimeout(this.timeout),i.hoverState="in",this.timeout=setTimeout(function(){i.hoverState=="in"&&i.show()},i.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var t,n,r,i,s,o,u=e.Event("show");if(this.hasContent()&&this.enabled){this.$element.trigger(u);if(u.isDefaultPrevented())return;t=this.tip(),this.setContent(),this.options.animation&&t.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,t[0],this.$element[0]):this.options.placement,t.detach().css({top:0,left:0,display:"block"}).addClass(this.$element.attr("data-class")),this.options.container?t.appendTo(this.options.container):t.insertAfter(this.$element),n=this.getPosition(),r=t[0].offsetWidth,i=t[0].offsetHeight;switch(s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}this.applyPlacement(o,s),this.$element.trigger("shown")}},applyPlacement:function(e,t){var n=this.tip(),r=n[0].offsetWidth,i=n[0].offsetHeight,s,o,u,a;n.offset(e).addClass(t).addClass("in"),s=n[0].offsetWidth,o=n[0].offsetHeight,t=="top"&&o!=i&&(e.top=e.top+i-o,a=!0),t=="bottom"||t=="top"?(u=0,e.left<0&&(u=e.left*-2,e.left=0,n.offset(e),s=n[0].offsetWidth,o=n[0].offsetHeight),this.replaceArrow(u-r+s,s,"left")):this.replaceArrow(o-i,o,"top"),a&&n.offset(e)},replaceArrow:function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},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")},hide:function(){function t(){var t=setTimeout(function(){r.off(e.support.transition.end).detach()},500);r.one(e.support.transition.end,function(){clearTimeout(t),r.detach()})}var n=this,r=this.tip(),i=e.Event("hide");this.$element.trigger(i);if(i.isDefaultPrevented())return;return r.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?t():r.detach(),this.$element.trigger("hidden"),this},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var t=this.$element[0];return e.extend({},typeof t.getBoundingClientRect=="function"?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(t){var n=t?e(t.currentTarget)[this.type](this._options).data(this.type):this;n.tip().hasClass("in")?n.hide():n.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,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")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=(typeof n.content=="function"?n.content.call(t[0]):n.content)||t.attr("data-content"),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}(window.jQuery),!function(e){"use strict";function t(t,n){var r=e.proxy(this.process,this),i=e(t).is("body")?e(window):e(t),s;this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=i.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(s=e(t).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t=this,n;this.offsets=e([]),this.targets=e([]),n=this.$body.find(this.selector).map(function(){var n=e(this),r=n.data("target")||n.attr("href"),i=/^#\w/.test(r)&&e(r);return i&&i.length&&[[i.position().top+(!e.isWindow(t.$scrollElement.get(0))&&t.$scrollElement.scrollTop()),r]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},process:function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}};var n=e.fn.scrollspy;e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("scrollspy"),s=typeof n=="object"&&n;i||r.data("scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=n,this},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active:last a")[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},activate:function(t,n,r){function i(){s.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),o?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var s=n.find("> .active"),o=r&&e.support.transition&&s.hasClass("fade");o?s.one(e.support.transition.end,i):i(),s.removeClass("in")}};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=e(this.options.menu),this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:t.top+t.height,left:t.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(n=e.isFunction(this.source)?this.source(this.query,e.proxy(this.process,this)):this.source,n?this.process(n):this)},process:function(t){var n=this;return t=e.grep(t,function(e){return n.matcher(e)}),t=this.sorter(t),t.length?this.render(t.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(e){return~e.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){var t=[],n=[],r=[],i;while(i=e.shift())i.toLowerCase().indexOf(this.query.toLowerCase())?~i.indexOf(this.query)?n.push(i):r.push(i):t.push(i);return t.concat(n,r)},highlighter:function(e){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return e.replace(new RegExp("("+t+")","ig"),function(e,t){return"<strong>"+t+"</strong>"})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),r=n.next();r.length||(r=e(this.$menu.find("li")[0])),r.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("focus",e.proxy(this.focus,this)).on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this)).on("mouseleave","li",e.proxy(this.mouseleave,this))},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t=typeof this.$element[e]=="function"),t},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t){this.suppressKeyPressRepeat=~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},focus:function(e){this.focused=!0},blur:function(e){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(e){e.stopPropagation(),e.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(t){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")},mouseleave:function(e){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var n=e.fn.typeahead;e.fn.typeahead=function(n){return this.each(function(){var r=e(this),i=r.data("typeahead"),s=typeof n=="object"&&n;i||r.data("typeahead",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},e.fn.typeahead.Constructor=t,e.fn.typeahead.noConflict=function(){return e.fn.typeahead=n,this},e(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;n.typeahead(n.data())})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)).on("click.affix.data-api",e.proxy(function(){setTimeout(e.proxy(this.checkPosition,this),1)},this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom":o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery);!function(e){"use strict";function t(e){return function(t){if(this===t.target){return e.apply(this,arguments)}}}var n=function(e,t){this.init(e,t)};n.prototype={constructor:n,init:function(t,n){this.$element=e(t);this.options=e.extend({},e.fn.modalmanager.defaults,this.$element.data(),typeof n=="object"&&n);this.stack=[];this.backdropCount=0;if(this.options.resize){var r,i=this;e(window).on("resize.modal",function(){r&&clearTimeout(r);r=setTimeout(function(){for(var e=0;e<i.stack.length;e++){i.stack[e].isShown&&i.stack[e].layout()}},10)})}},createModal:function(t,n){e(t).modal(e.extend({manager:this},n))},appendModal:function(n){this.stack.push(n);var r=this;n.$element.on("show.modalmanager",t(function(t){var i=function(){n.isShown=true;var t=e.support.transition&&n.$element.hasClass("fade");r.$element.toggleClass("modal-open",r.hasOpenModal()).toggleClass("page-overflow",e(window).height()<r.$element.height());n.$parent=n.$element.parent();n.$container=r.createContainer(n);n.$element.appendTo(n.$container);r.backdrop(n,function(){n.$element.show();if(t){n.$element[0].offsetWidth}n.layout();n.$element.addClass("in").attr("aria-hidden",false);var i=function(){r.setFocus();n.$element.trigger("shown")};t?n.$element.one(e.support.transition.end,i):i()})};n.options.replace?r.replace(i):i()}));n.$element.on("hidden.modalmanager",t(function(t){r.backdrop(n);if(n.$backdrop){e.support.transition&&n.$element.hasClass("fade")?n.$backdrop.one(e.support.transition.end,function(){r.destroyModal(n)}):r.destroyModal(n)}else{r.destroyModal(n)}}));n.$element.on("destroy.modalmanager",t(function(e){r.removeModal(n)}))},destroyModal:function(e){e.destroy();var t=this.hasOpenModal();this.$element.toggleClass("modal-open",t);if(!t){this.$element.removeClass("page-overflow")}this.removeContainer(e);this.setFocus()},hasOpenModal:function(){for(var e=0;e<this.stack.length;e++){if(this.stack[e].isShown)return true}return false},setFocus:function(){var e;for(var t=0;t<this.stack.length;t++){if(this.stack[t].isShown)e=this.stack[t]}if(!e)return;e.focus()},removeModal:function(e){e.$element.off(".modalmanager");if(e.$backdrop)this.removeBackdrop(e);this.stack.splice(this.getIndexOfModal(e),1)},getModalAt:function(e){return this.stack[e]},getIndexOfModal:function(e){for(var t=0;t<this.stack.length;t++){if(e===this.stack[t])return t}},replace:function(n){var r;for(var i=0;i<this.stack.length;i++){if(this.stack[i].isShown)r=this.stack[i]}if(r){this.$backdropHandle=r.$backdrop;r.$backdrop=null;n&&r.$element.one("hidden",t(e.proxy(n,this)));r.hide()}else if(n){n()}},removeBackdrop:function(e){e.$backdrop.remove();e.$backdrop=null},createBackdrop:function(t){var n;if(!this.$backdropHandle){n=e('<div class="modal-backdrop '+t+'" />').appendTo(this.$element)}else{n=this.$backdropHandle;n.off(".modalmanager");this.$backdropHandle=null;this.isLoading&&this.removeSpinner()}return n},removeContainer:function(e){e.$container.remove();e.$container=null},createContainer:function(n){var i;i=e('<div class="modal-scrollable">').css("z-index",r("modal",n?this.getIndexOfModal(n):this.stack.length)).appendTo(this.$element);if(n&&n.options.backdrop!="static"){i.on("click.modal",t(function(e){n.hide()}))}else if(n){i.on("click.modal",t(function(e){n.attention()}))}return i},backdrop:function(t,n){var i=t.$element.hasClass("fade")?"fade":"",s=t.options.backdrop&&this.backdropCount<this.options.backdropLimit;if(t.isShown&&s){var o=e.support.transition&&i&&!this.$backdropHandle;t.$backdrop=this.createBackdrop(i);t.$backdrop.css("z-index",r("backdrop",this.getIndexOfModal(t)));if(o)t.$backdrop[0].offsetWidth;t.$backdrop.addClass("in");this.backdropCount+=1;o?t.$backdrop.one(e.support.transition.end,n):n()}else if(!t.isShown&&t.$backdrop){t.$backdrop.removeClass("in");this.backdropCount-=1;var u=this;e.support.transition&&t.$element.hasClass("fade")?t.$backdrop.one(e.support.transition.end,function(){u.removeBackdrop(t)}):u.removeBackdrop(t)}else if(n){n()}},removeSpinner:function(){this.$spinner&&this.$spinner.remove();this.$spinner=null;this.isLoading=false},removeLoading:function(){this.$backdropHandle&&this.$backdropHandle.remove();this.$backdropHandle=null;this.removeSpinner()},loading:function(t){t=t||function(){};this.$element.toggleClass("modal-open",!this.isLoading||this.hasOpenModal()).toggleClass("page-overflow",e(window).height()<this.$element.height());if(!this.isLoading){this.$backdropHandle=this.createBackdrop("fade");this.$backdropHandle[0].offsetWidth;this.$backdropHandle.css("z-index",r("backdrop",this.stack.length)).addClass("in");var n=e(this.options.spinner).css("z-index",r("modal",this.stack.length)).appendTo(this.$element).addClass("in");this.$spinner=e(this.createContainer()).append(n).on("click.modalmanager",e.proxy(this.loading,this));this.isLoading=true;e.support.transition?this.$backdropHandle.one(e.support.transition.end,t):t()}else if(this.isLoading&&this.$backdropHandle){this.$backdropHandle.removeClass("in");var i=this;e.support.transition?this.$backdropHandle.one(e.support.transition.end,function(){i.removeLoading()}):i.removeLoading()}else if(t){t(this.isLoading)}}};var r=function(){var t,n={};return function(r,i){if(typeof t==="undefined"){var s=e('<div class="modal hide" />').appendTo("body"),o=e('<div class="modal-backdrop hide" />').appendTo("body");n["modal"]=+s.css("z-index");n["backdrop"]=+o.css("z-index");t=n["modal"]-n["backdrop"];s.remove();o.remove();o=s=null}return n[r]+t*i}}();e.fn.modalmanager=function(t,r){return this.each(function(){var i=e(this),s=i.data("modalmanager");if(!s)i.data("modalmanager",s=new n(this,t));if(typeof t==="string")s[t].apply(s,[].concat(r))})};e.fn.modalmanager.defaults={backdropLimit:999,resize:true,spinner:'<div class="loading-spinner fade" style="width: 200px; margin-left: -100px;"><div class="progress progress-striped active"><div class="bar" style="width: 100%;"></div></div></div>'};e.fn.modalmanager.Constructor=n}(jQuery);!function(e){"use strict";var t=function(e,t){this.init(e,t)};t.prototype={constructor:t,init:function(t,n){this.options=n;this.$element=e(t).delegate('[data-dismiss="modal"]',"click.dismiss.modal",e.proxy(this.hide,this));this.options.remote&&this.$element.find(".modal-body").load(this.options.remote);var r=typeof this.options.manager==="function"?this.options.manager.call(this):this.options.manager;r=r.appendModal?r:e(r).modalmanager().data("modalmanager");r.appendModal(this)},toggle:function(){return this[!this.isShown?"show":"hide"]()},show:function(){var t=e.Event("show");if(this.isShown)return;this.$element.trigger(t);if(t.isDefaultPrevented())return;this.escape();this.tab();this.options.loading&&this.loading()},hide:function(t){t&&t.preventDefault();t=e.Event("hide");this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return this.isShown=false;this.isShown=false;this.escape();this.tab();this.isLoading&&this.loading();e(document).off("focusin.modal");this.$element.removeClass("in").removeClass("animated").removeClass(this.options.attentionAnimation).removeClass("modal-overflow").attr("aria-hidden",true);e.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal()},layout:function(){var t=this.options.height?"height":"max-height",n=this.options.height||this.options.maxHeight;if(this.options.width){this.$element.css("width",this.options.width);var r=this;this.$element.css("margin-left",function(){if(/%/ig.test(r.options.width)){return-(parseInt(r.options.width)/2)+"%"}else{return-(e(this).width()/2)+"px"}})}else{this.$element.css("width","");this.$element.css("margin-left","")}this.$element.find(".modal-body").css("overflow","").css(t,"");var i=e(window).height()-10<this.$element.height();if(n){this.$element.find(".modal-body").css("overflow","auto").css(t,n)}if(i||this.options.modalOverflow){this.$element.css("margin-top",0).addClass("modal-overflow")}else{this.$element.css("margin-top",0-this.$element.height()/2).removeClass("modal-overflow")}},tab:function(){var t=this;if(this.isShown&&this.options.consumeTab){this.$element.on("keydown.tabindex.modal","[data-tabindex]",function(n){if(n.keyCode&&n.keyCode==9){var r=e(this),i=e(this);t.$element.find("[data-tabindex]:enabled:not([readonly])").each(function(t){if(!t.shiftKey){r=r.data("tabindex")<e(this).data("tabindex")?r=e(this):i=e(this)}else{r=r.data("tabindex")>e(this).data("tabindex")?r=e(this):i=e(this)}});r[0]!==e(this)[0]?r.focus():i.focus();n.preventDefault()}})}else if(!this.isShown){this.$element.off("keydown.tabindex.modal")}},escape:function(){var e=this;if(this.isShown&&this.options.keyboard){if(!this.$element.attr("tabindex"))this.$element.attr("tabindex",-1);this.$element.on("keyup.dismiss.modal",function(t){t.which==27&&e.hide()})}else if(!this.isShown){this.$element.off("keyup.dismiss.modal")}},hideWithTransition:function(){var t=this,n=setTimeout(function(){t.$element.off(e.support.transition.end);t.hideModal()},500);this.$element.one(e.support.transition.end,function(){clearTimeout(n);t.hideModal()})},hideModal:function(){this.$element.hide().trigger("hidden");var e=this.options.height?"height":"max-height";var t=this.options.height||this.options.maxHeight;if(t){this.$element.find(".modal-body").css("overflow","").css(e,"")}},removeLoading:function(){this.$loading.remove();this.$loading=null;this.isLoading=false},loading:function(t){t=t||function(){};var n=this.$element.hasClass("fade")?"fade":"";if(!this.isLoading){var r=e.support.transition&&n;this.$loading=e('<div class="loading-mask '+n+'">').append(this.options.spinner).appendTo(this.$element);if(r)this.$loading[0].offsetWidth;this.$loading.addClass("in");this.isLoading=true;r?this.$loading.one(e.support.transition.end,t):t()}else if(this.isLoading&&this.$loading){this.$loading.removeClass("in");var i=this;e.support.transition&&this.$element.hasClass("fade")?this.$loading.one(e.support.transition.end,function(){i.removeLoading()}):i.removeLoading()}else if(t){t(this.isLoading)}},focus:function(){var e=this.$element.find(this.options.focusOn);e=e.length?e:this.$element;e.focus()},attention:function(){if(this.options.attentionAnimation){this.$element.removeClass("animated").removeClass(this.options.attentionAnimation);var e=this;setTimeout(function(){e.$element.addClass("animated").addClass(e.options.attentionAnimation)},0)}this.focus()},destroy:function(){var t=e.Event("destroy");this.$element.trigger(t);if(t.isDefaultPrevented())return;this.teardown()},teardown:function(){if(!this.$parent.length){this.$element.remove();this.$element=null;return}if(this.$parent!==this.$element.parent()){this.$element.appendTo(this.$parent)}this.$element.off(".modal");this.$element.removeData("modal");this.$element.removeClass("in").attr("aria-hidden",true)}};e.fn.modal=function(n,r){return this.each(function(){var i=e(this),s=i.data("modal"),o=e.extend({},e.fn.modal.defaults,i.data(),typeof n=="object"&&n);if(!s)i.data("modal",s=new t(this,o));if(typeof n=="string")s[n].apply(s,[].concat(r));else if(o.show)s.show()})};e.fn.modal.defaults={keyboard:true,backdrop:true,loading:false,show:true,width:null,height:null,maxHeight:null,modalOverflow:false,consumeTab:true,focusOn:null,replace:false,resize:false,attentionAnimation:"shake",manager:"body",spinner:'<div class="loading-spinner" style="width: 200px; margin-left: -100px;"><div class="progress progress-striped active"><div class="bar" style="width: 100%;"></div></div></div>'};e.fn.modal.Constructor=t;e(function(){e(document).off("click.modal").on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault();i.modal(s).one("hide",function(){n.focus()})})})}(window.jQuery)
/* perfect-scrollbar v0.6.8 */
!function t(e, n, r) { function o(l, s) { if (!n[l]) { if (!e[l]) { var a = "function" == typeof require && require; if (!s && a) return a(l, !0); if (i) return i(l, !0); var c = new Error("Cannot find module '" + l + "'"); throw c.code = "MODULE_NOT_FOUND", c } var u = n[l] = { exports: {} }; e[l][0].call(u.exports, function (t) { var n = e[l][1][t]; return o(n ? n : t) }, u, u.exports, t, e, n, r) } return n[l].exports } for (var i = "function" == typeof require && require, l = 0; l < r.length; l++) o(r[l]); return o }({ 1: [function (t, e, n) { "use strict"; function r(t) { t.fn.perfectScrollbar = function (e) { return this.each(function () { if ("object" == typeof e || "undefined" == typeof e) { var n = e; i.get(this) || o.initialize(this, n) } else { var r = e; "update" === r ? o.update(this) : "destroy" === r && o.destroy(this) } return t(this) }) } } var o = t("../main"), i = t("../plugin/instances"); if ("function" == typeof define && define.amd) define(["jquery"], r); else { var l = window.jQuery ? window.jQuery : window.$; "undefined" != typeof l && r(l) } e.exports = r }, { "../main": 7, "../plugin/instances": 18 }], 2: [function (t, e, n) { "use strict"; function r(t, e) { var n = t.className.split(" "); n.indexOf(e) < 0 && n.push(e), t.className = n.join(" ") } function o(t, e) { var n = t.className.split(" "), r = n.indexOf(e); r >= 0 && n.splice(r, 1), t.className = n.join(" ") } n.add = function (t, e) { t.classList ? t.classList.add(e) : r(t, e) }, n.remove = function (t, e) { t.classList ? t.classList.remove(e) : o(t, e) }, n.list = function (t) { return t.classList ? Array.prototype.slice.apply(t.classList) : t.className.split(" ") } }, {}], 3: [function (t, e, n) { "use strict"; function r(t, e) { return window.getComputedStyle(t)[e] } function o(t, e, n) { return "number" == typeof n && (n = n.toString() + "px"), t.style[e] = n, t } function i(t, e) { for (var n in e) { var r = e[n]; "number" == typeof r && (r = r.toString() + "px"), t.style[n] = r } return t } var l = {}; l.e = function (t, e) { var n = document.createElement(t); return n.className = e, n }, l.appendTo = function (t, e) { return e.appendChild(t), t }, l.css = function (t, e, n) { return "object" == typeof e ? i(t, e) : "undefined" == typeof n ? r(t, e) : o(t, e, n) }, l.matches = function (t, e) { return "undefined" != typeof t.matches ? t.matches(e) : "undefined" != typeof t.matchesSelector ? t.matchesSelector(e) : "undefined" != typeof t.webkitMatchesSelector ? t.webkitMatchesSelector(e) : "undefined" != typeof t.mozMatchesSelector ? t.mozMatchesSelector(e) : "undefined" != typeof t.msMatchesSelector ? t.msMatchesSelector(e) : void 0 }, l.remove = function (t) { "undefined" != typeof t.remove ? t.remove() : t.parentNode && t.parentNode.removeChild(t) }, l.queryChildren = function (t, e) { return Array.prototype.filter.call(t.childNodes, function (t) { return l.matches(t, e) }) }, e.exports = l }, {}], 4: [function (t, e, n) { "use strict"; var r = function (t) { this.element = t, this.events = {} }; r.prototype.bind = function (t, e) { "undefined" == typeof this.events[t] && (this.events[t] = []), this.events[t].push(e), this.element.addEventListener(t, e, !1) }, r.prototype.unbind = function (t, e) { var n = "undefined" != typeof e; this.events[t] = this.events[t].filter(function (r) { return n && r !== e ? !0 : (this.element.removeEventListener(t, r, !1), !1) }, this) }, r.prototype.unbindAll = function () { for (var t in this.events) this.unbind(t) }; var o = function () { this.eventElements = [] }; o.prototype.eventElement = function (t) { var e = this.eventElements.filter(function (e) { return e.element === t })[0]; return "undefined" == typeof e && (e = new r(t), this.eventElements.push(e)), e }, o.prototype.bind = function (t, e, n) { this.eventElement(t).bind(e, n) }, o.prototype.unbind = function (t, e, n) { this.eventElement(t).unbind(e, n) }, o.prototype.unbindAll = function () { for (var t = 0; t < this.eventElements.length; t++) this.eventElements[t].unbindAll() }, o.prototype.once = function (t, e, n) { var r = this.eventElement(t), o = function (t) { r.unbind(e, o), n(t) }; r.bind(e, o) }, e.exports = o }, {}], 5: [function (t, e, n) { "use strict"; e.exports = function () { function t() { return Math.floor(65536 * (1 + Math.random())).toString(16).substring(1) } return function () { return t() + t() + "-" + t() + "-" + t() + "-" + t() + "-" + t() + t() + t() } }() }, {}], 6: [function (t, e, n) { "use strict"; var r = t("./class"), o = t("./dom"); n.toInt = function (t) { return parseInt(t, 10) || 0 }, n.clone = function (t) { if (null === t) return null; if ("object" == typeof t) { var e = {}; for (var n in t) e[n] = this.clone(t[n]); return e } return t }, n.extend = function (t, e) { var n = this.clone(t); for (var r in e) n[r] = this.clone(e[r]); return n }, n.isEditable = function (t) { return o.matches(t, "input,[contenteditable]") || o.matches(t, "select,[contenteditable]") || o.matches(t, "textarea,[contenteditable]") || o.matches(t, "button,[contenteditable]") }, n.removePsClasses = function (t) { for (var e = r.list(t), n = 0; n < e.length; n++) { var o = e[n]; 0 === o.indexOf("ps-") && r.remove(t, o) } }, n.outerWidth = function (t) { return this.toInt(o.css(t, "width")) + this.toInt(o.css(t, "paddingLeft")) + this.toInt(o.css(t, "paddingRight")) + this.toInt(o.css(t, "borderLeftWidth")) + this.toInt(o.css(t, "borderRightWidth")) }, n.startScrolling = function (t, e) { r.add(t, "ps-in-scrolling"), "undefined" != typeof e ? r.add(t, "ps-" + e) : (r.add(t, "ps-x"), r.add(t, "ps-y")) }, n.stopScrolling = function (t, e) { r.remove(t, "ps-in-scrolling"), "undefined" != typeof e ? r.remove(t, "ps-" + e) : (r.remove(t, "ps-x"), r.remove(t, "ps-y")) }, n.env = { isWebKit: "WebkitAppearance" in document.documentElement.style, supportsTouch: "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch, supportsIePointer: null !== window.navigator.msMaxTouchPoints } }, { "./class": 2, "./dom": 3 }], 7: [function (t, e, n) { "use strict"; var r = t("./plugin/destroy"), o = t("./plugin/initialize"), i = t("./plugin/update"); e.exports = { initialize: o, update: i, destroy: r } }, { "./plugin/destroy": 9, "./plugin/initialize": 17, "./plugin/update": 21 }], 8: [function (t, e, n) { "use strict"; e.exports = { maxScrollbarLength: null, minScrollbarLength: null, scrollXMarginOffset: 0, scrollYMarginOffset: 0, stopPropagationOnClick: !0, suppressScrollX: !1, suppressScrollY: !1, swipePropagation: !0, useBothWheelAxes: !1, useKeyboard: !0, useSelectionScroll: !1, wheelPropagation: !1, wheelSpeed: 1 } }, {}], 9: [function (t, e, n) { "use strict"; var r = t("../lib/dom"), o = t("../lib/helper"), i = t("./instances"); e.exports = function (t) { var e = i.get(t); e && (e.event.unbindAll(), r.remove(e.scrollbarX), r.remove(e.scrollbarY), r.remove(e.scrollbarXRail), r.remove(e.scrollbarYRail), o.removePsClasses(t), i.remove(t)) } }, { "../lib/dom": 3, "../lib/helper": 6, "./instances": 18 }], 10: [function (t, e, n) { "use strict"; function r(t, e) { function n(t) { return t.getBoundingClientRect() } var r = window.Event.prototype.stopPropagation.bind; e.settings.stopPropagationOnClick && e.event.bind(e.scrollbarY, "click", r), e.event.bind(e.scrollbarYRail, "click", function (r) { var i = o.toInt(e.scrollbarYHeight / 2), a = e.railYRatio * (r.pageY - window.pageYOffset - n(e.scrollbarYRail).top - i), c = e.railYRatio * (e.railYHeight - e.scrollbarYHeight), u = a / c; 0 > u ? u = 0 : u > 1 && (u = 1), s(t, "top", (e.contentHeight - e.containerHeight) * u), l(t), r.stopPropagation() }), e.settings.stopPropagationOnClick && e.event.bind(e.scrollbarX, "click", r), e.event.bind(e.scrollbarXRail, "click", function (r) { var i = o.toInt(e.scrollbarXWidth / 2), a = e.railXRatio * (r.pageX - window.pageXOffset - n(e.scrollbarXRail).left - i), c = e.railXRatio * (e.railXWidth - e.scrollbarXWidth), u = a / c; 0 > u ? u = 0 : u > 1 && (u = 1), s(t, "left", (e.contentWidth - e.containerWidth) * u - e.negativeScrollAdjustment), l(t), r.stopPropagation() }) } var o = t("../../lib/helper"), i = t("../instances"), l = t("../update-geometry"), s = t("../update-scroll"); e.exports = function (t) { var e = i.get(t); r(t, e) } }, { "../../lib/helper": 6, "../instances": 18, "../update-geometry": 19, "../update-scroll": 20 }], 11: [function (t, e, n) { "use strict"; function r(t, e) { function n(n) { var o = r + n * e.railXRatio, i = Math.max(0, e.scrollbarXRail.getBoundingClientRect().left) + e.railXRatio * (e.railXWidth - e.scrollbarXWidth); 0 > o ? e.scrollbarXLeft = 0 : o > i ? e.scrollbarXLeft = i : e.scrollbarXLeft = o; var s = l.toInt(e.scrollbarXLeft * (e.contentWidth - e.containerWidth) / (e.containerWidth - e.railXRatio * e.scrollbarXWidth)) - e.negativeScrollAdjustment; c(t, "left", s) } var r = null, o = null, s = function (e) { n(e.pageX - o), a(t), e.stopPropagation(), e.preventDefault() }, u = function () { l.stopScrolling(t, "x"), e.event.unbind(e.ownerDocument, "mousemove", s) }; e.event.bind(e.scrollbarX, "mousedown", function (n) { o = n.pageX, r = l.toInt(i.css(e.scrollbarX, "left")) * e.railXRatio, l.startScrolling(t, "x"), e.event.bind(e.ownerDocument, "mousemove", s), e.event.once(e.ownerDocument, "mouseup", u), n.stopPropagation(), n.preventDefault() }) } function o(t, e) { function n(n) { var o = r + n * e.railYRatio, i = Math.max(0, e.scrollbarYRail.getBoundingClientRect().top) + e.railYRatio * (e.railYHeight - e.scrollbarYHeight); 0 > o ? e.scrollbarYTop = 0 : o > i ? e.scrollbarYTop = i : e.scrollbarYTop = o; var s = l.toInt(e.scrollbarYTop * (e.contentHeight - e.containerHeight) / (e.containerHeight - e.railYRatio * e.scrollbarYHeight)); c(t, "top", s) } var r = null, o = null, s = function (e) { n(e.pageY - o), a(t), e.stopPropagation(), e.preventDefault() }, u = function () { l.stopScrolling(t, "y"), e.event.unbind(e.ownerDocument, "mousemove", s) }; e.event.bind(e.scrollbarY, "mousedown", function (n) { o = n.pageY, r = l.toInt(i.css(e.scrollbarY, "top")) * e.railYRatio, l.startScrolling(t, "y"), e.event.bind(e.ownerDocument, "mousemove", s), e.event.once(e.ownerDocument, "mouseup", u), n.stopPropagation(), n.preventDefault() }) } var i = t("../../lib/dom"), l = t("../../lib/helper"), s = t("../instances"), a = t("../update-geometry"), c = t("../update-scroll"); e.exports = function (t) { var e = s.get(t); r(t, e), o(t, e) } }, { "../../lib/dom": 3, "../../lib/helper": 6, "../instances": 18, "../update-geometry": 19, "../update-scroll": 20 }], 12: [function (t, e, n) { "use strict"; function r(t, e) { function n(n, r) { var o = t.scrollTop; if (0 === n) { if (!e.scrollbarYActive) return !1; if (0 === o && r > 0 || o >= e.contentHeight - e.containerHeight && 0 > r) return !e.settings.wheelPropagation } var i = t.scrollLeft; if (0 === r) { if (!e.scrollbarXActive) return !1; if (0 === i && 0 > n || i >= e.contentWidth - e.containerWidth && n > 0) return !e.settings.wheelPropagation } return !0 } var r = !1; e.event.bind(t, "mouseenter", function () { r = !0 }), e.event.bind(t, "mouseleave", function () { r = !1 }); var i = !1; e.event.bind(e.ownerDocument, "keydown", function (a) { if ((!a.isDefaultPrevented || !a.isDefaultPrevented()) && r) { var c = document.activeElement ? document.activeElement : e.ownerDocument.activeElement; if (c) { for (; c.shadowRoot;) c = c.shadowRoot.activeElement; if (o.isEditable(c)) return } var u = 0, d = 0; switch (a.which) { case 37: u = -30; break; case 38: d = 30; break; case 39: u = 30; break; case 40: d = -30; break; case 33: d = 90; break; case 32: d = a.shiftKey ? 90 : -90; break; case 34: d = -90; break; case 35: d = a.ctrlKey ? -e.contentHeight : -e.containerHeight; break; case 36: d = a.ctrlKey ? t.scrollTop : e.containerHeight; break; default: return } s(t, "top", t.scrollTop - d), s(t, "left", t.scrollLeft + u), l(t), i = n(u, d), i && a.preventDefault() } }) } var o = t("../../lib/helper"), i = t("../instances"), l = t("../update-geometry"), s = t("../update-scroll"); e.exports = function (t) { var e = i.get(t); r(t, e) } }, { "../../lib/helper": 6, "../instances": 18, "../update-geometry": 19, "../update-scroll": 20 }], 13: [function (t, e, n) { "use strict"; function r(t, e) { function n(n, r) { var o = t.scrollTop; if (0 === n) { if (!e.scrollbarYActive) return !1; if (0 === o && r > 0 || o >= e.contentHeight - e.containerHeight && 0 > r) return !e.settings.wheelPropagation } var i = t.scrollLeft; if (0 === r) { if (!e.scrollbarXActive) return !1; if (0 === i && 0 > n || i >= e.contentWidth - e.containerWidth && n > 0) return !e.settings.wheelPropagation } return !0 } function r(t) { var e = t.deltaX, n = -1 * t.deltaY; return ("undefined" == typeof e || "undefined" == typeof n) && (e = -1 * t.wheelDeltaX / 6, n = t.wheelDeltaY / 6), t.deltaMode && 1 === t.deltaMode && (e *= 10, n *= 10), e !== e && n !== n && (e = 0, n = t.wheelDelta), [e, n] } function o(e, n) { var r = t.querySelector("textarea:hover"); if (r) { var o = r.scrollHeight - r.clientHeight; if (o > 0 && !(0 === r.scrollTop && n > 0 || r.scrollTop === o && 0 > n)) return !0; var i = r.scrollLeft - r.clientWidth; if (i > 0 && !(0 === r.scrollLeft && 0 > e || r.scrollLeft === i && e > 0)) return !0 } return !1 } function s(s) { var c = r(s), u = c[0], d = c[1]; o(u, d) || (a = !1, e.settings.useBothWheelAxes ? e.scrollbarYActive && !e.scrollbarXActive ? (d ? l(t, "top", t.scrollTop - d * e.settings.wheelSpeed) : l(t, "top", t.scrollTop + u * e.settings.wheelSpeed), a = !0) : e.scrollbarXActive && !e.scrollbarYActive && (u ? l(t, "left", t.scrollLeft + u * e.settings.wheelSpeed) : l(t, "left", t.scrollLeft - d * e.settings.wheelSpeed), a = !0) : (l(t, "top", t.scrollTop - d * e.settings.wheelSpeed), l(t, "left", t.scrollLeft + u * e.settings.wheelSpeed)), i(t), a = a || n(u, d), a && (s.stopPropagation(), s.preventDefault())) } var a = !1; "undefined" != typeof window.onwheel ? e.event.bind(t, "wheel", s) : "undefined" != typeof window.onmousewheel && e.event.bind(t, "mousewheel", s) } var o = t("../instances"), i = t("../update-geometry"), l = t("../update-scroll"); e.exports = function (t) { var e = o.get(t); r(t, e) } }, { "../instances": 18, "../update-geometry": 19, "../update-scroll": 20 }], 14: [function (t, e, n) { "use strict"; function r(t, e) { e.event.bind(t, "scroll", function () { i(t) }) } var o = t("../instances"), i = t("../update-geometry"); e.exports = function (t) { var e = o.get(t); r(t, e) } }, { "../instances": 18, "../update-geometry": 19 }], 15: [function (t, e, n) { "use strict"; function r(t, e) { function n() { var t = window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : ""; return 0 === t.toString().length ? null : t.getRangeAt(0).commonAncestorContainer } function r() { c || (c = setInterval(function () { return i.get(t) ? (s(t, "top", t.scrollTop + u.top), s(t, "left", t.scrollLeft + u.left), void l(t)) : void clearInterval(c) }, 50)) } function a() { c && (clearInterval(c), c = null), o.stopScrolling(t) } var c = null, u = { top: 0, left: 0 }, d = !1; e.event.bind(e.ownerDocument, "selectionchange", function () { t.contains(n()) ? d = !0 : (d = !1, a()) }), e.event.bind(window, "mouseup", function () { d && (d = !1, a()) }), e.event.bind(window, "mousemove", function (e) { if (d) { var n = { x: e.pageX, y: e.pageY }, i = { left: t.offsetLeft, right: t.offsetLeft + t.offsetWidth, top: t.offsetTop, bottom: t.offsetTop + t.offsetHeight }; n.x < i.left + 3 ? (u.left = -5, o.startScrolling(t, "x")) : n.x > i.right - 3 ? (u.left = 5, o.startScrolling(t, "x")) : u.left = 0, n.y < i.top + 3 ? (i.top + 3 - n.y < 5 ? u.top = -5 : u.top = -20, o.startScrolling(t, "y")) : n.y > i.bottom - 3 ? (n.y - i.bottom + 3 < 5 ? u.top = 5 : u.top = 20, o.startScrolling(t, "y")) : u.top = 0, 0 === u.top && 0 === u.left ? a() : r() } }) } var o = t("../../lib/helper"), i = t("../instances"), l = t("../update-geometry"), s = t("../update-scroll"); e.exports = function (t) { var e = i.get(t); r(t, e) } }, { "../../lib/helper": 6, "../instances": 18, "../update-geometry": 19, "../update-scroll": 20 }], 16: [function (t, e, n) { "use strict"; function r(t, e, n, r) { function s(n, r) { var o = t.scrollTop, i = t.scrollLeft, l = Math.abs(n), s = Math.abs(r); if (s > l) { if (0 > r && o === e.contentHeight - e.containerHeight || r > 0 && 0 === o) return !e.settings.swipePropagation } else if (l > s && (0 > n && i === e.contentWidth - e.containerWidth || n > 0 && 0 === i)) return !e.settings.swipePropagation; return !0 } function a(e, n) { l(t, "top", t.scrollTop - n), l(t, "left", t.scrollLeft - e), i(t) } function c() { Y = !0 } function u() { Y = !1 } function d(t) { return t.targetTouches ? t.targetTouches[0] : t } function p(t) { return t.targetTouches && 1 === t.targetTouches.length ? !0 : t.pointerType && "mouse" !== t.pointerType && t.pointerType !== t.MSPOINTER_TYPE_MOUSE ? !0 : !1 } function f(t) { if (p(t)) { w = !0; var e = d(t); b.pageX = e.pageX, b.pageY = e.pageY, g = (new Date).getTime(), null !== y && clearInterval(y), t.stopPropagation() } } function h(t) { if (!Y && w && p(t)) { var e = d(t), n = { pageX: e.pageX, pageY: e.pageY }, r = n.pageX - b.pageX, o = n.pageY - b.pageY; a(r, o), b = n; var i = (new Date).getTime(), l = i - g; l > 0 && (m.x = r / l, m.y = o / l, g = i), s(r, o) && (t.stopPropagation(), t.preventDefault()) } } function v() { !Y && w && (w = !1, clearInterval(y), y = setInterval(function () { return o.get(t) ? Math.abs(m.x) < .01 && Math.abs(m.y) < .01 ? void clearInterval(y) : (a(30 * m.x, 30 * m.y), m.x *= .8, void (m.y *= .8)) : void clearInterval(y) }, 10)) } var b = {}, g = 0, m = {}, y = null, Y = !1, w = !1; n && (e.event.bind(window, "touchstart", c), e.event.bind(window, "touchend", u), e.event.bind(t, "touchstart", f), e.event.bind(t, "touchmove", h), e.event.bind(t, "touchend", v)), r && (window.PointerEvent ? (e.event.bind(window, "pointerdown", c), e.event.bind(window, "pointerup", u), e.event.bind(t, "pointerdown", f), e.event.bind(t, "pointermove", h), e.event.bind(t, "pointerup", v)) : window.MSPointerEvent && (e.event.bind(window, "MSPointerDown", c), e.event.bind(window, "MSPointerUp", u), e.event.bind(t, "MSPointerDown", f), e.event.bind(t, "MSPointerMove", h), e.event.bind(t, "MSPointerUp", v))) } var o = t("../instances"), i = t("../update-geometry"), l = t("../update-scroll"); e.exports = function (t, e, n) { var i = o.get(t); r(t, i, e, n) } }, { "../instances": 18, "../update-geometry": 19, "../update-scroll": 20 }], 17: [function (t, e, n) { "use strict"; var r = t("../lib/class"), o = t("../lib/helper"), i = t("./instances"), l = t("./update-geometry"), s = t("./handler/click-rail"), a = t("./handler/drag-scrollbar"), c = t("./handler/keyboard"), u = t("./handler/mouse-wheel"), d = t("./handler/native-scroll"), p = t("./handler/selection"), f = t("./handler/touch"); e.exports = function (t, e) { e = "object" == typeof e ? e : {}, r.add(t, "ps-container"); var n = i.add(t); n.settings = o.extend(n.settings, e), s(t), a(t), u(t), d(t), n.settings.useSelectionScroll && p(t), (o.env.supportsTouch || o.env.supportsIePointer) && f(t, o.env.supportsTouch, o.env.supportsIePointer), n.settings.useKeyboard && c(t), l(t) } }, { "../lib/class": 2, "../lib/helper": 6, "./handler/click-rail": 10, "./handler/drag-scrollbar": 11, "./handler/keyboard": 12, "./handler/mouse-wheel": 13, "./handler/native-scroll": 14, "./handler/selection": 15, "./handler/touch": 16, "./instances": 18, "./update-geometry": 19 }], 18: [function (t, e, n) { "use strict"; function r(t) { var e = this; e.settings = d.clone(a), e.containerWidth = null, e.containerHeight = null, e.contentWidth = null, e.contentHeight = null, e.isRtl = "rtl" === s.css(t, "direction"), e.isNegativeScroll = function () { var e = t.scrollLeft, n = null; return t.scrollLeft = -1, n = t.scrollLeft < 0, t.scrollLeft = e, n }(), e.negativeScrollAdjustment = e.isNegativeScroll ? t.scrollWidth - t.clientWidth : 0, e.event = new c, e.ownerDocument = t.ownerDocument || document, e.scrollbarXRail = s.appendTo(s.e("div", "ps-scrollbar-x-rail"), t), e.scrollbarX = s.appendTo(s.e("div", "ps-scrollbar-x"), e.scrollbarXRail), e.scrollbarX.setAttribute("tabindex", 0), e.scrollbarXActive = null, e.scrollbarXWidth = null, e.scrollbarXLeft = null, e.scrollbarXBottom = d.toInt(s.css(e.scrollbarXRail, "bottom")), e.isScrollbarXUsingBottom = e.scrollbarXBottom === e.scrollbarXBottom, e.scrollbarXTop = e.isScrollbarXUsingBottom ? null : d.toInt(s.css(e.scrollbarXRail, "top")), e.railBorderXWidth = d.toInt(s.css(e.scrollbarXRail, "borderLeftWidth")) + d.toInt(s.css(e.scrollbarXRail, "borderRightWidth")), s.css(e.scrollbarXRail, "display", "block"), e.railXMarginWidth = d.toInt(s.css(e.scrollbarXRail, "marginLeft")) + d.toInt(s.css(e.scrollbarXRail, "marginRight")), s.css(e.scrollbarXRail, "display", ""), e.railXWidth = null, e.railXRatio = null, e.scrollbarYRail = s.appendTo(s.e("div", "ps-scrollbar-y-rail"), t), e.scrollbarY = s.appendTo(s.e("div", "ps-scrollbar-y"), e.scrollbarYRail), e.scrollbarY.setAttribute("tabindex", 0), e.scrollbarYActive = null, e.scrollbarYHeight = null, e.scrollbarYTop = null, e.scrollbarYRight = d.toInt(s.css(e.scrollbarYRail, "right")), e.isScrollbarYUsingRight = e.scrollbarYRight === e.scrollbarYRight, e.scrollbarYLeft = e.isScrollbarYUsingRight ? null : d.toInt(s.css(e.scrollbarYRail, "left")), e.scrollbarYOuterWidth = e.isRtl ? d.outerWidth(e.scrollbarY) : null, e.railBorderYWidth = d.toInt(s.css(e.scrollbarYRail, "borderTopWidth")) + d.toInt(s.css(e.scrollbarYRail, "borderBottomWidth")), s.css(e.scrollbarYRail, "display", "block"), e.railYMarginHeight = d.toInt(s.css(e.scrollbarYRail, "marginTop")) + d.toInt(s.css(e.scrollbarYRail, "marginBottom")), s.css(e.scrollbarYRail, "display", ""), e.railYHeight = null, e.railYRatio = null } function o(t) { return "undefined" == typeof t.dataset ? t.getAttribute("data-ps-id") : t.dataset.psId } function i(t, e) { "undefined" == typeof t.dataset ? t.setAttribute("data-ps-id", e) : t.dataset.psId = e } function l(t) { "undefined" == typeof t.dataset ? t.removeAttribute("data-ps-id") : delete t.dataset.psId } var s = t("../lib/dom"), a = t("./default-setting"), c = t("../lib/event-manager"), u = t("../lib/guid"), d = t("../lib/helper"), p = {}; n.add = function (t) { var e = u(); return i(t, e), p[e] = new r(t), p[e] }, n.remove = function (t) { delete p[o(t)], l(t) }, n.get = function (t) { return p[o(t)] } }, { "../lib/dom": 3, "../lib/event-manager": 4, "../lib/guid": 5, "../lib/helper": 6, "./default-setting": 8 }], 19: [function (t, e, n) { "use strict"; function r(t, e) { return t.settings.minScrollbarLength && (e = Math.max(e, t.settings.minScrollbarLength)), t.settings.maxScrollbarLength && (e = Math.min(e, t.settings.maxScrollbarLength)), e } function o(t, e) { var n = { width: e.railXWidth }; e.isRtl ? n.left = e.negativeScrollAdjustment + t.scrollLeft + e.containerWidth - e.contentWidth : n.left = t.scrollLeft, e.isScrollbarXUsingBottom ? n.bottom = e.scrollbarXBottom - t.scrollTop : n.top = e.scrollbarXTop + t.scrollTop, l.css(e.scrollbarXRail, n); var r = { top: t.scrollTop, height: e.railYHeight }; e.isScrollbarYUsingRight ? e.isRtl ? r.right = e.contentWidth - (e.negativeScrollAdjustment + t.scrollLeft) - e.scrollbarYRight - e.scrollbarYOuterWidth : r.right = e.scrollbarYRight - t.scrollLeft : e.isRtl ? r.left = e.negativeScrollAdjustment + t.scrollLeft + 2 * e.containerWidth - e.contentWidth - e.scrollbarYLeft - e.scrollbarYOuterWidth : r.left = e.scrollbarYLeft + t.scrollLeft, l.css(e.scrollbarYRail, r), l.css(e.scrollbarX, { left: e.scrollbarXLeft, width: e.scrollbarXWidth - e.railBorderXWidth }), l.css(e.scrollbarY, { top: e.scrollbarYTop, height: e.scrollbarYHeight - e.railBorderYWidth }) } var i = t("../lib/class"), l = t("../lib/dom"), s = t("../lib/helper"), a = t("./instances"), c = t("./update-scroll"); e.exports = function (t) { var e = a.get(t); e.containerWidth = t.clientWidth, e.containerHeight = t.clientHeight, e.contentWidth = t.scrollWidth, e.contentHeight = t.scrollHeight; var n; t.contains(e.scrollbarXRail) || (n = l.queryChildren(t, ".ps-scrollbar-x-rail"), n.length > 0 && n.forEach(function (t) { l.remove(t) }), l.appendTo(e.scrollbarXRail, t)), t.contains(e.scrollbarYRail) || (n = l.queryChildren(t, ".ps-scrollbar-y-rail"), n.length > 0 && n.forEach(function (t) { l.remove(t) }), l.appendTo(e.scrollbarYRail, t)), !e.settings.suppressScrollX && e.containerWidth + e.settings.scrollXMarginOffset < e.contentWidth ? (e.scrollbarXActive = !0, e.railXWidth = e.containerWidth - e.railXMarginWidth, e.railXRatio = e.containerWidth / e.railXWidth, e.scrollbarXWidth = r(e, s.toInt(e.railXWidth * e.containerWidth / e.contentWidth)), e.scrollbarXLeft = s.toInt((e.negativeScrollAdjustment + t.scrollLeft) * (e.railXWidth - e.scrollbarXWidth) / (e.contentWidth - e.containerWidth))) : e.scrollbarXActive = !1, !e.settings.suppressScrollY && e.containerHeight + e.settings.scrollYMarginOffset < e.contentHeight ? (e.scrollbarYActive = !0, e.railYHeight = e.containerHeight - e.railYMarginHeight, e.railYRatio = e.containerHeight / e.railYHeight, e.scrollbarYHeight = r(e, s.toInt(e.railYHeight * e.containerHeight / e.contentHeight)), e.scrollbarYTop = s.toInt(t.scrollTop * (e.railYHeight - e.scrollbarYHeight) / (e.contentHeight - e.containerHeight))) : e.scrollbarYActive = !1, e.scrollbarXLeft >= e.railXWidth - e.scrollbarXWidth && (e.scrollbarXLeft = e.railXWidth - e.scrollbarXWidth), e.scrollbarYTop >= e.railYHeight - e.scrollbarYHeight && (e.scrollbarYTop = e.railYHeight - e.scrollbarYHeight), o(t, e), e.scrollbarXActive ? i.add(t, "ps-active-x") : (i.remove(t, "ps-active-x"), e.scrollbarXWidth = 0, e.scrollbarXLeft = 0, c(t, "left", 0)), e.scrollbarYActive ? i.add(t, "ps-active-y") : (i.remove(t, "ps-active-y"), e.scrollbarYHeight = 0, e.scrollbarYTop = 0, c(t, "top", 0)) } }, { "../lib/class": 2, "../lib/dom": 3, "../lib/helper": 6, "./instances": 18, "./update-scroll": 20 }], 20: [function (t, e, n) { "use strict"; var r, o, i = t("./instances"), l = document.createEvent("Event"), s = document.createEvent("Event"), a = document.createEvent("Event"), c = document.createEvent("Event"), u = document.createEvent("Event"), d = document.createEvent("Event"), p = document.createEvent("Event"), f = document.createEvent("Event"), h = document.createEvent("Event"), v = document.createEvent("Event"); l.initEvent("ps-scroll-up", !0, !0), s.initEvent("ps-scroll-down", !0, !0), a.initEvent("ps-scroll-left", !0, !0), c.initEvent("ps-scroll-right", !0, !0), u.initEvent("ps-scroll-y", !0, !0), d.initEvent("ps-scroll-x", !0, !0), p.initEvent("ps-x-reach-start", !0, !0), f.initEvent("ps-x-reach-end", !0, !0), h.initEvent("ps-y-reach-start", !0, !0), v.initEvent("ps-y-reach-end", !0, !0), e.exports = function (t, e, n) { if ("undefined" == typeof t) throw "You must provide an element to the update-scroll function"; if ("undefined" == typeof e) throw "You must provide an axis to the update-scroll function"; if ("undefined" == typeof n) throw "You must provide a value to the update-scroll function"; if ("top" === e && 0 >= n) return t.scrollTop = 0, void t.dispatchEvent(h); if ("left" === e && 0 >= n) return t.scrollLeft = 0, void t.dispatchEvent(p); var b = i.get(t); return "top" === e && n >= b.contentHeight - b.containerHeight ? (t.scrollTop = b.contentHeight - b.containerHeight, void t.dispatchEvent(v)) : "left" === e && n >= b.contentWidth - b.containerWidth ? (t.scrollLeft = b.contentWidth - b.containerWidth, void t.dispatchEvent(f)) : (r || (r = t.scrollTop), o || (o = t.scrollLeft), "top" === e && r > n && t.dispatchEvent(l), "top" === e && n > r && t.dispatchEvent(s), "left" === e && o > n && t.dispatchEvent(a), "left" === e && n > o && t.dispatchEvent(c), "top" === e && (t.scrollTop = r = n, t.dispatchEvent(u)), void ("left" === e && (t.scrollLeft = o = n, t.dispatchEvent(d)))) } }, { "./instances": 18 }], 21: [function (t, e, n) { "use strict"; var r = t("../lib/dom"), o = t("../lib/helper"), i = t("./instances"), l = t("./update-geometry"), s = t("./update-scroll"); e.exports = function (t) { var e = i.get(t); e && (e.negativeScrollAdjustment = e.isNegativeScroll ? t.scrollWidth - t.clientWidth : 0, r.css(e.scrollbarXRail, "display", "block"), r.css(e.scrollbarYRail, "display", "block"), e.railXMarginWidth = o.toInt(r.css(e.scrollbarXRail, "marginLeft")) + o.toInt(r.css(e.scrollbarXRail, "marginRight")), e.railYMarginHeight = o.toInt(r.css(e.scrollbarYRail, "marginTop")) + o.toInt(r.css(e.scrollbarYRail, "marginBottom")), r.css(e.scrollbarXRail, "display", "none"), r.css(e.scrollbarYRail, "display", "none"), l(t), s(t, "top", t.scrollTop), s(t, "left", t.scrollLeft), r.css(e.scrollbarXRail, "display", ""), r.css(e.scrollbarYRail, "display", "")) } }, { "../lib/dom": 3, "../lib/helper": 6, "./instances": 18, "./update-geometry": 19, "./update-scroll": 20 }] }, {}, [1]);
|
###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2014, John McNamara, jmcnamara@cpan.org
#
import unittest
import os
from ...workbook import Workbook
from ..helperfunctions import _compare_xlsx_files
class TestCompareXLSXFiles(unittest.TestCase):
"""
Test file created by XlsxWriter against a file created by Excel.
"""
def setUp(self):
self.maxDiff = None
filename = 'chart_bar20.xlsx'
test_dir = 'xlsxwriter/test/comparison/'
self.got_filename = test_dir + '_test_' + filename
self.exp_filename = test_dir + 'xlsx_files/' + filename
self.ignore_files = []
self.ignore_elements = {}
def test_create_file(self):
"""Test the creation of a simple XlsxWriter file."""
filename = self.got_filename
####################################################
workbook = Workbook(filename)
worksheet = workbook.add_worksheet()
chart = workbook.add_chart({'type': 'bar'})
chart.axis_ids = [45925120, 45927040]
data = [
[1, 2, 3, 4, 5],
[2, 4, 6, 8, 10],
[3, 6, 9, 12, 15],
]
worksheet.write_column('A1', data[0])
worksheet.write_column('B1', data[1])
worksheet.write_column('C1', data[2])
worksheet.write('A7', 'Pear')
chart.add_series({'values': '=Sheet1!$A$1:$A$5'})
chart.add_series({'values': '=Sheet1!$B$1:$B$5', 'name': 'Apple'})
chart.add_series({'values': '=Sheet1!$C$1:$C$5', 'name': '=Sheet1!$A$7'})
worksheet.insert_chart('E9', chart)
workbook.close()
####################################################
got, exp = _compare_xlsx_files(self.got_filename,
self.exp_filename,
self.ignore_files,
self.ignore_elements)
self.assertEqual(got, exp)
def tearDown(self):
# Cleanup.
if os.path.exists(self.got_filename):
os.remove(self.got_filename)
if __name__ == '__main__':
unittest.main()
|
#!/usr/bin/env python
## ! DO NOT MANUALLY INVOKE THIS setup.py, USE CATKIN INSTEAD
from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
# fetch values from package.xml
setup_args = generate_distutils_setup(
packages=['arm_control'],
package_dir={'': 'src'},
)
setup(**setup_args)
|
##########################################################################################
#
# This file contains classes for controlling FW102C Thorlabs Motorized Filter Wheel
#
##########################################################################################
import wx
import functools
import ctypes
import multiprocessing
from libs.gui.hardware_control import HardwareGUIControl
from libs.dev.basic_device import BasicDevice
from libs.dev.consts import *
########################################################################
#
# Manager of the wheel
#
########################################################################
class ManagerFilterWheel :
"""
Class that manges W102C Thorlabs Motorized Filter Wheel
"""
def __init__ (self) :
# Create the lock for device
self.lock = multiprocessing.Lock()
# Create a pipe for communication
self.parent_connection, self.child_connection = multiprocessing.Pipe()
def __del__ (self) :
self.parent_connection.close()
self.child_connection.close()
def start(self) :
"""
Start the process controlling the filter wheel
"""
p = FilterWheel(self.child_connection)
p.start()
return p
def exit(self) :
"""
Close the process
"""
self.StopDevice()
return self.Exit()
def run(self, command, *args) :
"""
Send the command to the filter wheel through the pipe
"""
if len(args) == 0 : args = None
elif len(args) == 1 : args = args[0]
self.lock.acquire()
self.parent_connection.send( (command, args) )
result = self.parent_connection.recv()
self.lock.release()
return result
def __getattr__ (self, name) :
"""
Redirect all other request to the method `run`
"""
return functools.partial( self.run, name )
########################################################################
#
# Process where motorized filter wheel resides
#
########################################################################
class FilterWheel (BasicDevice):
"""
Control motorized filter wheel
"""
def Initialize (self, settings) :
# Opening the driver
driver_path = self.GetProgramFilesDirectory() + "\\Thorlabs\\FW102C\\Sample\\msvc\\uart_library.dll"
self.lib = ctypes.cdll.LoadLibrary (driver_path)
if self.lib.fnUART_LIBRARY_open (settings["port"], 115200) != 0 :
raise ValueError( "FilterWheel Error: device is not initialize" )
return RETURN_SUCCESS
def StopDevice (self, arg=None) :
"""
Close the device
"""
try :
self.lib.fnUART_LIBRARY_close()
del self.lib
except AttributeError : pass
return RETURN_SUCCESS
def GetNumFilters (self, arg=None) :
"""
Return maximum number of filters used
"""
return 6
def SetFilter (self, filter_num) :
"""
Go to filter specified by its number
"""
assert ( 1 <= filter_num ) and ( filter_num <= self.GetNumFilters() )
if self.lib.fnUART_LIBRARY_Set( ctypes.c_char_p("pos=%d\r" % filter_num ), 0 ) != 0 :
raise RuntimeError("FilterWheel Error: cannot go to filter %n" % filter_num )
return RETURN_SUCCESS
########################################################################
class FilterWheelTab (HardwareGUIControl) :
"""
This class represents a GUI controlling properties of the filter wheel.
"""
def __init__(self, parent, dev) :
HardwareGUIControl.__init__(self, parent, dev)
sizer = wx.BoxSizer(wx.VERTICAL)
################################################
# Specify the communication port name
sizer.Add (wx.StaticText(self, label="Communication port"), flag=wx.LEFT, border=5)
port_name = wx.SpinCtrl (self, value="18")
port_name.__label__ = "port"
sizer.Add (port_name, flag=wx.EXPAND, border=5)
################## Select filter ###################
sizer.Add( wx.StaticText(self, label="\nSelect filter"), flag=wx.LEFT, border=5)
self.filter_num_ctrl = wx.SpinCtrl (self, min=1, max=6, value="1")
self.filter_num_ctrl.__label__ = "selected_filter"
def GoToFilter (event) :
if self.dev.Initialize( self.GetSettings() ) == RETURN_FAIL : return
self.dev.SetFilter( self.filter_num_ctrl.GetValue() )
self.filter_num_ctrl.Bind(wx.EVT_SPINCTRL, GoToFilter)
sizer.Add (self.filter_num_ctrl, flag=wx.EXPAND, border=5)
################################################
self.SetSizer(sizer)
############### GUI is created, now generate settings ######################
self.CreateSettingsDict()
|
sexo = input("Digite seu sexo ").lower()
if (sexo == "masculino"):
print("M - Masculino")
elif (sexo == "feminino"):
print("F - Feminino")
else:
print("Valor invalido")
|
#!/usr/bin/python
import xgboost as xgb
from xgboost import DMatrix
from sklearn.datasets import load_svmlight_file
# This script demonstrate how to do ranking with xgboost.train
x_train, y_train = load_svmlight_file("mq2008.train")
x_valid, y_valid = load_svmlight_file("mq2008.vali")
x_test, y_test = load_svmlight_file("mq2008.test")
x_train.__class__,x_train.shape
group_train = []
with open("mq2008.train.group", "r") as f:
data = f.readlines()
for line in data:
group_train.append(int(line.split("\n")[0]))
group_train.__class__,len(group_train)
import numpy as np
np.sum(group_train),x_train.shape
group_valid = []
with open("mq2008.vali.group", "r") as f:
data = f.readlines()
for line in data:
group_valid.append(int(line.split("\n")[0]))
group_test = []
with open("mq2008.test.group", "r") as f:
data = f.readlines()
for line in data:
group_test.append(int(line.split("\n")[0]))
train_dmatrix = DMatrix(x_train, y_train)
valid_dmatrix = DMatrix(x_valid, y_valid)
test_dmatrix = DMatrix(x_test)
train_dmatrix.set_group(group_train)
valid_dmatrix.set_group(group_valid)
params = {'objective': 'rank:ndcg', 'eta': 0.1, 'gamma': 1.0,
'min_child_weight': 0.1, 'max_depth': 6}
xgb_model = xgb.train(params, train_dmatrix, num_boost_round=4,
evals=[(valid_dmatrix, 'validation')])
pred = xgb_model.predict(test_dmatrix)
|
'use strict';
const express = require('express');
const router = express.Router();
const controller = require('./system.config.controller');
router.get('/getSystemInfo',controller.getSystemInfo);
module.exports = router;
|
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Test for post export metrics.
Note that we actually train and export models within these tests.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
# Standard Imports
import apache_beam as beam
from apache_beam.testing import util
import tensorflow as tf
from tensorflow_model_analysis import config
from tensorflow_model_analysis.addons.fairness.post_export_metrics import fairness_indicators # pylint: disable=unused-import
from tensorflow_model_analysis.api import model_eval_lib
from tensorflow_model_analysis.api import tfma_unit
from tensorflow_model_analysis.eval_saved_model import testutil
from tensorflow_model_analysis.eval_saved_model.example_trainers import fixed_prediction_estimator_extra_fields
from tensorflow_model_analysis.eval_saved_model.example_trainers import multi_head
from tensorflow_model_analysis.evaluators import metrics_and_plots_evaluator
from tensorflow_model_analysis.post_export_metrics import post_export_metrics
import tensorflow_model_analysis.post_export_metrics.metric_keys as metric_keys
from tensorflow_model_analysis.proto import metrics_for_slice_pb2
from tensorflow_model_analysis.slicer import slicer_lib as slicer
_TEST_SEED = 857586
class FairnessIndicatorsTest(testutil.TensorflowModelAnalysisTest):
compute_confidence_intervals = False # Set to True to test uncertainty.
deterministic_test_seed = _TEST_SEED
def _getEvalExportDir(self):
return os.path.join(self._getTempDir(), 'eval_export_dir')
def _runTestWithCustomCheck(self,
examples,
eval_export_dir,
metrics_callbacks,
slice_spec=None,
custom_metrics_check=None,
custom_plots_check=None,
custom_result_check=None):
# make sure we are doing some checks
self.assertTrue(custom_metrics_check is not None or
custom_plots_check is not None or
custom_result_check is not None)
serialized_examples = [ex.SerializeToString() for ex in examples]
slicing_specs = None
if slice_spec:
slicing_specs = [s.to_proto() for s in slice_spec]
eval_config = config.EvalConfig(slicing_specs=slicing_specs)
eval_shared_model = self.createTestEvalSharedModel(
eval_saved_model_path=eval_export_dir,
add_metrics_callbacks=metrics_callbacks)
extractors = model_eval_lib.default_extractors(
eval_config=eval_config, eval_shared_model=eval_shared_model)
with beam.Pipeline() as pipeline:
(metrics, plots), _ = (
pipeline
| 'Create' >> beam.Create(serialized_examples)
| 'InputsToExtracts' >> model_eval_lib.InputsToExtracts()
| 'Extract' >> tfma_unit.Extract(extractors=extractors) # pylint: disable=no-value-for-parameter
| 'ComputeMetricsAndPlots' >>
metrics_and_plots_evaluator.ComputeMetricsAndPlots(
eval_shared_model=eval_shared_model,
compute_confidence_intervals=self.compute_confidence_intervals,
random_seed_for_testing=self.deterministic_test_seed))
if custom_metrics_check is not None:
util.assert_that(metrics, custom_metrics_check, label='metrics')
if custom_plots_check is not None:
util.assert_that(plots, custom_plots_check, label='plot')
result = pipeline.run()
if custom_result_check is not None:
custom_result_check(result)
def _runTest(self, examples, eval_export_dir, metrics, expected_values_dict):
def check_result(got): # pylint: disable=invalid-name
try:
self.assertEqual(1, len(got), 'got: %s' % got)
(slice_key, value) = got[0]
self.assertEqual((), slice_key)
self.assertDictElementsAlmostEqual(value, expected_values_dict)
except AssertionError as err:
tf.compat.v1.logging.error(got)
raise util.BeamAssertException(err)
self._runTestWithCustomCheck(
examples, eval_export_dir, metrics, custom_metrics_check=check_result)
def makeConfusionMatrixExamples(self):
"""Helper to create a set of examples used by multiple tests."""
# | | --------- Threshold -----------
# true label | pred | wt | -1e-6 | 0.0 | 0.7 | 0.8 | 1.0
# - | 0.0 | 1.0 | FP | TN | TN | TN | TN
# + | 0.0 | 1.0 | TP | FN | FN | FN | FN
# + | 0.7 | 3.0 | TP | TP | FN | FN | FN
# - | 0.8 | 2.0 | FP | FP | FP | TN | TN
# + | 1.0 | 3.0 | TP | TP | TP | TP | FN
return [
self._makeExample(
prediction=0.0000,
label=0.0000,
fixed_float=1.0,
fixed_string='',
fixed_int=0),
self._makeExample(
prediction=0.0000,
label=1.0000,
fixed_float=1.0,
fixed_string='',
fixed_int=0),
self._makeExample(
prediction=0.7000,
label=1.0000,
fixed_float=3.0,
fixed_string='',
fixed_int=0),
self._makeExample(
prediction=0.8000,
label=0.0000,
fixed_float=2.0,
fixed_string='',
fixed_int=0),
self._makeExample(
prediction=1.0000,
label=1.0000,
fixed_float=3.0,
fixed_string='',
fixed_int=0),
]
def makeConfusionMatrixExamplesAllNegative(self):
"""Helper to create a set of examples used by multiple tests."""
# | | --------- Threshold -----------
# true label | pred | wt | -1e-6 | 0.0 | 0.7 | 0.8 | 1.0
# - | 0.0 | 1.0 | FP | TN | TN | TN | TN
# - | 0.7 | 1.0 | FP | FP | TN | TN | TN
return [
self._makeExample(
prediction=0.0000,
label=0.0000,
fixed_float=1.0,
fixed_string='',
fixed_int=0),
self._makeExample(
prediction=0.0000,
label=0.0000,
fixed_float=1.0,
fixed_string='',
fixed_int=0),
]
def testFairnessIndicatorsDigitsKey(self):
temp_eval_export_dir = self._getEvalExportDir()
_, eval_export_dir = (
fixed_prediction_estimator_extra_fields
.simple_fixed_prediction_estimator_extra_fields(None,
temp_eval_export_dir))
examples = self.makeConfusionMatrixExamples()
fairness_metrics = post_export_metrics.fairness_indicators(
example_weight_key='fixed_float', thresholds=[0.5, 0.59, 0.599, 0.5999])
def check_result(got): # pylint: disable=invalid-name
try:
self.assertEqual(1, len(got), 'got: %s' % got)
(slice_key, value) = got[0]
self.assertEqual((), slice_key)
self.assertIn(metric_keys.base_key('true_positive_rate@0.5000'), value)
self.assertIn(metric_keys.base_key('false_positive_rate@0.5000'), value)
self.assertIn(metric_keys.base_key('true_positive_rate@0.5900'), value)
self.assertIn(metric_keys.base_key('false_positive_rate@0.5900'), value)
self.assertIn(metric_keys.base_key('true_positive_rate@0.5990'), value)
self.assertIn(metric_keys.base_key('false_positive_rate@0.5990'), value)
self.assertIn(metric_keys.base_key('true_positive_rate@0.5999'), value)
self.assertIn(metric_keys.base_key('false_positive_rate@0.5999'), value)
except AssertionError as err:
raise util.BeamAssertException(err)
self._runTestWithCustomCheck(
examples,
eval_export_dir, [fairness_metrics],
custom_metrics_check=check_result)
def testFairnessIndicatorsCounters(self):
temp_eval_export_dir = self._getEvalExportDir()
_, eval_export_dir = (
multi_head.simple_multi_head(None, temp_eval_export_dir))
examples = [
self._makeExample(
age=3.0,
language='english',
english_label=1.0,
chinese_label=0.0,
other_label=0.0),
self._makeExample(
age=3.0,
language='chinese',
english_label=0.0,
chinese_label=1.0,
other_label=0.0),
self._makeExample(
age=4.0,
language='english',
english_label=1.0,
chinese_label=0.0,
other_label=0.0),
self._makeExample(
age=5.0,
language='chinese',
english_label=0.0,
chinese_label=1.0,
other_label=0.0),
self._makeExample(
age=6.0,
language='chinese',
english_label=0.0,
chinese_label=1.0,
other_label=0.0),
]
fairness_english = post_export_metrics.fairness_indicators(
target_prediction_keys=['english_head/logistic'],
labels_key='english_head')
fairness_chinese = post_export_metrics.fairness_indicators(
target_prediction_keys=['chinese_head/logistic'],
labels_key='chinese_head')
def check_metric_counter(result):
metric_filter = beam.metrics.metric.MetricsFilter().with_name(
'metric_computed_fairness_indicators')
actual_metrics_count = result.metrics().query(
filter=metric_filter)['counters'][0].committed
self.assertEqual(actual_metrics_count, 2)
self._runTestWithCustomCheck(
examples,
eval_export_dir, [
fairness_english,
fairness_chinese,
],
custom_result_check=check_metric_counter)
def testFairnessIndicatorsAtThresholdsWeighted(self):
temp_eval_export_dir = self._getEvalExportDir()
_, eval_export_dir = (
fixed_prediction_estimator_extra_fields
.simple_fixed_prediction_estimator_extra_fields(None,
temp_eval_export_dir))
examples = self.makeConfusionMatrixExamples()
fairness_metrics = post_export_metrics.fairness_indicators(
example_weight_key='fixed_float', thresholds=[0.0, 0.7, 0.8, 1.0])
def check_result(got): # pylint: disable=invalid-name
try:
self.assertEqual(1, len(got), 'got: %s' % got)
(slice_key, value) = got[0]
self.assertEqual((), slice_key)
expected_values_dict = {
metric_keys.base_key('true_positive_rate@0.00'): 6.0 / 7.0,
metric_keys.base_key('false_positive_rate@0.00'): 2.0 / 3.0,
metric_keys.base_key('positive_rate@0.00'): 0.8,
metric_keys.base_key('true_negative_rate@0.00'): 1.0 / 3.0,
metric_keys.base_key('false_negative_rate@0.00'): 1.0 / 7.0,
metric_keys.base_key('negative_rate@0.00'): 2.0 / 10.0,
metric_keys.base_key('false_discovery_rate@0.00'): 2.0 / 8.0,
metric_keys.base_key('false_omission_rate@0.00'): 1.0 / 2.0,
metric_keys.base_key('true_positive_rate@0.70'): 3.0 / 7.0,
metric_keys.base_key('false_positive_rate@0.70'): 2.0 / 3.0,
metric_keys.base_key('positive_rate@0.70'): 0.5,
metric_keys.base_key('true_negative_rate@0.70'): 1.0 / 3.0,
metric_keys.base_key('false_negative_rate@0.70'): 4.0 / 7.0,
metric_keys.base_key('negative_rate@0.70'): 5.0 / 10.0,
metric_keys.base_key('false_discovery_rate@0.70'): 2.0 / 5.0,
metric_keys.base_key('false_omission_rate@0.70'): 4.0 / 5.0,
metric_keys.base_key('true_positive_rate@0.80'): 3.0 / 7.0,
metric_keys.base_key('false_positive_rate@0.80'): 0,
metric_keys.base_key('positive_rate@0.80'): 0.3,
metric_keys.base_key('true_negative_rate@0.80'): 3.0 / 3.0,
metric_keys.base_key('false_negative_rate@0.80'): 4.0 / 7.0,
metric_keys.base_key('negative_rate@0.80'): 7.0 / 10.0,
metric_keys.base_key('false_discovery_rate@0.80'): 0,
metric_keys.base_key('false_omission_rate@0.80'): 4.0 / 7.0,
metric_keys.base_key('true_positive_rate@1.00'): 0,
metric_keys.base_key('false_positive_rate@1.00'): 0,
metric_keys.base_key('positive_rate@1.00'): 0,
metric_keys.base_key('true_negative_rate@1.00'): 1,
metric_keys.base_key('false_negative_rate@1.00'): 1,
metric_keys.base_key('negative_rate@1.00'): 1,
metric_keys.base_key('false_discovery_rate@1.00'): 0,
metric_keys.base_key('false_omission_rate@1.00'): 7.0 / 10.0,
}
self.assertDictElementsAlmostEqual(value, expected_values_dict)
except AssertionError as err:
raise util.BeamAssertException(err)
self._runTestWithCustomCheck(
examples,
eval_export_dir, [fairness_metrics],
custom_metrics_check=check_result)
def testFairnessIndicatorsAtThresholdsWeightedWithUncertainty(self):
self.compute_confidence_intervals = True
temp_eval_export_dir = self._getEvalExportDir()
_, eval_export_dir = (
fixed_prediction_estimator_extra_fields
.simple_fixed_prediction_estimator_extra_fields(None,
temp_eval_export_dir))
examples = self.makeConfusionMatrixExamples()
fairness_metrics = post_export_metrics.fairness_indicators(
example_weight_key='fixed_float', thresholds=[0.0, 0.7, 0.8, 1.0])
def check_result(got): # pylint: disable=invalid-name
try:
self.assertEqual(1, len(got), 'got: %s' % got)
(slice_key, value) = got[0]
self.assertEqual((), slice_key)
expected_values_dict = {
metric_keys.base_key('true_positive_rate@0.00'): 6.0 / 7.0,
metric_keys.base_key('false_positive_rate@0.00'): 2.0 / 3.0,
metric_keys.base_key('positive_rate@0.00'): 0.8,
metric_keys.base_key('true_negative_rate@0.00'): 1.0 / 3.0,
metric_keys.base_key('false_negative_rate@0.00'): 1.0 / 7.0,
metric_keys.base_key('negative_rate@0.00'): 2.0 / 10.0,
metric_keys.base_key('false_discovery_rate@0.00'): 2.0 / 8.0,
metric_keys.base_key('false_omission_rate@0.00'): 1.0 / 2.0,
metric_keys.base_key('true_positive_rate@0.70'): 3.0 / 7.0,
metric_keys.base_key('false_positive_rate@0.70'): 2.0 / 3.0,
metric_keys.base_key('positive_rate@0.70'): 0.5,
metric_keys.base_key('true_negative_rate@0.70'): 1.0 / 3.0,
metric_keys.base_key('false_negative_rate@0.70'): 4.0 / 7.0,
metric_keys.base_key('negative_rate@0.70'): 5.0 / 10.0,
metric_keys.base_key('false_discovery_rate@0.70'): 2.0 / 5.0,
metric_keys.base_key('false_omission_rate@0.70'): 4.0 / 5.0,
metric_keys.base_key('true_positive_rate@0.80'): 3.0 / 7.0,
metric_keys.base_key('false_positive_rate@0.80'): 0,
metric_keys.base_key('positive_rate@0.80'): 0.3,
metric_keys.base_key('true_negative_rate@0.80'): 3.0 / 3.0,
metric_keys.base_key('false_negative_rate@0.80'): 4.0 / 7.0,
metric_keys.base_key('negative_rate@0.80'): 7.0 / 10.0,
metric_keys.base_key('false_discovery_rate@0.80'): 0,
metric_keys.base_key('false_omission_rate@0.80'): 4.0 / 7.0,
metric_keys.base_key('true_positive_rate@1.00'): 0,
metric_keys.base_key('false_positive_rate@1.00'): 0,
metric_keys.base_key('positive_rate@1.00'): 0,
metric_keys.base_key('true_negative_rate@1.00'): 1,
metric_keys.base_key('false_negative_rate@1.00'): 1,
metric_keys.base_key('negative_rate@1.00'): 1,
metric_keys.base_key('false_discovery_rate@1.00'): 0,
metric_keys.base_key('false_omission_rate@1.00'): 7.0 / 10.0,
}
self.assertDictElementsWithTDistributionAlmostEqual(
value, expected_values_dict)
except AssertionError as err:
raise util.BeamAssertException(err)
self._runTestWithCustomCheck(
examples,
eval_export_dir, [fairness_metrics],
custom_metrics_check=check_result)
def testFairnessIndicatorsAtDefaultThresholds(self):
temp_eval_export_dir = self._getEvalExportDir()
_, eval_export_dir = (
fixed_prediction_estimator_extra_fields
.simple_fixed_prediction_estimator_extra_fields(None,
temp_eval_export_dir))
examples = self.makeConfusionMatrixExamples()
fairness_metrics = post_export_metrics.fairness_indicators()
def check_result(got): # pylint: disable=invalid-name
try:
self.assertEqual(1, len(got), 'got: %s' % got)
(slice_key, value) = got[0]
self.assertEqual((), slice_key)
expected_values_dict = {
metric_keys.base_key('true_positive_rate@0.10'): 2.0 / 3.0,
metric_keys.base_key('false_positive_rate@0.10'): 1.0 / 2.0,
metric_keys.base_key('positive_rate@0.10'): 3.0 / 5.0,
metric_keys.base_key('true_negative_rate@0.10'): 1.0 / 2.0,
metric_keys.base_key('false_negative_rate@0.10'): 1.0 / 3.0,
metric_keys.base_key('negative_rate@0.10'): 2.0 / 5.0,
metric_keys.base_key('true_positive_rate@0.20'): 2.0 / 3.0,
metric_keys.base_key('true_positive_rate@0.30'): 2.0 / 3.0,
metric_keys.base_key('true_positive_rate@0.40'): 2.0 / 3.0,
metric_keys.base_key('true_positive_rate@0.50'): 2.0 / 3.0,
metric_keys.base_key('true_positive_rate@0.60'): 2.0 / 3.0,
metric_keys.base_key('true_positive_rate@0.70'): 1.0 / 3.0,
metric_keys.base_key('false_positive_rate@0.70'): 1.0 / 2.0,
metric_keys.base_key('positive_rate@0.70'): 2.0 / 5.0,
metric_keys.base_key('true_negative_rate@0.70'): 1.0 / 2.0,
metric_keys.base_key('false_negative_rate@0.70'): 2.0 / 3.0,
metric_keys.base_key('negative_rate@0.70'): 3.0 / 5.0,
metric_keys.base_key('positive_rate@0.80'): 1.0 / 5.0,
metric_keys.base_key('true_positive_rate@0.90'): 1.0 / 3.0,
metric_keys.base_key('false_positive_rate@0.90'): 0.0 / 2.0,
metric_keys.base_key('positive_rate@0.90'): 1.0 / 5.0,
metric_keys.base_key('true_negative_rate@0.90'): 2.0 / 2.0,
metric_keys.base_key('false_negative_rate@0.90'): 2.0 / 3.0,
metric_keys.base_key('negative_rate@0.90'): 4.0 / 5.0,
metric_keys.base_key('false_discovery_rate@0.10'): 1.0 / 3.0,
metric_keys.base_key('false_omission_rate@0.10'): 1.0 / 2.0,
metric_keys.base_key('false_discovery_rate@0.20'): 1.0 / 3.0,
metric_keys.base_key('false_omission_rate@0.20'): 1.0 / 2.0,
metric_keys.base_key('false_discovery_rate@0.30'): 1.0 / 3.0,
metric_keys.base_key('false_omission_rate@0.30'): 1.0 / 2.0,
metric_keys.base_key('false_discovery_rate@0.40'): 1.0 / 3.0,
metric_keys.base_key('false_omission_rate@0.40'): 1.0 / 2.0,
metric_keys.base_key('false_discovery_rate@0.50'): 1.0 / 3.0,
metric_keys.base_key('false_omission_rate@0.50'): 1.0 / 2.0,
metric_keys.base_key('false_discovery_rate@0.60'): 1.0 / 3.0,
metric_keys.base_key('false_omission_rate@0.60'): 1.0 / 2.0,
metric_keys.base_key('false_discovery_rate@0.70'): 1.0 / 2.0,
metric_keys.base_key('false_omission_rate@0.70'): 2.0 / 3.0,
metric_keys.base_key('false_discovery_rate@0.80'): 0,
metric_keys.base_key('false_omission_rate@0.80'): 2.0 / 4.0,
metric_keys.base_key('false_discovery_rate@0.90'): 0,
metric_keys.base_key('false_omission_rate@0.90'): 2.0 / 4.0,
}
self.assertDictElementsAlmostEqual(value, expected_values_dict)
except AssertionError as err:
raise util.BeamAssertException(err)
self._runTestWithCustomCheck(
examples,
eval_export_dir, [fairness_metrics],
custom_metrics_check=check_result)
def testFairnessIndicatorsZeroes(self):
temp_eval_export_dir = self._getEvalExportDir()
_, eval_export_dir = (
fixed_prediction_estimator_extra_fields
.simple_fixed_prediction_estimator_extra_fields(None,
temp_eval_export_dir))
examples = self.makeConfusionMatrixExamples()[0:1]
fairness_metrics = post_export_metrics.fairness_indicators()
def check_result(got): # pylint: disable=invalid-name
try:
self.assertEqual(1, len(got), 'got: %s' % got)
(slice_key, value) = got[0]
self.assertEqual((), slice_key)
expected_values_dict = {
metric_keys.base_key('true_positive_rate@0.10'): 0.0,
}
self.assertDictElementsAlmostEqual(value, expected_values_dict)
except AssertionError as err:
raise util.BeamAssertException(err)
self._runTestWithCustomCheck(
examples,
eval_export_dir, [fairness_metrics],
custom_metrics_check=check_result)
def testFairnessIndicatorsMultiHead(self):
temp_eval_export_dir = self._getEvalExportDir()
_, eval_export_dir = (
multi_head.simple_multi_head(None, temp_eval_export_dir))
examples = [
self._makeExample(
age=3.0,
language='english',
english_label=1.0,
chinese_label=0.0,
other_label=0.0),
self._makeExample(
age=3.0,
language='chinese',
english_label=0.0,
chinese_label=1.0,
other_label=0.0),
self._makeExample(
age=4.0,
language='english',
english_label=1.0,
chinese_label=0.0,
other_label=0.0),
self._makeExample(
age=5.0,
language='chinese',
english_label=0.0,
chinese_label=1.0,
other_label=0.0),
self._makeExample(
age=6.0,
language='chinese',
english_label=0.0,
chinese_label=1.0,
other_label=0.0),
]
fairness_english = post_export_metrics.fairness_indicators(
target_prediction_keys=['english_head/logistic'],
labels_key='english_head')
fairness_chinese = post_export_metrics.fairness_indicators(
target_prediction_keys=['chinese_head/logistic'],
labels_key='chinese_head')
def check_metric_result(got):
try:
self.assertEqual(1, len(got), 'got: %s' % got)
(slice_key, value) = got[0]
self.assertEqual((), slice_key)
expected_values_dict = {
metric_keys.base_key(
'english_head/logistic/true_positive_rate@0.10'):
1.0,
metric_keys.base_key(
'chinese_head/logistic/true_positive_rate@0.10'):
1.0,
}
self.assertDictElementsAlmostEqual(value, expected_values_dict)
except AssertionError as err:
raise util.BeamAssertException(err)
self._runTestWithCustomCheck(
examples,
eval_export_dir, [
fairness_english,
fairness_chinese,
],
custom_metrics_check=check_metric_result)
def testFairnessAucs(self):
temp_eval_export_dir = self._getEvalExportDir()
_, eval_export_dir = (
fixed_prediction_estimator_extra_fields
.simple_fixed_prediction_estimator_extra_fields(None,
temp_eval_export_dir))
examples = [
# Subgroup
self._makeExample(prediction=0.0000, label=0.0000, fixed_int=1),
self._makeExample(prediction=0.0000, label=1.0000, fixed_int=1),
self._makeExample(prediction=1.0000, label=0.0000, fixed_int=1),
self._makeExample(prediction=1.0000, label=1.0000, fixed_int=1),
# Background
self._makeExample(prediction=0.0000, label=0.0000, fixed_int=0),
self._makeExample(prediction=0.0000, label=1.0000, fixed_int=0),
self._makeExample(prediction=1.0000, label=0.0000, fixed_int=0),
self._makeExample(prediction=1.0000, label=1.0000, fixed_int=0),
]
fairness_auc = post_export_metrics.fairness_auc(subgroup_key='fixed_int')
def check_result(got):
try:
self.assertEqual(1, len(got), 'got: %s' % got)
(slice_key, value) = got[0]
self.assertEqual((), slice_key)
expected_value = {
# Subgroup
'post_export_metrics/fairness/auc/subgroup_auc/fixed_int':
0.5,
'post_export_metrics/fairness/auc/subgroup_auc/fixed_int/lower_bound':
0.25,
'post_export_metrics/fairness/auc/subgroup_auc/fixed_int/upper_bound':
0.75,
# BNSP
'post_export_metrics/fairness/auc/bnsp_auc/fixed_int':
0.5,
'post_export_metrics/fairness/auc/bnsp_auc/fixed_int/lower_bound':
0.25,
'post_export_metrics/fairness/auc/bnsp_auc/fixed_int/upper_bound':
0.75,
# BPSN
'post_export_metrics/fairness/auc/bpsn_auc/fixed_int':
0.5,
'post_export_metrics/fairness/auc/bpsn_auc/fixed_int/lower_bound':
0.25,
'post_export_metrics/fairness/auc/bpsn_auc/fixed_int/upper_bound':
0.75,
'average_loss':
0.5,
}
self.assertDictElementsAlmostEqual(value, expected_value)
except AssertionError as err:
raise util.BeamAssertException(err)
self._runTestWithCustomCheck(
examples,
eval_export_dir, [fairness_auc],
custom_metrics_check=check_result)
def testFairnessAucsWithFeatureSlices(self):
temp_eval_export_dir = self._getEvalExportDir()
_, eval_export_dir = (
fixed_prediction_estimator_extra_fields
.simple_fixed_prediction_estimator_extra_fields(None,
temp_eval_export_dir))
examples = [
# Subgroup
self._makeExample(
prediction=0.0000, label=0.0000, fixed_int=1, fixed_string='a'),
self._makeExample(
prediction=0.0000, label=1.0000, fixed_int=1, fixed_string='a'),
self._makeExample(
prediction=1.0000, label=0.0000, fixed_int=1, fixed_string='a'),
self._makeExample(
prediction=1.0000, label=1.0000, fixed_int=1, fixed_string='a'),
self._makeExample(
prediction=0.0000, label=0.0000, fixed_int=1, fixed_string='b'),
self._makeExample(
prediction=0.0000, label=1.0000, fixed_int=1, fixed_string='b'),
self._makeExample(
prediction=1.0000, label=0.0000, fixed_int=1, fixed_string='b'),
self._makeExample(
prediction=1.0000, label=1.0000, fixed_int=1, fixed_string='b'),
# Background
self._makeExample(
prediction=0.0000, label=0.0000, fixed_int=0, fixed_string='a'),
self._makeExample(
prediction=0.0000, label=1.0000, fixed_int=0, fixed_string='a'),
self._makeExample(
prediction=1.0000, label=0.0000, fixed_int=0, fixed_string='a'),
self._makeExample(
prediction=1.0000, label=1.0000, fixed_int=0, fixed_string='a'),
self._makeExample(
prediction=0.0000, label=0.0000, fixed_int=0, fixed_string='b'),
self._makeExample(
prediction=0.0000, label=1.0000, fixed_int=0, fixed_string='b'),
self._makeExample(
prediction=1.0000, label=0.0000, fixed_int=0, fixed_string='b'),
self._makeExample(
prediction=1.0000, label=1.0000, fixed_int=0, fixed_string='b'),
]
fairness_auc = post_export_metrics.fairness_auc(subgroup_key='fixed_int')
def check_result(got):
try:
self.assertEqual(3, len(got), 'got: %s' % got)
for _, value in got:
expected_value = {
# Subgroup
'post_export_metrics/fairness/auc/subgroup_auc/fixed_int':
0.5,
'post_export_metrics/fairness/auc/subgroup_auc/fixed_int/lower_bound':
0.25,
'post_export_metrics/fairness/auc/subgroup_auc/fixed_int/upper_bound':
0.75,
# BNSP
'post_export_metrics/fairness/auc/bnsp_auc/fixed_int':
0.5,
'post_export_metrics/fairness/auc/bnsp_auc/fixed_int/lower_bound':
0.25,
'post_export_metrics/fairness/auc/bnsp_auc/fixed_int/upper_bound':
0.75,
# BPSN
'post_export_metrics/fairness/auc/bpsn_auc/fixed_int':
0.5,
'post_export_metrics/fairness/auc/bpsn_auc/fixed_int/lower_bound':
0.25,
'post_export_metrics/fairness/auc/bpsn_auc/fixed_int/upper_bound':
0.75,
'average_loss':
0.5,
}
self.assertDictElementsAlmostEqual(value, expected_value)
# Check serialization too.
output_metrics = metrics_for_slice_pb2.MetricsForSlice().metrics
for slice_key, value in got:
fairness_auc.populate_stats_and_pop(slice_key, value, output_metrics)
for key in (
metric_keys.FAIRNESS_AUC + '/subgroup_auc/fixed_int',
metric_keys.FAIRNESS_AUC + '/bpsn_auc/fixed_int',
metric_keys.FAIRNESS_AUC + '/bnsp_auc/fixed_int',
):
self.assertProtoEquals(
"""
bounded_value {
lower_bound {
value: 0.2500001
}
upper_bound {
value: 0.7499999
}
value {
value: 0.5
}
methodology: RIEMANN_SUM
}
""", output_metrics[key])
except AssertionError as err:
raise util.BeamAssertException(err)
self._runTestWithCustomCheck(
examples,
eval_export_dir, [fairness_auc],
slice_spec=[
slicer.SingleSliceSpec(),
slicer.SingleSliceSpec(columns=['fixed_string'])
],
custom_metrics_check=check_result)
def testFairnessIndicatorsWithAllNegativeExamples(self):
temp_eval_export_dir = self._getEvalExportDir()
_, eval_export_dir = (
fixed_prediction_estimator_extra_fields
.simple_fixed_prediction_estimator_extra_fields(None,
temp_eval_export_dir))
examples = self.makeConfusionMatrixExamplesAllNegative()
fairness_metrics = post_export_metrics.fairness_indicators(
example_weight_key='fixed_float', thresholds=[0.0, 0.7, 1.0])
def check_result(got): # pylint: disable=invalid-name
try:
self.assertEqual(1, len(got), 'got: %s' % got)
(slice_key, value) = got[0]
self.assertEqual((), slice_key)
expected_values_dict = {
metric_keys.base_key('true_positive_rate@0.00'): 0,
metric_keys.base_key('false_positive_rate@0.00'): 0,
metric_keys.base_key('positive_rate@0.00'): 0,
metric_keys.base_key('true_negative_rate@0.00'): 1,
metric_keys.base_key('false_negative_rate@0.00'): 0,
metric_keys.base_key('negative_rate@0.00'): 1,
metric_keys.base_key('true_positive_rate@0.70'): 0,
metric_keys.base_key('false_positive_rate@0.70'): 0,
metric_keys.base_key('positive_rate@0.70'): 0,
metric_keys.base_key('true_negative_rate@0.70'): 1,
metric_keys.base_key('false_negative_rate@0.70'): 0,
metric_keys.base_key('negative_rate@0.70'): 1,
metric_keys.base_key('true_positive_rate@1.00'): 0,
metric_keys.base_key('false_positive_rate@1.00'): 0,
metric_keys.base_key('positive_rate@1.00'): 0,
metric_keys.base_key('true_negative_rate@1.00'): 1,
metric_keys.base_key('false_negative_rate@1.00'): 0,
metric_keys.base_key('negative_rate@1.00'): 1,
}
self.assertDictElementsAlmostEqual(value, expected_values_dict)
except AssertionError as err:
raise util.BeamAssertException(err)
self._runTestWithCustomCheck(
examples,
eval_export_dir, [fairness_metrics],
custom_metrics_check=check_result)
if __name__ == '__main__':
tf.test.main()
|
// repair with --directoryperdb
// `--repairpath` is mmap only.
// @tags: [requires_mmapv1]
var baseName = "jstests_disk_repair2";
function check() {
files = listFiles(dbpath);
for (f in files) {
assert(!new RegExp("^" + dbpath + "backup_").test(files[f].name),
"backup dir " + files[f].name + " in dbpath");
}
assert.eq.automsg("1", "db[ baseName ].count()");
}
var dbpath = MongoRunner.dataPath + baseName + "/";
var repairpath = dbpath + "repairDir/";
var longDBName = Array(61).join('a');
var longRepairPath = dbpath + Array(61).join('b') + '/';
resetDbpath(dbpath);
resetDbpath(repairpath);
var m = MongoRunner.runMongod({
directoryperdb: "",
dbpath: dbpath,
repairpath: repairpath,
noCleanData: true,
});
db = m.getDB(baseName);
db[baseName].save({});
assert.commandWorked(db.runCommand({repairDatabase: 1, backupOriginalFiles: true}));
// Check that repair files exist in the repair directory, and nothing else
db.adminCommand({fsync: 1});
files = listFiles(repairpath + "/backup_repairDatabase_0/" + baseName);
var fileCount = 0;
for (f in files) {
print(files[f].name);
if (files[f].isDirectory)
continue;
fileCount += 1;
assert(/\.bak$/.test(files[f].name),
"In database repair directory, found unexpected file: " + files[f].name);
}
assert(fileCount > 0, "Expected more than zero nondirectory files in the database directory");
check();
MongoRunner.stopMongod(m);
resetDbpath(repairpath);
m = MongoRunner.runMongod({
port: m.port,
directoryperdb: "",
dbpath: dbpath,
noCleanData: true,
});
db = m.getDB(baseName);
assert.commandWorked(db.runCommand({repairDatabase: 1}));
check();
MongoRunner.stopMongod(m);
// Test long database names
resetDbpath(repairpath);
m = MongoRunner.runMongod({
port: m.port,
directoryperdb: "",
dbpath: dbpath,
noCleanData: true,
});
db = m.getDB(longDBName);
assert.writeOK(db[baseName].save({}));
assert.commandWorked(db.runCommand({repairDatabase: 1}));
MongoRunner.stopMongod(m);
// Test long repairPath
resetDbpath(longRepairPath);
m = MongoRunner.runMongod({
port: m.port,
directoryperdb: "",
dbpath: dbpath,
repairpath: longRepairPath,
noCleanData: true,
});
db = m.getDB(longDBName);
assert.commandWorked(db.runCommand({repairDatabase: 1, backupOriginalFiles: true}));
check();
MongoRunner.stopMongod(m);
// Test database name and repairPath with --repair
resetDbpath(longRepairPath);
var returnCode = runMongoProgram("mongod",
"--port",
m.port,
"--repair",
"--directoryperdb",
"--dbpath",
dbpath,
"--repairpath",
longRepairPath);
assert.eq(returnCode, 0);
m = MongoRunner.runMongod({
port: m.port,
directoryperdb: "",
dbpath: dbpath,
noCleanData: true,
});
db = m.getDB(longDBName);
check();
MongoRunner.stopMongod(m);
resetDbpath(repairpath);
returnCode = runMongoProgram("mongod",
"--port",
m.port,
"--repair",
"--directoryperdb",
"--dbpath",
dbpath,
"--repairpath",
repairpath);
assert.eq(returnCode, 0);
m = MongoRunner.runMongod({
port: m.port,
directoryperdb: "",
dbpath: dbpath,
repairpath: repairpath,
noCleanData: true,
});
db = m.getDB(baseName);
check();
MongoRunner.stopMongod(m);
resetDbpath(repairpath);
returnCode =
runMongoProgram("mongod", "--port", m.port, "--repair", "--directoryperdb", "--dbpath", dbpath);
assert.eq(returnCode, 0);
m = MongoRunner.runMongod({
port: m.port,
directoryperdb: "",
dbpath: dbpath,
noCleanData: true,
});
db = m.getDB(baseName);
check();
|
import matplotlib.pylab as plt
import os
import glob
import numpy as np
import pickle
import scipy.io
from fit import *
from equation_builder import *
class timeseries(object):
'''
timeseries is an object for holding individual components of GPS timeseries
Attributes:
component : component name i.e lat,lon, rad
times :times of measurement
location : displacment
uncertainty : uncertainty
'''
def __init__(self,component,times,location,uncertainty):
self.component = component
self.times = times
self.location = location
self.uncertainty = uncertainty
def get_component(self):
return self.component
def get_times(self,**kwargs):
'''
arguments = None
kwargs : windows = starttime,endtime
'''
window = kwards.get('window')
if 'window' in locals:
start = windows[0]
end = windows [2]
t = []
for time in self.times:
if time > start and time < end:
t.append.time
else:
t = self.times
return t
def get_location(self):
return self.location
def get_uncertainty(self):
return self.uncertianty
def plot(self):
plt.errorbar(self.times, self.location, yerr= self.uncertainty)
plt.title = self.component
plt.show()
return
class station(object):
'''
station is an object representing a GPS station
Attributes:
name : station name
location : location of station in lon,lat
times: time corresponding to measurment
lat : latidudinal displacement and uncertainty
lon : longitudinal displacement and uncertainty
vert : vertical displacement and uncertainty
'''
def __init__(self,name,network,times,lat,lon,vert):
self.name = name
self.network = network
self.times = times
self.lat = lat
self.lon = lon
self.vert = vert
def get_startdate(self):
return min(self.times)
def get_enddate(self):
return max(self.times)
def get_location(self):
return self.location
def plot_tseries(self,**kwargs):
'''
plots all 3 component data
Optional arguments: specify 3 function files for plotting as an array i.e. fun = [funX,funY,funZ]
'''
fun = kwargs.get('fun')
plt.subplot(311)
plt.title(self.name)
plt.scatter(self.times,self.lat.location, c = 'r', label = 'Northing')
if 'fun' in locals():
funList = parseFunFile(fun[1])
data = model_tseries(self.times,funList)
plt.plot(self.times,data)
plt.ylabel('Northing')
plt.subplot(312)
plt.ylabel('Easting')
plt.scatter(self.times,self.lon.location, c = 'b', label = 'Easting')
if 'fun' in locals():
funList = parseFunFile(fun[0])
data = model_tseries(self.times,funList)
plt.plot(self.times,data)
plt.subplot(313)
plt.ylabel('Up')
plt.xlabel('Time')
plt.scatter(self.times,self.vert.location,c = 'g', label = 'Up')
if 'fun' in locals():
funList = parseFunFile(fun[2])
data = model_tseries(self.times,funList)
plt.plot(self.times,data)
plt.savefig('station_model.jpg')
plt.show()
class network(object):
'''
network is an object representing collection of gps stations
Attributes:
name : network name
purpose : reason for network
organizer : orginization running network
stations : stations in the network each is a station object
'''
def __init__(self,name,purpose,organizer,stations):
self.name = name
self.purpose = purpose
self.organizer = organizer
self.stations = stations
def plot_network(self):
#make a basemap plot of stations
return
def get_name(self):
return self.name
def get_organizer(self):
return self.organizer
def get_station(self,station):
for sta in self.stations:
if sta.name == station:
return sta
return
def print_stations(self):
print 'There are %s stations in network:' % len(self.stations)
index = 0
for station in self.stations:
print index, station.name
index += 1
return
def get_stations(self):
print 'There are %s stations in network:' % len(self.stations)
stationList = []
index = 0
for station in self.stations:
stationList.append(station.name)
index += 1
return stationList
def save(self):
pickle.dump(self,open(self.name+".p","wb"))
return
def readData(filename):
'''
read in data in Decater format
date location uncertainty?
'''
#read in filename splitting into useful python arrays
date,loc,uncert = np.genfromtxt(filename,dtype=float,usecols = (0,1,2), unpack = True, skiprows = 1)
dateNum = [float(d) for d in date]
loc = [float(l) for l in loc]
uncert = [float(x) for x in uncert]
return dateNum,loc,uncert
def create_network(name,purpose,organization,networkFolder):
'''
create a network, and station objects for all stations in
networkFolder
Inputs:
name : name of network
purpose : purpose of network
organization : organization running netowrk
networkFolder : directory containing stations in network
the directory structure is /network/station/stationData
'''
directories = []
for directory in os.walk('./' + networkFolder):
directories.append(directory)
stations = directories[0][1]
stationObjects = []
for i in range(0,len(stations)):
latFile = glob.glob(directories[i+1][0] + '/*.lat.*.txt')[0]
lonFile = glob.glob(directories[i+1][0] + '/*.lon*.txt')[0]
radFile = glob.glob(directories[i+1][0] + '/*.rad*.txt')[0]
print latFile
t,llat,ulat = readData(latFile)
lat = timeseries('Latitude',t,llat,ulat)
t,llon,ulon = readData(lonFile)
lon = timeseries('Longitude',t,llon,ulon)
t,lrad,urad = readData(radFile)
rad = timeseries('Radial',t,lrad,urad)
stationObjects.append(station(stations[i],name,t,lat,lon,rad))
net = network(name,purpose,organization,stationObjects)
return net
def network2Struct(network,filname,units):
'''
Takes gps python network object and converts it to matlab S structure and saves
as a .mat file for use with the NIF code
Paramaters:
network is a network of GPS sites
filename is the output .m file name
units is the units of the GPS timeseries stored in the structure
Matlab object (S) description:
S attributes:
sites : cell array of Site Names (string
decyr : cell array, one cell for every site containing array of times
de: Cell array, one cell for every site conaining East dimension IN M
dn:' 'North' '
du:' 'Up' '
cove:Cell array, one cell for every site containing East Covariance IN M
covn:' North '
covu:' Up '
'''
#create the sites array
sites = network.get_stations()
#create arrays to store the data
decyr,de,dn,du,cove,covn,covu = [],[],[],[],[],[],[]
#make sure the observation does not have to be scaled
if units == 'cm':
scale = 0.01
if units == 'mm':
scale = 0.001
if units == 'm':
scale = 1
for i in range(len(sites)):
decyr.append(network.stations[i].times)
de.append(scaleObs(network.stations[i].lon.location,scale))
dn.append(scaleObs(network.stations[i].lat.location,scale))
du.append(scaleObs(network.stations[i].vert.location,scale))
cove.append(scaleObs(np.square(network.stations[i].lon.uncertainty),scale))
covn.append(scaleObs(np.square(network.stations[i].lat.uncertainty),scale))
covu.append(scaleObs(np.square(network.stations[i].vert.uncertainty),scale))
S = {'Sites':sites,'DecimalYears':decyr,'EastDisplacement':de,'NorthDisplacement':dn,\
'VerticalDisplacement':du,'EastCov':cove,'NorthCov':covn,'UpCov':covu}
scipy.io.savemat(filname,S, oned_as = 'column')
return
def scaleObs(array,scale):
scaled = []
for obs in array:
scaled.append(obs*scale)
return scaled
|
export const waves = {"viewBox":"0 0 512 512","children":[{"name":"g","attribs":{},"children":[{"name":"path","attribs":{"d":"M256,0C114.625,0,0,114.609,0,256s114.625,256,256,256c141.406,0,256-114.609,256-256S397.406,0,256,0z M256,472\r\n\t\tc-119.281,0-216-96.703-216-216S136.719,40,256,40c119.312,0,216,96.703,216,216S375.312,472,256,472z"},"children":[{"name":"path","attribs":{"d":"M256,0C114.625,0,0,114.609,0,256s114.625,256,256,256c141.406,0,256-114.609,256-256S397.406,0,256,0z M256,472\r\n\t\tc-119.281,0-216-96.703-216-216S136.719,40,256,40c119.312,0,216,96.703,216,216S375.312,472,256,472z"},"children":[]}]},{"name":"path","attribs":{"d":"M312.188,335.281c-13.516,0-33.297-15.125-50.75-28.469c-21.656-16.547-44.062-33.656-66.875-33.656\r\n\t\tc-42.75,0-65.609,29.266-66.562,30.5l26.328,19.844c0.141-0.172,14.109-17.531,40.234-17.531c11.594,0,30.25,14.281,46.719,26.828\r\n\t\tc22.703,17.359,46.172,35.297,70.906,35.297c45.484,0,70.766-34.406,71.812-35.844l-26.812-19.172\r\n\t\tC356.5,313.984,340.359,335.281,312.188,335.281z"},"children":[{"name":"path","attribs":{"d":"M312.188,335.281c-13.516,0-33.297-15.125-50.75-28.469c-21.656-16.547-44.062-33.656-66.875-33.656\r\n\t\tc-42.75,0-65.609,29.266-66.562,30.5l26.328,19.844c0.141-0.172,14.109-17.531,40.234-17.531c11.594,0,30.25,14.281,46.719,26.828\r\n\t\tc22.703,17.359,46.172,35.297,70.906,35.297c45.484,0,70.766-34.406,71.812-35.844l-26.812-19.172\r\n\t\tC356.5,313.984,340.359,335.281,312.188,335.281z"},"children":[]}]},{"name":"path","attribs":{"d":"M312.188,206.031c-13.516,0-33.297-15.125-50.75-28.477c-21.656-16.531-44.062-33.648-66.875-33.648\r\n\t\tc-42.75,0-65.609,29.266-66.562,30.516l26.328,19.836c0.141-0.18,14.109-17.539,40.234-17.539c11.594,0,30.25,14.266,46.719,26.844\r\n\t\tc22.703,17.344,46.172,35.281,70.906,35.281c45.484,0,70.766-34.391,71.812-35.844l-26.812-19.18\r\n\t\tC356.5,184.727,340.359,206.031,312.188,206.031z"},"children":[{"name":"path","attribs":{"d":"M312.188,206.031c-13.516,0-33.297-15.125-50.75-28.477c-21.656-16.531-44.062-33.648-66.875-33.648\r\n\t\tc-42.75,0-65.609,29.266-66.562,30.516l26.328,19.836c0.141-0.18,14.109-17.539,40.234-17.539c11.594,0,30.25,14.266,46.719,26.844\r\n\t\tc22.703,17.344,46.172,35.281,70.906,35.281c45.484,0,70.766-34.391,71.812-35.844l-26.812-19.18\r\n\t\tC356.5,184.727,340.359,206.031,312.188,206.031z"},"children":[]}]},{"name":"path","attribs":{"d":"M312.188,270.906c-13.516,0-33.297-15.141-50.75-28.469c-21.656-16.547-44.062-33.656-66.875-33.656\r\n\t\tc-42.75,0-65.609,29.266-66.562,30.5l26.328,19.844c0.141-0.188,14.109-17.531,40.234-17.531c11.594,0,30.25,14.266,46.719,26.844\r\n\t\tc22.703,17.344,46.172,35.281,70.906,35.281c45.484,0,70.766-34.406,71.812-35.844l-26.812-19.188\r\n\t\tC356.5,249.594,340.359,270.906,312.188,270.906z"},"children":[{"name":"path","attribs":{"d":"M312.188,270.906c-13.516,0-33.297-15.141-50.75-28.469c-21.656-16.547-44.062-33.656-66.875-33.656\r\n\t\tc-42.75,0-65.609,29.266-66.562,30.5l26.328,19.844c0.141-0.188,14.109-17.531,40.234-17.531c11.594,0,30.25,14.266,46.719,26.844\r\n\t\tc22.703,17.344,46.172,35.281,70.906,35.281c45.484,0,70.766-34.406,71.812-35.844l-26.812-19.188\r\n\t\tC356.5,249.594,340.359,270.906,312.188,270.906z"},"children":[]}]}]}]};
|
from oscar.core.loading import get_class
EventHandler = get_class('order.processing', 'EventHandler')
class EventHandlerMixin:
handler_class = EventHandler
def get_handler_class(self):
return self.handler_class
def get_handler(self, user=None, **kwargs):
handler_kwargs = self.get_handler_kwargs()
handler_kwargs.update(**kwargs)
return self.get_handler_class()(user, **handler_kwargs)
def get_handler_kwargs(self):
return {}
|
/*!
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
* Licensed under the MIT License.
*/
module.exports = {
"extends": [
require.resolve("@fluidframework/eslint-config-fluid")
],
"parserOptions": {
"project": [ "./tsconfig.json", "./src/test/mocha/tsconfig.json", "./src/test/jest/tsconfig.json", "./src/test/types/tsconfig.json" ]
},
"rules": {
}
}
|
from django.apps import AppConfig
class ContemplationConfig(AppConfig):
name = 'contemplation'
|
from torchio import Interpolation
from torchio.transforms import RandomElasticDeformation
from ...utils import TorchioTestCase
class TestRandomElasticDeformation(TorchioTestCase):
"""Tests for `RandomElasticDeformation`."""
def test_random_elastic_deformation(self):
transform = RandomElasticDeformation(
num_control_points=5,
max_displacement=(2, 3, 5), # half grid spacing is (3.3, 3.3, 5)
)
keys = ('t1', 't2', 'label')
fixtures = 2916.7192, 2955.1265, 2950
transformed = transform(self.sample_subject, seed=42)
for key, fixture in zip(keys, fixtures):
sample_data = self.sample_subject[key].numpy()
transformed_data = transformed[key].numpy()
transformed_total = transformed_data.sum()
# Make sure that intensities have changed
self.assertTensorNotEqual(sample_data, transformed_data)
self.assertAlmostEqual(transformed_total, fixture, places=4)
def test_inputs_pta_gt_one(self):
with self.assertRaises(ValueError):
RandomElasticDeformation(p=1.5)
def test_inputs_pta_lt_zero(self):
with self.assertRaises(ValueError):
RandomElasticDeformation(p=-1)
def test_inputs_interpolation_int(self):
with self.assertRaises(TypeError):
RandomElasticDeformation(image_interpolation=1)
def test_inputs_interpolation(self):
with self.assertWarns(FutureWarning):
RandomElasticDeformation(image_interpolation=Interpolation.LINEAR)
def test_num_control_points_noint(self):
with self.assertRaises(ValueError):
RandomElasticDeformation(num_control_points=2.5)
def test_num_control_points_small(self):
with self.assertRaises(ValueError):
RandomElasticDeformation(num_control_points=3)
def test_max_displacement_no_num(self):
with self.assertRaises(ValueError):
RandomElasticDeformation(max_displacement=None)
def test_max_displacement_negative(self):
with self.assertRaises(ValueError):
RandomElasticDeformation(max_displacement=-1)
def test_wrong_locked_borders(self):
with self.assertRaises(ValueError):
RandomElasticDeformation(locked_borders=-1)
def test_coarse_grid_removed(self):
with self.assertRaises(ValueError):
RandomElasticDeformation(
num_control_points=(4, 5, 6),
locked_borders=2,
)
def test_folding(self):
# Assume shape is (10, 20, 30) and spacing is (1, 1, 1)
# Then grid spacing is (10/(12-2), 20/(5-2), 30/(5-2))
# or (1, 6.7, 10), and half is (0.5, 3.3, 5)
transform = RandomElasticDeformation(
num_control_points=(12, 5, 5),
max_displacement=6,
)
with self.assertWarns(RuntimeWarning):
transform(self.sample_subject)
def test_num_control_points(self):
RandomElasticDeformation(num_control_points=5)
RandomElasticDeformation(num_control_points=(5, 6, 7))
def test_max_displacement(self):
RandomElasticDeformation(max_displacement=5)
RandomElasticDeformation(max_displacement=(5, 6, 7))
|
import hashlib
import json
import re
import fnmatch
from enum import Enum
import os
from os import listdir, makedirs
from os.path import dirname, isfile, join, realpath
import jsonschema
import yaml
from jinja2 import Environment, PackageLoader
from yaml import MarkedYAMLError
from binary import FixedEntryListTypes, FixedLengthTypes, FixedListTypes, FixedMapTypes
from cpp import cpp_ignore_service_list, cpp_types_decode, cpp_types_encode, get_size, is_trivial
from cs import cs_escape_keyword, cs_ignore_service_list, cs_types_decode, cs_types_encode
from java import java_types_decode, java_types_encode
from md import internal_services
from py import (
py_escape_keyword,
py_get_import_path_holders,
py_ignore_service_list,
py_param_name,
py_types_encode_decode,
py_custom_type_name,
)
from ts import (
ts_escape_keyword,
ts_get_import_path_holders,
ts_ignore_service_list,
ts_types_decode,
ts_types_encode,
)
MAJOR_VERSION_MULTIPLIER = 10000
MINOR_VERSION_MULTIPLIER = 100
PATCH_VERSION_MULTIPLIER = 1
def java_name(type_name):
return "".join([capital(part) for part in type_name.split("_")])
def cs_name(type_name):
return "".join(
[capital(part) for part in type_name.replace("(", "").replace(")", "").split("_")]
)
def cpp_name(type_name):
return "".join(
[capital(part) for part in type_name.replace("(", "").replace(")", "").split("_")]
)
def param_name(type_name):
return type_name[0].lower() + type_name[1:]
def is_fixed_type(param):
return param["type"] in FixedLengthTypes
def capital(txt):
return txt[0].capitalize() + txt[1:]
def to_upper_snake_case(camel_case_str):
return re.sub("((?<=[a-z0-9])[A-Z]|(?!^)[A-Z](?=[a-z]))", r"_\1", camel_case_str).upper()
# s1 = re.sub('(.)([A-Z]+[a-z]+)', r'\1_\2', camel_case_str)
# return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).upper()
def version_to_number(major, minor, patch=0):
return (
MAJOR_VERSION_MULTIPLIER * major
+ MINOR_VERSION_MULTIPLIER * minor
+ PATCH_VERSION_MULTIPLIER * patch
)
def get_version_as_number(version):
if not isinstance(version, str):
version = str(version)
return version_to_number(*map(int, version.split(".")))
def fixed_params(params):
return [p for p in params if is_fixed_type(p)]
def var_size_params(params):
return [p for p in params if not is_fixed_type(p)]
def new_params(since, params):
"""
Returns the list of parameters that are added later than given version.
Because the method should precede all the parameters that are added
latter, a simple equality check between the versions that the method and
the parameter is added is enough.
"""
return [p for p in params if p["since"] != since]
def filter_new_params(params, version):
"""
Returns the filtered list of parameters such that,
the resulting list contains only the ones that are added
before or at the same time with the given version.
"""
version_as_number = get_version_as_number(version)
return [p for p in params if version_as_number >= get_version_as_number(p["since"])]
def generate_codecs(services, template, output_dir, lang, env):
makedirs(output_dir, exist_ok=True)
id_fmt = "0x%02x%02x%02x"
if lang is SupportedLanguages.CPP:
curr_dir = dirname(realpath(__file__))
cpp_dir = "%s/cpp" % curr_dir
f = open(join(cpp_dir, "header_includes.txt"), "r")
save_file(join(output_dir, "codecs.h"), f.read(), "w")
f = open(join(cpp_dir, "source_header.txt"), "r")
save_file(join(output_dir, "codecs.cpp"), f.read(), "w")
for service in services:
if ignore_service(service, lang):
continue
if "methods" in service:
methods = service["methods"]
if methods is None:
raise NotImplementedError("Methods not found for service " + service)
for method in service["methods"]:
if ignore_method(service, method, lang):
continue
method["request"]["id"] = int(id_fmt % (service["id"], method["id"], 0), 16)
method["response"]["id"] = int(id_fmt % (service["id"], method["id"], 1), 16)
events = method.get("events", None)
if events is not None:
for i in range(len(events)):
method["events"][i]["id"] = int(
id_fmt % (service["id"], method["id"], i + 2), 16
)
codec_file_name = file_name_generators[lang](service["name"], method["name"])
try:
if lang is SupportedLanguages.CPP:
codec_template = env.get_template("codec-template.h.j2")
content = codec_template.render(service_name=service["name"], method=method)
save_file(join(output_dir, "codecs.h"), content, "a+")
codec_template = env.get_template("codec-template.cpp.j2")
content = codec_template.render(service_name=service["name"], method=method)
save_file(join(output_dir, "codecs.cpp"), content, "a+")
else:
content = template.render(service_name=service["name"], method=method)
save_file(join(output_dir, codec_file_name), content)
except NotImplementedError as e:
print("[%s] contains missing type mapping so ignoring it. Error: %s" % (codec_file_name, e))
if lang is SupportedLanguages.CPP:
f = open(join(cpp_dir, "footer.txt"), "r")
content = f.read()
save_file(join(output_dir, "codecs.h"), content, "a+")
save_file(join(output_dir, "codecs.cpp"), content, "a+")
def generate_custom_codecs(services, template, output_dir, lang, env):
makedirs(output_dir, exist_ok=True)
if lang == SupportedLanguages.CPP:
cpp_header_template = env.get_template("custom-codec-template.h.j2")
cpp_source_template = env.get_template("custom-codec-template.cpp.j2")
for service in services:
if "customTypes" in service:
custom_types = service["customTypes"]
for codec in custom_types:
if ignore_service(codec, lang):
continue
try:
if lang == SupportedLanguages.CPP:
file_name_prefix = codec["name"].lower() + "_codec"
header_file_name = file_name_prefix + ".h"
source_file_name = file_name_prefix + ".cpp"
codec_file_name = header_file_name
content = cpp_header_template.render(codec=codec)
save_file(join(output_dir, header_file_name), content)
codec_file_name = source_file_name
content = cpp_source_template.render(codec=codec)
save_file(join(output_dir, source_file_name), content)
else:
codec_file_name = file_name_generators[lang](codec["name"])
content = template.render(codec=codec)
save_file(join(output_dir, codec_file_name), content)
except NotImplementedError:
print("[%s] contains missing type mapping so ignoring it." % codec_file_name)
def generate_documentation(services, custom_definitions, template, output_dir):
makedirs(output_dir, exist_ok=True)
content = template.render(
services=list(filter(lambda s: s["name"] not in internal_services, services)),
custom_definitions=custom_definitions,
)
file_name = join(output_dir, "documentation.md")
with open(file_name, "w", newline="\n") as file:
file.writelines(content)
def item_type(lang_name, param_type):
if param_type.startswith("List_") or param_type.startswith("ListCN_"):
return lang_name(param_type.split("_", 1)[1])
def key_type(lang_name, param_type):
return lang_name(param_type.split("_", 2)[1])
def value_type(lang_name, param_type):
return lang_name(param_type.split("_", 2)[2])
def is_var_sized_list(param_type):
return param_type.startswith("List_") and param_type not in FixedListTypes
def is_var_sized_list_contains_nullable(param_type):
return param_type.startswith("ListCN_") and param_type not in FixedListTypes
def is_var_sized_map(param_type):
return param_type.startswith("Map_") and param_type not in FixedMapTypes
def is_var_sized_entry_list(param_type):
return param_type.startswith("EntryList_") and param_type not in FixedEntryListTypes
def load_services(protocol_def_dir):
service_list = listdir(protocol_def_dir)
services = []
for service_file in service_list:
file_path = join(protocol_def_dir, service_file)
if isfile(file_path):
with open(file_path, "r") as file:
try:
data = yaml.load(file, Loader=yaml.Loader)
except MarkedYAMLError as err:
print(err)
exit(-1)
services.append(data)
return services
def validate_services(services, schema_path, no_id_check, protocol_versions):
valid = True
with open(schema_path, "r") as schema_file:
schema = json.load(schema_file)
for i in range(len(services)):
service = services[i]
if not validate_against_schema(service, schema):
return False
if not no_id_check:
# Validate id ordering of services.
service_id = service["id"]
if i != service_id:
print(
"Check the service id of the %s. Expected: %s, found: %s."
% (service["name"], i, service_id)
)
valid = False
# Validate id ordering of definition methods.
methods = service["methods"]
for j in range(len(methods)):
method = methods[j]
method_id = method["id"]
if (j + 1) != method_id:
print(
"Check the method id of %s#%s. Expected: %s, found: %s"
% (service["name"], method["name"], (j + 1), method_id)
)
valid = False
request_params = method["request"].get("params", [])
method_name = service["name"] + "#" + method["name"]
if not is_parameters_ordered_and_semantically_correct(
method["since"], method_name + "#request", request_params, protocol_versions
):
valid = False
response_params = method["response"].get("params", [])
if not is_parameters_ordered_and_semantically_correct(
method["since"],
method_name + "#response",
response_params,
protocol_versions,
):
valid = False
events = method.get("events", [])
for event in events:
event_params = event.get("params", [])
if not is_parameters_ordered_and_semantically_correct(
event["since"],
method_name + "#" + event["name"] + "#event",
event_params,
protocol_versions,
):
valid = False
return valid
def is_semantically_correct_param(version, protocol_versions):
is_semantically_correct = True
if version != protocol_versions[0]:
# Not 2.0
if version % MINOR_VERSION_MULTIPLIER == 0:
# Minor version
if (version - MINOR_VERSION_MULTIPLIER) not in protocol_versions:
# since is set to 2.x but 2.(x-1) is not in the protocol definitions
is_semantically_correct = False
elif version % PATCH_VERSION_MULTIPLIER == 0:
# Patch version
if (version - PATCH_VERSION_MULTIPLIER) not in protocol_versions:
# since is set to 2.x.y but 2.x.(y-1) is not in the protocol definitions
is_semantically_correct = False
return is_semantically_correct
def is_parameters_ordered_and_semantically_correct(since, name, params, protocol_versions):
is_ordered = True
is_semantically_correct = True
version = get_version_as_number(since)
if not is_semantically_correct_param(version, protocol_versions):
method_or_event_name = name[: name.rindex("#")]
print(
'Check the since value of the "%s"\n'
'It is set to version "%s" but this protocol version does '
"not semantically follow other protocol versions!" % (method_or_event_name, since)
)
is_semantically_correct = False
for param in params:
param_version = get_version_as_number(param["since"])
if not is_semantically_correct_param(param_version, protocol_versions):
print(
'Check the since value of "%s" field of the "%s".\n'
'It is set version "%s" but this protocol version does '
"not semantically follow other protocol versions!"
% (param["name"], name, param["since"])
)
is_semantically_correct = False
if version > param_version:
print(
'Check the since value of "%s" field of the "%s".\n'
"Parameters should be in the increasing order of since values!"
% (param["name"], name)
)
is_ordered = False
version = param_version
return is_ordered and is_semantically_correct
def validate_custom_protocol_definitions(definition, schema_path, protocol_versions):
valid = True
with open(schema_path, "r") as schema_file:
schema = json.load(schema_file)
custom_types = definition[0]
if not validate_against_schema(custom_types, schema):
return False
for custom_type in custom_types["customTypes"]:
params = custom_type.get("params", [])
if not is_parameters_ordered_and_semantically_correct(
custom_type["since"], "CustomTypes#" + custom_type["name"], params, protocol_versions
):
valid = False
return valid
def validate_against_schema(service, schema):
try:
jsonschema.validate(service, schema)
except jsonschema.ValidationError as e:
print("Validation error on %s: %s" % (service.get("name", None), e))
return False
return True
def save_file(file, content, mode="w"):
if file.endswith(".cs"):
content = content.replace("\r\n", "\n") # crlf -> lf
content = content.replace("\r", "\n") # cr -> lf
content = re.sub("[ \t]+$", "", content, 0, re.M)
content = content.rstrip("\n") # trim all trailing lf
content = content + "\n" # append one single trailing lf
m = hashlib.md5()
m.update(content.encode("utf-8"))
codec_hash = m.hexdigest()
with open(file, mode, newline=os.linesep) as file:
file.writelines(content.replace("!codec_hash!", codec_hash))
def get_protocol_versions(protocol_defs, custom_codec_defs):
protocol_versions = set()
if not custom_codec_defs:
custom_codec_defs = []
else:
custom_codec_defs = custom_codec_defs[0]["customTypes"]
for service in protocol_defs:
for method in service["methods"]:
protocol_versions.add(method["since"])
for req_param in method["request"].get("params", []):
protocol_versions.add(req_param["since"])
for res_param in method["response"].get("params", []):
protocol_versions.add(res_param["since"])
for event in method.get("events", []):
protocol_versions.add(event["since"])
for event_param in event.get("params", []):
protocol_versions.add(event_param["since"])
for custom_codec in custom_codec_defs:
protocol_versions.add(custom_codec["since"])
for param in custom_codec.get("params", []):
protocol_versions.add(param["since"])
return map(str, protocol_versions)
class SupportedLanguages(Enum):
JAVA = "java"
CPP = "cpp"
CS = "cs"
PY = "py"
TS = "ts"
# GO = 'go'
MD = "md"
codec_output_directories = {
SupportedLanguages.JAVA: "hazelcast/src/main/java/com/hazelcast/client/impl/protocol/codec/",
SupportedLanguages.CPP: "hazelcast/generated-sources/src/hazelcast/client/protocol/codec/",
SupportedLanguages.CS: "src/Hazelcast.Net/Protocol/Codecs/",
SupportedLanguages.PY: "hazelcast/protocol/codec/",
SupportedLanguages.TS: "src/codec/",
# SupportedLanguages.GO: 'internal/proto/'
SupportedLanguages.MD: "documentation",
}
custom_codec_output_directories = {
SupportedLanguages.JAVA: "hazelcast/src/main/java/com/hazelcast/client/impl/protocol/codec/custom/",
SupportedLanguages.CPP: "hazelcast/generated-sources/src/hazelcast/client/protocol/codec/",
SupportedLanguages.CS: "src/Hazelcast.Net/Protocol/CustomCodecs/",
SupportedLanguages.PY: "hazelcast/protocol/codec/custom/",
SupportedLanguages.TS: "src/codec/custom",
# SupportedLanguages.GO: 'internal/proto/'
}
def _capitalized_name_generator(extension):
def inner(*names):
return "%sCodec.%s" % ("".join(map(capital, names)), extension)
return inner
def _snake_cased_name_generator(extension):
def inner(*names):
return "%s_codec.%s" % ("_".join(map(py_param_name, names)), extension)
return inner
file_name_generators = {
SupportedLanguages.JAVA: _capitalized_name_generator("java"),
SupportedLanguages.CPP: _snake_cased_name_generator("cpp"),
SupportedLanguages.CS: _capitalized_name_generator("cs"),
SupportedLanguages.PY: _snake_cased_name_generator("py"),
SupportedLanguages.TS: _capitalized_name_generator("ts"),
# SupportedLanguages.GO: 'go'
SupportedLanguages.MD: "md",
}
language_specific_funcs = {
"lang_types_encode": {
SupportedLanguages.JAVA: java_types_encode,
SupportedLanguages.CS: cs_types_encode,
SupportedLanguages.CPP: cpp_types_encode,
SupportedLanguages.TS: ts_types_encode,
SupportedLanguages.PY: py_types_encode_decode,
SupportedLanguages.MD: lambda x: x,
},
"lang_types_decode": {
SupportedLanguages.JAVA: java_types_decode,
SupportedLanguages.CS: cs_types_decode,
SupportedLanguages.CPP: cpp_types_decode,
SupportedLanguages.TS: ts_types_decode,
SupportedLanguages.PY: py_types_encode_decode,
SupportedLanguages.MD: lambda x: x,
},
"lang_name": {
SupportedLanguages.JAVA: java_name,
SupportedLanguages.CS: cs_name,
SupportedLanguages.CPP: cpp_name,
SupportedLanguages.TS: java_name,
SupportedLanguages.PY: java_name,
SupportedLanguages.MD: lambda x: x,
},
"param_name": {
SupportedLanguages.JAVA: param_name,
SupportedLanguages.CS: param_name,
SupportedLanguages.CPP: param_name,
SupportedLanguages.TS: param_name,
SupportedLanguages.PY: py_param_name,
SupportedLanguages.MD: lambda x: x,
},
"escape_keyword": {
SupportedLanguages.JAVA: lambda x: x,
SupportedLanguages.CS: cs_escape_keyword,
SupportedLanguages.CPP: lambda x: x,
SupportedLanguages.TS: ts_escape_keyword,
SupportedLanguages.PY: py_escape_keyword,
SupportedLanguages.MD: lambda x: x,
},
"get_import_path_holders": {
SupportedLanguages.JAVA: lambda x: x,
SupportedLanguages.CS: lambda x: x,
SupportedLanguages.CPP: lambda x: x,
SupportedLanguages.TS: ts_get_import_path_holders,
SupportedLanguages.PY: py_get_import_path_holders,
SupportedLanguages.MD: lambda x: x,
},
"custom_type_name": {
SupportedLanguages.JAVA: lambda x: x,
SupportedLanguages.CS: lambda x: x,
SupportedLanguages.CPP: lambda x: x,
SupportedLanguages.TS: lambda x: x,
SupportedLanguages.PY: py_custom_type_name,
SupportedLanguages.MD: lambda x: x,
}
}
language_service_ignore_list = {
SupportedLanguages.JAVA: set(),
SupportedLanguages.CPP: cpp_ignore_service_list,
SupportedLanguages.CS: cs_ignore_service_list,
SupportedLanguages.PY: py_ignore_service_list,
SupportedLanguages.TS: ts_ignore_service_list,
# SupportedLanguages.GO: set()
}
def ignore_service(service, lang):
name = service["name"]
return ignore_service_or_method(name, lang)
def ignore_method(service, method, lang):
name = service["name"] + "." + method["name"]
return ignore_service_or_method(name, lang)
def ignore_service_or_method(name, lang):
patterns = language_service_ignore_list[lang]
for pattern in patterns:
if fnmatch.fnmatch(name, pattern):
print("[%s] is in ignore list so ignoring it." % name)
return True
return False
def create_environment(lang, namespace):
env = Environment(
loader=PackageLoader(lang.value, "."),
extensions=["jinja2.ext.do", "jinja2.ext.loopcontrols"],
)
env.trim_blocks = True
env.lstrip_blocks = True
env.keep_trailing_newline = False
env.filters["capital"] = capital
env.globals["to_upper_snake_case"] = to_upper_snake_case
env.globals["fixed_params"] = fixed_params
env.globals["var_size_params"] = var_size_params
env.globals["new_params"] = new_params
env.globals["filter_new_params"] = filter_new_params
env.globals["is_var_sized_list"] = is_var_sized_list
env.globals["is_var_sized_list_contains_nullable"] = is_var_sized_list_contains_nullable
env.globals["is_var_sized_entry_list"] = is_var_sized_entry_list
env.globals["is_var_sized_map"] = is_var_sized_map
env.globals["item_type"] = item_type
env.globals["key_type"] = key_type
env.globals["value_type"] = value_type
env.globals["namespace"] = namespace
env.globals["lang_types_encode"] = language_specific_funcs["lang_types_encode"][lang]
env.globals["lang_types_decode"] = language_specific_funcs["lang_types_decode"][lang]
env.globals["lang_name"] = language_specific_funcs["lang_name"][lang]
env.globals["param_name"] = language_specific_funcs["param_name"][lang]
env.globals["escape_keyword"] = language_specific_funcs["escape_keyword"][lang]
env.globals["custom_type_name"] = language_specific_funcs["custom_type_name"][lang]
env.globals["get_size"] = get_size
env.globals["is_trivial"] = is_trivial
env.globals["get_import_path_holders"] = language_specific_funcs["get_import_path_holders"][
lang
]
return env
|
/*-
* Copyright (c) 1997 Berkeley Software Design, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Berkeley Software Design Inc's name may not be used to endorse or
* promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY BERKELEY SOFTWARE DESIGN INC ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL BERKELEY SOFTWARE DESIGN INC BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* from: BSDI: pmap.v9.h,v 1.10.2.6 1999/08/23 22:18:44 cp Exp
* $FreeBSD: soc2013/dpl/head/sys/sparc64/include/tsb.h 223543 2011-06-21 20:48:14Z marius $
*/
#ifndef _MACHINE_TSB_H_
#define _MACHINE_TSB_H_
#define TSB_PAGES_SHIFT (4)
#define TSB_PAGES (1 << TSB_PAGES_SHIFT)
#define TSB_BSHIFT (TSB_PAGES_SHIFT + PAGE_SHIFT)
#define TSB_BSIZE (1 << TSB_BSHIFT)
#define TSB_BUCKET_SHIFT (2)
#define TSB_BUCKET_SIZE (1 << TSB_BUCKET_SHIFT)
#define TSB_BUCKET_ADDRESS_BITS \
(TSB_BSHIFT - TSB_BUCKET_SHIFT - TTE_SHIFT)
#define TSB_BUCKET_MASK ((1 << TSB_BUCKET_ADDRESS_BITS) - 1)
#ifndef LOCORE
#define TSB_SIZE (TSB_BSIZE / sizeof(struct tte))
extern struct tte *tsb_kernel;
extern vm_size_t tsb_kernel_mask;
extern vm_size_t tsb_kernel_size;
extern vm_paddr_t tsb_kernel_phys;
static __inline struct tte *
tsb_vpntobucket(pmap_t pm, vm_offset_t vpn)
{
return (&pm->pm_tsb[(vpn & TSB_BUCKET_MASK) << TSB_BUCKET_SHIFT]);
}
static __inline struct tte *
tsb_vtobucket(pmap_t pm, u_long sz, vm_offset_t va)
{
return (tsb_vpntobucket(pm, va >> TTE_PAGE_SHIFT(sz)));
}
static __inline struct tte *
tsb_kvpntotte(vm_offset_t vpn)
{
return (&tsb_kernel[vpn & tsb_kernel_mask]);
}
static __inline struct tte *
tsb_kvtotte(vm_offset_t va)
{
return (tsb_kvpntotte(va >> PAGE_SHIFT));
}
typedef int (tsb_callback_t)(struct pmap *, struct pmap *, struct tte *,
vm_offset_t);
struct tte *tsb_tte_lookup(pmap_t pm, vm_offset_t va);
void tsb_tte_remove(struct tte *stp);
struct tte *tsb_tte_enter(pmap_t pm, vm_page_t m, vm_offset_t va, u_long sz,
u_long data);
void tsb_tte_local_remove(struct tte *tp);
void tsb_foreach(pmap_t pm1, pmap_t pm2, vm_offset_t start, vm_offset_t end,
tsb_callback_t *callback);
#endif /* !LOCORE */
#endif /* !_MACHINE_TSB_H_ */
|
function PT_typeahead()
{}
PT_typeahead.prototype = {
init:function(oWin,oDoc,oForm,url_up,url_dn,url_close,nDelayTime){
this.oWin = oWin;
this.oDoc = oDoc;
this.oForm = oForm;
this.url_up = url_up;
this.url_dn = url_dn;
this.url_close = url_close;
this.arrOptions=new Array();
this.arrHeaders=new Array();
this.arrMatches=new Array();
this.strLastValue="";
this.bMadeRequest;
this.theTextBox=null;
this.objLastActive;
this.currentValueSelected=-2;
this.bNoResults = false;
this.nDelayTime=nDelayTime;
this.isDelayTiming =true;
this.isTiming =true;
this.isOpera=(navigator.userAgent.toLowerCase().indexOf('opera')!=-1);
this.countForId=0;
this.currentTotalRow=0; //789561
this.startPos=0;
this.maxRange=3; // number of items to be displayed in the typeahead list per page
this.ndisplay=1; // 1 - display below the typeahead item; 0 - display above the typeahead item
this.bScrolldownImage=0; // 1- scrolldown image tag included; 0 - no scrolldown image tag included
this.bStartNewList = 0; // 1 - start a new typeahead list; 0 - NOT start a new typeahead list
this.promptWidth=0;
this.opValue=-1;
this.bodyScrollTop=0;
this.bodyScrollLeft=0;
this.noMatchingDataMessage = "No matching values were found.";
this.undeStart="<span class='spanMatchText'>";
this.undeEnd="</span>";
this.selectSpanStart="<span style='width:100%;display:block' class='spanNormalElement' onmouseover='ptTAObj_win0.SetHighColor(this)' ";
this.selectSpanEnd='</span>';
this.tableStart="<table class='PSSRCHRESULTSTITLE' id='ttable' dir=\'"+'ltr'+"' cellpadding='1' cellspacing='0'>";
this.tableEnd="</table>";
this.trStart="<tr align=\'"+'left'+"\'>";
this.trEnd="</tr>";
this.tdScrollStart="<td class='PSSRCHRESULTSEVENROW' align='center' colspan='";
this.tdODDStart="<td class='PSSRCHRESULTSODDROW' nowrap='nowrap'>";
this.tdEVENStart="<td class='PSSRCHRESULTSEVENROW' nowrap='nowrap'>";
this.tdEnd="</td>";
this.thStart="<th scope='col' class='PSTARESULTSHDR' nowrap='nowrap'><span class='PSTARESULTSHDR'>";
this.thEnd="</span></th>";
this.header="<tr align=\'"+'left'+"\'><th scope='col' class='PSTARESULTSHDR' ><span class='PSTARESULTSHDRR' name='#ICSortCol0'>User ID</span></th><th scope='col' class='PSTARESULTSHDR' ><span class='PSTARESULTSHDR' name='#ICSortCol1'>Description</span></th></tr>";
this.bTabPressed = false;
this.bKeyUp = false;
this.bKeyDown = false;
this.UnsupportedKeycode = '[?)(|}{]';
this.SpecialKeycode = '*+';
this.bFoundSpecialKeycode = false;
this.lastIntKey = -1;
this.bGrabHighlighted = false;
this.bInitialOnBlur = true;
this.typeAheadProcessedValue = "";
this.currentTypeAheadField = "";
this.bStaledResult = false;
this.bLostFocus = true;
this.bInProcess = false;
this.BACKSPACE = 8;
this.TAB = 9;
this.ENTER = 13;
this.SHIFT = 16;
this.CTRL = 17;
this.CAPLOCK = 20;
this.ESCAPE = 27;
this.END = 35;
this.LEFTARROW = 37;
this.UPARROW = 38;
this.RIGHTARROW = 39;
this.DOWNARROW = 40;
this.EQUALSIGN = 187;
this.FORWARDSLASH = 191;
this.OPENBRACKET = 219;
this.BACKSLASH = 220;
this.CLOSEBRACKET = 221;
var ptObj = oDoc.getElementById("pt_typeahead0");
if (ptObj)
ptObj.style.display = 'none';
//ptConsole2.enable();
},
resetTextBox:function(theTextBox){
this.theTextBox=theTextBox;
},
OnPromptLaunch:function(oDoc) {
if (!oDoc || typeof oDoc == 'undefined') return;
el=oDoc.getElementById('pt_typeahead0');
if (el && typeof el != 'undefined')
el.innerHTML="<span id='pt_typeahead' class='spanTextDropdown'></span>";
},
SetProperties:function(xElem, xColNum, xHidden,xserverCode,
xignoreCase,xmatchAnywhere,xmatchTextBoxWidth,
xshowNoMatchMessage,xuseTimeout,xtheVisibleTime)
{
var props={
elem:xElem,
colnum:xColNum,
hidden:xHidden,
serverCode:xserverCode,
regExFlags: ( (xignoreCase)?"i":""),
regExAny:((xmatchAnywhere)?"":"^"), //768087
matchAnywhere:xmatchAnywhere,
matchTextBoxWidth:xmatchTextBoxWidth,
theVisibleTime:xtheVisibleTime,
showNoMatchMessage:xshowNoMatchMessage,
useTimeout:xuseTimeout
};
this.AddHandler(xElem);
return props;
},
AddHandler:function(objText){
objText.onblur=function(){
ptTAObj_win0.bLostFocus = true;
if(this.obj.useTimeout) {
if (!browserInfoObj2.isSafari || !ptTAObj_win0.bInitialOnBlur)
ptTAObj_win0.StartTimeout();
else if (ptTAObj_win0.bInitialOnBlur)
ptTAObj_win0.bInitialOnBlur = false;
}
}
},
KeyUpDown:function(e) {
if (typeof ptTAObj_win0.oWin == 'undefined')
return;
this.bTabPressed = false;
this.bKeyUp = false;
this.bKeyDown = false;
var intKey=-1;
if (this.theTextBox)
addchg_win0(this.theTextBox);
if (ptTAObj_win0.oWin.event)
intKey=ptTAObj_win0.oWin.event.keyCode;
else
intKey = e.which;
if (intKey == this.CTRL) //ignore ctl\
return true;
if(intKey==this.UPARROW){
this.bKeyUp = true;
ptTAObj_win0.MoveHighlight(-1);
ptTAObj_win0.GrabHighlighted();
return true;
}
else if(intKey==this.DOWNARROW){
this.bKeyDown = true;
ptTAObj_win0.MoveHighlight(1);
ptTAObj_win0.GrabHighlighted();
return true;
}
else if(intKey==this.ESCAPE) {
ptTAObj_win0.HideTheBox(); //ICE#1850813000
return true;
}
else if(intKey==this.TAB) {
this.bTabPressed = true; //ICE#1858794000
ptTAObj_win0.HideTheBox();
if (this.theTextBox != null) {
var thisObj = this.theTextBox.attributes.getNamedItem('onchange');
if (thisObj != null && thisObj.nodeValue != null)
this.theTextBox.onchange();
}
return true;
}
return false;
},
GiveOptions:function(e) {
if (typeof ptTAObj_win0.oWin == 'undefined')
return;
var intKey=-1;
if (ptTAObj_win0.oWin.event) {
intKey=ptTAObj_win0.oWin.event.keyCode;
this.theTextBox=ptTAObj_win0.oWin.event.srcElement;
}
else{
intKey = e.which;
this.theTextBox = e.target;
}
if (intKey == this.CTRL || intKey == this.TAB) {
this.lastIntKey = intKey;
return true;
}
if (intKey == this.SHIFT || intKey == this.END) {
this.lastIntKey = intKey;
return true;
}
if (ptTAObj_win0.CancelTypeAhead(this.theTextBox)) return false;
if (intKey == this.BACKSPACE || this.lastIntKey != this.BACKSPACE) {
ptTAObj_win0.EraseDelayTimeout();
}
if ((intKey == this.SHIFT && this.lastIntKey == this.TAB) ||
(intKey == this.SHIFT && this.lastIntKey == this.SHIFT)) {
this.lastIntKey = intKey;
return false;
}
this.lastIntKey = intKey;
if((intKey>=this.LEFTARROW && intKey<=this.DOWNARROW)) {
return false;
}
if (intKey==48||intKey==57||intKey==this.EQUALSIGN||
intKey==this.FORWARDSLASH||intKey==this.OPENBRACKET || intKey==this.BACKSLASH ||intKey==this.CLOSEBRACKET ) {
var regE = new RegExp(this.UnsupportedKeycode,this.theTextBox.obj.regExFlags);
this.theTextBox.value=this.theTextBox.value.replace(regE,'');
this.theTextBox.value=this.theTextBox.value.replace(']','');
//this.theTextBox.value=this.theTextBox.value.replace('\\','');
this.theTextBox.value=this.theTextBox.value.replace('[','');
}
ptTAObj_win0.resetTextBox(this.theTextBox);
if(this.theTextBox.value.length==0&&!this.isOpera){
ptTAObj_win0.arrOptions=new Array();
ptTAObj_win0.HideTheBox();
ptTAObj_win0.strLastValue='';
}
if(this.objLastActive==this.theTextBox){
if(intKey==this.ENTER){
ptTAObj_win0.GrabHighlighted();
this.theTextBox.blur();
}
}
if (this.theTextBox.value.length==0)
ptTAObj_win0.HideTheBox();
else {
if ( ptTAObj_win0.bInProcess || (this.objLastActive!=this.theTextBox) ||
((this.theTextBox.value.length!=0) && (this.theTextBox.value.length > ptTAObj_win0.strLastValue.length)) ||
(this.theTextBox.value.indexOf(ptTAObj_win0.strLastValue)!=0) ||
(ptTAObj_win0.arrOptions.length==0 && !this.bNoResults) ||
(this.theTextBox.value.length <= ptTAObj_win0.strLastValue.length) ) {
ptTAObj_win0.StartDelayTimeout();
} else {
if (this.theTextBox.obj.nMaxRows==ptTAObj_win0.arrOptions.length)
ptTAObj_win0.DoTypeAhead();
else {
ptTAObj_win0.BuildList(this.theTextBox.value);
}
}
}
return true;
},
DoTypeAhead:function(){
if ((ptTAObj_win0.arrOptions.length > 0 && !this.bNoResults)
&& (this.objLastActive == null || this.objLastActive.id == this.theTextBox.id)
&& this.theTextBox.value.indexOf(ptTAObj_win0.strLastValue) == 0
) // LOCAL MATCH
{
var bShowMatch = this.theTextBox.obj.showNoMatchMessage;
this.theTextBox.obj.showNoMatchMessage = false;
ptTAObj_win0.BuildList(this.theTextBox.value);
this.theTextBox.obj.showNoMatchMessage = bShowMatch;
if (!this.bNoResults) {
ptTAObj_win0.strLastValue=this.theTextBox.value;
return;
}
}
if (ptTAObj_win0.theTextBox.value.length==0 || typeof ptTAObj_win0.theTextBox.value == "undefined") //791953
ptTAObj_win0.HideTheBox();
else {
ptTAObj_win0.bMadeRequest=true;
ptTAObj_win0.bInProcess = true;
ptTAObj_win0.TypeAhead(ptTAObj_win0.theTextBox.value);
ptTAObj_win0.objLastActive=ptTAObj_win0.theTextBox;
ptTAObj_win0.bInProcess = false;
}
ptTAObj_win0.strLastValue=this.theTextBox.value;
},
TypeAhead:function(xStrText){
if (this.CheckSpecialKeycode(xStrText))
this.bFoundSpecialKeycode = true;
ptTAObj_win0.SetOpValue(this.theTextBox);
this.theTextBox.obj.hidden.value=this.theTextBox.name;
this.bLostFocus = false;
eval(this.theTextBox.obj.serverCode);
ptTAObj_win0.RestoreOpValue(this.theTextBox);
this.bInitialOnBlur = true;
},
buildChoices:function(){
this.oWin.gFocusId = this.theTextBox.id;
if (typeof this.oWin.modWin != 'undefined' && this.oWin.modWin != null) {
return;
}
if (this.bLostFocus) {
return;
}
this.bStartNewList = 1;
if (this.RestoreTextBox())
{
this.BuildList(ptTAObj_win0.strLastValue.replace(/\\/g,'\\\\'));
bMadeReqiest = false;
this.startPos = 0;
this.bFoundSpecialKeycode = false;
}
},
RestoreTextBox:function(){
var tempColNum = this.theTextBox.obj.colnum;
var tempMaxRows = this.theTextBox.obj.nMaxRows;
this.theTextBox = document.getElementById(this.theTextBox.id);
if (this.theTextBox == null || typeof this.theTextBox.name == "undefined")
return false;
else {
tryFocus(this.theTextBox);
this.theTextBox.value = this.theTextBox.value;
if (!this.theTextBox.obj)
initTypeAheadEl(this.theTextBox);
this.theTextBox.obj.colnum = tempColNum;
this.theTextBox.obj.nMaxRows = tempMaxRows;
var thisObj = this.theTextBox.attributes.getNamedItem('onchange');
if (thisObj != null && thisObj.nodeValue != null) {
this.theTextBox.onchange();
}
return true;
}
},
EscapeHTMLSymbol:function(theText) {
//for bug 14014957, fix common escape/decode issue
theText = theText.replace(/&/gi,'&').replace(/'/gi, ''').replace(/</gi,'<').replace(/>/gi,'>').replace(/%/,'%').replace(/ /gi, ' ');
theText = theText.replace(/"/gi,""") // " just to close the quote in replace
return theText;
},
TAFieldHasFocus:function() {
var bTAFieldHasFocus = false;
if (typeof PFieldList_win0!='undefined' && PFieldList_win0) {
for (var i = 0; i < PFieldList_win0.length; i++) {
var fname = PFieldList_win0[i][0];
var nStop = PFieldList_win0[i][1];
for (var j=0; j<nStop; j++) {
var name = fname;
var nsuffix = "";
if (nStop>1) {
nsuffix = '$'+j;
name = fname+nsuffix;
} else if (ptTAObj_win0.oDoc.getElementById(fname+'$'+j)) {
nsuffix = '$'+j;
name = fname+nsuffix;
}
var el = ptTAObj_win0.oDoc.getElementById(name);
if (el && el.getAttribute("focus") == "true") {
bTAFieldHasFocus = true;
return bTAFieldHasFocus;
}
}
}
}
if (bTAFieldHasFocus)
return bTAFieldHasFocus;
if (typeof EFieldList_win0!='undefined' && EFieldList_win0) {
for (var i = 0; i < EFieldList_win0.length; i++) {
var fname = EFieldList_win0[i][0];
var nStop = EFieldList_win0[i][1];
for (var j=0; j<nStop; j++) {
var name = fname;
var nsuffix = "";
if (nStop>1) {
nsuffix = '$'+j;
name = fname+nsuffix;
} else if (ptTAObj_win0.oDoc.getElementById(fname+'$'+j)) {
nsuffix = '$'+j;
name = fname+nsuffix;
}
var el = ptTAObj_win0.oDoc.getElementById(name);
if (el && el.getAttribute("focus") == "true") {
bTAFieldHasFocus = true;
return bTAFieldHasFocus;
}
}
}
}
return bTAFieldHasFocus;
},
SetProcessedTypeAheadValue:function(theText) {
this.typeAheadProcessedValue = theText;
this.bStaledResult = false;
this.currentTypeAheadField = document.getElementById(this.theTextBox.id);
if ( this.typeAheadProcessedValue == '' ||
this.typeAheadProcessedValue != this.EscapeHTMLSymbol(this.currentTypeAheadField.value) ) {
this.bStaledResult = true;
}
},
SetMaxRange:function(theTextBoxInt,nMatchLength) {
var selectedPosX=0;
var selectedPosY=0;
var theElement=theTextBoxInt;
if(!theElement)
return;
var theElemHeight=theElement.offsetHeight;
var divgbr = null;
var divgbrId = null;
var divgblr = null;
var divgblrId = null;
this.maxRange=3;
var XYposition = ptCommonObj2.getPosition2(theElement, "win0");
selectedPosY= XYposition.y;
selectedPosX= XYposition.x;
var viewportHeight = ptCommonObj2.getViewportHeight();
var nBelHeightLeft = viewportHeight + document.body.scrollTop - (selectedPosY+theElemHeight); // space below typeahead item
var nAbvHeightLeft = viewportHeight - (nBelHeightLeft+theElemHeight); // space above typeahead item
var nMinHeight = theElemHeight*3; // one row to up scroll, one row for heading, one row for down scroll
var nBelMaxRange = Math.floor((nBelHeightLeft - nMinHeight)/theElemHeight);
var nAbvMaxRange = Math.floor((nAbvHeightLeft - nMinHeight)/theElemHeight);
if (nBelMaxRange >= nMatchLength || nBelMaxRange >= this.maxRange)
{
if (nBelMaxRange >= nMatchLength)
this.maxRange = nMatchLength;
else
this.maxRange = nBelMaxRange;
this.ndisplay = 1; // display below item
return {x:selectedPosX, y:(selectedPosY+theElemHeight)};
}
else if (nAbvMaxRange>= nMatchLength || nAbvMaxRange >= this.maxRange)
{
if (nAbvMaxRange >= nMatchLength)
this.maxRange = nMatchLength;
else
this.maxRange = nAbvMaxRange;
this.ndisplay = 0; // display above item
return {x:selectedPosX, y:selectedPosY};
}
else if (nBelMaxRange > nAbvMaxRange && nBelMaxRange > 0)
{
this.maxRange = nBelMaxRange;
this.ndisplay = 1; // display below item
return {x:selectedPosX, y:(selectedPosY+theElemHeight)};
}
else if (nAbvMaxRange > 0)
{
this.maxRange = nAbvMaxRange;
this.ndisplay = 0; // display above item
return {x:selectedPosX, y:selectedPosY};
}
else
{
this.maxRange = 1;
this.ndisplay = 1; // display below item
return {x:selectedPosX, y:(selectedPosY+theElemHeight)};
}
},
BuildList:function(theText){
if (this.bTabPressed) {
this.bTabPressed = false;
return;
}
if (this.bStaledResult) {
return;
}
var theElemWidth=this.theTextBox.offsetWidth;
var theMatches = null;
var matchGrid = null;
var xPosElement = ptTAObj_win0.oDoc.getElementById("pt_typeahead");
this.SetMatchesArr(theText);
var mLengthA= ptTAObj_win0.arrMatches.length;
var boxPos = this.SetMaxRange(this.theTextBox,mLengthA); // set maximum number of list items and position of the list
theMatches = this.MakeMatchesArr(theText);
if(theMatches.length>0)
matchGrid=this.CreateGrid(theMatches,mLengthA);
if (matchGrid) {
xPosElement.innerHTML=matchGrid;
ptTAObj_win0.oDoc.getElementById("OptionsList_0").className="spanNormalElement";
this.currentValueSelected=-1;
this.bNoResults=false;
if (this.ndisplay == 0) { // display typeahead box above the typeahead item
if (this.bStartNewList) {
this.bStartNewList = 0;
var nListH = this.maxRange * this.theTextBox.offsetHeight + this.theTextBox.offsetHeight;
if (this.bScrolldownImage) // scrolldown image tag
nListH = nListH + 3;
boxPos.y = boxPos.y - nListH;
}
else
boxPos.y = boxPos.y - xPosElement.scrollHeight;
}
}
else {
this.bStartNewList = 0;
this.currentValueSelected=-2;
this.bNoResults=true;
if(this.theTextBox.obj.showNoMatchMessage)
ptTAObj_win0.oDoc.getElementById("pt_typeahead").innerHTML="<span class='noMatchData' style='white-space:nowrap;background-color: rgb(226,226,226);'>"+this.noMatchingDataMessage+"</span>";
else
this.HideTheBox();
}
this.SetElementPosition(this.theTextBox, boxPos.x, boxPos.y);
},
SetColNum:function(colnum,nMaxRows){
this.theTextBox.obj.colnum=colnum;
this.theTextBox.obj.nMaxRows=nMaxRows;
},
SetElementPosition:function(theTextBoxInt, selectedPosX, selectedPosY ){
var theElement=theTextBoxInt;
if(!theElement)
return;
var theElemHeight=theElement.offsetHeight;
var theElemWidth=theElement.offsetWidth;
var el = ptTAObj_win0.oDoc.getElementById("pt_typeahead0");
if (el && typeof el != 'undefined')
el.style.display='block';
var xPosElement = ptTAObj_win0.oDoc.getElementById("pt_typeahead");
if('ltr' == 'ltr')
xPosElement.style.left = selectedPosX;
else {
var viewportWidth = ptCommonObj2.getViewportWidth();
xPosElement.style.left = selectedPosX + theElemWidth ;
xPosElement.style.right = viewportWidth - selectedPosX - theElemWidth;
}
if(theTextBoxInt.obj.matchTextBoxWidth)
xPosElement.style.width=theElemWidth;
xPosElement.style.top=selectedPosY;
xPosElement.style.display='block';
if(theTextBoxInt.obj.useTimeout){
xPosElement.onmouseout=ptTAObj_win0.StartTimeout;
xPosElement.onmouseover=ptTAObj_win0.EraseTimeout;
}
else {
xPosElement.onmouseout=null;
xPosElement.onmouseover=null;
}
//commented out until feed back
// ptTAObj_win0.AutoWinAdj(xPosElement);
},
SetOpValue:function(theTextBox) {
var name=theTextBox.name;
if (name.indexOf('$to')>0)
name = name.split('$')[0];
var elOP=this.oWin.document.getElementById(name+"$op");
if (elOP==null || elOP.value=="1") return;
ptTAObj_win0.opValue=elOP.value;
elOP.value=1;
return;
},
RestoreOpValue:function(theTextBox) {
var name=theTextBox.name;
if (name.indexOf('$to')>0)
name = name.split('$')[0];
var elOP=this.oWin.document.getElementById(name+"$op");
if (elOP==null) return;
if (ptTAObj_win0.opValue != -1) {
elOP.value = ptTAObj_win0.opValue;
ptTAObj_win0.opValue = -1;
}
return;
},
CancelTypeAhead:function(theTextBox) {
if (!ptCommonObj2.isSearchPage(this.oForm)) return false;
var name=theTextBox.name;
if (name.indexOf('$to')>0)
name = name.split('$')[0];
var elOP=this.oWin.document.getElementById(name+"$op");
if (elOP==null ||elOP.value=="1" || elOP.value=="2") //search criteria 'begins with' and '='
return false;
else
return true;
},
GetRegExPattern:function(theTextBox,compareStr) {
/*var elOP=this.oWin.document.getElementById(theTextBox.name+"$op");
if ((elOP!=null) && (elOP.value == "8"))
return compareStr; //search by 'contains'
else*/ //797957
return theTextBox.obj.regExAny+compareStr; //search by 'Begin with'
},
SetMatchesArr:function(xCompareStr){
this.countForId=0;
this.currentTotalRow=0; //789561
ptTAObj_win0.arrMatches=new Array();
var tmpArray=new Array();
this.DecodeArrOptions();
if (!this.bFoundSpecialKeycode) {
var pattern=this.GetRegExPattern(this.theTextBox,xCompareStr);
if(pattern.length > 0) { //791953
var regExp=new RegExp(pattern,this.theTextBox.obj.regExFlags);
for(var i=0;i<ptTAObj_win0.arrOptions.length;i++){
var theMatch=ptTAObj_win0.arrOptions[i][this.theTextBox.obj.colnum].match(regExp);
if (theMatch) {
tmpArray[ptTAObj_win0.arrMatches.length]=ptTAObj_win0.arrOptions[i][this.theTextBox.obj.colnum];
ptTAObj_win0.arrMatches[ptTAObj_win0.arrMatches.length]=ptTAObj_win0.arrOptions[i];
}
}
}
}
else {
for(var i=0;i<ptTAObj_win0.arrOptions.length;i++) {
var str = ptTAObj_win0.arrOptions[i][this.theTextBox.obj.colnum];
var theMatch = this.StrStartsWith(str, xCompareStr);
if (theMatch) {
tmpArray[ptTAObj_win0.arrMatches.length]=ptTAObj_win0.arrOptions[i][this.theTextBox.obj.colnum];
ptTAObj_win0.arrMatches[ptTAObj_win0.arrMatches.length]=ptTAObj_win0.arrOptions[i];
}
}
}
},
StrStartsWith:function(str, prefix)
{
if ((str == null) || (prefix == null))
return false;
var str1 = str.substring(0, prefix.length).toUpperCase();
var str2 = prefix.toUpperCase();
if (str1 === str2)
return true;
else
return false;
},
CheckSpecialKeycode:function(str) {
for (var i=0; i< this.SpecialKeycode.length; i++) {
if (str.indexOf(this.SpecialKeycode.charAt(i)) != -1)
return true;
}
return false;
},
MakeMatchesArr:function(xCompareStr){
this.countForId=0;
this.currentTotalRow=0;
var matchArray=new Array();
for(var i=this.startPos;(i<ptTAObj_win0.arrMatches.length && (i-this.startPos)<this.maxRange);i++){
var matchRowArr=new Array();
for (var j=0;j<ptTAObj_win0.arrOptions[i].length;j++) {
if (j==this.theTextBox.obj.colnum) {
matchRowArr[matchRowArr.length]=this.CreateBold(ptTAObj_win0.arrMatches[i][j],xCompareStr,i);
}
else //789561 - selection on other sugguestion columns
matchRowArr[matchRowArr.length]=this.CreateBoldOtherCol(ptTAObj_win0.arrMatches[i][j],i);
}
matchArray[matchArray.length]=matchRowArr;
}
return matchArray;
},
CheckDup:function(tmpArray,value){
/*if (typeof(bSearchDialog_win0)=="undefined" || !bSearchDialog_win0)
return false;
for (var j=0;j<tmpArray.length;j++){
var regExp=new RegExp(value,this.theTextBox.obj.regExFlags);
var bDup = tmpArray[j].match(regExp);
if (bDup) return true;
}*/
return false;
},
ScrollUp:function(){
this.startPos = this.startPos - this.maxRange+1;
if (this.startPos < 0 )
this.startPos = 0;
this.BuildList(ptTAObj_win0.strLastValue);
var xPosElement = ptTAObj_win0.oDoc.getElementById("pt_typeahead");
xPosElement.onmouseover();
this.MoveHighlight(1);
},
ScrollDown:function(){
this.startPos = this.startPos + this.maxRange-1;
if (this.startPos < ptTAObj_win0.arrMatches.length)
this.BuildList(ptTAObj_win0.strLastValue);
var xPosElement = ptTAObj_win0.oDoc.getElementById("pt_typeahead");
xPosElement.onmouseover();
this.MoveHighlight(1);
},
CreateGrid:function(matchArray,mLengthA) {
var matchGrid = this.tableStart;
this.bScrolldownImage=0; // 0 - no scrolldown image tag
if (this.arrHeaders.length>0){
matchGrid +=this.trStart;
for (var i=0;i<this.arrHeaders.length;i++)
matchGrid +=this.thStart+this.arrHeaders[i]+this.thEnd;
matchGrid +=this.trEnd;
}
var odd=true;
var mLength = matchArray.length;
var nCol = matchArray[0].length;
if (browserInfoObj2.isiPad && browserInfoObj2.isSafari) {
var sCloseTAResult = "<img align='right' src='"+this.url_close+"'/ onclick='ptTAObj_win0.HideTheBox()'>";
matchGrid=matchGrid+this.trStart;
matchGrid=matchGrid+sCloseTAResult;
matchGrid=matchGrid+this.trEnd;
}
if (browserInfoObj2.isiPad && browserInfoObj2.isSafari) {
var sScrollUp = "<img align='absmiddle' src='"+this.url_up+"'/ onclick='ptTAObj_win0.ScrollUp()'>";
} else {
var sScrollUp = "<img align='absmiddle' src='"+this.url_up+"'/ onmouseover='ptTAObj_win0.ScrollUp()'>";
}
sScrollUp = this.tdScrollStart+nCol+"'>"+sScrollUp+this.tdEnd
if (this.startPos>0 && (mLength>=this.maxRange || this.startPos+mLength==mLengthA)){
matchGrid=matchGrid+this.trStart;
matchGrid=matchGrid+sScrollUp;
matchGrid=matchGrid+this.trEnd;
}
odd=false;
for (var i=0;i<matchArray.length;i++){
matchGrid += this.trStart;
for (var j=0;j<matchArray[i].length;j++){
if (odd) matchGrid += this.tdODDStart+matchArray[i][j]+this.tdEnd;
else matchGrid += this.tdEVENStart+matchArray[i][j]+this.tdEnd;
}
if (odd)
odd=false;
else
odd=true;
matchGrid += this.trEnd;
}
if (((this.startPos+this.maxRange) < ptTAObj_win0.arrMatches.length) && mLength>=this.maxRange){
if (browserInfoObj2.isiPad && browserInfoObj2.isSafari) {
var sScrollDown = "<img align='absmiddle' src='"+this.url_dn+"'/ onclick='ptTAObj_win0.ScrollDown()'>";
} else {
var sScrollDown = "<img align='absmiddle' src='"+this.url_dn+"'/ onmouseover='ptTAObj_win0.ScrollDown()'>";
}
this.bScrolldownImage=1; // 1 - include scrolldown image tag
sScrollDown = this.tdScrollStart+nCol+"'>"+sScrollDown+this.tdEnd;
matchGrid=matchGrid+this.trStart;
matchGrid=matchGrid+sScrollDown;
matchGrid=matchGrid+this.trEnd;
}
matchGrid += this.tableEnd;
return matchGrid;
},
// xStr - string to be searched
// xTextMatch - the value to be searched in the string xStr
// xVal - index of the matching string
CreateBold:function(xStr,xTextMatch,xVal) {
selectSpanMid="onclick='ptTAObj_win0.SetText("+xVal+")'"+"id='OptionsList_"+this.countForId+"' theArrayNumber='"+xVal+"'>";
if (!this.bFoundSpecialKeycode) {
var regExp=new RegExp(xTextMatch,this.theTextBox.obj.regExFlags); //768087
aStart=xStr.search(regExp);
} else {
aStart = this.StrStartsWith(xStr, xTextMatch) ? 0 : -1;
}
xTextMatch = xTextMatch.replace(/\\\\/g,'\\'); //Resolution 826172:Removing the escape character to get correct length
//for bug 14014957, fix common escape/decode issue
var preMatchedText = xStr.substring(0, aStart);
var matchedText=xStr.substring(aStart,aStart+xTextMatch.length);
var postMatchedText = xStr.substring(aStart+xTextMatch.length);
this.countForId++;
this.currentTotalRow++;
return this.selectSpanStart+selectSpanMid+this.EscapeHTMLSymbol(preMatchedText)+this.undeStart+this.EscapeHTMLSymbol(matchedText)+this.undeEnd+this.EscapeHTMLSymbol(postMatchedText)+this.selectSpanEnd;
},
// selection on other suggestion columns
CreateBoldOtherCol:function(xStr,xVal) {
selectSpanMid="onclick='ptTAObj_win0.SetText("+xVal+")'"+"id='OptionsList_"+this.countForId+"' theArrayNumber='"+xVal+"'>";
this.countForId++;
//for bug 14014957, fix common escape/decode issue
return this.selectSpanStart+selectSpanMid+this.EscapeHTMLSymbol(xStr)+this.selectSpanEnd;
},
MoveHighlight:function(xDir){
if(this.currentValueSelected>=-1){
newValue=parseInt(this.currentValueSelected)+parseInt(xDir);
if(newValue>-1 && newValue<this.currentTotalRow){ //789561
this.currentValueSelected=newValue;
this.SetHighColor(null);
}
if (newValue == this.currentTotalRow && ((this.startPos+this.maxRange) < ptTAObj_win0.arrMatches.length)){
this.ScrollDown();
this.currentValueSelected=0;
ptTAObj_win0.GrabHighlighted();
this.MoveHighlight(xDir);
}
if (newValue == -1 && this.startPos>0){
this.ScrollUp();
this.currentValueSelected=this.currentTotalRow;
ptTAObj_win0.GrabHighlighted();
this.MoveHighlight(xDir);
}
}
},
SetHighColor:function(theTextBox){
if(theTextBox){
this.currentValueSelected=theTextBox.id.slice(theTextBox.id.indexOf("_")+1,theTextBox.id.length);
}
var odd=false;
var totalCol=ptTAObj_win0.arrMatches[0].length;
for(i=0;i<this.currentTotalRow;i++){
var tObj = ptTAObj_win0.oDoc.getElementById('OptionsList_'+i*totalCol);
var trObj = tObj.parentNode.parentNode;
for (var j=0; j<trObj.childNodes.length; j++) {
var node=trObj.childNodes[j];
if (odd)
node.className='PSSRCHRESULTSODDROW';
else
node.className='PSSRCHRESULTSEVENROW';
}
if (odd) odd=false; else odd=true;
}
//789561 - fix for mouse over other suggestion columns
if (theTextBox) {
var selectOBJ=ptTAObj_win0.oDoc.getElementById('OptionsList_'+this.currentValueSelected);
this.currentValueSelected = selectOBJ.getAttribute("theArrayNumber") - this.startPos; //point to the row
}
else
var selectOBJ=ptTAObj_win0.oDoc.getElementById('OptionsList_'+this.currentValueSelected*totalCol);
var trObj = selectOBJ.parentNode.parentNode;
for (var j=0; j<trObj.childNodes.length; j++) {
var node=trObj.childNodes[j];
node.className='spanHighElement';
}
},
IsSelectedUnique:function(xVal){
var bUnique = true;
var selectedValue;
var aboveValue;
var belowValue;
selectedValue = this.DecodeValue(ptTAObj_win0.arrMatches[xVal][this.theTextBox.obj.colnum]);
if (xVal > 0)
aboveValue = this.DecodeValue(ptTAObj_win0.arrMatches[xVal -1][this.theTextBox.obj.colnum]);
if (xVal + 1 < ptTAObj_win0.arrMatches.length)
belowValue= this.DecodeValue(ptTAObj_win0.arrMatches[xVal + 1][this.theTextBox.obj.colnum]);
if (selectedValue == aboveValue || selectedValue == belowValue)
bUnique = false;
return bUnique;
},
GetIndexBasedOnSelectedVal:function(xVal) {
var index = 0;
var i = xVal;
var aboveValue;
var selectedValue = this.DecodeValue(ptTAObj_win0.arrMatches[xVal][this.theTextBox.obj.colnum]);
while (i > 0) {
aboveValue = this.DecodeValue(ptTAObj_win0.arrMatches[i -1][this.theTextBox.obj.colnum]);
if (selectedValue == aboveValue)
i--;
else
break;
}
index = xVal - i;
return index;
},
UpdateControlField:function(xVal) {
var rowNum = this.GetIndexBasedOnSelectedVal(xVal);
var val = '#ICRow' + rowNum;
document.win0.target = window.name;
document.win0.ICAction.value = val;
aAction_win0(document.win0, val);
},
SetText:function(xVal){
tryFocus(this.theTextBox);
this.theTextBox.value=this.DecodeValue(ptTAObj_win0.arrMatches[xVal][this.theTextBox.obj.colnum]);
if (!ptTAObj_win0.IsSelectedUnique(xVal)) {
this.UpdateControlField(xVal);
}
addchg_win0(this.theTextBox);
var thisObj = this.theTextBox.attributes.getNamedItem('onchange');
if (thisObj != null && thisObj.nodeValue != null)
this.theTextBox.onchange();
if (browserInfoObj2.isiPad && browserInfoObj2.isSafari) {
ptTAObj_win0.HideTheBox();
}
},
DecodeValue:function(xVal) {
var newValue=xVal;
//for bug 14014957, fix common escape/decode issue
newValue = newValue.replace(/"/gi,'"'); // "
newValue = newValue.replace(/'/gi, '\'').replace(/´/gi,'\'').replace(/</gi,'<').replace(/>/gi,'>').replace(/%/,'%').replace(/ /gi, ' ').replace(/&/gi,'&');
return newValue;
},
GrabHighlighted:function(){
if(this.currentValueSelected>=0){
this.bGrabHighlighted = true;
xVal = this.currentValueSelected+this.startPos; //index of match array
this.theTextBox.value=this.DecodeValue(ptTAObj_win0.arrMatches[xVal][this.theTextBox.obj.colnum]);
}
},
AutoWinAdj:function(xPosElement){
ptTAObj_win0.bodyScrollLeft=ptTAObj_win0.oDoc.body.scrollLeft;
ptTAObj_win0.bodyScrollTop=ptTAObj_win0.oDoc.body.scrollTop;
var t1=parseInt(xPosElement.offsetHeight,10);
var t2=parseInt(document.body.offsetHeight,10)-(parseInt(xPosElement.style.top,10)-ptTAObj_win0.oDoc.body.scrollTop);
if (t1>t2)
ptTAObj_win0.oDoc.body.scrollTop=t1-t2+10;
t1=parseInt(xPosElement.offsetWidth,10);
t2=parseInt(document.body.offsetWidth,10)-(parseInt(xPosElement.style.left,10)-ptTAObj_win0.oDoc.body.scrollLeft);
if (t1>t2) {
if (ptTAObj_win0.oDoc.win0.ICActionPrompt.value=='true') {
var o=ptTAObj_win0.oWin.parent.document.getElementById('popupContainer');
ptTAObj_win0.promptWidth = Math.max(0,o.style.width.replace('px',''));
var newW=ptTAObj_win0.promptWidth+t1-t2+20+'px';
o.style.width = newW;
o=ptTAObj_win0.oWin.parent.document.getElementById('popupFrame');
o.style.width = newW;
o=ptTAObj_win0.oWin.parent.document.getElementById("popupTitleBar");
o.style.width = newW;
}
var selectedPosX=0;
var selectedPosY=0;
var theElement=xPosElement;
if(!theElement) return;
var theElemHeight=theElement.offsetHeight;
var theElemWidth=theElement.offsetWidth;
while(theElement!=null){
selectedPosX+=theElement.offsetLeft;
selectedPosY+=theElement.offsetTop;
theElement = theElement.offsetParent;
}
if ((t1-t2+20) > selectedPosX)
ptTAObj_win0.oDoc.body.scrollLeft=selectedPosX-20;
else
ptTAObj_win0.oDoc.body.scrollLeft=t1-t2+20;
}
},
AutoWinUnAdj:function(){
ptTAObj_win0.oDoc.body.scrollLeft=ptTAObj_win0.bodyScrollLeft;
ptTAObj_win0.oDoc.body.scrollTop=ptTAObj_win0.bodyScrollTop;
if (!ptTAObj_win0.oDoc.win0.ICActionPrompt || ptTAObj_win0.oDoc.win0.ICActionPrompt.value!='true') {
ptTAObj_win0.promptWidth=0;return;
}
if (ptTAObj_win0.promptWidth==0) return;
var o=ptTAObj_win0.oWin.parent.document.getElementById('popupContainer');
o.style.width = ptTAObj_win0.promptWidth+'px';
o=ptTAObj_win0.oWin.parent.document.getElementById('popupFrame');
o.style.width = ptTAObj_win0.promptWidth+'px';
o=ptTAObj_win0.oWin.parent.document.getElementById("popupTitleBar");
o.style.width = ptTAObj_win0.promptWidth+'px';
},
ClearResultData:function() {
ptTAObj_win0.arrHeaders.length = 0;
ptTAObj_win0.arrOptions.length = 0;
ptTAObj_win0.arrMatches.length = 0;
},
DecodeArrOptions:function() {
if (typeof ptTAObj_win0.arrOptions == 'undefined')
return;
for (var i=0;i<ptTAObj_win0.arrOptions.length;i++) {
for (var j=0;j<ptTAObj_win0.arrOptions[i].length;j++) {
ptTAObj_win0.arrOptions[i][j] = this.DecodeValue(ptTAObj_win0.arrOptions[i][j]);
}
}
},
HideTheBox:function(){
//commented out until feed back
//ptTAObj_win0.AutoWinUnAdj();
this.bGrabHighlighted = false;
var el=ptTAObj_win0.oDoc.getElementById('pt_typeahead0');
if (el && typeof el != 'undefined')
el.style.display='none';
ptTAObj_win0.oDoc.getElementById('pt_typeahead').style.display='none';
ptTAObj_win0.currentValueSelected=-2;
ptTAObj_win0.EraseTimeout();
ptTAObj_win0.EraseDelayTime();
this.startPos = 0;
ptTAObj_win0.ClearResultData();
},
IsGrabHighlighted:function() {
if (this.bGrabHighlighted)
return true;
return false;
},
EraseDelayTime:function(){
clearTimeout(ptTAObj_win0.isDelayTiming);
ptTAObj_win0.isDelayTiming=false;
},
StartDelayTimeout:function(){
if (!ptTAObj_win0.theTextBox) return;
ptTAObj_win0.isDelayTiming=setTimeout("ptTAObj_win0.DoTypeAhead()",this.nDelayTime);
},
EraseDelayTimeout:function(){
clearTimeout(ptTAObj_win0.isDelayTiming);
ptTAObj_win0.isDelayTiming=false;
},
EraseTimeout:function(){
clearTimeout(ptTAObj_win0.isTiming);
ptTAObj_win0.isTiming=false;
},
StartTimeout:function(){
if (!ptTAObj_win0.theTextBox)
return
ptTAObj_win0.isTiming=setTimeout("ptTAObj_win0.HideTheBox()",ptTAObj_win0.theTextBox.obj.theVisibleTime);
}
}
var ptTAObj_win0 = new PT_typeahead();
|
'use strict';
/* global loadBodyHTML */
/* global MocksHelper */
/* global contacts */
/* global asyncStorage */
/* global MockContactsListObj */
/* global ICEData */
requireApp('communications/contacts/test/unit/mock_navigation.js');
requireApp('communications/contacts/test/unit/mock_asyncstorage.js');
requireApp('communications/contacts/test/unit/mock_contacts.js');
requireApp('communications/contacts/js/utilities/ice_data.js');
requireApp('communications/contacts/js/views/ice_settings.js');
requireApp('communications/contacts/test/unit/mock_contacts_list_obj.js');
require('/shared/test/unit/mocks/mock_ice_store.js');
var mocksHelper = new MocksHelper([
'asyncStorage', 'ICEStore'
]);
mocksHelper.init();
suite('ICE Settings view', function() {
var subject;
var realContactsList;
var defaultLabel = 'ICESelectContact';
var getContactByIdStub;
var cid1 = '1', cid2 = '2';
suiteSetup(function() {
mocksHelper.suiteSetup();
subject = contacts.ICE;
realContactsList = contacts.List;
contacts.List = MockContactsListObj;
});
suiteTeardown(function() {
contacts.List = realContactsList;
});
setup(function() {
setupHTML();
getContactByIdStub = sinon.stub(contacts.List, 'getContactById',
function(id, cb) {
if (!id) {
cb();
return;
}
var contacts = [
{
id: cid1,
givenName: ['John'],
familyName: ['Doe']
},{
id: cid2,
givenName: ['Albert'],
familyName: ['Pla']
}];
// Hoping ide 1 and 2
cb(contacts[id - 1]);
});
});
teardown(function() {
subject.reset();
window.asyncStorage.clear();
getContactByIdStub.restore();
});
function setupHTML() {
loadBodyHTML('/contacts/elements/settings.html');
// We loaded a template, expand it
var template = document.getElementsByTagName('template')[0].innerHTML;
var section = document.createElement('section');
section.id = 'settings-wrapper';
section.innerHTML = template;
document.body.innerHTML = '';
document.body.appendChild(section);
}
function assertIceContacts(iceStates) {
var ice1 = document.getElementById('select-ice-contact-1');
assert.equal(ice1.dataset.contactId, iceStates[0].contactId);
if (iceStates[0].label) {
assert.equal(ice1.textContent.trim(), iceStates[0].label);
}
else {
assert.equal(ice1.dataset.l10nId, defaultLabel);
}
var ice2 = document.getElementById('select-ice-contact-2');
assert.equal(ice2.dataset.contactId, iceStates[1].contactId);
if (iceStates[1].label) {
assert.equal(ice2.textContent.trim(), iceStates[1].label);
}
else {
assert.equal(ice2.dataset.l10nId, defaultLabel);
}
assert.equal(ice1.disabled, !iceStates[0].active);
assert.equal(ice2.disabled, !iceStates[1].active);
var iceCheck1 = document.querySelector('[name="ice-contact-1-enabled"]');
var iceCheck2 = document.querySelector('[name="ice-contact-2-enabled"]');
assert.isFalse(iceCheck1.disabled);
assert.isFalse(iceCheck2.disabled);
}
suite('> Initialization', function() {
setup(function() {
this.sinon.spy(asyncStorage, 'getItem');
});
test('> No ice contacts', function(done) {
window.asyncStorage.keys = {
'ice-contacts': []
};
subject.refresh(function() {
// On init and when we do the listening
sinon.assert.calledOnce(asyncStorage.getItem);
assertIceContacts([{ contactId: '', active: false},
{ contactId: '', active: false}]);
done();
});
});
test('> With 1 contact enabled. ICE Contact 1', function(done) {
window.asyncStorage.keys = {
'ice-contacts': [
{
id: cid1,
active: true
}
]
};
subject.refresh(function() {
sinon.assert.calledTwice(contacts.List.getContactById);
assertIceContacts([{ contactId: cid1, label: 'John Doe', active: true},
{ contactId: '', active: false}]);
done();
});
});
test('> With 1 contact enabled. ICE Contact 2', function(done) {
window.asyncStorage.keys = {
'ice-contacts': [
{},
{
id: cid2,
active: true
}
]
};
subject.refresh(function() {
sinon.assert.calledTwice(contacts.List.getContactById);
assertIceContacts([{ contactId: '', active: false},
{ contactId: cid2, label: 'Albert Pla', active: true}]);
done();
});
});
test('> With 1 contact enabled. No name. Only has tel number',
function(done) {
window.asyncStorage.keys = {
'ice-contacts': [
{
id: cid1,
active: true
}
]
};
var targetTelNumber = '678987654';
contacts.List.getContactById.restore();
this.sinon.stub(contacts.List, 'getContactById', function(id, cb) {
var contacts = [
{
id: cid1,
givenName: [],
familyName: null,
tel: [
{
type: ['other'],
value: targetTelNumber
}
]
}];
// Hoping ide 1 and 2
cb(contacts[id - 1]);
});
subject.refresh(function() {
sinon.assert.calledTwice(contacts.List.getContactById);
assertIceContacts([{
label: targetTelNumber, contactId: cid1, active: true
},{
contactId: '', active: false
}]);
done();
});
});
test('> With ICE contact 1 disabled', function(done) {
window.asyncStorage.keys = {
'ice-contacts': [
{
id: cid1,
active: false
}
]
};
subject.refresh(function() {
sinon.assert.calledTwice(contacts.List.getContactById);
assertIceContacts([{ contactId: cid1, label:'John Doe', active: false},
{ contactId: '', active: false}]);
done();
});
});
test('> With ICE contact 2 disabled', function(done) {
window.asyncStorage.keys = {
'ice-contacts': [
{},
{
id: cid2,
active: false
}
]
};
subject.refresh(function() {
sinon.assert.calledTwice(contacts.List.getContactById);
assertIceContacts([{ contactId: '', active: false},
{ contactId: cid2, label:'Albert Pla', active: false}]);
done();
});
});
test('> With 2 contacts enabled', function(done) {
window.asyncStorage.keys = {
'ice-contacts': [
{
id: cid1,
active: true
}, {
id: cid2,
active: true
}
]
};
subject.refresh(function() {
sinon.assert.calledTwice(contacts.List.getContactById);
assertIceContacts([{ contactId: cid1, label: 'John Doe', active: true},
{ contactId: cid2, label: 'Albert Pla', active: true}]);
done();
});
});
});
suite('> Modify ICE contacts', function() {
suiteSetup(function() {
sinon.spy(ICEData, 'setICEContact');
});
suiteTeardown(function() {
ICEData.setICEContact.restore();
});
setup(function() {
window.asyncStorage.keys = {
'ice-contacts': [
{
id: cid1,
active: true
}, {
id: cid2,
active: true
}
]
};
});
test('> change state saves ICE Datastore', function(done) {
subject.refresh(function() {
var switch1 = document.getElementById('ice-contacts-1-switch');
// Disable 1
switch1.click();
sinon.assert.calledOnce(ICEData.setICEContact);
sinon.assert.calledWith(ICEData.setICEContact, cid1, 0, false);
done();
});
});
test('> remove ICE Contact 1 and ICE Contact 2 remains', function(done) {
subject.refresh(function() {
assertIceContacts([{ contactId: cid1, label: 'John Doe', active: true},
{ contactId: cid2, label: 'Albert Pla', active: true}]);
ICEData.removeICEContact(cid1).then(function() {
subject.refresh(function() {
assertIceContacts([{ contactId: '', active: false},
{ contactId: cid2, label: 'Albert Pla', active: true}]);
done();
});
});
});
});
});
});
|
import MlBacktop from "./main";
MlBacktop.install = function (Vue) {
Vue.component(MlBacktop.name, MlBacktop);
};
export default MlBacktop;
|