From f322e11b867c60ffe1a6cb068cd71f4aaf1e1d8d Mon Sep 17 00:00:00 2001 From: jorgecc Date: Mon, 30 Dec 2024 18:30:49 -0300 Subject: [PATCH] 1.19 --- AutoLoadOne.php | 3238 +++++++++++++++++++++++------------------------ README.md | 1387 ++++++++++---------- composer.json | 48 +- 3 files changed, 2338 insertions(+), 2335 deletions(-) diff --git a/AutoLoadOne.php b/AutoLoadOne.php index 8f97492..ba2701c 100644 --- a/AutoLoadOne.php +++ b/AutoLoadOne.php @@ -1,1619 +1,1619 @@ -fileGen = '.'; //getcwd(); // dirname($_SERVER['SCRIPT_FILENAME']); - $this->rooturl = '.'; //getcwd(); // dirname($_SERVER['SCRIPT_FILENAME']); - $this->t1 = microtime(true); - $tmpArr = explode('/', $_SERVER['SCRIPT_FILENAME']); // it always returns with linux separators. - $this->fileConfig = end($tmpArr); // the config name shares the same name as the php but with extension .json - $this->fileConfig = $this->dirNameLinux(getcwd()) . '/' . str_replace($this->extension, '.json', $this->fileConfig); - } - - /** - * returns dir name linux way. - * - * @param $url - * @param bool $ifFullUrl - * - * @return string - */ - public function dirNameLinux($url, bool $ifFullUrl = true): string - { - $url = trim($url); - $dir = ($ifFullUrl) ? dirname($url) : $url; - $dir = $this->fixSeparator($dir); - // remove trailing / - return rtrim($dir, '/'); - } - - public function fixSeparator($fullUrl) - { - return str_replace('\\', '/', $fullUrl); // replace windows path for linux path. - } - - /** @noinspection PhpUnused */ - public static function format($json, $unescapeUnicode, $unescapeSlashes): string - { - $result = ''; - $pos = 0; - $strLen = strlen($json); - $indentStr = ' '; - $newLine = "\n"; - $outOfQuotes = true; - $buffer = ''; - $noescape = true; - for ($i = 0; $i < $strLen; $i++) { - $char = substr($json, $i, 1); - if ('"' === $char && $noescape) { - $outOfQuotes = !$outOfQuotes; - } - if (!$outOfQuotes) { - $buffer .= $char; - $noescape = !('\\' === $char) || !$noescape; - continue; - } - if ('' !== $buffer) { - if ($unescapeSlashes) { - $buffer = str_replace('\\/', '/', $buffer); - } - if ($unescapeUnicode && function_exists('mb_convert_encoding')) { - $buffer = preg_replace_callback('/(\\\\+)u([0-9a-f]{4})/i', static function ($match) { - $l = strlen($match[1]); - if ($l % 2) { - $code = hexdec($match[2]); - if (0xD800 <= $code && 0xDFFF >= $code) { - return $match[0]; - } - /** @noinspection PhpComposerExtensionStubsInspection */ - return str_repeat('\\', $l - 1) . - mb_convert_encoding(pack('H*', $match[2]), 'UTF-8', 'UCS-2BE'); - } - return $match[0]; - }, $buffer); - } - $result .= $buffer . $char; - $buffer = ''; - continue; - } - if (':' === $char) { - $char .= ' '; - } elseif ('}' === $char || ']' === $char) { - $pos--; - $prevChar = substr($json, $i - 1, 1); - if ('{' !== $prevChar && '[' !== $prevChar) { - $result .= $newLine; - $result .= str_repeat($indentStr, $pos); - } else { - $result = rtrim($result); - } - } - $result .= $char; - if (',' === $char || '{' === $char || '[' === $char) { - $result .= $newLine; - if ('{' === $char || '[' === $char) { - $pos++; - } - $result .= str_repeat($indentStr, $pos); - } - } - return $result; - } - - public function init(): void - { - $this->log = ''; - $this->logStat = ''; - if (PHP_SAPI === 'cli') { - $this->initSapi(); - } else { - if (_AUTOLOAD_ONLYCLI) { - echo 'You should run it as a command line parameter.'; - die(1); - } - $this->initWeb(); - } - } - - private function initSapi(): void - { - global $argv; - $v = $this::VERSION . ' (c) Jorge Castro'; - echo <<extension . " will be generate)\n"; - echo "-save (save the file to generate)\n"; - echo "-compression (compress the result)\n"; - echo "-savefilename (the filename to be generated. By default its autoload.php)\n"; - echo "-excludens (namespace excluded)\n"; - echo "-excludepath (path excluded)\n"; - echo "-externalpath (external paths)\n"; - echo "------------------------------------------------------------------\n"; - } else { - $this->getAllParametersCli(); - $this->fileGen = ($this->fileGen === '') ? '.' : $this->fileGen; //getcwd() - $this->button = 1; - } - if ($this->current) { - $this->rooturl = '.'; //getcwd(); - $this->fileGen = '.'; //getcwd(); - $this->savefile = 1; - $this->savefileName = 'autoload.php'; - $this->stop = 0; - $this->compression = 1; - $this->button = 1; - $this->excludeNS = ''; - $this->externalPath = ''; - $this->excludePath = ''; - } - echo '-folder ' . $this->rooturl . " (folder to scan)\n"; - echo '-filegen ' . $this->fileGen . ' (folder where autoload' . $this->extension . " will be generate)\n"; - echo '-save ' . ($this->savefile ? 'yes' : 'no') . " (save filegen)\n"; - echo '-compression ' . ($this->compression ? 'yes' : 'no') . " (compress the result)\n"; - echo '-savefilename ' . $this->savefileName . " (save filegen name)\n"; - echo '-excludens ' . $this->excludeNS . " (namespace excluded)\n"; - echo '-excludepath ' . $this->excludePath . " (path excluded)\n"; - echo '-externalpath ' . $this->externalPath . " (path external)\n"; - echo "------------------------------------------------------------------\n"; - } - - private function getAllParametersCli(): void - { - $this->rooturl = $this->fixSeparator($this->getParameterCli('folder')); - $this->fileGen = $this->fixSeparator($this->getParameterCli('filegen')); - $this->fileGen = ($this->fileGen === '.') ? $this->rooturl : $this->fileGen; - $this->savefile = $this->getParameterCli('save'); - $this->savefileName = $this->getParameterCli('savefilename', 'autoload.php'); - $this->stop = $this->getParameterCli('stop'); - $this->compression = $this->getParameterCli('compression'); - $this->current = $this->getParameterCli('current', true); - $this->excludeNS = $this->getParameterCli('excludens'); - $this->excludePath = $this->getParameterCli('excludepath'); - $this->externalPath = $this->getParameterCli('externalpath'); - $this->debugMode = $this->getParameterCli('debug'); - } - - /** - * @param $key - * @param string $default is the defalut value is the parameter is set without value. - * - * @return string - */ - private function getParameterCli($key, string $default = ''): string - { - global $argv; - $p = array_search('-' . $key, $argv, true); - if ($p === false) { - return ''; - } - if ($default !== '') { - return $default; - } - if (count($argv) >= $p + 1) { - return $this->removeTrailSlash($argv[$p + 1]); - } - return ''; - } - - private function removeTrailSlash($txt): string - { - return rtrim($txt, '/\\'); - } - - private function initWeb(): void - { - @ob_start(); - // Not in cli-mode - @session_start(); - $this->logged = @$_SESSION['log']; - if (!$this->logged) { - $user = @$_POST['user']; - $password = @$_POST['password']; - if (($user === _AUTOLOAD_USER && $password === _AUTOLOAD_PASSWORD) || _AUTOLOAD_ENTER) { - $_SESSION['log'] = '1'; - $this->logged = 1; - } else { - sleep(1); // sleep a second - $_SESSION['log'] = '0'; - @session_destroy(); - } - @session_write_close(); - } else { - $this->button = @$_POST['button']; - if (!$this->button) { - $loadOk = $this->loadParam(); - if ($loadOk === false) { - $this->addLog('Unable to load configuration file ' . $this->savefileName . - '. It is not obligatory', 'warning'); - } else { - $this->addLog('Configuration loaded ' . $this->savefileName . - '.', 'info'); - } - } else { - $this->debugMode = isset($_GET['debug']); - $this->rooturl = $this->removeTrailSlash(@$_POST['rooturl'] ? $_POST['rooturl'] : $this->rooturl); - $this->fileGen = $this->removeTrailSlash(@$_POST['fileGen'] ? $_POST['fileGen'] : $this->fileGen); - $this->fileGen = ($this->fileGen === '.') ? $this->rooturl : $this->fileGen; - $this->excludeNS = - $this->cleanInputFolder($this->removeTrailSlash(@$_POST['excludeNS'] ? $_POST['excludeNS'] - : $this->excludeNS)); - $this->excludePath = - $this->cleanInputFolder($this->removeTrailSlash(@$_POST['excludePath'] ? $_POST['excludePath'] - : $this->excludePath)); - $this->externalPath = - $this->cleanInputFolder($this->removeTrailSlash(@$_POST['externalPath'] ? $_POST['externalPath'] - : $this->externalPath)); - $this->savefile = (@$_POST['savefile']) ?: $this->savefile; - $this->savefileName = (@$_POST['savefileName']) ?: $this->savefileName; - $this->stop = @$_POST['stop']; - $this->compression = @$_POST['compression']; - } - if ($this->button === 'logout') { - @session_destroy(); - $this->logged = 0; - @session_write_close(); - } - } - } - - /** - * @return bool - */ - private function loadParam(): bool - { - if (!_AUTOLOAD_SAVEPARAM) { - return false; - } - $fullPHP = @file_get_contents($this->savefileName); - if ($fullPHP === false) { - $fullPHP = ''; - } - $a1 = strpos($fullPHP, '/* -- CONFIG START HERE --'); - if ($a1 === false) { - // we try the old method (json file if exists) - $oldMethod = @file_get_contents($this->fileConfig); - if (!$oldMethod) { - return false; - } - $this->addLog('Reading the configuration using the old method ' . $this->fileConfig . ' (you could delete this file)', 'error'); - $param = json_decode($oldMethod, true); - $param = $param['local'] ?? null; - } else { - $a1 += strlen('/* -- CONFIG START HERE --'); - $a2 = strpos($fullPHP, '-- CONFIG END HERE -- ', $a1); - if ($a2 === false) { - return false; - } - $txt = trim(substr($fullPHP, $a1, $a2 - $a1)); - $param = json_decode($txt, true); - } - if ($param === null) { - return false; - } - $this->fileGen = @$param['fileGen']; - $this->fileGen = ($this->fileGen === '.') ? $this->rooturl : $this->fileGen; - $this->savefile = @$param['savefile']; - $this->compression = @$param['compression']; - $this->savefileName = @$param['savefileName']; - $this->excludeNS = @$param['excludeNS']; - $this->excludePath = @$param['excludePath']; - $this->externalPath = @$param['externalPath']; - return true; - } - - /** - * @param mixed $txt The message to show - * @param string $type =['error','warning','info','success','stat','statinfo','staterror'][$i] - */ - public function addLog($txt, string $type = ''): void - { - if (PHP_SAPI === 'cli') { - $txt = str_replace(array('', '', '', ''), array("\033[1m", "\033[4m", "\033[0m", "\033[0m"), $txt); - switch ($type) { - case 'error': - case 'staterror': - echo "\033[31m$txt\033[0m\n"; - break; - case 'warning': - echo "\033[33m$txt\033[0m\n"; - break; - case 'info': - echo "\033[37m$txt\033[0m\n"; - break; - case 'success': - echo "\033[32m$txt\033[0m\n"; - break; - case 'statinfo': - case 'stat': - echo "\033[34m$txt\033[0m\n"; - break; - default: - echo "\033[0m$txt\033[0m\n"; - break; - } - } else { - switch ($type) { - case 'error': - $this->log .= "
$txt
"; - break; - case 'warning': - $this->log .= "
$txt
"; - break; - case 'info': - $this->log .= "
$txt
"; - break; - case 'success': - $this->log .= "
$txt
"; - break; - case 'stat': - $this->logStat .= "
$txt
"; - break; - case 'statinfo': - $this->logStat .= "
$txt
"; - break; - case 'staterror': - $this->logStat .= "
$txt
"; - break; - default: - $this->log .= "
$txt
"; - break; - } - } - } - - /** - * @param $value - * - * @return string - */ - private function cleanInputFolder($value): string - { - // remove windows line carriage - // remove previous ,\n if any and converted into \n. It avoids duplicate ,,\n - // we add ,\n again. - // we remove trailing \ - // we remove trailing / - return str_replace(array("\r\n", ",\n", "\n", '\\,', '/,'), array("\n", "\n", ",\n", ',', ','), $value); - } - - public function process(): void - { - $this->rooturl = $this->fixSeparator($this->rooturl); - $this->fileGen = $this->fixSeparator($this->fileGen); - if ($this->rooturl) { - $this->baseGen = $this->dirNameLinux($this->fileGen . '/' . $this->getFileName()); - [$files, $json] = $this->listFolderFiles($this->rooturl); - $filesAbsolute = array_fill(0, count($files), false); - $jsonAbsolute = array_fill(0, count($json), false); - $extPathArr = explode(',', $this->externalPath); - foreach ($extPathArr as $ep) { - $ep = $this->dirNameLinux($ep, false); - [$files2, $json2] = $this->listFolderFiles($ep); - foreach ($json2 as $newJson) { - $json[] = $newJson; - $jsonAbsolute[] = true; - } - foreach ($files2 as $newFile) { - $files[] = $newFile; - $filesAbsolute[] = true; - } - } - $ns = []; - $nsAlt = []; - $pathAbsolute = []; - $autoruns = []; - $autorunsFromJson = []; - $autorunsFirst = []; - $excludeNSArr = str_replace(["\n", "\r", ' '], '', $this->excludeNS); - $excludeNSArr = explode(',', $excludeNSArr); - //$excludePathArr = $this->fixSeparator($this->excludePath); - $excludePathArr = str_replace(["\n", "\r"], '', $this->excludePath); - $excludePathArr = explode(',', $excludePathArr); - foreach ($excludePathArr as $key => $item) { - $excludePathArr[$key] = trim($item); - } - $this->result = ''; - if ($this->button) { - foreach ($json as $key => $f) { - //echo "running $f
"; - $f = $this->fixSeparator($f); - $dirOriginal = $this->dirNameLinux($f); - $jsonE = $this->parseJSONFile($dirOriginal); - foreach ($jsonE as $item) { - if (!$jsonAbsolute[$key]) { - $dir = $this->genPath($dirOriginal); //folder/subfolder/f1 - $full = $dir . '/' . $item; ///folder/subfolder/f1/F1.php - } else { - //$dir = $dirOriginal; //D:/Dropbox/www/currentproject/AutoLoadOne/examples/folder - $full = $dirOriginal . '/' . $item; //D:/Dropbox/www/currentproject/AutoLoadOne/examples/folder/NaturalClass.php - } - $autoruns[] = $full; - $autorunsFromJson[] = $full; - } - } - $mapped = []; - foreach ($files as $key => $f) { - $f = $this->fixSeparator($f); - $runMe = ''; - $pArr = $this->parsePHPFile($f, $runMe); - $dirOriginal = $this->dirNameLinux($f); - if (!$filesAbsolute[$key]) { - $dir = $this->genPath($dirOriginal); //folder/subfolder/f1 - $full = $this->genPath($f); ///folder/subfolder/f1/F1.php - } else { - $dir = dirname($f); //D:/Dropbox/www/currentproject/AutoLoadOne/examples/folder - $full = $f; //D:/Dropbox/www/currentproject/AutoLoadOne/examples/folder/NaturalClass.php - } - $urlFull = $this->dirNameLinux($full); ///folder/subfolder/f1 - $tmpArr = explode('/', $f); //F1.php - $basefile = end($tmpArr); // the config name shares the same name as the php but with extension .json - if ($runMe !== '') { - switch ($runMe) { - case '@autorun first': - $autorunsFirst[] = $full; - $this->addLog("Adding autorun (priority): $full", 'info'); - break; - case '@autorunclass': - $autoruns[] = $full; - $this->addLog("Adding autorun (class, use future): $full", 'info'); - break; - case '@autorun': - $autoruns[] = $full; - $this->addLog("Adding autorun: $full", 'info'); - break; - } - } - foreach ($pArr as $p) { - $nsp = $p['namespace']; - $cs = $p['classname']; - $this->statNameSpaces[$nsp] = 1; - $this->statNumPHP++; - if ($cs !== '') { - $this->statNumClass++; - } - $altUrl = ($nsp !== '') ? $nsp . '\\' . $cs : $cs; // namespace - if ($nsp !== '' || $cs !== '') { - if ((!isset($ns[$nsp]) || $ns[$nsp] === $dir) && $basefile === $cs . $this->extension) { - // namespace doesn't exist and the class is equals to the name - // adding as a folder - $exclude = false; - if ($nsp !== '' && in_array($nsp, $excludeNSArr, true)) { - //if ($this->inExclusion($nsp, $this->excludeNSArr) && $nsp!="") { - $this->addLog("Ignoring namespace (path specified in Excluded NameSpace): $altUrl -> $full", - 'warning'); - $exclude = true; - } - if ($this->inExclusion($dir, $excludePathArr)) { - $this->addLog("Ignoring relative path (path specified in Excluded Path): $altUrl -> $dir", - 'warning'); - $exclude = true; - } - if ($this->inExclusion($dirOriginal, $excludePathArr)) { - $this->addLog("Ignoring full path (path specified in Excluded Path): $altUrl -> $dirOriginal", - 'warning'); - $exclude = true; - } - if (!$exclude) { - if ($nsp === '') { - $this->addLog("Adding Full map (empty namespace): $altUrl -> $full to class $cs", 'warning'); - $nsAlt[$altUrl] = $full; - $pathAbsolute[$altUrl] = $filesAbsolute[$key]; - } elseif (isset($ns[$nsp])) { - $mapped[] = $nsp . '\\' . $cs; - $this->addLog("Reusing the folder: $nsp -> $dir to class $cs", - 'success'); - } else { - $ns[$nsp] = $dir; - $pathAbsolute[$nsp] = $filesAbsolute[$key]; - $this->addLog("Adding Folder as namespace: $nsp -> $dir to class $cs", 'info'); - } - } - } elseif (isset($nsAlt[$altUrl])) { - $this->addLog("Error Conflict:Class with name $altUrl -> $dir" - . " is already defined. File $f", 'error'); - $this->statConflict++; - if ($this->stop) { - die(1); - } - } elseif ((!in_array($altUrl, $excludeNSArr, true) || $nsp === '') && - !$this->inExclusion($urlFull, $excludePathArr)) { - if (in_array($altUrl, $mapped, true)) { - $this->addLog("Not Added Full relation: $altUrl -> $full to class $cs (already added)", 'warning'); - } else { - $this->addLog("Adding Full relation: $altUrl -> $full to class $cs", 'warning'); - $nsAlt[$altUrl] = $full; - $pathAbsolute[$altUrl] = $filesAbsolute[$key]; - } - } - } - } - if (count($pArr) === 0) { - $this->statNumPHP++; - if ($runMe === '@noautoload') { - $this->addLog("Ignoring $full Reason: @noautoload found", 'warning'); - } else { - $this->addLog("Ignoring $full Reason: No class found on file.", 'warning'); - } - } - } - foreach ($autorunsFirst as $auto) { - $this->addLog("Adding file $auto Reason: @autoload first found", 'warning'); - } - foreach ($autoruns as $auto) { - if (in_array($auto, $autorunsFromJson, true)) { - $this->addLog("Adding file $auto Reason: composer.json found", 'warning'); - } else { - $this->addLog("Adding file $auto Reason: @autoload found", 'warning'); - } - } - $autoruns = array_merge($autorunsFirst, $autoruns); - $this->result = - $this->genautoload($this->fileGen . '/' . $this->getFileName(), $ns, $nsAlt, $pathAbsolute, - $autoruns); - } - if ($this->statNumPHP === 0) { - $p = 100; - } else { - $p = round((count($ns) + count($nsAlt)) * 100 / $this->statNumPHP, 2); - } - if ($this->statNumClass === 0) { - $pc = 100; - } else { - $pc = round((count($ns) + count($nsAlt)) * 100 / $this->statNumClass, 2); - } - $this->addLog('Number of Classes: ' . $this->statNumClass . '', 'stat'); - $this->addLog('Number of Namespaces: ' . count($this->statNameSpaces) . '', 'stat'); - $this->addLog('Number of Maps: ' . (count($ns) + count($nsAlt)) . ' (you want to reduce it)', - 'stat'); - $this->addLog('Number of PHP Files: ' . $this->statNumPHP . '', 'stat'); - $this->addLog('Number of PHP Autorun: ' . count($autoruns) . '', 'stat'); - $this->addLog('Number of conflicts: ' . $this->statConflict . '', 'stat'); - if ($this->statError) { - $this->addLog('Number of errors: ' . $this->statError . '', 'staterror'); - } - $this->addLog('Ratio map per file: ' . $p . '% ' . $this->evaluation($p) . - ' (less is better. 100% means one map/one file)', 'statinfo'); - $this->addLog('Ratio map per classes: ' . $pc . '% ' . $this->evaluation($pc) . - ' (less is better. 100% means one map/one class)', 'statinfo'); - $this->addLog('Map size: ' . round($this->statByteUsed / 1024, 1) . - " kbytes (less is better, it's an estimate of the memory used by the map)", 'statinfo'); - $this->addLog('Map size Compressed: ' . round($this->statByteUsedCompressed / 1024, 1) . - " kbytes (less is better, it's an estimate of the memory used by the map)", 'statinfo'); - } else { - $this->addLog('No folder specified'); - } - } - - /** - * returns the name of the filename if the original filename constains .php then it is not added, otherwise - * it is added. - * - * @return string - */ - public function getFileName(): string - { - if (strpos($this->savefileName, '.php') === false) { - return $this->savefileName . $this->extension; - } - return $this->savefileName; - } - - public function listFolderFiles($dir): array - { - $arr = []; - $json = []; - $this->listFolderFilesAlt($dir, $arr, $json); - return [$arr, $json]; - } - - public function listFolderFilesAlt($dir, &$list, &$json): array - { - if ($dir === '') { - return []; - } - $ffs = @scandir($this->fixRelative($dir)); - if ($ffs === false) { - $this->addLog("\nError: Unable to reader folder [$dir]. Check the name of the folder and the permissions", - 'error'); - $this->statError++; - return []; - } - foreach ($ffs as $ff) { - if ($ff !== '.' && $ff !== '..') { - if ($ff === 'composer.json') { - $json[] = $list[] = $dir . '/' . $ff; - } - if ((strlen($ff) >= 5) && substr($ff, -4) === $this->extension) { - // PHP_OS_FAMILY=='Windows' - $list[] = $dir . '/' . $ff; - } - if (is_dir($dir . '/' . $ff)) { - $this->listFolderFilesAlt($dir . '/' . $ff, $list, $json); - } - } - } - return $list; - } - - private function fixRelative($path) - { - if (strpos($path, '..') !== false) { - return getcwd() . '/' . $path; - } - return $path; - } - - public function parseJSONFile($filename) - { - try { - $filenameFixed = $this->fixRelative($filename) . '/composer.json'; - if (is_file($filenameFixed)) { - $content = file_get_contents($filenameFixed); - } else { - return []; - } - if ($this->debugMode) { - echo $filename . ' trying token...
'; - } - $tokens = json_decode($content, true); - } catch (Exception $ex) { - echo "Error in $filename\n"; - die(1); - } - return $tokens['autoload']['files'] ?? []; - } - - public function genPath($path) - { - $path = $this->fixSeparator($path); - if (strpos($path, $this->baseGen) === 0) { - $min1 = strrpos($path, '/'); - $min2 = strrpos($this->baseGen . '/', '/'); - //$min=min(strlen($path),strlen($this->baseGen)); - $min = min($min1, $min2); - $baseCommon = $min; - for ($i = 0; $i < $min; $i++) { - if (substr($path, 0, $i) !== substr($this->baseGen, 0, $i)) { - $baseCommon = $i - 2; - break; - } - } - // moving down the relative path (/../../) - $c = substr_count(substr($this->baseGen, $baseCommon), '/'); - $r = str_repeat('/..', $c); - // moving up the relative path - $r2 = substr($path, $baseCommon); - return $r . $r2; - } - return substr($path, strlen($this->baseGen)); - } - - /** - * @param $filename - * @param string $runMe - * - * @return array - */ - public function parsePHPFile($filename, string &$runMe): array - { - $runMe = ''; - $r = []; - try { - if (is_file($this->fixRelative($filename))) { - $content = file_get_contents($this->fixRelative($filename)); - } else { - return []; - } - if ($this->debugMode) { - echo $filename . ' trying token...
'; - } - $tokens = token_get_all($content); - } catch (Exception $ex) { - echo "Error in $filename\n"; - die(1); - } - foreach ($tokens as $token) { - if (is_array($token) && ($token[0] === T_COMMENT || $token[0] === T_DOC_COMMENT)) { - if (strpos($token[1], '@noautoload') !== false) { - $runMe = '@noautoload'; - return []; - } - if (strpos($token[1], '@autorun') !== false) { - if (strpos($token[1], '@autorunclass') !== false) { - $runMe = '@autorunclass'; - } elseif (strpos($token[1], '@autorun first') !== false) { - $runMe = '@autorun first'; - } else { - $runMe = '@autorun'; - } - } - } - } - $nameSpace = ''; - $className = ''; - foreach ($tokens as $p => $token) { - if (is_array($token) && $token[0] === T_NAMESPACE) { - // We found a namespace - $ns = ''; - for ($i = $p + 2; $i < $p + 30; $i++) { - if (is_array($tokens[$i])) { - $ns .= $tokens[$i][1]; - } else { - // tokens[$p]==';' ?? - break; - } - } - $nameSpace = $ns; - } - $isClass = false; - // A class is defined by a T_CLASS + a space + name of the class. - if (is_array($token) && ($token[0] === T_CLASS || $token[0] === T_INTERFACE || $token[0] === T_TRAIT) && - is_array($tokens[$p + 1]) && $tokens[$p + 1][0] === T_WHITESPACE) { - $isClass = true; - if (is_array($tokens[$p - 1]) && $tokens[$p - 1][0] === T_PAAMAYIM_NEKUDOTAYIM && - $tokens[$p - 1][1] === '::') { - // /namespace/Nameclass:class <-- we skip this case. - $isClass = false; - } - } - if ($isClass) { - // encontramos una clase - $min = min($p + 30, count($tokens) - 1); - for ($i = $p + 2; $i < $min; $i++) { - if (is_array($tokens[$i]) && $tokens[$i][0] === T_STRING) { - $className = $tokens[$i][1]; - break; - } - } - $r[] = ['namespace' => trim($nameSpace), 'classname' => trim($className)]; - } - } // foreach - return $r; - } - - /** - * @param string $path - * @param string[] $exclusions - * - * @return bool - */ - private function inExclusion(string $path, array $exclusions): bool - { - foreach ($exclusions as $ex) { - if ($ex !== '') { - if ($ex[strlen($ex) - 1] === '*') { - $bool = $this->startwith($path, substr($ex, 0, -1)); - if ($bool) { - return true; - } - } - if ($ex[0] === '*') { - $bool = $this->endswith($path, $ex); - if ($bool) { - return true; - } - } - if ((strpos($ex, '*') === false) && $path === $ex) { - return true; - } - } - } - return false; - } - - public function startwith($string, $test): bool - { - return strpos($string, $test) === 0; - } - - public function endswith($string, $test): bool - { - $strlen = strlen($string); - $testlen = strlen($test); - if ($testlen > $strlen) { - return false; - } - return substr_compare($string, $test, $strlen - $testlen, $testlen) === 0; - } - - public function genautoload($file, $namespaces, $namespacesAlt, $pathAbsolute, $autoruns) - { - $template = "filename.
- * example: ['namespace\Class']='folder\file.php' - */ -${{tempname}}__arrautoloadCustom = [ -{{custom}} -]; -${{tempname}}__arrautoloadCustomCommon = [ -{{customCommon}} -]; - -/* @var string[] ${{tempname}}__arrautoload It stores the map of definitions as namespace=>folder - * Example: ['namespace']='folder' - */ -${{tempname}}__arrautoload = [ -{{include}} -]; -${{tempname}}__arrautoloadCommon = [ -{{includeCommon}} -]; - -/** - * @var boolean[] ${{tempname}}__arrautoloadAbsolute It stores the map absolutely
- * Example: $['namespace' or 'namespace\Class']=true if it's absolute (it uses the full path) - */ -${{tempname}}__arrautoloadAbsolute = [ -{{includeabsolute}} -]; - -/** - * @param $class_name - * @throws Exception - */ -function {{tempname}}__auto($class_name) -{ - // it's called only if the class is not loaded. - set_exception_handler('autoloadone_exception_handler'); - $p=strrpos($class_name,'\\'); - if($p!==false) { - $ns=substr($class_name,0,$p); - $cls=substr($class_name,$p+1); - } else { - $ns=''; - $cls=$class_name; - } - // special cases - if (isset($GLOBALS['{{tempname}}__arrautoloadCustom'][$class_name])) { - {{tempname}}__loadIfExists($class_name,$GLOBALS['{{tempname}}__arrautoloadCustom'][$class_name] - , $class_name,'{{tempname}}__arrautoloadCustomCommon'); - restore_exception_handler(); - return; - } - // normal (folder) cases - if (isset($GLOBALS['{{tempname}}__arrautoload'][$ns])) { - {{tempname}}__loadIfExists($class_name,$GLOBALS['{{tempname}}__arrautoload'][$ns] . '/' . $cls . '.php' - , $ns,'{{tempname}}__arrautoloadCommon'); - restore_exception_handler(); - return; - } - if(!class_exists($class_name)) { - throw new RuntimeException("AutoLoadOne Error: No file found for class [$class_name]"); - } - restore_exception_handler(); -} - -/** - * We load the file. - * @param string $className the name of the class - * @param string $filename the filename to load - * @param string $key key of the class it could be the full class name or only the namespace - * @param string $arrayName [optional] it's the name of the arrayname used to replaced |n| values. - * @throws Exception - */ -function {{tempname}}__loadIfExists($className,$filename, $key,$arrayName='') -{ - if (isset($GLOBALS['{{tempname}}__arrautoloadAbsolute'][$key])) { - $fullFile = $filename; // it's an absolute path - if (strpos($fullFile, '../') === 0) { // Or maybe, not, it's a remote-relative path. - $oldDir = getcwd(); // we copy the current url - chdir(__DIR__); - } - } else { - $fullFile = __DIR__ . '/' . {{tempname}}__replaceCurlyVariable($filename, $arrayName); // it's relative to this path - } - if ((@include $fullFile) === false) { - if ($GLOBALS['autoloadone__debug']) { - throw new RuntimeException("AutoLoadOne Error: Loading file [$fullFile] for class [$className]"); - } - throw new RuntimeException("AutoLoadOne Error: No file found for class [$className]"); - } - if (isset($oldDir)) { - chdir($oldDir); - } -} -function {{tempname}}__replaceCurlyVariable($string,$arrayName) { - if(strpos($string,'|')===false) { - return $string; - } // nothing to replace. - return preg_replace_callback('/\\|\s?(\w+)\s?\\|/u', static function ($matches) use ($arrayName) { - $item = is_array($matches) ? substr($matches[0], 1, -1) - : substr($matches, 1, -1); - return $GLOBALS[$arrayName][$item]; - }, $string); -} -function autoloadone_exception_handler($exception) { - $isCli=!http_response_code(); - $r="Uncaught Exception: [".get_class($exception)."] code:".$exception->getCode()."\n".$exception->getMessage()."\n"; - if ($GLOBALS['autoloadone__debug']) { - $r .= "Trace:\n"; - foreach ($exception->getTrace() as $error) { - // we remove all trace pointing to this file. - if (isset($error['file'])) { - if(strpos($error['file'], __FILE__) === false) { - $r .= @$error['file'] . '[' . @$error['line'] . ']' . ' function:' . @$error['function'] . '(' - .( is_array(@$error['args']) ? @implode(',', @$error['args']) . ')' :@$error['args']) - . "\n"; - } else { - $r .= '(nofile)' . '[' . @$error['line'] . ']' . ' function:' . @$error['function'] . '(' - .( is_array(@$error['args']) ? @implode(',', @$error['args']) . ')' :@$error['args']) - . "\n"; - } - } - } - } - if(!$isCli) { - $r=str_replace(["\n",'[',']'],["
","[","]"],$r); - } - echo $r; - die(1); -} - - - -spl_autoload_register(static function ($class_name) { - {{tempname}}__auto($class_name); -}); -// {{autorun_flag}} -{{autorun}} - -EOD; - $includeNotCompressed = $this->createArrayPHP($namespaces); - $customNotCompressed = $this->createArrayPHP($namespacesAlt); - $commonAbsolute = $this->compress($namespacesAlt); - //$commonNameSpace=$this->compress($namespaces); - $commonNameAbs = $this->compress($namespaces); - $custom = $this->createArrayPHP($namespacesAlt); - $htmlCommonAbsolute = $this->createArrayPHP($commonAbsolute); - $include = $this->createArrayPHP($namespaces); - $htmlCommonNameAbs = $this->createArrayPHP($commonNameAbs); - $includeAbsolute = ''; - foreach ($pathAbsolute as $k => $v) { - if ($v) { - $includeAbsolute .= "\t'$k' => true,\n"; - } - } - $includeAbsolute = rtrim($includeAbsolute, ",\n"); - $autorun = ''; // - $excludePathArr = str_replace(["\n", "\r"], '', $this->excludePath); - $excludePathArr = explode(',', $excludePathArr); - foreach ($excludePathArr as $key => $item) { - $excludePathArr[$key] = trim($item); - } - if (_AUTOLOAD_COMPOSERJSON) { - foreach ($autoruns as $v) { - if ($this->inExclusion(dirname($v), $excludePathArr)) { - $autorun .= "// @include __DIR__.'$v'; // excluded by path\n"; - } else { - $autorun .= "@include __DIR__.'$v';\n"; - } - } - } - // 1024 is the memory used by code, *1.3 is an overhead, usually it's mess. - $this->statByteUsedCompressed = (strlen($include) + strlen($includeAbsolute) + strlen($custom)) * 1.3 + 1024; - $this->statByteUsed = - (strlen($includeNotCompressed) + strlen($htmlCommonAbsolute) + strlen($htmlCommonNameAbs) + - strlen($includeAbsolute) + strlen($customNotCompressed)) * 1.3 + 1024; - $template = str_replace(array( - '{{custom}}', - '{{include}}', - '{{customCommon}}', - '{{includeabsolute}}', - '{{includeCommon}}', - '{{tempname}}', - '{{autorun}}', - '{{autorun_flag}}', - '{{version}}', - '{{extension}}', - '{{date}}' - ), array( - $custom, - $include, - $htmlCommonAbsolute, - $includeAbsolute, - $htmlCommonNameAbs, - substr(uniqid('s'), 0, 6), // we don't need a long name. - $autorun, - _AUTOLOAD_COMPOSERJSON ? - 'Autorun: this file was created using _AUTOLOAD_COMPOSERJSON=true' - : 'Autorun: this file was created using _AUTOLOAD_COMPOSERJSON=false so autorun is disabled', - $this::VERSION, - $this->extension, - date('Y/m/d H:i:s') - ), $template); - if ($this->savefile) { - $ok = @file_put_contents($file, $template); - if ($ok) { - $this->addLog("File $file generated", 'info'); - $ok = $this->saveParam(); - if ($ok === false) { - $this->addLog('Unable to save configuration file ' . $file . - '. It is not obligatory.', 'warning'); - } - } else { - $this->addLog("Unable to write file $file. Check the folder and permissions. You could write it manually.", - 'error'); - $this->statError++; - } - $this->addLog('', 'info'); - } - return $template; - } - - private function createArrayPHP($array): string - { - $result = ''; - foreach ($array as $k => $v) { - if (is_numeric($k)) { - $result .= "\t$k => '$v',\n"; - } else { - $result .= "\t'$k' => '$v',\n"; - } - } - return rtrim($result, ",\n"); - } - - /** - * It compresses the paths - * - * @param string[] $paths An associative array with the paths - * - * @return array - */ - public function compress(array &$paths): array - { - if (!$this->compression) { - return []; - } - $arr = $paths; - $foundIndex = 0; - $found = []; - foreach ($arr as $item) { - if (strlen($item) > 10) { // we compress path of at least 20 characters. - $maxcount = 0; - $last = strlen($item); - for ($index = $last; $index > 10; $index--) { // we compress up to 20 characters. - $sum = 0; - $findme = substr($item, 0, $index); - foreach ($arr as $item2) { - if (strpos($item2, $findme) === 0) { - $sum += $index; // it counts the number of characters - } - } - if ($sum > $maxcount && - $sum >= $index * 2) { // it must save at least x2 the number of characters compressed - $maxcount = $sum; - $foundIndex++; - $foundKey = '|' . $foundIndex . '|'; - // replace - foreach ($arr as $k2 => $item2) { - if (strpos($item2, $findme) === 0) { - $arr[$k2] = str_replace($findme, $foundKey, $item2); - /** @noinspection PhpUnusedLocalVariableInspection */ - $sum += $index; // it counts the number of characters - } - } - $found[$foundIndex] = $findme; - } - } - } - } - $paths = $arr; - return $found; - } - - /** - * @return bool|int - */ - private function saveParam() - { - if (!_AUTOLOAD_SAVEPARAM) { - return false; - } - $param = []; - $currentPath = $this->dirNameLinux(getcwd(), false); - $param['rooturl'] = $this->rooturl === $currentPath ? '.' : $this->rooturl; - $param['fileGen'] = $this->fileGen === $currentPath ? '.' : $this->fileGen; - $param['savefile'] = $this->savefile; - $param['compression'] = $this->compression; - $param['savefileName'] = $this->savefileName; - $param['excludeNS'] = $this->excludeNS; - $param['excludePath'] = $this->excludePath; - $param['externalPath'] = $this->externalPath; - $fullPHP = @file_get_contents($this->savefileName); - if ($fullPHP === false) { - return false; - } - $a1 = strpos($fullPHP, '/* -- CONFIG START HERE --'); - if ($a1 === false) { - return false; - } - $a1 += strlen('/* -- CONFIG START HERE --'); - $a2 = strpos($fullPHP, "\n-- CONFIG END HERE -- */", $a1); - if ($a2 === false) { - return false; - } - $txt = substr($fullPHP, 0, $a1) . "\n" - . json_encode($param, JSON_PRETTY_PRINT + JSON_UNESCAPED_SLASHES + JSON_UNESCAPED_UNICODE) . - substr($fullPHP, $a2); - return @file_put_contents($this->savefileName, $txt); - } - - private function evaluation($percentage): string - { - switch (true) { - case $percentage === 0: - return 'How?'; - case $percentage < 10: - return 'Awesome'; - case $percentage < 25: - return 'Good'; - case $percentage < 40: - return 'Acceptable'; - case $percentage < 80: - return 'Bad.'; - } - return 'The worst'; - } - - public function render(): void - { - if ($this->debugMode) { - ob_clean(); - } - if (PHP_SAPI === 'cli') { - $t2 = microtime(true); - echo "\n" . (round(($t2 - $this->t1) * 1000) / 1000) . " sec. Finished\n"; - } elseif (!$this->logged) { - $web = <<<'LOGS' - - - - - - AutoLoadOneGenerator Login Screen - - -LOGS; - $web .= $this->bootstrapcss(); - $web .= <<<'LOGS' - - - -
-
-
-
-
-
-
-

Login Screen

-
-
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
-
-
-
-
-
-
-
- - - -LOGS; - echo $web; - } else { - $web = <<<'TEM1' - - - - - - AutoLoadOneGenerator {{version}} - - - -TEM1; - $web .= $this->bootstrapcss(); - $web .= <<<'TEM1' - - - -
-
-
-
-
-
-
-

AutoLoadOneGenerator {{version}}.

-
-
-
-
-
- -     - -
-
-
-
- -
-
- - The root folder to scan files
- Extension scanned: {{extension}}
- PHP files that contain the comment @noautoload are ignored
- The path used here is case sensitive, even in Windows.
- PHP files that don't contain a class/interface are ignored.
- {{autorun_enable}}
- Examples: -
Absolute paths: c:\root\folder, - c:/root/folder, /root/folder
- Relative paths: folder/other, folder\other
-
-
-
-
- -
-
- - Full or relative path (local file) where the autoload{{extension}} - will be generated.
- Example:
/etc/httpd/web,c:\apache\htdoc
- Note: This path is also used to determine the relativity of the includes
-
-
- -
-
- -
-
- -
- -
- The PHP file that we want to generate. You could generate it manually (copy and paste the result)
-
-
-
-
- -
-
- - Folder(s) of the external library without trailing "/" separated by comma or in a new line.
- The folders will be stored as an absolute path however, it's possible to use a relative path.
- Example:
- C:\temp\folder
- /folder/somefolder
- ../../mapache-commons\lib (relative path to the result folder)
-
-
-
- -
-
- - Namespaces without trailing "/" separated by comma or in a new line. It includes local and external folders. -
Example:
- /mynamespace,/mynamespace2/subnamespace
-
-
-
- -
-
- - The relative path without trailing "/" separated by comma or in a new line. - You could also use the wildcard (*). -
Example:
- vendor/pchart/class Exclude the folder but not the subfolders.
- /path* for any folder that starts with "/path*,"path/folder".."
- */path for any folder that ends with "*/path"
-
-
-
- -
-
-
- - -
-
-
-
-
-
- - -
-
-
-
-
- -
-
-
{{log}}
-
-
-
-
- -
-
-
{{logstat}}
-
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -     - -
-
- - -
- -
-
-
-
-
- - - -TEM1; - $web = str_replace(array( - '{{rooturl}}', - '{{autorun_enable}}', - '{{fileGen}}', - '{{extension}}', - '{{excludeNS}}', - '{{externalPath}}', - '{{excludePath}}', - '{{savefile}}', - '{{savefileName}}', - '{{stop}}', - '{{compression}}', - '{{log}}', - '{{logstat}}', - '{{version}}', - '{{result}}' - ), array( - $this->rooturl, - _AUTOLOAD_COMPOSERJSON ? '_AUTOLOAD_COMPOSERJSON=true Composer.json autorun is considered. PHP files that contain the comment "@autorun" are executed (even if they don\'t have a class)
- PHP files that contain the comment "@autorun first" are executed with priority
' - : '_AUTOLOAD_COMPOSERJSON=false. @autorun flag and composer.json autorun are not considered', - $this->fileGen, - $this->extension, - $this->excludeNS, - $this->externalPath, - $this->excludePath, - ($this->savefile) ? 'checked' : '', - $this->savefileName, - ($this->stop) ? 'checked' : '', - ($this->compression) ? 'checked' : '', - $this->log, - $this->logStat, - $this::VERSION, - $this->result - ), $web); - $this->cli = "php autoloadone.php -folder \"$this->rooturl\" -filegen \"$this->fileGen\" -save "; - $tmp = ($this->compression ? 'yes' : 'no'); - $this->cli .= "-compression $tmp "; - $tmp = str_replace(array("\n", "\r"), '', $this->excludeNS); - $this->cli .= "-excludens \"$tmp\" "; - $tmp = str_replace(array("\n", "\r"), '', $this->externalPath); - $this->cli .= "-externalpath \"$tmp\" "; - $tmp = str_replace(array("\n", "\r"), '', $this->excludePath); - $this->cli .= "-excludepath \"$tmp\""; - $web = str_replace('{{cli}}', $this->cli, $web); - $t2 = microtime(true); - $ms = (round(($t2 - $this->t1) * 1000) / 1000) . ' sec.'; - $web = str_replace('{{ms}}', $ms, $web); - echo $web; - } - } - - public function bootstrapcss(): string - { - return << -html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:transparent}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],.input-group-sm input[type=time],input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],.input-group-lg input[type=time],input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.in{opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;opacity:0;line-break:auto}.tooltip.in{opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} - -BOOTS; - } -} // end class AutoLoadOne -if (_AUTOLOAD_SELFRUN || PHP_SAPI === 'cli') { - $auto = new AutoLoadOne(); - $auto->init(); - $auto->process(); - $auto->render(); -} - -// @noautoload -/* - * @noautoload - */ +fileGen = '.'; //getcwd(); // dirname($_SERVER['SCRIPT_FILENAME']); + $this->rooturl = '.'; //getcwd(); // dirname($_SERVER['SCRIPT_FILENAME']); + $this->t1 = microtime(true); + $tmpArr = explode('/', $_SERVER['SCRIPT_FILENAME']); // it always returns with linux separators. + $this->fileConfig = end($tmpArr); // the config name shares the same name as the php but with extension .json + $this->fileConfig = $this->dirNameLinux(getcwd()) . '/' . str_replace($this->extension, '.json', $this->fileConfig); + } + + /** + * returns dir name linux way. + * + * @param $url + * @param bool $ifFullUrl + * + * @return string + */ + public function dirNameLinux($url, bool $ifFullUrl = true): string + { + $url = trim($url); + $dir = ($ifFullUrl) ? dirname($url) : $url; + $dir = $this->fixSeparator($dir); + // remove trailing / + return rtrim($dir, '/'); + } + + public function fixSeparator($fullUrl) + { + return str_replace('\\', '/', $fullUrl); // replace windows path for linux path. + } + + /** @noinspection PhpUnused */ + public static function format($json, $unescapeUnicode, $unescapeSlashes): string + { + $result = ''; + $pos = 0; + $strLen = strlen($json); + $indentStr = ' '; + $newLine = "\n"; + $outOfQuotes = true; + $buffer = ''; + $noescape = true; + for ($i = 0; $i < $strLen; $i++) { + $char = substr($json, $i, 1); + if ('"' === $char && $noescape) { + $outOfQuotes = !$outOfQuotes; + } + if (!$outOfQuotes) { + $buffer .= $char; + $noescape = !('\\' === $char) || !$noescape; + continue; + } + if ('' !== $buffer) { + if ($unescapeSlashes) { + $buffer = str_replace('\\/', '/', $buffer); + } + if ($unescapeUnicode && function_exists('mb_convert_encoding')) { + $buffer = preg_replace_callback('/(\\\\+)u([0-9a-f]{4})/i', static function ($match) { + $l = strlen($match[1]); + if ($l % 2) { + $code = hexdec($match[2]); + if (0xD800 <= $code && 0xDFFF >= $code) { + return $match[0]; + } + /** @noinspection PhpComposerExtensionStubsInspection */ + return str_repeat('\\', $l - 1) . + mb_convert_encoding(pack('H*', $match[2]), 'UTF-8', 'UCS-2BE'); + } + return $match[0]; + }, $buffer); + } + $result .= $buffer . $char; + $buffer = ''; + continue; + } + if (':' === $char) { + $char .= ' '; + } elseif ('}' === $char || ']' === $char) { + $pos--; + $prevChar = substr($json, $i - 1, 1); + if ('{' !== $prevChar && '[' !== $prevChar) { + $result .= $newLine; + $result .= str_repeat($indentStr, $pos); + } else { + $result = rtrim($result); + } + } + $result .= $char; + if (',' === $char || '{' === $char || '[' === $char) { + $result .= $newLine; + if ('{' === $char || '[' === $char) { + $pos++; + } + $result .= str_repeat($indentStr, $pos); + } + } + return $result; + } + + public function init(): void + { + $this->log = ''; + $this->logStat = ''; + if (PHP_SAPI === 'cli') { + $this->initSapi(); + } else { + if (_AUTOLOAD_ONLYCLI) { + echo 'You should run it as a command line parameter.'; + die(1); + } + $this->initWeb(); + } + } + + private function initSapi(): void + { + global $argv; + $v = $this::VERSION . ' (c) Jorge Castro'; + echo <<extension . " will be generate)\n"; + echo "-save (save the file to generate)\n"; + echo "-compression (compress the result)\n"; + echo "-savefilename (the filename to be generated. By default its autoload.php)\n"; + echo "-excludens (namespace excluded)\n"; + echo "-excludepath (path excluded)\n"; + echo "-externalpath (external paths)\n"; + echo "------------------------------------------------------------------\n"; + } else { + $this->getAllParametersCli(); + $this->fileGen = ($this->fileGen === '') ? '.' : $this->fileGen; //getcwd() + $this->button = 1; + } + if ($this->current) { + $this->rooturl = '.'; //getcwd(); + $this->fileGen = '.'; //getcwd(); + $this->savefile = 1; + $this->savefileName = 'autoload.php'; + $this->stop = 0; + $this->compression = 1; + $this->button = 1; + $this->excludeNS = ''; + $this->externalPath = ''; + $this->excludePath = ''; + } + echo '-folder ' . $this->rooturl . " (folder to scan)\n"; + echo '-filegen ' . $this->fileGen . ' (folder where autoload' . $this->extension . " will be generate)\n"; + echo '-save ' . ($this->savefile ? 'yes' : 'no') . " (save filegen)\n"; + echo '-compression ' . ($this->compression ? 'yes' : 'no') . " (compress the result)\n"; + echo '-savefilename ' . $this->savefileName . " (save filegen name)\n"; + echo '-excludens ' . $this->excludeNS . " (namespace excluded)\n"; + echo '-excludepath ' . $this->excludePath . " (path excluded)\n"; + echo '-externalpath ' . $this->externalPath . " (path external)\n"; + echo "------------------------------------------------------------------\n"; + } + + private function getAllParametersCli(): void + { + $this->rooturl = $this->fixSeparator($this->getParameterCli('folder')); + $this->fileGen = $this->fixSeparator($this->getParameterCli('filegen')); + $this->fileGen = ($this->fileGen === '.') ? $this->rooturl : $this->fileGen; + $this->savefile = $this->getParameterCli('save'); + $this->savefileName = $this->getParameterCli('savefilename', 'autoload.php'); + $this->stop = $this->getParameterCli('stop'); + $this->compression = $this->getParameterCli('compression'); + $this->current = $this->getParameterCli('current', true); + $this->excludeNS = $this->getParameterCli('excludens'); + $this->excludePath = $this->getParameterCli('excludepath'); + $this->externalPath = $this->getParameterCli('externalpath'); + $this->debugMode = $this->getParameterCli('debug'); + } + + /** + * @param $key + * @param string $default is the defalut value is the parameter is set without value. + * + * @return string + */ + private function getParameterCli($key, string $default = ''): string + { + global $argv; + $p = array_search('-' . $key, $argv, true); + if ($p === false) { + return ''; + } + if ($default !== '') { + return $default; + } + if (count($argv) >= $p + 1) { + return $this->removeTrailSlash($argv[$p + 1]); + } + return ''; + } + + private function removeTrailSlash($txt): string + { + return rtrim($txt, '/\\'); + } + + private function initWeb(): void + { + @ob_start(); + // Not in cli-mode + @session_start(); + $this->logged = @$_SESSION['log']; + if (!$this->logged) { + $user = @$_POST['user']; + $password = @$_POST['password']; + if (($user === _AUTOLOAD_USER && $password === _AUTOLOAD_PASSWORD) || _AUTOLOAD_ENTER) { + $_SESSION['log'] = '1'; + $this->logged = 1; + } else { + sleep(1); // sleep a second + $_SESSION['log'] = '0'; + @session_destroy(); + } + @session_write_close(); + } else { + $this->button = @$_POST['button']; + if (!$this->button) { + $loadOk = $this->loadParam(); + if ($loadOk === false) { + $this->addLog('Unable to load configuration file ' . $this->savefileName . + '. It is not obligatory', 'warning'); + } else { + $this->addLog('Configuration loaded ' . $this->savefileName . + '.', 'info'); + } + } else { + $this->debugMode = isset($_GET['debug']); + $this->rooturl = $this->removeTrailSlash(@$_POST['rooturl'] ? $_POST['rooturl'] : $this->rooturl); + $this->fileGen = $this->removeTrailSlash(@$_POST['fileGen'] ? $_POST['fileGen'] : $this->fileGen); + $this->fileGen = ($this->fileGen === '.') ? $this->rooturl : $this->fileGen; + $this->excludeNS = + $this->cleanInputFolder($this->removeTrailSlash(@$_POST['excludeNS'] ? $_POST['excludeNS'] + : $this->excludeNS)); + $this->excludePath = + $this->cleanInputFolder($this->removeTrailSlash(@$_POST['excludePath'] ? $_POST['excludePath'] + : $this->excludePath)); + $this->externalPath = + $this->cleanInputFolder($this->removeTrailSlash(@$_POST['externalPath'] ? $_POST['externalPath'] + : $this->externalPath)); + $this->savefile = (@$_POST['savefile']) ?: $this->savefile; + $this->savefileName = (@$_POST['savefileName']) ?: $this->savefileName; + $this->stop = @$_POST['stop']; + $this->compression = @$_POST['compression']; + } + if ($this->button === 'logout') { + @session_destroy(); + $this->logged = 0; + @session_write_close(); + } + } + } + + /** + * @return bool + */ + private function loadParam(): bool + { + if (!_AUTOLOAD_SAVEPARAM) { + return false; + } + $fullPHP = @file_get_contents($this->savefileName); + if ($fullPHP === false) { + $fullPHP = ''; + } + $a1 = strpos($fullPHP, '/* -- CONFIG START HERE --'); + if ($a1 === false) { + // we try the old method (json file if exists) + $oldMethod = @file_get_contents($this->fileConfig); + if (!$oldMethod) { + return false; + } + $this->addLog('Reading the configuration using the old method ' . $this->fileConfig . ' (you could delete this file)', 'error'); + $param = json_decode($oldMethod, true); + $param = $param['local'] ?? null; + } else { + $a1 += strlen('/* -- CONFIG START HERE --'); + $a2 = strpos($fullPHP, '-- CONFIG END HERE -- ', $a1); + if ($a2 === false) { + return false; + } + $txt = trim(substr($fullPHP, $a1, $a2 - $a1)); + $param = json_decode($txt, true); + } + if ($param === null) { + return false; + } + $this->fileGen = @$param['fileGen']; + $this->fileGen = ($this->fileGen === '.') ? $this->rooturl : $this->fileGen; + $this->savefile = @$param['savefile']; + $this->compression = @$param['compression']; + $this->savefileName = @$param['savefileName']; + $this->excludeNS = @$param['excludeNS']; + $this->excludePath = @$param['excludePath']; + $this->externalPath = @$param['externalPath']; + return true; + } + + /** + * @param mixed $txt The message to show + * @param string $type =['error','warning','info','success','stat','statinfo','staterror'][$i] + */ + public function addLog($txt, string $type = ''): void + { + if (PHP_SAPI === 'cli') { + $txt = str_replace(array('', '', '', ''), array("\033[1m", "\033[4m", "\033[0m", "\033[0m"), $txt); + switch ($type) { + case 'error': + case 'staterror': + echo "\033[31m$txt\033[0m\n"; + break; + case 'warning': + echo "\033[33m$txt\033[0m\n"; + break; + case 'info': + echo "\033[37m$txt\033[0m\n"; + break; + case 'success': + echo "\033[32m$txt\033[0m\n"; + break; + case 'statinfo': + case 'stat': + echo "\033[34m$txt\033[0m\n"; + break; + default: + echo "\033[0m$txt\033[0m\n"; + break; + } + } else { + switch ($type) { + case 'error': + $this->log .= "
$txt
"; + break; + case 'warning': + $this->log .= "
$txt
"; + break; + case 'info': + $this->log .= "
$txt
"; + break; + case 'success': + $this->log .= "
$txt
"; + break; + case 'stat': + $this->logStat .= "
$txt
"; + break; + case 'statinfo': + $this->logStat .= "
$txt
"; + break; + case 'staterror': + $this->logStat .= "
$txt
"; + break; + default: + $this->log .= "
$txt
"; + break; + } + } + } + + /** + * @param $value + * + * @return string + */ + private function cleanInputFolder($value): string + { + // remove windows line carriage + // remove previous ,\n if any and converted into \n. It avoids duplicate ,,\n + // we add ,\n again. + // we remove trailing \ + // we remove trailing / + return str_replace(array("\r\n", ",\n", "\n", '\\,', '/,'), array("\n", "\n", ",\n", ',', ','), $value); + } + + public function process(): void + { + $this->rooturl = $this->fixSeparator($this->rooturl); + $this->fileGen = $this->fixSeparator($this->fileGen); + if ($this->rooturl) { + $this->baseGen = $this->dirNameLinux($this->fileGen . '/' . $this->getFileName()); + [$files, $json] = $this->listFolderFiles($this->rooturl); + $filesAbsolute = array_fill(0, count($files), false); + $jsonAbsolute = array_fill(0, count($json), false); + $extPathArr = explode(',', $this->externalPath); + foreach ($extPathArr as $ep) { + $ep = $this->dirNameLinux($ep, false); + [$files2, $json2] = $this->listFolderFiles($ep); + foreach ($json2 as $newJson) { + $json[] = $newJson; + $jsonAbsolute[] = true; + } + foreach ($files2 as $newFile) { + $files[] = $newFile; + $filesAbsolute[] = true; + } + } + $ns = []; + $nsAlt = []; + $pathAbsolute = []; + $autoruns = []; + $autorunsFromJson = []; + $autorunsFirst = []; + $excludeNSArr = str_replace(["\n", "\r", ' '], '', $this->excludeNS); + $excludeNSArr = explode(',', $excludeNSArr); + //$excludePathArr = $this->fixSeparator($this->excludePath); + $excludePathArr = str_replace(["\n", "\r"], '', $this->excludePath); + $excludePathArr = explode(',', $excludePathArr); + foreach ($excludePathArr as $key => $item) { + $excludePathArr[$key] = trim($item); + } + $this->result = ''; + if ($this->button) { + foreach ($json as $key => $f) { + //echo "running $f
"; + $f = $this->fixSeparator($f); + $dirOriginal = $this->dirNameLinux($f); + $jsonE = $this->parseJSONFile($dirOriginal); + foreach ($jsonE as $item) { + if (!$jsonAbsolute[$key]) { + $dir = $this->genPath($dirOriginal); //folder/subfolder/f1 + $full = $dir . '/' . $item; ///folder/subfolder/f1/F1.php + } else { + //$dir = $dirOriginal; //D:/Dropbox/www/currentproject/AutoLoadOne/examples/folder + $full = $dirOriginal . '/' . $item; //D:/Dropbox/www/currentproject/AutoLoadOne/examples/folder/NaturalClass.php + } + $autoruns[] = $full; + $autorunsFromJson[] = $full; + } + } + $mapped = []; + foreach ($files as $key => $f) { + $f = $this->fixSeparator($f); + $runMe = ''; + $pArr = $this->parsePHPFile($f, $runMe); + $dirOriginal = $this->dirNameLinux($f); + if (!$filesAbsolute[$key]) { + $dir = $this->genPath($dirOriginal); //folder/subfolder/f1 + $full = $this->genPath($f); ///folder/subfolder/f1/F1.php + } else { + $dir = dirname($f); //D:/Dropbox/www/currentproject/AutoLoadOne/examples/folder + $full = $f; //D:/Dropbox/www/currentproject/AutoLoadOne/examples/folder/NaturalClass.php + } + $urlFull = $this->dirNameLinux($full); ///folder/subfolder/f1 + $tmpArr = explode('/', $f); //F1.php + $basefile = end($tmpArr); // the config name shares the same name as the php but with extension .json + if ($runMe !== '') { + switch ($runMe) { + case '@autorun first': + $autorunsFirst[] = $full; + $this->addLog("Adding autorun (priority): $full", 'info'); + break; + case '@autorunclass': + $autoruns[] = $full; + $this->addLog("Adding autorun (class, use future): $full", 'info'); + break; + case '@autorun': + $autoruns[] = $full; + $this->addLog("Adding autorun: $full", 'info'); + break; + } + } + foreach ($pArr as $p) { + $nsp = $p['namespace']; + $cs = $p['classname']; + $this->statNameSpaces[$nsp] = 1; + $this->statNumPHP++; + if ($cs !== '') { + $this->statNumClass++; + } + $altUrl = ($nsp !== '') ? $nsp . '\\' . $cs : $cs; // namespace + if ($nsp !== '' || $cs !== '') { + if ((!isset($ns[$nsp]) || $ns[$nsp] === $dir) && $basefile === $cs . $this->extension) { + // namespace doesn't exist and the class is equals to the name + // adding as a folder + $exclude = false; + if ($nsp !== '' && in_array($nsp, $excludeNSArr, true)) { + //if ($this->inExclusion($nsp, $this->excludeNSArr) && $nsp!="") { + $this->addLog("Ignoring namespace (path specified in Excluded NameSpace): $altUrl -> $full", + 'warning'); + $exclude = true; + } + if ($this->inExclusion($dir, $excludePathArr)) { + $this->addLog("Ignoring relative path (path specified in Excluded Path): $altUrl -> $dir", + 'warning'); + $exclude = true; + } + if ($this->inExclusion($dirOriginal, $excludePathArr)) { + $this->addLog("Ignoring full path (path specified in Excluded Path): $altUrl -> $dirOriginal", + 'warning'); + $exclude = true; + } + if (!$exclude) { + if ($nsp === '') { + $this->addLog("Adding Full map (empty namespace): $altUrl -> $full to class $cs", 'warning'); + $nsAlt[$altUrl] = $full; + $pathAbsolute[$altUrl] = $filesAbsolute[$key]; + } elseif (isset($ns[$nsp])) { + $mapped[] = $nsp . '\\' . $cs; + $this->addLog("Reusing the folder: $nsp -> $dir to class $cs", + 'success'); + } else { + $ns[$nsp] = $dir; + $pathAbsolute[$nsp] = $filesAbsolute[$key]; + $this->addLog("Adding Folder as namespace: $nsp -> $dir to class $cs", 'info'); + } + } + } elseif (isset($nsAlt[$altUrl])) { + $this->addLog("Error Conflict:Class with name $altUrl -> $dir" + . " is already defined. File $f", 'error'); + $this->statConflict++; + if ($this->stop) { + die(1); + } + } elseif ((!in_array($altUrl, $excludeNSArr, true) || $nsp === '') && + !$this->inExclusion($urlFull, $excludePathArr)) { + if (in_array($altUrl, $mapped, true)) { + $this->addLog("Not Added Full relation: $altUrl -> $full to class $cs (already added)", 'warning'); + } else { + $this->addLog("Adding Full relation: $altUrl -> $full to class $cs", 'warning'); + $nsAlt[$altUrl] = $full; + $pathAbsolute[$altUrl] = $filesAbsolute[$key]; + } + } + } + } + if (count($pArr) === 0) { + $this->statNumPHP++; + if ($runMe === '@noautoload') { + $this->addLog("Ignoring $full Reason: @noautoload found", 'warning'); + } else { + $this->addLog("Ignoring $full Reason: No class found on file.", 'warning'); + } + } + } + foreach ($autorunsFirst as $auto) { + $this->addLog("Adding file $auto Reason: @autoload first found", 'warning'); + } + foreach ($autoruns as $auto) { + if (in_array($auto, $autorunsFromJson, true)) { + $this->addLog("Adding file $auto Reason: composer.json found", 'warning'); + } else { + $this->addLog("Adding file $auto Reason: @autoload found", 'warning'); + } + } + $autoruns = array_merge($autorunsFirst, $autoruns); + $this->result = + $this->genautoload($this->fileGen . '/' . $this->getFileName(), $ns, $nsAlt, $pathAbsolute, + $autoruns); + } + if ($this->statNumPHP === 0) { + $p = 100; + } else { + $p = round((count($ns) + count($nsAlt)) * 100 / $this->statNumPHP, 2); + } + if ($this->statNumClass === 0) { + $pc = 100; + } else { + $pc = round((count($ns) + count($nsAlt)) * 100 / $this->statNumClass, 2); + } + $this->addLog('Number of Classes: ' . $this->statNumClass . '', 'stat'); + $this->addLog('Number of Namespaces: ' . count($this->statNameSpaces) . '', 'stat'); + $this->addLog('Number of Maps: ' . (count($ns) + count($nsAlt)) . ' (you want to reduce it)', + 'stat'); + $this->addLog('Number of PHP Files: ' . $this->statNumPHP . '', 'stat'); + $this->addLog('Number of PHP Autorun: ' . count($autoruns) . '', 'stat'); + $this->addLog('Number of conflicts: ' . $this->statConflict . '', 'stat'); + if ($this->statError) { + $this->addLog('Number of errors: ' . $this->statError . '', 'staterror'); + } + $this->addLog('Ratio map per file: ' . $p . '% ' . $this->evaluation($p) . + ' (less is better. 100% means one map/one file)', 'statinfo'); + $this->addLog('Ratio map per classes: ' . $pc . '% ' . $this->evaluation($pc) . + ' (less is better. 100% means one map/one class)', 'statinfo'); + $this->addLog('Map size: ' . round($this->statByteUsed / 1024, 1) . + " kbytes (less is better, it's an estimate of the memory used by the map)", 'statinfo'); + $this->addLog('Map size Compressed: ' . round($this->statByteUsedCompressed / 1024, 1) . + " kbytes (less is better, it's an estimate of the memory used by the map)", 'statinfo'); + } else { + $this->addLog('No folder specified'); + } + } + + /** + * returns the name of the filename if the original filename constains .php then it is not added, otherwise + * it is added. + * + * @return string + */ + public function getFileName(): string + { + if (strpos($this->savefileName, '.php') === false) { + return $this->savefileName . $this->extension; + } + return $this->savefileName; + } + + public function listFolderFiles($dir): array + { + $arr = []; + $json = []; + $this->listFolderFilesAlt($dir, $arr, $json); + return [$arr, $json]; + } + + public function listFolderFilesAlt($dir, &$list, &$json): array + { + if ($dir === '') { + return []; + } + $ffs = @scandir($this->fixRelative($dir)); + if ($ffs === false) { + $this->addLog("\nError: Unable to reader folder [$dir]. Check the name of the folder and the permissions", + 'error'); + $this->statError++; + return []; + } + foreach ($ffs as $ff) { + if ($ff !== '.' && $ff !== '..') { + if ($ff === 'composer.json') { + $json[] = $list[] = $dir . '/' . $ff; + } + if ((strlen($ff) >= 5) && substr($ff, -4) === $this->extension) { + // PHP_OS_FAMILY=='Windows' + $list[] = $dir . '/' . $ff; + } + if (is_dir($dir . '/' . $ff)) { + $this->listFolderFilesAlt($dir . '/' . $ff, $list, $json); + } + } + } + return $list; + } + + private function fixRelative($path) + { + if (strpos($path, '..') !== false) { + return getcwd() . '/' . $path; + } + return $path; + } + + public function parseJSONFile($filename) + { + try { + $filenameFixed = $this->fixRelative($filename) . '/composer.json'; + if (is_file($filenameFixed)) { + $content = file_get_contents($filenameFixed); + } else { + return []; + } + if ($this->debugMode) { + echo $filename . ' trying token...
'; + } + $tokens = json_decode($content, true); + } catch (Exception $ex) { + echo "Error in $filename\n"; + die(1); + } + return $tokens['autoload']['files'] ?? []; + } + + public function genPath($path) + { + $path = $this->fixSeparator($path); + if (strpos($path, $this->baseGen) === 0) { + $min1 = strrpos($path, '/'); + $min2 = strrpos($this->baseGen . '/', '/'); + //$min=min(strlen($path),strlen($this->baseGen)); + $min = min($min1, $min2); + $baseCommon = $min; + for ($i = 0; $i < $min; $i++) { + if (substr($path, 0, $i) !== substr($this->baseGen, 0, $i)) { + $baseCommon = $i - 2; + break; + } + } + // moving down the relative path (/../../) + $c = substr_count(substr($this->baseGen, $baseCommon), '/'); + $r = str_repeat('/..', $c); + // moving up the relative path + $r2 = substr($path, $baseCommon); + return $r . $r2; + } + return substr($path, strlen($this->baseGen)); + } + + /** + * @param $filename + * @param string $runMe + * + * @return array + */ + public function parsePHPFile($filename, string &$runMe): array + { + $runMe = ''; + $r = []; + try { + if (is_file($this->fixRelative($filename))) { + $content = file_get_contents($this->fixRelative($filename)); + } else { + return []; + } + if ($this->debugMode) { + echo $filename . ' trying token...
'; + } + $tokens = token_get_all($content); + } catch (Exception $ex) { + echo "Error in $filename\n"; + die(1); + } + foreach ($tokens as $token) { + if (is_array($token) && ($token[0] === T_COMMENT || $token[0] === T_DOC_COMMENT)) { + if (strpos($token[1], '@noautoload') !== false) { + $runMe = '@noautoload'; + return []; + } + if (strpos($token[1], '@autorun') !== false) { + if (strpos($token[1], '@autorunclass') !== false) { + $runMe = '@autorunclass'; + } elseif (strpos($token[1], '@autorun first') !== false) { + $runMe = '@autorun first'; + } else { + $runMe = '@autorun'; + } + } + } + } + $nameSpace = ''; + $className = ''; + foreach ($tokens as $p => $token) { + if (is_array($token) && $token[0] === T_NAMESPACE) { + // We found a namespace + $ns = ''; + for ($i = $p + 2; $i < $p + 30; $i++) { + if (is_array($tokens[$i])) { + $ns .= $tokens[$i][1]; + } else { + // tokens[$p]==';' ?? + break; + } + } + $nameSpace = $ns; + } + $isClass = false; + // A class is defined by a T_CLASS + a space + name of the class. + if (is_array($token) && ($token[0] === T_CLASS || $token[0] === T_INTERFACE || $token[0] === T_TRAIT) && + is_array($tokens[$p + 1]) && $tokens[$p + 1][0] === T_WHITESPACE) { + $isClass = true; + if (is_array($tokens[$p - 1]) && $tokens[$p - 1][0] === T_PAAMAYIM_NEKUDOTAYIM && + $tokens[$p - 1][1] === '::') { + // /namespace/Nameclass:class <-- we skip this case. + $isClass = false; + } + } + if ($isClass) { + // encontramos una clase + $min = min($p + 30, count($tokens) - 1); + for ($i = $p + 2; $i < $min; $i++) { + if (is_array($tokens[$i]) && $tokens[$i][0] === T_STRING) { + $className = $tokens[$i][1]; + break; + } + } + $r[] = ['namespace' => trim($nameSpace), 'classname' => trim($className)]; + } + } // foreach + return $r; + } + + /** + * @param string $path + * @param string[] $exclusions + * + * @return bool + */ + private function inExclusion(string $path, array $exclusions): bool + { + foreach ($exclusions as $ex) { + if ($ex !== '') { + if ($ex[strlen($ex) - 1] === '*') { + $bool = $this->startwith($path, substr($ex, 0, -1)); + if ($bool) { + return true; + } + } + if ($ex[0] === '*') { + $bool = $this->endswith($path, $ex); + if ($bool) { + return true; + } + } + if ((strpos($ex, '*') === false) && $path === $ex) { + return true; + } + } + } + return false; + } + + public function startwith($string, $test): bool + { + return strpos($string, $test) === 0; + } + + public function endswith($string, $test): bool + { + $strlen = strlen($string); + $testlen = strlen($test); + if ($testlen > $strlen) { + return false; + } + return substr_compare($string, $test, $strlen - $testlen, $testlen) === 0; + } + + public function genautoload($file, $namespaces, $namespacesAlt, $pathAbsolute, $autoruns) + { + $template = "filename.
+ * example: ['namespace\Class']='folder\file.php' + */ +${{tempname}}__arrautoloadCustom = [ +{{custom}} +]; +${{tempname}}__arrautoloadCustomCommon = [ +{{customCommon}} +]; + +/* @var string[] ${{tempname}}__arrautoload It stores the map of definitions as namespace=>folder + * Example: ['namespace']='folder' + */ +${{tempname}}__arrautoload = [ +{{include}} +]; +${{tempname}}__arrautoloadCommon = [ +{{includeCommon}} +]; + +/** + * @var boolean[] ${{tempname}}__arrautoloadAbsolute It stores the map absolutely
+ * Example: $['namespace' or 'namespace\Class']=true if it's absolute (it uses the full path) + */ +${{tempname}}__arrautoloadAbsolute = [ +{{includeabsolute}} +]; + +/** + * @param $class_name + * @throws Exception + */ +function {{tempname}}__auto($class_name) +{ + // it's called only if the class is not loaded. + set_exception_handler('autoloadone_exception_handler'); + $p=strrpos($class_name,'\\'); + if($p!==false) { + $ns=substr($class_name,0,$p); + $cls=substr($class_name,$p+1); + } else { + $ns=''; + $cls=$class_name; + } + // special cases + if (isset($GLOBALS['{{tempname}}__arrautoloadCustom'][$class_name])) { + {{tempname}}__loadIfExists($class_name,$GLOBALS['{{tempname}}__arrautoloadCustom'][$class_name] + , $class_name,'{{tempname}}__arrautoloadCustomCommon'); + restore_exception_handler(); + return; + } + // normal (folder) cases + if (isset($GLOBALS['{{tempname}}__arrautoload'][$ns])) { + {{tempname}}__loadIfExists($class_name,$GLOBALS['{{tempname}}__arrautoload'][$ns] . '/' . $cls . '.php' + , $ns,'{{tempname}}__arrautoloadCommon'); + restore_exception_handler(); + return; + } + if(!class_exists($class_name)) { + throw new RuntimeException("AutoLoadOne Error: No file found for class [$class_name]"); + } + restore_exception_handler(); +} + +/** + * We load the file. + * @param string $className the name of the class + * @param string $filename the filename to load + * @param string $key key of the class it could be the full class name or only the namespace + * @param string $arrayName [optional] it's the name of the arrayname used to replaced |n| values. + * @throws Exception + */ +function {{tempname}}__loadIfExists($className,$filename, $key,$arrayName='') +{ + if (isset($GLOBALS['{{tempname}}__arrautoloadAbsolute'][$key])) { + $fullFile = $filename; // it's an absolute path + if (strpos($fullFile, '../') === 0) { // Or maybe, not, it's a remote-relative path. + $oldDir = getcwd(); // we copy the current url + chdir(__DIR__); + } + } else { + $fullFile = __DIR__ . '/' . {{tempname}}__replaceCurlyVariable($filename, $arrayName); // it's relative to this path + } + if ((@include $fullFile) === false) { + if ($GLOBALS['autoloadone__debug']) { + throw new RuntimeException("AutoLoadOne Error: Loading file [$fullFile] for class [$className]"); + } + throw new RuntimeException("AutoLoadOne Error: No file found for class [$className]"); + } + if (isset($oldDir)) { + chdir($oldDir); + } +} +function {{tempname}}__replaceCurlyVariable($string,$arrayName) { + if(strpos($string,'|')===false) { + return $string; + } // nothing to replace. + return preg_replace_callback('/\\|\s?(\w+)\s?\\|/u', static function ($matches) use ($arrayName) { + $item = is_array($matches) ? substr($matches[0], 1, -1) + : substr($matches, 1, -1); + return $GLOBALS[$arrayName][$item]; + }, $string); +} +function autoloadone_exception_handler($exception) { + $isCli=!http_response_code(); + $r="Uncaught Exception: [".get_class($exception)."] code:".$exception->getCode()."\n".$exception->getMessage()."\n"; + if ($GLOBALS['autoloadone__debug']) { + $r .= "Trace:\n"; + foreach ($exception->getTrace() as $error) { + // we remove all trace pointing to this file. + if (isset($error['file'])) { + if(strpos($error['file'], __FILE__) === false) { + $r .= @$error['file'] . '[' . @$error['line'] . ']' . ' function:' . @$error['function'] . '(' + .( is_array(@$error['args']) ? @implode(',', @$error['args']) . ')' :@$error['args']) + . "\n"; + } else { + $r .= '(nofile)' . '[' . @$error['line'] . ']' . ' function:' . @$error['function'] . '(' + .( is_array(@$error['args']) ? @implode(',', @$error['args']) . ')' :@$error['args']) + . "\n"; + } + } + } + } + if(!$isCli) { + $r=str_replace(["\n",'[',']'],["
","[","]"],$r); + } + echo $r; + die(1); +} + + + +spl_autoload_register(static function ($class_name) { + {{tempname}}__auto($class_name); +}); +// {{autorun_flag}} +{{autorun}} + +EOD; + $includeNotCompressed = $this->createArrayPHP($namespaces); + $customNotCompressed = $this->createArrayPHP($namespacesAlt); + $commonAbsolute = $this->compress($namespacesAlt); + //$commonNameSpace=$this->compress($namespaces); + $commonNameAbs = $this->compress($namespaces); + $custom = $this->createArrayPHP($namespacesAlt); + $htmlCommonAbsolute = $this->createArrayPHP($commonAbsolute); + $include = $this->createArrayPHP($namespaces); + $htmlCommonNameAbs = $this->createArrayPHP($commonNameAbs); + $includeAbsolute = ''; + foreach ($pathAbsolute as $k => $v) { + if ($v) { + $includeAbsolute .= "\t'$k' => true,\n"; + } + } + $includeAbsolute = rtrim($includeAbsolute, ",\n"); + $autorun = ''; // + $excludePathArr = str_replace(["\n", "\r"], '', $this->excludePath); + $excludePathArr = explode(',', $excludePathArr); + foreach ($excludePathArr as $key => $item) { + $excludePathArr[$key] = trim($item); + } + if (_AUTOLOAD_COMPOSERJSON) { + foreach ($autoruns as $v) { + if ($this->inExclusion(dirname($v), $excludePathArr)) { + $autorun .= "// @include __DIR__.'$v'; // excluded by path\n"; + } else { + $autorun .= "@include __DIR__.'$v';\n"; + } + } + } + // 1024 is the memory used by code, *1.3 is an overhead, usually it's mess. + $this->statByteUsedCompressed = (strlen($include) + strlen($includeAbsolute) + strlen($custom)) * 1.3 + 1024; + $this->statByteUsed = + (strlen($includeNotCompressed) + strlen($htmlCommonAbsolute) + strlen($htmlCommonNameAbs) + + strlen($includeAbsolute) + strlen($customNotCompressed)) * 1.3 + 1024; + $template = str_replace(array( + '{{custom}}', + '{{include}}', + '{{customCommon}}', + '{{includeabsolute}}', + '{{includeCommon}}', + '{{tempname}}', + '{{autorun}}', + '{{autorun_flag}}', + '{{version}}', + '{{extension}}', + '{{date}}' + ), array( + $custom, + $include, + $htmlCommonAbsolute, + $includeAbsolute, + $htmlCommonNameAbs, + substr(uniqid('s'), 0, 6), // we don't need a long name. + $autorun, + _AUTOLOAD_COMPOSERJSON ? + 'Autorun: this file was created using _AUTOLOAD_COMPOSERJSON=true' + : 'Autorun: this file was created using _AUTOLOAD_COMPOSERJSON=false so autorun is disabled', + $this::VERSION, + $this->extension, + date('Y/m/d H:i:s') + ), $template); + if ($this->savefile) { + $ok = @file_put_contents($file, $template); + if ($ok) { + $this->addLog("File $file generated", 'info'); + $ok = $this->saveParam(); + if ($ok === false) { + $this->addLog('Unable to save configuration file ' . $file . + '. It is not obligatory.', 'warning'); + } + } else { + $this->addLog("Unable to write file $file. Check the folder and permissions. You could write it manually.", + 'error'); + $this->statError++; + } + $this->addLog('', 'info'); + } + return $template; + } + + private function createArrayPHP($array): string + { + $result = ''; + foreach ($array as $k => $v) { + if (is_numeric($k)) { + $result .= "\t$k => '$v',\n"; + } else { + $result .= "\t'$k' => '$v',\n"; + } + } + return rtrim($result, ",\n"); + } + + /** + * It compresses the paths + * + * @param string[] $paths An associative array with the paths + * + * @return array + */ + public function compress(array &$paths): array + { + if (!$this->compression) { + return []; + } + $arr = $paths; + $foundIndex = 0; + $found = []; + foreach ($arr as $item) { + if (strlen($item) > 10) { // we compress path of at least 20 characters. + $maxcount = 0; + $last = strlen($item); + for ($index = $last; $index > 10; $index--) { // we compress up to 20 characters. + $sum = 0; + $findme = substr($item, 0, $index); + foreach ($arr as $item2) { + if (strpos($item2, $findme) === 0) { + $sum += $index; // it counts the number of characters + } + } + if ($sum > $maxcount && + $sum >= $index * 2) { // it must save at least x2 the number of characters compressed + $maxcount = $sum; + $foundIndex++; + $foundKey = '|' . $foundIndex . '|'; + // replace + foreach ($arr as $k2 => $item2) { + if (strpos($item2, $findme) === 0) { + $arr[$k2] = str_replace($findme, $foundKey, $item2); + /** @noinspection PhpUnusedLocalVariableInspection */ + $sum += $index; // it counts the number of characters + } + } + $found[$foundIndex] = $findme; + } + } + } + } + $paths = $arr; + return $found; + } + + /** + * @return bool|int + */ + private function saveParam() + { + if (!_AUTOLOAD_SAVEPARAM) { + return false; + } + $param = []; + $currentPath = $this->dirNameLinux(getcwd(), false); + $param['rooturl'] = $this->rooturl === $currentPath ? '.' : $this->rooturl; + $param['fileGen'] = $this->fileGen === $currentPath ? '.' : $this->fileGen; + $param['savefile'] = $this->savefile; + $param['compression'] = $this->compression; + $param['savefileName'] = $this->savefileName; + $param['excludeNS'] = $this->excludeNS; + $param['excludePath'] = $this->excludePath; + $param['externalPath'] = $this->externalPath; + $fullPHP = @file_get_contents($this->savefileName); + if ($fullPHP === false) { + return false; + } + $a1 = strpos($fullPHP, '/* -- CONFIG START HERE --'); + if ($a1 === false) { + return false; + } + $a1 += strlen('/* -- CONFIG START HERE --'); + $a2 = strpos($fullPHP, "\n-- CONFIG END HERE -- */", $a1); + if ($a2 === false) { + return false; + } + $txt = substr($fullPHP, 0, $a1) . "\n" + . json_encode($param, JSON_PRETTY_PRINT + JSON_UNESCAPED_SLASHES + JSON_UNESCAPED_UNICODE) . + substr($fullPHP, $a2); + return @file_put_contents($this->savefileName, $txt); + } + + private function evaluation($percentage): string + { + switch (true) { + case $percentage === 0: + return 'How?'; + case $percentage < 10: + return 'Awesome'; + case $percentage < 25: + return 'Good'; + case $percentage < 40: + return 'Acceptable'; + case $percentage < 80: + return 'Bad.'; + } + return 'The worst'; + } + + public function render(): void + { + if ($this->debugMode) { + ob_clean(); + } + if (PHP_SAPI === 'cli') { + $t2 = microtime(true); + echo "\n" . (round(($t2 - $this->t1) * 1000) / 1000) . " sec. Finished\n"; + } elseif (!$this->logged) { + $web = <<<'LOGS' + + + + + + AutoLoadOneGenerator Login Screen + + +LOGS; + $web .= $this->bootstrapcss(); + $web .= <<<'LOGS' + + + +
+
+
+
+
+
+
+

Login Screen

+
+
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + + +LOGS; + echo $web; + } else { + $web = <<<'TEM1' + + + + + + AutoLoadOneGenerator {{version}} + + + +TEM1; + $web .= $this->bootstrapcss(); + $web .= <<<'TEM1' + + + +
+
+
+
+
+
+
+

AutoLoadOneGenerator {{version}}.

+
+
+
+
+
+ +     + +
+
+
+
+ +
+
+ + The root folder to scan files
+ Extension scanned: {{extension}}
+ PHP files that contain the comment @noautoload are ignored
+ The path used here is case sensitive, even in Windows.
+ PHP files that don't contain a class/interface are ignored.
+ {{autorun_enable}}
+ Examples: +
Absolute paths: c:\root\folder, + c:/root/folder, /root/folder
+ Relative paths: folder/other, folder\other
+
+
+
+
+ +
+
+ + Full or relative path (local file) where the autoload{{extension}} + will be generated.
+ Example:
/etc/httpd/web,c:\apache\htdoc
+ Note: This path is also used to determine the relativity of the includes
+
+
+ +
+
+ +
+
+ +
+ +
+ The PHP file that we want to generate. You could generate it manually (copy and paste the result)
+
+
+
+
+ +
+
+ + Folder(s) of the external library without trailing "/" separated by comma or in a new line.
+ The folders will be stored as an absolute path however, it's possible to use a relative path.
+ Example:
+ C:\temp\folder
+ /folder/somefolder
+ ../../mapache-commons\lib (relative path to the result folder)
+
+
+
+ +
+
+ + Namespaces without trailing "/" separated by comma or in a new line. It includes local and external folders. +
Example:
+ /mynamespace,/mynamespace2/subnamespace
+
+
+
+ +
+
+ + The relative path without trailing "/" separated by comma or in a new line. + You could also use the wildcard (*). +
Example:
+ vendor/pchart/class Exclude the folder but not the subfolders.
+ /path* for any folder that starts with "/path*,"path/folder".."
+ */path for any folder that ends with "*/path"
+
+
+
+ +
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+ +
+
+
{{log}}
+
+
+
+
+ +
+
+
{{logstat}}
+
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +     + +
+
+ + +
+ +
+
+
+
+
+ + + +TEM1; + $web = str_replace(array( + '{{rooturl}}', + '{{autorun_enable}}', + '{{fileGen}}', + '{{extension}}', + '{{excludeNS}}', + '{{externalPath}}', + '{{excludePath}}', + '{{savefile}}', + '{{savefileName}}', + '{{stop}}', + '{{compression}}', + '{{log}}', + '{{logstat}}', + '{{version}}', + '{{result}}' + ), array( + $this->rooturl, + _AUTOLOAD_COMPOSERJSON ? '_AUTOLOAD_COMPOSERJSON=true Composer.json autorun is considered. PHP files that contain the comment "@autorun" are executed (even if they don\'t have a class)
+ PHP files that contain the comment "@autorun first" are executed with priority
' + : '_AUTOLOAD_COMPOSERJSON=false. @autorun flag and composer.json autorun are not considered', + $this->fileGen, + $this->extension, + $this->excludeNS, + $this->externalPath, + $this->excludePath, + ($this->savefile) ? 'checked' : '', + $this->savefileName, + ($this->stop) ? 'checked' : '', + ($this->compression) ? 'checked' : '', + $this->log, + $this->logStat, + $this::VERSION, + $this->result + ), $web); + $this->cli = "php autoloadone.php -folder \"$this->rooturl\" -filegen \"$this->fileGen\" -save "; + $tmp = ($this->compression ? 'yes' : 'no'); + $this->cli .= "-compression $tmp "; + $tmp = str_replace(array("\n", "\r"), '', $this->excludeNS); + $this->cli .= "-excludens \"$tmp\" "; + $tmp = str_replace(array("\n", "\r"), '', $this->externalPath); + $this->cli .= "-externalpath \"$tmp\" "; + $tmp = str_replace(array("\n", "\r"), '', $this->excludePath); + $this->cli .= "-excludepath \"$tmp\""; + $web = str_replace('{{cli}}', $this->cli, $web); + $t2 = microtime(true); + $ms = (round(($t2 - $this->t1) * 1000) / 1000) . ' sec.'; + $web = str_replace('{{ms}}', $ms, $web); + echo $web; + } + } + + public function bootstrapcss(): string + { + return << +html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:transparent}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],.input-group-sm input[type=time],input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],.input-group-lg input[type=time],input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.in{opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;opacity:0;line-break:auto}.tooltip.in{opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} + +BOOTS; + } +} // end class AutoLoadOne +if (_AUTOLOAD_SELFRUN || PHP_SAPI === 'cli') { + $auto = new AutoLoadOne(); + $auto->init(); + $auto->process(); + $auto->render(); +} + +// @noautoload +/* + * @noautoload + */ diff --git a/README.md b/README.md index b1e4b21..4c3d350 100644 --- a/README.md +++ b/README.md @@ -1,692 +1,695 @@ -# PHP Auto Include AutoLoadOne Generator - -AutoloadOne is a program that generates an autoload class (Auto Include) for PHP that is project specific. This class is useful to use classes on code without calling each "include" manually. It is a direct alternative to Composer's autoload, but it works differently. -Composer's autoload, scans the folders during runtime, while this library only scans the folder once, and it stores the result. - -[![Packagist](https://img.shields.io/packagist/v/eftec/autoloadone.svg)](https://packagist.org/packages/eftec/autoloadone) -[![Total Downloads](https://poser.pugx.org/eftec/autoloadone/downloads)](https://packagist.org/packages/eftec/autoloadone) -[![Maintenance](https://img.shields.io/maintenance/yes/2023.svg)]() -[![composer](https://img.shields.io/badge/composer-%3E1.8-blue.svg)]() -[![php](https://img.shields.io/badge/php-7.1-green.svg)]() -[![php](https://img.shields.io/badge/php-8.x-green.svg)]() -[![CocoaPods](https://img.shields.io/badge/docs-60%25-yellow.svg)]() - - - -Contrary to other alternatives, it supports the easiest way to autoload classes using PHP without sacrifice performance. - How it works?. AutoLoadOne pre-calculates every class of a project and generates a single autoload.php (or the name -indicated) file that it's ready to use. You don't need a specific folder, structure or rule to use it. Just generate -the autoload file **class**, **include,** and you are ready to load any class (even classes without a namespace, classes in the -namespace in different folders, multiple classes defined in a single file...). - -AutoLoadOne is a replacement to Composer's Autoload, rendering obsolete the use of psr-0 or psr-4. - - -> NOTE: If you run the dev-distro, then you must exclude the example/ folder because it contains @autorun tags. - -**Last Update 26 Jan, 2023** - -> "Universal Autoloading classes in PHP, any class, any time!" - -## Table of Contents - - -* [PHP Auto Include AutoLoadOne Generator](#php-auto-include-autoloadone-generator) - * [Table of Contents](#table-of-contents) - * [How it Works?](#how-it-works) - * [When I should re-run AutoLoadOne?](#when-i-should-re-run-autoloadone) - * [Composer Autoload features:](#composer-autoload-features-) - * [AutoLoadOne extended features:](#autoloadone-extended-features-) - * [Getting started](#getting-started) - * [Usage using the CLI](#usage-using-the-cli) - * [Usage via code](#usage-via-code) - * [Usage (generate code via Web)](#usage--generate-code-via-web-) - * [Usage (via cli)](#usage--via-cli-) - * [Usage of the generated file (autoload.php)](#usage-of-the-generated-file--autoloadphp-) - * [Note](#note) - * [Autorun](#autorun) - * [Extension](#extension) - * [Statistic and optimization](#statistic-and-optimization) - * [How can I reduce the map?](#how-can-i-reduce-the-map) - * [Test](#test) - * [AutoLoadOne](#autoloadone) - * [Optimized AutoLoadOne](#optimized-autoloadone) - * [Composer's autoload (using optimize)](#composers-autoload--using-optimize-) - * [Why the size matter?.](#why-the-size-matter) - * [Lookup usage?](#lookup-usage) - * [How many lookup are called?.](#how-many-lookup-are-called) - * [TEST II (Magento 2.2.3)](#test-ii--magento-223-) - * [Let's say we have 1000 concurrent users](#lets-say-we-have-1000-concurrent-users) - * [Compression and Magento.](#compression-and-magento) - * [Code execution.](#code-execution) - * [Benchmark](#benchmark) - * [Security](#security) - * [Composer.json](#composerjson) - * [Version](#version) - * [Todo](#todo) - - -## How it Works? - -:one: - Run AutoLoadOne.php as CLI or as Web. -:two: - AutoLoadOne will generate a single file called autoload.php (or the name indicated) based in your project. -For the record, it takes mere 1.5 seconds to scan WordPress and yes, it is compatible with WordPress. -:three: - Include the generated file (ex: autoload.php) in your project code and start using it. - -## When I should re-run AutoLoadOne? - -You don't need to run it again if you are adding a new class with the same namespace in the same folder. - -Also, you could edit autoload.php manually by adding more classes and namespaces. - -Or you could run AutoLoadOne.php again and replace the old generated file. - -## Composer Autoload features: -:black_square_button: One class per file -:black_square_button: One Namespace per file. -:black_square_button: The file must have a namespace. -:black_square_button: It requires composer. -:black_square_button: It validates the file each file the class is loaded per user. -:black_square_button: The structure of the folders should be pre-defined. -:white_check_mark: Support CLI - -## AutoLoadOne extended features: -:white_check_mark: One or Many classes per file. -:white_check_mark: One or many namespaces per file. -:white_check_mark: The file could contain optionally a namespace. -:white_check_mark: It only requires PHP -:white_check_mark: The folder structure and classes are validated once. -:white_check_mark: If you add a class that shares a previous folder and uses the previous namespace, then you don't need to run the generator. -:white_check_mark: You could use any structure of folder. It's recommended to use the same folder for the same namespace, -but it's not a requisite. -:white_check_mark: Support CLI and Web-UI. -:white_check_mark: It doesn't require APCU, lock files or cache. -:white_check_mark: It´s compatible with practically any project, including a project that uses Composer's autoload. -:white_check_mark: It's compatible with PSR-0, PSR-4, and practically any specification, since you don't need to use -any special configuration or standard. -:white_check_mark: It allows libraries outside the project folder. -For example /someuser/myproject/ allows to include libraries from the folder /otheruser/library/ -:white_check_mark: It doesn't require APCU, lock files or cache. -:white_check_mark: It has a minimum impact on runtime. -:white_check_mark: It allows compression without impacting the runtime. - -## Getting started - -You could run directly AutoLoadOne.php (via web of via CLI), or you could create a file that calls it. - -## Usage using the CLI - -You must execute it in the root folder, and it will generate a file called autoload.php. - -```shell -php AutoLoadOne.php -generate -``` -> If AutoLoadOne.php is not in the same folder then you can copy it, or set the path to use it -> php /somefolder/AutoLoadOne.php -generate -> There are more commands that you can use but -generate is the basic and out-the-box experience. - - -## Usage via code - -* Copy AutoLoadOne.php in the root folder (recommended) of your project -* Execute it directly or -* Create the next PHP file (in the root folder) and execute it. - -```php -init(); -$auto->process(); -$auto->render(); -``` - - - -## Usage (generate code via Web) - -:one: - Copy the file **autoloadone.php** somewhere. - -:two: - For security, you could edit the first lines of the class **autoloadone.php**. Change the user, password and autoloadenter if it's required. - -```php - -``` -:three: - Start the browser - -Enter your user and password. If _AUTOLOAD_ENTER is true then you are logged automatically. - -![autoloadone login](https://github.com/EFTEC/AutoLoadOne/blob/master/doc/login.jpg "Autoloadone logon") - - -:four: - Select the folder to scan, then select the file to generate and finally press the button GENERATE. - -![autoloadone screen](https://github.com/EFTEC/AutoLoadOne/blob/master/doc/screen.jpg "Autoloadone screen") - -* Root Folder : The folder to scan. -* Generated File: The full path (local) of the autoload.php. Even if you are not using the generation of file, you must specify it, because the program uses for determine the relative path. -* Save File: If you check it, then generate file will be generated. If PHP doesn't have access to save the file, then you could copy the code manually (screen Result) -* Excluded Namespace : Namespace excluded of mapping. -* Excluded Map : Paths excluded to scan (they are not recursives) - - - -:five: - The result should look this: - -![autoloadone screen2](https://raw.githubusercontent.com/EFTEC/AutoLoadOne/master/doc/screen2.jpg "Autoloadone screen2") - -## Usage (via cli) - -![autoloadone cli](https://raw.githubusercontent.com/EFTEC/AutoLoadOne/master/doc/cli1.jpg) - -In the shell, browser to the folder where you want to generate the code and run the next command - -Commands available : - -* current (scan and generates files from the current folder) -* folder (folder to scan) -* filegen (folder where autoload.php will be generate) -* filename (name of the filename to generate by default its autoload.php) -* save yes/no (save the file to generate).This option is required. -* excludens (namespace excluded) -* excludepath (path excluded) -* externalpath (include an external path). An external path is a library that lives outside the project folder - - -> Example: php autoloadone.php -folder folder\scan -filegen folder\whereautoload\ -save yes - - -``` -php folder/located/autoloadone.php -current -``` - - - -## Usage of the generated file (autoload.php) - -:one: -include the generated file by the previous step. ex: autoload.php - -```php - -``` -and that's it!. - -In the /test folder you could find some example to try. - -> Note:Finally, you could delete the file autoloadone.php if you wish for. - -## Note - -> If you want to exclude a class, you could add the namespace to the exclude list, or you could skip a folder. -> Also, if a class has the next comment, it's excluded automatically: - -```php - -``` - - -## Autorun - -> If you want to execute (run) a php file, then you could add the next comment. - -```php - -``` - -> You could also set priority to the execution by adding a comment with @autorun first - -```php - -``` - - -> If you find the error: Parse error: syntax error, in on line 000. Then some php files scanned have some syntax error. The solution is to fix the problem or to exclude the whole folder. -> How to find the file with error? You could run the page with the debug flag: autoloadone.php?debug=1 - -## Extension - -You could change the extension (by default it is .php) by running the next command - -```php -$auto=new AutoLoadOne(); -$auto->extension='.php'; // it's not required. By default it's .php -``` - -## Statistic and optimization - -This library generates the next statistics. **The objective is simple, you must reduce (in the possible), the size of the map. The smaller the map, then the better.** - -``` -Number of Classes: 42 -Number of Namespaces: 12 -Number of Maps: 16 -Number of PHP Files: 50 -Number of PHP Autorun: 3 -Number of conflicts: 0 -Ratio map per file: 32% Acceptable (less is better. 100% means one map/one file)< -Ratio map per classes: 38.1% Acceptable (less is better. 100% means one map/one class) -Map size: 3.1 kbytes (less is better, it's an estimate of the memory used by the map) -``` -Example of the screen: - -![autoloadone screen](doc/screen3.jpg "Autoloadone screen") - -In the log file: -* White means a normal operation -* Yellow means a warning. For example, some file was excluded. -* Green means an optimization. -* Blue means an important operation was done succesfully. -* Red is an error that must be attended. - - -### How can I reduce the map? - -* You could use one class / one file, also, the class must have the same name as the filename. **The name of the namespace is irrelevant** - > Example Customer.php and class Customer { } -* Grouping classes of the same namespace in the same folder. So, the library could map the whole namespace as a single folder instead of map per file/class. -* * :file_folder: repository (_repositoryns\\_) -* * * :page_with_curl: MyClass.php _repositoryns\\MyClass_ -* * * :page_with_curl: MyClass2.php _repositoryns\\MyClass2_ -* * :file_folder: model (_namespace_model\\_) -* * * :page_with_curl: MyClass.php _namespace_model\\MyClass_ -* * * :page_with_curl: MyClass2.php _namespace_model\\MyClass2_ -* You could remove (:scissors:) namespaces and folders that you don't need it. Some namespaces and folders are used by the system however, they don't require to be autoloaded because they are loaded manually (for example, most libraries load -its own include manually) -* * :file_folder: somelibrary -* * * :page_with_curl: MainLibraryClass.php -* * * :page_with_curl: IncludesLibrary.php :scissors: -* * * :file_folder: somelibrary :scissors: -* * * * :page_with_curl: MoreIncludesLibrary.php :scissors: -* * * * :page_with_curl: MoreIncludesLibrary.php :scissors: -* You could also exclude a file/class/include/strut by adding the tag **@noautoload** -```php -/* @noautoload */ -class Someclass { - -} -``` -* * :file_folder: somelibrary -* * * :page_with_curl: MainLibraryClass.php -* * * :page_with_curl: IncludesLibrary.php **@noautoload** :scissors: -* Only files with the extension **.php** (or the defined extension) are loaded. So, Files **.inc**, **.phpinclude** or similar, are automatically excluded (:scissors:). -* * :file_folder: somelibrary -* * * :page_with_curl: file.inc.php (inc.php is included but .inc) -* * * :page_with_curl: IncludesLibrary.inc :scissors: -* * * :page_with_curl: MoreIncludesLibrary.inc :scissors: -* Another optimization is to write **many classes in the same file**. This library even allows to use multi classes / multi namespaces in the same file. So, it's possible to create a bulk version of a project. -* * :page_with_curl: AllClassesOneFile.php -* * * namespace _repositoryns\\_ -* * * * class _repositoryns\\MyClass_ -* * * * class _repositoryns\\MyClass3_ -* * * namespace _anotherns\\MyClass2_ -* * * * class _anotherns\\MyClass2_ - -## Test - -I created an empty blog on Laravel. The project is empty but the default libraries and components. - - -Files: - - 7545 files in total. (including files that aren't PHP files) - -### AutoLoadOne - - Number of Classes: 5565 - Number of Namespaces: 765 - Number of Maps: 2305 (you want to reduce it) - Number of PHP Files: 6302 - Number of PHP Autorun: 0 - Number of conflicts: 31 - -File generated: - - autoload.php 231kb. - -### Optimized AutoLoadOne - -I separated PHPUnit and Mockery from the project. Why? Both libraries are for unit test. - -excluded namespace = /vendor/phpunit/*,/vendor/mockery/* - - - Number of Classes: 5565 - Number of Namespaces: 765 - Number of Maps: 1535 (you want to reduce it) - Number of PHP Files: 6302 - Number of PHP Autorun: 0 - Number of conflicts: 13 - -File generated: - - autoload.php 159kb. - -### Composer's autoload (using optimize) - -composer dump-autoload -o - - Generated optimized autoload files containing 3519 classes - Number of Maps: 3519 (static and not-static) - -Autoload uses one of the next methods: - -* Static: (fast method, it uses more memory, and it requires to be calculated manually) - - - autoload.php 1kb - autoload_real.php 3kb - autoload_static.php 468kb - ClassLoader.php 14kb - - -* Not static: (default method) - - - autoload.php 1kb - autoload_real.php 3kb - autoload_namespaces.php 1kb - autoload_psr4.php 4kb - autoload_classmap.php 426kb - - -### Why the size matter?. - -Let's say we are calling a single webpage that uses autoload. - -If we use **Composer's autoload (static)**, we are also calling a file that uses **468kb** (plus other files), and this memory is loaded into the memory. It could use (an average of) **609kb of ram** per call (it's around PHP file x 1.3 x 1kb) - -For example, what if we have **1000 concurrent users**. It will use 609kb x 1000 = **609mb of ram** thanks to Autoload alone at the same time and with **10k concurrent users** we will use **6gb of ram** only because autoload. - - -With **AutoLoadOne**, it is optimized to **302mb** (1000 users) or 3gb (10k users), it is for the version not optimized. - -AutoLoadOne tags all classes from the project, including classes that aren't defined in composer.json (unless they are excluded from the project). **Composer's autoload found only 3519 classes, while AutoLoadOne found all classes of the project (5565).** - -However, some classes are not required to be loaded by the project (for example unit test classes), so we could exclude those classes of the project. - -For example, excluding PHPUnit and Mockery reduces the use to 206mb (1000 users) or 2gb (10k users) but **we could optimize it even further.** - -| Concurrent Users | Composer's autoload (Optimized) | AutoLoadOne | AutoLoadOne Optimized | AutoLoadOne Optimized and compressed | -|------------------|---------------------------------|-------------|-----------------------|--------------------------------------| -| 1000 | 609mb | 301mb | 206mb | 130mb | -| 10000 | 6gb | 3gb | 2gb | 1gb | - - -### Lookup usage? - -Let's say we have a "map" with different elements. How much time does it take to find the element of the map?. - -| Map size | Time (1 million of lookup sequentially) | -|-----------|-----------------------------------------| -| 100 | 0.271 seconds +/- | -| 10.000 | 0.299 seconds +/- | -| 1.000.000 | 0.376 seconds +/- | - -So, the size of the map/lookup time is not important. The difference between a small map (100 elements) versus a huge map (1 million of elements) is 0.1 second in total (per 1 millon of queries). -However, the memory usage matters, and it could impact the performance considerably. - -#### How many lookup are called?. - -Let's say we have 10k concurrent users and each one calls 100 different classes. It means we are doing 10k x 100 = 1 million of lookup at the same time. - -## TEST II (Magento 2.2.3) - -Magento is a huge project, it has 22k PHP files and from it, 20k are classes. - -AutoLoadOne: - - Number of Classes: 21063 - Number of Namespaces: 7018 - Number of Maps: 9473 (you want to reduce it) - Number of PHP Files: 22862 - Number of PHP Autorun: 0 - Number of conflicts: 6 - Ratio map per file: 41.44% Bad. (less is better. 100% means one map/one file) - Ratio map per classes: 44.97% Bad. (less is better. 100% means one map/one class) - Map size: 1398.7 kbytes (less is better, it's an estimate of the memory used by the map) - Map size Compressed: 1195.1 kbytes (less is better, it's an estimate of the memory used by the map) - -It takes +/- 200 seconds to generate the autoload.php - -In comparison, Composer's autoload (optimized) uses - - Generated optimized autoload files containing 11582 classes - Number of Maps: 11582 classes (2.6mb of memory will be use per request per user) - -| Composer's autoload (optimized) | AutoLoadOne (not optimized) | AutoLoadOne (not optimized, compressed) | -|---------------------------------|-----------------------------|-----------------------------------------| -| 2.6mb | 1.36mb | 1.16mb | - -However, it is without a manual optimization. - -### Let's say we have 1000 concurrent users - -| Concurrent Users(*) | Composer's autoload (Optimized) | AutoLoadOne (not optimized) | AutoLoadOne (compressed) | -|---------------------|---------------------------------|-----------------------------|--------------------------| -| 1000 | 2.6gb | 1.36gb | 1.16gb | -| 10000 | 26gb | 13.6gb | 11.6gb | - -> (*) However, Magento wasn't create for concurrency. But, however what we are measuring is not the number of -> concurrent users but the number of concurrent calls (for example rest-json, opening a page and such). - -### Compression and Magento. - -While AutoLoadOne is able to compress the map, but it only compresses the path of it, not the namespace. It is -because the compression is aimed to generate the minimum impact on the system. Magento relies on heavily in huge -namespaces so the compression is unable to compress them. But still, the system is able to compress values in 15%. - -In general, the compression allows to shrink the values in 40-50%. - - -### Code execution. - -Both AutoLoadOne and Composer's autoload execute a code when it is initialized/executed. - -When AutoLoadOne generates the map, it consists of two relational arrays as follows: - -```php - private $_arrautoloadCustom = array( - 'Magento\AdminNotification' => '/app/code/', - 'Magento\Notice' => '/app/code/Developer/',... - -``` - -While Composer's autoload generates an array that requires concatenation. - -```php -array( - 'Magento\\AdminNotification' => $baseDir . '/app/code/MagentoActions.php', - 'Magento\\Notice' => $baseDir . '/app/code/Developer/Notice.php', -``` - -So it requires to concatenate each map (with a variable called $baseDir). So Composer's autoload affects slighly the performance. - - -## Benchmark - -PHP 7.1.18 + Windows 10 + SSD. - -![AutoloadOne Benchmark](https://raw.githubusercontent.com/EFTEC/AutoLoadOne/master/doc/speed.jpg) - -_More is better._ - - -> I did a synthetic benchmark by loading different classes and reading the performance of it. Since my machine has a SSD disk then, the impact of the disk is minimum in comparison with a mechanical hard disk. -> This chart compares the performance against INCLUDE. - -## Security - -You could block the access to the file - -RedirectMatch 403 ^/folder/^/folder/.*$ - -> :heavy_exclamation_mark: While the program has a build-in-security measure, however I suggest to protect adding new layers of security such as locating the AutoLoadOne.php file -outside the public/web folder. - -> AutoLoadOne.php is not safe (because it writes a generate file), it doesn't have access to the database, neither it allows to write any content to the file but, it could overwrite an exist code and put down a system. - -> However, the generate file is safe (autoload.php) and you could expose to the net. - -* Change the user and password and set _AUTOLOAD_ENTER to false. -* Or, Don't put this file in your public website. -* Or, change the filename. -* Or, you could block the access to the file using .htaccess or similar. - -``` -RewriteEngine On -RewriteBase / - - -Order Allow,Deny -Deny from all - -``` - -* Or you could restrict the access to PHP, and it's the behaviour by default on Linux (it runs under Apache's account -, most of the time as user NOBODY) - - -## Composer.json - -Commonly, this library does not need **composer.json**, and it actively ignores its configuration (because it reads the PHP - source code directly). However, since 1.19, AutoLoadOne reads (optionally) part of the information of composer.json (for compatibility -purpose). For example, the library **guzzlehttp** uses this feature. - -> Note: it requires to set the constant _AUTOLOAD_COMPOSERJSON to **true**. By default, this variable is **false**. - -Let's say the next file: - -composer.json - -```json -{ - "autoload": { - "psr-4": { - "blahblahblah": "some folder blahblahblah/" - }, - "files": ["src/functions_include.php"] - } -} -``` - -If AUTOLOAD_COMPOSERJSON is true the AutoLoadOne includes the file (or files) declared in composer.json and declared -in 'files'. This file or files is added to our autoload.php as follows: - -Our code to generate autorun.php -```php -define("_AUTOLOAD_COMPOSERJSON",true); -include 'vendor/eftec/autoloadone/AutoLoadOne.php'; -``` - -And our autorun.php generated. -```php -@include __DIR__.'/folder/jsontest/src/functions_include.php'; -``` -Since it is done once (when autoload.php is generated), then this feature does not affect the performance because it -reads the composer.json files once. - - -## Version -* 1.28 2023-01-26 - * Small cleanups -* 1.27 2022-08-27 - * [fix] fixed a problem with double mapped. -* 1.26 2022-02-21 - * [fix] compatibility with PHP 8.1. - * Raising the compatibility with php 7.1.5 and higher. If you want to use an old version, then you can use 1.25.1 - * Adding AutoLoadOne as a composer's binary file. -* 1.25.1 2021-06-09 - * [fix] in autoloadone_exception_handler when the arguments of the error is not an array but a string. -* 1.25 2021-04-17 - * A better error management. Now, it shows the line of the error in a custom trace. -* 1.24 2021-04-17 - * [cli] Re-colored the CLI. - * [code] Some cleanups in the code. - * [fix] Now the generated file shows the correct hour. -* 1.23 2021-02-26 - * Updatted the file generated. -* 1.22.2 2021-02-26 - * fixed composer.json -* 1.22.1 2021-02-26 - * fixed an error in the code -* 1.22 2021-02-26 - * Another fix (it failed to save the configuration file. It failed to use the same path for multiple classes) - * Configuration now it is stored in the same file autoload.php. The old file is still could be used but only if - the new configuration is not set or used. - * Removed part of the configuration, functions related with json and constants related with json. -* 1.21.2 2021-02-15 - * Removed wrong "']" characters. -* 1.21.1 2021-02-15 - * fixed composer.json (wrong number) -* 1.21 2021-02-15 - * Fixed a big problem with linux. It used basename(), but it works diffently in Linux and Windows. Now, it works in - Linux. -* 1.20 2020-09-02 - * some cleanups. - * The GUI has some examples. - * _AUTOLOAD_COMPOSERJSON is indicated where it is executed or not. -* 1.19.2 2020-06-05 - * composer.json feature is now optional (and disable by default) -* 1.19.1 2020-06-05 - * composer.json autoload-files now it could be excluded via "exclude-path" -* 1.19 2020-06-05 - * Added composer.json {'autoload':{'files':[]}} -* 1.18 2020-04-23 - * Some cleaning. - * The generated file is alsoc cleaned and optimized. -* 1.17 2020-01-26 (optional but by default), the map is compressed. - * The compression has a minimum impact on runtime, it only uses a regular expression to replace a string. -* 1.16 2019-08-04 Removed git reference. It's not used. Changed the style format to PSR -* 1.15 2019-06-08 Removed external css again. Now it generates the css inside the file. -* 1.14 2019-06-08 Fixed some bug. Reverted to global (const arrays are not compatible with php<7.0) -* 1.12 2019-05-10 Added some changes pushed. Removed css. -* 1.11 2019-03-04 It allows to specify the result php file. And some cleanups. Now, /namespace/nameclass:class is not considered a class -* 1.10 2018-10-18 It solves a small bug when we load autoload.php from a different url, -and it calls an external and remote folder. -* 1.9 2018-10-14 A small fix and some colors. -* 1.8 2018-10-14 Added external path and some fixes. Now you could add a path without comma (it's added automatically) [WebUI] -* 1.7 2018-10-12 Some small fixes. Now by default, the system uses the caller's path instead of the AutoLoadOne.php path. -* 1.6 2018-09-28 Added wildcard (*) to exclusion list (folders). -* 1.5 2018-09-05 Now the interface open automatically by default. This file must be deleted or restricted if it's used publicity. -* 1.4 2018-08-25 Some example. Now the interface doesn't open automatically by default. It's for security. -* 1.3 2018-07-05 Now it works with interface, and it fixes a problem with some specific file. It also fixes a problem -with linux vs Windows folder. -* 1.2 2018-07-01 Lots of changes. Modified exclusion. Title and icons for the web ui. It also allows to disable the web. -* 1.1 2018-06-26 Some fixes. -* 1.0 2018-06-24 First version - -## Todo -* ~~Save configuration~~ -* ~~CLI (more commands)~~ -* Clean the code. -* ~~Convert to a single class.~~ -* ~~External folder/library (relative or absolute path)~~ -* The generation fails if a php file has an error. -* ~~Specify the extensions. By default, it scans only .php files.~~ +# PHP Auto Include AutoLoadOne Generator + +AutoloadOne is a program that generates an autoload class (Auto Include) for PHP that is project specific. This class is useful to use classes on code without calling each "include" manually. It is a direct alternative to Composer's autoload, but it works differently. +Composer's autoload, scans the folders during runtime, while this library only scans the folder once, and it stores the result. + +[![Packagist](https://img.shields.io/packagist/v/eftec/autoloadone.svg)](https://packagist.org/packages/eftec/autoloadone) +[![Total Downloads](https://poser.pugx.org/eftec/autoloadone/downloads)](https://packagist.org/packages/eftec/autoloadone) +[![Maintenance](https://img.shields.io/maintenance/yes/2025.svg)]() +[![composer](https://img.shields.io/badge/composer-%3E2.0-blue.svg)]() +[![php](https://img.shields.io/badge/php-7.4-green.svg)]() +[![php](https://img.shields.io/badge/php-8.4-green.svg)]() +[![CocoaPods](https://img.shields.io/badge/docs-60%25-yellow.svg)]() + + + +Contrary to other alternatives, it supports the easiest way to autoload classes using PHP without sacrifice performance. + How it works?. AutoLoadOne pre-calculates every class of a project and generates a single autoload.php (or the name +indicated) file that it's ready to use. You don't need a specific folder, structure or rule to use it. Just generate +the autoload file **class**, **include,** and you are ready to load any class (even classes without a namespace, classes in the +namespace in different folders, multiple classes defined in a single file...). + +AutoLoadOne is a replacement to Composer's Autoload, rendering obsolete the use of psr-0 or psr-4. + + +> NOTE: If you run the dev-distro, then you must exclude the example/ folder because it contains @autorun tags. + +**Last Update 26 Jan, 2023** + +> "Universal Autoloading classes in PHP, any class, any time!" + +## Table of Contents + + +* [PHP Auto Include AutoLoadOne Generator](#php-auto-include-autoloadone-generator) + * [Table of Contents](#table-of-contents) + * [How it Works?](#how-it-works) + * [When I should re-run AutoLoadOne?](#when-i-should-re-run-autoloadone) + * [Composer Autoload features:](#composer-autoload-features-) + * [AutoLoadOne extended features:](#autoloadone-extended-features-) + * [Getting started](#getting-started) + * [Usage using the CLI](#usage-using-the-cli) + * [Usage via code](#usage-via-code) + * [Usage (generate code via Web)](#usage--generate-code-via-web-) + * [Usage (via cli)](#usage--via-cli-) + * [Usage of the generated file (autoload.php)](#usage-of-the-generated-file--autoloadphp-) + * [Note](#note) + * [Autorun](#autorun) + * [Extension](#extension) + * [Statistic and optimization](#statistic-and-optimization) + * [How can I reduce the map?](#how-can-i-reduce-the-map) + * [Test](#test) + * [AutoLoadOne](#autoloadone) + * [Optimized AutoLoadOne](#optimized-autoloadone) + * [Composer's autoload (using optimize)](#composers-autoload--using-optimize-) + * [Why the size matter?.](#why-the-size-matter) + * [Lookup usage?](#lookup-usage) + * [How many lookup are called?.](#how-many-lookup-are-called) + * [TEST II (Magento 2.2.3)](#test-ii--magento-223-) + * [Let's say we have 1000 concurrent users](#lets-say-we-have-1000-concurrent-users) + * [Compression and Magento.](#compression-and-magento) + * [Code execution.](#code-execution) + * [Benchmark](#benchmark) + * [Security](#security) + * [Composer.json](#composerjson) + * [Version](#version) + * [Todo](#todo) + + +## How it Works? + +:one: + Run AutoLoadOne.php as CLI or as Web. +:two: + AutoLoadOne will generate a single file called autoload.php (or the name indicated) based in your project. +For the record, it takes mere 1.5 seconds to scan WordPress and yes, it is compatible with WordPress. +:three: + Include the generated file (ex: autoload.php) in your project code and start using it. + +## When I should re-run AutoLoadOne? + +You don't need to run it again if you are adding a new class with the same namespace in the same folder. + +Also, you could edit autoload.php manually by adding more classes and namespaces. + +Or you could run AutoLoadOne.php again and replace the old generated file. + +## Composer Autoload features: +:black_square_button: One class per file +:black_square_button: One Namespace per file. +:black_square_button: The file must have a namespace. +:black_square_button: It requires composer. +:black_square_button: It validates the file each file the class is loaded per user. +:black_square_button: The structure of the folders should be pre-defined. +:white_check_mark: Support CLI + +## AutoLoadOne extended features: +:white_check_mark: One or Many classes per file. +:white_check_mark: One or many namespaces per file. +:white_check_mark: The file could contain optionally a namespace. +:white_check_mark: It only requires PHP +:white_check_mark: The folder structure and classes are validated once. +:white_check_mark: If you add a class that shares a previous folder and uses the previous namespace, then you don't need to run the generator. +:white_check_mark: You could use any structure of folder. It's recommended to use the same folder for the same namespace, +but it's not a requisite. +:white_check_mark: Support CLI and Web-UI. +:white_check_mark: It doesn't require APCU, lock files or cache. +:white_check_mark: It´s compatible with practically any project, including a project that uses Composer's autoload. +:white_check_mark: It's compatible with PSR-0, PSR-4, and practically any specification, since you don't need to use +any special configuration or standard. +:white_check_mark: It allows libraries outside the project folder. +For example /someuser/myproject/ allows to include libraries from the folder /otheruser/library/ +:white_check_mark: It doesn't require APCU, lock files or cache. +:white_check_mark: It has a minimum impact on runtime. +:white_check_mark: It allows compression without impacting the runtime. + +## Getting started + +You could run directly AutoLoadOne.php (via web of via CLI), or you could create a file that calls it. + +## Usage using the CLI + +You must execute it in the root folder, and it will generate a file called autoload.php. + +```shell +php AutoLoadOne.php -generate +``` +> If AutoLoadOne.php is not in the same folder then you can copy it, or set the path to use it +> php /somefolder/AutoLoadOne.php -generate +> There are more commands that you can use but -generate is the basic and out-the-box experience. + + +## Usage via code + +* Copy AutoLoadOne.php in the root folder (recommended) of your project +* Execute it directly or +* Create the next PHP file (in the root folder) and execute it. + +```php +init(); +$auto->process(); +$auto->render(); +``` + + + +## Usage (generate code via Web) + +:one: + Copy the file **autoloadone.php** somewhere. + +:two: + For security, you could edit the first lines of the class **autoloadone.php**. Change the user, password and autoloadenter if it's required. + +```php + +``` +:three: + Start the browser + +Enter your user and password. If _AUTOLOAD_ENTER is true then you are logged automatically. + +![autoloadone login](https://github.com/EFTEC/AutoLoadOne/blob/master/doc/login.jpg "Autoloadone logon") + + +:four: + Select the folder to scan, then select the file to generate and finally press the button GENERATE. + +![autoloadone screen](https://github.com/EFTEC/AutoLoadOne/blob/master/doc/screen.jpg "Autoloadone screen") + +* Root Folder : The folder to scan. +* Generated File: The full path (local) of the autoload.php. Even if you are not using the generation of file, you must specify it, because the program uses for determine the relative path. +* Save File: If you check it, then generate file will be generated. If PHP doesn't have access to save the file, then you could copy the code manually (screen Result) +* Excluded Namespace : Namespace excluded of mapping. +* Excluded Map : Paths excluded to scan (they are not recursives) + + + +:five: + The result should look this: + +![autoloadone screen2](https://raw.githubusercontent.com/EFTEC/AutoLoadOne/master/doc/screen2.jpg "Autoloadone screen2") + +## Usage (via cli) + +![autoloadone cli](https://raw.githubusercontent.com/EFTEC/AutoLoadOne/master/doc/cli1.jpg) + +In the shell, browser to the folder where you want to generate the code and run the next command + +Commands available : + +* current (scan and generates files from the current folder) +* folder (folder to scan) +* filegen (folder where autoload.php will be generate) +* filename (name of the filename to generate by default its autoload.php) +* save yes/no (save the file to generate).This option is required. +* excludens (namespace excluded) +* excludepath (path excluded) +* externalpath (include an external path). An external path is a library that lives outside the project folder + + +> Example: php autoloadone.php -folder folder\scan -filegen folder\whereautoload\ -save yes + + +``` +php folder/located/autoloadone.php -current +``` + + + +## Usage of the generated file (autoload.php) + +:one: +include the generated file by the previous step. ex: autoload.php + +```php + +``` +and that's it!. + +In the /test folder you could find some example to try. + +> Note:Finally, you could delete the file autoloadone.php if you wish for. + +## Note + +> If you want to exclude a class, you could add the namespace to the exclude list, or you could skip a folder. +> Also, if a class has the next comment, it's excluded automatically: + +```php + +``` + + +## Autorun + +> If you want to execute (run) a php file, then you could add the next comment. + +```php + +``` + +> You could also set priority to the execution by adding a comment with @autorun first + +```php + +``` + + +> If you find the error: Parse error: syntax error, in on line 000. Then some php files scanned have some syntax error. The solution is to fix the problem or to exclude the whole folder. +> How to find the file with error? You could run the page with the debug flag: autoloadone.php?debug=1 + +## Extension + +You could change the extension (by default it is .php) by running the next command + +```php +$auto=new AutoLoadOne(); +$auto->extension='.php'; // it's not required. By default it's .php +``` + +## Statistic and optimization + +This library generates the next statistics. **The objective is simple, you must reduce (in the possible), the size of the map. The smaller the map, then the better.** + +``` +Number of Classes: 42 +Number of Namespaces: 12 +Number of Maps: 16 +Number of PHP Files: 50 +Number of PHP Autorun: 3 +Number of conflicts: 0 +Ratio map per file: 32% Acceptable (less is better. 100% means one map/one file)< +Ratio map per classes: 38.1% Acceptable (less is better. 100% means one map/one class) +Map size: 3.1 kbytes (less is better, it's an estimate of the memory used by the map) +``` +Example of the screen: + +![autoloadone screen](doc/screen3.jpg "Autoloadone screen") + +In the log file: +* White means a normal operation +* Yellow means a warning. For example, some file was excluded. +* Green means an optimization. +* Blue means an important operation was done succesfully. +* Red is an error that must be attended. + + +### How can I reduce the map? + +* You could use one class / one file, also, the class must have the same name as the filename. **The name of the namespace is irrelevant** + > Example Customer.php and class Customer { } +* Grouping classes of the same namespace in the same folder. So, the library could map the whole namespace as a single folder instead of map per file/class. +* * :file_folder: repository (_repositoryns\\_) +* * * :page_with_curl: MyClass.php _repositoryns\\MyClass_ +* * * :page_with_curl: MyClass2.php _repositoryns\\MyClass2_ +* * :file_folder: model (_namespace_model\\_) +* * * :page_with_curl: MyClass.php _namespace_model\\MyClass_ +* * * :page_with_curl: MyClass2.php _namespace_model\\MyClass2_ +* You could remove (:scissors:) namespaces and folders that you don't need it. Some namespaces and folders are used by the system however, they don't require to be autoloaded because they are loaded manually (for example, most libraries load +its own include manually) +* * :file_folder: somelibrary +* * * :page_with_curl: MainLibraryClass.php +* * * :page_with_curl: IncludesLibrary.php :scissors: +* * * :file_folder: somelibrary :scissors: +* * * * :page_with_curl: MoreIncludesLibrary.php :scissors: +* * * * :page_with_curl: MoreIncludesLibrary.php :scissors: +* You could also exclude a file/class/include/strut by adding the tag **@noautoload** +```php +/* @noautoload */ +class Someclass { + +} +``` +* * :file_folder: somelibrary +* * * :page_with_curl: MainLibraryClass.php +* * * :page_with_curl: IncludesLibrary.php **@noautoload** :scissors: +* Only files with the extension **.php** (or the defined extension) are loaded. So, Files **.inc**, **.phpinclude** or similar, are automatically excluded (:scissors:). +* * :file_folder: somelibrary +* * * :page_with_curl: file.inc.php (inc.php is included but .inc) +* * * :page_with_curl: IncludesLibrary.inc :scissors: +* * * :page_with_curl: MoreIncludesLibrary.inc :scissors: +* Another optimization is to write **many classes in the same file**. This library even allows to use multi classes / multi namespaces in the same file. So, it's possible to create a bulk version of a project. +* * :page_with_curl: AllClassesOneFile.php +* * * namespace _repositoryns\\_ +* * * * class _repositoryns\\MyClass_ +* * * * class _repositoryns\\MyClass3_ +* * * namespace _anotherns\\MyClass2_ +* * * * class _anotherns\\MyClass2_ + +## Test + +I created an empty blog on Laravel. The project is empty but the default libraries and components. + + +Files: + + 7545 files in total. (including files that aren't PHP files) + +### AutoLoadOne + + Number of Classes: 5565 + Number of Namespaces: 765 + Number of Maps: 2305 (you want to reduce it) + Number of PHP Files: 6302 + Number of PHP Autorun: 0 + Number of conflicts: 31 + +File generated: + + autoload.php 231kb. + +### Optimized AutoLoadOne + +I separated PHPUnit and Mockery from the project. Why? Both libraries are for unit test. + +excluded namespace = /vendor/phpunit/*,/vendor/mockery/* + + + Number of Classes: 5565 + Number of Namespaces: 765 + Number of Maps: 1535 (you want to reduce it) + Number of PHP Files: 6302 + Number of PHP Autorun: 0 + Number of conflicts: 13 + +File generated: + + autoload.php 159kb. + +### Composer's autoload (using optimize) + +composer dump-autoload -o + + Generated optimized autoload files containing 3519 classes + Number of Maps: 3519 (static and not-static) + +Autoload uses one of the next methods: + +* Static: (fast method, it uses more memory, and it requires to be calculated manually) + + + autoload.php 1kb + autoload_real.php 3kb + autoload_static.php 468kb + ClassLoader.php 14kb + + +* Not static: (default method) + + + autoload.php 1kb + autoload_real.php 3kb + autoload_namespaces.php 1kb + autoload_psr4.php 4kb + autoload_classmap.php 426kb + + +### Why the size matter?. + +Let's say we are calling a single webpage that uses autoload. + +If we use **Composer's autoload (static)**, we are also calling a file that uses **468kb** (plus other files), and this memory is loaded into the memory. It could use (an average of) **609kb of ram** per call (it's around PHP file x 1.3 x 1kb) + +For example, what if we have **1000 concurrent users**. It will use 609kb x 1000 = **609mb of ram** thanks to Autoload alone at the same time and with **10k concurrent users** we will use **6gb of ram** only because autoload. + + +With **AutoLoadOne**, it is optimized to **302mb** (1000 users) or 3gb (10k users), it is for the version not optimized. + +AutoLoadOne tags all classes from the project, including classes that aren't defined in composer.json (unless they are excluded from the project). **Composer's autoload found only 3519 classes, while AutoLoadOne found all classes of the project (5565).** + +However, some classes are not required to be loaded by the project (for example unit test classes), so we could exclude those classes of the project. + +For example, excluding PHPUnit and Mockery reduces the use to 206mb (1000 users) or 2gb (10k users) but **we could optimize it even further.** + +| Concurrent Users | Composer's autoload (Optimized) | AutoLoadOne | AutoLoadOne Optimized | AutoLoadOne Optimized and compressed | +|------------------|---------------------------------|-------------|-----------------------|--------------------------------------| +| 1000 | 609mb | 301mb | 206mb | 130mb | +| 10000 | 6gb | 3gb | 2gb | 1gb | + + +### Lookup usage? + +Let's say we have a "map" with different elements. How much time does it take to find the element of the map?. + +| Map size | Time (1 million of lookup sequentially) | +|-----------|-----------------------------------------| +| 100 | 0.271 seconds +/- | +| 10.000 | 0.299 seconds +/- | +| 1.000.000 | 0.376 seconds +/- | + +So, the size of the map/lookup time is not important. The difference between a small map (100 elements) versus a huge map (1 million of elements) is 0.1 second in total (per 1 millon of queries). +However, the memory usage matters, and it could impact the performance considerably. + +#### How many lookup are called?. + +Let's say we have 10k concurrent users and each one calls 100 different classes. It means we are doing 10k x 100 = 1 million of lookup at the same time. + +## TEST II (Magento 2.2.3) + +Magento is a huge project, it has 22k PHP files and from it, 20k are classes. + +AutoLoadOne: + + Number of Classes: 21063 + Number of Namespaces: 7018 + Number of Maps: 9473 (you want to reduce it) + Number of PHP Files: 22862 + Number of PHP Autorun: 0 + Number of conflicts: 6 + Ratio map per file: 41.44% Bad. (less is better. 100% means one map/one file) + Ratio map per classes: 44.97% Bad. (less is better. 100% means one map/one class) + Map size: 1398.7 kbytes (less is better, it's an estimate of the memory used by the map) + Map size Compressed: 1195.1 kbytes (less is better, it's an estimate of the memory used by the map) + +It takes +/- 200 seconds to generate the autoload.php + +In comparison, Composer's autoload (optimized) uses + + Generated optimized autoload files containing 11582 classes + Number of Maps: 11582 classes (2.6mb of memory will be use per request per user) + +| Composer's autoload (optimized) | AutoLoadOne (not optimized) | AutoLoadOne (not optimized, compressed) | +|---------------------------------|-----------------------------|-----------------------------------------| +| 2.6mb | 1.36mb | 1.16mb | + +However, it is without a manual optimization. + +### Let's say we have 1000 concurrent users + +| Concurrent Users(*) | Composer's autoload (Optimized) | AutoLoadOne (not optimized) | AutoLoadOne (compressed) | +|---------------------|---------------------------------|-----------------------------|--------------------------| +| 1000 | 2.6gb | 1.36gb | 1.16gb | +| 10000 | 26gb | 13.6gb | 11.6gb | + +> (*) However, Magento wasn't create for concurrency. But, however what we are measuring is not the number of +> concurrent users but the number of concurrent calls (for example rest-json, opening a page and such). + +### Compression and Magento. + +While AutoLoadOne is able to compress the map, but it only compresses the path of it, not the namespace. It is +because the compression is aimed to generate the minimum impact on the system. Magento relies on heavily in huge +namespaces so the compression is unable to compress them. But still, the system is able to compress values in 15%. + +In general, the compression allows to shrink the values in 40-50%. + + +### Code execution. + +Both AutoLoadOne and Composer's autoload execute a code when it is initialized/executed. + +When AutoLoadOne generates the map, it consists of two relational arrays as follows: + +```php + private $_arrautoloadCustom = array( + 'Magento\AdminNotification' => '/app/code/', + 'Magento\Notice' => '/app/code/Developer/',... + +``` + +While Composer's autoload generates an array that requires concatenation. + +```php +array( + 'Magento\\AdminNotification' => $baseDir . '/app/code/MagentoActions.php', + 'Magento\\Notice' => $baseDir . '/app/code/Developer/Notice.php', +``` + +So it requires to concatenate each map (with a variable called $baseDir). So Composer's autoload affects slighly the performance. + + +## Benchmark + +PHP 7.1.18 + Windows 10 + SSD. + +![AutoloadOne Benchmark](https://raw.githubusercontent.com/EFTEC/AutoLoadOne/master/doc/speed.jpg) + +_More is better._ + + +> I did a synthetic benchmark by loading different classes and reading the performance of it. Since my machine has a SSD disk then, the impact of the disk is minimum in comparison with a mechanical hard disk. +> This chart compares the performance against INCLUDE. + +## Security + +You could block the access to the file + +RedirectMatch 403 ^/folder/^/folder/.*$ + +> :heavy_exclamation_mark: While the program has a build-in-security measure, however I suggest to protect adding new layers of security such as locating the AutoLoadOne.php file +outside the public/web folder. + +> AutoLoadOne.php is not safe (because it writes a generate file), it doesn't have access to the database, neither it allows to write any content to the file but, it could overwrite an exist code and put down a system. + +> However, the generate file is safe (autoload.php) and you could expose to the net. + +* Change the user and password and set _AUTOLOAD_ENTER to false. +* Or, Don't put this file in your public website. +* Or, change the filename. +* Or, you could block the access to the file using .htaccess or similar. + +``` +RewriteEngine On +RewriteBase / + + +Order Allow,Deny +Deny from all + +``` + +* Or you could restrict the access to PHP, and it's the behaviour by default on Linux (it runs under Apache's account +, most of the time as user NOBODY) + + +## Composer.json + +Commonly, this library does not need **composer.json**, and it actively ignores its configuration (because it reads the PHP + source code directly). However, since 1.19, AutoLoadOne reads (optionally) part of the information of composer.json (for compatibility +purpose). For example, the library **guzzlehttp** uses this feature. + +> Note: it requires to set the constant _AUTOLOAD_COMPOSERJSON to **true**. By default, this variable is **false**. + +Let's say the next file: + +composer.json + +```json +{ + "autoload": { + "psr-4": { + "blahblahblah": "some folder blahblahblah/" + }, + "files": ["src/functions_include.php"] + } +} +``` + +If AUTOLOAD_COMPOSERJSON is true the AutoLoadOne includes the file (or files) declared in composer.json and declared +in 'files'. This file or files is added to our autoload.php as follows: + +Our code to generate autorun.php +```php +define("_AUTOLOAD_COMPOSERJSON",true); +include 'vendor/eftec/autoloadone/AutoLoadOne.php'; +``` + +And our autorun.php generated. +```php +@include __DIR__.'/folder/jsontest/src/functions_include.php'; +``` +Since it is done once (when autoload.php is generated), then this feature does not affect the performance because it +reads the composer.json files once. + + +## Version +* 1.29 2024-12-30 + * update dependencies. + * cleaned the code +* 1.28 2023-01-26 + * Small cleanups +* 1.27 2022-08-27 + * [fix] fixed a problem with double mapped. +* 1.26 2022-02-21 + * [fix] compatibility with PHP 8.1. + * Raising the compatibility with php 7.1.5 and higher. If you want to use an old version, then you can use 1.25.1 + * Adding AutoLoadOne as a composer's binary file. +* 1.25.1 2021-06-09 + * [fix] in autoloadone_exception_handler when the arguments of the error is not an array but a string. +* 1.25 2021-04-17 + * A better error management. Now, it shows the line of the error in a custom trace. +* 1.24 2021-04-17 + * [cli] Re-colored the CLI. + * [code] Some cleanups in the code. + * [fix] Now the generated file shows the correct hour. +* 1.23 2021-02-26 + * Updatted the file generated. +* 1.22.2 2021-02-26 + * fixed composer.json +* 1.22.1 2021-02-26 + * fixed an error in the code +* 1.22 2021-02-26 + * Another fix (it failed to save the configuration file. It failed to use the same path for multiple classes) + * Configuration now it is stored in the same file autoload.php. The old file is still could be used but only if + the new configuration is not set or used. + * Removed part of the configuration, functions related with json and constants related with json. +* 1.21.2 2021-02-15 + * Removed wrong "']" characters. +* 1.21.1 2021-02-15 + * fixed composer.json (wrong number) +* 1.21 2021-02-15 + * Fixed a big problem with linux. It used basename(), but it works diffently in Linux and Windows. Now, it works in + Linux. +* 1.20 2020-09-02 + * some cleanups. + * The GUI has some examples. + * _AUTOLOAD_COMPOSERJSON is indicated where it is executed or not. +* 1.19.2 2020-06-05 + * composer.json feature is now optional (and disable by default) +* 1.19.1 2020-06-05 + * composer.json autoload-files now it could be excluded via "exclude-path" +* 1.19 2020-06-05 + * Added composer.json {'autoload':{'files':[]}} +* 1.18 2020-04-23 + * Some cleaning. + * The generated file is alsoc cleaned and optimized. +* 1.17 2020-01-26 (optional but by default), the map is compressed. + * The compression has a minimum impact on runtime, it only uses a regular expression to replace a string. +* 1.16 2019-08-04 Removed git reference. It's not used. Changed the style format to PSR +* 1.15 2019-06-08 Removed external css again. Now it generates the css inside the file. +* 1.14 2019-06-08 Fixed some bug. Reverted to global (const arrays are not compatible with php<7.0) +* 1.12 2019-05-10 Added some changes pushed. Removed css. +* 1.11 2019-03-04 It allows to specify the result php file. And some cleanups. Now, /namespace/nameclass:class is not considered a class +* 1.10 2018-10-18 It solves a small bug when we load autoload.php from a different url, +and it calls an external and remote folder. +* 1.9 2018-10-14 A small fix and some colors. +* 1.8 2018-10-14 Added external path and some fixes. Now you could add a path without comma (it's added automatically) [WebUI] +* 1.7 2018-10-12 Some small fixes. Now by default, the system uses the caller's path instead of the AutoLoadOne.php path. +* 1.6 2018-09-28 Added wildcard (*) to exclusion list (folders). +* 1.5 2018-09-05 Now the interface open automatically by default. This file must be deleted or restricted if it's used publicity. +* 1.4 2018-08-25 Some example. Now the interface doesn't open automatically by default. It's for security. +* 1.3 2018-07-05 Now it works with interface, and it fixes a problem with some specific file. It also fixes a problem +with linux vs Windows folder. +* 1.2 2018-07-01 Lots of changes. Modified exclusion. Title and icons for the web ui. It also allows to disable the web. +* 1.1 2018-06-26 Some fixes. +* 1.0 2018-06-24 First version + +## Todo +* ~~Save configuration~~ +* ~~CLI (more commands)~~ +* Clean the code. +* ~~Convert to a single class.~~ +* ~~External folder/library (relative or absolute path)~~ +* The generation fails if a php file has an error. +* ~~Specify the extensions. By default, it scans only .php files.~~ diff --git a/composer.json b/composer.json index 83e550e..84d965f 100644 --- a/composer.json +++ b/composer.json @@ -1,24 +1,24 @@ -{ - "name": "eftec/autoloadone", - "description": "AutoloadOne is a program that generates an autoload class for PHP.", - "type": "software", - "keywords": ["php","autoload"], - "homepage": "https://github.com/EFTEC/AutoLoadOne", - "minimum-stability": "beta", - "license": "MIT", - "authors": [ - { - "name": "Jorge Patricio Castro Castillo", - "email": "jcastro@eftec.cl" - }], - "require": { - "ext-json": "*", - "php":">=7.2.5" - }, - "bin": [ - "autoloadone" - ], - "archive": { - "exclude": ["/examples"] - } -} +{ + "name": "eftec/autoloadone", + "description": "AutoloadOne is a program that generates an autoload class for PHP.", + "type": "software", + "keywords": ["php","autoload"], + "homepage": "https://github.com/EFTEC/AutoLoadOne", + "minimum-stability": "beta", + "license": "MIT", + "authors": [ + { + "name": "Jorge Patricio Castro Castillo", + "email": "jcastro@eftec.cl" + }], + "require": { + "ext-json": "*", + "php":">=7.4" + }, + "bin": [ + "autoloadone" + ], + "archive": { + "exclude": ["/examples"] + } +}