Browse Source

It's alive!

master
Skylar Ittner 4 years ago
commit
24f3af1aea
  1. 4
      .gitignore
  2. 7
      .htaccess
  3. 51
      add.php
  4. 39
      bits/navbar.php
  5. 13
      composer.json
  6. 78
      composer.lock
  7. 7
      css/bootstrap.min.css
  8. 21
      css/datatables.min.css
  9. 343
      css/fa-svg-with-js.css
  10. 120
      css/tables.css
  11. BIN
      database.mwb
  12. 71
      database.sql
  13. 25
      getresults.php
  14. 57
      img/icon.svg
  15. 100
      img/logo-inkscape.svg
  16. 109
      img/logo.svg
  17. 41
      index.php
  18. 7
      js/bootstrap.min.js
  19. 257
      js/datatables.min.js
  20. 5
      js/fontawesome-all.min.js
  21. 2
      js/jquery-3.3.1.min.js
  22. 7
      nbproject/project.properties
  23. 9
      nbproject/project.xml
  24. 7
      pages/404.php
  25. 21
      pages/create.php
  26. 76
      pages/home.php
  27. 4
      pages/index.php
  28. 81
      pages/question.php
  29. 132
      pages/respond.php
  30. 93
      required.php
  31. 18
      settings.template.php
  32. 24
      vote.php

4
.gitignore

@ -0,0 +1,4 @@
/nbproject/private/
/vendor/
/settings.php
/database.mwb.bak

7
.htaccess

@ -0,0 +1,7 @@
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^.*$ ./index.php

51
add.php

@ -0,0 +1,51 @@
<?php
require_once __DIR__ . "/required.php";
$question = $VARS['question'];
$answers = $VARS['answers'];
if (trim($question) == "" || trim($answers) == "") {
header("Location: ./create/error");
}
/**
* Generate question access codes.
* https://stackoverflow.com/a/4356295
* @param int $length
* @return string
*/
function generateRandomString($length = 4) {
$characters = 'ABCEFGHJKLMNPQRSTWXYZ';
$charactersLength = strlen($characters);
$randomString = '';
for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[rand(0, $charactersLength - 1)];
}
return $randomString;
}
$length = 4;
$code = generateRandomString($length);
$tries = 0;
while ($database->has("questions", ['qcode' => $code])) {
if ($tries > 10) {
$length++;
}
$code = generateRandomString($length);
$tries++;
}
$database->insert("questions", ['qtext' => $question, 'qcode' => $code]);
$qid = $database->id();
$answers = explode("\n", $answers);
foreach ($answers as $ans) {
if (trim($ans) != "") {
$database->insert("answers", ['atext' => trim($ans), 'qid' => $qid]);
}
}
header("Location: ./q/$code");

39
bits/navbar.php

@ -0,0 +1,39 @@
<nav class="navbar navbar-expand-sm navbar-light bg-light">
<a class="navbar-brand" href="./">
<?php
// Use custom icon if it exists
$iconsrc = "img/icon.svg";
if (file_exists(__DIR__ . "/../custom/icon.svg")) {
$iconsrc = "custom/icon.svg";
}
?>
<img src="<?php echo SITE_PATH . $iconsrc; ?>" width="30" height="30" alt="" class="mr-2 mb-1">
<?php echo SITE_TITLE; ?>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<?php
$navbar = [
["pageid" => "", "title" => "Home", "icon" => "fas fa-home"],
["pageid" => "create", "title" => "Create", "icon" => "fas fa-edit"],
];
foreach ($navbar as $item) {
$link = SITE_PATH . $item['pageid'];
?>
<li class="nav-item<?php echo $pageid == $item['pageid'] ? " active" : ""; ?>">
<a class="nav-link" href="<?php echo $link; ?>">
<span class="<?php echo $item['icon']; ?>"></span>
<?php echo $item['title']; ?>
<?php echo $pageid == $item['pageid'] ? "<span class=\"sr-only\">(current)</span>" : ""; ?>
</a>
</li>
<?php
}
?>
</ul>
</div>
</nav>

13
composer.json

@ -0,0 +1,13 @@
{
"name": "netsyms/openquestion",
"description": "Open source live question/answer system for presentations and trivia",
"require": {
"catfan/medoo": "^1.5"
},
"authors": [
{
"name": "Skylar Ittner",
"email": "admin@netsyms.com"
}
]
}

78
composer.lock

@ -0,0 +1,78 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "5bbaa9f3b34a2337b860d383e333da28",
"content-hash": "bbd7609b177a9695925ab398ac4f3292",
"packages": [
{
"name": "catfan/medoo",
"version": "v1.5.4",
"source": {
"type": "git",
"url": "https://github.com/catfan/Medoo.git",
"reference": "a6b7b05b18fa7c8f955e259d491344b1db9a51bf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/catfan/Medoo/zipball/a6b7b05b18fa7c8f955e259d491344b1db9a51bf",
"reference": "a6b7b05b18fa7c8f955e259d491344b1db9a51bf",
"shasum": ""
},
"require": {
"ext-pdo": "*",
"php": ">=5.4"
},
"suggest": {
"ext-pdo_dblib": "For MSSQL or Sybase database on Linux/UNIX platform",
"ext-pdo_mysql": "For MySQL or MariaDB database",
"ext-pdo_oci": "For Oracle database",
"ext-pdo_oci8": "For Oracle version 8 database",
"ext-pdo_pqsql": "For PostgreSQL database",
"ext-pdo_sqlite": "For SQLite database",
"ext-pdo_sqlsrv": "For MSSQL database"
},
"type": "framework",
"autoload": {
"psr-4": {
"Medoo\\": "/src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Angel Lai",
"email": "angel@catfan.me"
}
],
"description": "The lightest PHP database framework to accelerate development",
"homepage": "https://medoo.in",
"keywords": [
"database",
"lightweight",
"mariadb",
"mssql",
"mysql",
"oracle",
"php framework",
"postgresql",
"sql",
"sqlite"
],
"time": "2018-01-08 20:01:12"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
}

7
css/bootstrap.min.css
File diff suppressed because it is too large
View File

21
css/datatables.min.css
File diff suppressed because it is too large
View File

343
css/fa-svg-with-js.css

@ -0,0 +1,343 @@
/*!
* Font Awesome Free 5.0.6 by @fontawesome - http://fontawesome.com
* License - http://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
*/
svg:not(:root).svg-inline--fa {
overflow: visible; }
.svg-inline--fa {
display: inline-block;
font-size: inherit;
height: 1em;
overflow: visible;
vertical-align: -.125em; }
.svg-inline--fa.fa-lg {
vertical-align: -.225em; }
.svg-inline--fa.fa-w-1 {
width: 0.0625em; }
.svg-inline--fa.fa-w-2 {
width: 0.125em; }
.svg-inline--fa.fa-w-3 {
width: 0.1875em; }
.svg-inline--fa.fa-w-4 {
width: 0.25em; }
.svg-inline--fa.fa-w-5 {
width: 0.3125em; }
.svg-inline--fa.fa-w-6 {
width: 0.375em; }
.svg-inline--fa.fa-w-7 {
width: 0.4375em; }
.svg-inline--fa.fa-w-8 {
width: 0.5em; }
.svg-inline--fa.fa-w-9 {
width: 0.5625em; }
.svg-inline--fa.fa-w-10 {
width: 0.625em; }
.svg-inline--fa.fa-w-11 {
width: 0.6875em; }
.svg-inline--fa.fa-w-12 {
width: 0.75em; }
.svg-inline--fa.fa-w-13 {
width: 0.8125em; }
.svg-inline--fa.fa-w-14 {
width: 0.875em; }
.svg-inline--fa.fa-w-15 {
width: 0.9375em; }
.svg-inline--fa.fa-w-16 {
width: 1em; }
.svg-inline--fa.fa-w-17 {
width: 1.0625em; }
.svg-inline--fa.fa-w-18 {
width: 1.125em; }
.svg-inline--fa.fa-w-19 {
width: 1.1875em; }
.svg-inline--fa.fa-w-20 {
width: 1.25em; }
.svg-inline--fa.fa-pull-left {
margin-right: .3em;
width: auto; }
.svg-inline--fa.fa-pull-right {
margin-left: .3em;
width: auto; }
.svg-inline--fa.fa-border {
height: 1.5em; }
.svg-inline--fa.fa-li {
width: 2em; }
.svg-inline--fa.fa-fw {
width: 1.25em; }
.fa-layers svg.svg-inline--fa {
bottom: 0;
left: 0;
margin: auto;
position: absolute;
right: 0;
top: 0; }
.fa-layers {
display: inline-block;
height: 1em;
position: relative;
text-align: center;
vertical-align: -.125em;
width: 1em; }
.fa-layers svg.svg-inline--fa {
-webkit-transform-origin: center center;
transform-origin: center center; }
.fa-layers-text, .fa-layers-counter {
display: inline-block;
position: absolute;
text-align: center; }
.fa-layers-text {
left: 50%;
top: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
-webkit-transform-origin: center center;
transform-origin: center center; }
.fa-layers-counter {
background-color: #ff253a;
border-radius: 1em;
color: #fff;
height: 1.5em;
line-height: 1;
max-width: 5em;
min-width: 1.5em;
overflow: hidden;
padding: .25em;
right: 0;
text-overflow: ellipsis;
top: 0;
-webkit-transform: scale(0.25);
transform: scale(0.25);
-webkit-transform-origin: top right;
transform-origin: top right; }
.fa-layers-bottom-right {
bottom: 0;
right: 0;
top: auto;
-webkit-transform: scale(0.25);
transform: scale(0.25);
-webkit-transform-origin: bottom right;
transform-origin: bottom right; }
.fa-layers-bottom-left {
bottom: 0;
left: 0;
right: auto;
top: auto;
-webkit-transform: scale(0.25);
transform: scale(0.25);
-webkit-transform-origin: bottom left;
transform-origin: bottom left; }
.fa-layers-top-right {
right: 0;
top: 0;
-webkit-transform: scale(0.25);
transform: scale(0.25);
-webkit-transform-origin: top right;
transform-origin: top right; }
.fa-layers-top-left {
left: 0;
right: auto;
top: 0;
-webkit-transform: scale(0.25);
transform: scale(0.25);
-webkit-transform-origin: top left;
transform-origin: top left; }
.fa-lg {
font-size: 1.33333em;
line-height: 0.75em;
vertical-align: -.0667em; }
.fa-xs {
font-size: .75em; }
.fa-sm {
font-size: .875em; }
.fa-1x {
font-size: 1em; }
.fa-2x {
font-size: 2em; }
.fa-3x {
font-size: 3em; }
.fa-4x {
font-size: 4em; }
.fa-5x {
font-size: 5em; }
.fa-6x {
font-size: 6em; }
.fa-7x {
font-size: 7em; }
.fa-8x {
font-size: 8em; }
.fa-9x {
font-size: 9em; }
.fa-10x {
font-size: 10em; }
.fa-fw {
text-align: center;
width: 1.25em; }
.fa-ul {
list-style-type: none;
margin-left: 2.5em;
padding-left: 0; }
.fa-ul > li {
position: relative; }
.fa-li {
left: -2em;
position: absolute;
text-align: center;
width: 2em;
line-height: inherit; }
.fa-border {
border: solid 0.08em #eee;
border-radius: .1em;
padding: .2em .25em .15em; }
.fa-pull-left {
float: left; }
.fa-pull-right {
float: right; }
.fa.fa-pull-left,
.fas.fa-pull-left,
.far.fa-pull-left,
.fal.fa-pull-left,
.fab.fa-pull-left {
margin-right: .3em; }
.fa.fa-pull-right,
.fas.fa-pull-right,
.far.fa-pull-right,
.fal.fa-pull-right,
.fab.fa-pull-right {
margin-left: .3em; }
.fa-spin {
-webkit-animation: fa-spin 2s infinite linear;
animation: fa-spin 2s infinite linear; }
.fa-pulse {
-webkit-animation: fa-spin 1s infinite steps(8);
animation: fa-spin 1s infinite steps(8); }
@-webkit-keyframes fa-spin {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg); }
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg); } }
@keyframes fa-spin {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg); }
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg); } }
.fa-rotate-90 {
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";
-webkit-transform: rotate(90deg);
transform: rotate(90deg); }
.fa-rotate-180 {
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";
-webkit-transform: rotate(180deg);
transform: rotate(180deg); }
.fa-rotate-270 {
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";
-webkit-transform: rotate(270deg);
transform: rotate(270deg); }
.fa-flip-horizontal {
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";
-webkit-transform: scale(-1, 1);
transform: scale(-1, 1); }
.fa-flip-vertical {
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";
-webkit-transform: scale(1, -1);
transform: scale(1, -1); }
.fa-flip-horizontal.fa-flip-vertical {
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";
-webkit-transform: scale(-1, -1);
transform: scale(-1, -1); }
:root .fa-rotate-90,
:root .fa-rotate-180,
:root .fa-rotate-270,
:root .fa-flip-horizontal,
:root .fa-flip-vertical {
-webkit-filter: none;
filter: none; }
.fa-stack {
display: inline-block;
height: 2em;
position: relative;
width: 2em; }
.fa-stack-1x,
.fa-stack-2x {
bottom: 0;
left: 0;
margin: auto;
position: absolute;
right: 0;
top: 0; }
.svg-inline--fa.fa-stack-1x {
height: 1em;
width: 1em; }
.svg-inline--fa.fa-stack-2x {
height: 2em;
width: 2em; }
.fa-inverse {
color: #fff; }
.sr-only {
border: 0;
clip: rect(0, 0, 0, 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px; }
.sr-only-focusable:active, .sr-only-focusable:focus {
clip: auto;
height: auto;
margin: 0;
overflow: visible;
position: static;
width: auto; }

120
css/tables.css

@ -0,0 +1,120 @@
table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child,
table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child {
position: relative;
padding-left: 30px;
cursor: pointer;
}
table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child:before {
top: 10px;
left: initial;
right: 15px;
height: 16px;
width: 16px;
color: initial;
border: initial;
border-radius: initial;
text-align: initial;
line-height: initial;
box-shadow: initial;
box-sizing: initial;
background-color: initial;
display: block;
position: absolute;
background-image: url(../img/search-plus.svg);
background-repeat: no-repeat;
background-size: 16px 16px;
content: '';
}
table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child.dataTables_empty:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child.dataTables_empty:before {
display: none;
}
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td:first-child:before,
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th:first-child:before {
background-color: initial;
background-image: url(../img/minus-square.svg);
background-repeat: no-repeat;
background-size: 16px 16px;
content: '';
}
table.dataTable.dtr-inline.collapsed > tbody > tr.child td:before {
display: none;
}
table.dataTable.dtr-inline.collapsed.compact > tbody > tr > td:first-child,
table.dataTable.dtr-inline.collapsed.compact > tbody > tr > th:first-child {
padding-left: 27px;
}
table.dataTable.dtr-inline.collapsed.compact > tbody > tr > td:first-child:before,
table.dataTable.dtr-inline.collapsed.compact > tbody > tr > th:first-child:before {
top: 5px;
left: 4px;
height: 14px;
width: 14px;
border-radius: 14px;
line-height: 12px;
}
table.dataTable.dtr-column > tbody > tr > td.control,
table.dataTable.dtr-column > tbody > tr > th.control {
position: relative;
cursor: pointer;
width: 15px;
}
table.dataTable.dtr-column > tbody > tr > td.control:before,
table.dataTable.dtr-column > tbody > tr > th.control:before {
top: initial;
left: initial;
height: 16px;
width: 16px;
margin-top: auto;
margin-left: auto;
display: block;
position: absolute;
background-image: url(../img/search-plus.svg);
background-repeat: no-repeat;
background-size: 16px 16px;
content: '';
color: initial;
border: initial;
border-radius: initial;
text-align: initial;
line-height: initial;
box-shadow: initial;
box-sizing: initial;
background-color: initial;
}
table.dataTable.dtr-column > tbody > tr.parent td.control:before,
table.dataTable.dtr-column > tbody > tr.parent th.control:before {
background-color: initial;
background-image: url(../img/minus-square.svg);
background-repeat: no-repeat;
background-size: 16px 16px;
content: '';
}
table.dataTable > tbody > tr.child {
padding: 0.5em 1em;
}
table.dataTable > tbody > tr.child:hover {
background: transparent !important;
}
table.dataTable > tbody > tr.child ul {
display: inline-block;
list-style-type: none;
margin: 0;
padding: 0;
}
table.dataTable > tbody > tr.child ul li {
border-bottom: 1px solid #efefef;
padding: 0.5em 0;
}
table.dataTable > tbody > tr.child ul li:first-child {
padding-top: 0;
}
table.dataTable > tbody > tr.child ul li:last-child {
border-bottom: none;
}
table.dataTable > tbody > tr.child span.dtr-title {
display: inline-block;
min-width: 75px;
font-weight: bold;
}

BIN
database.mwb

71
database.sql

@ -0,0 +1,71 @@
-- MySQL Script generated by MySQL Workbench
-- Mon 05 Feb 2018 02:44:01 PM MST
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema openquestion
-- -----------------------------------------------------
-- -----------------------------------------------------
-- Schema openquestion
-- -----------------------------------------------------
CREATE SCHEMA IF NOT EXISTS `openquestion` DEFAULT CHARACTER SET utf8 ;
USE `openquestion` ;
-- -----------------------------------------------------
-- Table `openquestion`.`questions`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `openquestion`.`questions` (
`qid` INT NOT NULL AUTO_INCREMENT,
`qtext` TEXT NOT NULL,
`qcode` VARCHAR(20) NOT NULL,
PRIMARY KEY (`qid`),
UNIQUE INDEX `qid_UNIQUE` (`qid` ASC))
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `openquestion`.`answers`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `openquestion`.`answers` (
`aid` INT NOT NULL AUTO_INCREMENT,
`atext` TEXT NOT NULL,
`qid` INT NOT NULL,
PRIMARY KEY (`aid`, `qid`),
UNIQUE INDEX `aid_UNIQUE` (`aid` ASC),
INDEX `fk_answers_questions_idx` (`qid` ASC),
CONSTRAINT `fk_answers_questions`
FOREIGN KEY (`qid`)
REFERENCES `openquestion`.`questions` (`qid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `openquestion`.`responses`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `openquestion`.`responses` (
`rid` INT NOT NULL AUTO_INCREMENT,
`aid` INT NOT NULL,
`qid` INT NOT NULL,
`timestamp` DATETIME NOT NULL,
PRIMARY KEY (`rid`, `aid`, `qid`),
UNIQUE INDEX `rid_UNIQUE` (`rid` ASC),
INDEX `fk_responses_answers1_idx` (`aid` ASC, `qid` ASC),
CONSTRAINT `fk_responses_answers1`
FOREIGN KEY (`aid` , `qid`)
REFERENCES `openquestion`.`answers` (`aid` , `qid`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;

25
getresults.php

@ -0,0 +1,25 @@
<?php
require_once __DIR__ . "/required.php";
$qid = $VARS['qid'];
if (!$database->has('questions', ['qid' => $qid])) {
die();
}
$total = $database->count('responses', ['qid' => $qid]);
$answers = $database->select('answers', ['aid', 'atext'], ['qid' => $qid]);
$data['total'] = $total;
$data['answers'] = [];
foreach ($answers as $a) {
$votes = $database->count('responses', ['aid' => $a['aid']]);
$data['answers'][] = [
"id" => $a['aid'],
"votes" => $votes,
"percent" => ($votes / $total) * 100.0 . "%"
];
}
echo json_encode($data);

57
img/icon.svg

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
id="svg4226"
viewBox="0 0 512 512"
height="512"
width="512">
<defs
id="defs4228" />
<metadata
id="metadata4231">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(193.57144,123.20926)"
id="layer1">
<g
transform="matrix(3.1165216,0,0,3.1165216,-643.24098,-700.44937)"
id="g4146">
<circle
style="opacity:1;fill:none;fill-opacity:1;stroke:#4caf50;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4140"
cx="226.42857"
cy="267.36221"
r="72.14286" />
<circle
r="52.857147"
cy="267.36221"
cx="226.42857"
id="circle4142"
style="opacity:1;fill:none;fill-opacity:1;stroke:#304ffe;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
style="opacity:1;fill:#304ffe;fill-opacity:1;stroke:none;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect4144"
width="60"
height="20"
x="401.17535"
y="18.944456"
rx="10"
ry="10"
transform="matrix(0.70710678,0.70710678,-0.70710678,0.70710678,0,0)" />
</g>
</g>
</svg>

100
img/logo-inkscape.svg

@ -0,0 +1,100 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="720.98212"
height="164.28572"
viewBox="0 0 720.98211 164.28572"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="logo-inkscape.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.7"
inkscape:cx="166.16831"
inkscape:cy="-13.089869"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
units="px"
inkscape:window-width="1440"
inkscape:window-height="842"
inkscape:window-x="1024"
inkscape:window-y="156"
inkscape:window-maximized="1" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-118.57143,-199.60788)">
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="311.42856"
y="303.79074"
id="text4136"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4138"
x="311.42856"
y="303.79074"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:80px;font-family:Ubuntu;-inkscape-font-specification:Ubuntu">OpenQuestion</tspan></text>
<g
id="g4146"
transform="translate(-25.714286,14.388528)">
<circle
r="72.14286"
cy="267.36221"
cx="226.42857"
id="path4140"
style="opacity:1;fill:none;fill-opacity:1;stroke:#4caf50;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<circle
style="opacity:1;fill:none;fill-opacity:1;stroke:#304ffe;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="circle4142"
cx="226.42857"
cy="267.36221"
r="52.857147" />
<rect
transform="matrix(0.70710678,0.70710678,-0.70710678,0.70710678,0,0)"
ry="10"
rx="10"
y="18.944456"
x="401.17535"
height="20"
width="60"
id="rect4144"
style="opacity:1;fill:#304ffe;fill-opacity:1;stroke:none;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
</g>
</svg>

109
img/logo.svg

@ -0,0 +1,109 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
id="svg2"
viewBox="0 0 720.98211 164.28572"
height="164.28572"
width="720.98212">
<defs
id="defs4" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(-118.57143,-199.60788)"
id="layer1">
<g
id="text4136"
style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1">
<path
id="path4171"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:80px;font-family:Ubuntu;-inkscape-font-specification:Ubuntu"
d="m 316.06856,276.03074 q 0,-7.12 2.08,-12.56 2.16,-5.44 5.76,-9.04 3.68,-3.68 8.48,-5.52 4.88,-1.84 10.32,-1.84 5.36,0 10.08,1.84 4.8,1.84 8.4,5.52 3.6,3.6 5.68,9.04 2.16,5.44 2.16,12.56 0,7.12 -2.16,12.56 -2.08,5.44 -5.68,9.12 -3.6,3.6 -8.4,5.44 -4.72,1.84 -10.08,1.84 -5.44,0 -10.32,-1.84 -4.8,-1.84 -8.48,-5.44 -3.6,-3.68 -5.76,-9.12 -2.08,-5.44 -2.08,-12.56 z m 8.16,0 q 0,5.04 1.28,9.2 1.28,4.08 3.6,6.96 2.4,2.88 5.76,4.48 3.44,1.52 7.68,1.52 4.24,0 7.6,-1.52 3.36,-1.6 5.68,-4.48 2.4,-2.88 3.68,-6.96 1.28,-4.16 1.28,-9.2 0,-5.04 -1.28,-9.12 -1.28,-4.16 -3.68,-7.04 -2.32,-2.88 -5.68,-4.4 -3.36,-1.6 -7.6,-1.6 -4.24,0 -7.68,1.6 -3.36,1.52 -5.76,4.4 -2.32,2.88 -3.6,7.04 -1.28,4.08 -1.28,9.12 z" />
<path
id="path4173"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:80px;font-family:Ubuntu;-inkscape-font-specification:Ubuntu"
d="m 408.89606,283.07074 q 0,-7.28 -3.6,-11.2 -3.6,-3.92 -9.6,-3.92 -3.36,0 -5.28,0.24 -1.84,0.24 -2.96,0.56 l 0,26.24 q 1.36,1.12 3.92,2.16 2.56,1.04 5.6,1.04 3.2,0 5.44,-1.12 2.32,-1.2 3.76,-3.2 1.44,-2.08 2.08,-4.8 0.64,-2.8 0.64,-6 z m 7.76,0 q 0,4.72 -1.28,8.72 -1.2,4 -3.6,6.88 -2.4,2.88 -5.92,4.48 -3.44,1.6 -7.92,1.6 -3.6,0 -6.4,-0.96 -2.72,-0.96 -4.08,-1.84 l 0,16.64 -7.44,0 0,-55.12 q 2.64,-0.64 6.56,-1.36 4,-0.8 9.2,-0.8 4.8,0 8.64,1.52 3.84,1.52 6.56,4.32 2.72,2.8 4.16,6.88 1.52,4 1.52,9.04 z" />
<path
id="path4175"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:80px;font-family:Ubuntu;-inkscape-font-specification:Ubuntu"
d="m 424.88356,283.07074 q 0,-5.52 1.6,-9.6 1.6,-4.16 4.24,-6.88 2.64,-2.72 6.08,-4.08 3.44,-1.36 7.04,-1.36 8.4,0 12.88,5.28 4.48,5.2 4.48,15.92 0,0.48 0,1.28 0,0.72 -0.08,1.36 l -28.48,0 q 0.48,6.48 3.76,9.84 3.28,3.36 10.24,3.36 3.92,0 6.56,-0.64 2.72,-0.72 4.08,-1.36 l 1.04,6.24 q -1.36,0.72 -4.8,1.52 -3.36,0.8 -7.68,0.8 -5.44,0 -9.44,-1.6 -3.92,-1.68 -6.48,-4.56 -2.56,-2.88 -3.84,-6.8 -1.2,-4 -1.2,-8.72 z m 28.56,-4.08 q 0.08,-5.04 -2.56,-8.24 -2.56,-3.28 -7.12,-3.28 -2.56,0 -4.56,1.04 -1.92,0.96 -3.28,2.56 -1.36,1.6 -2.16,3.68 -0.72,2.08 -0.96,4.24 l 20.64,0 z" />
<path
id="path4177"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:80px;font-family:Ubuntu;-inkscape-font-specification:Ubuntu"
d="m 471.89106,263.39074 q 2.56,-0.64 6.8,-1.36 4.24,-0.72 9.76,-0.72 4.96,0 8.24,1.44 3.28,1.36 5.2,3.92 2,2.48 2.8,6 0.8,3.52 0.8,7.76 l 0,23.36 -7.44,0 0,-21.76 q 0,-3.84 -0.56,-6.56 -0.48,-2.72 -1.68,-4.4 -1.2,-1.68 -3.2,-2.4 -2,-0.8 -4.96,-0.8 -1.2,0 -2.48,0.08 -1.28,0.08 -2.48,0.24 -1.12,0.08 -2.08,0.24 -0.88,0.16 -1.28,0.24 l 0,35.12 -7.44,0 0,-40.4 z" />
<path
id="path4179"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:80px;font-family:Ubuntu;-inkscape-font-specification:Ubuntu"
d="m 516.06856,276.03074 q 0,-7.12 2.08,-12.56 2.16,-5.44 5.76,-9.04 3.68,-3.68 8.48,-5.52 4.88,-1.84 10.32,-1.84 5.36,0 10.08,1.84 4.8,1.84 8.4,5.52 3.6,3.6 5.68,9.04 2.16,5.44 2.16,12.56 0,6.24 -1.6,11.12 -1.6,4.88 -4.48,8.48 -2.8,3.52 -6.64,5.76 -3.76,2.16 -8.08,2.96 0.08,1.84 1.6,3.2 1.6,1.44 4,2.4 2.4,0.96 5.36,1.6 2.96,0.64 5.92,0.96 l -1.84,6.08 q -4.16,-0.56 -8,-1.52 -3.76,-0.88 -6.88,-2.4 -3.04,-1.52 -5.12,-3.92 -2.08,-2.32 -2.8,-5.84 -5.04,-0.32 -9.52,-2.32 -4.48,-2.08 -7.76,-5.68 -3.28,-3.68 -5.2,-8.88 -1.92,-5.2 -1.92,-12 z m 8.16,0 q 0,5.04 1.28,9.2 1.28,4.08 3.6,6.96 2.4,2.88 5.76,4.48 3.44,1.52 7.68,1.52 4.24,0 7.6,-1.52 3.36,-1.6 5.68,-4.48 2.4,-2.88 3.68,-6.96 1.28,-4.16 1.28,-9.2 0,-5.04 -1.28,-9.12 -1.28,-4.16 -3.68,-7.04 -2.32,-2.88 -5.68,-4.4 -3.36,-1.6 -7.6,-1.6 -4.24,0 -7.68,1.6 -3.36,1.52 -5.76,4.4 -2.32,2.88 -3.6,7.04 -1.28,4.08 -1.28,9.12 z" />
<path
id="path4181"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:80px;font-family:Ubuntu;-inkscape-font-specification:Ubuntu"
d="m 613.13606,302.59074 q -2.56,0.64 -6.8,1.36 -4.16,0.72 -9.68,0.72 -4.8,0 -8.08,-1.36 -3.28,-1.44 -5.28,-4 -2,-2.56 -2.88,-6 -0.88,-3.52 -0.88,-7.76 l 0,-23.36 7.44,0 0,21.76 q 0,7.6 2.4,10.88 2.4,3.28 8.08,3.28 1.2,0 2.48,-0.08 1.28,-0.08 2.4,-0.16 1.12,-0.16 2,-0.24 0.96,-0.16 1.36,-0.32 l 0,-35.12 7.44,0 0,40.4 z" />
<path
id="path4183"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:80px;font-family:Ubuntu;-inkscape-font-specification:Ubuntu"
d="m 623.63356,283.07074 q 0,-5.52 1.6,-9.6 1.6,-4.16 4.24,-6.88 2.64,-2.72 6.08,-4.08 3.44,-1.36 7.04,-1.36 8.4,0 12.88,5.28 4.48,5.2 4.48,15.92 0,0.48 0,1.28 0,0.72 -0.08,1.36 l -28.48,0 q 0.48,6.48 3.76,9.84 3.28,3.36 10.24,3.36 3.92,0 6.56,-0.64 2.72,-0.72 4.08,-1.36 l 1.04,6.24 q -1.36,0.72 -4.8,1.52 -3.36,0.8 -7.68,0.8 -5.44,0 -9.44,-1.6 -3.92,-1.68 -6.48,-4.56 -2.56,-2.88 -3.84,-6.8 -1.2,-4 -1.2,-8.72 z m 28.56,-4.08 q 0.08,-5.04 -2.56,-8.24 -2.56,-3.28 -7.12,-3.28 -2.56,0 -4.56,1.04 -1.92,0.96 -3.28,2.56 -1.36,1.6 -2.16,3.68 -0.72,2.08 -0.96,4.24 l 20.64,0 z" />
<path
id="path4185"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:80px;font-family:Ubuntu;-inkscape-font-specification:Ubuntu"
d="m 680.32106,298.43074 q 4.56,0 6.72,-1.2 2.24,-1.2 2.24,-3.84 0,-2.72 -2.16,-4.32 -2.16,-1.6 -7.12,-3.6 -2.4,-0.96 -4.64,-1.92 -2.16,-1.04 -3.76,-2.4 -1.6,-1.36 -2.56,-3.28 -0.96,-1.92 -0.96,-4.72 0,-5.52 4.08,-8.72 4.08,-3.28 11.12,-3.28 1.76,0 3.52,0.24 1.76,0.16 3.28,0.48 1.52,0.24 2.64,0.56 1.2,0.32 1.84,0.56 l -1.36,6.4 q -1.2,-0.64 -3.76,-1.28 -2.56,-0.72 -6.16,-0.72 -3.12,0 -5.44,1.28 -2.32,1.2 -2.32,3.84 0,1.36 0.48,2.4 0.56,1.04 1.6,1.92 1.12,0.8 2.72,1.52 1.6,0.72 3.84,1.52 2.96,1.12 5.28,2.24 2.32,1.04 3.92,2.48 1.68,1.44 2.56,3.52 0.88,2 0.88,4.96 0,5.76 -4.32,8.72 -4.24,2.96 -12.16,2.96 -5.52,0 -8.64,-0.96 -3.12,-0.88 -4.24,-1.36 l 1.36,-6.4 q 1.28,0.48 4.08,1.44 2.8,0.96 7.44,0.96 z" />
<path
id="path4187"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:80px;font-family:Ubuntu;-inkscape-font-specification:Ubuntu"
d="m 713.22606,262.19074 15.76,0 0,6.24 -15.76,0 0,19.2 q 0,3.12 0.48,5.2 0.48,2 1.44,3.2 0.96,1.12 2.4,1.6 1.44,0.48 3.36,0.48 3.36,0 5.36,-0.72 2.08,-0.8 2.88,-1.12 l 1.44,6.16 q -1.12,0.56 -3.92,1.36 -2.8,0.88 -6.4,0.88 -4.24,0 -7.04,-1.04 -2.72,-1.12 -4.4,-3.28 -1.68,-2.16 -2.4,-5.28 -0.64,-3.2 -0.64,-7.36 l 0,-37.12 7.44,-1.28 0,12.88 z" />
<path
id="path4189"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:80px;font-family:Ubuntu;-inkscape-font-specification:Ubuntu"
d="m 745.89356,303.79074 -7.44,0 0,-41.6 7.44,0 0,41.6 z m -3.76,-49.12 q -2,0 -3.44,-1.28 -1.36,-1.36 -1.36,-3.6 0,-2.24 1.36,-3.52 1.44,-1.36 3.44,-1.36 2,0 3.36,1.36 1.44,1.28 1.44,3.52 0,2.24 -1.44,3.6 -1.36,1.28 -3.36,1.28 z" />
<path
id="path4191"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:80px;font-family:Ubuntu;-inkscape-font-specification:Ubuntu"
d="m 795.48606,282.99074 q 0,4.96 -1.44,8.96 -1.44,4 -4.08,6.88 -2.56,2.88 -6.16,4.48 -3.6,1.52 -7.84,1.52 -4.24,0 -7.84,-1.52 -3.6,-1.6 -6.24,-4.48 -2.56,-2.88 -4,-6.88 -1.44,-4 -1.44,-8.96 0,-4.88 1.44,-8.88 1.44,-4.08 4,-6.96 2.64,-2.88 6.24,-4.4 3.6,-1.6 7.84,-1.6 4.24,0 7.84,1.6 3.6,1.52 6.16,4.4 2.64,2.88 4.08,6.96 1.44,4 1.44,8.88 z m -7.76,0 q 0,-7.04 -3.2,-11.12 -3.12,-4.16 -8.56,-4.16 -5.44,0 -8.64,4.16 -3.12,4.08 -3.12,11.12 0,7.04 3.12,11.2 3.2,4.08 8.64,4.08 5.44,0 8.56,-4.08 3.2,-4.16 3.2,-11.2 z" />
<path
id="path4193"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:80px;font-family:Ubuntu;-inkscape-font-specification:Ubuntu"
d="m 805.95356,263.39074 q 2.56,-0.64 6.8,-1.36 4.24,-0.72 9.76,-0.72 4.96,0 8.24,1.44 3.28,1.36 5.2,3.92 2,2.48 2.8,6 0.8,3.52 0.8,7.76 l 0,23.36 -7.44,0 0,-21.76 q 0,-3.84 -0.56,-6.56 -0.48,-2.72 -1.68,-4.4 -1.2,-1.68 -3.2,-2.4 -2,-0.8 -4.96,-0.8 -1.2,0 -2.48,0.08 -1.28,0.08 -2.48,0.24 -1.12,0.08 -2.08,0.24 -0.88,0.16 -1.28,0.24 l 0,35.12 -7.44,0 0,-40.4 z" />
</g>
<g
transform="translate(-25.714286,14.388528)"
id="g4146">
<circle
style="opacity:1;fill:none;fill-opacity:1;stroke:#4caf50;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4140"
cx="226.42857"
cy="267.36221"
r="72.14286" />
<circle
r="52.857147"
cy="267.36221"
cx="226.42857"
id="circle4142"
style="opacity:1;fill:none;fill-opacity:1;stroke:#304ffe;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
style="opacity:1;fill:#304ffe;fill-opacity:1;stroke:none;stroke-width:20;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect4144"
width="60"
height="20"
x="401.17535"
y="18.944456"
rx="10"
ry="10"
transform="matrix(0.70710678,0.70710678,-0.70710678,0.70710678,0,0)" />
</g>
</g>
</svg>

41
index.php

@ -0,0 +1,41 @@
<?php
require_once __DIR__ . "/required.php";
?>
<!DOCTYPE html>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title><?php echo SITE_TITLE; ?></title>
<link rel="stylesheet" href="<?php echo SITE_PATH; ?>css/bootstrap.min.css" />
<link rel="stylesheet" href="<?php echo SITE_PATH; ?>css/fa-svg-with-js.css" />
<script nonce="<?php echo $SECURE_NONCE; ?>">
FontAwesomeConfig = {autoAddCss: false}
</script>
<script defer src="<?php echo SITE_PATH; ?>js/fontawesome-all.min.js"></script>
<script src="<?php echo SITE_PATH; ?>js/jquery-3.3.1.min.js"></script>
<script src="<?php echo SITE_PATH; ?>js/bootstrap.min.js"></script>
<?php
$pathbits = explode("/", str_replace(SITE_PATH, "", $_SERVER['REQUEST_URI']));
$pageid = $pathbits[0];
$arg1 = isset($pathbits[1]) ? $pathbits[1] : "";
$arg2 = isset($pathbits[2]) ? $pathbits[2] : "";
switch ($pageid) {
case "":
require __DIR__ . "/pages/home.php";
break;
case "create":
require __DIR__ . "/pages/create.php";
break;
case "q":
require __DIR__ . "/pages/question.php";
break;
case "r":
case "respond":
require __DIR__ . "/pages/respond.php";
break;
default:
require __DIR__ . "/pages/404.php";
break;
}
?>

7
js/bootstrap.min.js
File diff suppressed because it is too large
View File

257
js/datatables.min.js

@ -0,0 +1,257 @@
/*
* This combined file was created by the DataTables downloader builder:
* https://datatables.net/download
*
* To rebuild or modify this file with the latest versions of the included
* software please visit:
* https://datatables.net/download/#bs4/dt-1.10.16/r-2.2.1/sc-1.4.4
*
* Included libraries:
* DataTables 1.10.16, Responsive 2.2.1, Scroller 1.4.4
*/
/*!
DataTables 1.10.16
©2008-2017 SpryMedia Ltd - datatables.net/license
*/
(function(h){"function"===typeof define&&define.amd?define(["jquery"],function(E){return h(E,window,document)}):"object"===typeof exports?module.exports=function(E,G){E||(E=window);G||(G="undefined"!==typeof window?require("jquery"):require("jquery")(E));return h(G,E,E.document)}:h(jQuery,window,document)})(function(h,E,G,k){function X(a){var b,c,d={};h.each(a,function(e){if((b=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(b[1]+" "))c=e.replace(b[0],b[2].toLowerCase()),
d[c]=e,"o"===b[1]&&X(a[e])});a._hungarianMap=d}function I(a,b,c){a._hungarianMap||X(a);var d;h.each(b,function(e){d=a._hungarianMap[e];if(d!==k&&(c||b[d]===k))"o"===d.charAt(0)?(b[d]||(b[d]={}),h.extend(!0,b[d],b[e]),I(a[d],b[d],c)):b[d]=b[e]})}function Ca(a){var b=m.defaults.oLanguage,c=a.sZeroRecords;!a.sEmptyTable&&(c&&"No data available in table"===b.sEmptyTable)&&F(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&(c&&"Loading..."===b.sLoadingRecords)&&F(a,a,"sZeroRecords","sLoadingRecords");
a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&cb(a)}function db(a){A(a,"ordering","bSort");A(a,"orderMulti","bSortMulti");A(a,"orderClasses","bSortClasses");A(a,"orderCellsTop","bSortCellsTop");A(a,"order","aaSorting");A(a,"orderFixed","aaSortingFixed");A(a,"paging","bPaginate");A(a,"pagingType","sPaginationType");A(a,"pageLength","iDisplayLength");A(a,"searching","bFilter");"boolean"===typeof a.sScrollX&&(a.sScrollX=a.sScrollX?"100%":"");"boolean"===typeof a.scrollX&&(a.scrollX=
a.scrollX?"100%":"");if(a=a.aoSearchCols)for(var b=0,c=a.length;b<c;b++)a[b]&&I(m.models.oSearch,a[b])}function eb(a){A(a,"orderable","bSortable");A(a,"orderData","aDataSort");A(a,"orderSequence","asSorting");A(a,"orderDataType","sortDataType");var b=a.aDataSort;"number"===typeof b&&!h.isArray(b)&&(a.aDataSort=[b])}function fb(a){if(!m.__browser){var b={};m.__browser=b;var c=h("<div/>").css({position:"fixed",top:0,left:-1*h(E).scrollLeft(),height:1,width:1,overflow:"hidden"}).append(h("<div/>").css({position:"absolute",
top:1,left:1,width:100,overflow:"scroll"}).append(h("<div/>").css({width:"100%",height:10}))).appendTo("body"),d=c.children(),e=d.children();b.barWidth=d[0].offsetWidth-d[0].clientWidth;b.bScrollOversize=100===e[0].offsetWidth&&100!==d[0].clientWidth;b.bScrollbarLeft=1!==Math.round(e.offset().left);b.bBounding=c[0].getBoundingClientRect().width?!0:!1;c.remove()}h.extend(a.oBrowser,m.__browser);a.oScroll.iBarWidth=m.__browser.barWidth}function gb(a,b,c,d,e,f){var g,j=!1;c!==k&&(g=c,j=!0);for(;d!==
e;)a.hasOwnProperty(d)&&(g=j?b(g,a[d],d,a):a[d],j=!0,d+=f);return g}function Da(a,b){var c=m.defaults.column,d=a.aoColumns.length,c=h.extend({},m.models.oColumn,c,{nTh:b?b:G.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.mData:d,idx:d});a.aoColumns.push(c);c=a.aoPreSearchCols;c[d]=h.extend({},m.models.oSearch,c[d]);ja(a,d,h(b).data())}function ja(a,b,c){var b=a.aoColumns[b],d=a.oClasses,e=h(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=
e.attr("width")||null;var f=(e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);f&&(b.sWidthOrig=f[1])}c!==k&&null!==c&&(eb(c),I(m.defaults.column,c),c.mDataProp!==k&&!c.mData&&(c.mData=c.mDataProp),c.sType&&(b._sManualType=c.sType),c.className&&!c.sClass&&(c.sClass=c.className),c.sClass&&e.addClass(c.sClass),h.extend(b,c),F(b,c,"sWidth","sWidthOrig"),c.iDataSort!==k&&(b.aDataSort=[c.iDataSort]),F(b,c,"aDataSort"));var g=b.mData,j=Q(g),i=b.mRender?Q(b.mRender):null,c=function(a){return"string"===
typeof a&&-1!==a.indexOf("@")};b._bAttrSrc=h.isPlainObject(g)&&(c(g.sort)||c(g.type)||c(g.filter));b._setter=null;b.fnGetData=function(a,b,c){var d=j(a,b,k,c);return i&&b?i(d,b,a,c):d};b.fnSetData=function(a,b,c){return R(g)(a,b,c)};"number"!==typeof g&&(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,e.addClass(d.sSortableNone));a=-1!==h.inArray("asc",b.asSorting);c=-1!==h.inArray("desc",b.asSorting);!b.bSortable||!a&&!c?(b.sSortingClass=d.sSortableNone,b.sSortingClassJUI=""):a&&!c?(b.sSortingClass=
d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed):!a&&c?(b.sSortingClass=d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI)}function Y(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;Ea(a);for(var c=0,d=b.length;c<d;c++)b[c].nTh.style.width=b[c].sWidth}b=a.oScroll;(""!==b.sY||""!==b.sX)&&ka(a);r(a,null,"column-sizing",[a])}function Z(a,b){var c=la(a,"bVisible");return"number"===typeof c[b]?c[b]:null}function $(a,b){var c=
la(a,"bVisible"),c=h.inArray(b,c);return-1!==c?c:null}function aa(a){var b=0;h.each(a.aoColumns,function(a,d){d.bVisible&&"none"!==h(d.nTh).css("display")&&b++});return b}function la(a,b){var c=[];h.map(a.aoColumns,function(a,e){a[b]&&c.push(e)});return c}function Fa(a){var b=a.aoColumns,c=a.aoData,d=m.ext.type.detect,e,f,g,j,i,h,l,q,t;e=0;for(f=b.length;e<f;e++)if(l=b[e],t=[],!l.sType&&l._sManualType)l.sType=l._sManualType;else if(!l.sType){g=0;for(j=d.length;g<j;g++){i=0;for(h=c.length;i<h;i++){t[i]===
k&&(t[i]=B(a,i,e,"type"));q=d[g](t[i],a);if(!q&&g!==d.length-1)break;if("html"===q)break}if(q){l.sType=q;break}}l.sType||(l.sType="string")}}function hb(a,b,c,d){var e,f,g,j,i,n,l=a.aoColumns;if(b)for(e=b.length-1;0<=e;e--){n=b[e];var q=n.targets!==k?n.targets:n.aTargets;h.isArray(q)||(q=[q]);f=0;for(g=q.length;f<g;f++)if("number"===typeof q[f]&&0<=q[f]){for(;l.length<=q[f];)Da(a);d(q[f],n)}else if("number"===typeof q[f]&&0>q[f])d(l.length+q[f],n);else if("string"===typeof q[f]){j=0;for(i=l.length;j<
i;j++)("_all"==q[f]||h(l[j].nTh).hasClass(q[f]))&&d(j,n)}}if(c){e=0;for(a=c.length;e<a;e++)d(e,c[e])}}function M(a,b,c,d){var e=a.aoData.length,f=h.extend(!0,{},m.models.oRow,{src:c?"dom":"data",idx:e});f._aData=b;a.aoData.push(f);for(var g=a.aoColumns,j=0,i=g.length;j<i;j++)g[j].sType=null;a.aiDisplayMaster.push(e);b=a.rowIdFn(b);b!==k&&(a.aIds[b]=f);(c||!a.oFeatures.bDeferRender)&&Ga(a,e,c,d);return e}function ma(a,b){var c;b instanceof h||(b=h(b));return b.map(function(b,e){c=Ha(a,e);return M(a,
c.data,e,c.cells)})}function B(a,b,c,d){var e=a.iDraw,f=a.aoColumns[c],g=a.aoData[b]._aData,j=f.sDefaultContent,i=f.fnGetData(g,d,{settings:a,row:b,col:c});if(i===k)return a.iDrawError!=e&&null===j&&(J(a,0,"Requested unknown parameter "+("function"==typeof f.mData?"{function}":"'"+f.mData+"'")+" for row "+b+", column "+c,4),a.iDrawError=e),j;if((i===g||null===i)&&null!==j&&d!==k)i=j;else if("function"===typeof i)return i.call(g);return null===i&&"display"==d?"":i}function ib(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,
d,{settings:a,row:b,col:c})}function Ia(a){return h.map(a.match(/(\\.|[^\.])+/g)||[""],function(a){return a.replace(/\\\./g,".")})}function Q(a){if(h.isPlainObject(a)){var b={};h.each(a,function(a,c){c&&(b[a]=Q(c))});return function(a,c,f,g){var j=b[c]||b._;return j!==k?j(a,c,f,g):a}}if(null===a)return function(a){return a};if("function"===typeof a)return function(b,c,f,g){return a(b,c,f,g)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var c=function(a,
b,f){var g,j;if(""!==f){j=Ia(f);for(var i=0,n=j.length;i<n;i++){f=j[i].match(ba);g=j[i].match(U);if(f){j[i]=j[i].replace(ba,"");""!==j[i]&&(a=a[j[i]]);g=[];j.splice(0,i+1);j=j.join(".");if(h.isArray(a)){i=0;for(n=a.length;i<n;i++)g.push(c(a[i],b,j))}a=f[0].substring(1,f[0].length-1);a=""===a?g:g.join(a);break}else if(g){j[i]=j[i].replace(U,"");a=a[j[i]]();continue}if(null===a||a[j[i]]===k)return k;a=a[j[i]]}}return a};return function(b,e){return c(b,e,a)}}return function(b){return b[a]}}function R(a){if(h.isPlainObject(a))return R(a._);
if(null===a)return function(){};if("function"===typeof a)return function(b,d,e){a(b,"set",d,e)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var b=function(a,d,e){var e=Ia(e),f;f=e[e.length-1];for(var g,j,i=0,n=e.length-1;i<n;i++){g=e[i].match(ba);j=e[i].match(U);if(g){e[i]=e[i].replace(ba,"");a[e[i]]=[];f=e.slice();f.splice(0,i+1);g=f.join(".");if(h.isArray(d)){j=0;for(n=d.length;j<n;j++)f={},b(f,d[j],g),a[e[i]].push(f)}else a[e[i]]=d;return}j&&(e[i]=e[i].replace(U,
""),a=a[e[i]](d));if(null===a[e[i]]||a[e[i]]===k)a[e[i]]={};a=a[e[i]]}if(f.match(U))a[f.replace(U,"")](d);else a[f.replace(ba,"")]=d};return function(c,d){return b(c,d,a)}}return function(b,d){b[a]=d}}function Ja(a){return D(a.aoData,"_aData")}function na(a){a.aoData.length=0;a.aiDisplayMaster.length=0;a.aiDisplay.length=0;a.aIds={}}function oa(a,b,c){for(var d=-1,e=0,f=a.length;e<f;e++)a[e]==b?d=e:a[e]>b&&a[e]--; -1!=d&&c===k&&a.splice(d,1)}function ca(a,b,c,d){var e=a.aoData[b],f,g=function(c,d){for(;c.childNodes.length;)c.removeChild(c.firstChild);
c.innerHTML=B(a,b,d,"display")};if("dom"===c||(!c||"auto"===c)&&"dom"===e.src)e._aData=Ha(a,e,d,d===k?k:e._aData).data;else{var j=e.anCells;if(j)if(d!==k)g(j[d],d);else{c=0;for(f=j.length;c<f;c++)g(j[c],c)}}e._aSortData=null;e._aFilterData=null;g=a.aoColumns;if(d!==k)g[d].sType=null;else{c=0;for(f=g.length;c<f;c++)g[c].sType=null;Ka(a,e)}}function Ha(a,b,c,d){var e=[],f=b.firstChild,g,j,i=0,n,l=a.aoColumns,q=a._rowReadObject,d=d!==k?d:q?{}:[],t=function(a,b){if("string"===typeof a){var c=a.indexOf("@");
-1!==c&&(c=a.substring(c+1),R(a)(d,b.getAttribute(c)))}},m=function(a){if(c===k||c===i)j=l[i],n=h.trim(a.innerHTML),j&&j._bAttrSrc?(R(j.mData._)(d,n),t(j.mData.sort,a),t(j.mData.type,a),t(j.mData.filter,a)):q?(j._setter||(j._setter=R(j.mData)),j._setter(d,n)):d[i]=n;i++};if(f)for(;f;){g=f.nodeName.toUpperCase();if("TD"==g||"TH"==g)m(f),e.push(f);f=f.nextSibling}else{e=b.anCells;f=0;for(g=e.length;f<g;f++)m(e[f])}if(b=b.firstChild?b:b.nTr)(b=b.getAttribute("id"))&&R(a.rowId)(d,b);return{data:d,cells:e}}
function Ga(a,b,c,d){var e=a.aoData[b],f=e._aData,g=[],j,i,n,l,q;if(null===e.nTr){j=c||G.createElement("tr");e.nTr=j;e.anCells=g;j._DT_RowIndex=b;Ka(a,e);l=0;for(q=a.aoColumns.length;l<q;l++){n=a.aoColumns[l];i=c?d[l]:G.createElement(n.sCellType);i._DT_CellIndex={row:b,column:l};g.push(i);if((!c||n.mRender||n.mData!==l)&&(!h.isPlainObject(n.mData)||n.mData._!==l+".display"))i.innerHTML=B(a,b,l,"display");n.sClass&&(i.className+=" "+n.sClass);n.bVisible&&!c?j.appendChild(i):!n.bVisible&&c&&i.parentNode.removeChild(i);
n.fnCreatedCell&&n.fnCreatedCell.call(a.oInstance,i,B(a,b,l),f,b,l)}r(a,"aoRowCreatedCallback",null,[j,f,b])}e.nTr.setAttribute("role","row")}function Ka(a,b){var c=b.nTr,d=b._aData;if(c){var e=a.rowIdFn(d);e&&(c.id=e);d.DT_RowClass&&(e=d.DT_RowClass.split(" "),b.__rowc=b.__rowc?qa(b.__rowc.concat(e)):e,h(c).removeClass(b.__rowc.join(" ")).addClass(d.DT_RowClass));d.DT_RowAttr&&h(c).attr(d.DT_RowAttr);d.DT_RowData&&h(c).data(d.DT_RowData)}}function jb(a){var b,c,d,e,f,g=a.nTHead,j=a.nTFoot,i=0===
h("th, td",g).length,n=a.oClasses,l=a.aoColumns;i&&(e=h("<tr/>").appendTo(g));b=0;for(c=l.length;b<c;b++)f=l[b],d=h(f.nTh).addClass(f.sClass),i&&d.appendTo(e),a.oFeatures.bSort&&(d.addClass(f.sSortingClass),!1!==f.bSortable&&(d.attr("tabindex",a.iTabIndex).attr("aria-controls",a.sTableId),La(a,f.nTh,b))),f.sTitle!=d[0].innerHTML&&d.html(f.sTitle),Ma(a,"header")(a,d,f,n);i&&da(a.aoHeader,g);h(g).find(">tr").attr("role","row");h(g).find(">tr>th, >tr>td").addClass(n.sHeaderTH);h(j).find(">tr>th, >tr>td").addClass(n.sFooterTH);
if(null!==j){a=a.aoFooter[0];b=0;for(c=a.length;b<c;b++)f=l[b],f.nTf=a[b].cell,f.sClass&&h(f.nTf).addClass(f.sClass)}}function ea(a,b,c){var d,e,f,g=[],j=[],i=a.aoColumns.length,n;if(b){c===k&&(c=!1);d=0;for(e=b.length;d<e;d++){g[d]=b[d].slice();g[d].nTr=b[d].nTr;for(f=i-1;0<=f;f--)!a.aoColumns[f].bVisible&&!c&&g[d].splice(f,1);j.push([])}d=0;for(e=g.length;d<e;d++){if(a=g[d].nTr)for(;f=a.firstChild;)a.removeChild(f);f=0;for(b=g[d].length;f<b;f++)if(n=i=1,j[d][f]===k){a.appendChild(g[d][f].cell);
for(j[d][f]=1;g[d+i]!==k&&g[d][f].cell==g[d+i][f].cell;)j[d+i][f]=1,i++;for(;g[d][f+n]!==k&&g[d][f].cell==g[d][f+n].cell;){for(c=0;c<i;c++)j[d+c][f+n]=1;n++}h(g[d][f].cell).attr("rowspan",i).attr("colspan",n)}}}}function N(a){var b=r(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==h.inArray(!1,b))C(a,!1);else{var b=[],c=0,d=a.asStripeClasses,e=d.length,f=a.oLanguage,g=a.iInitDisplayStart,j="ssp"==y(a),i=a.aiDisplay;a.bDrawing=!0;g!==k&&-1!==g&&(a._iDisplayStart=j?g:g>=a.fnRecordsDisplay()?0:g,a.iInitDisplayStart=
-1);var g=a._iDisplayStart,n=a.fnDisplayEnd();if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,C(a,!1);else if(j){if(!a.bDestroying&&!kb(a))return}else a.iDraw++;if(0!==i.length){f=j?a.aoData.length:n;for(j=j?0:g;j<f;j++){var l=i[j],q=a.aoData[l];null===q.nTr&&Ga(a,l);l=q.nTr;if(0!==e){var t=d[c%e];q._sRowStripe!=t&&(h(l).removeClass(q._sRowStripe).addClass(t),q._sRowStripe=t)}r(a,"aoRowCallback",null,[l,q._aData,c,j]);b.push(l);c++}}else c=f.sZeroRecords,1==a.iDraw&&"ajax"==y(a)?c=f.sLoadingRecords:
f.sEmptyTable&&0===a.fnRecordsTotal()&&(c=f.sEmptyTable),b[0]=h("<tr/>",{"class":e?d[0]:""}).append(h("<td />",{valign:"top",colSpan:aa(a),"class":a.oClasses.sRowEmpty}).html(c))[0];r(a,"aoHeaderCallback","header",[h(a.nTHead).children("tr")[0],Ja(a),g,n,i]);r(a,"aoFooterCallback","footer",[h(a.nTFoot).children("tr")[0],Ja(a),g,n,i]);d=h(a.nTBody);d.children().detach();d.append(h(b));r(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1}}function S(a,b){var c=a.oFeatures,d=c.bFilter;
c.bSort&&lb(a);d?fa(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();!0!==b&&(a._iDisplayStart=0);a._drawHold=b;N(a);a._drawHold=!1}function mb(a){var b=a.oClasses,c=h(a.nTable),c=h("<div/>").insertBefore(c),d=a.oFeatures,e=h("<div/>",{id:a.sTableId+"_wrapper","class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=e[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var f=a.sDom.split(""),g,j,i,n,l,q,k=0;k<f.length;k++){g=null;j=f[k];if("<"==j){i=h("<div/>")[0];
n=f[k+1];if("'"==n||'"'==n){l="";for(q=2;f[k+q]!=n;)l+=f[k+q],q++;"H"==l?l=b.sJUIHeader:"F"==l&&(l=b.sJUIFooter);-1!=l.indexOf(".")?(n=l.split("."),i.id=n[0].substr(1,n[0].length-1),i.className=n[1]):"#"==l.charAt(0)?i.id=l.substr(1,l.length-1):i.className=l;k+=q}e.append(i);e=h(i)}else if(">"==j)e=e.parent();else if("l"==j&&d.bPaginate&&d.bLengthChange)g=nb(a);else if("f"==j&&d.bFilter)g=ob(a);else if("r"==j&&d.bProcessing)g=pb(a);else if("t"==j)g=qb(a);else if("i"==j&&d.bInfo)g=rb(a);else if("p"==
j&&d.bPaginate)g=sb(a);else if(0!==m.ext.feature.length){i=m.ext.feature;q=0;for(n=i.length;q<n;q++)if(j==i[q].cFeature){g=i[q].fnInit(a);break}}g&&(i=a.aanFeatures,i[j]||(i[j]=[]),i[j].push(g),e.append(g))}c.replaceWith(e);a.nHolding=null}function da(a,b){var c=h(b).children("tr"),d,e,f,g,j,i,n,l,q,k;a.splice(0,a.length);f=0;for(i=c.length;f<i;f++)a.push([]);f=0;for(i=c.length;f<i;f++){d=c[f];for(e=d.firstChild;e;){if("TD"==e.nodeName.toUpperCase()||"TH"==e.nodeName.toUpperCase()){l=1*e.getAttribute("colspan");
q=1*e.getAttribute("rowspan");l=!l||0===l||1===l?1:l;q=!q||0===q||1===q?1:q;g=0;for(j=a[f];j[g];)g++;n=g;k=1===l?!0:!1;for(j=0;j<l;j++)for(g=0;g<q;g++)a[f+g][n+j]={cell:e,unique:k},a[f+g].nTr=d}e=e.nextSibling}}}function ra(a,b,c){var d=[];c||(c=a.aoHeader,b&&(c=[],da(c,b)));for(var b=0,e=c.length;b<e;b++)for(var f=0,g=c[b].length;f<g;f++)if(c[b][f].unique&&(!d[f]||!a.bSortCellsTop))d[f]=c[b][f].cell;return d}function sa(a,b,c){r(a,"aoServerParams","serverParams",[b]);if(b&&h.isArray(b)){var d={},
e=/(.*?)\[\]$/;h.each(b,function(a,b){var c=b.name.match(e);c?(c=c[0],d[c]||(d[c]=[]),d[c].push(b.value)):d[b.name]=b.value});b=d}var f,g=a.ajax,j=a.oInstance,i=function(b){r(a,null,"xhr",[a,b,a.jqXHR]);c(b)};if(h.isPlainObject(g)&&g.data){f=g.data;var n=h.isFunction(f)?f(b,a):f,b=h.isFunction(f)&&n?n:h.extend(!0,b,n);delete g.data}n={data:b,success:function(b){var c=b.error||b.sError;c&&J(a,0,c);a.json=b;i(b)},dataType:"json",cache:!1,type:a.sServerMethod,error:function(b,c){var d=r(a,null,"xhr",
[a,null,a.jqXHR]);-1===h.inArray(!0,d)&&("parsererror"==c?J(a,0,"Invalid JSON response",1):4===b.readyState&&J(a,0,"Ajax error",7));C(a,!1)}};a.oAjaxData=b;r(a,null,"preXhr",[a,b]);a.fnServerData?a.fnServerData.call(j,a.sAjaxSource,h.map(b,function(a,b){return{name:b,value:a}}),i,a):a.sAjaxSource||"string"===typeof g?a.jqXHR=h.ajax(h.extend(n,{url:g||a.sAjaxSource})):h.isFunction(g)?a.jqXHR=g.call(j,b,i,a):(a.jqXHR=h.ajax(h.extend(n,g)),g.data=f)}function kb(a){return a.bAjaxDataGet?(a.iDraw++,C(a,
!0),sa(a,tb(a),function(b){ub(a,b)}),!1):!0}function tb(a){var b=a.aoColumns,c=b.length,d=a.oFeatures,e=a.oPreviousSearch,f=a.aoPreSearchCols,g,j=[],i,n,l,k=V(a);g=a._iDisplayStart;i=!1!==d.bPaginate?a._iDisplayLength:-1;var t=function(a,b){j.push({name:a,value:b})};t("sEcho",a.iDraw);t("iColumns",c);t("sColumns",D(b,"sName").join(","));t("iDisplayStart",g);t("iDisplayLength",i);var pa={draw:a.iDraw,columns:[],order:[],start:g,length:i,search:{value:e.sSearch,regex:e.bRegex}};for(g=0;g<c;g++)n=b[g],
l=f[g],i="function"==typeof n.mData?"function":n.mData,pa.columns.push({data:i,name:n.sName,searchable:n.bSearchable,orderable:n.bSortable,search:{value:l.sSearch,regex:l.bRegex}}),t("mDataProp_"+g,i),d.bFilter&&(t("sSearch_"+g,l.sSearch),t("bRegex_"+g,l.bRegex),t("bSearchable_"+g,n.bSearchable)),d.bSort&&t("bSortable_"+g,n.bSortable);d.bFilter&&(t("sSearch",e.sSearch),t("bRegex",e.bRegex));d.bSort&&(h.each(k,function(a,b){pa.order.push({column:b.col,dir:b.dir});t("iSortCol_"+a,b.col);t("sSortDir_"+
a,b.dir)}),t("iSortingCols",k.length));b=m.ext.legacy.ajax;return null===b?a.sAjaxSource?j:pa:b?j:pa}function ub(a,b){var c=ta(a,b),d=b.sEcho!==k?b.sEcho:b.draw,e=b.iTotalRecords!==k?b.iTotalRecords:b.recordsTotal,f=b.iTotalDisplayRecords!==k?b.iTotalDisplayRecords:b.recordsFiltered;if(d){if(1*d<a.iDraw)return;a.iDraw=1*d}na(a);a._iRecordsTotal=parseInt(e,10);a._iRecordsDisplay=parseInt(f,10);d=0;for(e=c.length;d<e;d++)M(a,c[d]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=!1;N(a);a._bInitComplete||
ua(a,b);a.bAjaxDataGet=!0;C(a,!1)}function ta(a,b){var c=h.isPlainObject(a.ajax)&&a.ajax.dataSrc!==k?a.ajax.dataSrc:a.sAjaxDataProp;return"data"===c?b.aaData||b[c]:""!==c?Q(c)(b):b}function ob(a){var b=a.oClasses,c=a.sTableId,d=a.oLanguage,e=a.oPreviousSearch,f=a.aanFeatures,g='<input type="search" class="'+b.sFilterInput+'"/>',j=d.sSearch,j=j.match(/_INPUT_/)?j.replace("_INPUT_",g):j+g,b=h("<div/>",{id:!f.f?c+"_filter":null,"class":b.sFilter}).append(h("<label/>").append(j)),f=function(){var b=!this.value?
"":this.value;b!=e.sSearch&&(fa(a,{sSearch:b,bRegex:e.bRegex,bSmart:e.bSmart,bCaseInsensitive:e.bCaseInsensitive}),a._iDisplayStart=0,N(a))},g=null!==a.searchDelay?a.searchDelay:"ssp"===y(a)?400:0,i=h("input",b).val(e.sSearch).attr("placeholder",d.sSearchPlaceholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",g?Na(f,g):f).on("keypress.DT",function(a){if(13==a.keyCode)return!1}).attr("aria-controls",c);h(a.nTable).on("search.dt.DT",function(b,c){if(a===c)try{i[0]!==G.activeElement&&i.val(e.sSearch)}catch(d){}});
return b[0]}function fa(a,b,c){var d=a.oPreviousSearch,e=a.aoPreSearchCols,f=function(a){d.sSearch=a.sSearch;d.bRegex=a.bRegex;d.bSmart=a.bSmart;d.bCaseInsensitive=a.bCaseInsensitive};Fa(a);if("ssp"!=y(a)){vb(a,b.sSearch,c,b.bEscapeRegex!==k?!b.bEscapeRegex:b.bRegex,b.bSmart,b.bCaseInsensitive);f(b);for(b=0;b<e.length;b++)wb(a,e[b].sSearch,b,e[b].bEscapeRegex!==k?!e[b].bEscapeRegex:e[b].bRegex,e[b].bSmart,e[b].bCaseInsensitive);xb(a)}else f(b);a.bFiltered=!0;r(a,null,"search",[a])}function xb(a){for(var b=
m.ext.search,c=a.aiDisplay,d,e,f=0,g=b.length;f<g;f++){for(var j=[],i=0,n=c.length;i<n;i++)e=c[i],d=a.aoData[e],b[f](a,d._aFilterData,e,d._aData,i)&&j.push(e);c.length=0;h.merge(c,j)}}function wb(a,b,c,d,e,f){if(""!==b){for(var g=[],j=a.aiDisplay,d=Oa(b,d,e,f),e=0;e<j.length;e++)b=a.aoData[j[e]]._aFilterData[c],d.test(b)&&g.push(j[e]);a.aiDisplay=g}}function vb(a,b,c,d,e,f){var d=Oa(b,d,e,f),f=a.oPreviousSearch.sSearch,g=a.aiDisplayMaster,j,e=[];0!==m.ext.search.length&&(c=!0);j=yb(a);if(0>=b.length)a.aiDisplay=
g.slice();else{if(j||c||f.length>b.length||0!==b.indexOf(f)||a.bSorted)a.aiDisplay=g.slice();b=a.aiDisplay;for(c=0;c<b.length;c++)d.test(a.aoData[b[c]]._sFilterRow)&&e.push(b[c]);a.aiDisplay=e}}function Oa(a,b,c,d){a=b?a:Pa(a);c&&(a="^(?=.*?"+h.map(a.match(/"[^"]+"|[^ ]+/g)||[""],function(a){if('"'===a.charAt(0))var b=a.match(/^"(.*)"$/),a=b?b[1]:a;return a.replace('"',"")}).join(")(?=.*?")+").*$");return RegExp(a,d?"i":"")}function yb(a){var b=a.aoColumns,c,d,e,f,g,j,i,h,l=m.ext.type.search;c=!1;
d=0;for(f=a.aoData.length;d<f;d++)if(h=a.aoData[d],!h._aFilterData){j=[];e=0;for(g=b.length;e<g;e++)c=b[e],c.bSearchable?(i=B(a,d,e,"filter"),l[c.sType]&&(i=l[c.sType](i)),null===i&&(i=""),"string"!==typeof i&&i.toString&&(i=i.toString())):i="",i.indexOf&&-1!==i.indexOf("&")&&(va.innerHTML=i,i=Wb?va.textContent:va.innerText),i.replace&&(i=i.replace(/[\r\n]/g,"")),j.push(i);h._aFilterData=j;h._sFilterRow=j.join(" ");c=!0}return c}function zb(a){return{search:a.sSearch,smart:a.bSmart,regex:a.bRegex,
caseInsensitive:a.bCaseInsensitive}}function Ab(a){return{sSearch:a.search,bSmart:a.smart,bRegex:a.regex,bCaseInsensitive:a.caseInsensitive}}function rb(a){var b=a.sTableId,c=a.aanFeatures.i,d=h("<div/>",{"class":a.oClasses.sInfo,id:!c?b+"_info":null});c||(a.aoDrawCallback.push({fn:Bb,sName:"information"}),d.attr("role","status").attr("aria-live","polite"),h(a.nTable).attr("aria-describedby",b+"_info"));return d[0]}function Bb(a){var b=a.aanFeatures.i;if(0!==b.length){var c=a.oLanguage,d=a._iDisplayStart+
1,e=a.fnDisplayEnd(),f=a.fnRecordsTotal(),g=a.fnRecordsDisplay(),j=g?c.sInfo:c.sInfoEmpty;g!==f&&(j+=" "+c.sInfoFiltered);j+=c.sInfoPostFix;j=Cb(a,j);c=c.fnInfoCallback;null!==c&&(j=c.call(a.oInstance,a,d,e,f,g,j));h(b).html(j)}}function Cb(a,b){var c=a.fnFormatNumber,d=a._iDisplayStart+1,e=a._iDisplayLength,f=a.fnRecordsDisplay(),g=-1===e;return b.replace(/_START_/g,c.call(a,d)).replace(/_END_/g,c.call(a,a.fnDisplayEnd())).replace(/_MAX_/g,c.call(a,a.fnRecordsTotal())).replace(/_TOTAL_/g,c.call(a,
f)).replace(/_PAGE_/g,c.call(a,g?1:Math.ceil(d/e))).replace(/_PAGES_/g,c.call(a,g?1:Math.ceil(f/e)))}function ga(a){var b,c,d=a.iInitDisplayStart,e=a.aoColumns,f;c=a.oFeatures;var g=a.bDeferLoading;if(a.bInitialised){mb(a);jb(a);ea(a,a.aoHeader);ea(a,a.aoFooter);C(a,!0);c.bAutoWidth&&Ea(a);b=0;for(c=e.length;b<c;b++)f=e[b],f.sWidth&&(f.nTh.style.width=v(f.sWidth));r(a,null,"preInit",[a]);S(a);e=y(a);if("ssp"!=e||g)"ajax"==e?sa(a,[],function(c){var f=ta(a,c);for(b=0;b<f.length;b++)M(a,f[b]);a.iInitDisplayStart=
d;S(a);C(a,!1);ua(a,c)},a):(C(a,!1),ua(a))}else setTimeout(function(){ga(a)},200)}function ua(a,b){a._bInitComplete=!0;(b||a.oInit.aaData)&&Y(a);r(a,null,"plugin-init",[a,b]);r(a,"aoInitComplete","init",[a,b])}function Qa(a,b){var c=parseInt(b,10);a._iDisplayLength=c;Ra(a);r(a,null,"length",[a,c])}function nb(a){for(var b=a.oClasses,c=a.sTableId,d=a.aLengthMenu,e=h.isArray(d[0]),f=e?d[0]:d,d=e?d[1]:d,e=h("<select/>",{name:c+"_length","aria-controls":c,"class":b.sLengthSelect}),g=0,j=f.length;g<j;g++)e[0][g]=
new Option("number"===typeof d[g]?a.fnFormatNumber(d[g]):d[g],f[g]);var i=h("<div><label/></div>").addClass(b.sLength);a.aanFeatures.l||(i[0].id=c+"_length");i.children().append(a.oLanguage.sLengthMenu.replace("_MENU_",e[0].outerHTML));h("select",i).val(a._iDisplayLength).on("change.DT",function(){Qa(a,h(this).val());N(a)});h(a.nTable).on("length.dt.DT",function(b,c,d){a===c&&h("select",i).val(d)});return i[0]}function sb(a){var b=a.sPaginationType,c=m.ext.pager[b],d="function"===typeof c,e=function(a){N(a)},
b=h("<div/>").addClass(a.oClasses.sPaging+b)[0],f=a.aanFeatures;d||c.fnInit(a,b,e);f.p||(b.id=a.sTableId+"_paginate",a.aoDrawCallback.push({fn:function(a){if(d){var b=a._iDisplayStart,i=a._iDisplayLength,h=a.fnRecordsDisplay(),l=-1===i,b=l?0:Math.ceil(b/i),i=l?1:Math.ceil(h/i),h=c(b,i),k,l=0;for(k=f.p.length;l<k;l++)Ma(a,"pageButton")(a,f.p[l],l,h,b,i)}else c.fnUpdate(a,e)},sName:"pagination"}));return b}function Sa(a,b,c){var d=a._iDisplayStart,e=a._iDisplayLength,f=a.fnRecordsDisplay();0===f||-1===